#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 */

/* Variables and functions */
int /*<<< orphan*/ ERRORMESSAGE(char *, char *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int fabs(double);
int /*<<< orphan*/ sprintf(char *, char *, int, int, double, ...);
int sqrt(double);
int Check_Eigen(int N, double **C, double *diag, double **Q) {
  int i, j, k, res = 0;
  double cc, dd;
  static char s[324];
  for (i = 0; i < N; ++i)
    for (j = 0; j < N; ++j) {
      for (cc = 0., dd = 0., k = 0; k < N; ++k) {
        cc += diag[k] * Q[i][k] * Q[j][k];
        dd += Q[i][k] * Q[j][k];
      }
      if (fabs(cc - C[i > j ? i : j][i > j ? j : i]) / sqrt(C[i][i] * C[j][j]) >
              1e-10 &&
          fabs(cc - C[i > j ? i : j][i > j ? j : i]) > 3e-14) {
        sprintf(s, "%d %d: %.17e %.17e, %e", i, j, cc,
                C[i > j ? i : j][i > j ? j : i],
                cc - C[i > j ? i : j][i > j ? j : i]);
        ERRORMESSAGE("cmaes_t:Eigen(): imprecise result detected ", s, 0, 0);
        ++res;
      }
      if (fabs(dd - (i == j)) > 1e-10) {
        sprintf(s, "%d %d %.17e ", i, j, dd);
        ERRORMESSAGE(
            "cmaes_t:Eigen(): imprecise result detected (Q not orthog.)", s, 0,
            0);
        ++res;
      }
    }
  return res;
}


x86 assembly (clang, -O0):
<Check_Eigen>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15cb <Check_Eigen+0x48b>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15b8 <Check_Eigen+0x478>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    123d <Check_Eigen+0xfd>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    119e <Check_Eigen+0x5e>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1266 <Check_Eigen+0x126>
mov    -0x24(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    126c <Check_Eigen+0x12c>
mov    -0x28(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x54(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x60(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1295 <Check_Eigen+0x155>
mov    -0x28(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    129b <Check_Eigen+0x15b>
mov    -0x24(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%rax
movsd  -0x50(%rbp),%xmm0
mov    -0x64(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
mov    %eax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  0xd06(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    152f <Check_Eigen+0x3ef>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    132d <Check_Eigen+0x1ed>
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    1333 <Check_Eigen+0x1f3>
mov    -0x28(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x70(%rbp),%rax
mov    -0x7c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x88(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1362 <Check_Eigen+0x222>
mov    -0x28(%rbp),%eax
mov    %eax,-0x8c(%rbp)
jmp    136b <Check_Eigen+0x22b>
mov    -0x24(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x88(%rbp),%rax
movsd  -0x78(%rbp),%xmm0
mov    -0x8c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xc72(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    152f <Check_Eigen+0x3ef>
mov    -0x24(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0xa4(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    13e4 <Check_Eigen+0x2a4>
mov    -0x24(%rbp),%eax
mov    %eax,-0xac(%rbp)
jmp    13ed <Check_Eigen+0x2ad>
mov    -0x28(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x98(%rbp),%rax
mov    -0xac(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1422 <Check_Eigen+0x2e2>
mov    -0x28(%rbp),%eax
mov    %eax,-0xbc(%rbp)
jmp    142b <Check_Eigen+0x2eb>
mov    -0x24(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xb8(%rbp),%rax
mov    -0xbc(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    147a <Check_Eigen+0x33a>
mov    -0x24(%rbp),%eax
mov    %eax,-0xdc(%rbp)
jmp    1483 <Check_Eigen+0x343>
mov    -0x28(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0xc8(%rbp),%rax
mov    -0xdc(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    14b8 <Check_Eigen+0x378>
mov    -0x28(%rbp),%eax
mov    %eax,-0xec(%rbp)
jmp    14c1 <Check_Eigen+0x381>
mov    -0x24(%rbp),%eax
mov    %eax,-0xec(%rbp)
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0xa4(%rbp),%ecx
mov    -0xa8(%rbp),%edx
mov    -0xe8(%rbp),%rax
movsd  -0xd0(%rbp),%xmm2
ff
mov    -0xec(%rbp),%esi
movslq %esi,%rsi
subsd  (%rax,%rsi,8),%xmm2
lea    0x2b4f(%rip),%rdi
lea    0xb08(%rip),%rsi
mov    $0x3,%al
call   1050 <sprintf@plt>
lea    0xb11(%rip),%rdi
lea    0x2b33(%rip),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <ERRORMESSAGE@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xaa5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15a5 <Check_Eigen+0x465>
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
movsd  -0x40(%rbp),%xmm0
lea    0x2ad9(%rip),%rdi
lea    0xad5(%rip),%rsi
mov    $0x1,%al
call   1050 <sprintf@plt>
lea    0xad4(%rip),%rdi
lea    0x2abd(%rip),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <ERRORMESSAGE@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15aa <Check_Eigen+0x46a>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    117b <Check_Eigen+0x3b>
jmp    15bd <Check_Eigen+0x47d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1168 <Check_Eigen+0x28>
mov    -0x30(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Eigen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,0x30(%rsp)
mov    %rsi,0x18(%rsp)
test   %edi,%edi
jle    13d6 <Check_Eigen+0x296>
mov    %rdx,%rbx
mov    %edi,%ebp
mov    %ebp,%r12d
and    $0xfffffffe,%r12d
xor    %r15d,%r15d
movl   $0x0,(%rsp)
mov    %edi,0x4(%rsp)
mov    %rbp,0x8(%rsp)
jmp    119d <Check_Eigen+0x5d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    %rbp,%r15
je     13dd <Check_Eigen+0x29d>
xor    %r13d,%r13d
mov    %r15,0x10(%rsp)
jmp    11bd <Check_Eigen+0x7d>
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
add    $0x1,%r13
cmp    %rbp,%r13
je     1190 <Check_Eigen+0x50>
mov    0x30(%rsp),%rax
mov    (%rax,%r15,8),%rcx
mov    (%rax,%r13,8),%rax
cmp    $0x1,%edi
jne    11e0 <Check_Eigen+0xa0>
xorpd  %xmm4,%xmm4
xor    %edx,%edx
jmp    1246 <Check_Eigen+0x106>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rcx,%rdx,8),%xmm1
movsd  0x8(%rcx,%rdx,8),%xmm2
movsd  (%rbx,%rdx,8),%xmm3
mulsd  %xmm1,%xmm3
unpcklpd %xmm3,%xmm1
movsd  (%rax,%rdx,8),%xmm3
movsd  0x8(%rax,%rdx,8),%xmm4
unpcklpd %xmm3,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm0,%xmm3
movsd  0x8(%rbx,%rdx,8),%xmm0
mulsd  %xmm2,%xmm0
unpcklpd %xmm0,%xmm2
unpcklpd %xmm4,%xmm4
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
add    $0x2,%rdx
movapd %xmm4,%xmm0
cmp    %rdx,%r12
jne    11f0 <Check_Eigen+0xb0>
test   $0x1,%bpl
je     126f <Check_Eigen+0x12f>
movsd  (%rcx,%rdx,8),%xmm0
movsd  (%rbx,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm0
movsd  (%rax,%rdx,8),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm1,%xmm4
cmp    %r13,%r15
mov    %r13,%rax
cmova  %r15,%rax
mov    %eax,%eax
mov    0x18(%rsp),%rbp
mov    %rax,0x38(%rsp)
mov    0x0(%rbp,%rax,8),%rax
mov    %r13,%rcx
cmovb  %r15,%rcx
mov    %ecx,%r14d
movapd %xmm4,0x20(%rsp)
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
movapd %xmm0,0x40(%rsp)
subsd  (%rax,%r14,8),%xmm0
call   1030 <fabs@plt>
mov    %r15,%rcx
mov    %eax,%r15d
mov    0x0(%rbp,%rcx,8),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    0x0(%rbp,%r13,8),%rax
mulsd  (%rax,%r13,8),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    %r15d,%eax
cltd
idiv   %ecx
test   %eax,%eax
jle    1360 <Check_Eigen+0x220>
mov    0x38(%rsp),%r15
mov    0x0(%rbp,%r15,8),%rax
movapd 0x40(%rsp),%xmm0
subsd  (%rax,%r14,8),%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    1360 <Check_Eigen+0x220>
mov    0x18(%rsp),%rax
mov    (%rax,%r15,8),%rax
movsd  (%rax,%r14,8),%xmm1
movapd 0x40(%rsp),%xmm0
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
lea    0x2d2a(%rip),%rbp
mov    %rbp,%rdi
lea    0xcd8(%rip),%rsi
mov    0x10(%rsp),%r15
mov    %r15d,%edx
mov    %r13d,%ecx
mov    $0x3,%al
call   1050 <sprintf@plt>
lea    0xcd6(%rip),%rdi
mov    %rbp,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1060 <ERRORMESSAGE@plt>
addl   $0x1,(%rsp)
mov    0x8(%rsp),%rbp
jmp    136a <Check_Eigen+0x22a>
mov    0x8(%rsp),%rbp
mov    0x10(%rsp),%r15
movapd 0x20(%rsp),%xmm2
movsd  0xc88(%rip),%xmm1
cmp    %r13,%r15
je     1381 <Check_Eigen+0x241>
xorpd  %xmm1,%xmm1
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    11b0 <Check_Eigen+0x70>
lea    0x2cb3(%rip),%r14
mov    %r14,%rdi
lea    0xca4(%rip),%rsi
mov    %r15d,%edx
mov    %r13d,%ecx
movapd 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1050 <sprintf@plt>
lea    0xc97(%rip),%rdi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1060 <ERRORMESSAGE@plt>
addl   $0x1,(%rsp)
jmp    11b0 <Check_Eigen+0x70>
movl   $0x0,(%rsp)
mov    (%rsp),%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@Check_Eigen.s = internal global [324 x i8] zeroinitializer
@.str = [23 x i8] c"%d %d: %.17e %.17e, %e\00"
@.str.1 = [44 x i8] c"cmaes_t:Eigen(): imprecise result detected \00"
@.str.2 = [13 x i8] c"%d %d %.17e \00"
@.str.3 = [59 x i8] c"cmaes_t:Eigen(): imprecise result detected (Q not orthog.)\00"
define i32 @Check_Eigen(i32 %0, double** %1, double* %2, double** %3) {
%5 = alloca i32
%6 = alloca double**
%7 = alloca double*
%8 = alloca double**
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
store i32 %0, i32* %5
store double** %1, double*** %6
store double* %2, double** %7
store double** %3, double*** %8
store i32 0, i32* %12
store i32 0, i32* %9
br label %15
15: ; preds = %246, %4
%16 = load i32, i32* %9
%17 = load i32, i32* %5
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %249
19: ; preds = %15
store i32 0, i32* %10
br label %20
20: ; preds = %242, %19
%21 = load i32, i32* %10
%22 = load i32, i32* %5
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %245
24: ; preds = %20
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store i32 0, i32* %11
br label %25
25: ; preds = %76, %24
%26 = load i32, i32* %11
%27 = load i32, i32* %5
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %79
29: ; preds = %25
%30 = load double*, double** %7
%31 = load i32, i32* %11
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %30, i64 %32
%34 = load double, double* %33
%35 = load double**, double*** %8
%36 = load i32, i32* %9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double*, double** %35, i64 %37
%39 = load double*, double** %38
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
%43 = load double, double* %42
%44 = fmul double %34, %43
%45 = load double**, double*** %8
%46 = load i32, i32* %10
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double*, double** %45, i64 %47
%49 = load double*, double** %48
%50 = load i32, i32* %11
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
%53 = load double, double* %52
%54 = load double, double* %13
%55 = call double @llvm.fmuladd.f64(double %44, double %53, double %54)
store double %55, double* %13
%56 = load double**, double*** %8
%57 = load i32, i32* %9
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double*, double** %56, i64 %58
%60 = load double*, double** %59
%61 = load i32, i32* %11
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %60, i64 %62
%64 = load double, double* %63
%65 = load double**, double*** %8
%66 = load i32, i32* %10
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double*, double** %65, i64 %67
%69 = load double*, double** %68
%70 = load i32, i32* %11
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = load double, double* %14
%75 = call double @llvm.fmuladd.f64(double %64, double %73, double %74)
store double %75, double* %14
br label %76
76: ; preds = %29
%77 = load i32, i32* %11
%78 = add nsw i32 %77, 1
store i32 %78, i32* %11
br label %25
79: ; preds = %25
%80 = load double, double* %13
%81 = load double**, double*** %6
%82 = load i32, i32* %9
%83 = load i32, i32* %10
%84 = icmp sgt i32 %82, %83
br i1 %84, label %85, label %87
85: ; preds = %79
%86 = load i32, i32* %9
br label %89
87: ; preds = %79
%88 = load i32, i32* %10
br label %89
89: ; preds = %87, %85
%90 = phi i32 [ %86, %85 ], [ %88, %87 ]
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds double*, double** %81, i64 %91
%93 = load double*, double** %92
%94 = load i32, i32* %9
%95 = load i32, i32* %10
%96 = icmp sgt i32 %94, %95
br i1 %96, label %97, label %99
97: ; preds = %89
%98 = load i32, i32* %10
br label %101
99: ; preds = %89
%100 = load i32, i32* %9
br label %101
101: ; preds = %99, %97
%102 = phi i32 [ %98, %97 ], [ %100, %99 ]
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %93, i64 %103
%105 = load double, double* %104
%106 = fsub double %80, %105
%107 = call i32 @fabs(double %106)
%108 = load double**, double*** %6
%109 = load i32, i32* %9
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double*, double** %108, i64 %110
%112 = load double*, double** %111
%113 = load i32, i32* %9
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = load double**, double*** %6
%118 = load i32, i32* %10
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double*, double** %117, i64 %119
%121 = load double*, double** %120
%122 = load i32, i32* %10
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = fmul double %116, %125
%127 = call i32 @sqrt(double %126)
%128 = sdiv i32 %107, %127
%129 = sitofp i32 %128 to double
%130 = fcmp ogt double %129, 1.000000e-10
br i1 %130, label %131, label %222
131: ; preds = %101
%132 = load double, double* %13
%133 = load double**, double*** %6
%134 = load i32, i32* %9
%135 = load i32, i32* %10
%136 = icmp sgt i32 %134, %135
br i1 %136, label %137, label %139
137: ; preds = %131
%138 = load i32, i32* %9
br label %141
139: ; preds = %131
%140 = load i32, i32* %10
br label %141
141: ; preds = %139, %137
%142 = phi i32 [ %138, %137 ], [ %140, %139 ]
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double*, double** %133, i64 %143
%145 = load double*, double** %144
%146 = load i32, i32* %9
%147 = load i32, i32* %10
%148 = icmp sgt i32 %146, %147
br i1 %148, label %149, label %151
149: ; preds = %141
%150 = load i32, i32* %10
br label %153
151: ; preds = %141
%152 = load i32, i32* %9
br label %153
153: ; preds = %151, %149
%154 = phi i32 [ %150, %149 ], [ %152, %151 ]
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %145, i64 %155
%157 = load double, double* %156
%158 = fsub double %132, %157
%159 = call i32 @fabs(double %158)
%160 = sitofp i32 %159 to double
%161 = fcmp ogt double %160, 3.000000e-14
br i1 %161, label %162, label %222
162: ; preds = %153
%163 = load i32, i32* %9
%164 = load i32, i32* %10
%165 = load double, double* %13
%166 = load double**, double*** %6
%167 = load i32, i32* %9
%168 = load i32, i32* %10
%169 = icmp sgt i32 %167, %168
br i1 %169, label %170, label %172
170: ; preds = %162
%171 = load i32, i32* %9
br label %174
172: ; preds = %162
%173 = load i32, i32* %10
br label %174
174: ; preds = %172, %170
%175 = phi i32 [ %171, %170 ], [ %173, %172 ]
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double*, double** %166, i64 %176
%178 = load double*, double** %177
%179 = load i32, i32* %9
%180 = load i32, i32* %10
%181 = icmp sgt i32 %179, %180
br i1 %181, label %182, label %184
182: ; preds = %174
%183 = load i32, i32* %10
br label %186
184: ; preds = %174
%185 = load i32, i32* %9
br label %186
186: ; preds = %184, %182
%187 = phi i32 [ %183, %182 ], [ %185, %184 ]
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %178, i64 %188
%190 = load double, double* %189
%191 = load double, double* %13
%192 = load double**, double*** %6
%193 = load i32, i32* %9
%194 = load i32, i32* %10
%195 = icmp sgt i32 %193, %194
br i1 %195, label %196, label %198
196: ; preds = %186
%197 = load i32, i32* %9
br label %200
198: ; preds = %186
%199 = load i32, i32* %10
br label %200
200: ; preds = %198, %196
%201 = phi i32 [ %197, %196 ], [ %199, %198 ]
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double*, double** %192, i64 %202
%204 = load double*, double** %203
%205 = load i32, i32* %9
%206 = load i32, i32* %10
%207 = icmp sgt i32 %205, %206
br i1 %207, label %208, label %210
208: ; preds = %200
%209 = load i32, i32* %10
br label %212
210: ; preds = %200
%211 = load i32, i32* %9
br label %212
212: ; preds = %210, %208
%213 = phi i32 [ %209, %208 ], [ %211, %210 ]
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %204, i64 %214
%216 = load double, double* %215
%217 = fsub double %191, %216
%218 = call i32 (i8*, i8*, i32, i32, double, ...) @sprintf(i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %163, i32 %164, double %165, double %190, double %217)
%219 = call i32 @ERRORMESSAGE(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i32 0, i32 0)
%220 = load i32, i32* %12
%221 = add nsw i32 %220, 1
store i32 %221, i32* %12
br label %222
222: ; preds = %212, %153, %101
%223 = load double, double* %14
%224 = load i32, i32* %9
%225 = load i32, i32* %10
%226 = icmp eq i32 %224, %225
%227 = zext i1 %226 to i32
%228 = sitofp i32 %227 to double
%229 = fsub double %223, %228
%230 = call i32 @fabs(double %229)
%231 = sitofp i32 %230 to double
%232 = fcmp ogt double %231, 1.000000e-10
br i1 %232, label %233, label %241
233: ; preds = %222
%234 = load i32, i32* %9
%235 = load i32, i32* %10
%236 = load double, double* %14
%237 = call i32 (i8*, i8*, i32, i32, double, ...) @sprintf(i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %234, i32 %235, double %236)
%238 = call i32 @ERRORMESSAGE(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i32 0, i32 0)
%239 = load i32, i32* %12
%240 = add nsw i32 %239, 1
store i32 %240, i32* %12
br label %241
241: ; preds = %233, %222
br label %242
242: ; preds = %241
%243 = load i32, i32* %10
%244 = add nsw i32 %243, 1
store i32 %244, i32* %10
br label %20
245: ; preds = %20
br label %246
246: ; preds = %245
%247 = load i32, i32* %9
%248 = add nsw i32 %247, 1
store i32 %248, i32* %9
br label %15
249: ; preds = %15
%250 = load i32, i32* %12
ret i32 %250
}

LLVM IR (-O2):
@Check_Eigen.s = internal global [324 x i8] zeroinitializer
@.str = [23 x i8] c"%d %d: %.17e %.17e, %e\00"
@.str.1 = [44 x i8] c"cmaes_t:Eigen(): imprecise result detected \00"
@.str.2 = [13 x i8] c"%d %d %.17e \00"
@.str.3 = [59 x i8] c"cmaes_t:Eigen(): imprecise result detected (Q not orthog.)\00"
define i32 @Check_Eigen(i32 %0, double** nocapture %1, double* nocapture %2, double** nocapture %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %134
6: ; preds = %4
%7 = zext i32 %0 to i64
%8 = and i64 %7, 1
%9 = icmp eq i32 %0, 1
%10 = and i64 %7, 4294967294
%11 = icmp eq i64 %8, 0
br label %12
12: ; preds = %131, %6
%13 = phi i64 [ 0, %6 ], [ %132, %131 ]
%14 = phi i32 [ 0, %6 ], [ %128, %131 ]
%15 = getelementptr inbounds double*, double** %3, i64 %13
%16 = getelementptr inbounds double*, double** %1, i64 %13
%17 = trunc i64 %13 to i32
br label %18
18: ; preds = %127, %12
%19 = phi i64 [ 0, %12 ], [ %129, %127 ]
%20 = phi i32 [ %14, %12 ], [ %128, %127 ]
%21 = load double*, double** %15
%22 = getelementptr inbounds double*, double** %3, i64 %19
%23 = load double*, double** %22
br i1 %9, label %56, label %24
24: ; preds = %18, %24
%25 = phi i64 [ %53, %24 ], [ 0, %18 ]
%26 = phi <2 x double> [ %52, %24 ], [ zeroinitializer, %18 ]
%27 = phi i64 [ %54, %24 ], [ 0, %18 ]
%28 = getelementptr inbounds double, double* %2, i64 %25
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %21, i64 %25
%31 = load double, double* %30
%32 = fmul double %29, %31
%33 = getelementptr inbounds double, double* %23, i64 %25
%34 = load double, double* %33
%35 = insertelement <2 x double> poison, double %31, i64 0
%36 = insertelement <2 x double> %35, double %32, i64 1
%37 = insertelement <2 x double> poison, double %34, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %36, <2 x double> %38, <2 x double> %26)
%40 = or i64 %25, 1
%41 = getelementptr inbounds double, double* %2, i64 %40
%42 = load double, double* %41
%43 = getelementptr inbounds double, double* %21, i64 %40
%44 = load double, double* %43
%45 = fmul double %42, %44
%46 = getelementptr inbounds double, double* %23, i64 %40
%47 = load double, double* %46
%48 = insertelement <2 x double> poison, double %44, i64 0
%49 = insertelement <2 x double> %48, double %45, i64 1
%50 = insertelement <2 x double> poison, double %47, i64 0
%51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
%52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %49, <2 x double> %51, <2 x double> %39)
%53 = add nuw nsw i64 %25, 2
%54 = add i64 %27, 2
%55 = icmp eq i64 %54, %10
br i1 %55, label %56, label %24
56: ; preds = %24, %18
%57 = phi <2 x double> [ undef, %18 ], [ %52, %24 ]
%58 = phi i64 [ 0, %18 ], [ %53, %24 ]
%59 = phi <2 x double> [ zeroinitializer, %18 ], [ %52, %24 ]
br i1 %11, label %73, label %60
60: ; preds = %56
%61 = getelementptr inbounds double, double* %2, i64 %58
%62 = load double, double* %61
%63 = getelementptr inbounds double, double* %21, i64 %58
%64 = load double, double* %63
%65 = fmul double %62, %64
%66 = getelementptr inbounds double, double* %23, i64 %58
%67 = load double, double* %66
%68 = insertelement <2 x double> poison, double %64, i64 0
%69 = insertelement <2 x double> %68, double %65, i64 1
%70 = insertelement <2 x double> poison, double %67, i64 0
%71 = shufflevector <2 x double> %70, <2 x double> poison, <2 x i32> zeroinitializer
%72 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %69, <2 x double> %71, <2 x double> %59)
br label %73
73: ; preds = %56, %60
%74 = phi <2 x double> [ %57, %56 ], [ %72, %60 ]
%75 = trunc i64 %19 to i32
%76 = icmp ugt i64 %13, %19
%77 = select i1 %76, i64 %13, i64 %19
%78 = and i64 %77, 4294967295
%79 = getelementptr inbounds double*, double** %1, i64 %78
%80 = load double*, double** %79
%81 = icmp ult i64 %13, %19
%82 = select i1 %81, i64 %13, i64 %19
%83 = and i64 %82, 4294967295
%84 = getelementptr inbounds double, double* %80, i64 %83
%85 = load double, double* %84
%86 = extractelement <2 x double> %74, i64 1
%87 = fsub double %86, %85
%88 = tail call i32 @fabs(double %87)
%89 = load double*, double** %16
%90 = getelementptr inbounds double, double* %89, i64 %13
%91 = load double, double* %90
%92 = getelementptr inbounds double*, double** %1, i64 %19
%93 = load double*, double** %92
%94 = getelementptr inbounds double, double* %93, i64 %19
%95 = load double, double* %94
%96 = fmul double %91, %95
%97 = tail call i32 @sqrt(double %96)
%98 = sdiv i32 %88, %97
%99 = icmp sgt i32 %98, 0
br i1 %99, label %100, label %115
100: ; preds = %73
%101 = load double*, double** %79
%102 = getelementptr inbounds double, double* %101, i64 %83
%103 = load double, double* %102
%104 = fsub double %86, %103
%105 = tail call i32 @fabs(double %104)
%106 = icmp sgt i32 %105, 0
br i1 %106, label %107, label %115
107: ; preds = %100
%108 = load double*, double** %79
%109 = getelementptr inbounds double, double* %108, i64 %83
%110 = load double, double* %109
%111 = fsub double %86, %110
%112 = tail call i32 (i8*, i8*, i32, i32, double, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %75, double %86, double %110, double %111)
%113 = tail call i32 @ERRORMESSAGE(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i32 0, i32 0)
%114 = add nsw i32 %20, 1
br label %115
115: ; preds = %107, %100, %73
%116 = phi i32 [ %114, %107 ], [ %20, %100 ], [ %20, %73 ]
%117 = icmp eq i64 %13, %19
%118 = uitofp i1 %117 to double
%119 = extractelement <2 x double> %74, i64 0
%120 = fsub double %119, %118
%121 = tail call i32 @fabs(double %120)
%122 = icmp sgt i32 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %115
%124 = tail call i32 (i8*, i8*, i32, i32, double, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 %75, double %119)
%125 = tail call i32 @ERRORMESSAGE(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([324 x i8], [324 x i8]* @Check_Eigen.s, i64 0, i64 0), i32 0, i32 0)
%126 = add nsw i32 %116, 1
br label %127
127: ; preds = %115, %123
%128 = phi i32 [ %126, %123 ], [ %116, %115 ]
%129 = add nuw nsw i64 %19, 1
%130 = icmp eq i64 %129, %7
br i1 %130, label %131, label %18
131: ; preds = %127
%132 = add nuw nsw i64 %13, 1
%133 = icmp eq i64 %132, %7
br i1 %133, label %134, label %12
134: ; preds = %131, %4
%135 = phi i32 [ 0, %4 ], [ %128, %131 ]
ret i32 %135
}