#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 fabs(double);
int /*<<< orphan*/ matrixToHessenbergForm_Givens_double(double *);
int /*<<< orphan*/ performQRStep_Givens_double(double *, int);
void QRAlgorithm_double(double *A, double *eigenvalues) {
  double mu;
  int k;
  int m = 2;
  int mMapping[3] = {0, 4, 8};
  double B[9];
  for (k = 0; k < 9; k++) {
    B[k] = A[k];
  }
  matrixToHessenbergForm_Givens_double(B);
  while (m > 0) {
    mu = B[mMapping[m]];
    for (k = 0; k <= m; k++) {
      B[mMapping[k]] -= mu;
    }
    performQRStep_Givens_double(B, m);
    for (k = 0; k <= m; k++) {
      B[mMapping[k]] += mu;
    }
    if (fabs(B[mMapping[m] - 1]) < (1e-10)) {
      eigenvalues[m] = B[mMapping[m]];
      m--;
    }
  }
  eigenvalues[0] = B[0];
  if (eigenvalues[0] > eigenvalues[1]) {
    mu = eigenvalues[1];
    eigenvalues[1] = eigenvalues[0];
    eigenvalues[0] = mu;
  }
  if (eigenvalues[1] > eigenvalues[2]) {
    mu = eigenvalues[2];
    eigenvalues[2] = eigenvalues[1];
    eigenvalues[1] = mu;
  }
  if (eigenvalues[0] > eigenvalues[1]) {
    mu = eigenvalues[1];
    eigenvalues[1] = eigenvalues[0];
    eigenvalues[0] = mu;
  }
}


x86 assembly (clang, -O0):
<QRAlgorithm_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x9,-0x1c(%rbp)
jge    1194 <QRAlgorithm_double+0x64>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1165 <QRAlgorithm_double+0x35>
lea    -0x80(%rbp),%rdi
call   1030 <matrixToHessenbergForm_Givens_double@plt>
cmpl   $0x0,-0x20(%rbp)
jle    1299 <QRAlgorithm_double+0x169>
movslq -0x20(%rbp),%rax
movslq -0x2c(%rbp,%rax,4),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11fa <QRAlgorithm_double+0xca>
movsd  -0x18(%rbp),%xmm1
movslq -0x1c(%rbp),%rax
movslq -0x2c(%rbp,%rax,4),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11c2 <QRAlgorithm_double+0x92>
lea    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1040 <performQRStep_Givens_double@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     1241 <QRAlgorithm_double+0x111>
movsd  -0x18(%rbp),%xmm0
movslq -0x1c(%rbp),%rax
movslq -0x2c(%rbp,%rax,4),%rax
addsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    120d <QRAlgorithm_double+0xdd>
movslq -0x20(%rbp),%rax
mov    -0x2c(%rbp,%rax,4),%eax
sub    $0x1,%eax
cltq
movsd  -0x80(%rbp,%rax,8),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xd9b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1294 <QRAlgorithm_double+0x164>
movslq -0x20(%rbp),%rax
movslq -0x2c(%rbp,%rax,4),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    119d <QRAlgorithm_double+0x6d>
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    12e9 <QRAlgorithm_double+0x1b9>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x10(%rax),%xmm0
jbe    132f <QRAlgorithm_double+0x1ff>
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    1372 <QRAlgorithm_double+0x242>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QRAlgorithm_double>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,(%rsp)
mov    0x40(%rdi),%rax
mov    %rax,0x50(%rsp)
movupd (%rdi),%xmm0
movupd 0x10(%rdi),%xmm1
movups 0x20(%rdi),%xmm2
movups 0x30(%rdi),%xmm3
movaps %xmm3,0x40(%rsp)
movaps %xmm2,0x30(%rsp)
movapd %xmm1,0x20(%rsp)
movapd %xmm0,0x10(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdi
call   1030 <matrixToHessenbergForm_Givens_double@plt>
mov    $0x2,%r12d
lea    0xe74(%rip),%rbx
jmp    11ad <QRAlgorithm_double+0x7d>
xchg   %ax,%ax
movsd  0x8(%rsp,%r13,8),%xmm0
call   1050 <fabs@plt>
test   %eax,%eax
jle    1290 <QRAlgorithm_double+0x160>
test   %r12d,%r12d
jle    12f7 <QRAlgorithm_double+0x1c7>
mov    %r12d,%ebp
movslq (%rbx,%rbp,4),%r13
movsd  0x10(%rsp,%r13,8),%xmm1
lea    0x1(%rbp),%r14
test   %r12d,%r12d
je     12b0 <QRAlgorithm_double+0x180>
mov    %r14d,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
movslq (%rbx,%rax,4),%rdx
movsd  0x10(%rsp,%rdx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp,%rdx,8)
movslq 0x4(%rbx,%rax,4),%rdx
movsd  0x10(%rsp,%rdx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp,%rdx,8)
add    $0x2,%rax
cmp    %rax,%rcx
jne    11d0 <QRAlgorithm_double+0xa0>
test   $0x1,%r14b
je     121c <QRAlgorithm_double+0xec>
movslq (%rbx,%rax,4),%rax
movsd  0x10(%rsp,%rax,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
movsd  %xmm1,0x8(%rsp)
mov    %r15,%rdi
mov    %r12d,%esi
call   1040 <performQRStep_Givens_double@plt>
test   %rbp,%rbp
je     12d0 <QRAlgorithm_double+0x1a0>
mov    %r14d,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
movsd  0x8(%rsp),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq (%rbx,%rax,4),%rdx
movsd  0x10(%rsp,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp,%rdx,8)
movslq 0x4(%rbx,%rax,4),%rdx
movsd  0x10(%rsp,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp,%rdx,8)
add    $0x2,%rax
cmp    %rax,%rcx
jne    1250 <QRAlgorithm_double+0x120>
test   $0x1,%r14b
je     1190 <QRAlgorithm_double+0x60>
jmp    12e2 <QRAlgorithm_double+0x1b2>
xchg   %ax,%ax
movsd  0x10(%rsp,%r13,8),%xmm0
mov    (%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
add    $0xffffffff,%r12d
test   %r12d,%r12d
jg     11ad <QRAlgorithm_double+0x7d>
jmp    12f7 <QRAlgorithm_double+0x1c7>
nop
xor    %eax,%eax
test   $0x1,%r14b
jne    1208 <QRAlgorithm_double+0xd8>
jmp    121c <QRAlgorithm_double+0xec>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
movsd  0x8(%rsp),%xmm1
test   $0x1,%r14b
je     1190 <QRAlgorithm_double+0x60>
movslq (%rbx,%rax,4),%rax
addsd  0x10(%rsp,%rax,8),%xmm1
movsd  %xmm1,0x10(%rsp,%rax,8)
jmp    1190 <QRAlgorithm_double+0x60>
movsd  0x10(%rsp),%xmm1
mov    (%rsp),%rax
movsd  %xmm1,(%rax)
movsd  0x8(%rax),%xmm2
ucomisd %xmm2,%xmm1
jbe    131f <QRAlgorithm_double+0x1ef>
movsd  %xmm1,0x8(%rax)
movsd  %xmm2,(%rax)
movapd %xmm2,%xmm0
jmp    1327 <QRAlgorithm_double+0x1f7>
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
movsd  0x10(%rax),%xmm2
ucomisd %xmm2,%xmm1
jbe    1344 <QRAlgorithm_double+0x214>
movsd  %xmm1,0x10(%rax)
movsd  %xmm2,0x8(%rax)
ucomisd %xmm2,%xmm0
ja     134e <QRAlgorithm_double+0x21e>
jmp    1357 <QRAlgorithm_double+0x227>
movapd %xmm1,%xmm2
ucomisd %xmm2,%xmm0
jbe    1357 <QRAlgorithm_double+0x227>
movsd  %xmm0,0x8(%rax)
movsd  %xmm2,(%rax)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.QRAlgorithm_double.mMapping = [3 x i32] [i32 0, i32 4, i32 8]
define void @QRAlgorithm_double(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca [3 x i32]
%9 = alloca [9 x double]
store double* %0, double** %3
store double* %1, double** %4
store i32 2, i32* %7
%10 = bitcast [3 x i32]* %8 to i8*
store i32 0, i32* %6
br label %11
11: ; preds = %23, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 9
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load double*, double** %3
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
%19 = load double, double* %18
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %21
store double %19, double* %22
br label %23
23: ; preds = %14
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %11
26: ; preds = %11
%27 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%28 = call i32 @matrixToHessenbergForm_Givens_double(double* %27)
br label %29
29: ; preds = %104, %26
%30 = load i32, i32* %7
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %105
32: ; preds = %29
%33 = load i32, i32* %7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %37
%39 = load double, double* %38
store double %39, double* %5
store i32 0, i32* %6
br label %40
40: ; preds = %54, %32
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp sle i32 %41, %42
br i1 %43, label %44, label %57
44: ; preds = %40
%45 = load double, double* %5
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %50
%52 = load double, double* %51
%53 = fsub double %52, %45
store double %53, double* %51
br label %54
54: ; preds = %44
%55 = load i32, i32* %6
%56 = add nsw i32 %55, 1
store i32 %56, i32* %6
br label %40
57: ; preds = %40
%58 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%59 = load i32, i32* %7
%60 = call i32 @performQRStep_Givens_double(double* %58, i32 %59)
store i32 0, i32* %6
br label %61
61: ; preds = %75, %57
%62 = load i32, i32* %6
%63 = load i32, i32* %7
%64 = icmp sle i32 %62, %63
br i1 %64, label %65, label %78
65: ; preds = %61
%66 = load double, double* %5
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %71
%73 = load double, double* %72
%74 = fadd double %73, %66
store double %74, double* %72
br label %75
75: ; preds = %65
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %61
78: ; preds = %61
%79 = load i32, i32* %7
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = sub nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %84
%86 = load double, double* %85
%87 = call i32 @fabs(double %86)
%88 = sitofp i32 %87 to double
%89 = fcmp olt double %88, 1.000000e-10
br i1 %89, label %90, label %104
90: ; preds = %78
%91 = load i32, i32* %7
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 %92
%94 = load i32, i32* %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %95
%97 = load double, double* %96
%98 = load double*, double** %4
%99 = load i32, i32* %7
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %98, i64 %100
store double %97, double* %101
%102 = load i32, i32* %7
%103 = add nsw i32 %102, -1
store i32 %103, i32* %7
br label %104
104: ; preds = %90, %78
br label %29
105: ; preds = %29
%106 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%107 = load double, double* %106
%108 = load double*, double** %4
%109 = getelementptr inbounds double, double* %108, i64 0
store double %107, double* %109
%110 = load double*, double** %4
%111 = getelementptr inbounds double, double* %110, i64 0
%112 = load double, double* %111
%113 = load double*, double** %4
%114 = getelementptr inbounds double, double* %113, i64 1
%115 = load double, double* %114
%116 = fcmp ogt double %112, %115
br i1 %116, label %117, label %129
117: ; preds = %105
%118 = load double*, double** %4
%119 = getelementptr inbounds double, double* %118, i64 1
%120 = load double, double* %119
store double %120, double* %5
%121 = load double*, double** %4
%122 = getelementptr inbounds double, double* %121, i64 0
%123 = load double, double* %122
%124 = load double*, double** %4
%125 = getelementptr inbounds double, double* %124, i64 1
store double %123, double* %125
%126 = load double, double* %5
%127 = load double*, double** %4
%128 = getelementptr inbounds double, double* %127, i64 0
store double %126, double* %128
br label %129
129: ; preds = %117, %105
%130 = load double*, double** %4
%131 = getelementptr inbounds double, double* %130, i64 1
%132 = load double, double* %131
%133 = load double*, double** %4
%134 = getelementptr inbounds double, double* %133, i64 2
%135 = load double, double* %134
%136 = fcmp ogt double %132, %135
br i1 %136, label %137, label %149
137: ; preds = %129
%138 = load double*, double** %4
%139 = getelementptr inbounds double, double* %138, i64 2
%140 = load double, double* %139
store double %140, double* %5
%141 = load double*, double** %4
%142 = getelementptr inbounds double, double* %141, i64 1
%143 = load double, double* %142
%144 = load double*, double** %4
%145 = getelementptr inbounds double, double* %144, i64 2
store double %143, double* %145
%146 = load double, double* %5
%147 = load double*, double** %4
%148 = getelementptr inbounds double, double* %147, i64 1
store double %146, double* %148
br label %149
149: ; preds = %137, %129
%150 = load double*, double** %4
%151 = getelementptr inbounds double, double* %150, i64 0
%152 = load double, double* %151
%153 = load double*, double** %4
%154 = getelementptr inbounds double, double* %153, i64 1
%155 = load double, double* %154
%156 = fcmp ogt double %152, %155
br i1 %156, label %157, label %169
157: ; preds = %149
%158 = load double*, double** %4
%159 = getelementptr inbounds double, double* %158, i64 1
%160 = load double, double* %159
store double %160, double* %5
%161 = load double*, double** %4
%162 = getelementptr inbounds double, double* %161, i64 0
%163 = load double, double* %162
%164 = load double*, double** %4
%165 = getelementptr inbounds double, double* %164, i64 1
store double %163, double* %165
%166 = load double, double* %5
%167 = load double*, double** %4
%168 = getelementptr inbounds double, double* %167, i64 0
store double %166, double* %168
br label %169
169: ; preds = %157, %149
ret void
}

LLVM IR (-O2):
@__const.QRAlgorithm_double.mMapping = [3 x i32] [i32 0, i32 4, i32 8]
define void @QRAlgorithm_double(double* nocapture %0, double* nocapture %1) {
%3 = bitcast double* %0 to i8*
%4 = alloca [9 x double]
%5 = bitcast [9 x double]* %4 to i8*
%6 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 0
%7 = call i32 @matrixToHessenbergForm_Givens_double(double* %6)
br label %8
8: ; preds = %98, %2
%9 = phi i32 [ 2, %2 ], [ %99, %98 ]
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %13
%15 = load double, double* %14
%16 = add nuw i32 %9, 1
%17 = zext i32 %16 to i64
%18 = add nsw i64 %17, -1
%19 = and i64 %17, 1
%20 = icmp eq i64 %18, 0
br i1 %20, label %42, label %21
21: ; preds = %8
%22 = and i64 %17, 4294967294
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %39, %23 ]
%25 = phi i64 [ 0, %21 ], [ %40, %23 ]
%26 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %24
%27 = load i32, i32* %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %28
%30 = load double, double* %29
%31 = fsub double %30, %15
store double %31, double* %29
%32 = or i64 %24, 1
%33 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %35
%37 = load double, double* %36
%38 = fsub double %37, %15
store double %38, double* %36
%39 = add nuw nsw i64 %24, 2
%40 = add i64 %25, 2
%41 = icmp eq i64 %40, %22
br i1 %41, label %42, label %23
42: ; preds = %23, %8
%43 = phi i64 [ 0, %8 ], [ %39, %23 ]
%44 = icmp eq i64 %19, 0
br i1 %44, label %52, label %45
45: ; preds = %42
%46 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %43
%47 = load i32, i32* %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %48
%50 = load double, double* %49
%51 = fsub double %50, %15
store double %51, double* %49
br label %52
52: ; preds = %42, %45
%53 = call i32 @performQRStep_Givens_double(double* %6, i32 %9)
%54 = and i64 %17, 1
%55 = icmp eq i64 %18, 0
br i1 %55, label %77, label %56
56: ; preds = %52
%57 = and i64 %17, 4294967294
br label %58
58: ; preds = %58, %56
%59 = phi i64 [ 0, %56 ], [ %74, %58 ]
%60 = phi i64 [ 0, %56 ], [ %75, %58 ]
%61 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %59
%62 = load i32, i32* %61
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %63
%65 = load double, double* %64
%66 = fadd double %15, %65
store double %66, double* %64
%67 = or i64 %59, 1
%68 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %70
%72 = load double, double* %71
%73 = fadd double %15, %72
store double %73, double* %71
%74 = add nuw nsw i64 %59, 2
%75 = add i64 %60, 2
%76 = icmp eq i64 %75, %57
br i1 %76, label %77, label %58
77: ; preds = %58, %52
%78 = phi i64 [ 0, %52 ], [ %74, %58 ]
%79 = icmp eq i64 %54, 0
br i1 %79, label %87, label %80
80: ; preds = %77
%81 = getelementptr inbounds [3 x i32], [3 x i32]* @__const.QRAlgorithm_double.mMapping, i64 0, i64 %78
%82 = load i32, i32* %81
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %83
%85 = load double, double* %84
%86 = fadd double %15, %85
store double %86, double* %84
br label %87
87: ; preds = %77, %80
%88 = add nsw i32 %12, -1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %89
%91 = load double, double* %90
%92 = call i32 @fabs(double %91)
%93 = icmp slt i32 %92, 1
br i1 %93, label %94, label %98
94: ; preds = %87
%95 = load double, double* %14
%96 = getelementptr inbounds double, double* %1, i64 %10
store double %95, double* %96
%97 = add nsw i32 %9, -1
br label %98
98: ; preds = %94, %87
%99 = phi i32 [ %97, %94 ], [ %9, %87 ]
%100 = icmp sgt i32 %99, 0
br i1 %100, label %8, label %101
101: ; preds = %98
%102 = load double, double* %6
store double %102, double* %1
%103 = getelementptr inbounds double, double* %1, i64 1
%104 = load double, double* %103
%105 = fcmp ogt double %102, %104
br i1 %105, label %106, label %107
106: ; preds = %101
store double %102, double* %103
store double %104, double* %1
br label %107
107: ; preds = %106, %101
%108 = phi double [ %104, %106 ], [ %102, %101 ]
%109 = phi double [ %102, %106 ], [ %104, %101 ]
%110 = getelementptr inbounds double, double* %1, i64 2
%111 = load double, double* %110
%112 = fcmp ogt double %109, %111
br i1 %112, label %113, label %114
113: ; preds = %107
store double %109, double* %110
store double %111, double* %103
br label %114
114: ; preds = %113, %107
%115 = phi double [ %111, %113 ], [ %109, %107 ]
%116 = fcmp ogt double %108, %115
br i1 %116, label %117, label %118
117: ; preds = %114
store double %108, double* %103
store double %115, double* %1
br label %118
118: ; preds = %117, %114
ret void
}