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) * (n) + (j))] *= scale[i];
      vi[((i) * (n) + (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) * (n) + (j))];
        vr[((i) * (n) + (j))] = vr[((k) * (n) + (j))];
        vr[((k) * (n) + (j))] = tmp;
        tmp = vi[((i) * (n) + (j))];
        vi[((i) * (n) + (j))] = vi[((k) * (n) + (j))];
        vi[((k) * (n) + (j))] = tmp;
      }
    }
  }
  for (i = hi + 1; i < n; i++) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[((i) * (n) + (j))];
        vr[((i) * (n) + (j))] = vr[((k) * (n) + (j))];
        vr[((k) * (n) + (j))] = tmp;
        tmp = vi[((i) * (n) + (j))];
        vi[((i) * (n) + (j))] = vi[((k) * (n) + (j))];
        vi[((k) * (n) + (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     11b0 <unbalance+0xb0>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119d <unbalance+0x9d>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%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
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%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    11a2 <unbalance+0xa2>
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     12d9 <unbalance+0x1d9>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cvttsd2si (%rax,%rcx,8),%eax
mov    %eax,-0x34(%rbp)
cmp    -0x2c(%rbp),%eax
je     12c6 <unbalance+0x1c6>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12c1 <unbalance+0x1c1>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e3 <unbalance+0xe3>
jmp    12c6 <unbalance+0x1c6>
jmp    12cb <unbalance+0x1cb>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b9 <unbalance+0xb9>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1404 <unbalance+0x304>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cvttsd2si (%rax,%rcx,8),%eax
mov    %eax,-0x34(%rbp)
cmp    -0x2c(%rbp),%eax
je     13f1 <unbalance+0x2f1>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13ec <unbalance+0x2ec>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    130e <unbalance+0x20e>
jmp    13f1 <unbalance+0x2f1>
jmp    13f6 <unbalance+0x2f6>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12e2 <unbalance+0x1e2>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unbalance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rdx,-0x78(%rsp)
movslq %edi,%rax
mov    %rax,-0x50(%rsp)
mov    %edi,%r11d
mov    %r8,0x8(%rsp)
mov    %ecx,-0x38(%rsp)
cmp    %r8d,%ecx
mov    %rsi,%r10
mov    %rsi,-0x60(%rsp)
mov    %edi,-0x7c(%rsp)
jle    1857 <unbalance+0x757>
mov    -0x38(%rsp),%eax
test   %eax,%eax
jle    14ca <unbalance+0x3ca>
mov    %eax,%eax
mov    %rax,-0x58(%rsp)
lea    -0x1(%rax),%rsi
mov    -0x50(%rsp),%r14
imul   %r14,%rsi
mov    -0x78(%rsp),%r12
lea    (%r12,%r11,8),%rax
mov    %r11d,%ebp
and    $0xfffffffe,%ebp
mov    %rbp,0x20(%rsp)
add    $0xfffffffffffffffe,%rbp
mov    %rbp,0x18(%rsp)
shr    %rbp
add    $0x1,%rbp
mov    %rax,-0x18(%rsp)
mov    %r10,%rcx
cmp    %r10,%rax
seta   %al
lea    (%r10,%r11,8),%rbx
mov    %rbx,-0x30(%rsp)
cmp    %r12,%rbx
seta   %bl
lea    (%rsi,%r11,1),%rdx
mov    %rdx,-0x20(%rsp)
and    %al,%bl
mov    %bl,-0x38(%rsp)
mov    %rbp,%rax
mov    %rbp,0x10(%rsp)
and    $0xfffffffffffffffe,%rbp
mov    %rbp,0x38(%rsp)
lea    (%r12,%rsi,8),%r8
add    $0x10,%r8
lea    0x0(,%r14,8),%rbx
neg    %rbx
lea    (%r10,%rsi,8),%r14
add    $0x10,%r14
lea    0x10(%r12),%rax
mov    %rax,0x30(%rsp)
lea    0x10(%r10),%rax
mov    %rax,0x28(%rsp)
lea    (%r10,%rsi,8),%r15
mov    %rsi,-0x10(%rsp)
lea    (%r12,%rsi,8),%rbp
xor    %r12d,%r12d
mov    %rbx,-0x48(%rsp)
jmp    122a <unbalance+0x12a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r12
add    %rbx,%r8
add    %rbx,%r14
add    %rbx,%r15
add    %rbx,%rbp
cmp    $0x1,%r13
jle    14ca <unbalance+0x3ca>
mov    -0x58(%rsp),%r13
lea    -0x1(%r13),%rdx
cvttsd2si -0x8(%r9,%r13,8),%eax
mov    %rdx,-0x58(%rsp)
cmp    %rax,%rdx
je     1210 <unbalance+0x110>
test   %edi,%edi
jle    1210 <unbalance+0x110>
imul   %edi,%eax
movslq %eax,%rsi
cmp    $0x2,%edi
jae    1260 <unbalance+0x160>
xor    %edx,%edx
jmp    1480 <unbalance+0x380>
nopw   0x0(%rax,%rax,1)
mov    %r13,-0x28(%rsp)
mov    %r12,%rdx
imul   -0x50(%rsp),%rdx
mov    %rsi,%rcx
mov    -0x10(%rsp),%rsi
sub    %rdx,%rsi
lea    (%r10,%rsi,8),%rdi
mov    -0x20(%rsp),%rbx
sub    %rdx,%rbx
lea    (%r10,%rbx,8),%rdx
mov    -0x78(%rsp),%rax
lea    (%rax,%rsi,8),%rsi
mov    %rsi,-0x70(%rsp)
lea    (%rax,%rbx,8),%rbx
mov    %rbx,-0x8(%rsp)
lea    (%r10,%rcx,8),%r13
mov    %r13,-0x68(%rsp)
mov    -0x30(%rsp),%rsi
lea    (%rsi,%rcx,8),%rsi
mov    %rsi,(%rsp)
cmp    %rsi,%rdi
setb   %r10b
cmp    %rdx,%r13
setb   %r13b
and    %r10b,%r13b
cmp    %rbx,%rdi
setb   %sil
mov    -0x70(%rsp),%rbx
cmp    %rdx,%rbx
setb   %r10b
and    %sil,%r10b
mov    -0x18(%rsp),%rsi
lea    (%rsi,%rcx,8),%rsi
or     %r13b,%r10b
cmp    %rsi,%rdi
mov    %rcx,-0x40(%rsp)
lea    (%rax,%rcx,8),%rdi
setb   %r13b
cmp    %rdx,%rdi
setb   %dl
and    %r13b,%dl
mov    -0x8(%rsp),%rcx
cmp    %rcx,-0x68(%rsp)
setb   %r13b
mov    %rbx,%rax
cmp    (%rsp),%rbx
setb   %bl
and    %r13b,%bl
or     %dl,%bl
or     %r10b,%bl
or     -0x38(%rsp),%bl
cmp    %rsi,%rax
setb   %al
cmp    %rcx,%rdi
setb   %sil
test   %bl,%bl
jne    13f0 <unbalance+0x2f0>
mov    $0x0,%edx
and    %sil,%al
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x48(%rsp),%rbx
mov    -0x40(%rsp),%rsi
mov    -0x28(%rsp),%r13
jne    1480 <unbalance+0x380>
cmpq   $0x0,0x18(%rsp)
je     140c <unbalance+0x30c>
mov    0x30(%rsp),%rax
lea    (%rax,%rsi,8),%rdx
mov    0x28(%rsp),%rax
lea    (%rax,%rsi,8),%rsi
mov    0x38(%rsp),%rdi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movups -0x10(%r14,%rbx,8),%xmm0
movups -0x10(%rsi,%rbx,8),%xmm1
movups %xmm1,-0x10(%r14,%rbx,8)
movups %xmm0,-0x10(%rsi,%rbx,8)
movups -0x10(%r8,%rbx,8),%xmm0
movups -0x10(%rdx,%rbx,8),%xmm1
movups %xmm1,-0x10(%r8,%rbx,8)
movups %xmm0,-0x10(%rdx,%rbx,8)
movups (%r14,%rbx,8),%xmm0
movups (%rsi,%rbx,8),%xmm1
movups %xmm1,(%r14,%rbx,8)
movups %xmm0,(%rsi,%rbx,8)
movupd (%r8,%rbx,8),%xmm0
movupd (%rdx,%rbx,8),%xmm1
movupd %xmm1,(%r8,%rbx,8)
movupd %xmm0,(%rdx,%rbx,8)
add    $0x4,%rbx
add    $0xfffffffffffffffe,%rdi
jne    1390 <unbalance+0x290>
jmp    140e <unbalance+0x30e>
xor    %edx,%edx
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x48(%rsp),%rbx
mov    -0x40(%rsp),%rsi
mov    -0x28(%rsp),%r13
jmp    1480 <unbalance+0x380>
xor    %ebx,%ebx
testb  $0x1,0x10(%rsp)
mov    -0x7c(%rsp),%edi
mov    -0x40(%rsp),%rsi
je     145f <unbalance+0x35f>
mov    -0x58(%rsp),%rax
imul   -0x50(%rsp),%rax
add    %rbx,%rax
mov    %r10,%rdx
movups (%r10,%rax,8),%xmm0
add    %rsi,%rbx
movups (%r10,%rbx,8),%xmm1
movups %xmm1,(%r10,%rax,8)
movups %xmm0,(%r10,%rbx,8)
mov    -0x78(%rsp),%rdx
movupd (%rdx,%rax,8),%xmm0
movupd (%rdx,%rbx,8),%xmm1
movupd %xmm1,(%rdx,%rax,8)
movupd %xmm0,(%rdx,%rbx,8)
mov    0x20(%rsp),%rax
mov    %rax,%rdx
cmp    %r11,%rax
mov    -0x48(%rsp),%rbx
je     1210 <unbalance+0x110>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rsi,%rcx
lea    (%r10,%rsi,8),%rsi
mov    -0x78(%rsp),%rax
lea    (%rax,%rcx,8),%rax
movsd  (%r15,%rdx,8),%xmm0
movsd  (%rsi,%rdx,8),%xmm1
movsd  %xmm1,(%r15,%rdx,8)
movsd  %xmm0,(%rsi,%rdx,8)
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  (%rax,%rdx,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rdx,8)
movsd  %xmm0,(%rax,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r11
jne    1490 <unbalance+0x390>
jmp    1210 <unbalance+0x110>
mov    0x8(%rsp),%rax
add    $0x1,%eax
cmp    %edi,%eax
jge    1848 <unbalance+0x748>
cltq
mov    -0x50(%rsp),%r8
mov    %r8,%rsi
imul   %rax,%rsi
lea    (%rsi,%r11,1),%rcx
mov    %rcx,-0x28(%rsp)
mov    %r10,%rdx
lea    (%r10,%r11,8),%rbx
mov    -0x78(%rsp),%r13
lea    0x0(,%r11,8),%rcx
add    %r13,%rcx
mov    %r11d,%ebp
and    $0xfffffffe,%ebp
mov    %rbp,-0x38(%rsp)
add    $0xfffffffffffffffe,%rbp
mov    %rbp,-0x20(%rsp)
shr    %rbp
add    $0x1,%rbp
mov    %rcx,-0x10(%rsp)
cmp    %r10,%rcx
seta   %cl
mov    %rbx,-0x48(%rsp)
cmp    %r13,%rbx
seta   %bl
and    %cl,%bl
mov    %bl,-0x18(%rsp)
mov    %rbp,%rcx
mov    %rbp,0x20(%rsp)
and    $0xfffffffffffffffe,%rbp
mov    %rbp,0x18(%rsp)
lea    0x10(,%rsi,8),%r15
add    %r13,%r15
lea    0x0(,%r8,8),%rbp
lea    0x10(%r10,%rsi,8),%r14
lea    0x10(%r13),%rcx
mov    %rcx,0x10(%rsp)
lea    0x10(%r10),%rcx
mov    %rcx,0x8(%rsp)
lea    (%r10,%rsi,8),%r12
mov    %rsi,-0x8(%rsp)
lea    0x0(%r13,%rsi,8),%r13
xor    %ebx,%ebx
mov    %rbp,-0x30(%rsp)
jmp    15bc <unbalance+0x4bc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
add    $0x1,%rbx
add    %rbp,%r15
add    %rbp,%r14
add    %rbp,%r12
add    %rbp,%r13
cmp    %edi,%eax
je     1848 <unbalance+0x748>
cvttsd2si (%r9,%rax,8),%ecx
cmp    %ecx,%eax
je     15a0 <unbalance+0x4a0>
test   %edi,%edi
jle    15a0 <unbalance+0x4a0>
imul   %edi,%ecx
movslq %ecx,%r8
cmp    $0x2,%edi
jae    1630 <unbalance+0x530>
xor    %ecx,%ecx
lea    (%r10,%r8,8),%rdx
mov    -0x78(%rsp),%rsi
lea    (%rsi,%r8,8),%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r12,%rcx,8),%xmm0
movsd  (%rdx,%rcx,8),%xmm1
movsd  %xmm1,(%r12,%rcx,8)
movsd  %xmm0,(%rdx,%rcx,8)
movsd  0x0(%r13,%rcx,8),%xmm0
movsd  (%rsi,%rcx,8),%xmm1
movsd  %xmm1,0x0(%r13,%rcx,8)
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r11
jne    15f0 <unbalance+0x4f0>
jmp    15a0 <unbalance+0x4a0>
nopl   0x0(%rax)
mov    %rbx,-0x68(%rsp)
mov    %rbx,%rcx
imul   -0x50(%rsp),%rcx
mov    -0x8(%rsp),%rdx
add    %rcx,%rdx
lea    (%r10,%rdx,8),%rsi
add    -0x28(%rsp),%rcx
lea    (%r10,%rcx,8),%rbx
mov    -0x78(%rsp),%rdi
lea    (%rdi,%rdx,8),%rdx
mov    %rdx,-0x58(%rsp)
lea    (%rdi,%rcx,8),%rdx
lea    (%r10,%r8,8),%rbp
mov    %rbp,(%rsp)
mov    -0x48(%rsp),%rcx
lea    (%rcx,%r8,8),%rcx
mov    %rcx,-0x40(%rsp)
cmp    %rcx,%rsi
setb   %cl
cmp    %rbx,%rbp
setb   %bpl
and    %cl,%bpl
cmp    %rdx,%rsi
mov    %rdx,%r10
setb   %cl
cmp    %rbx,-0x58(%rsp)
mov    %r8,%rdx
setb   %r8b
and    %cl,%r8b
mov    -0x10(%rsp),%rcx
lea    (%rcx,%rdx,8),%rcx
or     %bpl,%r8b
cmp    %rcx,%rsi
mov    %rdx,-0x70(%rsp)
lea    (%rdi,%rdx,8),%rsi
setb   %bpl
cmp    %rbx,%rsi
setb   %bl
and    %bpl,%bl
cmp    %r10,(%rsp)
setb   %bpl
mov    -0x58(%rsp),%rdx
cmp    -0x40(%rsp),%rdx
setb   %dil
and    %bpl,%dil
or     %bl,%dil
or     %r8b,%dil
or     -0x18(%rsp),%dil
cmp    %rcx,%rdx
setb   %dl
cmp    %r10,%rsi
setb   %sil
test   %dil,%dil
jne    1819 <unbalance+0x719>
mov    $0x0,%ecx
and    %sil,%dl
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x30(%rsp),%rbp
mov    -0x68(%rsp),%rbx
mov    -0x70(%rsp),%r8
jne    15d7 <unbalance+0x4d7>
cmpq   $0x0,-0x20(%rsp)
je     1838 <unbalance+0x738>
mov    0x10(%rsp),%rcx
lea    (%rcx,%r8,8),%rcx
mov    0x8(%rsp),%rdx
lea    (%rdx,%r8,8),%rdx
mov    0x18(%rsp),%rsi
xor    %r10d,%r10d
xchg   %ax,%ax
movups -0x10(%r14,%r10,8),%xmm0
movups -0x10(%rdx,%r10,8),%xmm1
movups %xmm1,-0x10(%r14,%r10,8)
movups %xmm0,-0x10(%rdx,%r10,8)
movups -0x10(%r15,%r10,8),%xmm0
movups -0x10(%rcx,%r10,8),%xmm1
movups %xmm1,-0x10(%r15,%r10,8)
movups %xmm0,-0x10(%rcx,%r10,8)
movups (%r14,%r10,8),%xmm0
movups (%rdx,%r10,8),%xmm1
movups %xmm1,(%r14,%r10,8)
movups %xmm0,(%rdx,%r10,8)
movupd (%r15,%r10,8),%xmm0
movupd (%rcx,%r10,8),%xmm1
movupd %xmm1,(%r15,%r10,8)
movupd %xmm0,(%rcx,%r10,8)
add    $0x4,%r10
add    $0xfffffffffffffffe,%rsi
jne    1750 <unbalance+0x650>
testb  $0x1,0x20(%rsp)
je     17fe <unbalance+0x6fe>
mov    %rax,%rcx
imul   -0x50(%rsp),%rcx
add    %r10,%rcx
mov    -0x60(%rsp),%rdx
movups (%rdx,%rcx,8),%xmm0
add    %r8,%r10
movups (%rdx,%r10,8),%xmm1
movups %xmm1,(%rdx,%rcx,8)
movups %xmm0,(%rdx,%r10,8)
mov    -0x78(%rsp),%rdx
movupd (%rdx,%rcx,8),%xmm0
movupd (%rdx,%r10,8),%xmm1
movupd %xmm1,(%rdx,%rcx,8)
movupd %xmm0,(%rdx,%r10,8)
mov    -0x38(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r11,%rdx
mov    -0x60(%rsp),%r10
je     15a0 <unbalance+0x4a0>
jmp    15d7 <unbalance+0x4d7>
xor    %ecx,%ecx
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x30(%rsp),%rbp
mov    -0x68(%rsp),%rbx
mov    -0x70(%rsp),%r8
jmp    15d7 <unbalance+0x4d7>
xor    %r10d,%r10d
testb  $0x1,0x20(%rsp)
jne    17bd <unbalance+0x6bd>
jmp    17fe <unbalance+0x6fe>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movslq -0x38(%rsp),%rax
mov    0x8(%rsp),%rcx
lea    0x1(%rcx),%r8d
mov    %rax,%rdx
mov    -0x50(%rsp),%rsi
imul   %rsi,%rdx
lea    (%rdx,%r11,1),%rcx
mov    %rcx,-0x28(%rsp)
lea    0x1(%rax),%rcx
mov    %rcx,-0x48(%rsp)
mov    %r11d,%ecx
and    $0xfffffffe,%ecx
mov    %rcx,-0x10(%rsp)
add    $0xfffffffffffffffe,%rcx
mov    %rcx,-0x18(%rsp)
mov    %rcx,%rbp
shr    %rbp
add    $0x1,%rbp
mov    %rbp,%rcx
mov    %rbp,-0x30(%rsp)
and    $0xfffffffffffffffe,%rbp
mov    %rbp,-0x20(%rsp)
mov    %r11,%rcx
neg    %rcx
mov    %rcx,(%rsp)
mov    -0x78(%rsp),%rcx
lea    (%rcx,%rdx,8),%r15
add    $0x10,%r15
lea    0x0(,%rsi,8),%rsi
mov    %r10,%rbx
lea    0x10(%r10,%rdx,8),%r12
lea    (%r10,%rdx,8),%rbp
add    $0x8,%rbp
mov    %rdx,-0x8(%rsp)
lea    (%rcx,%rdx,8),%r13
add    $0x8,%r13
xor    %r14d,%r14d
mov    %r8d,-0x68(%rsp)
mov    %rsi,-0x70(%rsp)
jmp    191d <unbalance+0x81d>
nopl   (%rax)
add    $0x1,%rax
add    $0x1,%r14
add    %rsi,%r15
add    %rsi,%r12
add    %rsi,%rbp
add    %rsi,%r13
cmp    %eax,%r8d
je     113c <unbalance+0x3c>
test   %edi,%edi
jle    1900 <unbalance+0x800>
mov    %rax,%rcx
mov    -0x50(%rsp),%rdx
imul   %rdx,%rcx
mov    %rcx,-0x58(%rsp)
cmp    $0x1,%edi
jne    1940 <unbalance+0x840>
xor    %ebx,%ebx
jmp    1ad0 <unbalance+0x9d0>
xchg   %ax,%ax
mov    %r14,%rcx
imul   %rdx,%rcx
mov    -0x8(%rsp),%rdx
add    %rcx,%rdx
add    -0x28(%rsp),%rcx
mov    -0x48(%rsp),%rsi
lea    (%rsi,%r14,1),%r8
lea    (%r10,%rdx,8),%rbx
lea    (%r10,%rcx,8),%rdi
mov    -0x78(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
lea    (%rsi,%rcx,8),%rcx
lea    (%r9,%r8,8),%rsi
cmp    %rcx,%rbx
setb   -0x40(%rsp)
cmp    %rdi,%rdx
setb   %r8b
cmp    %rsi,%rbx
lea    (%r9,%rax,8),%r10
setb   %bl
cmp    %rdi,%r10
setb   %dil
cmp    %rsi,%rdx
setb   %dl
cmp    %rcx,%r10
setb   %sil
test   %r8b,-0x40(%rsp)
jne    1ab3 <unbalance+0x9b3>
and    %dil,%bl
jne    1ab3 <unbalance+0x9b3>
mov    $0x0,%ebx
and    %sil,%dl
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x68(%rsp),%r8d
mov    -0x70(%rsp),%rsi
jne    1ad0 <unbalance+0x9d0>
cmpq   $0x0,-0x18(%rsp)
je     1b7a <unbalance+0xa7a>
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
mov    -0x20(%rsp),%rdx
xor    %r8d,%r8d
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%r12,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,-0x10(%r12,%r8,8)
movupd -0x10(%r15,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,-0x10(%r15,%r8,8)
movupd (%r12,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r12,%r8,8)
movupd (%r15,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r15,%r8,8)
add    $0x4,%r8
add    $0xfffffffffffffffe,%rdx
jne    1a00 <unbalance+0x900>
testb  $0x1,-0x30(%rsp)
je     1a96 <unbalance+0x996>
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
add    -0x58(%rsp),%r8
mov    %r10,%rcx
movupd (%r10,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%r10,%r8,8)
movsd  (%r9,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
mov    -0x78(%rsp),%rcx
movupd (%rcx,%r8,8),%xmm1
mulpd  %xmm0,%xmm1
movupd %xmm1,(%rcx,%r8,8)
mov    -0x10(%rsp),%rcx
mov    %rcx,%rbx
cmp    %r11,%rcx
mov    -0x68(%rsp),%r8d
mov    -0x70(%rsp),%rsi
je     1900 <unbalance+0x800>
jmp    1ad0 <unbalance+0x9d0>
xor    %ebx,%ebx
mov    -0x60(%rsp),%r10
mov    -0x7c(%rsp),%edi
mov    -0x68(%rsp),%r8d
mov    -0x70(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdx
test   $0x1,%r11b
je     1b12 <unbalance+0xa12>
movsd  (%r9,%rax,8),%xmm0
mov    -0x58(%rsp),%rdx
add    %rbx,%rdx
mov    %r10,%rcx
mulsd  (%r10,%rdx,8),%xmm0
movsd  %xmm0,(%r10,%rdx,8)
movsd  (%r9,%rax,8),%xmm0
mov    -0x78(%rsp),%rcx
mulsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
mov    %rbx,%rdx
or     $0x1,%rdx
not    %rbx
cmp    (%rsp),%rbx
je     1900 <unbalance+0x800>
nop
movsd  (%r9,%rax,8),%xmm0
mulsd  -0x8(%rbp,%rdx,8),%xmm0
movsd  %xmm0,-0x8(%rbp,%rdx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  -0x8(%r13,%rdx,8),%xmm0
movsd  %xmm0,-0x8(%r13,%rdx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rdx,8)
movsd  (%r9,%rax,8),%xmm0
mulsd  0x0(%r13,%rdx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%r11
jne    1b20 <unbalance+0xa20>
jmp    1900 <unbalance+0x800>
xor    %r8d,%r8d
testb  $0x1,-0x30(%rsp)
jne    1a55 <unbalance+0x955>
jmp    1a96 <unbalance+0x996>

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