void unbalance(int n, double **vr, double **vi, int low, int hi,
               double *scale) {
  int i, j, k;
  double tmp;
  for (i = low; i <= hi; i++) {
    for (j = 0; j < n; j++) {
      vr[i][j] *= scale[i];
      vi[i][j] *= scale[i];
    }
  }
  for (i = low - 1; i >= 0; i--) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[i][j];
        vr[i][j] = vr[k][j];
        vr[k][j] = tmp;
        tmp = vi[i][j];
        vi[i][j] = vi[k][j];
        vi[k][j] = tmp;
      }
    }
  }
  for (i = hi + 1; i < n; i++) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[i][j];
        vr[i][j] = vr[k][j];
        vr[k][j] = tmp;
        tmp = vi[i][j];
        vi[i][j] = vi[k][j];
        vi[k][j] = tmp;
      }
    }
  }
}


x86 assembly (clang, -O0):
<unbalance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11ae <unbalance+0xae>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119b <unbalance+0x9b>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1133 <unbalance+0x33>
jmp    11a0 <unbalance+0xa0>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1120 <unbalance+0x20>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     12cf <unbalance+0x1cf>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cvttsd2si (%rax,%rcx,8),%eax
mov    %eax,-0x34(%rbp)
cmp    -0x2c(%rbp),%eax
je     12bc <unbalance+0x1bc>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12b7 <unbalance+0x1b7>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e1 <unbalance+0xe1>
jmp    12bc <unbalance+0x1bc>
jmp    12c1 <unbalance+0x1c1>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b7 <unbalance+0xb7>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13f2 <unbalance+0x2f2>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cvttsd2si (%rax,%rcx,8),%eax
mov    %eax,-0x34(%rbp)
cmp    -0x2c(%rbp),%eax
je     13df <unbalance+0x2df>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13da <unbalance+0x2da>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1304 <unbalance+0x204>
jmp    13df <unbalance+0x2df>
jmp    13e4 <unbalance+0x2e4>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12d8 <unbalance+0x1d8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unbalance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %edi,%r10d
mov    %r8,-0x10(%rsp)
mov    %ecx,-0x54(%rsp)
cmp    %r8d,%ecx
mov    %rdx,-0x50(%rsp)
mov    %rsi,-0x60(%rsp)
mov    %edi,-0x64(%rsp)
jle    16ab <unbalance+0x5ab>
mov    -0x54(%rsp),%eax
test   %eax,%eax
jle    13f6 <unbalance+0x2f6>
mov    %eax,%r15d
mov    %r10d,%eax
and    $0xfffffffc,%eax
mov    %rax,-0x8(%rsp)
mov    %r10,%rax
neg    %rax
mov    %rax,-0x18(%rsp)
lea    0x0(,%r10,8),%r12
and    $0xffffffffffffffe0,%r12
jmp    116a <unbalance+0x6a>
cmp    $0x1,%r14
jle    13f6 <unbalance+0x2f6>
mov    %r15,%r14
add    $0xffffffffffffffff,%r15
mov    %r15d,%eax
cvttsd2si (%r9,%rax,8),%ecx
cmp    %ecx,%r15d
je     1160 <unbalance+0x60>
test   %edi,%edi
jle    1160 <unbalance+0x60>
mov    (%rsi,%rax,8),%r8
movslq %ecx,%rcx
mov    (%rsi,%rcx,8),%rbp
mov    (%rdx,%rax,8),%rax
mov    (%rdx,%rcx,8),%rcx
cmp    $0x4,%edi
jae    1280 <unbalance+0x180>
xor    %r11d,%r11d
mov    %r11,%r13
test   $0x1,%r10b
je     11e4 <unbalance+0xe4>
movsd  (%r8,%r11,8),%xmm0
movsd  0x0(%rbp,%r11,8),%xmm1
movsd  %xmm1,(%r8,%r11,8)
movsd  %xmm0,0x0(%rbp,%r11,8)
movsd  (%rax,%r11,8),%xmm0
movsd  (%rcx,%r11,8),%xmm1
movsd  %xmm1,(%rax,%r11,8)
movsd  %xmm0,(%rcx,%r11,8)
mov    %r11,%r13
or     $0x1,%r13
not    %r11
cmp    -0x18(%rsp),%r11
je     1160 <unbalance+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r8,%r13,8),%xmm0
movsd  0x0(%rbp,%r13,8),%xmm1
movsd  %xmm1,(%r8,%r13,8)
movsd  %xmm0,0x0(%rbp,%r13,8)
movsd  (%rax,%r13,8),%xmm0
movsd  (%rcx,%r13,8),%xmm1
movsd  %xmm1,(%rax,%r13,8)
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x8(%r8,%r13,8),%xmm0
movsd  0x8(%rbp,%r13,8),%xmm1
movsd  %xmm1,0x8(%r8,%r13,8)
movsd  %xmm0,0x8(%rbp,%r13,8)
movsd  0x8(%rax,%r13,8),%xmm0
movsd  0x8(%rcx,%r13,8),%xmm1
movsd  %xmm1,0x8(%rax,%r13,8)
movsd  %xmm0,0x8(%rcx,%r13,8)
add    $0x2,%r13
cmp    %r13,%r10
jne    1200 <unbalance+0x100>
jmp    1160 <unbalance+0x60>
nopl   0x0(%rax,%rax,1)
lea    (%r8,%r10,8),%rdx
lea    0x0(,%r10,8),%rsi
add    %rbp,%rsi
lea    (%rax,%r10,8),%rdi
lea    (%rcx,%r10,8),%r13
cmp    %rsi,%r8
setb   -0x28(%rsp)
cmp    %rdx,%rbp
setb   -0x30(%rsp)
cmp    %rdi,%r8
setb   %bl
cmp    %rdx,%rax
setb   -0x38(%rsp)
cmp    %r13,%r8
setb   %r11b
cmp    %rdx,%rcx
setb   -0x40(%rsp)
cmp    %rdi,%rbp
setb   -0x54(%rsp)
cmp    %rsi,%rax
setb   -0x48(%rsp)
cmp    %r13,%rbp
setb   -0x65(%rsp)
cmp    %rsi,%rcx
setb   -0x20(%rsp)
cmp    %r13,%rax
setb   %sil
cmp    %rdi,%rcx
setb   %r13b
mov    -0x30(%rsp),%dl
test   %dl,-0x28(%rsp)
jne    13e0 <unbalance+0x2e0>
and    -0x38(%rsp),%bl
mov    -0x64(%rsp),%edi
jne    13ce <unbalance+0x2ce>
and    -0x40(%rsp),%r11b
jne    13ce <unbalance+0x2ce>
mov    -0x48(%rsp),%dl
and    %dl,-0x54(%rsp)
jne    13ce <unbalance+0x2ce>
mov    -0x20(%rsp),%dl
and    %dl,-0x65(%rsp)
mov    -0x50(%rsp),%rdx
jne    13c1 <unbalance+0x2c1>
mov    $0x0,%r11d
and    %r13b,%sil
mov    -0x60(%rsp),%rsi
jne    11a2 <unbalance+0xa2>
xor    %ebx,%ebx
movups (%r8,%rbx,1),%xmm0
movups 0x10(%r8,%rbx,1),%xmm1
movups 0x0(%rbp,%rbx,1),%xmm2
movups 0x10(%rbp,%rbx,1),%xmm3
movups %xmm2,(%r8,%rbx,1)
movups %xmm3,0x10(%r8,%rbx,1)
movups %xmm0,0x0(%rbp,%rbx,1)
movups %xmm1,0x10(%rbp,%rbx,1)
movupd (%rax,%rbx,1),%xmm0
movupd 0x10(%rax,%rbx,1),%xmm1
movups (%rcx,%rbx,1),%xmm2
movups 0x10(%rcx,%rbx,1),%xmm3
movups %xmm2,(%rax,%rbx,1)
movups %xmm3,0x10(%rax,%rbx,1)
movupd %xmm0,(%rcx,%rbx,1)
movupd %xmm1,0x10(%rcx,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r12
jne    1350 <unbalance+0x250>
mov    -0x8(%rsp),%rbx
mov    %rbx,%r11
cmp    %r10,%rbx
je     1160 <unbalance+0x60>
jmp    11a2 <unbalance+0xa2>
xor    %r11d,%r11d
mov    -0x60(%rsp),%rsi
jmp    11a2 <unbalance+0xa2>
xor    %r11d,%r11d
mov    -0x50(%rsp),%rdx
mov    -0x60(%rsp),%rsi
jmp    11a2 <unbalance+0xa2>
xor    %r11d,%r11d
mov    -0x50(%rsp),%rdx
mov    -0x60(%rsp),%rsi
mov    -0x64(%rsp),%edi
jmp    11a2 <unbalance+0xa2>
mov    -0x10(%rsp),%rax
add    $0x1,%eax
cmp    %edi,%eax
jge    16a0 <unbalance+0x5a0>
mov    %rsi,%r11
movslq %eax,%r15
mov    %r10d,%eax
and    $0xfffffffc,%eax
mov    %rax,-0x20(%rsp)
mov    %r10,%rax
neg    %rax
mov    %rax,-0x48(%rsp)
lea    0x0(,%r10,8),%rsi
and    $0xffffffffffffffe0,%rsi
jmp    143d <unbalance+0x33d>
add    $0x1,%r15
cmp    %edi,%r15d
je     16a0 <unbalance+0x5a0>
cvttsd2si (%r9,%r15,8),%eax
cmp    %eax,%r15d
je     1430 <unbalance+0x330>
test   %edi,%edi
jle    1430 <unbalance+0x330>
mov    %r11,%rcx
mov    (%r11,%r15,8),%r13
cltq
mov    (%r11,%rax,8),%r14
mov    -0x50(%rsp),%rdx
mov    (%rdx,%r15,8),%rcx
mov    (%rdx,%rax,8),%rax
cmp    $0x4,%edi
jae    1480 <unbalance+0x380>
xor    %r12d,%r12d
jmp    15e0 <unbalance+0x4e0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x0(,%r10,8),%rdi
add    %r13,%rdi
lea    (%r14,%r10,8),%rbp
lea    (%rcx,%r10,8),%r11
lea    (%rax,%r10,8),%r8
cmp    %rbp,%r13
setb   -0x28(%rsp)
cmp    %rdi,%r14
setb   -0x30(%rsp)
cmp    %r11,%r13
setb   %r12b
cmp    %rdi,%rcx
setb   -0x38(%rsp)
cmp    %r8,%r13
setb   %bl
cmp    %rdi,%rax
setb   -0x40(%rsp)
cmp    %r11,%r14
setb   %dil
cmp    %rbp,%rcx
setb   -0x54(%rsp)
cmp    %r8,%r14
setb   -0x18(%rsp)
cmp    %rbp,%rax
setb   -0x65(%rsp)
cmp    %r8,%rcx
setb   %bpl
cmp    %r11,%rax
setb   %r8b
mov    -0x30(%rsp),%dl
test   %dl,-0x28(%rsp)
jne    15c7 <unbalance+0x4c7>
and    -0x38(%rsp),%r12b
jne    15c7 <unbalance+0x4c7>
and    -0x40(%rsp),%bl
jne    15c7 <unbalance+0x4c7>
and    -0x54(%rsp),%dil
mov    -0x60(%rsp),%r11
jne    15c2 <unbalance+0x4c2>
mov    -0x65(%rsp),%bl
and    %bl,-0x18(%rsp)
jne    15c2 <unbalance+0x4c2>
mov    $0x0,%r12d
and    %r8b,%bpl
mov    -0x64(%rsp),%edi
jne    15e0 <unbalance+0x4e0>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movups 0x0(%r13,%rbp,1),%xmm0
movups 0x10(%r13,%rbp,1),%xmm1
movups (%r14,%rbp,1),%xmm2
movups 0x10(%r14,%rbp,1),%xmm3
movups %xmm2,0x0(%r13,%rbp,1)
movups %xmm3,0x10(%r13,%rbp,1)
movups %xmm0,(%r14,%rbp,1)
movups %xmm1,0x10(%r14,%rbp,1)
movupd (%rcx,%rbp,1),%xmm0
movupd 0x10(%rcx,%rbp,1),%xmm1
movups (%rax,%rbp,1),%xmm2
movups 0x10(%rax,%rbp,1),%xmm3
movups %xmm2,(%rcx,%rbp,1)
movups %xmm3,0x10(%rcx,%rbp,1)
movupd %xmm0,(%rax,%rbp,1)
movupd %xmm1,0x10(%rax,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rsi
jne    1550 <unbalance+0x450>
mov    -0x20(%rsp),%rbp
mov    %rbp,%r12
cmp    %r10,%rbp
je     1430 <unbalance+0x330>
jmp    15e0 <unbalance+0x4e0>
xor    %r12d,%r12d
jmp    15cf <unbalance+0x4cf>
xor    %r12d,%r12d
mov    -0x60(%rsp),%r11
mov    -0x64(%rsp),%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rbp
test   $0x1,%r10b
je     1622 <unbalance+0x522>
movsd  0x0(%r13,%r12,8),%xmm0
movsd  (%r14,%r12,8),%xmm1
movsd  %xmm1,0x0(%r13,%r12,8)
movsd  %xmm0,(%r14,%r12,8)
movsd  (%rcx,%r12,8),%xmm0
movsd  (%rax,%r12,8),%xmm1
movsd  %xmm1,(%rcx,%r12,8)
movsd  %xmm0,(%rax,%r12,8)
mov    %r12,%rbp
or     $0x1,%rbp
not    %r12
cmp    -0x48(%rsp),%r12
je     1430 <unbalance+0x330>
movsd  0x0(%r13,%rbp,8),%xmm0
movsd  (%r14,%rbp,8),%xmm1
movsd  %xmm1,0x0(%r13,%rbp,8)
movsd  %xmm0,(%r14,%rbp,8)
movsd  (%rcx,%rbp,8),%xmm0
movsd  (%rax,%rbp,8),%xmm1
movsd  %xmm1,(%rcx,%rbp,8)
movsd  %xmm0,(%rax,%rbp,8)
movsd  0x8(%r13,%rbp,8),%xmm0
movsd  0x8(%r14,%rbp,8),%xmm1
movsd  %xmm1,0x8(%r13,%rbp,8)
movsd  %xmm0,0x8(%r14,%rbp,8)
movsd  0x8(%rcx,%rbp,8),%xmm0
movsd  0x8(%rax,%rbp,8),%xmm1
movsd  %xmm1,0x8(%rcx,%rbp,8)
movsd  %xmm0,0x8(%rax,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%r10
jne    1630 <unbalance+0x530>
jmp    1430 <unbalance+0x330>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movslq -0x54(%rsp),%rax
mov    -0x10(%rsp),%rcx
lea    0x1(%rcx),%r11d
lea    0x1(%rax),%rcx
mov    %rcx,-0x28(%rsp)
mov    %r10d,%ecx
and    $0xfffffffe,%ecx
mov    %rcx,-0x30(%rsp)
add    $0xfffffffffffffffe,%rcx
mov    %rcx,-0x38(%rsp)
mov    %rcx,%rbp
shr    %rbp
add    $0x1,%rbp
mov    %rbp,%rcx
mov    %rbp,-0x40(%rsp)
and    $0xfffffffffffffffe,%rbp
mov    %rbp,-0x48(%rsp)
mov    %r10,%r12
neg    %r12
xor    %r13d,%r13d
jmp    1711 <unbalance+0x611>
nopl   0x0(%rax)
add    $0x1,%rax
add    $0x1,%r13
cmp    %eax,%r11d
je     112d <unbalance+0x2d>
test   %edi,%edi
jle    1700 <unbalance+0x600>
mov    (%rsi,%rax,8),%r8
mov    (%rdx,%rax,8),%r15
cmp    $0x1,%edi
jne    1730 <unbalance+0x630>
xor    %ebx,%ebx
jmp    1870 <unbalance+0x770>
nopl   0x0(%rax)
mov    -0x28(%rsp),%rcx
add    %r13,%rcx
lea    (%r9,%rax,8),%rsi
lea    (%r9,%rcx,8),%rcx
lea    (%r8,%r10,8),%rdi
lea    (%r15,%r10,8),%rbp
cmp    %rbp,%r8
setb   %r14b
cmp    %rdi,%r15
setb   %bl
cmp    %rcx,%r8
setb   %dl
cmp    %rdi,%rsi
setb   %dil
cmp    %rcx,%r15
setb   %cl
cmp    %rbp,%rsi
setb   %sil
test   %bl,%r14b
jne    185c <unbalance+0x75c>
and    %dil,%dl
jne    185c <unbalance+0x75c>
mov    $0x0,%ebx
and    %sil,%cl
mov    -0x50(%rsp),%rdx
mov    -0x60(%rsp),%rsi
mov    -0x64(%rsp),%edi
jne    1870 <unbalance+0x770>
cmpq   $0x0,-0x38(%rsp)
je     190a <unbalance+0x80a>
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
mov    -0x48(%rsp),%rcx
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
movupd (%r8,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r8,%r14,8)
movupd (%r15,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r15,%r14,8)
movupd 0x10(%r8,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,0x10(%r8,%r14,8)
movupd 0x10(%r15,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,0x10(%r15,%r14,8)
add    $0x4,%r14
add    $0xfffffffffffffffe,%rcx
jne    17c0 <unbalance+0x6c0>
testb  $0x1,-0x40(%rsp)
je     1849 <unbalance+0x749>
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
movupd (%r8,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r8,%r14,8)
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
movupd (%r15,%r14,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r15,%r14,8)
mov    -0x30(%rsp),%rcx
mov    %rcx,%rbx
cmp    %r10,%rcx
je     1700 <unbalance+0x600>
jmp    1870 <unbalance+0x770>
xor    %ebx,%ebx
mov    -0x50(%rsp),%rdx
mov    -0x60(%rsp),%rsi
mov    -0x64(%rsp),%edi
nopl   0x0(%rax)
mov    %rbx,%rcx
test   $0x1,%r10b
je     18a4 <unbalance+0x7a4>
movsd  (%r9,%rax,8),%xmm0
mulsd  (%r8,%rbx,8),%xmm0
movsd  %xmm0,(%r8,%rbx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  (%r15,%rbx,8),%xmm0
movsd  %xmm0,(%r15,%rbx,8)
mov    %rbx,%rcx
or     $0x1,%rcx
not    %rbx
cmp    %r12,%rbx
je     1700 <unbalance+0x600>
movsd  (%r9,%rax,8),%xmm0
mulsd  (%r8,%rcx,8),%xmm0
movsd  %xmm0,(%r8,%rcx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  0x8(%r8,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r8,%rcx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  0x8(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r15,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r10
jne    18b0 <unbalance+0x7b0>
jmp    1700 <unbalance+0x600>
xor    %r14d,%r14d
testb  $0x1,-0x40(%rsp)
jne    1815 <unbalance+0x715>
jmp    1849 <unbalance+0x749>

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

LLVM IR (-O2):
define void @unbalance(i32 %0, double** nocapture %1, double** nocapture %2, i32 %3, i32 %4, double* nocapture %5) {
%7 = icmp sgt i32 %3, %4
br i1 %7, label %131, label %8
8: ; preds = %6
%9 = icmp sgt i32 %0, 0
%10 = sext i32 %3 to i64
%11 = add i32 %4, 1
%12 = zext i32 %0 to i64
%13 = add nsw i64 %10, 1
%14 = and i64 %12, 4294967294
%15 = add nsw i64 %14, -2
%16 = lshr exact i64 %15, 1
%17 = add nuw i64 %16, 1
%18 = icmp eq i32 %0, 1
%19 = and i64 %12, 4294967294
%20 = and i64 %17, 1
%21 = icmp eq i64 %15, 0
%22 = and i64 %17, -2
%23 = icmp eq i64 %20, 0
%24 = icmp eq i64 %19, %12
%25 = and i64 %12, 1
%26 = icmp eq i64 %25, 0
%27 = sub nsw i64 0, %12
br label %28
28: ; preds = %8, %164
%29 = phi i64 [ 0, %8 ], [ %168, %164 ]
%30 = phi i64 [ %10, %8 ], [ %165, %164 ]
%31 = getelementptr double, double* %5, i64 %30
%32 = add i64 %13, %29
%33 = getelementptr double, double* %5, i64 %32
br i1 %9, label %34, label %164
34: ; preds = %28
%35 = getelementptr inbounds double, double* %5, i64 %30
%36 = getelementptr inbounds double*, double** %1, i64 %30
%37 = load double*, double** %36
%38 = getelementptr inbounds double*, double** %2, i64 %30
%39 = load double*, double** %38
br i1 %18, label %115, label %40
40: ; preds = %34
%41 = getelementptr double, double* %37, i64 %12
%42 = getelementptr double, double* %39, i64 %12
%43 = icmp ult double* %37, %42
%44 = icmp ult double* %39, %41
%45 = and i1 %43, %44
%46 = icmp ult double* %37, %33
%47 = icmp ult double* %31, %41
%48 = and i1 %46, %47
%49 = or i1 %45, %48
%50 = icmp ult double* %39, %33
%51 = icmp ult double* %31, %42
%52 = and i1 %50, %51
%53 = or i1 %49, %52
br i1 %53, label %115, label %54
54: ; preds = %40
br i1 %21, label %95, label %55
55: ; preds = %54
%56 = load double, double* %35
%57 = insertelement <2 x double> poison, double %56, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = load double, double* %35
%60 = insertelement <2 x double> poison, double %59, i64 0
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
%62 = load double, double* %35
%63 = insertelement <2 x double> poison, double %62, i64 0
%64 = shufflevector <2 x double> %63, <2 x double> poison, <2 x i32> zeroinitializer
%65 = load double, double* %35
%66 = insertelement <2 x double> poison, double %65, i64 0
%67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
br label %68
68: ; preds = %68, %55
%69 = phi i64 [ 0, %55 ], [ %92, %68 ]
%70 = phi i64 [ 0, %55 ], [ %93, %68 ]
%71 = getelementptr inbounds double, double* %37, i64 %69
%72 = bitcast double* %71 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = fmul <2 x double> %58, %73
%75 = bitcast double* %71 to <2 x double>*
store <2 x double> %74, <2 x double>* %75
%76 = getelementptr inbounds double, double* %39, i64 %69
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = fmul <2 x double> %61, %78
%80 = bitcast double* %76 to <2 x double>*
store <2 x double> %79, <2 x double>* %80
%81 = or i64 %69, 2
%82 = getelementptr inbounds double, double* %37, i64 %81
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = fmul <2 x double> %64, %84
%86 = bitcast double* %82 to <2 x double>*
store <2 x double> %85, <2 x double>* %86
%87 = getelementptr inbounds double, double* %39, i64 %81
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = fmul <2 x double> %67, %89
%91 = bitcast double* %87 to <2 x double>*
store <2 x double> %90, <2 x double>* %91
%92 = add nuw i64 %69, 4
%93 = add nuw i64 %70, 2
%94 = icmp eq i64 %93, %22
br i1 %94, label %95, label %68
95: ; preds = %68, %54
%96 = phi i64 [ 0, %54 ], [ %92, %68 ]
br i1 %23, label %114, label %97
97: ; preds = %95
%98 = load double, double* %35
%99 = insertelement <2 x double> poison, double %98, i64 0
%100 = shufflevector <2 x double> %99, <2 x double> poison, <2 x i32> zeroinitializer
%101 = getelementptr inbounds double, double* %37, i64 %96
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = fmul <2 x double> %100, %103
%105 = bitcast double* %101 to <2 x double>*
store <2 x double> %104, <2 x double>* %105
%106 = load double, double* %35
%107 = insertelement <2 x double> poison, double %106, i64 0
%108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
%109 = getelementptr inbounds double, double* %39, i64 %96
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = fmul <2 x double> %108, %111
%113 = bitcast double* %109 to <2 x double>*
store <2 x double> %112, <2 x double>* %113
br label %114
114: ; preds = %95, %97
br i1 %24, label %164, label %115
115: ; preds = %40, %34, %114
%116 = phi i64 [ 0, %40 ], [ 0, %34 ], [ %19, %114 ]
%117 = xor i64 %116, -1
br i1 %26, label %128, label %118
118: ; preds = %115
%119 = load double, double* %35
%120 = getelementptr inbounds double, double* %37, i64 %116
%121 = load double, double* %120
%122 = fmul double %119, %121
store double %122, double* %120
%123 = load double, double* %35
%124 = getelementptr inbounds double, double* %39, i64 %116
%125 = load double, double* %124
%126 = fmul double %123, %125
store double %126, double* %124
%127 = or i64 %116, 1
br label %128
128: ; preds = %118, %115
%129 = phi i64 [ %116, %115 ], [ %127, %118 ]
%130 = icmp eq i64 %117, %27
br i1 %130, label %164, label %143
131: ; preds = %164, %6
%132 = icmp sgt i32 %3, 0
br i1 %132, label %133, label %169
133: ; preds = %131
%134 = icmp slt i32 %0, 1
%135 = zext i32 %3 to i64
%136 = zext i32 %0 to i64
%137 = icmp ult i32 %0, 4
%138 = and i64 %136, 4294967292
%139 = icmp eq i64 %138, %136
%140 = and i64 %136, 1
%141 = icmp eq i64 %140, 0
%142 = sub nsw i64 0, %136
br label %182
143: ; preds = %128, %143
%144 = phi i64 [ %162, %143 ], [ %129, %128 ]
%145 = load double, double* %35
%146 = getelementptr inbounds double, double* %37, i64 %144
%147 = load double, double* %146
%148 = fmul double %145, %147
store double %148, double* %146
%149 = load double, double* %35
%150 = getelementptr inbounds double, double* %39, i64 %144
%151 = load double, double* %150
%152 = fmul double %149, %151
store double %152, double* %150
%153 = add nuw nsw i64 %144, 1
%154 = load double, double* %35
%155 = getelementptr inbounds double, double* %37, i64 %153
%156 = load double, double* %155
%157 = fmul double %154, %156
store double %157, double* %155
%158 = load double, double* %35
%159 = getelementptr inbounds double, double* %39, i64 %153
%160 = load double, double* %159
%161 = fmul double %158, %160
store double %161, double* %159
%162 = add nuw nsw i64 %144, 2
%163 = icmp eq i64 %162, %12
br i1 %163, label %164, label %143
164: ; preds = %128, %143, %114, %28
%165 = add nsw i64 %30, 1
%166 = trunc i64 %165 to i32
%167 = icmp eq i32 %11, %166
%168 = add i64 %29, 1
br i1 %167, label %131, label %28
169: ; preds = %304, %131
%170 = add i32 %4, 1
%171 = icmp slt i32 %170, %0
br i1 %171, label %172, label %430
172: ; preds = %169
%173 = icmp slt i32 %0, 1
%174 = sext i32 %170 to i64
%175 = zext i32 %0 to i64
%176 = icmp ult i32 %0, 4
%177 = and i64 %175, 4294967292
%178 = icmp eq i64 %177, %175
%179 = and i64 %175, 1
%180 = icmp eq i64 %179, 0
%181 = sub nsw i64 0, %175
br label %306
182: ; preds = %133, %304
%183 = phi i64 [ %135, %133 ], [ %184, %304 ]
%184 = add nsw i64 %183, -1
%185 = trunc i64 %184 to i32
%186 = and i64 %184, 4294967295
%187 = getelementptr inbounds double, double* %5, i64 %186
%188 = load double, double* %187
%189 = fptosi double %188 to i32
%190 = icmp eq i32 %185, %189
%191 = or i1 %190, %134
br i1 %191, label %304, label %192
192: ; preds = %182
%193 = getelementptr inbounds double*, double** %1, i64 %186
%194 = load double*, double** %193
%195 = sext i32 %189 to i64
%196 = getelementptr inbounds double*, double** %1, i64 %195
%197 = load double*, double** %196
%198 = getelementptr inbounds double*, double** %2, i64 %186
%199 = load double*, double** %198
%200 = getelementptr inbounds double*, double** %2, i64 %195
%201 = load double*, double** %200
br i1 %137, label %267, label %202
202: ; preds = %192
%203 = getelementptr double, double* %194, i64 %136
%204 = getelementptr double, double* %197, i64 %136
%205 = getelementptr double, double* %199, i64 %136
%206 = getelementptr double, double* %201, i64 %136
%207 = icmp ult double* %194, %204
%208 = icmp ult double* %197, %203
%209 = and i1 %207, %208
%210 = icmp ult double* %194, %205
%211 = icmp ult double* %199, %203
%212 = and i1 %210, %211
%213 = or i1 %209, %212
%214 = icmp ult double* %194, %206
%215 = icmp ult double* %201, %203
%216 = and i1 %214, %215
%217 = or i1 %213, %216
%218 = icmp ult double* %197, %205
%219 = icmp ult double* %199, %204
%220 = and i1 %218, %219
%221 = or i1 %217, %220
%222 = icmp ult double* %197, %206
%223 = icmp ult double* %201, %204
%224 = and i1 %222, %223
%225 = or i1 %221, %224
%226 = icmp ult double* %199, %206
%227 = icmp ult double* %201, %205
%228 = and i1 %226, %227
%229 = or i1 %225, %228
br i1 %229, label %267, label %230
230: ; preds = %202, %230
%231 = phi i64 [ %264, %230 ], [ 0, %202 ]
%232 = getelementptr inbounds double, double* %194, i64 %231
%233 = bitcast double* %232 to <2 x double>*
%234 = load <2 x double>, <2 x double>* %233
%235 = getelementptr inbounds double, double* %232, i64 2
%236 = bitcast double* %235 to <2 x double>*
%237 = load <2 x double>, <2 x double>* %236
%238 = getelementptr inbounds double, double* %197, i64 %231
%239 = bitcast double* %238 to <2 x double>*
%240 = load <2 x double>, <2 x double>* %239
%241 = getelementptr inbounds double, double* %238, i64 2
%242 = bitcast double* %241 to <2 x double>*
%243 = load <2 x double>, <2 x double>* %242
%244 = bitcast double* %232 to <2 x double>*
store <2 x double> %240, <2 x double>* %244
%245 = bitcast double* %235 to <2 x double>*
store <2 x double> %243, <2 x double>* %245
%246 = bitcast double* %238 to <2 x double>*
store <2 x double> %234, <2 x double>* %246
%247 = bitcast double* %241 to <2 x double>*
store <2 x double> %237, <2 x double>* %247
%248 = getelementptr inbounds double, double* %199, i64 %231
%249 = bitcast double* %248 to <2 x double>*
%250 = load <2 x double>, <2 x double>* %249
%251 = getelementptr inbounds double, double* %248, i64 2
%252 = bitcast double* %251 to <2 x double>*
%253 = load <2 x double>, <2 x double>* %252
%254 = getelementptr inbounds double, double* %201, i64 %231
%255 = bitcast double* %254 to <2 x double>*
%256 = load <2 x double>, <2 x double>* %255
%257 = getelementptr inbounds double, double* %254, i64 2
%258 = bitcast double* %257 to <2 x double>*
%259 = load <2 x double>, <2 x double>* %258
%260 = bitcast double* %248 to <2 x double>*
store <2 x double> %256, <2 x double>* %260
%261 = bitcast double* %251 to <2 x double>*
store <2 x double> %259, <2 x double>* %261
%262 = bitcast double* %254 to <2 x double>*
store <2 x double> %250, <2 x double>* %262
%263 = bitcast double* %257 to <2 x double>*
store <2 x double> %253, <2 x double>* %263
%264 = add nuw i64 %231, 4
%265 = icmp eq i64 %264, %138
br i1 %265, label %266, label %230
266: ; preds = %230
br i1 %139, label %304, label %267
267: ; preds = %202, %192, %266
%268 = phi i64 [ 0, %202 ], [ 0, %192 ], [ %138, %266 ]
%269 = xor i64 %268, -1
br i1 %141, label %280, label %270
270: ; preds = %267
%271 = getelementptr inbounds double, double* %194, i64 %268
%272 = load double, double* %271
%273 = getelementptr inbounds double, double* %197, i64 %268
%274 = load double, double* %273
store double %274, double* %271
store double %272, double* %273
%275 = getelementptr inbounds double, double* %199, i64 %268
%276 = load double, double* %275
%277 = getelementptr inbounds double, double* %201, i64 %268
%278 = load double, double* %277
store double %278, double* %275
store double %276, double* %277
%279 = or i64 %268, 1
br label %280
280: ; preds = %270, %267
%281 = phi i64 [ %268, %267 ], [ %279, %270 ]
%282 = icmp eq i64 %269, %142
br i1 %282, label %304, label %283
283: ; preds = %280, %283
%284 = phi i64 [ %302, %283 ], [ %281, %280 ]
%285 = getelementptr inbounds double, double* %194, i64 %284
%286 = load double, double* %285
%287 = getelementptr inbounds double, double* %197, i64 %284
%288 = load double, double* %287
store double %288, double* %285
store double %286, double* %287
%289 = getelementptr inbounds double, double* %199, i64 %284
%290 = load double, double* %289
%291 = getelementptr inbounds double, double* %201, i64 %284
%292 = load double, double* %291
store double %292, double* %289
store double %290, double* %291
%293 = add nuw nsw i64 %284, 1
%294 = getelementptr inbounds double, double* %194, i64 %293
%295 = load double, double* %294
%296 = getelementptr inbounds double, double* %197, i64 %293
%297 = load double, double* %296
store double %297, double* %294
store double %295, double* %296
%298 = getelementptr inbounds double, double* %199, i64 %293
%299 = load double, double* %298
%300 = getelementptr inbounds double, double* %201, i64 %293
%301 = load double, double* %300
store double %301, double* %298
store double %299, double* %300
%302 = add nuw nsw i64 %284, 2
%303 = icmp eq i64 %302, %136
br i1 %303, label %304, label %283
304: ; preds = %280, %283, %266, %182
%305 = icmp sgt i64 %183, 1
br i1 %305, label %182, label %169
306: ; preds = %172, %426
%307 = phi i64 [ %174, %172 ], [ %427, %426 ]
%308 = getelementptr inbounds double, double* %5, i64 %307
%309 = load double, double* %308
%310 = fptosi double %309 to i32
%311 = trunc i64 %307 to i32
%312 = icmp eq i32 %311, %310
%313 = or i1 %312, %173
br i1 %313, label %426, label %314
314: ; preds = %306
%315 = getelementptr inbounds double*, double** %1, i64 %307
%316 = load double*, double** %315
%317 = sext i32 %310 to i64
%318 = getelementptr inbounds double*, double** %1, i64 %317
%319 = load double*, double** %318
%320 = getelementptr inbounds double*, double** %2, i64 %307
%321 = load double*, double** %320
%322 = getelementptr inbounds double*, double** %2, i64 %317
%323 = load double*, double** %322
br i1 %176, label %389, label %324
324: ; preds = %314
%325 = getelementptr double, double* %316, i64 %175
%326 = getelementptr double, double* %319, i64 %175
%327 = getelementptr double, double* %321, i64 %175
%328 = getelementptr double, double* %323, i64 %175
%329 = icmp ult double* %316, %326
%330 = icmp ult double* %319, %325
%331 = and i1 %329, %330
%332 = icmp ult double* %316, %327
%333 = icmp ult double* %321, %325
%334 = and i1 %332, %333
%335 = or i1 %331, %334
%336 = icmp ult double* %316, %328
%337 = icmp ult double* %323, %325
%338 = and i1 %336, %337
%339 = or i1 %335, %338
%340 = icmp ult double* %319, %327
%341 = icmp ult double* %321, %326
%342 = and i1 %340, %341
%343 = or i1 %339, %342
%344 = icmp ult double* %319, %328
%345 = icmp ult double* %323, %326
%346 = and i1 %344, %345
%347 = or i1 %343, %346
%348 = icmp ult double* %321, %328
%349 = icmp ult double* %323, %327
%350 = and i1 %348, %349
%351 = or i1 %347, %350
br i1 %351, label %389, label %352
352: ; preds = %324, %352
%353 = phi i64 [ %386, %352 ], [ 0, %324 ]
%354 = getelementptr inbounds double, double* %316, i64 %353
%355 = bitcast double* %354 to <2 x double>*
%356 = load <2 x double>, <2 x double>* %355
%357 = getelementptr inbounds double, double* %354, i64 2
%358 = bitcast double* %357 to <2 x double>*
%359 = load <2 x double>, <2 x double>* %358
%360 = getelementptr inbounds double, double* %319, i64 %353
%361 = bitcast double* %360 to <2 x double>*
%362 = load <2 x double>, <2 x double>* %361
%363 = getelementptr inbounds double, double* %360, i64 2
%364 = bitcast double* %363 to <2 x double>*
%365 = load <2 x double>, <2 x double>* %364
%366 = bitcast double* %354 to <2 x double>*
store <2 x double> %362, <2 x double>* %366
%367 = bitcast double* %357 to <2 x double>*
store <2 x double> %365, <2 x double>* %367
%368 = bitcast double* %360 to <2 x double>*
store <2 x double> %356, <2 x double>* %368
%369 = bitcast double* %363 to <2 x double>*
store <2 x double> %359, <2 x double>* %369
%370 = getelementptr inbounds double, double* %321, i64 %353
%371 = bitcast double* %370 to <2 x double>*
%372 = load <2 x double>, <2 x double>* %371
%373 = getelementptr inbounds double, double* %370, i64 2
%374 = bitcast double* %373 to <2 x double>*
%375 = load <2 x double>, <2 x double>* %374
%376 = getelementptr inbounds double, double* %323, i64 %353
%377 = bitcast double* %376 to <2 x double>*
%378 = load <2 x double>, <2 x double>* %377
%379 = getelementptr inbounds double, double* %376, i64 2
%380 = bitcast double* %379 to <2 x double>*
%381 = load <2 x double>, <2 x double>* %380
%382 = bitcast double* %370 to <2 x double>*
store <2 x double> %378, <2 x double>* %382
%383 = bitcast double* %373 to <2 x double>*
store <2 x double> %381, <2 x double>* %383
%384 = bitcast double* %376 to <2 x double>*
store <2 x double> %372, <2 x double>* %384
%385 = bitcast double* %379 to <2 x double>*
store <2 x double> %375, <2 x double>* %385
%386 = add nuw i64 %353, 4
%387 = icmp eq i64 %386, %177
br i1 %387, label %388, label %352
388: ; preds = %352
br i1 %178, label %426, label %389
389: ; preds = %324, %314, %388
%390 = phi i64 [ 0, %324 ], [ 0, %314 ], [ %177, %388 ]
%391 = xor i64 %390, -1
br i1 %180, label %402, label %392
392: ; preds = %389
%393 = getelementptr inbounds double, double* %316, i64 %390
%394 = load double, double* %393
%395 = getelementptr inbounds double, double* %319, i64 %390
%396 = load double, double* %395
store double %396, double* %393
store double %394, double* %395
%397 = getelementptr inbounds double, double* %321, i64 %390
%398 = load double, double* %397
%399 = getelementptr inbounds double, double* %323, i64 %390
%400 = load double, double* %399
store double %400, double* %397
store double %398, double* %399
%401 = or i64 %390, 1
br label %402
402: ; preds = %392, %389
%403 = phi i64 [ %390, %389 ], [ %401, %392 ]
%404 = icmp eq i64 %391, %181
br i1 %404, label %426, label %405
405: ; preds = %402, %405
%406 = phi i64 [ %424, %405 ], [ %403, %402 ]
%407 = getelementptr inbounds double, double* %316, i64 %406
%408 = load double, double* %407
%409 = getelementptr inbounds double, double* %319, i64 %406
%410 = load double, double* %409
store double %410, double* %407
store double %408, double* %409
%411 = getelementptr inbounds double, double* %321, i64 %406
%412 = load double, double* %411
%413 = getelementptr inbounds double, double* %323, i64 %406
%414 = load double, double* %413
store double %414, double* %411
store double %412, double* %413
%415 = add nuw nsw i64 %406, 1
%416 = getelementptr inbounds double, double* %316, i64 %415
%417 = load double, double* %416
%418 = getelementptr inbounds double, double* %319, i64 %415
%419 = load double, double* %418
store double %419, double* %416
store double %417, double* %418
%420 = getelementptr inbounds double, double* %321, i64 %415
%421 = load double, double* %420
%422 = getelementptr inbounds double, double* %323, i64 %415
%423 = load double, double* %422
store double %423, double* %420
store double %421, double* %422
%424 = add nuw nsw i64 %406, 2
%425 = icmp eq i64 %424, %175
br i1 %425, label %426, label %405
426: ; preds = %402, %405, %388, %306
%427 = add nsw i64 %307, 1
%428 = trunc i64 %427 to i32
%429 = icmp eq i32 %428, %0
br i1 %429, label %430, label %306
430: ; preds = %426, %169
ret void
}