#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int write_result(char *infilename, char *outfilename, int nintci, int nintcf,
                 double *var, int iter, double ratio) {
  double *ipoint = (double *)malloc((nintcf + 1) * sizeof(double));
  int i1, i2, i3, i4, i5;
  int nc;
  for (nc = nintci; nc <= nintcf; nc++)
    ipoint[nc] = nc;
  if (nintcf <= 1) {
    printf("error: nintcf <= 1\n");
    return -1;
  }
  i1 = nintcf + 1;
  while (i1 != 0) {
    i1 = i1 / 2;
    i2 = nintcf + 1 - i1;
    i4 = 1;
    do {
      i3 = i4;
      do {
        i5 = i3 + i1;
        if (var[i3] <= var[i5])
          break;
        double zdum = var[i3], idum = ipoint[i3];
        var[i3] = var[i5];
        ipoint[i3] = ipoint[i5];
        var[i5] = zdum;
        ipoint[i5] = idum;
        i3 = i3 - i1;
      } while (i3 >= 1);
      i4++;
    } while (i4 < i2);
  }
  FILE *fp = fopen(outfilename, "w");
  if (fp == NULL) {
    printf("error opening file %s for writing\n", outfilename);
    return -1;
  }
  printf("Writing data to %s: ", outfilename);
  fprintf(fp, "               ----------------------------------------\n");
  fprintf(fp, "               - AVL -  Linear Equation Solver - GCCG -\n");
  fprintf(fp, "               ----------------------------------------\n");
  fprintf(fp, "                     diagonal scaling\n");
  fprintf(fp, "\n\n");
  fprintf(fp, "     Input File:  %s\n", infilename);
  fprintf(fp, "     ===========\n\n");
  fprintf(fp, "     Output File:  %s\n", outfilename);
  fprintf(fp, "     ============\n\n");
  fprintf(fp, "     No. of Active Cells:  %d\n", nintcf);
  fprintf(fp, "     ====================\n\n");
  fprintf(fp, "     Iteration Count - Residual Ratio\n");
  fprintf(fp, "     ================================\n\n");
  fprintf(fp, "%d %e\n", iter, ratio);
  fprintf(fp, "     Addresses Solution (Minima)           Addresses Solution "
              "(Maxima)\n");
  fprintf(fp, "     ===========================           "
              "===========================\n\n");
  int n;
  for (n = 1; n <= 10; n++)
    fprintf(fp, "%lf %lf %lf %lf\n", ipoint[n], var[n], ipoint[nintcf - n + 1],
            var[nintcf - n + 1]);
  fclose(fp);
  printf("done!\n");
  free(ipoint);
  return 0;
}


x86 assembly (clang, -O0):
<write_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11cf <write_result+0x6f>
cvtsi2sdl -0x58(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11a3 <write_result+0x43>
cmpl   $0x1,-0x20(%rbp)
jg     11f3 <write_result+0x93>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1526 <write_result+0x3c6>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1308 <write_result+0x1a8>
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
sub    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     125f <write_result+0xff>
jmp    12ee <write_result+0x18e>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
sub    -0x44(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jge    122d <write_result+0xcd>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x48(%rbp),%eax
jl     1227 <write_result+0xc7>
jmp    11fc <write_result+0x9c>
mov    -0x18(%rbp),%rdi
lea    0xd01(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1345 <write_result+0x1e5>
mov    -0x18(%rbp),%rsi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1526 <write_result+0x3c6>
mov    -0x18(%rbp),%rsi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x70(%rbp),%rdi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd13(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xcc8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd28(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd63(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xd27(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd2b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xd28(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd2d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd39(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd43(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
mov    -0x2c(%rbp),%edx
movsd  -0x38(%rbp),%xmm0
lea    0xd66(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x70(%rbp),%rdi
lea    0xd91(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x74(%rbp)
cmpl   $0xa,-0x74(%rbp)
jg     14ff <write_result+0x39f>
mov    -0x70(%rbp),%rdi
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    -0x74(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    -0x74(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
lea    0xd73(%rip),%rsi
mov    $0x4,%al
call   1060 <fprintf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1491 <write_result+0x331>
mov    -0x70(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_result>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movq   %xmm0,0x18(%rsp)
mov    %r9d,%ebp
mov    %r8,%rbx
mov    %ecx,%r15d
mov    %edx,%r13d
mov    %rsi,0x20(%rsp)
mov    %rdi,0x10(%rsp)
lea    0x1(%r15),%r12d
lea    0x8(,%r15,8),%edi
call   1080 <malloc@plt>
mov    %rax,%r14
mov    %r15d,%ecx
sub    %r13d,%ecx
jl     12d5 <write_result+0x155>
movslq %r13d,%rax
cmp    $0x3,%ecx
jb     12b7 <write_result+0x137>
add    $0x1,%rcx
mov    %rcx,%r8
and    $0xfffffffffffffffc,%r8
movd   %r13d,%xmm0
pshufd $0x50,%xmm0,%xmm0
paddd  0xe0d(%rip),%xmm0
lea    -0x4(%r8),%rdx
mov    %rdx,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rdx,%rdx
je     171b <write_result+0x59b>
mov    %r9,%rsi
and    $0xfffffffffffffffe,%rsi
lea    (%r14,%rax,8),%rdx
add    $0x30,%rdx
xor    %edi,%edi
movdqa 0xdec(%rip),%xmm1
movdqa 0xdf4(%rip),%xmm2
movdqa 0xdfc(%rip),%xmm3
movdqa 0xe04(%rip),%xmm4
nopl   0x0(%rax)
movdqa %xmm0,%xmm5
cvtdq2pd %xmm0,%xmm6
paddd  %xmm1,%xmm5
cvtdq2pd %xmm5,%xmm5
movups %xmm6,-0x30(%rdx,%rdi,8)
movups %xmm5,-0x20(%rdx,%rdi,8)
movdqa %xmm0,%xmm5
paddd  %xmm2,%xmm5
movdqa %xmm0,%xmm6
cvtdq2pd %xmm5,%xmm5
paddd  %xmm3,%xmm6
cvtdq2pd %xmm6,%xmm6
movups %xmm5,-0x10(%rdx,%rdi,8)
movups %xmm6,(%rdx,%rdi,8)
add    $0x8,%rdi
paddd  %xmm4,%xmm0
add    $0xfffffffffffffffe,%rsi
jne    1240 <write_result+0xc0>
test   $0x1,%r9b
je     12af <write_result+0x12f>
add    %rax,%rdi
cvtdq2pd %xmm0,%xmm1
paddd  0xd72(%rip),%xmm0
cvtdq2pd %xmm0,%xmm0
movdqu %xmm1,(%r14,%rdi,8)
movdqu %xmm0,0x10(%r14,%rdi,8)
cmp    %r8,%rcx
je     12d5 <write_result+0x155>
add    %r8,%rax
mov    %r12d,%ecx
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
cmp    %eax,%ecx
jne    12c0 <write_result+0x140>
cmp    $0x2,%r15d
jge    12ec <write_result+0x16c>
lea    0xfce(%rip),%rdi
call   1040 <puts@plt>
jmp    1707 <write_result+0x587>
mov    %ebp,0xc(%rsp)
mov    $0x2,%r8d
mov    %r12d,%ecx
jmp    1308 <write_result+0x188>
nopl   0x0(%rax,%rax,1)
add    $0x1,%edx
cmp    $0x3,%edx
jb     1382 <write_result+0x202>
mov    %ecx,%edx
shr    $0x1f,%ecx
add    %edx,%ecx
sar    %ecx
mov    %r12d,%esi
sub    %ecx,%esi
cmp    $0x3,%esi
cmovl  %r8d,%esi
mov    $0x1,%edi
jmp    1337 <write_result+0x1b7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%edi
cmp    %esi,%edi
je     1300 <write_result+0x180>
mov    %edi,%ebp
nopl   0x0(%rax)
lea    (%rcx,%rbp,1),%eax
movslq %ebp,%rbp
movsd  (%rbx,%rbp,8),%xmm0
cltq
movsd  (%rbx,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jae    1330 <write_result+0x1b0>
movq   (%r14,%rbp,8),%xmm2
movsd  %xmm1,(%rbx,%rbp,8)
movsd  (%r14,%rax,8),%xmm1
movsd  %xmm1,(%r14,%rbp,8)
movsd  %xmm0,(%rbx,%rax,8)
movq   %xmm2,(%r14,%rax,8)
sub    %ecx,%ebp
test   %ebp,%ebp
jg     1340 <write_result+0x1c0>
jmp    1330 <write_result+0x1b0>
lea    0xcc7(%rip),%rsi
mov    0x20(%rsp),%r12
mov    %r12,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     16f6 <write_result+0x576>
mov    %rax,%rbp
lea    0xccc(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcd0(%rip),%r13
mov    $0x38,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xced(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
mov    $0x38,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xcf8(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xd2c(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xced(%rip),%rsi
mov    %rbp,%rdi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xced(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xce7(%rip),%rsi
mov    %rbp,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xcea(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xce5(%rip),%rsi
mov    %rbp,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xcf0(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xcf3(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xd01(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xd10(%rip),%rsi
mov    %rbp,%rdi
mov    0xc(%rsp),%edx
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1070 <fprintf@plt>
lea    0xcfc(%rip),%rdi
mov    $0x47,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xd2b(%rip),%rdi
mov    $0x48,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
movsd  0x8(%r14),%xmm0
movsd  0x8(%rbx),%xmm1
movslq %r15d,%rax
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
lea    0xd42(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x10(%r14),%xmm0
movsd  0x10(%rbx),%xmm1
lea    -0x1(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x18(%r14),%xmm0
movsd  0x18(%rbx),%xmm1
lea    -0x2(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x20(%r14),%xmm0
movsd  0x20(%rbx),%xmm1
lea    -0x3(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x28(%r14),%xmm0
movsd  0x28(%rbx),%xmm1
lea    -0x4(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x30(%r14),%xmm0
movsd  0x30(%rbx),%xmm1
lea    -0x5(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x38(%r14),%xmm0
movsd  0x38(%rbx),%xmm1
lea    -0x6(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x40(%r14),%xmm0
movsd  0x40(%rbx),%xmm1
lea    -0x7(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x48(%r14),%xmm0
movsd  0x48(%rbx),%xmm1
lea    -0x8(%r15),%eax
cltq
movsd  (%r14,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
movsd  0x50(%r14),%xmm0
movsd  0x50(%rbx),%xmm1
add    $0xfffffff7,%r15d
movslq %r15d,%rax
movq   (%r14,%rax,8),%xmm2
movq   (%rbx,%rax,8),%xmm3
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x4,%al
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0xbc5(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    170c <write_result+0x58c>
lea    0x955(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r9b
jne    128f <write_result+0x10f>
jmp    12af <write_result+0x12f>

LLVM IR (-O0):
@.str = [20 x i8] c"error: nintcf <= 1\0A\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [35 x i8] c"error opening file %s for writing\0A\00"
@.str.3 = [21 x i8] c"Writing data to %s: \00"
@.str.4 = [57 x i8] c" ----------------------------------------\0A\00"
@.str.5 = [57 x i8] c" - AVL - Linear Equation Solver - GCCG -\0A\00"
@.str.6 = [39 x i8] c" diagonal scaling\0A\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [22 x i8] c" Input File: %s\0A\00"
@.str.9 = [19 x i8] c" ===========\0A\0A\00"
@.str.10 = [23 x i8] c" Output File: %s\0A\00"
@.str.11 = [20 x i8] c" ============\0A\0A\00"
@.str.12 = [31 x i8] c" No. of Active Cells: %d\0A\00"
@.str.13 = [28 x i8] c" ====================\0A\0A\00"
@.str.14 = [39 x i8] c" Iteration Count - Residual Ratio\0A\00"
@.str.15 = [40 x i8] c" ================================\0A\0A\00"
@.str.16 = [7 x i8] c"%d %e\0A\00"
@.str.17 = [72 x i8] c" Addresses Solution (Minima) Addresses Solution (Maxima)\0A\00"
@.str.18 = [73 x i8] c" =========================== ===========================\0A\0A\00"
@.str.19 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
@.str.20 = [7 x i8] c"done!\0A\00"
define i32 @write_result(i8* %0, i8* %1, i32 %2, i32 %3, double* %4, i32 %5, double %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca double
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
%24 = alloca double
%25 = alloca i32*
%26 = alloca i32
store i8* %0, i8** %9
store i8* %1, i8** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store double* %4, double** %13
store i32 %5, i32* %14
store double %6, double* %15
%27 = load i32, i32* %12
%28 = add nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = mul i64 %29, 8
%31 = trunc i64 %30 to i32
%32 = call i64 @malloc(i32 %31)
%33 = inttoptr i64 %32 to double*
store double* %33, double** %16
%34 = load i32, i32* %11
store i32 %34, i32* %22
br label %35
35: ; preds = %46, %7
%36 = load i32, i32* %22
%37 = load i32, i32* %12
%38 = icmp sle i32 %36, %37
br i1 %38, label %39, label %49
39: ; preds = %35
%40 = load i32, i32* %22
%41 = sitofp i32 %40 to double
%42 = load double*, double** %16
%43 = load i32, i32* %22
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
store double %41, double* %45
br label %46
46: ; preds = %39
%47 = load i32, i32* %22
%48 = add nsw i32 %47, 1
store i32 %48, i32* %22
br label %35
49: ; preds = %35
%50 = load i32, i32* %12
%51 = icmp sle i32 %50, 1
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %8
br label %227
54: ; preds = %49
%55 = load i32, i32* %12
%56 = add nsw i32 %55, 1
store i32 %56, i32* %17
br label %57
57: ; preds = %137, %54
%58 = load i32, i32* %17
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %138
60: ; preds = %57
%61 = load i32, i32* %17
%62 = sdiv i32 %61, 2
store i32 %62, i32* %17
%63 = load i32, i32* %12
%64 = add nsw i32 %63, 1
%65 = load i32, i32* %17
%66 = sub nsw i32 %64, %65
store i32 %66, i32* %18
store i32 1, i32* %20
br label %67
67: ; preds = %133, %60
%68 = load i32, i32* %20
store i32 %68, i32* %19
br label %69
69: ; preds = %127, %67
%70 = load i32, i32* %19
%71 = load i32, i32* %17
%72 = add nsw i32 %70, %71
store i32 %72, i32* %21
%73 = load double*, double** %13
%74 = load i32, i32* %19
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %13
%79 = load i32, i32* %21
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = fcmp ole double %77, %82
br i1 %83, label %84, label %85
84: ; preds = %69
br label %130
85: ; preds = %69
%86 = load double*, double** %13
%87 = load i32, i32* %19
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
store double %90, double* %23
%91 = load double*, double** %16
%92 = load i32, i32* %19
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
store double %95, double* %24
%96 = load double*, double** %13
%97 = load i32, i32* %21
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = load double*, double** %13
%102 = load i32, i32* %19
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
store double %100, double* %104
%105 = load double*, double** %16
%106 = load i32, i32* %21
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = load double*, double** %16
%111 = load i32, i32* %19
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %110, i64 %112
store double %109, double* %113
%114 = load double, double* %23
%115 = load double*, double** %13
%116 = load i32, i32* %21
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %115, i64 %117
store double %114, double* %118
%119 = load double, double* %24
%120 = load double*, double** %16
%121 = load i32, i32* %21
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
store double %119, double* %123
%124 = load i32, i32* %19
%125 = load i32, i32* %17
%126 = sub nsw i32 %124, %125
store i32 %126, i32* %19
br label %127
127: ; preds = %85
%128 = load i32, i32* %19
%129 = icmp sge i32 %128, 1
br i1 %129, label %69, label %130
130: ; preds = %127, %84
%131 = load i32, i32* %20
%132 = add nsw i32 %131, 1
store i32 %132, i32* %20
br label %133
133: ; preds = %130
%134 = load i32, i32* %20
%135 = load i32, i32* %18
%136 = icmp slt i32 %134, %135
br i1 %136, label %67, label %137
137: ; preds = %133
br label %57
138: ; preds = %57
%139 = load i8*, i8** %10
%140 = call i32* @fopen(i8* %139, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %140, i32** %25
%141 = load i32*, i32** %25
%142 = icmp eq i32* %141, null
br i1 %142, label %143, label %146
143: ; preds = %138
%144 = load i8*, i8** %10
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %144)
store i32 -1, i32* %8
br label %227
146: ; preds = %138
%147 = load i8*, i8** %10
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %147)
%149 = load i32*, i32** %25
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%151 = load i32*, i32** %25
%152 = call i32 (i32*, i8*, ...) @fprintf(i32* %151, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%153 = load i32*, i32** %25
%154 = call i32 (i32*, i8*, ...) @fprintf(i32* %153, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%155 = load i32*, i32** %25
%156 = call i32 (i32*, i8*, ...) @fprintf(i32* %155, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
%157 = load i32*, i32** %25
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %157, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%159 = load i32*, i32** %25
%160 = load i8*, i8** %9
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %159, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i8* %160)
%162 = load i32*, i32** %25
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%164 = load i32*, i32** %25
%165 = load i8*, i8** %10
%166 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %165)
%167 = load i32*, i32** %25
%168 = call i32 (i32*, i8*, ...) @fprintf(i32* %167, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%169 = load i32*, i32** %25
%170 = load i32, i32* %12
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %169, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0), i32 %170)
%172 = load i32*, i32** %25
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%174 = load i32*, i32** %25
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %174, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0))
%176 = load i32*, i32** %25
%177 = call i32 (i32*, i8*, ...) @fprintf(i32* %176, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%178 = load i32*, i32** %25
%179 = load i32, i32* %14
%180 = load double, double* %15
%181 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 %179, double %180)
%182 = load i32*, i32** %25
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.17, i64 0, i64 0))
%184 = load i32*, i32** %25
%185 = call i32 (i32*, i8*, ...) @fprintf(i32* %184, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.18, i64 0, i64 0))
store i32 1, i32* %26
br label %186
186: ; preds = %218, %146
%187 = load i32, i32* %26
%188 = icmp sle i32 %187, 10
br i1 %188, label %189, label %221
189: ; preds = %186
%190 = load i32*, i32** %25
%191 = load double*, double** %16
%192 = load i32, i32* %26
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds double, double* %191, i64 %193
%195 = load double, double* %194
%196 = load double*, double** %13
%197 = load i32, i32* %26
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %196, i64 %198
%200 = load double, double* %199
%201 = load double*, double** %16
%202 = load i32, i32* %12
%203 = load i32, i32* %26
%204 = sub nsw i32 %202, %203
%205 = add nsw i32 %204, 1
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %201, i64 %206
%208 = load double, double* %207
%209 = load double*, double** %13
%210 = load i32, i32* %12
%211 = load i32, i32* %26
%212 = sub nsw i32 %210, %211
%213 = add nsw i32 %212, 1
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %209, i64 %214
%216 = load double, double* %215
%217 = call i32 (i32*, i8*, ...) @fprintf(i32* %190, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %195, double %200, double %208, double %216)
br label %218
218: ; preds = %189
%219 = load i32, i32* %26
%220 = add nsw i32 %219, 1
store i32 %220, i32* %26
br label %186
221: ; preds = %186
%222 = load i32*, i32** %25
%223 = call i32 @fclose(i32* %222)
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
%225 = load double*, double** %16
%226 = call i32 @free(double* %225)
store i32 0, i32* %8
br label %227
227: ; preds = %221, %143, %52
%228 = load i32, i32* %8
ret i32 %228
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [35 x i8] c"error opening file %s for writing\0A\00"
@.str.3 = [21 x i8] c"Writing data to %s: \00"
@.str.4 = [57 x i8] c" ----------------------------------------\0A\00"
@.str.5 = [57 x i8] c" - AVL - Linear Equation Solver - GCCG -\0A\00"
@.str.6 = [39 x i8] c" diagonal scaling\0A\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [22 x i8] c" Input File: %s\0A\00"
@.str.9 = [19 x i8] c" ===========\0A\0A\00"
@.str.10 = [23 x i8] c" Output File: %s\0A\00"
@.str.11 = [20 x i8] c" ============\0A\0A\00"
@.str.12 = [31 x i8] c" No. of Active Cells: %d\0A\00"
@.str.13 = [28 x i8] c" ====================\0A\0A\00"
@.str.14 = [39 x i8] c" Iteration Count - Residual Ratio\0A\00"
@.str.15 = [40 x i8] c" ================================\0A\0A\00"
@.str.16 = [7 x i8] c"%d %e\0A\00"
@.str.17 = [72 x i8] c" Addresses Solution (Minima) Addresses Solution (Maxima)\0A\00"
@.str.18 = [73 x i8] c" =========================== ===========================\0A\0A\00"
@.str.19 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
@str = [6 x i8] c"done!\00"
@str.21 = [19 x i8] c"error: nintcf <= 1\00"
define i32 @write_result(i8* %0, i8* %1, i32 %2, i32 %3, double* nocapture %4, i32 %5, double %6) {
%8 = add i32 %3, 1
%9 = shl i32 %8, 3
%10 = tail call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to double*
%12 = icmp slt i32 %3, %2
br i1 %12, label %83, label %13
13: ; preds = %7
%14 = sext i32 %2 to i64
%15 = sub i32 %3, %2
%16 = zext i32 %15 to i64
%17 = add nuw nsw i64 %16, 1
%18 = icmp ult i32 %15, 3
br i1 %18, label %73, label %19
19: ; preds = %13
%20 = and i64 %17, 8589934588
%21 = add nsw i64 %20, %14
%22 = insertelement <2 x i32> poison, i32 %2, i64 0
%23 = shufflevector <2 x i32> %22, <2 x i32> poison, <2 x i32> zeroinitializer
%24 = add <2 x i32> %23, <i32 0, i32 1>
%25 = add nsw i64 %20, -4
%26 = lshr exact i64 %25, 2
%27 = add nuw nsw i64 %26, 1
%28 = and i64 %27, 1
%29 = icmp eq i64 %25, 0
br i1 %29, label %58, label %30
30: ; preds = %19
%31 = and i64 %27, 9223372036854775806
br label %32
32: ; preds = %32, %30
%33 = phi i64 [ 0, %30 ], [ %54, %32 ]
%34 = phi <2 x i32> [ %24, %30 ], [ %55, %32 ]
%35 = phi i64 [ 0, %30 ], [ %56, %32 ]
%36 = add i64 %33, %14
%37 = add <2 x i32> %34, <i32 2, i32 2>
%38 = sitofp <2 x i32> %34 to <2 x double>
%39 = sitofp <2 x i32> %37 to <2 x double>
%40 = getelementptr inbounds double, double* %11, i64 %36
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %38, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> %39, <2 x double>* %43
%44 = or i64 %33, 4
%45 = add <2 x i32> %34, <i32 4, i32 4>
%46 = add i64 %44, %14
%47 = add <2 x i32> %34, <i32 6, i32 6>
%48 = sitofp <2 x i32> %45 to <2 x double>
%49 = sitofp <2 x i32> %47 to <2 x double>
%50 = getelementptr inbounds double, double* %11, i64 %46
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> %48, <2 x double>* %51
%52 = getelementptr inbounds double, double* %50, i64 2
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %49, <2 x double>* %53
%54 = add nuw i64 %33, 8
%55 = add <2 x i32> %34, <i32 8, i32 8>
%56 = add i64 %35, 2
%57 = icmp eq i64 %56, %31
br i1 %57, label %58, label %32
58: ; preds = %32, %19
%59 = phi i64 [ 0, %19 ], [ %54, %32 ]
%60 = phi <2 x i32> [ %24, %19 ], [ %55, %32 ]
%61 = icmp eq i64 %28, 0
br i1 %61, label %71, label %62
62: ; preds = %58
%63 = add i64 %59, %14
%64 = add <2 x i32> %60, <i32 2, i32 2>
%65 = sitofp <2 x i32> %60 to <2 x double>
%66 = sitofp <2 x i32> %64 to <2 x double>
%67 = getelementptr inbounds double, double* %11, i64 %63
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %65, <2 x double>* %68
%69 = getelementptr inbounds double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %66, <2 x double>* %70
br label %71
71: ; preds = %58, %62
%72 = icmp eq i64 %17, %20
br i1 %72, label %83, label %73
73: ; preds = %13, %71
%74 = phi i64 [ %14, %13 ], [ %21, %71 ]
br label %75
75: ; preds = %73, %75
%76 = phi i64 [ %80, %75 ], [ %74, %73 ]
%77 = trunc i64 %76 to i32
%78 = sitofp i32 %77 to double
%79 = getelementptr inbounds double, double* %11, i64 %76
store double %78, double* %79
%80 = add nsw i64 %76, 1
%81 = trunc i64 %80 to i32
%82 = icmp eq i32 %8, %81
br i1 %82, label %83, label %75
83: ; preds = %75, %71, %7
%84 = icmp slt i32 %3, 2
br i1 %84, label %85, label %90
85: ; preds = %83
%86 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.21, i64 0, i64 0))
br label %252
87: ; preds = %114
%88 = add i32 %91, 1
%89 = icmp ult i32 %88, 3
br i1 %89, label %117, label %90
90: ; preds = %83, %87
%91 = phi i32 [ %92, %87 ], [ %8, %83 ]
%92 = sdiv i32 %91, 2
%93 = sub i32 %8, %92
%94 = call i32 @llvm.smax.i32(i32 %93, i32 2)
br label %95
95: ; preds = %114, %90
%96 = phi i32 [ 1, %90 ], [ %115, %114 ]
br label %97
97: ; preds = %107, %95
%98 = phi i32 [ %96, %95 ], [ %112, %107 ]
%99 = add nsw i32 %98, %92
%100 = sext i32 %98 to i64
%101 = getelementptr inbounds double, double* %4, i64 %100
%102 = load double, double* %101
%103 = sext i32 %99 to i64
%104 = getelementptr inbounds double, double* %4, i64 %103
%105 = load double, double* %104
%106 = fcmp ugt double %102, %105
br i1 %106, label %107, label %114
107: ; preds = %97
%108 = getelementptr inbounds double, double* %11, i64 %100
%109 = load double, double* %108
store double %105, double* %101
%110 = getelementptr inbounds double, double* %11, i64 %103
%111 = load double, double* %110
store double %111, double* %108
store double %102, double* %104
store double %109, double* %110
%112 = sub nsw i32 %98, %92
%113 = icmp sgt i32 %112, 0
br i1 %113, label %97, label %114
114: ; preds = %97, %107
%115 = add nuw nsw i32 %96, 1
%116 = icmp eq i32 %115, %94
br i1 %116, label %87, label %95
117: ; preds = %87
%118 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%119 = icmp eq i32* %118, null
br i1 %119, label %120, label %122
120: ; preds = %117
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %252
122: ; preds = %117
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%124 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i64 56, i64 1, i32* %118)
%125 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0), i64 56, i64 1, i32* %118)
%126 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i64 56, i64 1, i32* %118)
%127 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i64 38, i64 1, i32* %118)
%128 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 1, i32* %118)
%129 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i8* %0)
%130 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i64 18, i64 1, i32* %118)
%131 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%132 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i64 19, i64 1, i32* %118)
%133 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0), i32 %3)
%134 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i64 27, i64 1, i32* %118)
%135 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0), i64 38, i64 1, i32* %118)
%136 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), i64 39, i64 1, i32* %118)
%137 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 %5, double %6)
%138 = tail call i64 @fwrite(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.17, i64 0, i64 0), i64 71, i64 1, i32* %118)
%139 = tail call i64 @fwrite(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.18, i64 0, i64 0), i64 72, i64 1, i32* %118)
%140 = getelementptr inbounds double, double* %11, i64 1
%141 = load double, double* %140
%142 = getelementptr inbounds double, double* %4, i64 1
%143 = load double, double* %142
%144 = sext i32 %3 to i64
%145 = getelementptr inbounds double, double* %11, i64 %144
%146 = load double, double* %145
%147 = getelementptr inbounds double, double* %4, i64 %144
%148 = load double, double* %147
%149 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %141, double %143, double %146, double %148)
%150 = getelementptr inbounds double, double* %11, i64 2
%151 = load double, double* %150
%152 = getelementptr inbounds double, double* %4, i64 2
%153 = load double, double* %152
%154 = add i32 %3, -1
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %11, i64 %155
%157 = load double, double* %156
%158 = getelementptr inbounds double, double* %4, i64 %155
%159 = load double, double* %158
%160 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %151, double %153, double %157, double %159)
%161 = getelementptr inbounds double, double* %11, i64 3
%162 = load double, double* %161
%163 = getelementptr inbounds double, double* %4, i64 3
%164 = load double, double* %163
%165 = add i32 %3, -2
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %11, i64 %166
%168 = load double, double* %167
%169 = getelementptr inbounds double, double* %4, i64 %166
%170 = load double, double* %169
%171 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %162, double %164, double %168, double %170)
%172 = getelementptr inbounds double, double* %11, i64 4
%173 = load double, double* %172
%174 = getelementptr inbounds double, double* %4, i64 4
%175 = load double, double* %174
%176 = add i32 %3, -3
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double, double* %11, i64 %177
%179 = load double, double* %178
%180 = getelementptr inbounds double, double* %4, i64 %177
%181 = load double, double* %180
%182 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %173, double %175, double %179, double %181)
%183 = getelementptr inbounds double, double* %11, i64 5
%184 = load double, double* %183
%185 = getelementptr inbounds double, double* %4, i64 5
%186 = load double, double* %185
%187 = add i32 %3, -4
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %11, i64 %188
%190 = load double, double* %189
%191 = getelementptr inbounds double, double* %4, i64 %188
%192 = load double, double* %191
%193 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %184, double %186, double %190, double %192)
%194 = getelementptr inbounds double, double* %11, i64 6
%195 = load double, double* %194
%196 = getelementptr inbounds double, double* %4, i64 6
%197 = load double, double* %196
%198 = add i32 %3, -5
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds double, double* %11, i64 %199
%201 = load double, double* %200
%202 = getelementptr inbounds double, double* %4, i64 %199
%203 = load double, double* %202
%204 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %195, double %197, double %201, double %203)
%205 = getelementptr inbounds double, double* %11, i64 7
%206 = load double, double* %205
%207 = getelementptr inbounds double, double* %4, i64 7
%208 = load double, double* %207
%209 = add i32 %3, -6
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double, double* %11, i64 %210
%212 = load double, double* %211
%213 = getelementptr inbounds double, double* %4, i64 %210
%214 = load double, double* %213
%215 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %206, double %208, double %212, double %214)
%216 = getelementptr inbounds double, double* %11, i64 8
%217 = load double, double* %216
%218 = getelementptr inbounds double, double* %4, i64 8
%219 = load double, double* %218
%220 = add i32 %3, -7
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double, double* %11, i64 %221
%223 = load double, double* %222
%224 = getelementptr inbounds double, double* %4, i64 %221
%225 = load double, double* %224
%226 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %217, double %219, double %223, double %225)
%227 = getelementptr inbounds double, double* %11, i64 9
%228 = load double, double* %227
%229 = getelementptr inbounds double, double* %4, i64 9
%230 = load double, double* %229
%231 = add i32 %3, -8
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %11, i64 %232
%234 = load double, double* %233
%235 = getelementptr inbounds double, double* %4, i64 %232
%236 = load double, double* %235
%237 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %228, double %230, double %234, double %236)
%238 = getelementptr inbounds double, double* %11, i64 10
%239 = load double, double* %238
%240 = getelementptr inbounds double, double* %4, i64 10
%241 = load double, double* %240
%242 = add i32 %3, -9
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds double, double* %11, i64 %243
%245 = load double, double* %244
%246 = getelementptr inbounds double, double* %4, i64 %243
%247 = load double, double* %246
%248 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), double %239, double %241, double %245, double %247)
%249 = tail call i32 @fclose(i32* %118)
%250 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%251 = tail call i32 @free(double* %11)
br label %252
252: ; preds = %120, %122, %85
%253 = phi i32 [ -1, %85 ], [ -1, %120 ], [ 0, %122 ]
ret i32 %253
}