int vibrationalp(int n, double E[n]) {
  int m, i, j, k, lixo, l;
  double worka, workb, workc, workd, worke;
  double sumx, sumy, sumy2, sumxy, sumx2, p, sum2x, sum2y, R, Xm, Ym, a, b;
  double F, B, deltE[n - 1], We, WeXe;
  F = 4.3597482E-18;
  B = 1.9864748E-25;
  m = n - 1;
  sumx = 0;
  sumy = 0;
  sumx2 = 0;
  sumy2 = 0;
  sumxy = 0;
  for (i = 0; i < n; i++) {
    E[i] = (E[i] * F) / B;
  }
  for (k = 0; k < n - 1; k++) {
    deltE[k] = E[k + 1] - E[k];
    deltE[k] = deltE[k] / 100;
    sumx = sumx + k;
    sumx2 = sumx2 + (k * k);
    sumxy = sumxy + (deltE[k] * k);
    sumy = sumy + deltE[k];
    sumy2 = sumy2 + (deltE[k] * deltE[k]);
  }
  Xm = sumx / m;
  Ym = sumy / m;
  sum2x = sumx * sumx;
  sum2y = sumy * sumy;
  worka = sqrt((m * sumx2) - sum2x);
  workb = sqrt((m * sumy2) - sum2y);
  workc = ((m * sumxy) - ((sumx) * (sumy)));
  R = workc / ((worka) * (workb));
  workd = (m * sumxy) - (sumx * sumy);
  worke = (m * sumx2) - sum2x;
  a = workd / worke;
  b = Ym - (a * Xm);
  WeXe = ((-1) * (a)) / 2;
  We = (2 * WeXe) + b;
  printf("\n------------------------------ \n");
  printf("    Vibrational Analysis   \n   Morse Potential Parametrization \n");
  printf("------------------------------\n\n");
  printf("eigenstates included: %d \n\n", n);
  printf("Linear Correlation Coefficient: %lf \n", R);
  printf("Regression Line: Y = %lf*X + %lf \n", a, b);
  printf("Vibrational Parameters: \n We= %lf \n WeXe= %lf \n\n", We, WeXe);
  return 0;
}


x86 assembly (clang, -O0):
<vibrationalp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%rcx
mov    %rcx,-0xd0(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd8(%rbp)
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1201 <vibrationalp+0xe1>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
divsd  -0xc8(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11bd <vibrationalp+0x9d>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12f7 <vibrationalp+0x1d7>
mov    -0xf0(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm0
mov    -0x10(%rbp),%rcx
movslq -0x20(%rbp),%rdx
subsd  (%rcx,%rdx,8),%xmm0
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xdc7(%rip),%xmm1
divsd  %xmm1,%xmm0
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%ecx
imul   -0x20(%rbp),%ecx
cvtsi2sd %ecx,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm1
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
movslq -0x20(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm1
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1208 <vibrationalp+0xe8>
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xb41(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  0xb29(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
lea    0xb0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xb65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x98(%rbp),%xmm0
ff
lea    0xb6b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
lea    0xb73(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm1
ff
lea    0xb78(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0xd0(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vibrationalp>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %edi,%r14d
lea    -0x1(%r14),%r8d
xorpd  %xmm7,%xmm7
xorpd  %xmm8,%xmm8
test   %edi,%edi
jle    115b <vibrationalp+0x2b>
mov    %r14d,%ecx
cmp    $0x1,%r14d
jne    1168 <vibrationalp+0x38>
xor    %edx,%edx
jmp    11f4 <vibrationalp+0xc4>
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
jmp    12bf <vibrationalp+0x18f>
mov    %ecx,%edx
and    $0xfffffffe,%edx
lea    -0x2(%rdx),%rax
mov    %rax,%rbx
shr    %rbx
add    $0x1,%rbx
test   %rax,%rax
je     1478 <vibrationalp+0x348>
mov    %rbx,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %eax,%eax
movapd 0xe6b(%rip),%xmm1
movapd 0xe73(%rip),%xmm2
nopl   (%rax)
movupd (%rsi,%rax,8),%xmm3
movupd 0x10(%rsi,%rax,8),%xmm4
mulpd  %xmm1,%xmm3
divpd  %xmm2,%xmm3
movupd %xmm3,(%rsi,%rax,8)
mulpd  %xmm1,%xmm4
divpd  %xmm2,%xmm4
movupd %xmm4,0x10(%rsi,%rax,8)
add    $0x4,%rax
add    $0xfffffffffffffffe,%rdi
jne    11a0 <vibrationalp+0x70>
test   $0x1,%bl
je     11ef <vibrationalp+0xbf>
movupd (%rsi,%rax,8),%xmm1
mulpd  0xe1e(%rip),%xmm1
divpd  0xe26(%rip),%xmm1
movupd %xmm1,(%rsi,%rax,8)
cmp    %rcx,%rdx
je     122b <vibrationalp+0xfb>
movsd  0xe24(%rip),%xmm1
movsd  0xe24(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsi,%rdx,8),%xmm3
mulsd  %xmm1,%xmm3
divsd  %xmm2,%xmm3
movsd  %xmm3,(%rsi,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1210 <vibrationalp+0xe0>
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmp    $0x2,%r14d
jl     12bf <vibrationalp+0x18f>
mov    %r8d,%ecx
movsd  (%rsi),%xmm4
xorpd  %xmm5,%xmm5
xorpd  %xmm1,%xmm1
xor    %eax,%eax
movsd  0xdda(%rip),%xmm0
xorpd  %xmm2,%xmm2
nopw   0x0(%rax,%rax,1)
movapd %xmm5,%xmm3
lea    0x1(%rax),%rdx
movsd  0x8(%rsi,%rax,8),%xmm6
movapd %xmm6,%xmm7
subsd  %xmm4,%xmm7
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
divsd  %xmm0,%xmm7
imul   %eax,%eax
xorps  %xmm5,%xmm5
cvtsi2sd %eax,%xmm5
addsd  %xmm5,%xmm1
movapd %xmm7,%xmm5
unpcklpd %xmm4,%xmm5
addpd  %xmm5,%xmm2
unpcklpd %xmm7,%xmm4
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
movapd %xmm7,%xmm5
addpd  %xmm3,%xmm5
movapd %xmm6,%xmm4
mov    %rdx,%rax
cmp    %rdx,%rcx
jne    1260 <vibrationalp+0x130>
addpd  %xmm3,%xmm7
xorps  %xmm6,%xmm6
cvtsi2sd %r8d,%xmm6
movapd %xmm2,%xmm5
unpckhpd %xmm2,%xmm5
movapd %xmm2,%xmm0
mulpd  %xmm5,%xmm0
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
movapd %xmm7,%xmm4
unpcklpd %xmm1,%xmm4
mulpd  %xmm3,%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,0x40(%rsp)
unpckhpd %xmm4,%xmm4
ucomisd %xmm8,%xmm4
movapd %xmm4,0x30(%rsp)
jb     130f <vibrationalp+0x1df>
xorps  %xmm3,%xmm3
sqrtsd %xmm4,%xmm3
jmp    134a <vibrationalp+0x21a>
movapd %xmm4,%xmm0
movapd %xmm7,0x20(%rsp)
movapd %xmm2,(%rsp)
movapd %xmm5,0x10(%rsp)
movapd %xmm6,0x50(%rsp)
call   1050 <sqrt@plt>
movapd 0x50(%rsp),%xmm6
movapd 0x10(%rsp),%xmm5
movapd (%rsp),%xmm2
movapd 0x20(%rsp),%xmm7
movapd %xmm0,%xmm3
divsd  %xmm6,%xmm5
movapd %xmm2,%xmm0
divsd  %xmm6,%xmm0
movapd %xmm0,0x20(%rsp)
mulsd  %xmm2,%xmm2
unpckhpd %xmm7,%xmm7
mulsd  %xmm6,%xmm7
subsd  %xmm2,%xmm7
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm7
jb     137f <vibrationalp+0x24f>
xorps  %xmm0,%xmm0
sqrtsd %xmm7,%xmm0
jmp    139e <vibrationalp+0x26e>
movapd %xmm7,%xmm0
movapd %xmm5,0x10(%rsp)
movsd  %xmm3,(%rsp)
call   1050 <sqrt@plt>
movsd  (%rsp),%xmm3
movapd 0x10(%rsp),%xmm5
mulsd  %xmm0,%xmm3
movapd 0x40(%rsp),%xmm1
movapd %xmm1,%xmm0
divsd  %xmm3,%xmm0
movapd %xmm0,(%rsp)
divsd  0x30(%rsp),%xmm1
movapd %xmm1,0x40(%rsp)
mulsd  %xmm1,%xmm5
movapd 0x20(%rsp),%xmm2
subsd  %xmm5,%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0xc5b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0xcda(%rip),%rdi
call   1030 <puts@plt>
lea    0xcef(%rip),%rdi
call   1030 <puts@plt>
lea    0xd23(%rip),%rdi
call   1030 <puts@plt>
lea    0xc20(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc2b(%rip),%rdi
movaps (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xc3f(%rip),%rdi
movaps 0x40(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xc4a(%rip),%rdi
movsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
test   $0x1,%bl
jne    11d5 <vibrationalp+0xa5>
jmp    11ef <vibrationalp+0xbf>

LLVM IR (-O0):
@.str = [34 x i8] c"\0A------------------------------ \0A\00"
@.str.1 = [65 x i8] c" Vibrational Analysis \0A Morse Potential Parametrization \0A\00"
@.str.2 = [33 x i8] c"------------------------------\0A\0A\00"
@.str.3 = [28 x i8] c"eigenstates included: %d \0A\0A\00"
@.str.4 = [38 x i8] c"Linear Correlation Coefficient: %lf \0A\00"
@.str.5 = [35 x i8] c"Regression Line: Y = %lf*X + %lf \0A\00"
@.str.6 = [49 x i8] c"Vibrational Parameters: \0A We= %lf \0A WeXe= %lf \0A\0A\00"
define i32 @vibrationalp(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca i8*
%32 = alloca i64
%33 = alloca double
%34 = alloca double
store i32 %0, i32* %3
store double* %1, double** %4
%35 = load i32, i32* %3
%36 = zext i32 %35 to i64
%37 = load i32, i32* %3
%38 = sub nsw i32 %37, 1
%39 = zext i32 %38 to i64
%40 = call i8* @llvm.stacksave()
store i8* %40, i8** %31
%41 = alloca double, i64 %39
store i64 %39, i64* %32
store double 0x3C541B150A9FB7C5, double* %29
store double 0x3ACEBD3CC72E0FE4, double* %30
%42 = load i32, i32* %3
%43 = sub nsw i32 %42, 1
store i32 %43, i32* %5
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store i32 0, i32* %6
br label %44
44: ; preds = %62, %2
%45 = load i32, i32* %6
%46 = load i32, i32* %3
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %65
48: ; preds = %44
%49 = load double*, double** %4
%50 = load i32, i32* %6
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
%53 = load double, double* %52
%54 = load double, double* %29
%55 = fmul double %53, %54
%56 = load double, double* %30
%57 = fdiv double %55, %56
%58 = load double*, double** %4
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
store double %57, double* %61
br label %62
62: ; preds = %48
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %44
65: ; preds = %44
store i32 0, i32* %8
br label %66
66: ; preds = %129, %65
%67 = load i32, i32* %8
%68 = load i32, i32* %3
%69 = sub nsw i32 %68, 1
%70 = icmp slt i32 %67, %69
br i1 %70, label %71, label %132
71: ; preds = %66
%72 = load double*, double** %4
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %72, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %4
%79 = load i32, i32* %8
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = fsub double %77, %82
%84 = load i32, i32* %8
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %41, i64 %85
store double %83, double* %86
%87 = load i32, i32* %8
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %41, i64 %88
%90 = load double, double* %89
%91 = fdiv double %90, 1.000000e+02
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %41, i64 %93
store double %91, double* %94
%95 = load double, double* %16
%96 = load i32, i32* %8
%97 = sitofp i32 %96 to double
%98 = fadd double %95, %97
store double %98, double* %16
%99 = load double, double* %20
%100 = load i32, i32* %8
%101 = load i32, i32* %8
%102 = mul nsw i32 %100, %101
%103 = sitofp i32 %102 to double
%104 = fadd double %99, %103
store double %104, double* %20
%105 = load double, double* %19
%106 = load i32, i32* %8
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %41, i64 %107
%109 = load double, double* %108
%110 = load i32, i32* %8
%111 = sitofp i32 %110 to double
%112 = call double @llvm.fmuladd.f64(double %109, double %111, double %105)
store double %112, double* %19
%113 = load double, double* %17
%114 = load i32, i32* %8
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %41, i64 %115
%117 = load double, double* %116
%118 = fadd double %113, %117
store double %118, double* %17
%119 = load double, double* %18
%120 = load i32, i32* %8
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %41, i64 %121
%123 = load double, double* %122
%124 = load i32, i32* %8
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %41, i64 %125
%127 = load double, double* %126
%128 = call double @llvm.fmuladd.f64(double %123, double %127, double %119)
store double %128, double* %18
br label %129
129: ; preds = %71
%130 = load i32, i32* %8
%131 = add nsw i32 %130, 1
store i32 %131, i32* %8
br label %66
132: ; preds = %66
%133 = load double, double* %16
%134 = load i32, i32* %5
%135 = sitofp i32 %134 to double
%136 = fdiv double %133, %135
store double %136, double* %25
%137 = load double, double* %17
%138 = load i32, i32* %5
%139 = sitofp i32 %138 to double
%140 = fdiv double %137, %139
store double %140, double* %26
%141 = load double, double* %16
%142 = load double, double* %16
%143 = fmul double %141, %142
store double %143, double* %22
%144 = load double, double* %17
%145 = load double, double* %17
%146 = fmul double %144, %145
store double %146, double* %23
%147 = load i32, i32* %5
%148 = sitofp i32 %147 to double
%149 = load double, double* %20
%150 = load double, double* %22
%151 = fneg double %150
%152 = call double @llvm.fmuladd.f64(double %148, double %149, double %151)
%153 = call double @sqrt(double %152)
store double %153, double* %11
%154 = load i32, i32* %5
%155 = sitofp i32 %154 to double
%156 = load double, double* %18
%157 = load double, double* %23
%158 = fneg double %157
%159 = call double @llvm.fmuladd.f64(double %155, double %156, double %158)
%160 = call double @sqrt(double %159)
store double %160, double* %12
%161 = load i32, i32* %5
%162 = sitofp i32 %161 to double
%163 = load double, double* %19
%164 = load double, double* %16
%165 = load double, double* %17
%166 = fmul double %164, %165
%167 = fneg double %166
%168 = call double @llvm.fmuladd.f64(double %162, double %163, double %167)
store double %168, double* %13
%169 = load double, double* %13
%170 = load double, double* %11
%171 = load double, double* %12
%172 = fmul double %170, %171
%173 = fdiv double %169, %172
store double %173, double* %24
%174 = load i32, i32* %5
%175 = sitofp i32 %174 to double
%176 = load double, double* %19
%177 = load double, double* %16
%178 = load double, double* %17
%179 = fmul double %177, %178
%180 = fneg double %179
%181 = call double @llvm.fmuladd.f64(double %175, double %176, double %180)
store double %181, double* %14
%182 = load i32, i32* %5
%183 = sitofp i32 %182 to double
%184 = load double, double* %20
%185 = load double, double* %22
%186 = fneg double %185
%187 = call double @llvm.fmuladd.f64(double %183, double %184, double %186)
store double %187, double* %15
%188 = load double, double* %14
%189 = load double, double* %15
%190 = fdiv double %188, %189
store double %190, double* %27
%191 = load double, double* %26
%192 = load double, double* %27
%193 = load double, double* %25
%194 = fneg double %192
%195 = call double @llvm.fmuladd.f64(double %194, double %193, double %191)
store double %195, double* %28
%196 = load double, double* %27
%197 = fmul double -1.000000e+00, %196
%198 = fdiv double %197, 2.000000e+00
store double %198, double* %34
%199 = load double, double* %34
%200 = load double, double* %28
%201 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %199, double %200)
store double %201, double* %33
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%205 = load i32, i32* %3
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %205)
%207 = load double, double* %24
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), double %207)
%209 = load double, double* %27
%210 = load double, double* %28
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), double %209, double %210)
%212 = load double, double* %33
%213 = load double, double* %34
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), double %212, double %213)
%215 = load i8*, i8** %31
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [28 x i8] c"eigenstates included: %d \0A\0A\00"
@.str.4 = [38 x i8] c"Linear Correlation Coefficient: %lf \0A\00"
@.str.5 = [35 x i8] c"Regression Line: Y = %lf*X + %lf \0A\00"
@.str.6 = [49 x i8] c"Vibrational Parameters: \0A We= %lf \0A WeXe= %lf \0A\0A\00"
@str = [33 x i8] c"\0A------------------------------ \00"
@str.7 = [64 x i8] c" Vibrational Analysis \0A Morse Potential Parametrization \00"
@str.8 = [32 x i8] c"------------------------------\0A\00"
define i32 @vibrationalp(i32 %0, double* nocapture %1) {
%3 = add i32 %0, -1
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %89
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = icmp eq i32 %0, 1
br i1 %7, label %48, label %8
8: ; preds = %5
%9 = and i64 %6, 4294967294
%10 = add nsw i64 %9, -2
%11 = lshr exact i64 %10, 1
%12 = add nuw i64 %11, 1
%13 = and i64 %12, 1
%14 = icmp eq i64 %10, 0
br i1 %14, label %36, label %15
15: ; preds = %8
%16 = and i64 %12, -2
br label %17
17: ; preds = %17, %15
%18 = phi i64 [ 0, %15 ], [ %33, %17 ]
%19 = phi i64 [ 0, %15 ], [ %34, %17 ]
%20 = getelementptr inbounds double, double* %1, i64 %18
%21 = bitcast double* %20 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = fmul <2 x double> %22, <double 0x3C541B150A9FB7C5, double 0x3C541B150A9FB7C5>
%24 = fdiv <2 x double> %23, <double 0x3ACEBD3CC72E0FE4, double 0x3ACEBD3CC72E0FE4>
%25 = bitcast double* %20 to <2 x double>*
store <2 x double> %24, <2 x double>* %25
%26 = or i64 %18, 2
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = bitcast double* %27 to <2 x double>*
%29 = load <2 x double>, <2 x double>* %28
%30 = fmul <2 x double> %29, <double 0x3C541B150A9FB7C5, double 0x3C541B150A9FB7C5>
%31 = fdiv <2 x double> %30, <double 0x3ACEBD3CC72E0FE4, double 0x3ACEBD3CC72E0FE4>
%32 = bitcast double* %27 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
%33 = add nuw i64 %18, 4
%34 = add nuw i64 %19, 2
%35 = icmp eq i64 %34, %16
br i1 %35, label %36, label %17
36: ; preds = %17, %8
%37 = phi i64 [ 0, %8 ], [ %33, %17 ]
%38 = icmp eq i64 %13, 0
br i1 %38, label %46, label %39
39: ; preds = %36
%40 = getelementptr inbounds double, double* %1, i64 %37
%41 = bitcast double* %40 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = fmul <2 x double> %42, <double 0x3C541B150A9FB7C5, double 0x3C541B150A9FB7C5>
%44 = fdiv <2 x double> %43, <double 0x3ACEBD3CC72E0FE4, double 0x3ACEBD3CC72E0FE4>
%45 = bitcast double* %40 to <2 x double>*
store <2 x double> %44, <2 x double>* %45
br label %46
46: ; preds = %36, %39
%47 = icmp eq i64 %9, %6
br i1 %47, label %50, label %48
48: ; preds = %5, %46
%49 = phi i64 [ 0, %5 ], [ %9, %46 ]
br label %55
50: ; preds = %55, %46
%51 = icmp sgt i32 %0, 1
br i1 %51, label %52, label %89
52: ; preds = %50
%53 = zext i32 %3 to i64
%54 = load double, double* %1
br label %63
55: ; preds = %48, %55
%56 = phi i64 [ %61, %55 ], [ %49, %48 ]
%57 = getelementptr inbounds double, double* %1, i64 %56
%58 = load double, double* %57
%59 = fmul double %58, 0x3C541B150A9FB7C5
%60 = fdiv double %59, 0x3ACEBD3CC72E0FE4
store double %60, double* %57
%61 = add nuw nsw i64 %56, 1
%62 = icmp eq i64 %61, %6
br i1 %62, label %50, label %55
63: ; preds = %52, %63
%64 = phi double [ %54, %52 ], [ %71, %63 ]
%65 = phi i64 [ 0, %52 ], [ %69, %63 ]
%66 = phi double [ 0.000000e+00, %52 ], [ %78, %63 ]
%67 = phi <2 x double> [ zeroinitializer, %52 ], [ %85, %63 ]
%68 = phi <2 x double> [ zeroinitializer, %52 ], [ %81, %63 ]
%69 = add nuw nsw i64 %65, 1
%70 = getelementptr inbounds double, double* %1, i64 %69
%71 = load double, double* %70
%72 = fsub double %71, %64
%73 = fdiv double %72, 1.000000e+02
%74 = trunc i64 %65 to i32
%75 = sitofp i32 %74 to double
%76 = mul nsw i32 %74, %74
%77 = sitofp i32 %76 to double
%78 = fadd double %66, %77
%79 = insertelement <2 x double> poison, double %73, i64 0
%80 = insertelement <2 x double> %79, double %75, i64 1
%81 = fadd <2 x double> %68, %80
%82 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> zeroinitializer
%83 = insertelement <2 x double> poison, double %75, i64 0
%84 = insertelement <2 x double> %83, double %73, i64 1
%85 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %84, <2 x double> %67)
%86 = icmp eq i64 %69, %53
br i1 %86, label %87, label %63
87: ; preds = %63
%88 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %84, <2 x double> %67)
br label %89
89: ; preds = %87, %2, %50
%90 = phi double [ 0.000000e+00, %50 ], [ 0.000000e+00, %2 ], [ %78, %87 ]
%91 = phi <2 x double> [ zeroinitializer, %50 ], [ zeroinitializer, %2 ], [ %88, %87 ]
%92 = phi <2 x double> [ zeroinitializer, %50 ], [ zeroinitializer, %2 ], [ %81, %87 ]
%93 = sitofp i32 %3 to double
%94 = extractelement <2 x double> %92, i64 1
%95 = fdiv double %94, %93
%96 = extractelement <2 x double> %92, i64 0
%97 = fdiv double %96, %93
%98 = fneg double %94
%99 = insertelement <2 x double> poison, double %98, i64 0
%100 = shufflevector <2 x double> %99, <2 x double> poison, <2 x i32> zeroinitializer
%101 = fmul <2 x double> %92, %100
%102 = insertelement <2 x double> poison, double %93, i64 0
%103 = shufflevector <2 x double> %102, <2 x double> poison, <2 x i32> zeroinitializer
%104 = insertelement <2 x double> %91, double %90, i64 1
%105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %103, <2 x double> %104, <2 x double> %101)
%106 = extractelement <2 x double> %105, i64 1
%107 = tail call double @sqrt(double %106)
%108 = fneg double %96
%109 = fmul double %96, %108
%110 = extractelement <2 x double> %91, i64 1
%111 = tail call double @llvm.fmuladd.f64(double %93, double %110, double %109)
%112 = tail call double @sqrt(double %111)
%113 = fmul double %107, %112
%114 = extractelement <2 x double> %105, i64 0
%115 = fdiv double %114, %113
%116 = fdiv double %114, %106
%117 = fneg double %116
%118 = tail call double @llvm.fmuladd.f64(double %117, double %95, double %97)
%119 = fmul double %116, -5.000000e-01
%120 = tail call double @llvm.fmuladd.f64(double %119, double 2.000000e+00, double %118)
%121 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%122 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.7, i64 0, i64 0))
%123 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.8, i64 0, i64 0))
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %0)
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), double %115)
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), double %116, double %118)
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), double %120, double %119)
ret i32 0
}