#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 */
struct timeval {
  double tv_sec;
  double tv_usec;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int abs(int);
double *calloc(int, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feastinit(int *);
int /*<<< orphan*/ *fopen(char *, char *);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ zfeast_hbev(char *, int *, int *, double *, int *, int *,
                               double *, int *, double *, double *, int *,
                               double *, double *, int *, double *, int *);
int main() {
  int feastparam[64];
  double epsout;
  int loop, LDA;
  char UPLO = 'F';
  FILE *fp;
  char name[] = "../../system2";
  int N, nnz, kl, ku;
  double *A;
  struct timeval t1, t2;
  int i, j, k, n2, err;
  int M0, M, info;
  double Emin, Emax, trace, dum;
  double *X;
  double *E, *res;
  kl = 0;
  fp = fopen(name, "r");
  err = fscanf(fp, "%d%d\n", &N, &nnz);
  for (k = 0; k <= nnz - 1; k++) {
    err = fscanf(fp, "%d%d%lf%lf\n", &i, &j, &dum, &dum);
    if (abs(i - j) > kl) {
      kl = abs(i - j);
    }
  }
  fclose(fp);
  ku = kl;
  LDA = (kl + ku + 1);
  n2 = 2 * N * LDA;
  A = calloc(n2, sizeof(double));
  for (i = 0; i <= n2 - 1; i++) {
    *(A + i) = (double)0.0;
  };
  fp = fopen(name, "r");
  err = fscanf(fp, "%d%d\n", &N, &nnz);
  for (k = 0; k <= nnz - 1; k++) {
    err = fscanf(fp, "%d%d", &i, &j);
    err = fscanf(fp, "%lf%lf\n",
                 A + (j - 1) * 2 * LDA + 2 * (ku + 1 + (i - j)) - 2,
                 A + (j - 1) * 2 * LDA + 2 * (ku + 1 + i - j) - 1);
  };
  fclose(fp);
  printf("dense matrix -system2- size %.d\n", N);
  printf("bandwidth %d \n", kl + ku + 1);
  gettimeofday(&t1, NULL);
  Emin = (double)-0.35;
  Emax = (double)0.23;
  M0 = 40;
  E = calloc(M0, sizeof(double));
  res = calloc(M0, sizeof(double));
  X = calloc(2 * N * M0, sizeof(double));
  feastinit(feastparam);
  feastparam[0] = 1;
  zfeast_hbev(&UPLO, &N, &kl, A, &LDA, feastparam, &epsout, &loop, &Emin, &Emax,
              &M0, E, X, &M, res, &info);
  gettimeofday(&t2, NULL);
  printf("FEAST OUTPUT INFO %d\n", info);
  if (info == 0) {
    printf("*************************************************\n");
    printf("************** REPORT ***************************\n");
    printf("*************************************************\n");
    printf("SIMULATION TIME %f\n", (t2.tv_sec - t1.tv_sec) * 1.0 +
                                       (t2.tv_usec - t1.tv_usec) * 0.000001);
    printf("# Search interval [Emin,Emax] %.15e %.15e\n", Emin, Emax);
    printf("# mode found/subspace %d %d \n", M, M0);
    printf("# iterations %d \n", loop);
    trace = (double)0.0;
    for (i = 0; i <= M - 1; i = i + 1) {
      trace = trace + *(E + i);
    }
    printf("TRACE %.15e\n", trace);
    printf("Relative error on the Trace %.15e\n", epsout);
    printf("Eigenvalues/Residuals\n");
    for (i = 0; i <= M - 1; i = i + 1) {
      printf("   %d %.15e %.15e\n", i, *(E + i), *(res + i));
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x238,%rsp
movl   $0x0,-0x2c(%rbp)
movb   $0x46,-0x141(%rbp)
mov    0xe5f(%rip),%rax
mov    %rax,-0x15e(%rbp)
mov    0xe5a(%rip),%eax
mov    %eax,-0x156(%rbp)
mov    0xe51(%rip),%ax
mov    %ax,-0x152(%rbp)
movl   $0x0,-0x16c(%rbp)
lea    -0x15e(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rdi
lea    0xe1c(%rip),%rsi
lea    -0x164(%rbp),%rdx
lea    -0x168(%rbp),%rcx
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    %eax,-0x1ac(%rbp)
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x168(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     12c8 <main+0x138>
mov    -0x150(%rbp),%rdi
lea    0xdd8(%rip),%rsi
lea    -0x19c(%rbp),%rdx
lea    -0x1a0(%rbp),%rcx
lea    -0x1d8(%rbp),%r9
mov    %r9,%r8
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    %eax,-0x1ac(%rbp)
mov    -0x19c(%rbp),%edi
sub    -0x1a0(%rbp),%edi
call   1030 <abs@plt>
cmp    -0x16c(%rbp),%eax
jle    12af <main+0x11f>
mov    -0x19c(%rbp),%edi
sub    -0x1a0(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x16c(%rbp)
jmp    12b4 <main+0x124>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1231 <main+0xa1>
mov    -0x150(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x16c(%rbp),%eax
mov    %eax,-0x170(%rbp)
mov    -0x16c(%rbp),%eax
add    -0x170(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x140(%rbp)
mov    -0x164(%rbp),%eax
shl    $0x1,%eax
imul   -0x140(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x178(%rbp)
movl   $0x0,-0x19c(%rbp)
mov    -0x19c(%rbp),%eax
mov    -0x1a8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     136d <main+0x1dd>
mov    -0x178(%rbp),%rax
movslq -0x19c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    132c <main+0x19c>
lea    -0x15e(%rbp),%rdi
lea    0xcab(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rdi
lea    0xc93(%rip),%rsi
lea    -0x164(%rbp),%rdx
lea    -0x168(%rbp),%rcx
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    %eax,-0x1ac(%rbp)
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x168(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     14bb <main+0x32b>
mov    -0x150(%rbp),%rdi
lea    0xc5b(%rip),%rsi
lea    -0x19c(%rbp),%rdx
lea    -0x1a0(%rbp),%rcx
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    %eax,-0x1ac(%rbp)
mov    -0x150(%rbp),%rdi
mov    -0x178(%rbp),%rdx
mov    -0x1a0(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
imul   -0x140(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x170(%rbp),%eax
add    $0x1,%eax
mov    -0x19c(%rbp),%ecx
sub    -0x1a0(%rbp),%ecx
add    %ecx,%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
add    $0xfffffffffffffff0,%rdx
mov    -0x178(%rbp),%rcx
mov    -0x1a0(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
imul   -0x140(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x170(%rbp),%eax
add    $0x1,%eax
add    -0x19c(%rbp),%eax
sub    -0x1a0(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
lea    0xb98(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    %eax,-0x1ac(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    13ba <main+0x22a>
mov    -0x150(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x164(%rbp),%esi
lea    0xb6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x16c(%rbp),%esi
add    -0x170(%rbp),%esi
add    $0x1,%esi
lea    0xb6f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x188(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
movsd  0xaf8(%rip),%xmm0
movsd  %xmm0,-0x1c0(%rbp)
ff
movsd  0xae0(%rip),%xmm0
movsd  %xmm0,-0x1c8(%rbp)
ff
movl   $0x28,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1e8(%rbp)
mov    -0x1b0(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1f0(%rbp)
mov    -0x164(%rbp),%edi
shl    $0x1,%edi
imul   -0x1b0(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1e0(%rbp)
lea    -0x130(%rbp),%rdi
call   1070 <feastinit@plt>
movl   $0x1,-0x130(%rbp)
mov    -0x178(%rbp),%rcx
lea    -0x130(%rbp),%r9
mov    -0x1e8(%rbp),%r14
mov    -0x1e0(%rbp),%rbx
mov    -0x1f0(%rbp),%r10
lea    -0x141(%rbp),%rdi
lea    -0x164(%rbp),%rsi
lea    -0x16c(%rbp),%rdx
lea    -0x140(%rbp),%r8
lea    -0x138(%rbp),%rax
mov    %rax,-0x208(%rbp)
lea    -0x13c(%rbp),%rax
mov    %rax,-0x200(%rbp)
lea    -0x1c0(%rbp),%r13
lea    -0x1c8(%rbp),%r12
lea    -0x1b0(%rbp),%r15
lea    -0x1b4(%rbp),%r11
lea    -0x1b8(%rbp),%rax
mov    %rax,-0x1f8(%rbp)
mov    -0x208(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x200(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x1f8(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1040 <zfeast_hbev@plt>
lea    -0x198(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <gettimeofday@plt>
mov    -0x1b8(%rbp),%esi
lea    0x9eb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x1b8(%rbp)
jne    185d <main+0x6cd>
lea    0x9e6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xa0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x9ca(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movsd  -0x198(%rbp),%xmm0
ff
subsd  -0x188(%rbp),%xmm0
ff
movsd  -0x190(%rbp),%xmm1
ff
subsd  -0x180(%rbp),%xmm1
ff
movsd  0x926(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
lea    0x9f2(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x1c0(%rbp),%xmm0
ff
movsd  -0x1c8(%rbp),%xmm1
ff
lea    0x9e8(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    -0x1b4(%rbp),%esi
mov    -0x1b0(%rbp),%edx
lea    0x9f9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x13c(%rbp),%esi
lea    0xa03(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movl   $0x0,-0x19c(%rbp)
mov    -0x19c(%rbp),%eax
mov    -0x1b4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     17af <main+0x61f>
movsd  -0x1d0(%rbp),%xmm0
ff
mov    -0x1e8(%rbp),%rax
movslq -0x19c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    1761 <main+0x5d1>
movsd  -0x1d0(%rbp),%xmm0
ff
lea    0x99c(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  -0x138(%rbp),%xmm0
ff
lea    0x993(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0x9a8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x19c(%rbp)
mov    -0x19c(%rbp),%eax
mov    -0x1b4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1858 <main+0x6c8>
mov    -0x19c(%rbp),%esi
mov    -0x1e8(%rbp),%rax
movslq -0x19c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x1f0(%rbp),%rax
movslq -0x19c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0x964(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    17f3 <main+0x663>
jmp    185d <main+0x6cd>
xor    %eax,%eax
add    $0x238,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
movb   $0x46,0xb(%rsp)
movabs $0x326d6574737973,%rax
mov    %rax,0x4e(%rsp)
movabs $0x79732f2e2e2f2e2e,%rax
2f 73 79
mov    %rax,0x48(%rsp)
movl   $0x0,0x24(%rsp)
lea    0xe33(%rip),%rsi
lea    0x48(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xe21(%rip),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   10a0 <fscanf@plt>
cmpl   $0x0,0xc(%rsp)
mov    $0x0,%r14d
jle    1285 <main+0xe5>
lea    0x4(%rsp),%r15
lea    0x18(%rsp),%r12
lea    0x88(%rsp),%rbp
xor    %r14d,%r14d
xor    %r13d,%r13d
jmp    124b <main+0xab>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r13d
cmp    0xc(%rsp),%r13d
jge    1285 <main+0xe5>
mov    %rbx,%rdi
lea    0xdc9(%rip),%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %rbp,%r8
mov    %rbp,%r9
xor    %eax,%eax
call   10a0 <fscanf@plt>
mov    0x4(%rsp),%ecx
sub    0x18(%rsp),%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
cmp    %r14d,%eax
jle    1240 <main+0xa0>
mov    %eax,0x24(%rsp)
mov    %eax,%r14d
jmp    1240 <main+0xa0>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    (%r14,%r14,1),%r12d
add    $0x1,%r12d
mov    %r12d,0x28(%rsp)
mov    0x10(%rsp),%ebx
imul   %r12d,%ebx
add    %ebx,%ebx
mov    %ebx,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
mov    $0x0,%eax
jle    12ce <main+0x12e>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %r15,%rdi
xor    %esi,%esi
call   1090 <memset@plt>
mov    %ebx,%eax
mov    %eax,0x4(%rsp)
lea    0xd3d(%rip),%rsi
lea    0x48(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xd2b(%rip),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   10a0 <fscanf@plt>
lea    0x1(%r14),%ebp
cmpl   $0x0,0xc(%rsp)
mov    %r15,0x30(%rsp)
jle    138a <main+0x1ea>
lea    0xd0a(%rip),%r15
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd00(%rip),%rsi
lea    0x4(%rsp),%rdx
lea    0x18(%rsp),%rcx
xor    %eax,%eax
call   10a0 <fscanf@plt>
mov    0x18(%rsp),%eax
lea    (%rax,%rax,1),%ecx
add    $0xfffffffe,%ecx
imul   %r12d,%ecx
movslq %ecx,%rcx
mov    0x30(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
mov    %ebp,%edx
sub    %eax,%edx
add    0x4(%rsp),%edx
add    %edx,%edx
movslq %edx,%rax
lea    (%rcx,%rax,8),%rdx
add    $0xfffffffffffffff0,%rdx
lea    (%rcx,%rax,8),%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10a0 <fscanf@plt>
add    $0x1,%r13d
cmp    0xc(%rsp),%r13d
jl     1320 <main+0x180>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%esi
lea    0xc92(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    %r14d,%ebp
lea    0xca2(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x70(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
movabs $0xbfd6666666666666,%rax
66 d6 bf
mov    %rax,0x40(%rsp)
movabs $0x3fcd70a3d70a3d71,%rax
70 cd 3f
mov    %rax,0x38(%rsp)
movl   $0x28,0x20(%rsp)
mov    $0x28,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbx
mov    $0x28,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%r14
mov    0x10(%rsp),%eax
shl    $0x4,%eax
lea    (%rax,%rax,4),%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbp
lea    0x90(%rsp),%r15
mov    %r15,%rdi
call   1070 <feastinit@plt>
movl   $0x1,0x90(%rsp)
lea    0x1c(%rsp),%rax
lea    0x14(%rsp),%r10
lea    0x20(%rsp),%r11
lea    0x38(%rsp),%r13
lea    0x40(%rsp),%r12
lea    0xb(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x24(%rsp),%rdx
lea    0x28(%rsp),%r8
mov    0x30(%rsp),%rcx
mov    %r15,%r9
push   %rax
push   %r14
push   %r10
push   %rbp
push   %rbx
push   %r11
push   %r13
push   %r12
lea    0x6c(%rsp),%rax
push   %rax
lea    0xa0(%rsp),%rax
push   %rax
call   1040 <zfeast_hbev@plt>
add    $0x50,%rsp
lea    0x60(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
mov    0x1c(%rsp),%esi
lea    0xbaf(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x0,0x1c(%rsp)
jne    1669 <main+0x4c9>
lea    0xc90(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xc4f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
movapd 0x60(%rsp),%xmm1
subpd  0x70(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  0xaff(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xb69(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
lea    0xb63(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    0x14(%rsp),%esi
mov    0x20(%rsp),%edx
lea    0xb78(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%esi
lea    0xb84(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rsp),%eax
test   %eax,%eax
jle    1574 <main+0x3d4>
lea    -0x1(%rax),%rdx
mov    %eax,%ecx
and    $0x7,%ecx
cmp    $0x7,%rdx
jae    157c <main+0x3dc>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    15c8 <main+0x428>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
jmp    15ee <main+0x44e>
mov    %eax,%esi
and    $0xfffffff8,%esi
xorpd  %xmm0,%xmm0
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
addsd  (%rbx,%rdx,8),%xmm0
addsd  0x8(%rbx,%rdx,8),%xmm0
addsd  0x10(%rbx,%rdx,8),%xmm0
addsd  0x18(%rbx,%rdx,8),%xmm0
addsd  0x20(%rbx,%rdx,8),%xmm0
addsd  0x28(%rbx,%rdx,8),%xmm0
addsd  0x30(%rbx,%rdx,8),%xmm0
addsd  0x38(%rbx,%rdx,8),%xmm0
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    1590 <main+0x3f0>
test   %rcx,%rcx
je     15ee <main+0x44e>
lea    (%rbx,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%rdx,%rsi,8),%xmm0
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    15e0 <main+0x440>
mov    %eax,0x4(%rsp)
lea    0xaeb(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x58(%rsp),%xmm0
lea    0xae4(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xb70(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x4(%rsp)
cmpl   $0x0,0x14(%rsp)
jle    1669 <main+0x4c9>
xor    %eax,%eax
lea    0xadc(%rip),%rbp
nopl   0x0(%rax,%rax,1)
movslq %eax,%rsi
movsd  (%rbx,%rsi,8),%xmm0
movsd  (%r14,%rsi,8),%xmm1
mov    %rbp,%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
cmp    0x14(%rsp),%eax
jl     1640 <main+0x4a0>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
@__const.main.name = [14 x i8] c"../../system2\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"%d%d\0A\00"
@.str.2 = [12 x i8] c"%d%d%lf%lf\0A\00"
@.str.3 = [5 x i8] c"%d%d\00"
@.str.4 = [8 x i8] c"%lf%lf\0A\00"
@.str.5 = [33 x i8] c"dense matrix -system2- size %.d\0A\00"
@.str.6 = [15 x i8] c"bandwidth %d \0A\00"
@.str.7 = [22 x i8] c"FEAST OUTPUT INFO %d\0A\00"
@.str.8 = [51 x i8] c"*************************************************\0A\00"
@.str.9 = [51 x i8] c"************** REPORT ***************************\0A\00"
@.str.10 = [20 x i8] c"SIMULATION TIME %f\0A\00"
@.str.11 = [43 x i8] c"# Search interval [Emin,Emax] %.15e %.15e\0A\00"
@.str.12 = [30 x i8] c"# mode found/subspace %d %d \0A\00"
@.str.13 = [18 x i8] c"# iterations %d \0A\00"
@.str.14 = [13 x i8] c"TRACE %.15e\0A\00"
@.str.15 = [35 x i8] c"Relative error on the Trace %.15e\0A\00"
@.str.16 = [23 x i8] c"Eigenvalues/Residuals\0A\00"
@.str.17 = [19 x i8] c" %d %.15e %.15e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i32]
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32*
%8 = alloca [14 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca %struct.timeval
%15 = alloca %struct.timeval
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
store i32 0, i32* %1
store i8 70, i8* %6
%31 = bitcast [14 x i8]* %8 to i8*
store i32 0, i32* %11
%32 = getelementptr inbounds [14 x i8], [14 x i8]* %8, i64 0, i64 0
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %33, i32** %7
%34 = load i32*, i32** %7
%35 = call i32 (i32*, i8*, ...) @fscanf(i32* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32* %10)
store i32 %35, i32* %20
store i32 0, i32* %18
br label %36
36: ; preds = %56, %0
%37 = load i32, i32* %18
%38 = load i32, i32* %10
%39 = sub nsw i32 %38, 1
%40 = icmp sle i32 %37, %39
br i1 %40, label %41, label %59
41: ; preds = %36
%42 = load i32*, i32** %7
%43 = call i32 (i32*, i8*, ...) @fscanf(i32* %42, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %16, i32* %17, double* %27, double* %27)
store i32 %43, i32* %20
%44 = load i32, i32* %16
%45 = load i32, i32* %17
%46 = sub nsw i32 %44, %45
%47 = call i32 @abs(i32 %46)
%48 = load i32, i32* %11
%49 = icmp sgt i32 %47, %48
br i1 %49, label %50, label %55
50: ; preds = %41
%51 = load i32, i32* %16
%52 = load i32, i32* %17
%53 = sub nsw i32 %51, %52
%54 = call i32 @abs(i32 %53)
store i32 %54, i32* %11
br label %55
55: ; preds = %50, %41
br label %56
56: ; preds = %55
%57 = load i32, i32* %18
%58 = add nsw i32 %57, 1
store i32 %58, i32* %18
br label %36
59: ; preds = %36
%60 = load i32*, i32** %7
%61 = call i32 @fclose(i32* %60)
%62 = load i32, i32* %11
store i32 %62, i32* %12
%63 = load i32, i32* %11
%64 = load i32, i32* %12
%65 = add nsw i32 %63, %64
%66 = add nsw i32 %65, 1
store i32 %66, i32* %5
%67 = load i32, i32* %9
%68 = mul nsw i32 2, %67
%69 = load i32, i32* %5
%70 = mul nsw i32 %68, %69
store i32 %70, i32* %19
%71 = load i32, i32* %19
%72 = call double* @calloc(i32 %71, i32 8)
store double* %72, double** %13
store i32 0, i32* %16
br label %73
73: ; preds = %83, %59
%74 = load i32, i32* %16
%75 = load i32, i32* %19
%76 = sub nsw i32 %75, 1
%77 = icmp sle i32 %74, %76
br i1 %77, label %78, label %86
78: ; preds = %73
%79 = load double*, double** %13
%80 = load i32, i32* %16
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double, double* %79, i64 %81
store double 0.000000e+00, double* %82
br label %83
83: ; preds = %78
%84 = load i32, i32* %16
%85 = add nsw i32 %84, 1
store i32 %85, i32* %16
br label %73
86: ; preds = %73
%87 = getelementptr inbounds [14 x i8], [14 x i8]* %8, i64 0, i64 0
%88 = call i32* @fopen(i8* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %88, i32** %7
%89 = load i32*, i32** %7
%90 = call i32 (i32*, i8*, ...) @fscanf(i32* %89, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32* %10)
store i32 %90, i32* %20
store i32 0, i32* %18
br label %91
91: ; preds = %137, %86
%92 = load i32, i32* %18
%93 = load i32, i32* %10
%94 = sub nsw i32 %93, 1
%95 = icmp sle i32 %92, %94
br i1 %95, label %96, label %140
96: ; preds = %91
%97 = load i32*, i32** %7
%98 = call i32 (i32*, i8*, ...) @fscanf(i32* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %16, i32* %17)
store i32 %98, i32* %20
%99 = load i32*, i32** %7
%100 = load double*, double** %13
%101 = load i32, i32* %17
%102 = sub nsw i32 %101, 1
%103 = mul nsw i32 %102, 2
%104 = load i32, i32* %5
%105 = mul nsw i32 %103, %104
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %100, i64 %106
%108 = load i32, i32* %12
%109 = add nsw i32 %108, 1
%110 = load i32, i32* %16
%111 = load i32, i32* %17
%112 = sub nsw i32 %110, %111
%113 = add nsw i32 %109, %112
%114 = mul nsw i32 2, %113
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %107, i64 %115
%117 = getelementptr inbounds double, double* %116, i64 -2
%118 = load double*, double** %13
%119 = load i32, i32* %17
%120 = sub nsw i32 %119, 1
%121 = mul nsw i32 %120, 2
%122 = load i32, i32* %5
%123 = mul nsw i32 %121, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %118, i64 %124
%126 = load i32, i32* %12
%127 = add nsw i32 %126, 1
%128 = load i32, i32* %16
%129 = add nsw i32 %127, %128
%130 = load i32, i32* %17
%131 = sub nsw i32 %129, %130
%132 = mul nsw i32 2, %131
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %125, i64 %133
%135 = getelementptr inbounds double, double* %134, i64 -1
%136 = call i32 (i32*, i8*, ...) @fscanf(i32* %99, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double* %117, double* %135)
store i32 %136, i32* %20
br label %137
137: ; preds = %96
%138 = load i32, i32* %18
%139 = add nsw i32 %138, 1
store i32 %139, i32* %18
br label %91
140: ; preds = %91
%141 = load i32*, i32** %7
%142 = call i32 @fclose(i32* %141)
%143 = load i32, i32* %9
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %143)
%145 = load i32, i32* %11
%146 = load i32, i32* %12
%147 = add nsw i32 %145, %146
%148 = add nsw i32 %147, 1
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %148)
%150 = call i32 @gettimeofday(%struct.timeval* %14, i32* null)
store double -3.500000e-01, double* %24
store double 2.300000e-01, double* %25
store i32 40, i32* %21
%151 = load i32, i32* %21
%152 = call double* @calloc(i32 %151, i32 8)
store double* %152, double** %29
%153 = load i32, i32* %21
%154 = call double* @calloc(i32 %153, i32 8)
store double* %154, double** %30
%155 = load i32, i32* %9
%156 = mul nsw i32 2, %155
%157 = load i32, i32* %21
%158 = mul nsw i32 %156, %157
%159 = call double* @calloc(i32 %158, i32 8)
store double* %159, double** %28
%160 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%161 = call i32 @feastinit(i32* %160)
%162 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
store i32 1, i32* %162
%163 = load double*, double** %13
%164 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%165 = load double*, double** %29
%166 = load double*, double** %28
%167 = load double*, double** %30
%168 = call i32 @zfeast_hbev(i8* %6, i32* %9, i32* %11, double* %163, i32* %5, i32* %164, double* %3, i32* %4, double* %24, double* %25, i32* %21, double* %165, double* %166, i32* %22, double* %167, i32* %23)
%169 = call i32 @gettimeofday(%struct.timeval* %15, i32* null)
%170 = load i32, i32* %23
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %170)
%172 = load i32, i32* %23
%173 = icmp eq i32 %172, 0
br i1 %173, label %174, label %243
174: ; preds = %140
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%178 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%179 = load double, double* %178
%180 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 0
%181 = load double, double* %180
%182 = fsub double %179, %181
%183 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%184 = load double, double* %183
%185 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 1
%186 = load double, double* %185
%187 = fsub double %184, %186
%188 = fmul double %187, 0x3EB0C6F7A0B5ED8D
%189 = call double @llvm.fmuladd.f64(double %182, double 1.000000e+00, double %188)
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %189)
%191 = load double, double* %24
%192 = load double, double* %25
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0), double %191, double %192)
%194 = load i32, i32* %22
%195 = load i32, i32* %21
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %194, i32 %195)
%197 = load i32, i32* %4
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %197)
store double 0.000000e+00, double* %26
store i32 0, i32* %16
br label %199
199: ; preds = %212, %174
%200 = load i32, i32* %16
%201 = load i32, i32* %22
%202 = sub nsw i32 %201, 1
%203 = icmp sle i32 %200, %202
br i1 %203, label %204, label %215
204: ; preds = %199
%205 = load double, double* %26
%206 = load double*, double** %29
%207 = load i32, i32* %16
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
%210 = load double, double* %209
%211 = fadd double %205, %210
store double %211, double* %26
br label %212
212: ; preds = %204
%213 = load i32, i32* %16
%214 = add nsw i32 %213, 1
store i32 %214, i32* %16
br label %199
215: ; preds = %199
%216 = load double, double* %26
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), double %216)
%218 = load double, double* %3
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), double %218)
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
store i32 0, i32* %16
br label %221
221: ; preds = %239, %215
%222 = load i32, i32* %16
%223 = load i32, i32* %22
%224 = sub nsw i32 %223, 1
%225 = icmp sle i32 %222, %224
br i1 %225, label %226, label %242
226: ; preds = %221
%227 = load i32, i32* %16
%228 = load double*, double** %29
%229 = load i32, i32* %16
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double, double* %228, i64 %230
%232 = load double, double* %231
%233 = load double*, double** %30
%234 = load i32, i32* %16
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i32 %227, double %232, double %237)
br label %239
239: ; preds = %226
%240 = load i32, i32* %16
%241 = add nsw i32 %240, 1
store i32 %241, i32* %16
br label %221
242: ; preds = %221
br label %243
243: ; preds = %242, %140
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
@__const.main.name = [14 x i8] c"../../system2\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [6 x i8] c"%d%d\0A\00"
@.str.2 = [12 x i8] c"%d%d%lf%lf\0A\00"
@.str.3 = [5 x i8] c"%d%d\00"
@.str.4 = [8 x i8] c"%lf%lf\0A\00"
@.str.5 = [33 x i8] c"dense matrix -system2- size %.d\0A\00"
@.str.6 = [15 x i8] c"bandwidth %d \0A\00"
@.str.7 = [22 x i8] c"FEAST OUTPUT INFO %d\0A\00"
@.str.10 = [20 x i8] c"SIMULATION TIME %f\0A\00"
@.str.11 = [43 x i8] c"# Search interval [Emin,Emax] %.15e %.15e\0A\00"
@.str.12 = [30 x i8] c"# mode found/subspace %d %d \0A\00"
@.str.13 = [18 x i8] c"# iterations %d \0A\00"
@.str.14 = [13 x i8] c"TRACE %.15e\0A\00"
@.str.15 = [35 x i8] c"Relative error on the Trace %.15e\0A\00"
@.str.17 = [19 x i8] c" %d %.15e %.15e\0A\00"
@str.18 = [50 x i8] c"************** REPORT ***************************\00"
@str.19 = [50 x i8] c"*************************************************\00"
@str.20 = [22 x i8] c"Eigenvalues/Residuals\00"
define i32 @main() {
%1 = alloca [64 x i32]
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca [14 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca <2 x double>
%11 = bitcast <2 x double>* %10 to %struct.timeval*
%12 = alloca <2 x double>
%13 = bitcast <2 x double>* %12 to %struct.timeval*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = bitcast [64 x i32]* %1 to i8*
%23 = bitcast double* %2 to i8*
%24 = bitcast i32* %3 to i8*
%25 = bitcast i32* %4 to i8*
store i8 70, i8* %5
%26 = getelementptr inbounds [14 x i8], [14 x i8]* %6, i64 0, i64 0
%27 = bitcast i32* %7 to i8*
%28 = bitcast i32* %8 to i8*
%29 = bitcast i32* %9 to i8*
%30 = bitcast <2 x double>* %10 to i8*
%31 = bitcast <2 x double>* %12 to i8*
%32 = bitcast i32* %14 to i8*
%33 = bitcast i32* %15 to i8*
%34 = bitcast i32* %16 to i8*
%35 = bitcast i32* %17 to i8*
%36 = bitcast i32* %18 to i8*
%37 = bitcast double* %19 to i8*
%38 = bitcast double* %20 to i8*
%39 = bitcast double* %21 to i8*
store i32 0, i32* %9
%40 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%41 = call i32 (i32*, i8*, ...) @fscanf(i32* %40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %8)
%42 = load i32, i32* %8
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %59
44: ; preds = %0, %54
%45 = phi i32 [ %55, %54 ], [ 0, %0 ]
%46 = phi i32 [ %56, %54 ], [ 0, %0 ]
%47 = call i32 (i32*, i8*, ...) @fscanf(i32* %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %14, i32* %15, double* %21, double* %21)
%48 = load i32, i32* %14
%49 = load i32, i32* %15
%50 = sub nsw i32 %48, %49
%51 = call i32 @llvm.abs.i32(i32 %50, i1 true)
%52 = icmp sgt i32 %51, %45
br i1 %52, label %53, label %54
53: ; preds = %44
store i32 %51, i32* %9
br label %54
54: ; preds = %44, %53
%55 = phi i32 [ %45, %44 ], [ %51, %53 ]
%56 = add nuw nsw i32 %46, 1
%57 = load i32, i32* %8
%58 = icmp slt i32 %56, %57
br i1 %58, label %44, label %59
59: ; preds = %54, %0
%60 = phi i32 [ 0, %0 ], [ %55, %54 ]
%61 = call i32 @fclose(i32* %40)
%62 = shl nsw i32 %60, 1
%63 = or i32 %62, 1
store i32 %63, i32* %4
%64 = load i32, i32* %7
%65 = shl nsw i32 %64, 1
%66 = mul nsw i32 %65, %63
%67 = call double* @calloc(i32 %66, i32 8)
%68 = icmp sgt i32 %66, 0
br i1 %68, label %69, label %73
69: ; preds = %59
%70 = bitcast double* %67 to i8*
%71 = zext i32 %66 to i64
%72 = shl nuw nsw i64 %71, 3
br label %73
73: ; preds = %69, %59
%74 = phi i32 [ 0, %59 ], [ %66, %69 ]
store i32 %74, i32* %14
%75 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%76 = call i32 (i32*, i8*, ...) @fscanf(i32* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %8)
%77 = load i32, i32* %8
%78 = icmp sgt i32 %77, 0
%79 = add i32 %60, 1
br i1 %78, label %80, label %101
80: ; preds = %73, %80
%81 = phi i32 [ %98, %80 ], [ 0, %73 ]
%82 = call i32 (i32*, i8*, ...) @fscanf(i32* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %14, i32* %15)
%83 = load i32, i32* %15
%84 = shl i32 %83, 1
%85 = add i32 %84, -2
%86 = mul nsw i32 %85, %63
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %67, i64 %87
%89 = load i32, i32* %14
%90 = sub i32 %79, %83
%91 = add i32 %90, %89
%92 = shl nsw i32 %91, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %88, i64 %93
%95 = getelementptr inbounds double, double* %94, i64 -2
%96 = getelementptr inbounds double, double* %94, i64 -1
%97 = call i32 (i32*, i8*, ...) @fscanf(i32* %75, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double* %95, double* %96)
%98 = add nuw nsw i32 %81, 1
%99 = load i32, i32* %8
%100 = icmp slt i32 %98, %99
br i1 %100, label %80, label %101
101: ; preds = %80, %73
%102 = call i32 @fclose(i32* %75)
%103 = load i32, i32* %7
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %103)
%105 = add i32 %79, %60
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %105)
%107 = call i32 @gettimeofday(%struct.timeval* %11, i32* null)
store double -3.500000e-01, double* %19
store double 2.300000e-01, double* %20
store i32 40, i32* %16
%108 = call double* @calloc(i32 40, i32 8)
%109 = call double* @calloc(i32 40, i32 8)
%110 = load i32, i32* %7
%111 = mul nsw i32 %110, 80
%112 = call double* @calloc(i32 %111, i32 8)
%113 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%114 = call i32 @feastinit(i32* %113)
store i32 1, i32* %113
%115 = call i32 @zfeast_hbev(i8* %5, i32* %7, i32* %9, double* %67, i32* %4, i32* %113, double* %2, i32* %3, double* %19, double* %20, i32* %16, double* %108, double* %112, i32* %17, double* %109, i32* %18)
%116 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%117 = load i32, i32* %18
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %117)
%119 = load i32, i32* %18
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %224
121: ; preds = %101
%122 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.19, i64 0, i64 0))
%123 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.18, i64 0, i64 0))
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.19, i64 0, i64 0))
%125 = load <2 x double>, <2 x double>* %12
%126 = load <2 x double>, <2 x double>* %10
%127 = fsub <2 x double> %125, %126
%128 = extractelement <2 x double> %127, i64 1
%129 = fmul double %128, 0x3EB0C6F7A0B5ED8D
%130 = extractelement <2 x double> %127, i64 0
%131 = fadd double %130, %129
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %131)
%133 = load double, double* %19
%134 = load double, double* %20
%135 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0), double %133, double %134)
%136 = load i32, i32* %17
%137 = load i32, i32* %16
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %136, i32 %137)
%139 = load i32, i32* %3
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %139)
%141 = load i32, i32* %17
%142 = icmp sgt i32 %141, 0
br i1 %142, label %143, label %203
143: ; preds = %121
%144 = zext i32 %141 to i64
%145 = add nsw i64 %144, -1
%146 = and i64 %144, 7
%147 = icmp ult i64 %145, 7
br i1 %147, label %188, label %148
148: ; preds = %143
%149 = and i64 %144, 4294967288
br label %150
150: ; preds = %150, %148
%151 = phi i64 [ 0, %148 ], [ %185, %150 ]
%152 = phi double [ 0.000000e+00, %148 ], [ %184, %150 ]
%153 = phi i64 [ 0, %148 ], [ %186, %150 ]
%154 = getelementptr inbounds double, double* %108, i64 %151
%155 = load double, double* %154
%156 = fadd double %152, %155
%157 = or i64 %151, 1
%158 = getelementptr inbounds double, double* %108, i64 %157
%159 = load double, double* %158
%160 = fadd double %156, %159
%161 = or i64 %151, 2
%162 = getelementptr inbounds double, double* %108, i64 %161
%163 = load double, double* %162
%164 = fadd double %160, %163
%165 = or i64 %151, 3
%166 = getelementptr inbounds double, double* %108, i64 %165
%167 = load double, double* %166
%168 = fadd double %164, %167
%169 = or i64 %151, 4
%170 = getelementptr inbounds double, double* %108, i64 %169
%171 = load double, double* %170
%172 = fadd double %168, %171
%173 = or i64 %151, 5
%174 = getelementptr inbounds double, double* %108, i64 %173
%175 = load double, double* %174
%176 = fadd double %172, %175
%177 = or i64 %151, 6
%178 = getelementptr inbounds double, double* %108, i64 %177
%179 = load double, double* %178
%180 = fadd double %176, %179
%181 = or i64 %151, 7
%182 = getelementptr inbounds double, double* %108, i64 %181
%183 = load double, double* %182
%184 = fadd double %180, %183
%185 = add nuw nsw i64 %151, 8
%186 = add i64 %153, 8
%187 = icmp eq i64 %186, %149
br i1 %187, label %188, label %150
188: ; preds = %150, %143
%189 = phi double [ undef, %143 ], [ %184, %150 ]
%190 = phi i64 [ 0, %143 ], [ %185, %150 ]
%191 = phi double [ 0.000000e+00, %143 ], [ %184, %150 ]
%192 = icmp eq i64 %146, 0
br i1 %192, label %203, label %193
193: ; preds = %188, %193
%194 = phi i64 [ %200, %193 ], [ %190, %188 ]
%195 = phi double [ %199, %193 ], [ %191, %188 ]
%196 = phi i64 [ %201, %193 ], [ 0, %188 ]
%197 = getelementptr inbounds double, double* %108, i64 %194
%198 = load double, double* %197
%199 = fadd double %195, %198
%200 = add nuw nsw i64 %194, 1
%201 = add i64 %196, 1
%202 = icmp eq i64 %201, %146
br i1 %202, label %203, label %193
203: ; preds = %188, %193, %121
%204 = phi i32 [ 0, %121 ], [ %141, %193 ], [ %141, %188 ]
%205 = phi double [ 0.000000e+00, %121 ], [ %189, %188 ], [ %199, %193 ]
store i32 %204, i32* %14
%206 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), double %205)
%207 = load double, double* %2
%208 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), double %207)
%209 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.20, i64 0, i64 0))
store i32 0, i32* %14
%210 = load i32, i32* %17
%211 = icmp sgt i32 %210, 0
br i1 %211, label %212, label %224
212: ; preds = %203, %212
%213 = phi i32 [ %221, %212 ], [ 0, %203 ]
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %108, i64 %214
%216 = load double, double* %215
%217 = getelementptr inbounds double, double* %109, i64 %214
%218 = load double, double* %217
%219 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i32 %213, double %216, double %218)
%220 = load i32, i32* %14
%221 = add nsw i32 %220, 1
store i32 %221, i32* %14
%222 = load i32, i32* %17
%223 = icmp slt i32 %221, %222
br i1 %223, label %212, label %224
224: ; preds = %212, %203, %101
ret i32 0
}