void get_extval(double *alpha, double *beta, int j, double ritzval, double *s,
                double eigtol, double wnorm_g, double sigma, double *extval,
                double *v, double *work1, double *work2) {
  extern int DEBUG_EVECS;
  double lambda_low;
  double lambda_high;
  double tol;
  double norm_v;
  double lambda;
  int cnt;
  double diff;
  double ch_norm(), Tevec();
  void tri_solve(), cpvec();
  Tevec(alpha, beta - 1, j, ritzval, s);
  if (wnorm_g == 0.0) {
    *extval = ritzval;
    cpvec(v, 1, j, s);
    if (DEBUG_EVECS > 0) {
      printf("Degenerate extended eigenvector problem (g = 0).\n");
    }
    return;
  }
  lambda_low = ritzval - wnorm_g / sigma;
  lambda_high = ritzval - (wnorm_g / sigma) * s[1];
  lambda = 0.5 * (lambda_low + lambda_high);
  tol = eigtol * eigtol * (1 + fabs(lambda_low) + fabs(lambda_high));
  if (DEBUG_EVECS > 2) {
    printf("Computing extended eigenpairs of T\n");
    printf("  target norm_v (= sigma) %g\n", sigma);
    printf("  bisection tolerance %g\n", tol);
  }
  if (DEBUG_EVECS > 3) {
    printf("  lambda iterates to the extended eigenvalue\n");
    printf("         lambda_low           lambda            lambda_high      "
           "norm_v\n");
  }
  cnt = 1;
  diff = 2 * tol;
  while (diff > tol) {
    lambda = 0.5 * (lambda_low + lambda_high);
    tri_solve(alpha, beta, j, lambda, v, wnorm_g, work1, work2);
    norm_v = ch_norm(v, 1, j);
    if (DEBUG_EVECS > 3) {
      printf("%2i   %18.16f  %18.16f  %18.16f  %g\n", cnt++, lambda_low, lambda,
             lambda_high, norm_v);
    }
    if (norm_v <= sigma) {
      lambda_low = lambda;
    }
    if (norm_v >= sigma) {
      lambda_high = lambda;
    }
    diff = lambda_high - lambda_low;
  }
  *extval = lambda;
}


x86 assembly (clang, -O0):
<get_extval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
mov    %r9,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0xfffffffffffffff8,%rsi
mov    -0x14(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rcx
mov    $0x1,%al
call   1040 <Tevec@plt>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <get_extval+0xbc>
jp     120c <get_extval+0xbc>
movsd  -0x20(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
mov    $0x0,%al
call   1070 <cpvec@plt>
mov    0x2df8(%rip),%rax
cmpl   $0x0,(%rax)
jle    1207 <get_extval+0xb7>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1451 <get_extval+0x301>
movsd  -0x20(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  -0x40(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm1
addsd  -0x60(%rbp),%xmm1
movsd  0xda6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movaps 0xd6f(%rip),%xmm1
pand   %xmm1,%xmm2
movsd  0xd73(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
movaps 0xd53(%rip),%xmm3
pand   %xmm3,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x2d23(%rip),%rax
cmpl   $0x2,(%rax)
jle    1302 <get_extval+0x1b2>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x40(%rbp),%xmm0
lea    0xd96(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x68(%rbp),%xmm0
lea    0xda1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2cdf(%rip),%rax
cmpl   $0x3,(%rax)
jle    132e <get_extval+0x1de>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x7c(%rbp)
movsd  0xce3(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x68(%rbp),%xmm0
jbe    1444 <get_extval+0x2f4>
movsd  -0x58(%rbp),%xmm1
addsd  -0x60(%rbp),%xmm1
movsd  0xca9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x78(%rbp),%xmm0
mov    -0x50(%rbp),%rcx
movsd  -0x38(%rbp),%xmm1
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
mov    $0x2,%al
call   1050 <tri_solve@plt>
mov    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <ch_norm@plt>
movsd  %xmm0,-0x70(%rbp)
mov    0x2c29(%rip),%rax
cmpl   $0x3,(%rax)
jle    13f5 <get_extval+0x2a5>
mov    -0x7c(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
lea    0xd3f(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x70(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1413 <get_extval+0x2c3>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     142d <get_extval+0x2dd>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    134a <get_extval+0x1fa>
movsd  -0x78(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_extval>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%r15
mov    %r8,0x58(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x68(%rsp)
movsd  %xmm1,0x20(%rsp)
mov    %rcx,%r13
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0xd8(%rsp),%r14
mov    0xd0(%rsp),%rax
mov    %rax,0x38(%rsp)
add    $0xfffffffffffffff8,%rsi
movapd %xmm0,(%rsp)
mov    $0x1,%al
call   1050 <Tevec@plt>
movsd  0x68(%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    121e <get_extval+0xbe>
jp     121e <get_extval+0xbe>
mov    0x58(%rsp),%rax
movapd (%rsp),%xmm0
movsd  %xmm0,(%rax)
mov    %r15,%rdi
mov    $0x1,%esi
mov    %r12d,%edx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <cpvec@plt>
mov    0x2df0(%rip),%rax
cmpl   $0x0,(%rax)
jle    145b <get_extval+0x2fb>
lea    0xf0d(%rip),%rdi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
mov    %r14,0x60(%rsp)
movapd %xmm1,%xmm0
divsd  0x18(%rsp),%xmm0
movapd (%rsp),%xmm2
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
mulsd  0x8(%r13),%xmm0
subsd  %xmm0,%xmm2
movsd  0x20(%rsp),%xmm4
mulsd  %xmm4,%xmm4
movapd 0xdba(%rip),%xmm1
movapd %xmm3,%xmm0
andpd  %xmm1,%xmm0
addsd  0xda2(%rip),%xmm0
andpd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm4,%xmm1
mov    0x2d6f(%rip),%rax
cmpl   $0x3,(%rax)
movapd %xmm1,0x40(%rsp)
jl     130d <get_extval+0x1ad>
lea    0xe63(%rip),%rdi
movapd %xmm2,(%rsp)
movapd %xmm3,0x20(%rsp)
call   1030 <puts@plt>
lea    0xd7a(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd84(%rip),%rdi
movapd 0x40(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movapd 0x40(%rsp),%xmm1
movapd 0x20(%rsp),%xmm3
movapd (%rsp),%xmm2
mov    0x2d09(%rip),%rax
cmpl   $0x4,(%rax)
jl     130d <get_extval+0x1ad>
lea    0xd92(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb3(%rip),%rdi
call   1030 <puts@plt>
movapd 0x40(%rsp),%xmm1
movapd 0x20(%rsp),%xmm3
movapd (%rsp),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm1,%xmm0
mov    0x60(%rsp),%r13
jbe    1442 <get_extval+0x2e2>
mov    $0x1,%r14d
mov    0x38(%rsp),%r8
jmp    139a <get_extval+0x23a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x18(%rsp),%xmm1
movapd (%rsp),%xmm2
mov    0x38(%rsp),%r8
movapd 0x20(%rsp),%xmm3
movapd 0x40(%rsp),%xmm4
movapd 0x70(%rsp),%xmm5
movapd %xmm1,%xmm0
cmpnlesd %xmm6,%xmm0
cmpnlesd %xmm1,%xmm6
andpd  %xmm6,%xmm3
andnpd %xmm5,%xmm6
orpd   %xmm6,%xmm3
andpd  %xmm0,%xmm2
andnpd %xmm5,%xmm0
orpd   %xmm0,%xmm2
movapd %xmm2,%xmm0
subsd  %xmm3,%xmm0
ucomisd %xmm4,%xmm0
jbe    1452 <get_extval+0x2f2>
movapd %xmm2,(%rsp)
movapd %xmm3,0x20(%rsp)
movapd %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xc4b(%rip),%xmm0
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
movapd %xmm0,0x70(%rsp)
mov    %r15,%rcx
movsd  0x68(%rsp),%xmm1
mov    %r13,%r9
mov    $0x2,%al
call   1060 <tri_solve@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1070 <ch_norm@plt>
movapd %xmm0,%xmm6
mov    0x2bf4(%rip),%rax
cmpl   $0x4,(%rax)
jl     1340 <get_extval+0x1e0>
mov    %r14,%rsi
add    $0x1,%r14d
lea    0xc4d(%rip),%rdi
movapd 0x20(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
movapd (%rsp),%xmm2
movapd %xmm6,%xmm3
mov    $0x4,%al
movapd %xmm6,0x80(%rsp)
call   1040 <printf@plt>
movapd 0x80(%rsp),%xmm6
mov    0x60(%rsp),%r13
jmp    1340 <get_extval+0x1e0>
addsd  %xmm2,%xmm3
mulsd  0xbb2(%rip),%xmm3
movapd %xmm3,%xmm5
mov    0x58(%rsp),%rax
movsd  %xmm5,(%rax)
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@DEBUG_EVECS = external global i32
@.str = [50 x i8] c"Degenerate extended eigenvector problem (g = 0).\0A\00"
@.str.1 = [36 x i8] c"Computing extended eigenpairs of T\0A\00"
@.str.2 = [30 x i8] c" target norm_v (= sigma) %g\0A\00"
@.str.3 = [26 x i8] c" bisection tolerance %g\0A\00"
@.str.4 = [46 x i8] c" lambda iterates to the extended eigenvalue\0A\00"
@.str.5 = [73 x i8] c" lambda_low lambda lambda_high norm_v\0A\00"
@.str.6 = [37 x i8] c"%2i %18.16f %18.16f %18.16f %g\0A\00"
define void @get_extval(double* %0, double* %1, i32 %2, double %3, double* %4, double %5, double %6, double %7, double* %8, double* %9, double* %10, double* %11) {
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%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 i32
%31 = alloca double
store double* %0, double** %13
store double* %1, double** %14
store i32 %2, i32* %15
store double %3, double* %16
store double* %4, double** %17
store double %5, double* %18
store double %6, double* %19
store double %7, double* %20
store double* %8, double** %21
store double* %9, double** %22
store double* %10, double** %23
store double* %11, double** %24
%32 = load double*, double** %13
%33 = load double*, double** %14
%34 = getelementptr inbounds double, double* %33, i64 -1
%35 = load i32, i32* %15
%36 = load double, double* %16
%37 = load double*, double** %17
%38 = call double (double*, double*, i32, double, double*, ...) bitcast (double (...)* @Tevec to double (double*, double*, i32, double, double*, ...)*)(double* %32, double* %34, i32 %35, double %36, double* %37)
%39 = load double, double* %19
%40 = fcmp oeq double %39, 0.000000e+00
br i1 %40, label %41, label %52
41: ; preds = %12
%42 = load double, double* %16
%43 = load double*, double** %21
store double %42, double* %43
%44 = load double*, double** %22
%45 = load i32, i32* %15
%46 = load double*, double** %17
%47 = load i32, i32* @DEBUG_EVECS
%48 = icmp sgt i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %41
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %51
51: ; preds = %49, %41
br label %147
52: ; preds = %12
%53 = load double, double* %16
%54 = load double, double* %19
%55 = load double, double* %20
%56 = fdiv double %54, %55
%57 = fsub double %53, %56
store double %57, double* %25
%58 = load double, double* %16
%59 = load double, double* %19
%60 = load double, double* %20
%61 = fdiv double %59, %60
%62 = load double*, double** %17
%63 = getelementptr inbounds double, double* %62, i64 1
%64 = load double, double* %63
%65 = fneg double %61
%66 = call double @llvm.fmuladd.f64(double %65, double %64, double %58)
store double %66, double* %26
%67 = load double, double* %25
%68 = load double, double* %26
%69 = fadd double %67, %68
%70 = fmul double 5.000000e-01, %69
store double %70, double* %29
%71 = load double, double* %18
%72 = load double, double* %18
%73 = fmul double %71, %72
%74 = load double, double* %25
%75 = call double @llvm.fabs.f64(double %74)
%76 = fadd double 1.000000e+00, %75
%77 = load double, double* %26
%78 = call double @llvm.fabs.f64(double %77)
%79 = fadd double %76, %78
%80 = fmul double %73, %79
store double %80, double* %27
%81 = load i32, i32* @DEBUG_EVECS
%82 = icmp sgt i32 %81, 2
br i1 %82, label %83, label %89
83: ; preds = %52
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%85 = load double, double* %20
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %85)
%87 = load double, double* %27
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %87)
br label %89
89: ; preds = %83, %52
%90 = load i32, i32* @DEBUG_EVECS
%91 = icmp sgt i32 %90, 3
br i1 %91, label %92, label %95
92: ; preds = %89
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0))
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.5, i64 0, i64 0))
br label %95
95: ; preds = %92, %89
store i32 1, i32* %30
%96 = load double, double* %27
%97 = fmul double 2.000000e+00, %96
store double %97, double* %31
br label %98
98: ; preds = %140, %95
%99 = load double, double* %31
%100 = load double, double* %27
%101 = fcmp ogt double %99, %100
br i1 %101, label %102, label %144
102: ; preds = %98
%103 = load double, double* %25
%104 = load double, double* %26
%105 = fadd double %103, %104
%106 = fmul double 5.000000e-01, %105
store double %106, double* %29
%107 = load double*, double** %13
%108 = load double*, double** %14
%109 = load i32, i32* %15
%110 = load double, double* %29
%111 = load double*, double** %22
%112 = load double, double* %19
%113 = load double*, double** %23
%114 = load double*, double** %24
%115 = load double*, double** %22
%116 = load i32, i32* %15
%117 = call double (double*, i32, i32, ...) bitcast (double (...)* @ch_norm to double (double*, i32, i32, ...)*)(double* %115, i32 1, i32 %116)
store double %117, double* %28
%118 = load i32, i32* @DEBUG_EVECS
%119 = icmp sgt i32 %118, 3
br i1 %119, label %120, label %128
120: ; preds = %102
%121 = load i32, i32* %30
%122 = add nsw i32 %121, 1
store i32 %122, i32* %30
%123 = load double, double* %25
%124 = load double, double* %29
%125 = load double, double* %26
%126 = load double, double* %28
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %121, double %123, double %124, double %125, double %126)
br label %128
128: ; preds = %120, %102
%129 = load double, double* %28
%130 = load double, double* %20
%131 = fcmp ole double %129, %130
br i1 %131, label %132, label %134
132: ; preds = %128
%133 = load double, double* %29
store double %133, double* %25
br label %134
134: ; preds = %132, %128
%135 = load double, double* %28
%136 = load double, double* %20
%137 = fcmp oge double %135, %136
br i1 %137, label %138, label %140
138: ; preds = %134
%139 = load double, double* %29
store double %139, double* %26
br label %140
140: ; preds = %138, %134
%141 = load double, double* %26
%142 = load double, double* %25
%143 = fsub double %141, %142
store double %143, double* %31
br label %98
144: ; preds = %98
%145 = load double, double* %29
%146 = load double*, double** %21
store double %145, double* %146
br label %147
147: ; preds = %144, %51
ret void
}

LLVM IR (-O2):
@DEBUG_EVECS = external global i32
@.str.2 = [30 x i8] c" target norm_v (= sigma) %g\0A\00"
@.str.3 = [26 x i8] c" bisection tolerance %g\0A\00"
@.str.6 = [37 x i8] c"%2i %18.16f %18.16f %18.16f %g\0A\00"
@str = [45 x i8] c" lambda iterates to the extended eigenvalue\00"
@str.7 = [72 x i8] c" lambda_low lambda lambda_high norm_v\00"
@str.8 = [35 x i8] c"Computing extended eigenpairs of T\00"
@str.9 = [49 x i8] c"Degenerate extended eigenvector problem (g = 0).\00"
define void @get_extval(double* %0, double* %1, i32 %2, double %3, double* %4, double %5, double %6, double %7, double* nocapture writeonly %8, double* %9, double* %10, double* %11) {
%13 = getelementptr inbounds double, double* %1, i64 -1
%14 = tail call double (double*, double*, i32, double, double*, ...) bitcast (double (...)* @Tevec to double (double*, double*, i32, double, double*, ...)*)(double* %0, double* %13, i32 %2, double %3, double* %4)
%15 = fcmp oeq double %6, 0.000000e+00
br i1 %15, label %16, label %21
16: ; preds = %12
store double %3, double* %8
tail call void (double*, i32, i32, double*, ...) bitcast (void (...)* @cpvec to void (double*, i32, i32, double*, ...)*)(double* %9, i32 1, i32 %2, double* %4)
%17 = load i32, i32* @DEBUG_EVECS
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %72
19: ; preds = %16
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.9, i64 0, i64 0))
br label %72
21: ; preds = %12
%22 = fdiv double %6, %7
%23 = fsub double %3, %22
%24 = getelementptr inbounds double, double* %4, i64 1
%25 = load double, double* %24
%26 = fneg double %22
%27 = tail call double @llvm.fmuladd.f64(double %26, double %25, double %3)
%28 = fadd double %23, %27
%29 = fmul double %28, 5.000000e-01
%30 = fmul double %5, %5
%31 = tail call double @llvm.fabs.f64(double %23)
%32 = fadd double %31, 1.000000e+00
%33 = tail call double @llvm.fabs.f64(double %27)
%34 = fadd double %32, %33
%35 = fmul double %30, %34
%36 = load i32, i32* @DEBUG_EVECS
%37 = icmp sgt i32 %36, 2
br i1 %37, label %38, label %47
38: ; preds = %21
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.8, i64 0, i64 0))
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %7)
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %35)
%42 = load i32, i32* @DEBUG_EVECS
%43 = icmp sgt i32 %42, 3
br i1 %43, label %44, label %47
44: ; preds = %38
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.7, i64 0, i64 0))
br label %47
47: ; preds = %21, %44, %38
%48 = fmul double %35, 2.000000e+00
%49 = fcmp ogt double %48, %35
br i1 %49, label %50, label %70
50: ; preds = %47, %62
%51 = phi i32 [ %63, %62 ], [ 1, %47 ]
%52 = phi double [ %65, %62 ], [ %23, %47 ]
%53 = phi double [ %67, %62 ], [ %27, %47 ]
%54 = fadd double %53, %52
%55 = fmul double %54, 5.000000e-01
tail call void (double*, double*, i32, double, double*, double, double*, double*, ...) bitcast (void (...)* @tri_solve to void (double*, double*, i32, double, double*, double, double*, double*, ...)*)(double* %0, double* %1, i32 %2, double %55, double* %9, double %6, double* %10, double* %11)
%56 = tail call double (double*, i32, i32, ...) bitcast (double (...)* @ch_norm to double (double*, i32, i32, ...)*)(double* %9, i32 1, i32 %2)
%57 = load i32, i32* @DEBUG_EVECS
%58 = icmp sgt i32 %57, 3
br i1 %58, label %59, label %62
59: ; preds = %50
%60 = add nsw i32 %51, 1
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %51, double %52, double %55, double %53, double %56)
br label %62
62: ; preds = %59, %50
%63 = phi i32 [ %60, %59 ], [ %51, %50 ]
%64 = fcmp ugt double %56, %7
%65 = select i1 %64, double %52, double %55
%66 = fcmp ult double %56, %7
%67 = select i1 %66, double %53, double %55
%68 = fsub double %67, %65
%69 = fcmp ogt double %68, %35
br i1 %69, label %50, label %70
70: ; preds = %62, %47
%71 = phi double [ %29, %47 ], [ %55, %62 ]
store double %71, double* %8
br label %72
72: ; preds = %16, %19, %70
ret void
}