#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);
float *calloc(int, int);
int /*<<< orphan*/ cfeast_hbev(char *, int *, int *, float *, int *, int *,
                               float *, int *, float *, float *, int *, float *,
                               float *, int *, float *, 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];
  float epsout;
  int loop, LDA;
  char UPLO = 'F';
  FILE *fp;
  char name[] = "../../system2";
  int N, nnz, kl, ku;
  float *A;
  struct timeval t1, t2;
  int i, j, k, n2, err;
  int M0, M, info;
  float Emin, Emax, trace, dum;
  float *X;
  float *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%f%f\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(float));
  for (i = 0; i <= n2 - 1; i++) {
    *(A + i) = (float)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, "%f%f\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 = (float)-0.35;
  Emax = (float)0.23;
  M0 = 40;
  E = calloc(M0, sizeof(float));
  res = calloc(M0, sizeof(float));
  X = calloc(2 * N * M0, sizeof(float));
  feastinit(feastparam);
  feastparam[0] = 1;
  cfeast_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] %f %f\n", Emin, Emax);
    printf("# mode found/subspace %d %d \n", M, M0);
    printf("# iterations %d \n", loop);
    trace = (float)0.0;
    for (i = 0; i <= M - 1; i = i + 1) {
      trace = trace + *(E + i);
    }
    printf("TRACE %f\n", trace);
    printf("Relative error on the Trace %f\n", epsout);
    printf("Eigenvalues/Residuals\n");
    for (i = 0; i <= M - 1; i = i + 1) {
      printf("   %d %f %f\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    $0x218,%rsp
movl   $0x0,-0x2c(%rbp)
movb   $0x46,-0x13d(%rbp)
mov    0xe57(%rip),%rax
mov    %rax,-0x156(%rbp)
mov    0xe52(%rip),%eax
mov    %eax,-0x14e(%rbp)
mov    0xe49(%rip),%ax
mov    %ax,-0x14a(%rbp)
movl   $0x0,-0x164(%rbp)
lea    -0x156(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rdi
lea    0xe14(%rip),%rsi
lea    -0x15c(%rbp),%rdx
lea    -0x160(%rbp),%rcx
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1a4(%rbp)
movl   $0x0,-0x19c(%rbp)
mov    -0x19c(%rbp),%eax
mov    -0x160(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     12c8 <main+0x138>
mov    -0x148(%rbp),%rdi
lea    0xdd0(%rip),%rsi
lea    -0x194(%rbp),%rdx
lea    -0x198(%rbp),%rcx
lea    -0x1c0(%rbp),%r9
mov    %r9,%r8
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1a4(%rbp)
mov    -0x194(%rbp),%edi
sub    -0x198(%rbp),%edi
call   1030 <abs@plt>
cmp    -0x164(%rbp),%eax
jle    12af <main+0x11f>
mov    -0x194(%rbp),%edi
sub    -0x198(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x164(%rbp)
jmp    12b4 <main+0x124>
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    1231 <main+0xa1>
mov    -0x148(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x164(%rbp),%eax
mov    %eax,-0x168(%rbp)
mov    -0x164(%rbp),%eax
add    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13c(%rbp)
mov    -0x15c(%rbp),%eax
shl    $0x1,%eax
imul   -0x13c(%rbp),%eax
mov    %eax,-0x1a0(%rbp)
mov    -0x1a0(%rbp),%edi
mov    $0x4,%esi
call   1090 <calloc@plt>
mov    %rax,-0x170(%rbp)
movl   $0x0,-0x194(%rbp)
mov    -0x194(%rbp),%eax
mov    -0x1a0(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     136d <main+0x1dd>
mov    -0x170(%rbp),%rax
movslq -0x194(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
jmp    132c <main+0x19c>
lea    -0x156(%rbp),%rdi
lea    0xca3(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rdi
lea    0xc8b(%rip),%rsi
lea    -0x15c(%rbp),%rdx
lea    -0x160(%rbp),%rcx
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1a4(%rbp)
movl   $0x0,-0x19c(%rbp)
mov    -0x19c(%rbp),%eax
mov    -0x160(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     14bb <main+0x32b>
mov    -0x148(%rbp),%rdi
lea    0xc51(%rip),%rsi
lea    -0x194(%rbp),%rdx
lea    -0x198(%rbp),%rcx
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1a4(%rbp)
mov    -0x148(%rbp),%rdi
mov    -0x170(%rbp),%rdx
mov    -0x198(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
imul   -0x13c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    -0x194(%rbp),%ecx
sub    -0x198(%rbp),%ecx
add    %ecx,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
add    $0xfffffffffffffff8,%rdx
mov    -0x170(%rbp),%rcx
mov    -0x198(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
imul   -0x13c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x168(%rbp),%eax
add    $0x1,%eax
add    -0x194(%rbp),%eax
sub    -0x198(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
lea    0xb90(%rip),%rsi
mov    $0x0,%al
call   1080 <fscanf@plt>
mov    %eax,-0x1a4(%rbp)
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    13ba <main+0x22a>
mov    -0x148(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x15c(%rbp),%esi
lea    0xb61(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x164(%rbp),%esi
add    -0x168(%rbp),%esi
add    $0x1,%esi
lea    0xb65(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x180(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movss  0xaf4(%rip),%xmm0
movss  %xmm0,-0x1b4(%rbp)
ff
movss  0xae0(%rip),%xmm0
movss  %xmm0,-0x1b8(%rbp)
ff
movl   $0x28,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%edi
mov    $0x4,%esi
call   1090 <calloc@plt>
mov    %rax,-0x1d0(%rbp)
mov    -0x1a8(%rbp),%edi
mov    $0x4,%esi
call   1090 <calloc@plt>
mov    %rax,-0x1d8(%rbp)
mov    -0x15c(%rbp),%edi
shl    $0x1,%edi
imul   -0x1a8(%rbp),%edi
mov    $0x4,%esi
call   1090 <calloc@plt>
mov    %rax,-0x1c8(%rbp)
lea    -0x130(%rbp),%rdi
call   1060 <feastinit@plt>
movl   $0x1,-0x130(%rbp)
mov    -0x170(%rbp),%rcx
lea    -0x130(%rbp),%r9
mov    -0x1d0(%rbp),%r14
mov    -0x1c8(%rbp),%rbx
mov    -0x1d8(%rbp),%r10
lea    -0x13d(%rbp),%rdi
lea    -0x15c(%rbp),%rsi
lea    -0x164(%rbp),%rdx
lea    -0x13c(%rbp),%r8
lea    -0x134(%rbp),%rax
mov    %rax,-0x1f0(%rbp)
lea    -0x138(%rbp),%rax
mov    %rax,-0x1e8(%rbp)
lea    -0x1b4(%rbp),%r13
lea    -0x1b8(%rbp),%r12
lea    -0x1a8(%rbp),%r15
lea    -0x1ac(%rbp),%r11
lea    -0x1b0(%rbp),%rax
mov    %rax,-0x1e0(%rbp)
mov    -0x1f0(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x1e8(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x1e0(%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   10a0 <cfeast_hbev@plt>
lea    -0x190(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x1b0(%rbp),%esi
lea    0x9e1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x1b0(%rbp)
jne    1875 <main+0x6e5>
lea    0x9dc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xa01(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x9c0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  -0x190(%rbp),%xmm0
ff
subsd  -0x180(%rbp),%xmm0
ff
movsd  -0x188(%rbp),%xmm1
ff
subsd  -0x178(%rbp),%xmm1
ff
movsd  0x91e(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
lea    0x9e8(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  -0x1b4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x1b8(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0x9d6(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x1ac(%rbp),%esi
mov    -0x1a8(%rbp),%edx
lea    0x9e1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x138(%rbp),%esi
lea    0x9eb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1bc(%rbp)
ff
movl   $0x0,-0x194(%rbp)
mov    -0x194(%rbp),%eax
mov    -0x1ac(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     17b7 <main+0x627>
movss  -0x1bc(%rbp),%xmm0
ff
mov    -0x1d0(%rbp),%rax
movslq -0x194(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x1bc(%rbp)
ff
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
jmp    1769 <main+0x5d9>
movss  -0x1bc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0x980(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  -0x134(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0x970(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x982(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x194(%rbp)
mov    -0x194(%rbp),%eax
mov    -0x1ac(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1870 <main+0x6e0>
mov    -0x194(%rbp),%esi
mov    -0x1d0(%rbp),%rax
movslq -0x194(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x1d8(%rbp),%rax
movslq -0x194(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x936(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
jmp    1803 <main+0x673>
jmp    1875 <main+0x6e5>
xor    %eax,%eax
add    $0x218,%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    $0x188,%rsp
movb   $0x46,0xf(%rsp)
movabs $0x326d6574737973,%rax
mov    %rax,0x4e(%rsp)
movabs $0x79732f2e2e2f2e2e,%rax
2f 73 79
mov    %rax,0x48(%rsp)
movl   $0x0,0x30(%rsp)
lea    0xe33(%rip),%rsi
lea    0x48(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xe21(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fscanf@plt>
cmpl   $0x0,0x10(%rsp)
mov    $0x0,%r14d
jle    1275 <main+0xd5>
lea    0x8(%rsp),%r15
lea    0x1c(%rsp),%r12
lea    0x5c(%rsp),%rbp
xor    %r14d,%r14d
xor    %r13d,%r13d
jmp    123b <main+0x9b>
nop
add    $0x1,%r13d
cmp    0x10(%rsp),%r13d
jge    1275 <main+0xd5>
mov    %rbx,%rdi
lea    0xdd9(%rip),%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %rbp,%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    0x8(%rsp),%ecx
sub    0x1c(%rsp),%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
cmp    %r14d,%eax
jle    1230 <main+0x90>
mov    %eax,0x30(%rsp)
mov    %eax,%r14d
jmp    1230 <main+0x90>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    (%r14,%r14,1),%r12d
add    $0x1,%r12d
mov    %r12d,0x34(%rsp)
mov    0x14(%rsp),%ebx
imul   %r12d,%ebx
add    %ebx,%ebx
mov    %ebx,%edi
mov    $0x4,%esi
call   10a0 <calloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
mov    $0x0,%eax
jle    12be <main+0x11e>
mov    %ebx,%edx
shl    $0x2,%rdx
mov    %r15,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
mov    %ebx,%eax
mov    %eax,0x8(%rsp)
lea    0xd4d(%rip),%rsi
lea    0x48(%rsp),%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
lea    0xd3b(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rax,%rdi
xor    %eax,%eax
call   1090 <fscanf@plt>
lea    0x1(%r14),%ebp
cmpl   $0x0,0x10(%rsp)
mov    %r15,0x40(%rsp)
jle    137a <main+0x1da>
lea    0xd1a(%rip),%r15
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd0e(%rip),%rsi
lea    0x8(%rsp),%rdx
lea    0x1c(%rsp),%rcx
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    0x1c(%rsp),%eax
lea    (%rax,%rax,1),%ecx
add    $0xfffffffe,%ecx
imul   %r12d,%ecx
movslq %ecx,%rcx
mov    0x40(%rsp),%rdx
lea    (%rdx,%rcx,4),%rcx
mov    %ebp,%edx
sub    %eax,%edx
add    0x8(%rsp),%edx
add    %edx,%edx
movslq %edx,%rax
lea    (%rcx,%rax,4),%rdx
add    $0xfffffffffffffff8,%rdx
lea    (%rcx,%rax,4),%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <fscanf@plt>
add    $0x1,%r13d
cmp    0x10(%rsp),%r13d
jl     1310 <main+0x170>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x14(%rsp),%esi
lea    0xca0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    %r14d,%ebp
lea    0xcb0(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x70(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
movl   $0xbeb33333,0x24(%rsp)
be
movl   $0x3e6b851f,0x20(%rsp)
3e
movl   $0x28,0x2c(%rsp)
mov    $0x28,%edi
mov    $0x4,%esi
call   10a0 <calloc@plt>
mov    %rax,%rbx
mov    $0x28,%edi
mov    $0x4,%esi
call   10a0 <calloc@plt>
mov    %rax,%r14
mov    0x14(%rsp),%eax
shl    $0x4,%eax
lea    (%rax,%rax,4),%edi
mov    $0x4,%esi
call   10a0 <calloc@plt>
mov    %rax,%rbp
lea    0x80(%rsp),%r15
mov    %r15,%rdi
call   1060 <feastinit@plt>
movl   $0x1,0x80(%rsp)
lea    0x28(%rsp),%rax
lea    0x18(%rsp),%r10
lea    0x2c(%rsp),%r11
lea    0x20(%rsp),%r12
lea    0x24(%rsp),%r13
lea    0xf(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x30(%rsp),%rdx
lea    0x34(%rsp),%r8
mov    0x40(%rsp),%rcx
mov    %r15,%r9
push   %rax
push   %r14
push   %r10
push   %rbp
push   %rbx
push   %r11
push   %r12
push   %r13
lea    0x78(%rsp),%rax
push   %rax
lea    0x84(%rsp),%rax
push   %rax
call   10b0 <cfeast_hbev@plt>
add    $0x50,%rsp
lea    0x60(%rsp),%rdi
xor    %esi,%esi
call   1070 <gettimeofday@plt>
mov    0x28(%rsp),%esi
lea    0xbcb(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x28(%rsp)
jne    1651 <main+0x4b1>
lea    0xc9a(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xc59(%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  0xb1d(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xb85(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xb77(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x18(%rsp),%esi
mov    0x2c(%rsp),%edx
lea    0xb86(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rsp),%esi
lea    0xb92(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%eax
test   %eax,%eax
jle    155d <main+0x3bd>
lea    -0x1(%rax),%rdx
mov    %eax,%ecx
and    $0x7,%ecx
cmp    $0x7,%rdx
jae    1564 <main+0x3c4>
xorps  %xmm0,%xmm0
xor    %edx,%edx
jmp    15a8 <main+0x408>
xorps  %xmm0,%xmm0
xor    %eax,%eax
jmp    15d2 <main+0x432>
mov    %eax,%esi
and    $0xfffffff8,%esi
xorps  %xmm0,%xmm0
xor    %edx,%edx
xchg   %ax,%ax
addss  (%rbx,%rdx,4),%xmm0
addss  0x4(%rbx,%rdx,4),%xmm0
addss  0x8(%rbx,%rdx,4),%xmm0
addss  0xc(%rbx,%rdx,4),%xmm0
addss  0x10(%rbx,%rdx,4),%xmm0
addss  0x14(%rbx,%rdx,4),%xmm0
addss  0x18(%rbx,%rdx,4),%xmm0
addss  0x1c(%rbx,%rdx,4),%xmm0
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    1570 <main+0x3d0>
test   %rcx,%rcx
je     15ce <main+0x42e>
lea    (%rbx,%rdx,4),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addss  (%rdx,%rsi,4),%xmm0
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    15c0 <main+0x420>
cvtss2sd %xmm0,%xmm0
mov    %eax,0x8(%rsp)
lea    0xaff(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x3c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xaf1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xb74(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x8(%rsp)
cmpl   $0x0,0x18(%rsp)
jle    1651 <main+0x4b1>
xor    %eax,%eax
lea    0xae6(%rip),%rbp
movslq %eax,%rsi
movss  (%rbx,%rsi,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%r14,%rsi,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbp,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x8(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x8(%rsp)
cmp    0x18(%rsp),%eax
jl     1620 <main+0x480>
xor    %eax,%eax
add    $0x188,%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 = [10 x i8] c"%d%d%f%f\0A\00"
@.str.3 = [5 x i8] c"%d%d\00"
@.str.4 = [6 x i8] c"%f%f\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 = [37 x i8] c"# Search interval [Emin,Emax] %f %f\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 = [10 x i8] c"TRACE %f\0A\00"
@.str.15 = [32 x i8] c"Relative error on the Trace %f\0A\00"
@.str.16 = [23 x i8] c"Eigenvalues/Residuals\0A\00"
@.str.17 = [13 x i8] c" %d %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i32]
%3 = alloca float
%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 float*
%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 float
%25 = alloca float
%26 = alloca float
%27 = alloca float
%28 = alloca float*
%29 = alloca float*
%30 = alloca float*
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 ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32* %16, i32* %17, float* %27, float* %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 float* @calloc(i32 %71, i32 4)
store float* %72, float** %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 float*, float** %13
%80 = load i32, i32* %16
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds float, float* %79, i64 %81
store float 0.000000e+00, float* %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 float*, float** %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 float, float* %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 float, float* %107, i64 %115
%117 = getelementptr inbounds float, float* %116, i64 -2
%118 = load float*, float** %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 float, float* %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 float, float* %125, i64 %133
%135 = getelementptr inbounds float, float* %134, i64 -1
%136 = call i32 (i32*, i8*, ...) @fscanf(i32* %99, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), float* %117, float* %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 float 0xBFD6666660000000, float* %24
store float 0x3FCD70A3E0000000, float* %25
store i32 40, i32* %21
%151 = load i32, i32* %21
%152 = call float* @calloc(i32 %151, i32 4)
store float* %152, float** %29
%153 = load i32, i32* %21
%154 = call float* @calloc(i32 %153, i32 4)
store float* %154, float** %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 float* @calloc(i32 %158, i32 4)
store float* %159, float** %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 float*, float** %13
%164 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 0
%165 = load float*, float** %29
%166 = load float*, float** %28
%167 = load float*, float** %30
%168 = call i32 @cfeast_hbev(i8* %6, i32* %9, i32* %11, float* %163, i32* %5, i32* %164, float* %3, i32* %4, float* %24, float* %25, i32* %21, float* %165, float* %166, i32* %22, float* %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 %249
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 float, float* %24
%192 = fpext float %191 to double
%193 = load float, float* %25
%194 = fpext float %193 to double
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0), double %192, double %194)
%196 = load i32, i32* %22
%197 = load i32, i32* %21
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %196, i32 %197)
%199 = load i32, i32* %4
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %199)
store float 0.000000e+00, float* %26
store i32 0, i32* %16
br label %201
201: ; preds = %214, %174
%202 = load i32, i32* %16
%203 = load i32, i32* %22
%204 = sub nsw i32 %203, 1
%205 = icmp sle i32 %202, %204
br i1 %205, label %206, label %217
206: ; preds = %201
%207 = load float, float* %26
%208 = load float*, float** %29
%209 = load i32, i32* %16
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds float, float* %208, i64 %210
%212 = load float, float* %211
%213 = fadd float %207, %212
store float %213, float* %26
br label %214
214: ; preds = %206
%215 = load i32, i32* %16
%216 = add nsw i32 %215, 1
store i32 %216, i32* %16
br label %201
217: ; preds = %201
%218 = load float, float* %26
%219 = fpext float %218 to double
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), double %219)
%221 = load float, float* %3
%222 = fpext float %221 to double
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), double %222)
%224 = 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 %225
225: ; preds = %245, %217
%226 = load i32, i32* %16
%227 = load i32, i32* %22
%228 = sub nsw i32 %227, 1
%229 = icmp sle i32 %226, %228
br i1 %229, label %230, label %248
230: ; preds = %225
%231 = load i32, i32* %16
%232 = load float*, float** %29
%233 = load i32, i32* %16
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds float, float* %232, i64 %234
%236 = load float, float* %235
%237 = fpext float %236 to double
%238 = load float*, float** %30
%239 = load i32, i32* %16
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds float, float* %238, i64 %240
%242 = load float, float* %241
%243 = fpext float %242 to double
%244 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %231, double %237, double %243)
br label %245
245: ; preds = %230
%246 = load i32, i32* %16
%247 = add nsw i32 %246, 1
store i32 %247, i32* %16
br label %225
248: ; preds = %225
br label %249
249: ; preds = %248, %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 = [10 x i8] c"%d%d%f%f\0A\00"
@.str.3 = [5 x i8] c"%d%d\00"
@.str.4 = [6 x i8] c"%f%f\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 = [37 x i8] c"# Search interval [Emin,Emax] %f %f\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 = [10 x i8] c"TRACE %f\0A\00"
@.str.15 = [32 x i8] c"Relative error on the Trace %f\0A\00"
@.str.17 = [13 x i8] c" %d %f %f\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 float
%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 float
%20 = alloca float
%21 = alloca float
%22 = bitcast [64 x i32]* %1 to i8*
%23 = bitcast float* %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 float* %19 to i8*
%38 = bitcast float* %20 to i8*
%39 = bitcast float* %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 ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32* %14, i32* %15, float* %21, float* %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 float* @calloc(i32 %66, i32 4)
%68 = icmp sgt i32 %66, 0
br i1 %68, label %69, label %73
69: ; preds = %59
%70 = bitcast float* %67 to i8*
%71 = zext i32 %66 to i64
%72 = shl nuw nsw i64 %71, 2
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 float, float* %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 float, float* %88, i64 %93
%95 = getelementptr inbounds float, float* %94, i64 -2
%96 = getelementptr inbounds float, float* %94, i64 -1
%97 = call i32 (i32*, i8*, ...) @fscanf(i32* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), float* %95, float* %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 float 0xBFD6666660000000, float* %19
store float 0x3FCD70A3E0000000, float* %20
store i32 40, i32* %16
%108 = call float* @calloc(i32 40, i32 4)
%109 = call float* @calloc(i32 40, i32 4)
%110 = load i32, i32* %7
%111 = mul nsw i32 %110, 80
%112 = call float* @calloc(i32 %111, i32 4)
%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 @cfeast_hbev(i8* %5, i32* %7, i32* %9, float* %67, i32* %4, i32* %113, float* %2, i32* %3, float* %19, float* %20, i32* %16, float* %108, float* %112, i32* %17, float* %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 %232
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 float, float* %19
%134 = fpext float %133 to double
%135 = load float, float* %20
%136 = fpext float %135 to double
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0), double %134, double %136)
%138 = load i32, i32* %17
%139 = load i32, i32* %16
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %138, i32 %139)
%141 = load i32, i32* %3
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %141)
%143 = load i32, i32* %17
%144 = icmp sgt i32 %143, 0
br i1 %144, label %145, label %208
145: ; preds = %121
%146 = zext i32 %143 to i64
%147 = add nsw i64 %146, -1
%148 = and i64 %146, 7
%149 = icmp ult i64 %147, 7
br i1 %149, label %190, label %150
150: ; preds = %145
%151 = and i64 %146, 4294967288
br label %152
152: ; preds = %152, %150
%153 = phi i64 [ 0, %150 ], [ %187, %152 ]
%154 = phi float [ 0.000000e+00, %150 ], [ %186, %152 ]
%155 = phi i64 [ 0, %150 ], [ %188, %152 ]
%156 = getelementptr inbounds float, float* %108, i64 %153
%157 = load float, float* %156
%158 = fadd float %154, %157
%159 = or i64 %153, 1
%160 = getelementptr inbounds float, float* %108, i64 %159
%161 = load float, float* %160
%162 = fadd float %158, %161
%163 = or i64 %153, 2
%164 = getelementptr inbounds float, float* %108, i64 %163
%165 = load float, float* %164
%166 = fadd float %162, %165
%167 = or i64 %153, 3
%168 = getelementptr inbounds float, float* %108, i64 %167
%169 = load float, float* %168
%170 = fadd float %166, %169
%171 = or i64 %153, 4
%172 = getelementptr inbounds float, float* %108, i64 %171
%173 = load float, float* %172
%174 = fadd float %170, %173
%175 = or i64 %153, 5
%176 = getelementptr inbounds float, float* %108, i64 %175
%177 = load float, float* %176
%178 = fadd float %174, %177
%179 = or i64 %153, 6
%180 = getelementptr inbounds float, float* %108, i64 %179
%181 = load float, float* %180
%182 = fadd float %178, %181
%183 = or i64 %153, 7
%184 = getelementptr inbounds float, float* %108, i64 %183
%185 = load float, float* %184
%186 = fadd float %182, %185
%187 = add nuw nsw i64 %153, 8
%188 = add i64 %155, 8
%189 = icmp eq i64 %188, %151
br i1 %189, label %190, label %152
190: ; preds = %152, %145
%191 = phi float [ undef, %145 ], [ %186, %152 ]
%192 = phi i64 [ 0, %145 ], [ %187, %152 ]
%193 = phi float [ 0.000000e+00, %145 ], [ %186, %152 ]
%194 = icmp eq i64 %148, 0
br i1 %194, label %205, label %195
195: ; preds = %190, %195
%196 = phi i64 [ %202, %195 ], [ %192, %190 ]
%197 = phi float [ %201, %195 ], [ %193, %190 ]
%198 = phi i64 [ %203, %195 ], [ 0, %190 ]
%199 = getelementptr inbounds float, float* %108, i64 %196
%200 = load float, float* %199
%201 = fadd float %197, %200
%202 = add nuw nsw i64 %196, 1
%203 = add i64 %198, 1
%204 = icmp eq i64 %203, %148
br i1 %204, label %205, label %195
205: ; preds = %195, %190
%206 = phi float [ %191, %190 ], [ %201, %195 ]
%207 = fpext float %206 to double
br label %208
208: ; preds = %205, %121
%209 = phi i32 [ 0, %121 ], [ %143, %205 ]
%210 = phi double [ 0.000000e+00, %121 ], [ %207, %205 ]
store i32 %209, i32* %14
%211 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), double %210)
%212 = load float, float* %2
%213 = fpext float %212 to double
%214 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), double %213)
%215 = 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
%216 = load i32, i32* %17
%217 = icmp sgt i32 %216, 0
br i1 %217, label %218, label %232
218: ; preds = %208, %218
%219 = phi i32 [ %229, %218 ], [ 0, %208 ]
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds float, float* %108, i64 %220
%222 = load float, float* %221
%223 = fpext float %222 to double
%224 = getelementptr inbounds float, float* %109, i64 %220
%225 = load float, float* %224
%226 = fpext float %225 to double
%227 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %219, double %223, double %226)
%228 = load i32, i32* %14
%229 = add nsw i32 %228, 1
store i32 %229, i32* %14
%230 = load i32, i32* %17
%231 = icmp slt i32 %229, %230
br i1 %231, label %218, label %232
232: ; preds = %218, %208, %101
ret i32 0
}