#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 */
double **dmatrix(int /*<<< orphan*/, int, int /*<<< orphan*/, int);
double *dvector(int /*<<< orphan*/, int);
int /*<<< orphan*/ free_dmatrix(double **, int /*<<< orphan*/, int,
                                int /*<<< orphan*/, int);
int /*<<< orphan*/ free_dvector(double *, int /*<<< orphan*/, int);
int /*<<< orphan*/ svdbacksub(double **, double *, double **, double *,
                              double *, int, int);
scalar_t__ svdecomp(double **, double *, double **, int, int);
int svdsolve(double **a, double b[], int m, int n) {
  int i;
  double *w, W[8];
  double **v, *VP[8], V[8][8];
  double maxw;
  if (n <= 8) {
    w = W;
    VP[0] = V[0];
    VP[1] = V[1];
    VP[2] = V[2];
    VP[3] = V[3];
    VP[4] = V[4];
    VP[5] = V[5];
    VP[6] = V[6];
    VP[7] = V[7];
    v = VP;
  } else {
    w = dvector(0, n - 1);
    v = dmatrix(0, n - 1, 0, n - 1);
  }
  if (svdecomp(a, w, v, m, n)) {
    if (w != W) {
      free_dvector(w, 0, n - 1);
      free_dmatrix(v, 0, n - 1, 0, n - 1);
    }
    return 1;
  }
  for (maxw = 0.0, i = 0; i < n; i++) {
    if (w[i] > maxw)
      maxw = w[i];
  }
  maxw *= 1.0e-12;
  for (i = 0; i < n; i++) {
    if (w[i] < maxw)
      w[i] = 0.0;
  }
  svdbacksub(a, w, v, b, b, m, n);
  if (w != W) {
    free_dvector(w, 0, n - 1);
    free_dmatrix(v, 0, n - 1, 0, n - 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<svdsolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2d0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
cmpl   $0x8,-0x20(%rbp)
jg     1233 <svdsolve+0xd3>
lea    -0x70(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x2c0(%rbp),%rax
mov    %rax,-0xc0(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0xb8(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0xb0(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0xc0,%rax
mov    %rax,-0xa8(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x100,%rax
mov    %rax,-0xa0(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x140,%rax
mov    %rax,-0x98(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x180,%rax
mov    %rax,-0x90(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x1c0,%rax
mov    %rax,-0x88(%rbp)
lea    -0xc0(%rbp),%rax
mov    %rax,-0x78(%rbp)
jmp    125d <svdsolve+0xfd>
mov    -0x20(%rbp),%esi
sub    $0x1,%esi
xor    %edi,%edi
call   1040 <dvector@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%esi
sub    $0x1,%esi
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
mov    %edx,%edi
call   1030 <dmatrix@plt>
mov    %rax,-0x78(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   1050 <svdecomp@plt>
cmp    $0x0,%rax
je     12c8 <svdsolve+0x168>
mov    -0x30(%rbp),%rax
lea    -0x70(%rbp),%rcx
cmp    %rcx,%rax
je     12bc <svdsolve+0x15c>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1070 <free_dvector@plt>
mov    -0x78(%rbp),%rdi
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    -0x20(%rbp),%r8d
sub    $0x1,%r8d
xor    %ecx,%ecx
mov    %ecx,%esi
call   1080 <free_dmatrix@plt>
movl   $0x1,-0x4(%rbp)
jmp    13fd <svdsolve+0x29d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x2c8(%rbp)
ff
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1329 <svdsolve+0x1c9>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x2c8(%rbp),%xmm0
ff
jbe    1316 <svdsolve+0x1b6>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x2c8(%rbp)
ff
jmp    131b <svdsolve+0x1bb>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12da <svdsolve+0x17a>
movsd  0xccf(%rip),%xmm0
mulsd  -0x2c8(%rbp),%xmm0
ff
movsd  %xmm0,-0x2c8(%rbp)
ff
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1396 <svdsolve+0x236>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x2c8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1383 <svdsolve+0x223>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1388 <svdsolve+0x228>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1348 <svdsolve+0x1e8>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%eax
mov    %eax,(%rsp)
call   1060 <svdbacksub@plt>
mov    -0x30(%rbp),%rax
lea    -0x70(%rbp),%rcx
cmp    %rcx,%rax
je     13f6 <svdsolve+0x296>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1070 <free_dvector@plt>
mov    -0x78(%rbp),%rdi
mov    -0x20(%rbp),%edx
sub    $0x1,%edx
mov    -0x20(%rbp),%r8d
sub    $0x1,%r8d
xor    %ecx,%ecx
mov    %ecx,%esi
call   1080 <free_dmatrix@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svdsolve>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x298,%rsp
mov    %ecx,%r15d
mov    %edx,%r13d
mov    %rsi,%rbp
mov    %rdi,%r12
cmp    $0x8,%ecx
jg     11f6 <svdsolve+0x96>
lea    0x50(%rsp),%rbx
lea    0x10(%rsp),%r14
lea    0x90(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0xd0(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x110(%rsp),%rax
mov    %rax,0x20(%rsp)
lea    0x150(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x190(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x1d0(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0x210(%rsp),%rax
mov    %rax,0x40(%rsp)
lea    0x250(%rsp),%rax
mov    %rax,0x48(%rsp)
jmp    121c <svdsolve+0xbc>
mov    %rbp,%r14
lea    -0x1(%r15),%ebp
xor    %edi,%edi
mov    %ebp,%esi
call   1040 <dvector@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    %ebp,%esi
xor    %edx,%edx
mov    %ebp,%ecx
mov    %r14,%rbp
call   1030 <dmatrix@plt>
mov    %rax,%r14
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r13d,%ecx
mov    %r15d,%r8d
call   1050 <svdecomp@plt>
test   %rax,%rax
je     1251 <svdsolve+0xf1>
mov    $0x1,%ebp
lea    0x50(%rsp),%rax
cmp    %rax,%rbx
je     138a <svdsolve+0x22a>
add    $0xffffffff,%r15d
jmp    136b <svdsolve+0x20b>
test   %r15d,%r15d
jle    1340 <svdsolve+0x1e0>
mov    %r15d,%eax
lea    -0x1(%rax),%rcx
mov    %eax,%edx
and    $0x3,%edx
cmp    $0x3,%rcx
jae    1274 <svdsolve+0x114>
xorpd  %xmm1,%xmm1
xor    %esi,%esi
jmp    12b0 <svdsolve+0x150>
mov    %eax,%edi
and    $0xfffffffc,%edi
xorpd  %xmm1,%xmm1
xor    %esi,%esi
nop
movsd  (%rbx,%rsi,8),%xmm0
maxsd  %xmm1,%xmm0
movsd  0x8(%rbx,%rsi,8),%xmm1
maxsd  %xmm0,%xmm1
movsd  0x10(%rbx,%rsi,8),%xmm0
maxsd  %xmm1,%xmm0
movsd  0x18(%rbx,%rsi,8),%xmm1
maxsd  %xmm0,%xmm1
add    $0x4,%rsi
cmp    %rsi,%rdi
jne    1280 <svdsolve+0x120>
movapd %xmm1,%xmm0
test   %rdx,%rdx
je     12d6 <svdsolve+0x176>
lea    (%rbx,%rsi,8),%rsi
xor    %edi,%edi
nop
movsd  (%rsi,%rdi,8),%xmm0
maxsd  %xmm1,%xmm0
add    $0x1,%rdi
movapd %xmm0,%xmm1
cmp    %rdi,%rdx
jne    12c0 <svdsolve+0x160>
test   %r15d,%r15d
jle    1340 <svdsolve+0x1e0>
mulsd  0xd1d(%rip),%xmm0
test   %rcx,%rcx
je     132b <svdsolve+0x1cb>
mov    %eax,%edx
and    $0xfffffffe,%edx
xor    %ecx,%ecx
jmp    1309 <svdsolve+0x1a9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x2,%rcx
cmp    %rcx,%rdx
je     132d <svdsolve+0x1cd>
ucomisd (%rbx,%rcx,8),%xmm0
jbe    1318 <svdsolve+0x1b8>
movq   $0x0,(%rbx,%rcx,8)
ucomisd 0x8(%rbx,%rcx,8),%xmm0
jbe    1300 <svdsolve+0x1a0>
movq   $0x0,0x8(%rbx,%rcx,8)
jmp    1300 <svdsolve+0x1a0>
xor    %ecx,%ecx
test   $0x1,%al
je     1340 <svdsolve+0x1e0>
ucomisd (%rbx,%rcx,8),%xmm0
jbe    1340 <svdsolve+0x1e0>
movq   $0x0,(%rbx,%rcx,8)
mov    %r15d,(%rsp)
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %rbp,%r8
mov    %r13d,%r9d
call   1060 <svdbacksub@plt>
lea    0x50(%rsp),%rax
cmp    %rax,%rbx
je     139e <svdsolve+0x23e>
add    $0xffffffff,%r15d
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15d,%edx
call   1070 <free_dvector@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %r15d,%edx
xor    %ecx,%ecx
mov    %r15d,%r8d
call   1080 <free_dmatrix@plt>
mov    %ebp,%eax
add    $0x298,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
jmp    138a <svdsolve+0x22a>

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

LLVM IR (-O2):
define i32 @svdsolve(double** %0, double* %1, i32 %2, i32 %3) {
%5 = alloca [8 x double]
%6 = alloca [8 x double*]
%7 = alloca [8 x [8 x double]]
%8 = bitcast [8 x double]* %5 to i8*
%9 = bitcast [8 x double*]* %6 to i8*
%10 = bitcast [8 x [8 x double]]* %7 to i8*
%11 = icmp slt i32 %3, 9
br i1 %11, label %12, label %30
12: ; preds = %4
%13 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 0
%14 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 0, i64 0
%15 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 0
store double* %14, double** %15
%16 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 1, i64 0
%17 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 1
store double* %16, double** %17
%18 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 2, i64 0
%19 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 2
store double* %18, double** %19
%20 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 3, i64 0
%21 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 3
store double* %20, double** %21
%22 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 4, i64 0
%23 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 4
store double* %22, double** %23
%24 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 5, i64 0
%25 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 5
store double* %24, double** %25
%26 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 6, i64 0
%27 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 6
store double* %26, double** %27
%28 = getelementptr inbounds [8 x [8 x double]], [8 x [8 x double]]* %7, i64 0, i64 7, i64 0
%29 = getelementptr inbounds [8 x double*], [8 x double*]* %6, i64 0, i64 7
store double* %28, double** %29
br label %34
30: ; preds = %4
%31 = add nsw i32 %3, -1
%32 = tail call double* @dvector(i32 0, i32 %31)
%33 = tail call double** @dmatrix(i32 0, i32 %31, i32 0, i32 %31)
br label %34
34: ; preds = %30, %12
%35 = phi double* [ %13, %12 ], [ %32, %30 ]
%36 = phi double** [ %15, %12 ], [ %33, %30 ]
%37 = call i64 @svdecomp(double** %0, double* %35, double** %36, i32 %2, i32 %3)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %48
39: ; preds = %34
%40 = icmp sgt i32 %3, 0
br i1 %40, label %41, label %130
41: ; preds = %39
%42 = zext i32 %3 to i64
%43 = add nsw i64 %42, -1
%44 = and i64 %42, 3
%45 = icmp ult i64 %43, 3
br i1 %45, label %81, label %46
46: ; preds = %41
%47 = and i64 %42, 4294967292
br label %55
48: ; preds = %34
%49 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 0
%50 = icmp eq double* %35, %49
br i1 %50, label %138, label %51
51: ; preds = %48
%52 = add nsw i32 %3, -1
%53 = call i32 @free_dvector(double* %35, i32 0, i32 %52)
%54 = call i32 @free_dmatrix(double** %36, i32 0, i32 %52, i32 0, i32 %52)
br label %138
55: ; preds = %55, %46
%56 = phi i64 [ 0, %46 ], [ %78, %55 ]
%57 = phi double [ 0.000000e+00, %46 ], [ %77, %55 ]
%58 = phi i64 [ 0, %46 ], [ %79, %55 ]
%59 = getelementptr inbounds double, double* %35, i64 %56
%60 = load double, double* %59
%61 = fcmp ogt double %60, %57
%62 = select i1 %61, double %60, double %57
%63 = or i64 %56, 1
%64 = getelementptr inbounds double, double* %35, i64 %63
%65 = load double, double* %64
%66 = fcmp ogt double %65, %62
%67 = select i1 %66, double %65, double %62
%68 = or i64 %56, 2
%69 = getelementptr inbounds double, double* %35, i64 %68
%70 = load double, double* %69
%71 = fcmp ogt double %70, %67
%72 = select i1 %71, double %70, double %67
%73 = or i64 %56, 3
%74 = getelementptr inbounds double, double* %35, i64 %73
%75 = load double, double* %74
%76 = fcmp ogt double %75, %72
%77 = select i1 %76, double %75, double %72
%78 = add nuw nsw i64 %56, 4
%79 = add i64 %58, 4
%80 = icmp eq i64 %79, %47
br i1 %80, label %81, label %55
81: ; preds = %55, %41
%82 = phi double [ undef, %41 ], [ %77, %55 ]
%83 = phi i64 [ 0, %41 ], [ %78, %55 ]
%84 = phi double [ 0.000000e+00, %41 ], [ %77, %55 ]
%85 = icmp eq i64 %44, 0
br i1 %85, label %97, label %86
86: ; preds = %81, %86
%87 = phi i64 [ %94, %86 ], [ %83, %81 ]
%88 = phi double [ %93, %86 ], [ %84, %81 ]
%89 = phi i64 [ %95, %86 ], [ 0, %81 ]
%90 = getelementptr inbounds double, double* %35, i64 %87
%91 = load double, double* %90
%92 = fcmp ogt double %91, %88
%93 = select i1 %92, double %91, double %88
%94 = add nuw nsw i64 %87, 1
%95 = add i64 %89, 1
%96 = icmp eq i64 %95, %44
br i1 %96, label %97, label %86
97: ; preds = %86, %81
%98 = phi double [ %82, %81 ], [ %93, %86 ]
%99 = fmul double %98, 0x3D719799812DEA11
br i1 %40, label %100, label %130
100: ; preds = %97
%101 = and i64 %42, 1
%102 = icmp eq i64 %43, 0
br i1 %102, label %122, label %103
103: ; preds = %100
%104 = and i64 %42, 4294967294
br label %105
105: ; preds = %118, %103
%106 = phi i64 [ 0, %103 ], [ %119, %118 ]
%107 = phi i64 [ 0, %103 ], [ %120, %118 ]
%108 = getelementptr inbounds double, double* %35, i64 %106
%109 = load double, double* %108
%110 = fcmp olt double %109, %99
br i1 %110, label %111, label %112
111: ; preds = %105
store double 0.000000e+00, double* %108
br label %112
112: ; preds = %105, %111
%113 = or i64 %106, 1
%114 = getelementptr inbounds double, double* %35, i64 %113
%115 = load double, double* %114
%116 = fcmp olt double %115, %99
br i1 %116, label %117, label %118
117: ; preds = %112
store double 0.000000e+00, double* %114
br label %118
118: ; preds = %117, %112
%119 = add nuw nsw i64 %106, 2
%120 = add i64 %107, 2
%121 = icmp eq i64 %120, %104
br i1 %121, label %122, label %105
122: ; preds = %118, %100
%123 = phi i64 [ 0, %100 ], [ %119, %118 ]
%124 = icmp eq i64 %101, 0
br i1 %124, label %130, label %125
125: ; preds = %122
%126 = getelementptr inbounds double, double* %35, i64 %123
%127 = load double, double* %126
%128 = fcmp olt double %127, %99
br i1 %128, label %129, label %130
129: ; preds = %125
store double 0.000000e+00, double* %126
br label %130
130: ; preds = %122, %129, %125, %39, %97
%131 = call i32 @svdbacksub(double** %0, double* %35, double** %36, double* %1, double* %1, i32 %2, i32 %3)
%132 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 0
%133 = icmp eq double* %35, %132
br i1 %133, label %138, label %134
134: ; preds = %130
%135 = add nsw i32 %3, -1
%136 = call i32 @free_dvector(double* %35, i32 0, i32 %135)
%137 = call i32 @free_dmatrix(double** %36, i32 0, i32 %135, i32 0, i32 %135)
br label %138
138: ; preds = %130, %134, %48, %51
%139 = phi i32 [ 1, %51 ], [ 1, %48 ], [ 0, %134 ], [ 0, %130 ]
ret i32 %139
}