#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*/ dfeast_sbgv(char *, int *, int *, double *, int *, int *,
                               double *, int *, int *, double *, int *,
                               double *, double *, int *, double *, double *,
                               int *, double *, 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 main() {
  int feastparam[64];
  double epsout;
  int loop, LDA, LDB;
  char UPLO = 'F';
  FILE *fp;
  char name[] = "../../system1";
  int N, nnz, kl, ku;
  double *A, *B;
  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);
  LDB = LDA;
  n2 = N * (kl + ku + 1);
  A = calloc(n2, sizeof(double));
  B = calloc(n2, sizeof(double));
  for (i = 0; i <= n2 - 1; i++) {
    *(A + i) = (double)0.0;
    *(B + 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) * LDA + ku + (i - j),
                 B + (j - 1) * LDB + ku + (i - j));
  };
  fclose(fp);
  printf("dense matrix -system1- size %.d\n", N);
  printf("bandwidth %d \n", kl + ku + 1);
  gettimeofday(&t1, NULL);
  Emin = (double)0.18;
  Emax = (double)1.0;
  M0 = 25;
  E = calloc(M0, sizeof(double));
  res = calloc(M0, sizeof(double));
  X = calloc(N * M0, sizeof(double));
  feastinit(feastparam);
  feastparam[0] = 1;
  dfeast_sbgv(&UPLO, &N, &kl, A, &LDA, &kl, B, &LDB, 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    $0x268,%rsp
movl   $0x0,-0x2c(%rbp)
movb   $0x46,-0x145(%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   1080 <fscanf@plt>
mov    %eax,-0x1b4(%rbp)
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%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    -0x1a4(%rbp),%rdx
lea    -0x1a8(%rbp),%rcx
lea    -0x1e0(%rbp),%r9
mov    %r9,%r8
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1b4(%rbp)
mov    -0x1a4(%rbp),%edi
sub    -0x1a8(%rbp),%edi
call   1030 <abs@plt>
cmp    -0x16c(%rbp),%eax
jle    12af <main+0x11f>
mov    -0x1a4(%rbp),%edi
sub    -0x1a8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x16c(%rbp)
jmp    12b4 <main+0x124>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1231 <main+0xa1>
mov    -0x150(%rbp),%rdi
call   1040 <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    -0x140(%rbp),%eax
mov    %eax,-0x144(%rbp)
mov    -0x164(%rbp),%eax
mov    -0x16c(%rbp),%ecx
add    -0x170(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x178(%rbp)
mov    -0x1b0(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x180(%rbp)
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x1b0(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13ae <main+0x21e>
mov    -0x178(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x180(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1357 <main+0x1c7>
lea    -0x15e(%rbp),%rdi
lea    0xc6a(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rdi
lea    0xc52(%rip),%rsi
lea    -0x164(%rbp),%rdx
lea    -0x168(%rbp),%rcx
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1b4(%rbp)
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
mov    -0x168(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     14f0 <main+0x360>
mov    -0x150(%rbp),%rdi
lea    0xc1a(%rip),%rsi
lea    -0x1a4(%rbp),%rdx
lea    -0x1a8(%rbp),%rcx
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1b4(%rbp)
mov    -0x150(%rbp),%rdi
mov    -0x178(%rbp),%rdx
mov    -0x1a8(%rbp),%eax
sub    $0x1,%eax
imul   -0x140(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
movslq -0x170(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x1a4(%rbp),%eax
sub    -0x1a8(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x180(%rbp),%rcx
mov    -0x1a8(%rbp),%eax
sub    $0x1,%eax
imul   -0x144(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
movslq -0x170(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x1a4(%rbp),%eax
sub    -0x1a8(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
lea    0xb63(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1b4(%rbp)
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    13fb <main+0x26b>
mov    -0x150(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x164(%rbp),%esi
lea    0xb36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x16c(%rbp),%esi
add    -0x170(%rbp),%esi
add    $0x1,%esi
lea    0xb3a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x190(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movsd  0xac3(%rip),%xmm0
movsd  %xmm0,-0x1c8(%rbp)
ff
movsd  0xaab(%rip),%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
movl   $0x19,-0x1b8(%rbp)
mov    -0x1b8(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1f0(%rbp)
mov    -0x1b8(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1f8(%rbp)
mov    -0x164(%rbp),%edi
imul   -0x1b8(%rbp),%edi
mov    $0x8,%esi
call   10a0 <calloc@plt>
mov    %rax,-0x1e8(%rbp)
lea    -0x130(%rbp),%rdi
call   1060 <feastinit@plt>
movl   $0x1,-0x130(%rbp)
mov    -0x178(%rbp),%rcx
mov    -0x180(%rbp),%rax
lea    -0x130(%rbp),%rdx
mov    %rdx,-0x218(%rbp)
mov    -0x1f0(%rbp),%r14
mov    -0x1e8(%rbp),%rbx
mov    -0x1f8(%rbp),%r10
lea    -0x145(%rbp),%rdi
lea    -0x164(%rbp),%rsi
lea    -0x16c(%rbp),%r9
lea    -0x140(%rbp),%r8
lea    -0x144(%rbp),%rdx
mov    %rdx,-0x220(%rbp)
lea    -0x138(%rbp),%rdx
mov    %rdx,-0x210(%rbp)
lea    -0x13c(%rbp),%rdx
mov    %rdx,-0x208(%rbp)
lea    -0x1c8(%rbp),%r13
lea    -0x1d0(%rbp),%r12
lea    -0x1b8(%rbp),%r15
lea    -0x1bc(%rbp),%r11
lea    -0x1c0(%rbp),%rdx
mov    %rdx,-0x200(%rbp)
mov    %r9,%rdx
mov    %rax,(%rsp)
mov    -0x220(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x218(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x210(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x208(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x200(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %rax,0x60(%rsp)
call   1090 <dfeast_sbgv@plt>
lea    -0x1a0(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x1c0(%rbp),%esi
lea    0x97d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x1c0(%rbp)
jne    18cb <main+0x73b>
lea    0x978(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x99d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x95c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  -0x1a0(%rbp),%xmm0
ff
subsd  -0x190(%rbp),%xmm0
ff
movsd  -0x198(%rbp),%xmm1
ff
subsd  -0x188(%rbp),%xmm1
ff
movsd  0x8b8(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
lea    0x984(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x1c8(%rbp),%xmm0
ff
movsd  -0x1d0(%rbp),%xmm1
ff
lea    0x97a(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x1bc(%rbp),%esi
mov    -0x1b8(%rbp),%edx
lea    0x98b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x13c(%rbp),%esi
lea    0x995(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x1bc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     181d <main+0x68d>
movsd  -0x1d8(%rbp),%xmm0
ff
mov    -0x1f0(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    17cf <main+0x63f>
movsd  -0x1d8(%rbp),%xmm0
ff
lea    0x92e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x138(%rbp),%xmm0
ff
lea    0x925(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x93a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    -0x1bc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     18c6 <main+0x736>
mov    -0x1a4(%rbp),%esi
mov    -0x1f0(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x1f8(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0x8f6(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1861 <main+0x6d1>
jmp    18cb <main+0x73b>
xor    %eax,%eax
add    $0x268,%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    $0x1a8,%rsp
movb   $0x46,0x7(%rsp)
movabs $0x316d6574737973,%rax
mov    %rax,0x5e(%rsp)
movabs $0x79732f2e2e2f2e2e,%rax
2f 73 79
mov    %rax,0x58(%rsp)
movl   $0x0,0x20(%rsp)
lea    0xe33(%rip),%rsi
lea    0x58(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%r13
lea    0xe21(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fscanf@plt>
cmpl   $0x0,0x8(%rsp)
mov    $0x0,%ebp
jle    1272 <main+0xd2>
mov    %rsp,%r15
lea    0x14(%rsp),%r12
lea    0x98(%rsp),%rbx
xor    %ebp,%ebp
xor    %r14d,%r14d
jmp    123b <main+0x9b>
xchg   %ax,%ax
add    $0x1,%r14d
cmp    0x8(%rsp),%r14d
jge    1272 <main+0xd2>
mov    %r13,%rdi
lea    0xdd9(%rip),%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %rbx,%r8
mov    %rbx,%r9
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    (%rsp),%ecx
sub    0x14(%rsp),%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
cmp    %ebp,%eax
jle    1230 <main+0x90>
mov    %eax,0x20(%rsp)
mov    %eax,%ebp
jmp    1230 <main+0x90>
mov    %r13,%rdi
call   1040 <fclose@plt>
mov    %rbp,0x30(%rsp)
movslq %ebp,%rax
lea    (%rax,%rax,1),%r14
add    $0x1,%r14
mov    %r14d,0x28(%rsp)
mov    %r14d,0x24(%rsp)
mov    0xc(%rsp),%ebx
imul   %r14d,%ebx
mov    %ebx,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%r12
mov    %ebx,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
mov    $0x0,%eax
jle    12e5 <main+0x145>
mov    %ebx,%ebp
shl    $0x3,%rbp
mov    %r12,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1080 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1080 <memset@plt>
mov    %ebx,%eax
mov    %r12,0x38(%rsp)
mov    %r15,0x40(%rsp)
mov    %eax,(%rsp)
lea    0xd1d(%rip),%rsi
lea    0x58(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xd0b(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fscanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    13b3 <main+0x213>
mov    0x30(%rsp),%eax
mov    0x38(%rsp),%rcx
lea    (%rcx,%rax,8),%r13
mov    0x40(%rsp),%rcx
lea    (%rcx,%rax,8),%rbp
lea    0xcd9(%rip),%r15
xor    %r12d,%r12d
nopl   0x0(%rax)
mov    %rbx,%rdi
lea    0xcd0(%rip),%rsi
mov    %rsp,%rdx
lea    0x14(%rsp),%rcx
xor    %eax,%eax
call   1090 <fscanf@plt>
movslq 0x14(%rsp),%rax
lea    -0x1(%rax),%rcx
imul   %r14,%rcx
lea    0x0(,%rcx,8),%rdx
add    %r13,%rdx
movslq (%rsp),%rsi
sub    %rax,%rsi
lea    (%rdx,%rsi,8),%rdx
lea    0x0(,%rcx,8),%rax
add    %rbp,%rax
lea    (%rax,%rsi,8),%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <fscanf@plt>
add    $0x1,%r12d
cmp    0x8(%rsp),%r12d
jl     1350 <main+0x1b0>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0xc(%rsp),%esi
lea    0xc69(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x30(%rsp),%rax
lea    (%rax,%rax,1),%esi
add    $0x1,%esi
lea    0xc71(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x80(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
movabs $0x3fc70a3d70a3d70a,%rax
0a c7 3f
mov    %rax,0x50(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x48(%rsp)
movl   $0x19,0x1c(%rsp)
mov    $0x19,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbx
mov    $0x19,%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%r14
mov    0xc(%rsp),%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%edi
mov    $0x8,%esi
call   10b0 <calloc@plt>
mov    %rax,%rbp
lea    0xa0(%rsp),%r13
mov    %r13,%rdi
call   1060 <feastinit@plt>
movl   $0x1,0xa0(%rsp)
sub    $0x8,%rsp
lea    0x20(%rsp),%rax
lea    0x18(%rsp),%r11
lea    0x24(%rsp),%r12
lea    0x50(%rsp),%r15
lea    0x58(%rsp),%r10
lea    0xf(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x30(%rsp),%r8
lea    0x28(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %rdx,%r9
push   %rax
push   %r14
push   %r11
push   %rbp
push   %rbx
push   %r12
push   %r15
push   %r10
lea    0x74(%rsp),%rax
push   %rax
lea    0xb8(%rsp),%rax
push   %rax
push   %r13
lea    0x84(%rsp),%rax
push   %rax
push   0xa8(%rsp)
call   10a0 <dfeast_sbgv@plt>
add    $0x70,%rsp
lea    0x70(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
mov    0x18(%rsp),%esi
lea    0xb67(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x18(%rsp)
jne    16b7 <main+0x517>
lea    0xc48(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xc07(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
movapd 0x70(%rsp),%xmm1
subpd  0x80(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  0xab4(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xb1e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
lea    0xb18(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x10(%rsp),%esi
mov    0x1c(%rsp),%edx
lea    0xb2d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%rsp),%esi
lea    0xb39(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    15bf <main+0x41f>
lea    -0x1(%rax),%rdx
mov    %eax,%ecx
and    $0x7,%ecx
cmp    $0x7,%rdx
jae    15c7 <main+0x427>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    1618 <main+0x478>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
jmp    163e <main+0x49e>
mov    %eax,%esi
and    $0xfffffff8,%esi
xorpd  %xmm0,%xmm0
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
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    15e0 <main+0x440>
test   %rcx,%rcx
je     163e <main+0x49e>
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    1630 <main+0x490>
mov    %eax,(%rsp)
lea    0xa9c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x68(%rsp),%xmm0
lea    0xa95(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xb21(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,(%rsp)
cmpl   $0x0,0x10(%rsp)
jle    16b7 <main+0x517>
xor    %eax,%eax
lea    0xa8e(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
movslq %eax,%rsi
movsd  (%rbx,%rsi,8),%xmm0
movsd  (%r14,%rsi,8),%xmm1
mov    %rbp,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    (%rsp),%eax
add    $0x1,%eax
mov    %eax,(%rsp)
cmp    0x10(%rsp),%eax
jl     1690 <main+0x4f0>
xor    %eax,%eax
add    $0x1a8,%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"../../system1\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 -system1- 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 i32
%7 = alloca i8
%8 = alloca i32*
%9 = alloca [14 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double*
%15 = alloca double*
%16 = alloca %struct.timeval
%17 = alloca %struct.timeval
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double*
%31 = alloca double*
%32 = alloca double*
store i32 0, i32* %1
store i8 70, i8* %7
%33 = bitcast [14 x i8]* %9 to i8*
store i32 0, i32* %12
%34 = getelementptr inbounds [14 x i8], [14 x i8]* %9, i64 0, i64 0
%35 = call i32* @fopen(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %35, i32** %8
%36 = load i32*, i32** %8
%37 = call i32 (i32*, i8*, ...) @fscanf(i32* %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %11)
store i32 %37, i32* %22
store i32 0, i32* %20
br label %38
38: ; preds = %58, %0
%39 = load i32, i32* %20
%40 = load i32, i32* %11
%41 = sub nsw i32 %40, 1
%42 = icmp sle i32 %39, %41
br i1 %42, label %43, label %61
43: ; preds = %38
%44 = load i32*, i32** %8
%45 = call i32 (i32*, i8*, ...) @fscanf(i32* %44, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %18, i32* %19, double* %29, double* %29)
store i32 %45, i32* %22
%46 = load i32, i32* %18
%47 = load i32, i32* %19
%48 = sub nsw i32 %46, %47
%49 = call i32 @abs(i32 %48)
%50 = load i32, i32* %12
%51 = icmp sgt i32 %49, %50
br i1 %51, label %52, label %57
52: ; preds = %43
%53 = load i32, i32* %18
%54 = load i32, i32* %19
%55 = sub nsw i32 %53, %54
%56 = call i32 @abs(i32 %55)
store i32 %56, i32* %12
br label %57
57: ; preds = %52, %43
br label %58
58: ; preds = %57
%59 = load i32, i32* %20
%60 = add nsw i32 %59, 1
store i32 %60, i32* %20
br label %38
61: ; preds = %38
%62 = load i32*, i32** %8
%63 = call i32 @fclose(i32* %62)
%64 = load i32, i32* %12
store i32 %64, i32* %13
%65 = load i32, i32* %12
%66 = load i32, i32* %13
%67 = add nsw i32 %65, %66
%68 = add nsw i32 %67, 1
store i32 %68, i32* %5
%69 = load i32, i32* %5
store i32 %69, i32* %6
%70 = load i32, i32* %10
%71 = load i32, i32* %12
%72 = load i32, i32* %13
%73 = add nsw i32 %71, %72
%74 = add nsw i32 %73, 1
%75 = mul nsw i32 %70, %74
store i32 %75, i32* %21
%76 = load i32, i32* %21
%77 = call double* @calloc(i32 %76, i32 8)
store double* %77, double** %14
%78 = load i32, i32* %21
%79 = call double* @calloc(i32 %78, i32 8)
store double* %79, double** %15
store i32 0, i32* %18
br label %80
80: ; preds = %94, %61
%81 = load i32, i32* %18
%82 = load i32, i32* %21
%83 = sub nsw i32 %82, 1
%84 = icmp sle i32 %81, %83
br i1 %84, label %85, label %97
85: ; preds = %80
%86 = load double*, double** %14
%87 = load i32, i32* %18
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
store double 0.000000e+00, double* %89
%90 = load double*, double** %15
%91 = load i32, i32* %18
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
store double 0.000000e+00, double* %93
br label %94
94: ; preds = %85
%95 = load i32, i32* %18
%96 = add nsw i32 %95, 1
store i32 %96, i32* %18
br label %80
97: ; preds = %80
%98 = getelementptr inbounds [14 x i8], [14 x i8]* %9, i64 0, i64 0
%99 = call i32* @fopen(i8* %98, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %99, i32** %8
%100 = load i32*, i32** %8
%101 = call i32 (i32*, i8*, ...) @fscanf(i32* %100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %11)
store i32 %101, i32* %22
store i32 0, i32* %20
br label %102
102: ; preds = %142, %97
%103 = load i32, i32* %20
%104 = load i32, i32* %11
%105 = sub nsw i32 %104, 1
%106 = icmp sle i32 %103, %105
br i1 %106, label %107, label %145
107: ; preds = %102
%108 = load i32*, i32** %8
%109 = call i32 (i32*, i8*, ...) @fscanf(i32* %108, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %18, i32* %19)
store i32 %109, i32* %22
%110 = load i32*, i32** %8
%111 = load double*, double** %14
%112 = load i32, i32* %19
%113 = sub nsw i32 %112, 1
%114 = load i32, i32* %5
%115 = mul nsw i32 %113, %114
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %111, i64 %116
%118 = load i32, i32* %13
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
%121 = load i32, i32* %18
%122 = load i32, i32* %19
%123 = sub nsw i32 %121, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %120, i64 %124
%126 = load double*, double** %15
%127 = load i32, i32* %19
%128 = sub nsw i32 %127, 1
%129 = load i32, i32* %6
%130 = mul nsw i32 %128, %129
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %126, i64 %131
%133 = load i32, i32* %13
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %132, i64 %134
%136 = load i32, i32* %18
%137 = load i32, i32* %19
%138 = sub nsw i32 %136, %137
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %135, i64 %139
%141 = call i32 (i32*, i8*, ...) @fscanf(i32* %110, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double* %125, double* %140)
store i32 %141, i32* %22
br label %142
142: ; preds = %107
%143 = load i32, i32* %20
%144 = add nsw i32 %143, 1
store i32 %144, i32* %20
br label %102
145: ; preds = %102
%146 = load i32*, i32** %8
%147 = call i32 @fclose(i32* %146)
%148 = load i32, i32* %10
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %148)
%150 = load i32, i32* %12
%151 = load i32, i32* %13
%152 = add nsw i32 %150, %151
%153 = add nsw i32 %152, 1
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %153)
%155 = call i32 @gettimeofday(%struct.timeval* %16, i32* null)
store double 1.800000e-01, double* %26
store double 1.000000e+00, double* %27
store i32 25, i32* %23
%156 = load i32, i32* %23
%157 = call double* @calloc(i32 %156, i32 8)
store double* %157, double** %31
%158 = load i32, i32* %23
%159 = call double* @calloc(i32 %158, i32 8)
store double* %159, double** %32
%160 = load i32, i32* %10
%161 = load i32, i32* %23
%162 = mul nsw i32 %160, %161
%163 = call double* @calloc(i32 %162, i32 8)
store double* %163, double** %30
%164 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%165 = call i32 @feastinit(i32* %164)
%166 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
store i32 1, i32* %166
%167 = load double*, double** %14
%168 = load double*, double** %15
%169 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%170 = load double*, double** %31
%171 = load double*, double** %30
%172 = load double*, double** %32
%173 = call i32 @dfeast_sbgv(i8* %7, i32* %10, i32* %12, double* %167, i32* %5, i32* %12, double* %168, i32* %6, i32* %169, double* %3, i32* %4, double* %26, double* %27, i32* %23, double* %170, double* %171, i32* %24, double* %172, i32* %25)
%174 = call i32 @gettimeofday(%struct.timeval* %17, i32* null)
%175 = load i32, i32* %25
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %175)
%177 = load i32, i32* %25
%178 = icmp eq i32 %177, 0
br i1 %178, label %179, label %248
179: ; preds = %145
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%183 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i32 0, i32 0
%184 = load double, double* %183
%185 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 0
%186 = load double, double* %185
%187 = fsub double %184, %186
%188 = getelementptr inbounds %struct.timeval, %struct.timeval* %17, i32 0, i32 1
%189 = load double, double* %188
%190 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%191 = load double, double* %190
%192 = fsub double %189, %191
%193 = fmul double %192, 0x3EB0C6F7A0B5ED8D
%194 = call double @llvm.fmuladd.f64(double %187, double 1.000000e+00, double %193)
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), double %194)
%196 = load double, double* %26
%197 = load double, double* %27
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0), double %196, double %197)
%199 = load i32, i32* %24
%200 = load i32, i32* %23
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %199, i32 %200)
%202 = load i32, i32* %4
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %202)
store double 0.000000e+00, double* %28
store i32 0, i32* %18
br label %204
204: ; preds = %217, %179
%205 = load i32, i32* %18
%206 = load i32, i32* %24
%207 = sub nsw i32 %206, 1
%208 = icmp sle i32 %205, %207
br i1 %208, label %209, label %220
209: ; preds = %204
%210 = load double, double* %28
%211 = load double*, double** %31
%212 = load i32, i32* %18
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = fadd double %210, %215
store double %216, double* %28
br label %217
217: ; preds = %209
%218 = load i32, i32* %18
%219 = add nsw i32 %218, 1
store i32 %219, i32* %18
br label %204
220: ; preds = %204
%221 = load double, double* %28
%222 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), double %221)
%223 = load double, double* %3
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), double %223)
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
store i32 0, i32* %18
br label %226
226: ; preds = %244, %220
%227 = load i32, i32* %18
%228 = load i32, i32* %24
%229 = sub nsw i32 %228, 1
%230 = icmp sle i32 %227, %229
br i1 %230, label %231, label %247
231: ; preds = %226
%232 = load i32, i32* %18
%233 = load double*, double** %31
%234 = load i32, i32* %18
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = load double*, double** %32
%239 = load i32, i32* %18
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double, double* %238, i64 %240
%242 = load double, double* %241
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i32 %232, double %237, double %242)
br label %244
244: ; preds = %231
%245 = load i32, i32* %18
%246 = add nsw i32 %245, 1
store i32 %246, i32* %18
br label %226
247: ; preds = %226
br label %248
248: ; preds = %247, %145
ret i32 0
}

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