#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*/ dsyev_(char *, char *, int *, double *, int *, double *,
                          double *, int *, int *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
double sqrt(double);
int /*<<< orphan*/ stderr;
int get_ixyz(double lat[3][3], double cutoff) {
  int i, j, ixyz;
  int n = 3, lda = 3, info, lwork;
  double *work;
  double wkopt, w[3], a[9], lat2[3][3];
  lwork = -1;
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      lat2[i][j] =
          lat[i][0] * lat[j][0] + lat[i][1] * lat[j][1] + lat[i][2] * lat[j][2];
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      a[i * 3 + j] = lat2[j][i];
  dsyev_("V", "U", &n, a, &lda, w, &wkopt, &lwork, &info);
  lwork = (int)wkopt;
  work = (double *)malloc(lwork * sizeof(double));
  dsyev_("V", "U", &n, a, &lda, w, work, &lwork, &info);
  if (info > 0) {
    fprintf(stderr, "Error: DSYEV ixyz");
    exit(1);
  }
  ixyz = (int)(sqrt(1.0 / w[0]) * cutoff + 1);
  free(work);
  work = NULL;
  return ixyz;
}


x86 assembly (clang, -O0):
<get_ixyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movl   $0x3,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    126d <get_ixyz+0x10d>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    125a <get_ixyz+0xfa>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a1 <get_ixyz+0x41>
jmp    125f <get_ixyz+0xff>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1190 <get_ixyz+0x30>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    12dd <get_ixyz+0x17d>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    12ca <get_ixyz+0x16a>
movslq -0x18(%rbp),%rcx
lea    -0x100(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
imul   $0x3,-0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cltq
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1285 <get_ixyz+0x125>
jmp    12cf <get_ixyz+0x16f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1274 <get_ixyz+0x114>
lea    -0xb0(%rbp),%rcx
lea    -0x60(%rbp),%r9
lea    0xd19(%rip),%rdi
lea    0xd14(%rip),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%r8
lea    -0x40(%rbp),%r11
lea    -0x2c(%rbp),%r10
lea    -0x28(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1080 <dsyev_@plt>
cvttsd2si -0x40(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x38(%rbp)
lea    -0xb0(%rbp),%rcx
lea    -0x60(%rbp),%r9
mov    -0x38(%rbp),%r11
lea    0xcba(%rip),%rdi
lea    0xcb5(%rip),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%r8
lea    -0x2c(%rbp),%r10
lea    -0x28(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1080 <dsyev_@plt>
cmpl   $0x0,-0x28(%rbp)
jle    13a1 <get_ixyz+0x241>
mov    0x2c57(%rip),%rax
mov    (%rax),%edi
lea    0xc7a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
movsd  0xc57(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc3c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ixyz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movsd  %xmm0,0x10(%rsp)
movl   $0x3,0xc(%rsp)
movl   $0x3,0x8(%rsp)
movl   $0xffffffff,(%rsp)
movsd  (%rdi),%xmm7
movsd  0x8(%rdi),%xmm6
movsd  0x10(%rdi),%xmm8
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
movsd  0x20(%rdi),%xmm4
movapd %xmm6,%xmm1
unpcklpd %xmm4,%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm7,%xmm0
unpcklpd %xmm7,%xmm0
movsd  0x18(%rdi),%xmm3
movapd %xmm7,%xmm5
unpcklpd %xmm3,%xmm5
mulpd  %xmm0,%xmm5
addpd  %xmm1,%xmm5
movapd %xmm8,%xmm0
unpcklpd %xmm8,%xmm0
movsd  0x28(%rdi),%xmm1
movapd %xmm8,%xmm2
unpcklpd %xmm1,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm5,%xmm2
movsd  0x30(%rdi),%xmm5
movsd  0x38(%rdi),%xmm0
mulsd  %xmm0,%xmm6
mulsd  %xmm5,%xmm7
addsd  %xmm6,%xmm7
movsd  0x40(%rdi),%xmm6
mulsd  %xmm6,%xmm8
addsd  %xmm7,%xmm8
movapd %xmm4,%xmm7
unpcklpd %xmm4,%xmm7
unpcklpd %xmm0,%xmm4
mulpd  %xmm7,%xmm4
movapd %xmm3,%xmm7
unpcklpd %xmm3,%xmm7
unpcklpd %xmm5,%xmm3
mulpd  %xmm7,%xmm3
addpd  %xmm4,%xmm3
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
unpcklpd %xmm6,%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm3,%xmm1
mulsd  %xmm0,%xmm0
mulsd  %xmm5,%xmm5
addsd  %xmm0,%xmm5
mulsd  %xmm6,%xmm6
addsd  %xmm5,%xmm6
movapd %xmm2,0x40(%rsp)
movsd  %xmm8,0x50(%rsp)
movhpd %xmm2,0x58(%rsp)
movapd %xmm1,0x60(%rsp)
movsd  %xmm8,0x70(%rsp)
movhpd %xmm1,0x78(%rsp)
movsd  %xmm6,0x80(%rsp)
sub    $0x8,%rsp
lea    0xc(%rsp),%rax
lea    0x8(%rsp),%rbx
lea    0x20(%rsp),%r10
lea    0xd5b(%rip),%r14
lea    0xd56(%rip),%r15
lea    0x14(%rsp),%r12
lea    0x48(%rsp),%r13
lea    0x10(%rsp),%rbp
lea    0x28(%rsp),%r9
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
push   %rax
push   %rbx
push   %r10
call   1080 <dsyev_@plt>
add    $0x20,%rsp
cvttsd2si 0x18(%rsp),%edi
mov    %edi,(%rsp)
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
lea    0x28(%rsp),%r9
lea    0xc(%rsp),%rax
push   %rax
lea    0x10(%rsp),%rax
push   %rax
push   %rbx
call   1080 <dsyev_@plt>
add    $0x20,%rsp
cmpl   $0x0,0x4(%rsp)
jg     1382 <get_ixyz+0x222>
movsd  0xccb(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     134b <get_ixyz+0x1eb>
sqrtsd %xmm0,%xmm0
jmp    1350 <get_ixyz+0x1f0>
call   1060 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xc9e(%rip),%xmm0
cvttsd2si %xmm0,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c57(%rip),%rax
mov    (%rax),%edi
lea    0xc7a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"V\00"
@.str.1 = [2 x i8] c"U\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"Error: DSYEV ixyz\00"
define i32 @get_ixyz([3 x double]* %0, double %1) {
%3 = alloca [3 x double]*
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double
%14 = alloca [3 x double]
%15 = alloca [9 x double]
%16 = alloca [3 x [3 x double]]
store [3 x double]* %0, [3 x double]** %3
store double %1, double* %4
store i32 3, i32* %8
store i32 3, i32* %9
store i32 -1, i32* %11
store i32 0, i32* %5
br label %17
17: ; preds = %74, %2
%18 = load i32, i32* %5
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %77
20: ; preds = %17
store i32 0, i32* %6
br label %21
21: ; preds = %70, %20
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 3
br i1 %23, label %24, label %73
24: ; preds = %21
%25 = load [3 x double]*, [3 x double]** %3
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 %27
%29 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 0
%30 = load double, double* %29
%31 = load [3 x double]*, [3 x double]** %3
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 %33
%35 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 0, i64 0
%36 = load double, double* %35
%37 = load [3 x double]*, [3 x double]** %3
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [3 x double], [3 x double]* %37, i64 %39
%41 = getelementptr inbounds [3 x double], [3 x double]* %40, i64 0, i64 1
%42 = load double, double* %41
%43 = load [3 x double]*, [3 x double]** %3
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 %45
%47 = getelementptr inbounds [3 x double], [3 x double]* %46, i64 0, i64 1
%48 = load double, double* %47
%49 = fmul double %42, %48
%50 = call double @llvm.fmuladd.f64(double %30, double %36, double %49)
%51 = load [3 x double]*, [3 x double]** %3
%52 = load i32, i32* %5
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 %53
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 0, i64 2
%56 = load double, double* %55
%57 = load [3 x double]*, [3 x double]** %3
%58 = load i32, i32* %6
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [3 x double], [3 x double]* %57, i64 %59
%61 = getelementptr inbounds [3 x double], [3 x double]* %60, i64 0, i64 2
%62 = load double, double* %61
%63 = call double @llvm.fmuladd.f64(double %56, double %62, double %50)
%64 = load i32, i32* %5
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %65
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 %68
store double %63, double* %69
br label %70
70: ; preds = %24
%71 = load i32, i32* %6
%72 = add nsw i32 %71, 1
store i32 %72, i32* %6
br label %21
73: ; preds = %21
br label %74
74: ; preds = %73
%75 = load i32, i32* %5
%76 = add nsw i32 %75, 1
store i32 %76, i32* %5
br label %17
77: ; preds = %17
store i32 0, i32* %5
br label %78
78: ; preds = %103, %77
%79 = load i32, i32* %5
%80 = icmp slt i32 %79, 3
br i1 %80, label %81, label %106
81: ; preds = %78
store i32 0, i32* %6
br label %82
82: ; preds = %99, %81
%83 = load i32, i32* %6
%84 = icmp slt i32 %83, 3
br i1 %84, label %85, label %102
85: ; preds = %82
%86 = load i32, i32* %6
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %87
%89 = load i32, i32* %5
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 %90
%92 = load double, double* %91
%93 = load i32, i32* %5
%94 = mul nsw i32 %93, 3
%95 = load i32, i32* %6
%96 = add nsw i32 %94, %95
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [9 x double], [9 x double]* %15, i64 0, i64 %97
store double %92, double* %98
br label %99
99: ; preds = %85
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
store i32 %101, i32* %6
br label %82
102: ; preds = %82
br label %103
103: ; preds = %102
%104 = load i32, i32* %5
%105 = add nsw i32 %104, 1
store i32 %105, i32* %5
br label %78
106: ; preds = %78
%107 = getelementptr inbounds [9 x double], [9 x double]* %15, i64 0, i64 0
%108 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%109 = call i32 @dsyev_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %8, double* %107, i32* %9, double* %108, double* %13, i32* %11, i32* %10)
%110 = load double, double* %13
%111 = fptosi double %110 to i32
store i32 %111, i32* %11
%112 = load i32, i32* %11
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 8
%115 = trunc i64 %114 to i32
%116 = call i64 @malloc(i32 %115)
%117 = inttoptr i64 %116 to double*
store double* %117, double** %12
%118 = getelementptr inbounds [9 x double], [9 x double]* %15, i64 0, i64 0
%119 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%120 = load double*, double** %12
%121 = call i32 @dsyev_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %8, double* %118, i32* %9, double* %119, double* %120, i32* %11, i32* %10)
%122 = load i32, i32* %10
%123 = icmp sgt i32 %122, 0
br i1 %123, label %124, label %128
124: ; preds = %106
%125 = load i32, i32* @stderr
%126 = call i32 @fprintf(i32 %125, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%127 = call i32 @exit(i32 1)
unreachable
128: ; preds = %106
%129 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%130 = load double, double* %129
%131 = fdiv double 1.000000e+00, %130
%132 = call double @sqrt(double %131)
%133 = load double, double* %4
%134 = call double @llvm.fmuladd.f64(double %132, double %133, double 1.000000e+00)
%135 = fptosi double %134 to i32
store i32 %135, i32* %7
%136 = load double*, double** %12
%137 = call i32 @free(double* %136)
store double* null, double** %12
%138 = load i32, i32* %7
ret i32 %138
}

LLVM IR (-O2):
@.str = [2 x i8] c"V\00"
@.str.1 = [2 x i8] c"U\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"Error: DSYEV ixyz\00"
define i32 @get_ixyz([3 x double]* nocapture %0, double %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca [3 x double]
%9 = alloca [9 x double]
%10 = bitcast i32* %3 to i8*
store i32 3, i32* %3
%11 = bitcast i32* %4 to i8*
store i32 3, i32* %4
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast double* %7 to i8*
%15 = bitcast [3 x double]* %8 to i8*
%16 = bitcast [9 x double]* %9 to i8*
store i32 -1, i32* %6
%17 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%18 = load double, double* %17
%19 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%20 = load double, double* %19
%21 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%22 = load double, double* %21
%23 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%24 = load double, double* %23
%25 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%26 = load double, double* %25
%27 = insertelement <2 x double> poison, double %20, i64 0
%28 = shufflevector <2 x double> %27, <2 x double> poison, <2 x i32> zeroinitializer
%29 = insertelement <2 x double> %27, double %26, i64 1
%30 = fmul <2 x double> %28, %29
%31 = insertelement <2 x double> poison, double %18, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = insertelement <2 x double> %31, double %24, i64 1
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %32, <2 x double> %33, <2 x double> %30)
%35 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%36 = load double, double* %35
%37 = insertelement <2 x double> poison, double %22, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = insertelement <2 x double> %37, double %36, i64 1
%40 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> %39, <2 x double> %34)
%41 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%42 = load double, double* %41
%43 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%44 = load double, double* %43
%45 = fmul double %20, %44
%46 = tail call double @llvm.fmuladd.f64(double %18, double %42, double %45)
%47 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%48 = load double, double* %47
%49 = tail call double @llvm.fmuladd.f64(double %22, double %48, double %46)
%50 = insertelement <2 x double> poison, double %26, i64 0
%51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
%52 = insertelement <2 x double> %50, double %44, i64 1
%53 = fmul <2 x double> %51, %52
%54 = insertelement <2 x double> poison, double %24, i64 0
%55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
%56 = insertelement <2 x double> %54, double %42, i64 1
%57 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %55, <2 x double> %56, <2 x double> %53)
%58 = insertelement <2 x double> poison, double %36, i64 0
%59 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> zeroinitializer
%60 = insertelement <2 x double> %58, double %48, i64 1
%61 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %59, <2 x double> %60, <2 x double> %57)
%62 = fmul double %44, %44
%63 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %62)
%64 = tail call double @llvm.fmuladd.f64(double %48, double %48, double %63)
%65 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%66 = bitcast [9 x double]* %9 to <2 x double>*
store <2 x double> %40, <2 x double>* %66
%67 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 2
store double %49, double* %67
%68 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 3
%69 = extractelement <2 x double> %40, i64 1
store double %69, double* %68
%70 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 4
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> %61, <2 x double>* %71
%72 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 6
store double %49, double* %72
%73 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 7
%74 = extractelement <2 x double> %61, i64 1
store double %74, double* %73
%75 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 8
store double %64, double* %75
%76 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%77 = call i32 @dsyev_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %3, double* %65, i32* %4, double* %76, double* %7, i32* %6, i32* %5)
%78 = load double, double* %7
%79 = fptosi double %78 to i32
store i32 %79, i32* %6
%80 = shl i32 %79, 3
%81 = call i64 @malloc(i32 %80)
%82 = inttoptr i64 %81 to double*
%83 = call i32 @dsyev_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %3, double* %65, i32* %4, double* %76, double* %82, i32* %6, i32* %5)
%84 = load i32, i32* %5
%85 = icmp sgt i32 %84, 0
br i1 %85, label %86, label %90
86: ; preds = %2
%87 = load i32, i32* @stderr
%88 = call i32 @fprintf(i32 %87, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %2
%91 = load double, double* %76
%92 = fdiv double 1.000000e+00, %91
%93 = call double @sqrt(double %92)
%94 = call double @llvm.fmuladd.f64(double %93, double %1, double 1.000000e+00)
%95 = fptosi double %94 to i32
%96 = call i32 @free(double* %82)
ret i32 %95
}