#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 */
int /*<<< orphan*/ SEEK_SET;
int atoi(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/);
double *malloc(int);
int /*<<< orphan*/ printf(char *, double, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int scanf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int npass = argc < 2 ? 1 : atoi(argv[1]);
  char title[80 + 1];
  double *v, *vi, val, z, c[3];
  double origin[3], u1[3], u2[3], u3[3];
  int nat, nfg, n1, n2, n3, n1p, ip, ifg, i1, i2, i3, mini1, maxi1, min1, max1,
      min2, max2, min3, max3, r = 0, iifg, maxgx, maxgy, maxgz, ilay;
  long pos;
  fgets(title, 80, stdin);
  puts(title);
  r += scanf("%d%d%lf%lf%lf", &nfg, &nat, origin, origin + 1, origin + 2);
  r += scanf("%d%d%lf%lf%lf", &maxgx, &n1, u1, u1 + 1, u1 + 2);
  r += scanf("%d%d%lf%lf%lf", &maxgy, &n2, u2, u2 + 1, u2 + 2);
  r += scanf("%d%d%lf%lf%lf", &maxgz, &n3, u3, u3 + 1, u3 + 2);
  if (r != 20)
    return 1;
  printf("%5d%12.6f%12.6f%12.6f\n", nat, origin[0], origin[1], origin[2]);
  printf("%5d%12.6f%12.6f%12.6f\n", n1, u1[0], u1[1], u1[2]);
  printf("%5d%12.6f%12.6f%12.6f\n", n2, u2[0], u2[1], u2[2]);
  printf("%5d%12.6f%12.6f%12.6f\n", n3, u3[0], u3[1], u3[2]);
  for (i1 = 0; i1 < nat; i1++)
    if (scanf("%d%d%lf%lf%lf%lf", &i2, &i3, &z, c, c + 1, c + 2) != 6)
      return 2;
    else
      printf("%5d%12.6f%12.6f%12.6f%12.6f\n", i3, z, c[0], c[1], c[2]);
  pos = ftell(stdin);
  n1p = (n1 - 1) / npass + 1;
  if ((v = malloc(sizeof(*v) * n1p * n2 * n3)) == NULL)
    return 3;
  for (ip = 1; ip <= npass; ip++) {
    if (npass != 1)
      fprintf(stderr, "Doing pass %d\r\n", ip);
    mini1 = (ip - 1) * n1p + 1;
    maxi1 = ((ip * n1p) > (n1) ? (n1) : (ip * n1p));
    for (vi = v, i1 = 0; i1 < n1p * n2 * n3; i1++)
      *vi++ = 0;
    for (ifg = 1; ifg <= nfg; ifg++) {
      if (scanf("%d%d%d%d%d%d%d%d", &iifg, &ilay, &min1, &max1, &min2, &max2,
                &min3, &max3) != 8)
        return 4;
      fprintf(stderr, "Doing frg %d\r", iifg);
      for (i1 = min1; i1 <= max1; i1++)
        for (i2 = min2; i2 <= max2; i2++)
          for (i3 = min3; i3 <= max3; i3++) {
            if (scanf("%lf", &val) != 1)
              return 5;
            if (i1 >= mini1 && i1 <= maxi1)
              v[((i1 - mini1) * n2 + i2 - 1) * n3 + i3 - 1] += val;
          }
    }
    if (npass != 1)
      fprintf(stderr, "Writing data...\r\n");
    for (i1 = mini1; i1 <= maxi1; i1++)
      for (i2 = 1; i2 <= n2; i2++)
        for (i3 = 1; i3 <= n3; i3++) {
          printf("%13.5e", v[((i1 - mini1) * n2 + i2 - 1) * n3 + i3 - 1]);
          if ((i3 - 1) % 6 == 5 || i3 == n3)
            putchar('\n');
        }
    if (ip < npass)
      fseek(stdin, pos, SEEK_SET);
  }
  fprintf(stderr, "Converted %d fragments in %d pass(es).\r\n", nfg, npass);
  free(v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11e3 <main+0x33>
mov    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11f6 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x180(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2dd4(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1070 <fgets@plt>
lea    -0x70(%rbp),%rdi
call   1050 <puts@plt>
lea    -0xd0(%rbp),%rcx
lea    -0xd0(%rbp),%r8
add    $0x8,%r8
lea    -0xd0(%rbp),%r9
add    $0x10,%r9
lea    0xdb3(%rip),%rdi
lea    -0x138(%rbp),%rsi
lea    -0x134(%rbp),%rdx
mov    $0x0,%al
call   10c0 <scanf@plt>
add    -0x180(%rbp),%eax
mov    %eax,-0x180(%rbp)
lea    -0xf0(%rbp),%rcx
lea    -0xf0(%rbp),%r8
add    $0x8,%r8
lea    -0xf0(%rbp),%r9
add    $0x10,%r9
lea    0xd6e(%rip),%rdi
lea    -0x188(%rbp),%rsi
lea    -0x13c(%rbp),%rdx
mov    $0x0,%al
call   10c0 <scanf@plt>
add    -0x180(%rbp),%eax
mov    %eax,-0x180(%rbp)
lea    -0x110(%rbp),%rcx
lea    -0x110(%rbp),%r8
add    $0x8,%r8
lea    -0x110(%rbp),%r9
add    $0x10,%r9
lea    0xd29(%rip),%rdi
lea    -0x18c(%rbp),%rsi
lea    -0x140(%rbp),%rdx
mov    $0x0,%al
call   10c0 <scanf@plt>
add    -0x180(%rbp),%eax
mov    %eax,-0x180(%rbp)
lea    -0x130(%rbp),%rcx
lea    -0x130(%rbp),%r8
add    $0x8,%r8
lea    -0x130(%rbp),%r9
add    $0x10,%r9
lea    0xce4(%rip),%rdi
lea    -0x190(%rbp),%rsi
lea    -0x144(%rbp),%rdx
mov    $0x0,%al
call   10c0 <scanf@plt>
add    -0x180(%rbp),%eax
mov    %eax,-0x180(%rbp)
cmpl   $0x14,-0x180(%rbp)
je     1356 <main+0x1a6>
movl   $0x1,-0x4(%rbp)
jmp    19df <main+0x82f>
cvtsi2sdl -0x134(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm3
ff
lea    0xc91(%rip),%rdi
mov    $0x4,%al
call   1060 <printf@plt>
cvtsi2sdl -0x13c(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0xe0(%rbp),%xmm3
ff
lea    0xc63(%rip),%rdi
mov    $0x4,%al
call   1060 <printf@plt>
cvtsi2sdl -0x140(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm3
ff
lea    0xc35(%rip),%rdi
mov    $0x4,%al
call   1060 <printf@plt>
cvtsi2sdl -0x144(%rbp),%xmm0
ff
movsd  -0x130(%rbp),%xmm1
ff
movsd  -0x128(%rbp),%xmm2
ff
movsd  -0x120(%rbp),%xmm3
ff
lea    0xc07(%rip),%rdi
mov    $0x4,%al
call   1060 <printf@plt>
movl   $0x0,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x134(%rbp),%eax
jge    14d2 <main+0x322>
lea    -0xb0(%rbp),%r8
lea    -0xb0(%rbp),%r9
add    $0x8,%r9
lea    -0xb0(%rbp),%rax
add    $0x10,%rax
lea    0xbd7(%rip),%rdi
lea    -0x158(%rbp),%rsi
lea    -0x15c(%rbp),%rdx
lea    -0x90(%rbp),%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   10c0 <scanf@plt>
cmp    $0x6,%eax
je     1483 <main+0x2d3>
movl   $0x2,-0x4(%rbp)
jmp    19df <main+0x82f>
cvtsi2sdl -0x15c(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm3
ff
movsd  -0xa0(%rbp),%xmm4
ff
lea    0xb84(%rip),%rdi
mov    $0x5,%al
call   1060 <printf@plt>
jmp    14be <main+0x30e>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    1418 <main+0x268>
mov    0x2b0f(%rip),%rax
mov    (%rax),%edi
call   1090 <ftell@plt>
mov    %rax,-0x1a0(%rbp)
mov    -0x13c(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x14(%rbp)
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
movslq -0x148(%rbp),%rax
shl    $0x3,%rax
movslq -0x140(%rbp),%rcx
imul   %rcx,%rax
movslq -0x144(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmp    $0x0,%rax
jne    153f <main+0x38f>
movl   $0x3,-0x4(%rbp)
jmp    19df <main+0x82f>
movl   $0x1,-0x14c(%rbp)
mov    -0x14c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     19b6 <main+0x806>
cmpl   $0x1,-0x14(%rbp)
je     157f <main+0x3cf>
mov    0x2a6f(%rip),%rax
mov    (%rax),%edi
mov    -0x14c(%rbp),%edx
lea    0xadb(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14c(%rbp),%eax
sub    $0x1,%eax
imul   -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x160(%rbp)
mov    -0x14c(%rbp),%eax
imul   -0x148(%rbp),%eax
cmp    -0x13c(%rbp),%eax
jle    15c2 <main+0x412>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
jmp    15d5 <main+0x425>
mov    -0x14c(%rbp),%eax
imul   -0x148(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
mov    %eax,-0x164(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x154(%rbp)
mov    -0x154(%rbp),%eax
mov    -0x148(%rbp),%ecx
imul   -0x140(%rbp),%ecx
imul   -0x144(%rbp),%ecx
cmp    %ecx,%eax
jge    163f <main+0x48f>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    15f3 <main+0x443>
movl   $0x1,-0x150(%rbp)
mov    -0x150(%rbp),%eax
cmp    -0x138(%rbp),%eax
jg     1832 <main+0x682>
lea    0xa01(%rip),%rdi
lea    -0x184(%rbp),%rsi
lea    -0x194(%rbp),%rdx
lea    -0x168(%rbp),%rcx
lea    -0x16c(%rbp),%r8
lea    -0x170(%rbp),%r9
lea    -0x174(%rbp),%r11
lea    -0x178(%rbp),%r10
lea    -0x17c(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   10c0 <scanf@plt>
cmp    $0x8,%eax
je     16c4 <main+0x514>
movl   $0x4,-0x4(%rbp)
jmp    19df <main+0x82f>
mov    0x290d(%rip),%rax
mov    (%rax),%edi
mov    -0x184(%rbp),%edx
lea    0x99a(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x168(%rbp),%eax
mov    %eax,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x16c(%rbp),%eax
jg     1819 <main+0x669>
mov    -0x170(%rbp),%eax
mov    %eax,-0x158(%rbp)
mov    -0x158(%rbp),%eax
cmp    -0x174(%rbp),%eax
jg     1800 <main+0x650>
mov    -0x178(%rbp),%eax
mov    %eax,-0x15c(%rbp)
mov    -0x15c(%rbp),%eax
cmp    -0x17c(%rbp),%eax
jg     17e7 <main+0x637>
lea    0x8c8(%rip),%rdi
lea    -0x88(%rbp),%rsi
mov    $0x0,%al
call   10c0 <scanf@plt>
cmp    $0x1,%eax
je     1765 <main+0x5b5>
movl   $0x5,-0x4(%rbp)
jmp    19df <main+0x82f>
mov    -0x154(%rbp),%eax
cmp    -0x160(%rbp),%eax
jl     17ce <main+0x61e>
mov    -0x154(%rbp),%eax
cmp    -0x164(%rbp),%eax
jg     17ce <main+0x61e>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x78(%rbp),%rax
mov    -0x154(%rbp),%ecx
sub    -0x160(%rbp),%ecx
imul   -0x140(%rbp),%ecx
add    -0x158(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x144(%rbp),%ecx
add    -0x15c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    17d3 <main+0x623>
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    1729 <main+0x579>
jmp    17ec <main+0x63c>
mov    -0x158(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
jmp    170b <main+0x55b>
jmp    1805 <main+0x655>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    16ed <main+0x53d>
jmp    181e <main+0x66e>
mov    -0x150(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x150(%rbp)
jmp    1649 <main+0x499>
cmpl   $0x1,-0x14(%rbp)
je     1853 <main+0x6a3>
mov    0x2795(%rip),%rax
mov    (%rax),%edi
lea    0x836(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x160(%rbp),%eax
mov    %eax,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x164(%rbp),%eax
jg     1970 <main+0x7c0>
movl   $0x1,-0x158(%rbp)
mov    -0x158(%rbp),%eax
cmp    -0x140(%rbp),%eax
jg     1957 <main+0x7a7>
movl   $0x1,-0x15c(%rbp)
mov    -0x15c(%rbp),%eax
cmp    -0x144(%rbp),%eax
jg     193e <main+0x78e>
mov    -0x78(%rbp),%rax
mov    -0x154(%rbp),%ecx
sub    -0x160(%rbp),%ecx
imul   -0x140(%rbp),%ecx
add    -0x158(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x144(%rbp),%ecx
add    -0x15c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x7ac(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x15c(%rbp),%eax
sub    $0x1,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
cmp    $0x5,%edx
je     191b <main+0x76b>
mov    -0x15c(%rbp),%eax
cmp    -0x144(%rbp),%eax
jne    1925 <main+0x775>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    192a <main+0x77a>
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    1897 <main+0x6e7>
jmp    1943 <main+0x793>
mov    -0x158(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
jmp    187b <main+0x6cb>
jmp    195c <main+0x7ac>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    185f <main+0x6af>
mov    -0x14c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    199d <main+0x7ed>
mov    0x2662(%rip),%rax
mov    (%rax),%edi
mov    -0x1a0(%rbp),%rsi
mov    0x263a(%rip),%rax
mov    (%rax),%edx
call   10b0 <fseek@plt>
jmp    19a2 <main+0x7f2>
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1549 <main+0x399>
mov    0x261b(%rip),%rax
mov    (%rax),%edi
mov    -0x138(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0x6cc(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x188,%rsp
mov    $0x1,%r14d
mov    $0x1,%r12d
cmp    $0x2,%edi
jl     11ee <main+0x2e>
mov    0x8(%rsi),%rdi
call   10e0 <atoi@plt>
mov    %eax,%r12d
mov    0x2df3(%rip),%rax
mov    (%rax),%edx
lea    0x130(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
lea    0xc8(%rsp),%r8
lea    0xd0(%rsp),%r9
lea    0xdd5(%rip),%r15
lea    0x28(%rsp),%rsi
lea    0x2c(%rsp),%rdx
lea    0xc0(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    %eax,%ebp
lea    0xa8(%rsp),%r8
lea    0xb0(%rsp),%r9
lea    0x12c(%rsp),%rsi
lea    0x24(%rsp),%rdx
lea    0xa0(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    %eax,%ebx
add    %ebp,%ebx
lea    0x88(%rsp),%r8
lea    0x90(%rsp),%r9
lea    0x128(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x80(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    %eax,%ebp
add    %ebx,%ebp
lea    0x68(%rsp),%r8
lea    0x70(%rsp),%r9
lea    0x124(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x60(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   10d0 <scanf@plt>
add    %ebp,%eax
cmp    $0x14,%eax
jne    1888 <main+0x6c8>
mov    %r12d,0x30(%rsp)
cvtsi2sdl 0x2c(%rsp),%xmm0
movsd  0xc0(%rsp),%xmm1
movsd  0xc8(%rsp),%xmm2
movsd  0xd0(%rsp),%xmm3
lea    0xd01(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x24(%rsp),%xmm0
movsd  0xa0(%rsp),%xmm1
movsd  0xa8(%rsp),%xmm2
movsd  0xb0(%rsp),%xmm3
mov    %rbx,%rdi
mov    $0x4,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x18(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
movsd  0x88(%rsp),%xmm2
movsd  0x90(%rsp),%xmm3
mov    %rbx,%rdi
mov    $0x4,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
movsd  0x68(%rsp),%xmm2
movsd  0x70(%rsp),%xmm3
mov    %rbx,%rdi
mov    $0x4,%al
call   1060 <printf@plt>
cmpl   $0x0,0x2c(%rsp)
jle    1450 <main+0x290>
lea    0xc(%rsp),%r13
lea    0x110(%rsp),%rbx
lea    0xe0(%rsp),%r15
lea    0xc77(%rip),%r14
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
sub    $0x8,%rsp
lea    0xc4a(%rip),%rdi
lea    0x18(%rsp),%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
lea    0xf0(%rsp),%r9
xor    %eax,%eax
lea    0xf8(%rsp),%rbp
push   %rbp
call   10d0 <scanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    1872 <main+0x6b2>
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
movsd  0x110(%rsp),%xmm1
movsd  0xe0(%rsp),%xmm2
movsd  0xe8(%rsp),%xmm3
movsd  0xf0(%rsp),%xmm4
mov    %r14,%rdi
mov    $0x5,%al
call   1060 <printf@plt>
add    $0x1,%r12d
cmp    0x2c(%rsp),%r12d
jl     13d0 <main+0x210>
mov    0x2b91(%rip),%rax
mov    (%rax),%edi
call   10a0 <ftell@plt>
mov    %rax,%r14
mov    0x24(%rsp),%eax
add    $0xffffffff,%eax
cltd
mov    0x30(%rsp),%r12d
idiv   %r12d
mov    %eax,%ebp
add    $0x1,%ebp
mov    0x18(%rsp),%edi
imul   %ebp,%edi
imul   0x14(%rsp),%edi
shl    $0x3,%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     187a <main+0x6ba>
mov    %rax,%rbx
mov    %r14,0x100(%rsp)
test   %r12d,%r12d
jle    1847 <main+0x687>
mov    $0x1,%r14d
lea    0xbe0(%rip),%r15
mov    %ebp,0x4c(%rsp)
cmp    $0x1,%r12d
je     14d8 <main+0x318>
mov    0x2b13(%rip),%rax
mov    (%rax),%edi
lea    0xb85(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    -0x1(%r14),%eax
imul   %ebp,%eax
mov    %rax,0x40(%rsp)
mov    %r14d,%ecx
imul   %ebp,%ecx
mov    0x24(%rsp),%eax
cmp    %eax,%ecx
cmovg  %eax,%ecx
mov    %ecx,0x20(%rsp)
mov    0x18(%rsp),%eax
imul   %ebp,%eax
imul   0x14(%rsp),%eax
test   %eax,%eax
jle    1517 <main+0x357>
mov    %eax,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    0x40(%rsp),%rax
add    $0x1,%eax
mov    %eax,0x1c(%rsp)
cmpl   $0x0,0x28(%rsp)
mov    %r14,0x108(%rsp)
jle    16c9 <main+0x509>
mov    $0x1,%r14d
sub    $0x8,%rsp
lea    0xb1c(%rip),%rdi
lea    0x58(%rsp),%rsi
lea    0x128(%rsp),%rdx
lea    0x64(%rsp),%rcx
lea    0x44(%rsp),%r8
lea    0x60(%rsp),%r9
xor    %eax,%eax
lea    0x3c(%rsp),%rbp
push   %rbp
lea    0x64(%rsp),%rbp
push   %rbp
lea    0x50(%rsp),%rbp
push   %rbp
call   10d0 <scanf@plt>
add    $0x20,%rsp
cmp    $0x8,%eax
jne    189d <main+0x6dd>
mov    0x2a48(%rip),%rax
mov    (%rax),%edi
mov    0x50(%rsp),%edx
lea    0xad7(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x5c(%rsp),%r13d
mov    0x3c(%rsp),%edx
cmp    %edx,%r13d
lea    0xa53(%rip),%rbp
jle    15d0 <main+0x410>
lea    0x1(%r14),%eax
cmp    0x28(%rsp),%r14d
mov    %eax,%r14d
jl     153c <main+0x37c>
jmp    16c9 <main+0x509>
mov    0x38(%rsp),%eax
mov    %r14,0xf8(%rsp)
jmp    15ea <main+0x42a>
lea    0x1(%r13),%ecx
cmp    %edx,%r13d
mov    %ecx,%r13d
jge    15b9 <main+0x3f9>
mov    0x58(%rsp),%ecx
mov    %ecx,0x10(%rsp)
cmp    %eax,%ecx
jg     15de <main+0x41e>
cmp    0x40(%rsp),%r13d
setle  %dl
cmp    0x20(%rsp),%r13d
setg   %r14b
or     %dl,%r14b
mov    %r13d,%r12d
sub    0x1c(%rsp),%r12d
mov    0x34(%rsp),%edx
mov    0x54(%rsp),%esi
mov    %esi,0xc(%rsp)
cmp    %edx,%esi
jle    1674 <main+0x4b4>
jmp    16a2 <main+0x4e2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x118(%rsp),%xmm0
mov    0x18(%rsp),%eax
imul   %r12d,%eax
mov    0x10(%rsp),%ecx
add    %eax,%ecx
add    $0xffffffff,%ecx
imul   0x14(%rsp),%ecx
mov    0xc(%rsp),%eax
add    %eax,%ecx
add    $0xffffffff,%ecx
movslq %ecx,%rcx
addsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
lea    0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
mov    0x34(%rsp),%edx
cmp    %edx,%eax
jge    169a <main+0x4da>
mov    %rbp,%rdi
lea    0x118(%rsp),%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
cmp    $0x1,%eax
jne    1882 <main+0x6c2>
test   %r14b,%r14b
je     1630 <main+0x470>
mov    0xc(%rsp),%eax
jmp    1665 <main+0x4a5>
mov    0x10(%rsp),%ecx
mov    0x38(%rsp),%eax
lea    0x1(%rcx),%esi
mov    %esi,0x10(%rsp)
cmp    %eax,%ecx
mov    %esi,%ecx
jl     1616 <main+0x456>
mov    0x3c(%rsp),%edx
mov    0x30(%rsp),%r12d
mov    0xf8(%rsp),%r14
jmp    15de <main+0x41e>
cmp    $0x1,%r12d
je     16e6 <main+0x526>
mov    0x2902(%rip),%rax
mov    (%rax),%edi
lea    0x9a3(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x40(%rsp),%rax
cmp    0x20(%rsp),%eax
jge    1808 <main+0x648>
mov    0x18(%rsp),%ecx
mov    %ecx,%esi
mov    0x1c(%rsp),%eax
mov    %eax,%r13d
jmp    1726 <main+0x566>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%edi
lea    0x1(%r13),%eax
mov    %edi,%esi
cmp    0x20(%rsp),%r13d
mov    %eax,%r13d
jge    1808 <main+0x648>
movl   $0x1,0x10(%rsp)
test   %esi,%esi
jle    1710 <main+0x550>
mov    %r13d,%r14d
sub    0x1c(%rsp),%r14d
mov    $0x1,%edx
mov    0x14(%rsp),%eax
jmp    1769 <main+0x5a9>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x10(%rsp),%edx
mov    0x18(%rsp),%ecx
lea    0x1(%rdx),%ebp
mov    %ebp,0x10(%rsp)
mov    %ecx,%esi
mov    %ecx,%edi
cmp    %ecx,%edx
mov    %ebp,%edx
jge    1712 <main+0x552>
movl   $0x1,0xc(%rsp)
test   %eax,%eax
jle    1758 <main+0x598>
mov    $0x1,%edi
nopw   0x0(%rax,%rax,1)
imul   %r14d,%esi
lea    (%rdx,%rsi,1),%ecx
add    $0xffffffff,%ecx
imul   %eax,%ecx
lea    (%rdi,%rcx,1),%eax
add    $0xffffffff,%eax
cltq
movsd  (%rbx,%rax,8),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0xc(%rsp),%ecx
lea    -0x1(%rcx),%eax
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
neg    %eax
add    %ecx,%eax
add    $0xffffffff,%eax
cmp    $0x5,%eax
je     17da <main+0x61a>
mov    0x14(%rsp),%eax
cmp    %eax,%ecx
jne    17ec <main+0x62c>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0xc(%rsp),%ecx
mov    0x14(%rsp),%eax
lea    0x1(%rcx),%edi
mov    %edi,0xc(%rsp)
cmp    %eax,%ecx
jge    1750 <main+0x590>
mov    0x18(%rsp),%esi
mov    0x10(%rsp),%edx
jmp    1780 <main+0x5c0>
mov    0x108(%rsp),%rbp
cmp    %r12d,%ebp
jge    1834 <main+0x674>
mov    0x27cc(%rip),%rax
mov    (%rax),%edi
mov    0x27ab(%rip),%rax
mov    (%rax),%edx
mov    0x100(%rsp),%rsi
call   10c0 <fseek@plt>
lea    0x1(%rbp),%eax
cmp    %r12d,%ebp
mov    %eax,%r14d
mov    0x4c(%rsp),%ebp
jne    14b8 <main+0x2f8>
mov    0x278a(%rip),%rax
mov    (%rax),%edi
mov    0x28(%rsp),%edx
lea    0x840(%rip),%rsi
xor    %r14d,%r14d
mov    %r12d,%ecx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    1888 <main+0x6c8>
mov    $0x2,%r14d
jmp    1888 <main+0x6c8>
mov    $0x3,%r14d
jmp    1888 <main+0x6c8>
mov    $0x5,%r14d
mov    %r14d,%eax
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x4,%r14d
jmp    1888 <main+0x6c8>

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

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