void get_complex_evec(m, evr, evm, br, bm, n, maxit, err, ierr) double *m, *br,
    *bm;
double evr, evm, err;
int n, maxit, *ierr;
{
  double *a, *anew;
  int *ipivot;
  double *b, *bp;
  int nn = 2 * n;
  int i, j, k;
  a = (double *)malloc(nn * nn * sizeof(double));
  anew = (double *)malloc(nn * nn * sizeof(double));
  b = (double *)malloc(nn * sizeof(double));
  bp = (double *)malloc(nn * sizeof(double));
  ipivot = (int *)malloc(nn * sizeof(int));
  for (i = 0; i < nn; i++) {
    for (j = 0; j < nn; j++) {
      k = j * nn + i;
      a[k] = 0.0;
      if ((j < n) && (i < n))
        a[k] = m[k];
      if ((j >= n) && (i >= n))
        a[k] = m[(j - n) * nn + (i - n)];
      if (i == j)
        a[k] = a[k] - evr;
      if ((i - n) == j)
        a[k] = evm;
      if ((j - n) == i)
        a[k] = -evm;
    }
  }
  get_evec(a, anew, b, bp, nn, maxit, err, ipivot, 0.0, ierr);
  if (*ierr == 0) {
    for (i = 0; i < n; i++) {
      br[i] = b[i];
      bm[i] = b[i + n];
    }
  }
  free(a);
  free(anew);
  free(b);
  free(bp);
  free(ipivot);
}


x86 assembly (clang, -O0):
<get_complex_evec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
mov    %r8d,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
imul   -0x6c(%rbp),%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x6c(%rbp),%eax
imul   -0x6c(%rbp),%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    132d <get_complex_evec+0x1fd>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    131a <get_complex_evec+0x1ea>
mov    -0x74(%rbp),%eax
imul   -0x6c(%rbp),%eax
add    -0x70(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1240 <get_complex_evec+0x110>
mov    -0x70(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1240 <get_complex_evec+0x110>
mov    -0x8(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jl     1283 <get_complex_evec+0x153>
mov    -0x70(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jl     1283 <get_complex_evec+0x153>
mov    -0x8(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
mov    -0x70(%rbp),%edx
sub    -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
cmp    -0x74(%rbp),%eax
jne    12ae <get_complex_evec+0x17e>
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x10(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
sub    -0x2c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jne    12cf <get_complex_evec+0x19f>
movsd  -0x18(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
sub    -0x2c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jne    1307 <get_complex_evec+0x1d7>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    130c <get_complex_evec+0x1dc>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11e5 <get_complex_evec+0xb5>
jmp    131f <get_complex_evec+0x1ef>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    11d2 <get_complex_evec+0xa2>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x6c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
movsd  -0x38(%rbp),%xmm0
mov    -0x58(%rbp),%r10
mov    -0x40(%rbp),%rax
xorps  %xmm1,%xmm1
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x2,%al
call   1050 <get_evec@plt>
mov    -0x40(%rbp),%rax
cmpl   $0x0,(%rax)
jne    13d1 <get_complex_evec+0x2a1>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13cc <get_complex_evec+0x29c>
mov    -0x60(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
mov    -0x70(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1379 <get_complex_evec+0x249>
jmp    13d1 <get_complex_evec+0x2a1>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_complex_evec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,0x48(%rsp)
movsd  %xmm2,0x40(%rsp)
mov    %r8d,0x14(%rsp)
mov    %ecx,%r14d
mov    %rdx,0x50(%rsp)
mov    %rsi,%r13
movapd %xmm1,0x60(%rsp)
movsd  %xmm0,0x38(%rsp)
mov    %rdi,%r12
lea    (%r14,%r14,1),%eax
mov    %eax,%ebp
mov    %eax,%ebx
mov    %eax,0x10(%rsp)
imul   %ebp,%ebp
shl    $0x3,%rbp
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,0x58(%rsp)
movslq %ebx,%rbx
lea    0x0(,%rbx,8),%r15
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,0x30(%rsp)
lea    0x0(,%rbx,4),%rdi
call   1040 <malloc@plt>
movsd  0x38(%rsp),%xmm3
movapd 0x60(%rsp),%xmm2
mov    %rax,0x28(%rsp)
mov    %r14d,%ebp
mov    %r14,0x8(%rsp)
test   %r14d,%r14d
mov    0x10(%rsp),%r8d
jle    12d2 <get_complex_evec+0x1a2>
movapd 0xe0a(%rip),%xmm0
xorpd  %xmm2,%xmm0
cmp    $0x2,%r8d
mov    $0x1,%r10d
cmovge %r8d,%r10d
mov    0x8(%rsp),%r11
neg    %r11d
imul   %rbp,%rbx
shl    $0x3,%rbx
mov    %r12,%r14
sub    %rbx,%r14
xor    %esi,%esi
mov    0x20(%rsp),%rdi
mov    %r11d,%eax
jmp    124a <get_complex_evec+0x11a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0x1,%ebx
add    $0x8,%rdi
add    $0x8,%r12
mov    %ebx,%eax
cmp    %r10,%rsi
je     12d2 <get_complex_evec+0x1a2>
mov    %eax,%ebx
cltq
lea    (%r14,%rax,8),%r9
xor    %edx,%edx
xor    %eax,%eax
jmp    1271 <get_complex_evec+0x141>
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,(%rdi,%rdx,1)
add    $0x1,%rax
add    %r15,%rdx
cmp    %rax,%r10
je     1230 <get_complex_evec+0x100>
movq   $0x0,(%rdi,%rdx,1)
xorpd  %xmm1,%xmm1
cmp    %rbp,%rax
jae    1292 <get_complex_evec+0x162>
cmp    %rbp,%rsi
jae    1292 <get_complex_evec+0x162>
movsd  (%r12,%rdx,1),%xmm1
movsd  %xmm1,(%rdi,%rdx,1)
cmp    %rbp,%rax
jb     12a7 <get_complex_evec+0x177>
cmp    %rbp,%rsi
jb     12a7 <get_complex_evec+0x177>
movsd  (%r9,%rdx,1),%xmm1
movsd  %xmm1,(%rdi,%rdx,1)
cmp    %rax,%rsi
jne    12b5 <get_complex_evec+0x185>
subsd  %xmm3,%xmm1
movsd  %xmm1,(%rdi,%rdx,1)
lea    (%r11,%rax,1),%ecx
cmp    %rax,%rbx
je     12c3 <get_complex_evec+0x193>
cmp    %rcx,%rsi
jne    1265 <get_complex_evec+0x135>
movapd %xmm0,%xmm1
cmp    %rcx,%rsi
je     1260 <get_complex_evec+0x130>
movapd %xmm2,%xmm1
jmp    1260 <get_complex_evec+0x130>
xorpd  %xmm1,%xmm1
mov    0x20(%rsp),%r15
mov    %r15,%rdi
mov    0x58(%rsp),%r12
mov    %r12,%rsi
mov    0x18(%rsp),%rbx
mov    %rbx,%rdx
mov    0x30(%rsp),%rcx
mov    0x14(%rsp),%r9d
movsd  0x40(%rsp),%xmm0
mov    $0x2,%al
mov    0x48(%rsp),%r14
push   %r14
push   0x30(%rsp)
call   1050 <get_evec@plt>
add    $0x10,%rsp
cmpl   $0x0,(%r14)
mov    0x50(%rsp),%r8
jne    14a7 <get_complex_evec+0x377>
cmpl   $0x0,0x8(%rsp)
jle    14a7 <get_complex_evec+0x377>
cmpl   $0x4,0x8(%rsp)
jb     1352 <get_complex_evec+0x222>
lea    (%r8,%rbp,8),%rax
cmp    %r13,%rax
jbe    13cf <get_complex_evec+0x29f>
lea    0x0(,%rbp,8),%rax
add    %r13,%rax
cmp    %r8,%rax
jbe    13cf <get_complex_evec+0x29f>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
test   $0x1,%bpl
je     137f <get_complex_evec+0x24f>
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
lea    (%rax,%rbp,1),%rdx
movsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,(%r8,%rax,8)
or     $0x1,%rax
add    %rbp,%rcx
je     14a7 <get_complex_evec+0x377>
lea    (%rbx,%rbp,8),%rcx
add    $0x8,%rcx
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
movsd  -0x8(%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r8,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r13,%rax,8)
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r8,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    1390 <get_complex_evec+0x260>
jmp    14a7 <get_complex_evec+0x377>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1463 <get_complex_evec+0x333>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
lea    0x30(%rbx),%rdi
lea    (%rbx,%rbp,8),%rbx
add    $0x30,%rbx
xor    %edx,%edx
nopl   (%rax)
movups -0x30(%rdi,%rdx,8),%xmm0
movups -0x20(%rdi,%rdx,8),%xmm1
movups %xmm0,0x0(%r13,%rdx,8)
movups %xmm1,0x10(%r13,%rdx,8)
movups -0x30(%rbx,%rdx,8),%xmm0
movups -0x20(%rbx,%rdx,8),%xmm1
movups %xmm0,(%r8,%rdx,8)
movups %xmm1,0x10(%r8,%rdx,8)
movups -0x10(%rdi,%rdx,8),%xmm0
movups (%rdi,%rdx,8),%xmm1
movups %xmm0,0x20(%r13,%rdx,8)
movups %xmm1,0x30(%r13,%rdx,8)
movups -0x10(%rbx,%rdx,8),%xmm0
movupd (%rbx,%rdx,8),%xmm1
movups %xmm0,0x20(%r8,%rdx,8)
movupd %xmm1,0x30(%r8,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1400 <get_complex_evec+0x2d0>
jmp    1465 <get_complex_evec+0x335>
xor    %edx,%edx
test   $0x1,%cl
mov    0x18(%rsp),%rbx
je     149e <get_complex_evec+0x36e>
movups (%rbx,%rdx,8),%xmm0
movups 0x10(%rbx,%rdx,8),%xmm1
movups %xmm0,0x0(%r13,%rdx,8)
movups %xmm1,0x10(%r13,%rdx,8)
lea    (%rdx,%rbp,1),%rcx
movups (%rbx,%rcx,8),%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm1
movups %xmm0,(%r8,%rdx,8)
movupd %xmm1,0x10(%r8,%rdx,8)
cmp    %rbp,%rax
jne    1354 <get_complex_evec+0x224>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @get_complex_evec(double* nocapture %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, i32 %5, i32 %6, double %7, i32* %8) {
%10 = shl nsw i32 %5, 1
%11 = mul nsw i32 %10, %10
%12 = zext i32 %11 to i64
%13 = shl nuw nsw i64 %12, 3
%14 = tail call i8* @malloc(i64 %13)
%15 = bitcast i8* %14 to double*
%16 = tail call i8* @malloc(i64 %13)
%17 = bitcast i8* %16 to double*
%18 = sext i32 %10 to i64
%19 = shl nsw i64 %18, 3
%20 = tail call i8* @malloc(i64 %19)
%21 = bitcast i8* %20 to double*
%22 = tail call i8* @malloc(i64 %19)
%23 = bitcast i8* %22 to double*
%24 = shl nsw i64 %18, 2
%25 = tail call i8* @malloc(i64 %24)
%26 = bitcast i8* %25 to i32*
%27 = icmp sgt i32 %5, 0
br i1 %27, label %28, label %81
28: ; preds = %9
%29 = fneg double %2
%30 = zext i32 %5 to i64
%31 = call i32 @llvm.smax.i32(i32 %10, i32 1)
%32 = zext i32 %31 to i64
br label %33
33: ; preds = %78, %28
%34 = phi i64 [ 0, %28 ], [ %79, %78 ]
%35 = icmp ult i64 %34, %30
%36 = trunc i64 %34 to i32
%37 = sub i32 %36, %5
%38 = sext i32 %37 to i64
%39 = trunc i64 %34 to i32
%40 = sub i32 %39, %5
%41 = zext i32 %40 to i64
br label %42
42: ; preds = %33, %75
%43 = phi i64 [ 0, %33 ], [ %76, %75 ]
%44 = mul nsw i64 %43, %18
%45 = add nsw i64 %44, %34
%46 = getelementptr inbounds double, double* %15, i64 %45
store double 0.000000e+00, double* %46
%47 = icmp ult i64 %43, %30
%48 = select i1 %47, i1 %35, i1 false
br i1 %48, label %49, label %52
49: ; preds = %42
%50 = getelementptr inbounds double, double* %0, i64 %45
%51 = load double, double* %50
store double %51, double* %46
br label %52
52: ; preds = %49, %42
%53 = phi double [ %51, %49 ], [ 0.000000e+00, %42 ]
%54 = select i1 %47, i1 true, i1 %35
br i1 %54, label %61, label %55
55: ; preds = %52
%56 = sub nsw i64 %43, %30
%57 = mul nsw i64 %56, %18
%58 = add nsw i64 %57, %38
%59 = getelementptr inbounds double, double* %0, i64 %58
%60 = load double, double* %59
store double %60, double* %46
br label %61
61: ; preds = %55, %52
%62 = phi double [ %60, %55 ], [ %53, %52 ]
%63 = icmp eq i64 %34, %43
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = fsub double %62, %1
store double %65, double* %46
br label %66
66: ; preds = %64, %61
%67 = icmp eq i64 %43, %41
%68 = trunc i64 %43 to i32
%69 = sub i32 %68, %5
%70 = zext i32 %69 to i64
%71 = icmp eq i64 %34, %70
%72 = or i1 %67, %71
br i1 %72, label %73, label %75
73: ; preds = %66
%74 = select i1 %71, double %29, double %2
store double %74, double* %46
br label %75
75: ; preds = %66, %73
%76 = add nuw nsw i64 %43, 1
%77 = icmp eq i64 %76, %32
br i1 %77, label %78, label %42
78: ; preds = %75
%79 = add nuw nsw i64 %34, 1
%80 = icmp eq i64 %79, %32
br i1 %80, label %81, label %33
81: ; preds = %78, %9
%82 = tail call i32 (double*, double*, double*, double*, i32, i32, double, i32*, double, i32*, ...) bitcast (i32 (...)* @get_evec to i32 (double*, double*, double*, double*, i32, i32, double, i32*, double, i32*, ...)*)(double* %15, double* %17, double* %21, double* %23, i32 %10, i32 %6, double %7, i32* %26, double 0.000000e+00, i32* %8)
%83 = load i32, i32* %8
%84 = icmp eq i32 %83, 0
%85 = and i1 %84, %27
br i1 %85, label %86, label %218
86: ; preds = %81
%87 = zext i32 %5 to i64
%88 = zext i32 %5 to i64
%89 = icmp ult i32 %5, 4
br i1 %89, label %181, label %90
90: ; preds = %86
%91 = getelementptr double, double* %3, i64 %88
%92 = getelementptr double, double* %4, i64 %88
%93 = icmp ugt double* %92, %3
%94 = icmp ugt double* %91, %4
%95 = and i1 %93, %94
br i1 %95, label %181, label %96
96: ; preds = %90
%97 = and i64 %88, 4294967292
%98 = add nsw i64 %97, -4
%99 = lshr exact i64 %98, 2
%100 = add nuw nsw i64 %99, 1
%101 = and i64 %100, 1
%102 = icmp eq i64 %98, 0
br i1 %102, label %154, label %103
103: ; preds = %96
%104 = and i64 %100, 9223372036854775806
br label %105
105: ; preds = %105, %103
%106 = phi i64 [ 0, %103 ], [ %151, %105 ]
%107 = phi i64 [ 0, %103 ], [ %152, %105 ]
%108 = getelementptr inbounds double, double* %21, i64 %106
%109 = bitcast double* %108 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = getelementptr inbounds double, double* %108, i64 2
%112 = bitcast double* %111 to <2 x double>*
%113 = load <2 x double>, <2 x double>* %112
%114 = getelementptr inbounds double, double* %3, i64 %106
%115 = bitcast double* %114 to <2 x double>*
store <2 x double> %110, <2 x double>* %115
%116 = getelementptr inbounds double, double* %114, i64 2
%117 = bitcast double* %116 to <2 x double>*
store <2 x double> %113, <2 x double>* %117
%118 = add nuw nsw i64 %106, %87
%119 = getelementptr inbounds double, double* %21, i64 %118
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds double, double* %119, i64 2
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = getelementptr inbounds double, double* %4, i64 %106
%126 = bitcast double* %125 to <2 x double>*
store <2 x double> %121, <2 x double>* %126
%127 = getelementptr inbounds double, double* %125, i64 2
%128 = bitcast double* %127 to <2 x double>*
store <2 x double> %124, <2 x double>* %128
%129 = or i64 %106, 4
%130 = getelementptr inbounds double, double* %21, i64 %129
%131 = bitcast double* %130 to <2 x double>*
%132 = load <2 x double>, <2 x double>* %131
%133 = getelementptr inbounds double, double* %130, i64 2
%134 = bitcast double* %133 to <2 x double>*
%135 = load <2 x double>, <2 x double>* %134
%136 = getelementptr inbounds double, double* %3, i64 %129
%137 = bitcast double* %136 to <2 x double>*
store <2 x double> %132, <2 x double>* %137
%138 = getelementptr inbounds double, double* %136, i64 2
%139 = bitcast double* %138 to <2 x double>*
store <2 x double> %135, <2 x double>* %139
%140 = add nuw nsw i64 %129, %87
%141 = getelementptr inbounds double, double* %21, i64 %140
%142 = bitcast double* %141 to <2 x double>*
%143 = load <2 x double>, <2 x double>* %142
%144 = getelementptr inbounds double, double* %141, i64 2
%145 = bitcast double* %144 to <2 x double>*
%146 = load <2 x double>, <2 x double>* %145
%147 = getelementptr inbounds double, double* %4, i64 %129
%148 = bitcast double* %147 to <2 x double>*
store <2 x double> %143, <2 x double>* %148
%149 = getelementptr inbounds double, double* %147, i64 2
%150 = bitcast double* %149 to <2 x double>*
store <2 x double> %146, <2 x double>* %150
%151 = add nuw i64 %106, 8
%152 = add i64 %107, 2
%153 = icmp eq i64 %152, %104
br i1 %153, label %154, label %105
154: ; preds = %105, %96
%155 = phi i64 [ 0, %96 ], [ %151, %105 ]
%156 = icmp eq i64 %101, 0
br i1 %156, label %179, label %157
157: ; preds = %154
%158 = getelementptr inbounds double, double* %21, i64 %155
%159 = bitcast double* %158 to <2 x double>*
%160 = load <2 x double>, <2 x double>* %159
%161 = getelementptr inbounds double, double* %158, i64 2
%162 = bitcast double* %161 to <2 x double>*
%163 = load <2 x double>, <2 x double>* %162
%164 = getelementptr inbounds double, double* %3, i64 %155
%165 = bitcast double* %164 to <2 x double>*
store <2 x double> %160, <2 x double>* %165
%166 = getelementptr inbounds double, double* %164, i64 2
%167 = bitcast double* %166 to <2 x double>*
store <2 x double> %163, <2 x double>* %167
%168 = add nuw nsw i64 %155, %87
%169 = getelementptr inbounds double, double* %21, i64 %168
%170 = bitcast double* %169 to <2 x double>*
%171 = load <2 x double>, <2 x double>* %170
%172 = getelementptr inbounds double, double* %169, i64 2
%173 = bitcast double* %172 to <2 x double>*
%174 = load <2 x double>, <2 x double>* %173
%175 = getelementptr inbounds double, double* %4, i64 %155
%176 = bitcast double* %175 to <2 x double>*
store <2 x double> %171, <2 x double>* %176
%177 = getelementptr inbounds double, double* %175, i64 2
%178 = bitcast double* %177 to <2 x double>*
store <2 x double> %174, <2 x double>* %178
br label %179
179: ; preds = %154, %157
%180 = icmp eq i64 %97, %88
br i1 %180, label %218, label %181
181: ; preds = %90, %86, %179
%182 = phi i64 [ 0, %90 ], [ 0, %86 ], [ %97, %179 ]
%183 = xor i64 %182, -1
%184 = and i64 %87, 1
%185 = icmp eq i64 %184, 0
br i1 %185, label %195, label %186
186: ; preds = %181
%187 = getelementptr inbounds double, double* %21, i64 %182
%188 = load double, double* %187
%189 = getelementptr inbounds double, double* %3, i64 %182
store double %188, double* %189
%190 = add nuw nsw i64 %182, %87
%191 = getelementptr inbounds double, double* %21, i64 %190
%192 = load double, double* %191
%193 = getelementptr inbounds double, double* %4, i64 %182
store double %192, double* %193
%194 = or i64 %182, 1
br label %195
195: ; preds = %186, %181
%196 = phi i64 [ %182, %181 ], [ %194, %186 ]
%197 = sub nsw i64 0, %87
%198 = icmp eq i64 %183, %197
br i1 %198, label %218, label %199
199: ; preds = %195, %199
%200 = phi i64 [ %216, %199 ], [ %196, %195 ]
%201 = getelementptr inbounds double, double* %21, i64 %200
%202 = load double, double* %201
%203 = getelementptr inbounds double, double* %3, i64 %200
store double %202, double* %203
%204 = add nuw nsw i64 %200, %87
%205 = getelementptr inbounds double, double* %21, i64 %204
%206 = load double, double* %205
%207 = getelementptr inbounds double, double* %4, i64 %200
store double %206, double* %207
%208 = add nuw nsw i64 %200, 1
%209 = getelementptr inbounds double, double* %21, i64 %208
%210 = load double, double* %209
%211 = getelementptr inbounds double, double* %3, i64 %208
store double %210, double* %211
%212 = add nuw nsw i64 %208, %87
%213 = getelementptr inbounds double, double* %21, i64 %212
%214 = load double, double* %213
%215 = getelementptr inbounds double, double* %4, i64 %208
store double %214, double* %215
%216 = add nuw nsw i64 %200, 2
%217 = icmp eq i64 %216, %88
br i1 %217, label %218, label %199
218: ; preds = %195, %199, %179, %81
tail call void @free(i8* %14)
tail call void @free(i8* %16)
tail call void @free(i8* %20)
tail call void @free(i8* %22)
tail call void @free(i8* %25)
ret void
}