#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 */
scalar_t__ fabs(double);
void BackSubstitute_Real_Vector(double *H, double eigen_real[],
                                double eigen_imag[], int row,
                                double zero_tolerance, int n) {
  double *pH;
  double *pV;
  double x;
  double u[4];
  double v[2];
  int i, j, k;
  k = row;
  pH = H + row * n;
  pH[row] = 1.0;
  for (i = row - 1, pH -= n; i >= 0; i--, pH -= n) {
    u[0] = pH[i] - eigen_real[row];
    v[0] = pH[row];
    pV = H + n * k;
    for (j = k; j < row; j++, pV += n)
      v[0] += pH[j] * pV[row];
    if (eigen_imag[i] < 0.0) {
      u[3] = u[0];
      v[1] = v[0];
    } else {
      k = i;
      if (eigen_imag[i] == 0.0) {
        if (u[0] != 0.0)
          pH[row] = -v[0] / u[0];
        else
          pH[row] = -v[0] / zero_tolerance;
      } else {
        u[1] = pH[i + 1];
        u[2] = pH[n + i];
        x = (eigen_real[i] - eigen_real[row]);
        x *= x;
        x += eigen_imag[i] * eigen_imag[i];
        pH[row] = (u[1] * v[1] - u[3] * v[0]) / x;
        if (fabs(u[1]) > fabs(u[3]))
          pH[n + row] = -(v[0] + u[0] * pH[row]) / u[1];
        else
          pH[n + row] = -(v[1] + u[2] * pH[row]) / u[3];
      }
    }
  }
}


x86 assembly (clang, -O0):
<BackSubstitute_Real_Vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
cmpl   $0x0,-0x84(%rbp)
jl     152a <BackSubstitute_Real_Vector+0x41a>
mov    -0x38(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x8c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1260 <BackSubstitute_Real_Vector+0x150>
mov    -0x38(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
jmp    11f9 <BackSubstitute_Real_Vector+0xe9>
mov    -0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1292 <BackSubstitute_Real_Vector+0x182>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    14f7 <BackSubstitute_Real_Vector+0x3e7>
mov    -0x84(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1344 <BackSubstitute_Real_Vector+0x234>
jp     1344 <BackSubstitute_Real_Vector+0x234>
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12de <BackSubstitute_Real_Vector+0x1ce>
jp     12de <BackSubstitute_Real_Vector+0x1ce>
jmp    1311 <BackSubstitute_Real_Vector+0x201>
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x70(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    133f <BackSubstitute_Real_Vector+0x22f>
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x28(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14f2 <BackSubstitute_Real_Vector+0x3e2>
mov    -0x38(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0x84(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x98(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x98(%rbp),%rax
cmp    %rcx,%rax
jle    14a0 <BackSubstitute_Real_Vector+0x390>
movsd  -0x80(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14ed <BackSubstitute_Real_Vector+0x3dd>
movsd  -0x78(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x58(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14f2 <BackSubstitute_Real_Vector+0x3e2>
jmp    14f7 <BackSubstitute_Real_Vector+0x3e7>
jmp    14fc <BackSubstitute_Real_Vector+0x3ec>
mov    -0x84(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x84(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    1190 <BackSubstitute_Real_Vector+0x80>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BackSubstitute_Real_Vector>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
movsd  %xmm0,0x40(%rsp)
mov    %rdx,0x78(%rsp)
mov    %rsi,0x38(%rsp)
mov    %r8,%rax
mov    %r8,0x30(%rsp)
imul   %ecx,%eax
cltq
mov    %rdi,0x28(%rsp)
lea    (%rdi,%rax,8),%r11
movslq %ecx,%r13
movabs $0x3ff0000000000000,%rdi
mov    %rdi,(%r11,%r13,8)
test   %r13d,%r13d
jle    1468 <BackSubstitute_Real_Vector+0x358>
mov    0x30(%rsp),%rdi
movslq %edi,%rbp
mov    %rbp,%rbx
neg    %rbx
mov    %rbx,0x70(%rsp)
add    %ecx,%edi
movslq %edi,%rdi
mov    %rdi,0x8(%rsp)
sub    %rbp,%rax
mov    0x28(%rsp),%rdi
lea    (%rdi,%rax,8),%r12
lea    0x0(,%rbp,8),%r14
mov    %r14,%rax
neg    %rax
mov    %rax,0x68(%rsp)
mov    %rbp,%r15
shl    $0x5,%r15
shl    $0x4,%rbp
mov    %rbp,0x60(%rsp)
lea    (%r14,%r14,2),%rax
mov    %rax,0x58(%rsp)
xorpd  %xmm2,%xmm2
movapd 0xe3d(%rip),%xmm8
mov    %r13,%rbx
mov    %ecx,%r10d
mov    %rcx,0x10(%rsp)
jmp    11e7 <BackSubstitute_Real_Vector+0xd7>
movapd %xmm7,%xmm5
movapd %xmm6,%xmm4
add    0x68(%rsp),%r12
cmp    $0x1,%rdx
jle    1468 <BackSubstitute_Real_Vector+0x358>
mov    %r11,%rsi
lea    -0x1(%rbx),%r9
mov    0x70(%rsp),%rax
lea    (%r11,%rax,8),%r11
movsd  (%r11,%r13,8),%xmm6
mov    %rbx,%rdx
cmp    %ecx,%r10d
jge    12cc <BackSubstitute_Real_Vector+0x1bc>
mov    %r11,%r8
mov    %r10d,%eax
imul   0x30(%rsp),%eax
cltq
mov    0x28(%rsp),%rdi
lea    (%rdi,%rax,8),%rbp
movslq %r10d,%rdi
mov    %ecx,%eax
sub    %r10d,%eax
mov    %rdi,%r11
not    %r11
add    %r13,%r11
and    $0x3,%rax
je     125e <BackSubstitute_Real_Vector+0x14e>
cs nopw 0x0(%rax,%rax,1)
movsd  (%r12,%rdi,8),%xmm0
mulsd  0x0(%rbp,%r13,8),%xmm0
addsd  %xmm0,%xmm6
add    $0x1,%rdi
add    %r14,%rbp
add    $0xffffffffffffffff,%rax
jne    1240 <BackSubstitute_Real_Vector+0x130>
cmp    $0x3,%r11
mov    %r8,%r11
mov    0x60(%rsp),%r8
mov    0x58(%rsp),%rbx
jb     12cc <BackSubstitute_Real_Vector+0x1bc>
lea    0x0(,%r13,8),%rax
add    %rbp,%rax
nopl   0x0(%rax)
movsd  (%r12,%rdi,8),%xmm0
mulsd  (%rax),%xmm0
movsd  0x8(%r12,%rdi,8),%xmm1
addsd  %xmm6,%xmm0
mulsd  (%rax,%r14,1),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r12,%rdi,8),%xmm0
mulsd  (%rax,%r8,1),%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%r12,%rdi,8),%xmm6
mulsd  (%rax,%rbx,1),%xmm6
addsd  %xmm0,%xmm6
add    $0x4,%rdi
add    %r15,%rax
cmp    %rdi,%r13
jne    1280 <BackSubstitute_Real_Vector+0x170>
movsd  -0x8(%r11,%rdx,8),%xmm7
mov    0x38(%rsp),%rax
movsd  (%rax,%r13,8),%xmm1
subsd  %xmm1,%xmm7
mov    %r9,%rbx
mov    0x78(%rsp),%rax
movsd  (%rax,%r9,8),%xmm3
ucomisd %xmm3,%xmm2
ja     11d0 <BackSubstitute_Real_Vector+0xc0>
ucomisd %xmm2,%xmm3
jne    131c <BackSubstitute_Real_Vector+0x20c>
jp     131c <BackSubstitute_Real_Vector+0x20c>
ucomisd %xmm2,%xmm7
xorpd  %xmm8,%xmm6
jne    1313 <BackSubstitute_Real_Vector+0x203>
jnp    1405 <BackSubstitute_Real_Vector+0x2f5>
divsd  %xmm7,%xmm6
jmp    140b <BackSubstitute_Real_Vector+0x2fb>
movapd %xmm7,0xa0(%rsp)
mov    %rdx,0x20(%rsp)
movsd  (%r11,%rdx,8),%xmm0
movsd  (%rsi,%rbx,8),%xmm2
movaps %xmm2,0x90(%rsp)
mov    0x38(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm3,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm6,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm4,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
movsd  %xmm2,(%r11,%r13,8)
movsd  %xmm0,0x48(%rsp)
mov    %r11,%rbp
movsd  %xmm4,0x18(%rsp)
movsd  %xmm5,(%rsp)
movapd %xmm6,0x80(%rsp)
call   1030 <fabs@plt>
mov    %rax,0x50(%rsp)
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
mov    %rbp,%r11
movsd  0x0(%rbp,%r13,8),%xmm0
cmp    %rax,0x50(%rsp)
jle    1419 <BackSubstitute_Real_Vector+0x309>
movapd 0xa0(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x80(%rsp),%xmm1
movapd 0xc2a(%rip),%xmm8
xorpd  %xmm8,%xmm1
divsd  0x48(%rsp),%xmm1
mov    0x8(%rsp),%rax
movsd  %xmm1,(%r11,%rax,8)
mov    %ebx,%r10d
mov    0x10(%rsp),%rcx
xorpd  %xmm2,%xmm2
movsd  0x18(%rsp),%xmm4
movsd  (%rsp),%xmm5
jmp    145e <BackSubstitute_Real_Vector+0x34e>
divsd  0x40(%rsp),%xmm6
movsd  %xmm6,(%r11,%r13,8)
mov    %ebx,%r10d
jmp    11d8 <BackSubstitute_Real_Vector+0xc8>
movapd 0x90(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm4
addsd  %xmm4,%xmm1
movapd 0xbc7(%rip),%xmm8
xorpd  %xmm8,%xmm1
movsd  (%rsp),%xmm5
divsd  %xmm5,%xmm1
mov    0x8(%rsp),%rax
movsd  %xmm1,(%r11,%rax,8)
mov    %ebx,%r10d
mov    0x10(%rsp),%rcx
xorpd  %xmm2,%xmm2
mov    0x20(%rsp),%rdx
jmp    11d8 <BackSubstitute_Real_Vector+0xc8>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @BackSubstitute_Real_Vector(double* %0, double* %1, double* %2, i32 %3, double %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca [4 x double]
%17 = alloca [2 x double]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i32 %3, i32* %10
store double %4, double* %11
store i32 %5, i32* %12
%21 = load i32, i32* %10
store i32 %21, i32* %20
%22 = load double*, double** %7
%23 = load i32, i32* %10
%24 = load i32, i32* %12
%25 = mul nsw i32 %23, %24
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %22, i64 %26
store double* %27, double** %13
%28 = load double*, double** %13
%29 = load i32, i32* %10
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
store double 1.000000e+00, double* %31
%32 = load i32, i32* %10
%33 = sub nsw i32 %32, 1
store i32 %33, i32* %18
%34 = load i32, i32* %12
%35 = load double*, double** %13
%36 = sext i32 %34 to i64
%37 = sub i64 0, %36
%38 = getelementptr inbounds double, double* %35, i64 %37
store double* %38, double** %13
br label %39
39: ; preds = %252, %6
%40 = load i32, i32* %18
%41 = icmp sge i32 %40, 0
br i1 %41, label %42, label %260
42: ; preds = %39
%43 = load double*, double** %13
%44 = load i32, i32* %18
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %43, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %8
%49 = load i32, i32* %10
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
%52 = load double, double* %51
%53 = fsub double %47, %52
%54 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
store double %53, double* %54
%55 = load double*, double** %13
%56 = load i32, i32* %10
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
store double %59, double* %60
%61 = load double*, double** %7
%62 = load i32, i32* %12
%63 = load i32, i32* %20
%64 = mul nsw i32 %62, %63
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %61, i64 %65
store double* %66, double** %14
%67 = load i32, i32* %20
store i32 %67, i32* %19
br label %68
68: ; preds = %86, %42
%69 = load i32, i32* %19
%70 = load i32, i32* %10
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %93
72: ; preds = %68
%73 = load double*, double** %13
%74 = load i32, i32* %19
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %14
%79 = load i32, i32* %10
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%84 = load double, double* %83
%85 = call double @llvm.fmuladd.f64(double %77, double %82, double %84)
store double %85, double* %83
br label %86
86: ; preds = %72
%87 = load i32, i32* %19
%88 = add nsw i32 %87, 1
store i32 %88, i32* %19
%89 = load i32, i32* %12
%90 = load double*, double** %14
%91 = sext i32 %89 to i64
%92 = getelementptr inbounds double, double* %90, i64 %91
store double* %92, double** %14
br label %68
93: ; preds = %68
%94 = load double*, double** %9
%95 = load i32, i32* %18
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = fcmp olt double %98, 0.000000e+00
br i1 %99, label %100, label %107
100: ; preds = %93
%101 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
%102 = load double, double* %101
%103 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 3
store double %102, double* %103
%104 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%105 = load double, double* %104
%106 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 1
store double %105, double* %106
br label %251
107: ; preds = %93
%108 = load i32, i32* %18
store i32 %108, i32* %20
%109 = load double*, double** %9
%110 = load i32, i32* %18
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
%113 = load double, double* %112
%114 = fcmp oeq double %113, 0.000000e+00
br i1 %114, label %115, label %141
115: ; preds = %107
%116 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
%117 = load double, double* %116
%118 = fcmp une double %117, 0.000000e+00
br i1 %118, label %119, label %130
119: ; preds = %115
%120 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%121 = load double, double* %120
%122 = fneg double %121
%123 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
%124 = load double, double* %123
%125 = fdiv double %122, %124
%126 = load double*, double** %13
%127 = load i32, i32* %10
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
store double %125, double* %129
br label %140
130: ; preds = %115
%131 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%132 = load double, double* %131
%133 = fneg double %132
%134 = load double, double* %11
%135 = fdiv double %133, %134
%136 = load double*, double** %13
%137 = load i32, i32* %10
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
store double %135, double* %139
br label %140
140: ; preds = %130, %119
br label %250
141: ; preds = %107
%142 = load double*, double** %13
%143 = load i32, i32* %18
%144 = add nsw i32 %143, 1
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %142, i64 %145
%147 = load double, double* %146
%148 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 1
store double %147, double* %148
%149 = load double*, double** %13
%150 = load i32, i32* %12
%151 = load i32, i32* %18
%152 = add nsw i32 %150, %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %149, i64 %153
%155 = load double, double* %154
%156 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 2
store double %155, double* %156
%157 = load double*, double** %8
%158 = load i32, i32* %18
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %157, i64 %159
%161 = load double, double* %160
%162 = load double*, double** %8
%163 = load i32, i32* %10
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %162, i64 %164
%166 = load double, double* %165
%167 = fsub double %161, %166
store double %167, double* %15
%168 = load double, double* %15
%169 = load double, double* %15
%170 = fmul double %169, %168
store double %170, double* %15
%171 = load double*, double** %9
%172 = load i32, i32* %18
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %171, i64 %173
%175 = load double, double* %174
%176 = load double*, double** %9
%177 = load i32, i32* %18
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %176, i64 %178
%180 = load double, double* %179
%181 = load double, double* %15
%182 = call double @llvm.fmuladd.f64(double %175, double %180, double %181)
store double %182, double* %15
%183 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 1
%184 = load double, double* %183
%185 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 1
%186 = load double, double* %185
%187 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 3
%188 = load double, double* %187
%189 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%190 = load double, double* %189
%191 = fmul double %188, %190
%192 = fneg double %191
%193 = call double @llvm.fmuladd.f64(double %184, double %186, double %192)
%194 = load double, double* %15
%195 = fdiv double %193, %194
%196 = load double*, double** %13
%197 = load i32, i32* %10
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %196, i64 %198
store double %195, double* %199
%200 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 1
%201 = load double, double* %200
%202 = call i64 @fabs(double %201)
%203 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 3
%204 = load double, double* %203
%205 = call i64 @fabs(double %204)
%206 = icmp sgt i64 %202, %205
br i1 %206, label %207, label %228
207: ; preds = %141
%208 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%209 = load double, double* %208
%210 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 0
%211 = load double, double* %210
%212 = load double*, double** %13
%213 = load i32, i32* %10
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %212, i64 %214
%216 = load double, double* %215
%217 = call double @llvm.fmuladd.f64(double %211, double %216, double %209)
%218 = fneg double %217
%219 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 1
%220 = load double, double* %219
%221 = fdiv double %218, %220
%222 = load double*, double** %13
%223 = load i32, i32* %12
%224 = load i32, i32* %10
%225 = add nsw i32 %223, %224
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %222, i64 %226
store double %221, double* %227
br label %249
228: ; preds = %141
%229 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 1
%230 = load double, double* %229
%231 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 2
%232 = load double, double* %231
%233 = load double*, double** %13
%234 = load i32, i32* %10
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = call double @llvm.fmuladd.f64(double %232, double %237, double %230)
%239 = fneg double %238
%240 = getelementptr inbounds [4 x double], [4 x double]* %16, i64 0, i64 3
%241 = load double, double* %240
%242 = fdiv double %239, %241
%243 = load double*, double** %13
%244 = load i32, i32* %12
%245 = load i32, i32* %10
%246 = add nsw i32 %244, %245
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds double, double* %243, i64 %247
store double %242, double* %248
br label %249
249: ; preds = %228, %207
br label %250
250: ; preds = %249, %140
br label %251
251: ; preds = %250, %100
br label %252
252: ; preds = %251
%253 = load i32, i32* %18
%254 = add nsw i32 %253, -1
store i32 %254, i32* %18
%255 = load i32, i32* %12
%256 = load double*, double** %13
%257 = sext i32 %255 to i64
%258 = sub i64 0, %257
%259 = getelementptr inbounds double, double* %256, i64 %258
store double* %259, double** %13
br label %39
260: ; preds = %39
ret void
}

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