#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 */
double *CreateVec(int);
int /*<<< orphan*/ DestroyMat(double **, int);
int /*<<< orphan*/ DestroyVec(double *);
int /*<<< orphan*/ Lab3LoadInput(double ***, int *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(double);
int main(int argc, char *argv[]) {
  int i, j, k, size;
  double **Au;
  double *X;
  double temp, error, Xnorm;
  int *index;
  FILE *fp;
  Lab3LoadInput(&Au, &size);
  if ((fp = fopen("data_output", "r")) == NULL) {
    printf("Fail to open the result data file!\n");
    return 2;
  }
  fscanf(fp, "%d\n\n", &i);
  if (i != size) {
    printf(
        "The problem size of the input file and result file does not match!\n");
    return -1;
  }
  X = CreateVec(size);
  index = malloc(size * sizeof(int));
  for (i = 0; i < size; ++i)
    index[i] = i;
  if (size == 1)
    X[0] = Au[0][1] / Au[0][0];
  else {
    for (k = 0; k < size - 1; ++k) {
      temp = 0;
      for (i = k, j = 0; i < size; ++i)
        if (temp < Au[index[i]][k] * Au[index[i]][k]) {
          temp = Au[index[i]][k] * Au[index[i]][k];
          j = i;
        }
      if (j != k) {
        i = index[j];
        index[j] = index[k];
        index[k] = i;
      }
      for (i = k + 1; i < size; ++i) {
        temp = Au[index[i]][k] / Au[index[k]][k];
        for (j = k; j < size + 1; ++j)
          Au[index[i]][j] -= Au[index[k]][j] * temp;
      }
    }
    for (k = size - 1; k > 0; --k) {
      for (i = k - 1; i >= 0; --i) {
        temp = Au[index[i]][k] / Au[index[k]][k];
        Au[index[i]][k] -= temp * Au[index[k]][k];
        Au[index[i]][size] -= temp * Au[index[k]][size];
      }
    }
    for (k = 0; k < size; ++k)
      X[k] = Au[index[k]][size] / Au[index[k]][k];
  }
  error = 0;
  Xnorm = 0;
  for (i = 0; i < size; ++i) {
    fscanf(fp, "%lf\t", &temp);
    error += (temp - X[i]) * (temp - X[i]);
    Xnorm += X[i] * X[i];
  }
  error = sqrt(error);
  Xnorm = sqrt(Xnorm);
  printf("The relative error to the reference solution is %e\n", error / Xnorm);
  if (error / Xnorm <= 0.0005)
    printf("Congratulation!!! Your result is accepted!\n");
  else
    printf("Sorry, your result is wrong.\n");
  fclose(fp);
  DestroyVec(X);
  DestroyMat(Au, size);
  free(index);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   10b0 <Lab3LoadInput@plt>
lea    0xe2e(%rip),%rdi
lea    0xe33(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    120e <main+0x5e>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    17e3 <main+0x633>
mov    -0x58(%rbp),%rdi
lea    0xe21(%rip),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     124a <main+0x9a>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    17e3 <main+0x633>
mov    -0x20(%rbp),%edi
call   1040 <CreateVec@plt>
mov    %rax,-0x30(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1298 <main+0xe8>
mov    -0x14(%rbp),%edx
mov    -0x50(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1270 <main+0xc0>
cmpl   $0x1,-0x20(%rbp)
jne    12c6 <main+0x116>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
divsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1699 <main+0x4e9>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14e0 <main+0x330>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13a0 <main+0x1f0>
movsd  -0x38(%rbp),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    138d <main+0x1dd>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1392 <main+0x1e2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12f3 <main+0x143>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     13de <main+0x22e>
mov    -0x50(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x50(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14cd <main+0x31d>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    14ba <main+0x30a>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x38(%rbp),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1438 <main+0x288>
jmp    14bf <main+0x30f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13e7 <main+0x237>
jmp    14d2 <main+0x322>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12cd <main+0x11d>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    162c <main+0x47c>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1619 <main+0x469>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    14fc <main+0x34c>
jmp    161e <main+0x46e>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    14e9 <main+0x339>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1694 <main+0x4e4>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1633 <main+0x483>
jmp    1699 <main+0x4e9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1742 <main+0x592>
mov    -0x58(%rbp),%rdi
lea    0x9bc(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1090 <fscanf@plt>
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  -0x38(%rbp),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    16b0 <main+0x500>
movsd  -0x40(%rbp),%xmm0
call   10d0 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
call   10d0 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
lea    0x917(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x40(%rbp),%xmm1
divsd  -0x48(%rbp),%xmm1
movsd  0x876(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     17a7 <main+0x5f7>
lea    0x921(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    17b5 <main+0x605>
lea    0x93a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x58(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1070 <DestroyVec@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1080 <DestroyMat@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
lea    0x30(%rsp),%rdi
lea    0x14(%rsp),%rsi
call   10c0 <Lab3LoadInput@plt>
lea    0xeb1(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1253 <main+0x93>
mov    %rax,%rbx
lea    0xea4(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   10a0 <fscanf@plt>
mov    0x10(%rsp),%edi
cmp    0x14(%rsp),%edi
jne    1269 <main+0xa9>
mov    %rbx,0x38(%rsp)
call   1040 <CreateVec@plt>
mov    %rax,0x18(%rsp)
mov    0x14(%rsp),%ebx
lea    0x0(,%rbx,4),%edi
call   10b0 <malloc@plt>
test   %ebx,%ebx
mov    %rax,0x58(%rsp)
jle    17ea <main+0x62a>
cmp    $0x8,%ebx
jae    127f <main+0xbf>
xor    %edi,%edi
jmp    13d0 <main+0x210>
lea    0xf15(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%eax
jmp    19c0 <main+0x800>
lea    0xebc(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
jmp    19c0 <main+0x800>
mov    %ebx,%edi
and    $0xfffffff8,%edi
lea    -0x8(%rdi),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0x18,%rsi
jae    12ad <main+0xed>
movdqa 0xd5a(%rip),%xmm0
xor    %esi,%esi
jmp    1378 <main+0x1b8>
and    $0xfffffffffffffffc,%rdx
movdqa 0xd47(%rip),%xmm0
xor    %esi,%esi
movdqa 0xd4c(%rip),%xmm8
movdqa 0xd53(%rip),%xmm9
movdqa 0xd5a(%rip),%xmm10
movdqa 0xd62(%rip),%xmm4
movdqa 0xd6a(%rip),%xmm5
movdqa 0xd72(%rip),%xmm6
movdqa 0xd7a(%rip),%xmm7
movdqa 0xd82(%rip),%xmm1
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,(%rax,%rsi,4)
movdqu %xmm2,0x10(%rax,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%rax,%rsi,4)
movdqu %xmm3,0x30(%rax,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%rax,%rsi,4)
movdqu %xmm3,0x50(%rax,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%rax,%rsi,4)
movdqu %xmm3,0x70(%rax,%rsi,4)
add    $0x20,%rsi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rdx
jne    1300 <main+0x140>
test   %rcx,%rcx
je     13c0 <main+0x200>
lea    (%rax,%rsi,4),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movdqa 0xc7d(%rip),%xmm1
movdqa 0xc85(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rdx,%rsi,1)
movdqu %xmm3,(%rdx,%rsi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    13a0 <main+0x1e0>
cmp    %rbx,%rdi
je     13dc <main+0x21c>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,(%rax,%rdi,4)
add    $0x1,%rdi
cmp    %rdi,%rbx
jne    13d0 <main+0x210>
cmp    $0x1,%ebx
jne    1400 <main+0x240>
mov    0x30(%rsp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm0
divsd  (%rax),%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax)
jmp    186e <main+0x6ae>
cmp    $0x2,%ebx
jl     17d8 <main+0x618>
lea    -0x1(%rbx),%r11d
mov    0x30(%rsp),%rbp
lea    0x1(%rbx),%rdx
mov    %rbx,%rcx
not    %rcx
mov    %rcx,0xa0(%rsp)
mov    $0x1,%ecx
mov    %rcx,0x48(%rsp)
mov    $0x3,%ecx
mov    %rcx,0x40(%rsp)
xor    %r15d,%r15d
mov    %rbx,0x50(%rsp)
mov    %r11,0x70(%rsp)
jmp    1475 <main+0x2b5>
nopw   0x0(%rax,%rax,1)
addq   $0x1,0x48(%rsp)
addq   $0xffffffffffffffff,0x50(%rsp)
addq   $0x1,0x40(%rsp)
mov    0x70(%rsp),%r11
mov    0x78(%rsp),%r15
cmp    %r11,%r15
je     172e <main+0x56e>
movq   $0x0,0x8(%rsp)
mov    $0x0,%esi
cmp    %rbx,%r15
jae    14d0 <main+0x310>
xor    %esi,%esi
pxor   %xmm0,%xmm0
mov    %r15,%rdi
jmp    14a9 <main+0x2e9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rdi
cmp    %rdi,%rbx
je     14d0 <main+0x310>
movslq (%rax,%rdi,4),%rcx
mov    0x0(%rbp,%rcx,8),%rcx
movsd  (%rcx,%r15,8),%xmm1
mulsd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    14a0 <main+0x2e0>
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
mov    %edi,%esi
jmp    14a0 <main+0x2e0>
mov    %esi,%ecx
cmp    %rcx,%r15
je     14e8 <main+0x328>
movslq %esi,%rdi
mov    (%rax,%rdi,4),%ecx
mov    (%rax,%r15,4),%esi
mov    %esi,(%rax,%rdi,4)
mov    %ecx,(%rax,%r15,4)
lea    0x1(%r15),%rcx
mov    %rcx,0x78(%rsp)
cmp    %rbx,%rcx
jae    1450 <main+0x290>
mov    0x50(%rsp),%r11
and    $0xfffffffffffffffc,%r11
mov    %r15,%rdi
not    %rdi
add    %rdx,%rdi
movslq (%rax,%r15,4),%rcx
mov    0x0(%rbp,%rcx,8),%r8
mov    0x48(%rsp),%rsi
lea    (%r8,%rsi,8),%rcx
mov    %rcx,0x98(%rsp)
lea    (%r8,%rdx,8),%rcx
mov    %rcx,0x90(%rsp)
lea    0x1(%r15),%rcx
mov    %rcx,0x20(%rsp)
mov    %rdi,0x60(%rsp)
and    $0xfffffffffffffffc,%rdi
mov    %rdi,0x88(%rsp)
lea    (%r15,%rdi,1),%rcx
add    $0x1,%rcx
mov    %rcx,0x80(%rsp)
mov    0x40(%rsp),%rcx
lea    (%r8,%rcx,8),%r14
jmp    1583 <main+0x3c3>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rsi
mov    %rdi,%rbx
cmp    %rdi,%rsi
mov    %r12,%rbp
je     1450 <main+0x290>
mov    %rbx,%rdi
movslq (%rax,%rsi,4),%rcx
mov    %rbp,%r12
mov    0x0(%rbp,%rcx,8),%r10
movsd  (%r10,%r15,8),%xmm0
divsd  (%r8,%r15,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  (%r8,%r15,8),%xmm0
movsd  (%r10,%r15,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r10,%r15,8)
cmp    %rdx,0x20(%rsp)
je     1570 <main+0x3b0>
mov    0x20(%rsp),%r9
cmpq   $0x4,0x60(%rsp)
jae    1660 <main+0x4a0>
mov    %edx,%ecx
sub    %r9d,%ecx
mov    %r9,%r13
test   $0x1,%cl
je     15ff <main+0x43f>
movsd  (%r8,%r9,8),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  (%r10,%r9,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r10,%r9,8)
lea    0x1(%r9),%r13
not    %r9
cmp    0xa0(%rsp),%r9
je     1570 <main+0x3b0>
movsd  (%r8,%r13,8),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  (%r10,%r13,8),%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%r10,%r13,8),%xmm0
movsd  %xmm1,(%r10,%r13,8)
movsd  0x8(%r8,%r13,8),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r10,%r13,8)
add    $0x2,%r13
cmp    %r13,%rdx
jne    1610 <main+0x450>
jmp    1570 <main+0x3b0>
nopl   0x0(%rax)
mov    0x48(%rsp),%rax
lea    (%r10,%rax,8),%rcx
lea    (%r10,%rdx,8),%rbp
lea    0x10(%rsp),%rax
cmp    %rax,%rcx
setb   %al
lea    0x8(%rsp),%rbx
cmp    %rbp,%rbx
setb   %bl
cmp    0x90(%rsp),%rcx
setb   %cl
cmp    %rbp,0x98(%rsp)
setb   %bpl
mov    0x20(%rsp),%r9
test   %bl,%al
mov    0x58(%rsp),%rax
jne    15d2 <main+0x412>
mov    0x20(%rsp),%r9
and    %bpl,%cl
jne    15d2 <main+0x412>
movsd  0x8(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
mov    0x40(%rsp),%rcx
lea    (%r10,%rcx,8),%rbp
xor    %ecx,%ecx
nop
movupd -0x10(%r14,%rcx,8),%xmm1
movupd (%r14,%rcx,8),%xmm2
movupd -0x10(%rbp,%rcx,8),%xmm3
movupd 0x0(%rbp,%rcx,8),%xmm4
mulpd  %xmm0,%xmm1
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm2
subpd  %xmm2,%xmm4
movupd %xmm3,-0x10(%rbp,%rcx,8)
movupd %xmm4,0x0(%rbp,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r11
jne    16d0 <main+0x510>
mov    0x80(%rsp),%r9
mov    0x88(%rsp),%rcx
cmp    %rcx,0x60(%rsp)
je     1570 <main+0x3b0>
jmp    15d2 <main+0x412>
cmp    $0x2,%ebx
jl     17d8 <main+0x618>
mov    0x30(%rsp),%r10
lea    -0x2(%rbx),%ecx
lea    (%rax,%rcx,4),%r9
mov    %rbx,%r8
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%r8),%rsi
movslq -0x4(%rax,%r8,4),%rcx
mov    (%r10,%rcx,8),%rdi
mov    %r9,%rcx
mov    %r11d,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq (%rcx),%rbp
mov    (%r10,%rbp,8),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm0
divsd  (%rdi,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  (%rdi,%rsi,8),%xmm0
movsd  0x0(%rbp,%rsi,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rsi,8)
movsd  0x8(%rsp),%xmm0
movsd  0x0(%rbp,%rbx,8),%xmm1
mulsd  (%rdi,%rbx,8),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rbx,8)
add    $0xffffffff,%edx
add    $0xfffffffffffffffc,%rcx
test   %edx,%edx
jg     1770 <main+0x5b0>
add    $0xffffffff,%r11d
add    $0xfffffffffffffffc,%r9
cmp    $0x2,%r8
mov    %rsi,%r8
jg     1750 <main+0x590>
test   %ebx,%ebx
jle    17ea <main+0x62a>
mov    0x30(%rsp),%rbp
cmp    $0x1,%ebx
jne    17f7 <main+0x637>
xor    %ecx,%ecx
jmp    184c <main+0x68c>
movl   $0x0,0x10(%rsp)
jmp    18f3 <main+0x733>
mov    %ebx,%edx
and    $0xfffffffe,%edx
xor    %ecx,%ecx
mov    0x18(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq (%rax,%rcx,4),%rsi
mov    0x0(%rbp,%rsi,8),%rsi
movsd  (%rsi,%rbx,8),%xmm0
divsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%rdi,%rcx,8)
movslq 0x4(%rax,%rcx,4),%rsi
mov    0x0(%rbp,%rsi,8),%rsi
movsd  (%rsi,%rbx,8),%xmm0
divsd  0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rdi,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    1810 <main+0x650>
test   $0x1,%bl
je     186e <main+0x6ae>
movslq (%rax,%rcx,4),%rdx
mov    0x0(%rbp,%rdx,8),%rax
movsd  (%rax,%rbx,8),%xmm0
divsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,0x10(%rsp)
test   %ebx,%ebx
jle    18f3 <main+0x733>
pxor   %xmm0,%xmm0
lea    0x826(%rip),%r14
lea    0x8(%rsp),%r13
mov    0x38(%rsp),%rbp
mov    0x18(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,0x20(%rsp)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   10a0 <fscanf@plt>
movapd 0x20(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
movslq 0x10(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm0
subsd  %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  %xmm1,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x1,%eax
mov    %eax,0x10(%rsp)
cmp    0x14(%rsp),%eax
jl     18a0 <main+0x6e0>
addpd  %xmm2,%xmm1
jmp    1901 <main+0x741>
pxor   %xmm1,%xmm1
mov    0x38(%rsp),%rbp
mov    0x18(%rsp),%rbx
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jb     1914 <main+0x754>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    192d <main+0x76d>
movapd %xmm1,%xmm0
movapd %xmm1,0x60(%rsp)
call   10e0 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd 0x60(%rsp),%xmm1
movsd  %xmm0,0x20(%rsp)
unpckhpd %xmm1,%xmm1
ucomisd %xmm2,%xmm1
jb     1946 <main+0x786>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    194f <main+0x78f>
movapd %xmm1,%xmm0
call   10e0 <sqrt@plt>
movsd  0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
lea    0x74a(%rip),%rdi
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0x717(%rip),%xmm0
ucomisd 0x20(%rsp),%xmm0
lea    0x75e(%rip),%rax
lea    0x774(%rip),%rdi
cmovb  %rax,%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1080 <DestroyVec@plt>
mov    0x30(%rsp),%rdi
mov    0x14(%rsp),%esi
call   1090 <DestroyMat@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"data_output\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [5 x i8] c"%d\0A\0A\00"
@.str.5 = [5 x i8] c"%lf\09\00"
@.str.6 = [52 x i8] c"The relative error to the reference solution is %e\0A\00"
@str = [29 x i8] c"Sorry, your result is wrong.\00"
@str.9 = [43 x i8] c"Congratulation!!! Your result is accepted!\00"
@str.10 = [67 x i8] c"The problem size of the input file and result file does not match!\00"
@str.11 = [35 x i8] c"Fail to open the result data file!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double**
%6 = alloca double
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast double*** %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = call i32 @Lab3LoadInput(double*** %5, i32* %4)
%12 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.11, i64 0, i64 0))
br label %411
16: ; preds = %2
%17 = call i32 (i32*, i8*, ...) @fscanf(i32* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = icmp eq i32 %18, %19
br i1 %20, label %23, label %21
21: ; preds = %16
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.10, i64 0, i64 0))
br label %411
23: ; preds = %16
%24 = call double* @CreateVec(i32 %18)
%25 = load i32, i32* %4
%26 = shl i32 %25, 2
%27 = call i32* @malloc(i32 %26)
%28 = icmp sgt i32 %25, 0
br i1 %28, label %29, label %360
29: ; preds = %23
%30 = zext i32 %25 to i64
%31 = icmp ult i32 %25, 8
br i1 %31, label %94, label %32
32: ; preds = %29
%33 = and i64 %30, 4294967288
%34 = add nsw i64 %33, -8
%35 = lshr exact i64 %34, 3
%36 = add nuw nsw i64 %35, 1
%37 = and i64 %36, 3
%38 = icmp ult i64 %34, 24
br i1 %38, label %75, label %39
39: ; preds = %32
%40 = and i64 %36, 4611686018427387900
br label %41
41: ; preds = %41, %39
%42 = phi i64 [ 0, %39 ], [ %71, %41 ]
%43 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %39 ], [ %72, %41 ]
%44 = phi i64 [ 0, %39 ], [ %73, %41 ]
%45 = add <4 x i32> %43, <i32 4, i32 4, i32 4, i32 4>
%46 = getelementptr inbounds i32, i32* %27, i64 %42
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> %43, <4 x i32>* %47
%48 = getelementptr inbounds i32, i32* %46, i64 4
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> %45, <4 x i32>* %49
%50 = or i64 %42, 8
%51 = add <4 x i32> %43, <i32 8, i32 8, i32 8, i32 8>
%52 = add <4 x i32> %43, <i32 12, i32 12, i32 12, i32 12>
%53 = getelementptr inbounds i32, i32* %27, i64 %50
%54 = bitcast i32* %53 to <4 x i32>*
store <4 x i32> %51, <4 x i32>* %54
%55 = getelementptr inbounds i32, i32* %53, i64 4
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> %52, <4 x i32>* %56
%57 = or i64 %42, 16
%58 = add <4 x i32> %43, <i32 16, i32 16, i32 16, i32 16>
%59 = add <4 x i32> %43, <i32 20, i32 20, i32 20, i32 20>
%60 = getelementptr inbounds i32, i32* %27, i64 %57
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> %58, <4 x i32>* %61
%62 = getelementptr inbounds i32, i32* %60, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> %59, <4 x i32>* %63
%64 = or i64 %42, 24
%65 = add <4 x i32> %43, <i32 24, i32 24, i32 24, i32 24>
%66 = add <4 x i32> %43, <i32 28, i32 28, i32 28, i32 28>
%67 = getelementptr inbounds i32, i32* %27, i64 %64
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> %65, <4 x i32>* %68
%69 = getelementptr inbounds i32, i32* %67, i64 4
%70 = bitcast i32* %69 to <4 x i32>*
store <4 x i32> %66, <4 x i32>* %70
%71 = add nuw i64 %42, 32
%72 = add <4 x i32> %43, <i32 32, i32 32, i32 32, i32 32>
%73 = add i64 %44, 4
%74 = icmp eq i64 %73, %40
br i1 %74, label %75, label %41
75: ; preds = %41, %32
%76 = phi i64 [ 0, %32 ], [ %71, %41 ]
%77 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %32 ], [ %72, %41 ]
%78 = icmp eq i64 %37, 0
br i1 %78, label %92, label %79
79: ; preds = %75, %79
%80 = phi i64 [ %88, %79 ], [ %76, %75 ]
%81 = phi <4 x i32> [ %89, %79 ], [ %77, %75 ]
%82 = phi i64 [ %90, %79 ], [ 0, %75 ]
%83 = add <4 x i32> %81, <i32 4, i32 4, i32 4, i32 4>
%84 = getelementptr inbounds i32, i32* %27, i64 %80
%85 = bitcast i32* %84 to <4 x i32>*
store <4 x i32> %81, <4 x i32>* %85
%86 = getelementptr inbounds i32, i32* %84, i64 4
%87 = bitcast i32* %86 to <4 x i32>*
store <4 x i32> %83, <4 x i32>* %87
%88 = add nuw i64 %80, 8
%89 = add <4 x i32> %81, <i32 8, i32 8, i32 8, i32 8>
%90 = add i64 %82, 1
%91 = icmp eq i64 %90, %37
br i1 %91, label %92, label %79
92: ; preds = %79, %75
%93 = icmp eq i64 %33, %30
br i1 %93, label %102, label %94
94: ; preds = %29, %92
%95 = phi i64 [ 0, %29 ], [ %33, %92 ]
br label %96
96: ; preds = %94, %96
%97 = phi i64 [ %100, %96 ], [ %95, %94 ]
%98 = getelementptr inbounds i32, i32* %27, i64 %97
%99 = trunc i64 %97 to i32
store i32 %99, i32* %98
%100 = add nuw nsw i64 %97, 1
%101 = icmp eq i64 %100, %30
br i1 %101, label %102, label %96
102: ; preds = %96, %92
%103 = icmp eq i32 %25, 1
br i1 %103, label %117, label %104
104: ; preds = %102
%105 = icmp sgt i32 %25, 1
br i1 %105, label %106, label %296
106: ; preds = %104
%107 = add nsw i32 %25, -1
%108 = load double**, double*** %5
%109 = add nuw i32 %25, 1
%110 = zext i32 %25 to i64
%111 = zext i32 %107 to i64
%112 = zext i32 %25 to i64
%113 = zext i32 %25 to i64
%114 = zext i32 %109 to i64
%115 = getelementptr inbounds double, double* %6, i64 1
%116 = sub nsw i64 0, %114
br label %133
117: ; preds = %102
%118 = load double**, double*** %5
%119 = load double*, double** %118
%120 = getelementptr inbounds double, double* %119, i64 1
%121 = load double, double* %120
%122 = load double, double* %119
%123 = fdiv double %121, %122
store double %123, double* %24
br label %376
124: ; preds = %282, %169
%125 = add nuw nsw i64 %134, 1
%126 = icmp eq i64 %170, %111
br i1 %126, label %127, label %133
127: ; preds = %124
br i1 %105, label %128, label %296
128: ; preds = %127
%129 = load double**, double*** %5
%130 = zext i32 %25 to i64
%131 = add nsw i32 %25, -2
%132 = zext i32 %131 to i64
br label %285
133: ; preds = %106, %124
%134 = phi i64 [ 1, %106 ], [ %125, %124 ]
%135 = phi i64 [ 0, %106 ], [ %170, %124 ]
%136 = xor i64 %135, -1
%137 = add nsw i64 %136, %114
store double 0.000000e+00, double* %6
%138 = icmp ult i64 %135, %110
br i1 %138, label %139, label %159
139: ; preds = %133, %154
%140 = phi double [ %155, %154 ], [ 0.000000e+00, %133 ]
%141 = phi i64 [ %157, %154 ], [ %135, %133 ]
%142 = phi i32 [ %156, %154 ], [ 0, %133 ]
%143 = getelementptr inbounds i32, i32* %27, i64 %141
%144 = load i32, i32* %143
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double*, double** %108, i64 %145
%147 = load double*, double** %146
%148 = getelementptr inbounds double, double* %147, i64 %135
%149 = load double, double* %148
%150 = fmul double %149, %149
%151 = fcmp olt double %140, %150
br i1 %151, label %152, label %154
152: ; preds = %139
store double %150, double* %6
%153 = trunc i64 %141 to i32
br label %154
154: ; preds = %139, %152
%155 = phi double [ %150, %152 ], [ %140, %139 ]
%156 = phi i32 [ %153, %152 ], [ %142, %139 ]
%157 = add nuw nsw i64 %141, 1
%158 = icmp eq i64 %157, %112
br i1 %158, label %159, label %139
159: ; preds = %154, %133
%160 = phi i32 [ 0, %133 ], [ %156, %154 ]
%161 = zext i32 %160 to i64
%162 = icmp eq i64 %135, %161
br i1 %162, label %169, label %163
163: ; preds = %159
%164 = sext i32 %160 to i64
%165 = getelementptr inbounds i32, i32* %27, i64 %164
%166 = load i32, i32* %165
%167 = getelementptr inbounds i32, i32* %27, i64 %135
%168 = load i32, i32* %167
store i32 %168, i32* %165
store i32 %166, i32* %167
br label %169
169: ; preds = %163, %159
%170 = add nuw nsw i64 %135, 1
%171 = icmp ult i64 %170, %110
br i1 %171, label %172, label %124
172: ; preds = %169
%173 = getelementptr inbounds i32, i32* %27, i64 %135
%174 = load i32, i32* %173
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double*, double** %108, i64 %175
%177 = load double*, double** %176
%178 = getelementptr inbounds double, double* %177, i64 %135
%179 = getelementptr double, double* %177, i64 %134
%180 = getelementptr double, double* %177, i64 %114
%181 = getelementptr inbounds double, double* %177, i64 %135
%182 = add nuw nsw i64 %135, 1
%183 = icmp eq i64 %182, %114
%184 = icmp ult i64 %137, 4
%185 = and i64 %137, -4
%186 = add i64 %182, %185
%187 = icmp eq i64 %137, %185
br label %188
188: ; preds = %282, %172
%189 = phi i64 [ %134, %172 ], [ %283, %282 ]
%190 = getelementptr inbounds i32, i32* %27, i64 %189
%191 = load i32, i32* %190
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds double*, double** %108, i64 %192
%194 = load double*, double** %193
%195 = getelementptr inbounds double, double* %194, i64 %135
%196 = load double, double* %195
%197 = load double, double* %178
%198 = fdiv double %196, %197
store double %198, double* %6
%199 = load double, double* %181
%200 = getelementptr inbounds double, double* %194, i64 %135
%201 = load double, double* %200
%202 = fneg double %199
%203 = call double @llvm.fmuladd.f64(double %202, double %198, double %201)
store double %203, double* %200
br i1 %183, label %282, label %204
204: ; preds = %188
br i1 %184, label %245, label %205
205: ; preds = %204
%206 = getelementptr double, double* %194, i64 %134
%207 = getelementptr double, double* %194, i64 %114
%208 = icmp ult double* %206, %115
%209 = icmp ult double* %6, %207
%210 = and i1 %208, %209
%211 = icmp ult double* %206, %180
%212 = icmp ult double* %179, %207
%213 = and i1 %211, %212
%214 = or i1 %210, %213
br i1 %214, label %245, label %215
215: ; preds = %205
%216 = load double, double* %6
%217 = insertelement <2 x double> poison, double %216, i64 0
%218 = shufflevector <2 x double> %217, <2 x double> poison, <2 x i32> zeroinitializer
%219 = insertelement <2 x double> poison, double %216, i64 0
%220 = shufflevector <2 x double> %219, <2 x double> poison, <2 x i32> zeroinitializer
br label %221
221: ; preds = %221, %215
%222 = phi i64 [ 0, %215 ], [ %242, %221 ]
%223 = add i64 %182, %222
%224 = getelementptr inbounds double, double* %177, i64 %223
%225 = bitcast double* %224 to <2 x double>*
%226 = load <2 x double>, <2 x double>* %225
%227 = getelementptr inbounds double, double* %224, i64 2
%228 = bitcast double* %227 to <2 x double>*
%229 = load <2 x double>, <2 x double>* %228
%230 = getelementptr inbounds double, double* %194, i64 %223
%231 = bitcast double* %230 to <2 x double>*
%232 = load <2 x double>, <2 x double>* %231
%233 = getelementptr inbounds double, double* %230, i64 2
%234 = bitcast double* %233 to <2 x double>*
%235 = load <2 x double>, <2 x double>* %234
%236 = fneg <2 x double> %226
%237 = fneg <2 x double> %229
%238 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %236, <2 x double> %218, <2 x double> %232)
%239 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %237, <2 x double> %220, <2 x double> %235)
%240 = bitcast double* %230 to <2 x double>*
store <2 x double> %238, <2 x double>* %240
%241 = bitcast double* %233 to <2 x double>*
store <2 x double> %239, <2 x double>* %241
%242 = add nuw i64 %222, 4
%243 = icmp eq i64 %242, %185
br i1 %243, label %244, label %221
244: ; preds = %221
br i1 %187, label %282, label %245
245: ; preds = %205, %204, %244
%246 = phi i64 [ %182, %205 ], [ %182, %204 ], [ %186, %244 ]
%247 = sub i64 %114, %246
%248 = xor i64 %246, -1
%249 = and i64 %247, 1
%250 = icmp eq i64 %249, 0
br i1 %250, label %260, label %251
251: ; preds = %245
%252 = load double, double* %6
%253 = getelementptr inbounds double, double* %177, i64 %246
%254 = load double, double* %253
%255 = getelementptr inbounds double, double* %194, i64 %246
%256 = load double, double* %255
%257 = fneg double %254
%258 = call double @llvm.fmuladd.f64(double %257, double %252, double %256)
store double %258, double* %255
%259 = add nuw nsw i64 %246, 1
br label %260
260: ; preds = %251, %245
%261 = phi i64 [ %246, %245 ], [ %259, %251 ]
%262 = icmp eq i64 %248, %116
br i1 %262, label %282, label %263
263: ; preds = %260, %263
%264 = phi i64 [ %280, %263 ], [ %261, %260 ]
%265 = load double, double* %6
%266 = getelementptr inbounds double, double* %177, i64 %264
%267 = load double, double* %266
%268 = getelementptr inbounds double, double* %194, i64 %264
%269 = load double, double* %268
%270 = fneg double %267
%271 = call double @llvm.fmuladd.f64(double %270, double %265, double %269)
store double %271, double* %268
%272 = add nuw nsw i64 %264, 1
%273 = load double, double* %6
%274 = getelementptr inbounds double, double* %177, i64 %272
%275 = load double, double* %274
%276 = getelementptr inbounds double, double* %194, i64 %272
%277 = load double, double* %276
%278 = fneg double %275
%279 = call double @llvm.fmuladd.f64(double %278, double %273, double %277)
store double %279, double* %276
%280 = add nuw nsw i64 %264, 2
%281 = icmp eq i64 %280, %114
br i1 %281, label %282, label %263
282: ; preds = %260, %263, %244, %188
%283 = add nuw nsw i64 %189, 1
%284 = icmp eq i64 %283, %113
br i1 %284, label %124, label %188
285: ; preds = %328, %128
%286 = phi i64 [ %130, %128 ], [ %288, %328 ]
%287 = phi i64 [ %132, %128 ], [ %330, %328 ]
%288 = add nsw i64 %286, -1
%289 = getelementptr inbounds i32, i32* %27, i64 %288
%290 = load i32, i32* %289
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds double*, double** %129, i64 %291
%293 = load double*, double** %292
%294 = getelementptr inbounds double, double* %293, i64 %288
%295 = getelementptr inbounds double, double* %293, i64 %130
br label %304
296: ; preds = %328, %104, %127
br i1 %28, label %297, label %360
297: ; preds = %296
%298 = load double**, double*** %5
%299 = zext i32 %25 to i64
%300 = and i64 %30, 1
%301 = icmp eq i32 %25, 1
br i1 %301, label %361, label %302
302: ; preds = %297
%303 = and i64 %30, 4294967294
br label %331
304: ; preds = %285, %304
%305 = phi i64 [ %287, %285 ], [ %325, %304 ]
%306 = getelementptr inbounds i32, i32* %27, i64 %305
%307 = load i32, i32* %306
%308 = sext i32 %307 to i64
%309 = getelementptr inbounds double*, double** %129, i64 %308
%310 = load double*, double** %309
%311 = getelementptr inbounds double, double* %310, i64 %288
%312 = load double, double* %311
%313 = load double, double* %294
%314 = fdiv double %312, %313
store double %314, double* %6
%315 = load double, double* %294
%316 = load double, double* %311
%317 = fneg double %314
%318 = call double @llvm.fmuladd.f64(double %317, double %315, double %316)
store double %318, double* %311
%319 = load double, double* %6
%320 = load double, double* %295
%321 = getelementptr inbounds double, double* %310, i64 %130
%322 = load double, double* %321
%323 = fneg double %319
%324 = call double @llvm.fmuladd.f64(double %323, double %320, double %322)
store double %324, double* %321
%325 = add nsw i64 %305, -1
%326 = trunc i64 %305 to i32
%327 = icmp sgt i32 %326, 0
br i1 %327, label %304, label %328
328: ; preds = %304
%329 = icmp sgt i64 %286, 2
%330 = add nsw i64 %287, -1
br i1 %329, label %285, label %296
331: ; preds = %331, %302
%332 = phi i64 [ 0, %302 ], [ %357, %331 ]
%333 = phi i64 [ 0, %302 ], [ %358, %331 ]
%334 = getelementptr inbounds i32, i32* %27, i64 %332
%335 = load i32, i32* %334
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds double*, double** %298, i64 %336
%338 = load double*, double** %337
%339 = getelementptr inbounds double, double* %338, i64 %299
%340 = load double, double* %339
%341 = getelementptr inbounds double, double* %338, i64 %332
%342 = load double, double* %341
%343 = fdiv double %340, %342
%344 = getelementptr inbounds double, double* %24, i64 %332
store double %343, double* %344
%345 = or i64 %332, 1
%346 = getelementptr inbounds i32, i32* %27, i64 %345
%347 = load i32, i32* %346
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds double*, double** %298, i64 %348
%350 = load double*, double** %349
%351 = getelementptr inbounds double, double* %350, i64 %299
%352 = load double, double* %351
%353 = getelementptr inbounds double, double* %350, i64 %345
%354 = load double, double* %353
%355 = fdiv double %352, %354
%356 = getelementptr inbounds double, double* %24, i64 %345
store double %355, double* %356
%357 = add nuw nsw i64 %332, 2
%358 = add i64 %333, 2
%359 = icmp eq i64 %358, %303
br i1 %359, label %361, label %331
360: ; preds = %23, %296
store i32 0, i32* %3
br label %394
361: ; preds = %331, %297
%362 = phi i64 [ 0, %297 ], [ %357, %331 ]
%363 = icmp eq i64 %300, 0
br i1 %363, label %376, label %364
364: ; preds = %361
%365 = getelementptr inbounds i32, i32* %27, i64 %362
%366 = load i32, i32* %365
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds double*, double** %298, i64 %367
%369 = load double*, double** %368
%370 = getelementptr inbounds double, double* %369, i64 %299
%371 = load double, double* %370
%372 = getelementptr inbounds double, double* %369, i64 %362
%373 = load double, double* %372
%374 = fdiv double %371, %373
%375 = getelementptr inbounds double, double* %24, i64 %362
store double %374, double* %375
br label %376
376: ; preds = %364, %361, %117
store i32 0, i32* %3
br i1 %28, label %377, label %394
377: ; preds = %376, %377
%378 = phi <2 x double> [ %388, %377 ], [ zeroinitializer, %376 ]
%379 = call i32 (i32*, i8*, ...) @fscanf(i32* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), double* %6)
%380 = load double, double* %6
%381 = load i32, i32* %3
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds double, double* %24, i64 %382
%384 = load double, double* %383
%385 = fsub double %380, %384
%386 = insertelement <2 x double> poison, double %385, i64 0
%387 = insertelement <2 x double> %386, double %384, i64 1
%388 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %387, <2 x double> %387, <2 x double> %378)
%389 = add nsw i32 %381, 1
store i32 %389, i32* %3
%390 = load i32, i32* %4
%391 = icmp slt i32 %389, %390
br i1 %391, label %377, label %392
392: ; preds = %377
%393 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %387, <2 x double> %387, <2 x double> %378)
br label %394
394: ; preds = %392, %360, %376
%395 = phi <2 x double> [ zeroinitializer, %376 ], [ zeroinitializer, %360 ], [ %393, %392 ]
%396 = extractelement <2 x double> %395, i64 0
%397 = call double @sqrt(double %396)
%398 = extractelement <2 x double> %395, i64 1
%399 = call double @sqrt(double %398)
%400 = fdiv double %397, %399
%401 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0), double %400)
%402 = fcmp ugt double %400, 5.000000e-04
%403 = select i1 %402, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @str.9, i64 0, i64 0)
%404 = call i32 @puts(i8* dereferenceable(1) %403)
%405 = call i32 @fclose(i32* %12)
%406 = call i32 @DestroyVec(double* %24)
%407 = load double**, double*** %5
%408 = load i32, i32* %4
%409 = call i32 @DestroyMat(double** %407, i32 %408)
%410 = call i32 @free(i32* %27)
br label %411
411: ; preds = %394, %21, %14
%412 = phi i32 [ 2, %14 ], [ -1, %21 ], [ 0, %394 ]
ret i32 %412
}