#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ *n;
typedef size_t l;
typedef size_t k;
typedef size_t j;
typedef size_t i;

/* Variables and functions */
scalar_t__ fabs(double);
void balance(double *mat, int n, int *low, int *hi, double *scale) {
  double c, f, g, r, s;
  int i, j, k, l, done;
  for (k = n - 1; k >= 0; k--) {
    for (j = k; j >= 0; j--) {
      for (i = 0; i <= k; i++) {
        if (i != j && fabs(mat[((j) * (n) + (i))]) != 0)
          break;
      }
      if (i > k) {
        scale[k] = j;
        if (j != k) {
          for (i = 0; i <= k; i++) {
            c = mat[((i) * (n) + (j))];
            mat[((i) * (n) + (j))] = mat[((i) * (n) + (k))];
            mat[((i) * (n) + (k))] = c;
          }
          for (i = 0; i < n; i++) {
            c = mat[((j) * (n) + (i))];
            mat[((j) * (n) + (i))] = mat[((k) * (n) + (i))];
            mat[((k) * (n) + (i))] = c;
          }
        }
        break;
      }
    }
    if (j < 0)
      break;
  }
  for (l = 0; l <= k; l++) {
    for (j = l; j <= k; j++) {
      for (i = l; i <= k; i++) {
        if (i != j && fabs(mat[((i) * (n) + (j))]) != 0)
          break;
      }
      if (i > k) {
        scale[l] = j;
        if (j != l) {
          for (i = 0; i <= k; i++) {
            c = mat[((i) * (n) + (j))];
            mat[((i) * (n) + (j))] = mat[((i) * (n) + (l))];
            mat[((i) * (n) + (l))] = c;
          }
          for (i = l; i < n; i++) {
            c = mat[((j) * (n) + (i))];
            mat[((j) * (n) + (i))] = mat[((l) * (n) + (i))];
            mat[((l) * (n) + (i))] = c;
          }
        }
        break;
      }
    }
    if (j > k)
      break;
  }
  *hi = k;
  *low = l;
  for (i = l; i <= k; i++) {
    scale[i] = 1;
  }
  do {
    for (done = 1, i = l; i <= k; i++) {
      for (c = 0, r = 0, j = l; j <= k; j++) {
        if (j != i) {
          c += fabs(mat[((j) * (n) + (i))]);
          r += fabs(mat[((i) * (n) + (j))]);
        }
      }
      if (c != 0 && r != 0) {
        g = r / 2;
        f = 1;
        s = c + r;
        while (c < g) {
          f *= 2;
          c *= 2 * 2;
        }
        g = r * 2;
        while (c >= g) {
          f /= 2;
          c /= 2 * 2;
        }
        if ((c + r) / f < 0.95 * s) {
          done = 0;
          g = 1 / f;
          scale[i] *= f;
          for (j = l; j < n; j++) {
            mat[((i) * (n) + (j))] *= g;
          }
          for (j = 0; j <= k; j++) {
            mat[((j) * (n) + (i))] *= f;
          }
        }
      }
    }
  } while (!done);
}


x86 assembly (clang, -O0):
<balance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
jl     1319 <balance+0x209>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
jl     12f7 <balance+0x1e7>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     11aa <balance+0x9a>
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
je     1197 <balance+0x87>
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
cmp    $0x0,%rax
je     1197 <balance+0x87>
jmp    11aa <balance+0x9a>
jmp    119c <balance+0x8c>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1155 <balance+0x45>
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jle    12e4 <balance+0x1d4>
cvtsi2sdl -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
je     12df <balance+0x1cf>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1257 <balance+0x147>
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11db <balance+0xcb>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12da <balance+0x1ca>
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    125e <balance+0x14e>
jmp    12df <balance+0x1cf>
jmp    12f7 <balance+0x1e7>
jmp    12e9 <balance+0x1d9>
mov    -0x58(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x58(%rbp)
jmp    1144 <balance+0x34>
cmpl   $0x0,-0x58(%rbp)
jge    1306 <balance+0x1f6>
jmp    1319 <balance+0x209>
jmp    130b <balance+0x1fb>
mov    -0x5c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x5c(%rbp)
jmp    1134 <balance+0x24>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1509 <balance+0x3f9>
mov    -0x60(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     14e5 <balance+0x3d5>
mov    -0x60(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1399 <balance+0x289>
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
je     1386 <balance+0x276>
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
cmp    $0x0,%rax
je     1386 <balance+0x276>
jmp    1399 <balance+0x289>
jmp    138b <balance+0x27b>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1344 <balance+0x234>
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jle    14d2 <balance+0x3c2>
cvtsi2sdl -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
cmp    -0x60(%rbp),%eax
je     14cd <balance+0x3bd>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1446 <balance+0x336>
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13ca <balance+0x2ba>
mov    -0x60(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    14c8 <balance+0x3b8>
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x60(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x60(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    144c <balance+0x33c>
jmp    14cd <balance+0x3bd>
jmp    14e5 <balance+0x3d5>
jmp    14d7 <balance+0x3c7>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1332 <balance+0x222>
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jle    14f6 <balance+0x3e6>
jmp    1509 <balance+0x3f9>
jmp    14fb <balance+0x3eb>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1320 <balance+0x210>
mov    -0x5c(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1550 <balance+0x440>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  0xac3(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1521 <balance+0x411>
jmp    1555 <balance+0x445>
movl   $0x1,-0x64(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     17f3 <balance+0x6e3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1603 <balance+0x4f3>
mov    -0x58(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     15f0 <balance+0x4e0>
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    15f5 <balance+0x4e5>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1584 <balance+0x474>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1620 <balance+0x510>
jp     1620 <balance+0x510>
jmp    17e0 <balance+0x6d0>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    163d <balance+0x52d>
jp     163d <balance+0x52d>
jmp    17e0 <balance+0x6d0>
movsd  -0x48(%rbp),%xmm0
movsd  0x9be(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0x9a5(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    16ac <balance+0x59c>
movsd  0x97d(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0x97b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    166f <balance+0x55f>
movsd  0x954(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     16ff <balance+0x5ef>
movsd  -0x38(%rbp),%xmm0
movsd  0x92d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0x927(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    16be <balance+0x5ae>
movsd  -0x30(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
divsd  -0x38(%rbp),%xmm1
movsd  0x8fa(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    17db <balance+0x6cb>
movl   $0x0,-0x64(%rbp)
movsd  0x8cc(%rip),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1795 <balance+0x685>
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x58(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    175b <balance+0x64b>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     17d6 <balance+0x6c6>
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    179c <balance+0x68c>
jmp    17db <balance+0x6cb>
jmp    17e0 <balance+0x6d0>
jmp    17e5 <balance+0x6d5>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1562 <balance+0x452>
jmp    17f8 <balance+0x6e8>
cmpl   $0x0,-0x64(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1555 <balance+0x445>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<balance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %r8,0x78(%rsp)
mov    %rcx,0x98(%rsp)
mov    %rdx,0xa0(%rsp)
movslq %esi,%r12
test   %r12d,%r12d
mov    $0x0,%r8d
cmovs  %esi,%r8d
mov    %r12d,%ebp
lea    -0x1(%r12),%rbx
imul   %r12,%rbx
mov    %ebp,%eax
and    $0xfffffffc,%eax
mov    %rax,0xf8(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0xf0(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0xe8(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0xe0(%rsp)
mov    %rbp,%rax
neg    %rax
mov    %rax,0x140(%rsp)
lea    -0x1(%rsi),%eax
movslq %eax,%rdx
mov    %r12,%rcx
imul   %rdx,%rcx
lea    (%rdi,%rcx,8),%rcx
mov    %rcx,0x80(%rsp)
lea    0x0(,%r12,8),%rcx
mov    %rcx,0xc8(%rsp)
neg    %rcx
mov    %rcx,0x68(%rsp)
mov    %r12,%rcx
shl    $0x4,%rcx
mov    %rdx,0x88(%rsp)
imul   %esi,%edx
mov    %edx,0x38(%rsp)
movabs $0x7ffffffffffffffe,%rdx
ff ff 7f
mov    %rdx,0x130(%rsp)
mov    %r8,0xd0(%rsp)
lea    -0x1(%r8),%edx
mov    %edx,0x12c(%rsp)
lea    (%rdi,%rbp,8),%rdx
mov    %rdx,0x100(%rsp)
mov    %rbp,0x110(%rsp)
lea    (%rbx,%rbp,1),%rdx
mov    %rdx,0x120(%rsp)
mov    %rcx,0x108(%rsp)
lea    -0x8(%rcx),%r13
lea    -0x8(,%r12,8),%r14
ff
lea    0x30(%rdi),%rcx
mov    %rcx,0x138(%rsp)
lea    0x30(%rdi,%rbx,8),%r11
mov    %rbx,0xc0(%rsp)
lea    0x8(%rdi,%rbx,8),%rcx
mov    %rcx,0x60(%rsp)
mov    %rdi,(%rsp)
lea    0x8(%rdi),%rcx
mov    %rcx,0xd8(%rsp)
mov    %rsi,0xb0(%rsp)
mov    %esi,%ecx
xor    %edx,%edx
mov    %rdx,0x30(%rsp)
mov    %r12,0x18(%rsp)
mov    %r12,0x90(%rsp)
jmp    12db <balance+0x1cb>
xchg   %ax,%ax
mov    0x10(%rsp),%rax
addq   $0xffffffffffffffff,0x88(%rsp)
addq   $0x1,0x30(%rsp)
mov    %eax,%esi
mov    0x50(%rsp),%rax
add    $0xffffffff,%eax
lea    -0x1(%r15),%ecx
mov    0x68(%rsp),%rdx
add    %rdx,0x80(%rsp)
add    $0xfffffffffffffff8,%r13
add    $0xfffffffffffffff8,%r14
sub    %ebp,0x38(%rsp)
add    %rdx,%r11
add    %rdx,0x60(%rsp)
test   %esi,%esi
js     16ee <balance+0x5de>
mov    0x18(%rsp),%rsi
test   %rsi,%rsi
jle    1c16 <balance+0xb06>
mov    %eax,%ebp
mov    %ecx,%eax
mov    %cl,0x118(%rsp)
mov    %ecx,%r15d
mov    %r15d,%edi
and    $0xfffffffe,%edi
mov    %r12d,%ecx
mov    0x30(%rsp),%rax
sub    %eax,%ecx
mov    %rcx,0x48(%rsp)
imul   %r12,%rax
mov    0xc0(%rsp),%rcx
sub    %rax,%rcx
mov    (%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
mov    %rcx,0x58(%rsp)
mov    0x120(%rsp),%rcx
sub    %rax,%rcx
lea    (%rdx,%rcx,8),%rax
mov    %rax,0xa8(%rsp)
mov    %rsi,%rax
mov    %rsi,0x40(%rsp)
lea    -0x1(%rsi),%rcx
mov    %rcx,%rax
mov    %rcx,0x18(%rsp)
mov    %eax,0x70(%rsp)
mov    0x38(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    %rbp,%rax
mov    %rbp,0x50(%rsp)
mov    %ebp,%esi
mov    0x80(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x88(%rsp),%rax
mov    %esi,0x28(%rsp)
mov    %rax,0x10(%rsp)
mov    %eax,%eax
xor    %ebp,%ebp
mov    %rax,0xb8(%rsp)
jmp    13a9 <balance+0x299>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    %rbp,%r15
je     1420 <balance+0x310>
cmp    %rbp,%rax
je     13a0 <balance+0x290>
mov    0x8(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    %r11,%rbx
mov    %rdi,%r12
call   1030 <fabs@plt>
mov    %r12,%rdi
mov    %rbx,%r11
test   %rax,%rax
mov    0xb8(%rsp),%rax
je     13a0 <balance+0x290>
mov    0x10(%rsp),%rcx
lea    -0x1(%rcx),%rax
mov    0x8(%rsp),%rdx
add    0x68(%rsp),%rdx
mov    %rdx,0x8(%rsp)
mov    0x28(%rsp),%esi
add    $0xffffffff,%esi
mov    0x20(%rsp),%edx
sub    0xb0(%rsp),%edx
mov    %edx,0x20(%rsp)
test   %rcx,%rcx
mov    0x90(%rsp),%r12
jg     137e <balance+0x26e>
jmp    16ee <balance+0x5de>
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%rdx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
mov    0x78(%rsp),%rax
mov    0x18(%rsp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x70(%rsp),%eax
cmp    %eax,%edx
mov    0xb0(%rsp),%rbp
mov    0x90(%rsp),%r12
je     1295 <balance+0x185>
cmpl   $0x1,0x48(%rsp)
jne    1470 <balance+0x360>
xor    %eax,%eax
jmp    14c8 <balance+0x3b8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq 0x28(%rsp),%rcx
lea    (%r12,%rcx,1),%rdx
mov    (%rsp),%rsi
xor    %eax,%eax
mov    0x108(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm0
movsd  (%rsi,%r14,1),%xmm1
movsd  %xmm1,(%rsi,%rcx,8)
movsd  %xmm0,(%rsi,%r14,1)
movsd  (%rsi,%rdx,8),%xmm0
movsd  (%rsi,%r13,1),%xmm1
movsd  %xmm1,(%rsi,%rdx,8)
movsd  %xmm0,(%rsi,%r13,1)
add    $0x2,%rax
add    %rbx,%rsi
cmp    %rax,%rdi
jne    1490 <balance+0x380>
testb  $0x1,0x48(%rsp)
je     14f8 <balance+0x3e8>
movslq 0x10(%rsp),%rcx
imul   %r12,%rax
add    %rax,%rcx
mov    (%rsp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
add    0x18(%rsp),%rax
movsd  (%rdx,%rax,8),%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
movsd  %xmm0,(%rdx,%rax,8)
test   %ebp,%ebp
mov    0x110(%rsp),%rbx
jle    1290 <balance+0x180>
mov    0x10(%rsp),%rax
mov    %eax,%ecx
imul   %ebp,%ecx
mov    0x18(%rsp),%rax
imul   %r12,%rax
movslq %ecx,%r8
cmp    $0x4,%ebp
jb     1550 <balance+0x440>
mov    (%rsp),%rdx
lea    (%rdx,%r8,8),%rdx
cmp    0xa8(%rsp),%rdx
jae    15ea <balance+0x4da>
mov    0x100(%rsp),%rcx
lea    (%rcx,%r8,8),%rdx
cmp    %rdx,0x58(%rsp)
jae    15ea <balance+0x4da>
xor    %esi,%esi
mov    %rsi,%rdx
test   $0x1,%bl
je     1581 <balance+0x471>
add    %rsi,%r8
mov    (%rsp),%rdx
movsd  (%rdx,%r8,8),%xmm0
add    %rsi,%rax
movsd  (%rdx,%rax,8),%xmm1
movsd  %xmm1,(%rdx,%r8,8)
movsd  %xmm0,(%rdx,%rax,8)
mov    %rsi,%rdx
or     $0x1,%rdx
not    %rsi
cmp    0x140(%rsp),%rsi
je     1290 <balance+0x180>
movslq 0x20(%rsp),%rax
mov    0xd8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    0x60(%rsp),%rcx
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rax,%rdx,8),%xmm0
movsd  -0x8(%rcx,%rdx,8),%xmm1
movsd  %xmm1,-0x8(%rax,%rdx,8)
movsd  %xmm0,-0x8(%rcx,%rdx,8)
movsd  (%rax,%rdx,8),%xmm0
movsd  (%rcx,%rdx,8),%xmm1
movsd  %xmm1,(%rax,%rdx,8)
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rbx
jne    15b0 <balance+0x4a0>
jmp    1290 <balance+0x180>
cmpq   $0x0,0xf0(%rsp)
je     16e0 <balance+0x5d0>
movslq 0x20(%rsp),%rdx
mov    0x138(%rsp),%rsi
lea    (%rsi,%rdx,8),%rsi
mov    0xe0(%rsp),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups -0x30(%rsi,%rdx,8),%xmm0
movups -0x20(%rsi,%rdx,8),%xmm1
movups -0x30(%r11,%rdx,8),%xmm2
movups -0x20(%r11,%rdx,8),%xmm3
movups %xmm2,-0x30(%rsi,%rdx,8)
movups %xmm3,-0x20(%rsi,%rdx,8)
movups %xmm0,-0x30(%r11,%rdx,8)
movups %xmm1,-0x20(%r11,%rdx,8)
movupd -0x10(%rsi,%rdx,8),%xmm0
movupd (%rsi,%rdx,8),%xmm1
movupd -0x10(%r11,%rdx,8),%xmm2
movupd (%r11,%rdx,8),%xmm3
movupd %xmm2,-0x10(%rsi,%rdx,8)
movupd %xmm3,(%rsi,%rdx,8)
movupd %xmm0,-0x10(%r11,%rdx,8)
movupd %xmm1,(%r11,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rcx
jne    1620 <balance+0x510>
testb  $0x1,0xe8(%rsp)
01
je     16c7 <balance+0x5b7>
lea    (%rdx,%r8,1),%rsi
mov    (%rsp),%rcx
movupd (%rcx,%rsi,8),%xmm0
movupd 0x10(%rcx,%rsi,8),%xmm1
add    %rax,%rdx
movupd (%rcx,%rdx,8),%xmm2
movupd 0x10(%rcx,%rdx,8),%xmm3
movupd %xmm2,(%rcx,%rsi,8)
movupd %xmm3,0x10(%rcx,%rsi,8)
movupd %xmm0,(%rcx,%rdx,8)
movupd %xmm1,0x10(%rcx,%rdx,8)
mov    0xf8(%rsp),%rcx
mov    %rcx,%rsi
cmp    %rbx,%rcx
je     1290 <balance+0x180>
jmp    1552 <balance+0x442>
xor    %edx,%edx
testb  $0x1,0xe8(%rsp)
01
jne    1690 <balance+0x580>
jmp    16c7 <balance+0x5b7>
mov    0x40(%rsp),%rdx
test   %edx,%edx
setg   %al
mov    %rax,0xa8(%rsp)
jle    1c57 <balance+0xb47>
mov    %edx,%eax
mov    %rax,0x20(%rsp)
lea    0x8(,%r12,8),%rdx
mov    %r15,%rbp
neg    %rbp
movzbl 0x118(%rsp),%eax
and    $0x1,%eax
sub    %rax,%r15
mov    %r15,0xd0(%rsp)
mov    0x110(%rsp),%r9
lea    -0x4(%r9),%rcx
mov    (%rsp),%rax
lea    0x10(%rax),%r10
xor    %esi,%esi
mov    0xd8(%rsp),%r14
xor    %r15d,%r15d
mov    0xc8(%rsp),%r13
mov    %rax,%rdi
xor    %r11d,%r11d
mov    %rdx,0xe0(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %r13,0x70(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x80(%rsp)
mov    %r10,0x88(%rsp)
mov    %rcx,0x68(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0xe8(%rsp)
mov    %r9,%rax
sub    %r11,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,0xf0(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,0xf8(%rsp)
mov    (%rsp),%rcx
mov    %rax,0x58(%rsp)
lea    (%rcx,%rax,8),%rax
mov    %rax,0x100(%rsp)
imul   %r11,%rdx
add    %rcx,%rdx
mov    %rdx,0x118(%rsp)
mov    %r11,%rax
imul   %r12,%rax
mov    %rax,0xc0(%rsp)
add    %r9,%rax
lea    (%rcx,%rax,8),%rax
mov    %rax,0x120(%rsp)
mov    $0x1,%cl
mov    %rsi,0x60(%rsp)
mov    %esi,%eax
mov    %esi,0x28(%rsp)
mov    %r11d,%ebx
mov    %rdi,0x48(%rsp)
mov    %rdi,%r13
mov    %r11,%rdi
xor    %r14d,%r14d
mov    %r11,0x30(%rsp)
mov    %r11,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %cl,0xb8(%rsp)
mov    %r13,%rbx
xor    %r15d,%r15d
jmp    1861 <balance+0x751>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xffffffffffffffff,%r15
add    0xc8(%rsp),%rbx
cmp    %r15,%rbp
je     18c0 <balance+0x7b0>
cmp    %r15,%r14
je     1850 <balance+0x740>
movsd  (%rbx),%xmm0
call   1030 <fabs@plt>
test   %rax,%rax
je     1850 <balance+0x740>
mov    0x8(%rsp),%rsi
add    $0x1,%rsi
mov    0x20(%rsp),%rax
cmp    %rax,%rsi
setb   %cl
add    $0xffffffffffffffff,%r14
add    $0x8,%r13
mov    0x10(%rsp),%ebx
add    $0x1,%ebx
mov    0x28(%rsp),%edx
add    0xb0(%rsp),%edx
mov    %edx,0x28(%rsp)
mov    %rsi,%rdx
mov    %rsi,0x8(%rsp)
cmp    %rax,%rsi
jne    182f <balance+0x71f>
jmp    1c66 <balance+0xb56>
nopl   0x0(%rax)
mov    0x8(%rsp),%rcx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    0x78(%rsp),%rax
mov    0x30(%rsp),%r11
movsd  %xmm0,(%rax,%r11,8)
mov    %ecx,%eax
cmp    %rax,%r11
mov    0xb0(%rsp),%r8
mov    0x108(%rsp),%rbx
mov    0x110(%rsp),%r9
mov    0x88(%rsp),%r10
mov    0x80(%rsp),%r14
mov    0x38(%rsp),%r15
mov    0x70(%rsp),%r13
je     1ba0 <balance+0xa90>
cmpl   $0x1,0x20(%rsp)
jne    1930 <balance+0x820>
xor    %eax,%eax
jmp    1988 <balance+0x878>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq 0x10(%rsp),%rcx
lea    (%r12,%rcx,1),%rdx
mov    (%rsp),%rsi
xor    %eax,%eax
mov    0xd0(%rsp),%rdi
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm0
movsd  (%rsi,%r15,1),%xmm1
movsd  %xmm1,(%rsi,%rcx,8)
movsd  %xmm0,(%rsi,%r15,1)
movsd  (%rsi,%rdx,8),%xmm0
movsd  (%rsi,%r13,1),%xmm1
movsd  %xmm1,(%rsi,%rdx,8)
movsd  %xmm0,(%rsi,%r13,1)
add    $0x2,%rax
add    %rbx,%rsi
cmp    %rax,%rdi
jne    1950 <balance+0x840>
testb  $0x1,0x40(%rsp)
je     19b6 <balance+0x8a6>
movslq 0x8(%rsp),%rcx
imul   %r12,%rax
add    %rax,%rcx
mov    (%rsp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
add    %r11,%rax
movsd  (%rdx,%rax,8),%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
movsd  %xmm0,(%rdx,%rax,8)
cmp    %r12,%r11
jge    1ba0 <balance+0xa90>
mov    0x8(%rsp),%rax
imul   %r8d,%eax
cltq
mov    %r11,%rcx
mov    0x58(%rsp),%rdi
cmp    $0x4,%rdi
jb     1b00 <balance+0x9f0>
lea    (%r11,%rax,1),%rcx
mov    (%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
cmp    0x120(%rsp),%rdx
jae    1a0f <balance+0x8ff>
mov    0x100(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    %r11,%rcx
cmp    %rdx,0x118(%rsp)
jb     1b00 <balance+0x9f0>
cmpq   $0x4,0xf0(%rsp)
jae    1a21 <balance+0x911>
xor    %edx,%edx
jmp    1a9e <balance+0x98e>
movslq 0x28(%rsp),%rcx
lea    (%r10,%rcx,8),%rcx
xor    %edx,%edx
mov    0x48(%rsp),%rsi
mov    0xe8(%rsp),%rbx
nopl   0x0(%rax)
movups -0x10(%rcx,%rdx,8),%xmm0
movups (%rcx,%rdx,8),%xmm1
movups (%rsi,%rdx,8),%xmm2
movups 0x10(%rsi,%rdx,8),%xmm3
movups %xmm2,-0x10(%rcx,%rdx,8)
movups %xmm3,(%rcx,%rdx,8)
movups %xmm0,(%rsi,%rdx,8)
movups %xmm1,0x10(%rsi,%rdx,8)
movupd 0x10(%rcx,%rdx,8),%xmm0
movupd 0x20(%rcx,%rdx,8),%xmm1
movupd 0x20(%rsi,%rdx,8),%xmm2
movupd 0x30(%rsi,%rdx,8),%xmm3
movupd %xmm2,0x10(%rcx,%rdx,8)
movupd %xmm3,0x20(%rcx,%rdx,8)
movupd %xmm0,0x20(%rsi,%rdx,8)
movupd %xmm1,0x30(%rsi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rbx
jne    1a40 <balance+0x930>
mov    %rdi,%rcx
and    $0xfffffffffffffffc,%rcx
testb  $0x1,0xf8(%rsp)
01
je     1af3 <balance+0x9e3>
add    %r11,%rdx
lea    (%rdx,%rax,1),%rsi
mov    (%rsp),%rbx
movupd (%rbx,%rsi,8),%xmm0
movupd 0x10(%rbx,%rsi,8),%xmm1
add    0xc0(%rsp),%rdx
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
movupd %xmm2,(%rbx,%rsi,8)
movupd %xmm3,0x10(%rbx,%rsi,8)
movupd %xmm0,(%rbx,%rdx,8)
movupd %xmm1,0x10(%rbx,%rdx,8)
mov    0x58(%rsp),%rdi
cmp    %rcx,%rdi
je     1ba0 <balance+0xa90>
add    %r11,%rcx
nop
mov    %r9d,%esi
sub    %ecx,%esi
mov    %rcx,%rdx
test   $0x1,%sil
je     1b38 <balance+0xa28>
add    %rcx,%rax
mov    (%rsp),%rdx
movsd  (%rdx,%rax,8),%xmm0
mov    0xc0(%rsp),%rsi
add    %rcx,%rsi
movsd  (%rdx,%rsi,8),%xmm1
movsd  %xmm1,(%rdx,%rax,8)
movsd  %xmm0,(%rdx,%rsi,8)
lea    0x1(%rcx),%rdx
not    %rcx
cmp    0x140(%rsp),%rcx
je     1ba0 <balance+0xa90>
movslq 0x28(%rsp),%rax
mov    0xd8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
cs nopw 0x0(%rax,%rax,1)
movsd  -0x8(%rax,%rdx,8),%xmm0
movsd  -0x8(%r14,%rdx,8),%xmm1
movsd  %xmm1,-0x8(%rax,%rdx,8)
movsd  %xmm0,-0x8(%r14,%rdx,8)
movsd  (%rax,%rdx,8),%xmm0
movsd  (%r14,%rdx,8),%xmm1
movsd  %xmm1,(%rax,%rdx,8)
movsd  %xmm0,(%r14,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%r9
jne    1b60 <balance+0xa50>
nopl   0x0(%rax)
testb  $0x1,0xb8(%rsp)
01
je     1c6b <balance+0xb5b>
add    $0x1,%r11
mov    0xe0(%rsp),%rdx
mov    0x48(%rsp),%rdi
add    %rdx,%rdi
add    $0x1,%rbp
add    $0x8,%r13
add    $0x8,%r15
mov    0x68(%rsp),%rcx
add    $0xffffffffffffffff,%rcx
add    $0x8,%r10
mov    0x60(%rsp),%rsi
add    %r8d,%esi
add    0xc8(%rsp),%r14
cmp    0x20(%rsp),%r11
jne    1770 <balance+0x660>
mov    0x18(%rsp),%rax
mov    %eax,%edi
mov    0x40(%rsp),%rax
mov    %eax,%esi
mov    0xa0(%rsp),%rcx
mov    0x98(%rsp),%rdx
jmp    1c41 <balance+0xb31>
xor    %eax,%eax
mov    %rax,0xa8(%rsp)
xor    %eax,%eax
mov    0xa0(%rsp),%rcx
mov    0x98(%rsp),%rdx
mov    0xd0(%rsp),%rsi
mov    0x12c(%rsp),%edi
mov    %edi,(%rdx)
mov    %eax,(%rcx)
mov    %rax,0x30(%rsp)
cmp    %esi,%eax
setl   %r14b
mov    %esi,%edx
jmp    1ddc <balance+0xccc>
xor    %eax,%eax
mov    %rax,0xa8(%rsp)
xor    %r11d,%r11d
jmp    1c70 <balance+0xb60>
mov    0x30(%rsp),%r11
mov    0x40(%rsp),%rdx
mov    0xa0(%rsp),%rax
mov    0x98(%rsp),%rcx
mov    0x18(%rsp),%rsi
mov    %esi,(%rcx)
mov    %r11d,(%rax)
cmp    %edx,%r11d
setl   %r14b
mov    %r11,0x30(%rsp)
jge    1cb4 <balance+0xba4>
mov    %r11d,%eax
mov    %r11d,%esi
not    %esi
lea    (%rsi,%rdx,1),%r10d
cmp    $0x3,%r10d
jae    1cbc <balance+0xbac>
mov    0x78(%rsp),%r9
jmp    1dc1 <balance+0xcb1>
xor    %r14d,%r14d
jmp    1ddc <balance+0xccc>
add    $0x1,%r10
mov    %r10,%r8
and    $0xfffffffffffffffc,%r8
lea    -0x4(%r8),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
cmp    $0xc,%rdx
jae    1ce5 <balance+0xbd5>
xor    %edx,%edx
mov    0x78(%rsp),%r9
jmp    1d5a <balance+0xc4a>
mov    0x78(%rsp),%r9
lea    (%r9,%rax,8),%rbp
add    $0x70,%rbp
mov    0x50(%rsp),%rdx
lea    (%rsi,%rdx,1),%ebx
add    $0x1,%ebx
add    $0x1,%rbx
and    $0xfffffffffffffffc,%rbx
add    $0xfffffffffffffffc,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
and    $0xfffffffffffffffc,%rbx
xor    %edx,%edx
movapd 0x12e1(%rip),%xmm0
nop
movupd %xmm0,-0x70(%rbp,%rdx,8)
movupd %xmm0,-0x60(%rbp,%rdx,8)
movupd %xmm0,-0x50(%rbp,%rdx,8)
movupd %xmm0,-0x40(%rbp,%rdx,8)
movupd %xmm0,-0x30(%rbp,%rdx,8)
movupd %xmm0,-0x20(%rbp,%rdx,8)
movupd %xmm0,-0x10(%rbp,%rdx,8)
movupd %xmm0,0x0(%rbp,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rbx
jne    1d20 <balance+0xc10>
test   $0x3,%cl
je     1db4 <balance+0xca4>
add    %rax,%rdx
lea    (%r9,%rdx,8),%rdx
add    $0x10,%rdx
add    0x50(%rsp),%esi
add    $0x2,%sil
and    $0xc,%sil
add    $0xfc,%sil
shr    $0x2,%sil
add    $0x1,%sil
movzbl %sil,%esi
and    $0x3,%esi
shl    $0x5,%rsi
xor    %edi,%edi
movapd 0x1269(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm0,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rsi
jne    1da0 <balance+0xc90>
cmp    %r8,%r10
mov    0x40(%rsp),%rdx
je     1ddc <balance+0xccc>
add    %r8,%rax
movabs $0x3ff0000000000000,%rcx
nopl   0x0(%rax,%rax,1)
mov    %rcx,(%r9,%rax,8)
add    $0x1,%rax
cmp    %eax,%edx
jg     1dd0 <balance+0xcc0>
mov    %r14d,0x50(%rsp)
test   %r14b,%r14b
je     225d <balance+0x114d>
movslq 0x30(%rsp),%rdi
mov    %edx,%r14d
mov    %r12,%rax
sub    %rdi,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,0x68(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rax,0x48(%rsp)
and    $0xfffffffffffffffc,%rax
mov    %rax,0x60(%rsp)
add    %rdi,%rax
mov    %rax,0x58(%rsp)
mov    %rcx,%rax
mov    %rcx,0x40(%rsp)
and    %rcx,0x130(%rsp)
mov    %r14d,%ebp
and    $0xfffffffe,%ebp
mov    0x50(%rsp),%eax
xor    $0x1,%al
mov    %eax,0x50(%rsp)
mov    %rdi,%rax
neg    %rax
mov    %rax,0x88(%rsp)
mov    %rdi,%rax
imul   %r12,%rax
mov    %rax,0x80(%rsp)
mov    %r14,0x10(%rsp)
sub    %edi,%r14d
movl   $0x1,0x18(%rsp)
xorpd  %xmm8,%xmm8
movsd  0x1197(%rip),%xmm7
movsd  0x119f(%rip),%xmm5
movsd  0x119f(%rip),%xmm6
mov    %rdi,%rbx
mov    %rdi,0x38(%rsp)
mov    %rbp,0x70(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rcx
imul   %r12,%rcx
mov    0x88(%rsp),%rax
lea    (%rax,%rbx,1),%r13
mov    %rcx,0x28(%rsp)
lea    (%rdi,%rcx,1),%rax
mov    (%rsp),%rcx
mov    %rax,0x20(%rsp)
lea    (%rcx,%rax,8),%rbp
mov    0x80(%rsp),%rax
add    %rbx,%rax
lea    (%rcx,%rax,8),%r15
xor    %r12d,%r12d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm3,%xmm3
jmp    1f01 <balance+0xdf1>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
add    0xc8(%rsp),%r15
cmp    %r12d,%r14d
je     1f80 <balance+0xe70>
cmp    %r12,%r13
je     1ef0 <balance+0xde0>
movsd  (%r15),%xmm0
movsd  %xmm3,0xb8(%rsp)
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x0(%rbp,%r12,8),%xmm0
call   1030 <fabs@plt>
movsd  0xb8(%rsp),%xmm3
movsd  0x10da(%rip),%xmm6
movsd  0x10ca(%rip),%xmm5
movsd  0x10b2(%rip),%xmm7
xorpd  %xmm8,%xmm8
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  %xmm0,%xmm3
jmp    1ef0 <balance+0xde0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x8(%rsp),%xmm0
ucomisd %xmm8,%xmm0
jne    1f8f <balance+0xe7f>
jnp    2000 <balance+0xef0>
ucomisd %xmm8,%xmm3
jne    1f98 <balance+0xe88>
jnp    2000 <balance+0xef0>
movapd %xmm3,%xmm2
mulsd  %xmm7,%xmm2
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm2
movsd  0x1066(%rip),%xmm0
jbe    1fde <balance+0xece>
movsd  0x8(%rsp),%xmm1
movsd  0x1056(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  %xmm0,%xmm0
mulsd  %xmm5,%xmm1
ucomisd %xmm1,%xmm2
ja     1fd0 <balance+0xec0>
movapd %xmm3,%xmm2
addsd  %xmm3,%xmm2
ucomisd %xmm2,%xmm1
jae    2020 <balance+0xf10>
mov    0x90(%rsp),%r12
mov    0x38(%rsp),%rdi
mov    0x70(%rsp),%rbp
jmp    204e <balance+0xf3e>
mov    0x90(%rsp),%r12
mov    0x38(%rsp),%rdi
jmp    2230 <balance+0x1120>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x90(%rsp),%r12
mov    0x38(%rsp),%rdi
mov    0x70(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm7,%xmm0
mulsd  %xmm6,%xmm1
ucomisd %xmm2,%xmm1
jae    2040 <balance+0xf30>
movsd  0x8(%rsp),%xmm2
addsd  %xmm3,%xmm2
addsd  %xmm3,%xmm1
divsd  %xmm0,%xmm1
mulsd  0xfc8(%rip),%xmm2
ucomisd %xmm1,%xmm2
jbe    2230 <balance+0x1120>
mov    %ebx,%eax
mov    0x78(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rax,8)
mov    0x30(%rsp),%rax
cmp    0xb0(%rsp),%eax
jge    21a8 <balance+0x1098>
movsd  0xf76(%rip),%xmm9
divsd  %xmm0,%xmm9
mov    %rdi,%rax
cmpq   $0x4,0x48(%rsp)
jb     2180 <balance+0x1070>
movapd %xmm9,%xmm10
unpcklpd %xmm9,%xmm10
cmpq   $0x4,0x68(%rsp)
jae    20cc <balance+0xfbc>
xor    %eax,%eax
jmp    213c <balance+0x102c>
mov    0x138(%rsp),%rax
mov    0x20(%rsp),%rcx
lea    (%rax,%rcx,8),%rcx
mov    0x130(%rsp),%rdx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movupd -0x30(%rcx,%rax,8),%xmm3
movupd -0x20(%rcx,%rax,8),%xmm4
movupd -0x10(%rcx,%rax,8),%xmm1
movupd (%rcx,%rax,8),%xmm2
mulpd  %xmm10,%xmm3
mulpd  %xmm10,%xmm4
movupd %xmm3,-0x30(%rcx,%rax,8)
movupd %xmm4,-0x20(%rcx,%rax,8)
mulpd  %xmm10,%xmm1
mulpd  %xmm10,%xmm2
movupd %xmm1,-0x10(%rcx,%rax,8)
movupd %xmm2,(%rcx,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rdx
jne    20f0 <balance+0xfe0>
testb  $0x1,0x40(%rsp)
je     216f <balance+0x105f>
add    %rdi,%rax
add    0x28(%rsp),%rax
mov    (%rsp),%rcx
movupd (%rcx,%rax,8),%xmm3
movupd 0x10(%rcx,%rax,8),%xmm4
mulpd  %xmm10,%xmm3
mulpd  %xmm10,%xmm4
movupd %xmm3,(%rcx,%rax,8)
movupd %xmm4,0x10(%rcx,%rax,8)
mov    0x58(%rsp),%rax
mov    0x60(%rsp),%rcx
cmp    %rcx,0x48(%rsp)
je     21a8 <balance+0x1098>
mov    (%rsp),%rcx
mov    0x28(%rsp),%rdx
lea    (%rcx,%rdx,8),%rcx
nopl   (%rax)
movsd  (%rcx,%rax,8),%xmm2
mulsd  %xmm9,%xmm2
movsd  %xmm2,(%rcx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    2190 <balance+0x1080>
movl   $0x0,0x18(%rsp)
cmpb   $0x0,0xa8(%rsp)
je     2230 <balance+0x1120>
cmpl   $0x1,0x10(%rsp)
jne    21c5 <balance+0x10b5>
xor    %eax,%eax
jmp    2208 <balance+0x10f8>
lea    (%r12,%rbx,1),%rcx
mov    (%rsp),%rdx
xor    %eax,%eax
mov    0x108(%rsp),%rsi
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rbx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx,%rbx,8)
movsd  (%rdx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
add    $0x2,%rax
add    %rsi,%rdx
cmp    %rax,%rbp
jne    21e0 <balance+0x10d0>
testb  $0x1,0x10(%rsp)
je     2230 <balance+0x1120>
imul   %r12,%rax
add    %rbx,%rax
mov    (%rsp),%rcx
mulsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
cmp    %ebx,0x10(%rsp)
jne    1ea0 <balance+0xd90>
cmpl   $0x0,0x18(%rsp)
setne  %al
or     0x50(%rsp),%al
mov    %rdi,%rbx
movl   $0x1,0x18(%rsp)
cmp    $0x1,%al
jne    1ea0 <balance+0xd90>
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @balance(double* nocapture %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, double* nocapture %4) {
%6 = bitcast double* %0 to i8*
%7 = icmp sgt i32 %1, 0
%8 = add i32 %1, -1
%9 = sext i32 %8 to i64
%10 = sext i32 %1 to i64
%11 = call i32 @llvm.smin.i32(i32 %1, i32 0)
%12 = add i32 %11, -1
%13 = zext i32 %1 to i64
%14 = getelementptr double, double* %0, i64 %13
%15 = add nsw i64 %10, -1
%16 = mul i64 %15, %10
%17 = add i64 %16, %13
%18 = and i64 %13, 4294967292
%19 = add nsw i64 %18, -4
%20 = lshr exact i64 %19, 2
%21 = add nuw nsw i64 %20, 1
%22 = icmp ult i32 %1, 4
%23 = and i64 %13, 4294967292
%24 = and i64 %21, 1
%25 = icmp eq i64 %19, 0
%26 = and i64 %21, 9223372036854775806
%27 = icmp eq i64 %24, 0
%28 = icmp eq i64 %23, %13
%29 = and i64 %13, 1
%30 = icmp eq i64 %29, 0
%31 = sub nsw i64 0, %13
br label %32
32: ; preds = %220, %5
%33 = phi i64 [ %224, %220 ], [ 0, %5 ]
%34 = phi i64 [ %44, %220 ], [ %10, %5 ]
%35 = phi i64 [ %223, %220 ], [ %9, %5 ]
%36 = trunc i64 %33 to i32
%37 = sub i32 %1, %36
%38 = zext i32 %37 to i64
%39 = mul i64 %33, %10
%40 = sub i64 %16, %39
%41 = getelementptr double, double* %0, i64 %40
%42 = sub i64 %17, %39
%43 = getelementptr double, double* %0, i64 %42
%44 = add nsw i64 %34, -1
%45 = icmp sgt i64 %34, 0
%46 = trunc i64 %44 to i32
br i1 %45, label %47, label %444
47: ; preds = %32
%48 = and i64 %34, 4294967295
br label %49
49: ; preds = %217, %47
%50 = phi i64 [ %35, %47 ], [ %218, %217 ]
%51 = mul nsw i64 %50, %10
%52 = and i64 %50, 4294967295
br label %53
53: ; preds = %49, %62
%54 = phi i64 [ 0, %49 ], [ %63, %62 ]
%55 = icmp eq i64 %54, %52
br i1 %55, label %62, label %56
56: ; preds = %53
%57 = add nsw i64 %54, %51
%58 = getelementptr inbounds double, double* %0, i64 %57
%59 = load double, double* %58
%60 = tail call i64 @fabs(double %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %217
62: ; preds = %53, %56
%63 = add nuw nsw i64 %54, 1
%64 = icmp eq i64 %63, %48
br i1 %64, label %65, label %53
65: ; preds = %62
%66 = trunc i64 %50 to i32
%67 = sitofp i32 %66 to double
%68 = getelementptr inbounds double, double* %4, i64 %44
store double %67, double* %68
%69 = icmp eq i32 %66, %46
br i1 %69, label %220, label %70
70: ; preds = %65
%71 = shl i64 %50, 32
%72 = ashr exact i64 %71, 32
%73 = and i64 %38, 1
%74 = icmp eq i32 %37, 1
br i1 %74, label %77, label %75
75: ; preds = %70
%76 = and i64 %38, 4294967294
br label %179
77: ; preds = %179, %70
%78 = phi i64 [ 0, %70 ], [ %197, %179 ]
%79 = icmp eq i64 %73, 0
br i1 %79, label %88, label %80
80: ; preds = %77
%81 = mul nsw i64 %78, %10
%82 = add nsw i64 %81, %72
%83 = getelementptr inbounds double, double* %0, i64 %82
%84 = load double, double* %83
%85 = add nsw i64 %81, %44
%86 = getelementptr inbounds double, double* %0, i64 %85
%87 = load double, double* %86
store double %87, double* %83
store double %84, double* %86
br label %88
88: ; preds = %77, %80
br i1 %7, label %89, label %220
89: ; preds = %88
%90 = mul nsw i32 %66, %1
%91 = mul nsw i64 %44, %10
%92 = sext i32 %90 to i64
br i1 %22, label %165, label %93
93: ; preds = %89
%94 = getelementptr double, double* %0, i64 %92
%95 = getelementptr double, double* %14, i64 %92
%96 = icmp ult double* %94, %43
%97 = icmp ult double* %41, %95
%98 = and i1 %96, %97
br i1 %98, label %165, label %99
99: ; preds = %93
br i1 %25, label %143, label %100
100: ; preds = %99, %100
%101 = phi i64 [ %140, %100 ], [ 0, %99 ]
%102 = phi i64 [ %141, %100 ], [ 0, %99 ]
%103 = add nsw i64 %101, %92
%104 = getelementptr inbounds double, double* %0, i64 %103
%105 = bitcast double* %104 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = getelementptr inbounds double, double* %104, i64 2
%108 = bitcast double* %107 to <2 x double>*
%109 = load <2 x double>, <2 x double>* %108
%110 = add nsw i64 %101, %91
%111 = getelementptr inbounds double, double* %0, i64 %110
%112 = bitcast double* %111 to <2 x double>*
%113 = load <2 x double>, <2 x double>* %112
%114 = getelementptr inbounds double, double* %111, i64 2
%115 = bitcast double* %114 to <2 x double>*
%116 = load <2 x double>, <2 x double>* %115
%117 = bitcast double* %104 to <2 x double>*
store <2 x double> %113, <2 x double>* %117
%118 = bitcast double* %107 to <2 x double>*
store <2 x double> %116, <2 x double>* %118
%119 = bitcast double* %111 to <2 x double>*
store <2 x double> %106, <2 x double>* %119
%120 = bitcast double* %114 to <2 x double>*
store <2 x double> %109, <2 x double>* %120
%121 = or i64 %101, 4
%122 = add nsw i64 %121, %92
%123 = getelementptr inbounds double, double* %0, i64 %122
%124 = bitcast double* %123 to <2 x double>*
%125 = load <2 x double>, <2 x double>* %124
%126 = getelementptr inbounds double, double* %123, i64 2
%127 = bitcast double* %126 to <2 x double>*
%128 = load <2 x double>, <2 x double>* %127
%129 = add nsw i64 %121, %91
%130 = getelementptr inbounds double, double* %0, i64 %129
%131 = bitcast double* %130 to <2 x double>*
%132 = load <2 x double>, <2 x double>* %131
%133 = getelementptr inbounds double, double* %130, i64 2
%134 = bitcast double* %133 to <2 x double>*
%135 = load <2 x double>, <2 x double>* %134
%136 = bitcast double* %123 to <2 x double>*
store <2 x double> %132, <2 x double>* %136
%137 = bitcast double* %126 to <2 x double>*
store <2 x double> %135, <2 x double>* %137
%138 = bitcast double* %130 to <2 x double>*
store <2 x double> %125, <2 x double>* %138
%139 = bitcast double* %133 to <2 x double>*
store <2 x double> %128, <2 x double>* %139
%140 = add nuw i64 %101, 8
%141 = add i64 %102, 2
%142 = icmp eq i64 %141, %26
br i1 %142, label %143, label %100
143: ; preds = %100, %99
%144 = phi i64 [ 0, %99 ], [ %140, %100 ]
br i1 %27, label %164, label %145
145: ; preds = %143
%146 = add nsw i64 %144, %92
%147 = getelementptr inbounds double, double* %0, i64 %146
%148 = bitcast double* %147 to <2 x double>*
%149 = load <2 x double>, <2 x double>* %148
%150 = getelementptr inbounds double, double* %147, i64 2
%151 = bitcast double* %150 to <2 x double>*
%152 = load <2 x double>, <2 x double>* %151
%153 = add nsw i64 %144, %91
%154 = getelementptr inbounds double, double* %0, i64 %153
%155 = bitcast double* %154 to <2 x double>*
%156 = load <2 x double>, <2 x double>* %155
%157 = getelementptr inbounds double, double* %154, i64 2
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = bitcast double* %147 to <2 x double>*
store <2 x double> %156, <2 x double>* %160
%161 = bitcast double* %150 to <2 x double>*
store <2 x double> %159, <2 x double>* %161
%162 = bitcast double* %154 to <2 x double>*
store <2 x double> %149, <2 x double>* %162
%163 = bitcast double* %157 to <2 x double>*
store <2 x double> %152, <2 x double>* %163
br label %164
164: ; preds = %143, %145
br i1 %28, label %220, label %165
165: ; preds = %93, %89, %164
%166 = phi i64 [ 0, %93 ], [ 0, %89 ], [ %23, %164 ]
%167 = xor i64 %166, -1
br i1 %30, label %176, label %168
168: ; preds = %165
%169 = add nsw i64 %166, %92
%170 = getelementptr inbounds double, double* %0, i64 %169
%171 = load double, double* %170
%172 = add nsw i64 %166, %91
%173 = getelementptr inbounds double, double* %0, i64 %172
%174 = load double, double* %173
store double %174, double* %170
store double %171, double* %173
%175 = or i64 %166, 1
br label %176
176: ; preds = %168, %165
%177 = phi i64 [ %166, %165 ], [ %175, %168 ]
%178 = icmp eq i64 %167, %31
br i1 %178, label %220, label %200
179: ; preds = %179, %75
%180 = phi i64 [ 0, %75 ], [ %197, %179 ]
%181 = phi i64 [ 0, %75 ], [ %198, %179 ]
%182 = mul nsw i64 %180, %10
%183 = add nsw i64 %182, %72
%184 = getelementptr inbounds double, double* %0, i64 %183
%185 = load double, double* %184
%186 = add nsw i64 %182, %44
%187 = getelementptr inbounds double, double* %0, i64 %186
%188 = load double, double* %187
store double %188, double* %184
store double %185, double* %187
%189 = or i64 %180, 1
%190 = mul nsw i64 %189, %10
%191 = add nsw i64 %190, %72
%192 = getelementptr inbounds double, double* %0, i64 %191
%193 = load double, double* %192
%194 = add nsw i64 %190, %44
%195 = getelementptr inbounds double, double* %0, i64 %194
%196 = load double, double* %195
store double %196, double* %192
store double %193, double* %195
%197 = add nuw nsw i64 %180, 2
%198 = add i64 %181, 2
%199 = icmp eq i64 %198, %76
br i1 %199, label %77, label %179
200: ; preds = %176, %200
%201 = phi i64 [ %215, %200 ], [ %177, %176 ]
%202 = add nsw i64 %201, %92
%203 = getelementptr inbounds double, double* %0, i64 %202
%204 = load double, double* %203
%205 = add nsw i64 %201, %91
%206 = getelementptr inbounds double, double* %0, i64 %205
%207 = load double, double* %206
store double %207, double* %203
store double %204, double* %206
%208 = add nuw nsw i64 %201, 1
%209 = add nsw i64 %208, %92
%210 = getelementptr inbounds double, double* %0, i64 %209
%211 = load double, double* %210
%212 = add nsw i64 %208, %91
%213 = getelementptr inbounds double, double* %0, i64 %212
%214 = load double, double* %213
store double %214, double* %210
store double %211, double* %213
%215 = add nuw nsw i64 %201, 2
%216 = icmp eq i64 %215, %13
br i1 %216, label %220, label %200
217: ; preds = %56
%218 = add nsw i64 %50, -1
%219 = icmp sgt i64 %50, 0
br i1 %219, label %49, label %225
220: ; preds = %176, %200, %164, %88, %65
%221 = phi i32 [ %66, %88 ], [ %46, %65 ], [ %66, %164 ], [ %66, %200 ], [ %66, %176 ]
%222 = icmp slt i32 %221, 0
%223 = add nsw i64 %35, -1
%224 = add i64 %33, 1
br i1 %222, label %225, label %32
225: ; preds = %220, %217
%226 = trunc i64 %44 to i32
%227 = trunc i64 %34 to i32
%228 = icmp sgt i32 %227, 0
br i1 %228, label %229, label %454
229: ; preds = %225
%230 = and i64 %34, 4294967295
%231 = and i64 %34, 4294967295
%232 = zext i32 %1 to i64
%233 = shl nsw i64 %10, 3
%234 = add nsw i64 %233, 8
%235 = and i64 %34, 1
%236 = icmp eq i64 %231, 1
%237 = sub nsw i64 %231, %235
%238 = icmp eq i64 %235, 0
%239 = sub nsw i64 0, %13
br label %240
240: ; preds = %441, %229
%241 = phi i64 [ 0, %229 ], [ %442, %441 ]
%242 = sub nsw i64 %13, %241
%243 = add i64 %242, -4
%244 = lshr i64 %243, 2
%245 = add nuw nsw i64 %244, 1
%246 = sub nsw i64 %13, %241
%247 = sub nsw i64 %13, %241
%248 = getelementptr double, double* %0, i64 %247
%249 = mul i64 %234, %241
%250 = getelementptr i8, i8* %6, i64 %249
%251 = mul i64 %241, %10
%252 = add i64 %251, %13
%253 = getelementptr double, double* %0, i64 %252
br label %254
254: ; preds = %436, %240
%255 = phi i64 [ %241, %240 ], [ %437, %436 ]
%256 = phi i1 [ true, %240 ], [ %438, %436 ]
br label %257
257: ; preds = %254, %267
%258 = phi i64 [ %241, %254 ], [ %268, %267 ]
%259 = icmp eq i64 %258, %255
br i1 %259, label %267, label %260
260: ; preds = %257
%261 = mul nsw i64 %258, %10
%262 = add nsw i64 %261, %255
%263 = getelementptr inbounds double, double* %0, i64 %262
%264 = load double, double* %263
%265 = tail call i64 @fabs(double %264)
%266 = icmp eq i64 %265, 0
br i1 %266, label %267, label %436
267: ; preds = %257, %260
%268 = add nuw nsw i64 %258, 1
%269 = icmp eq i64 %268, %231
br i1 %269, label %270, label %257
270: ; preds = %267
%271 = trunc i64 %255 to i32
%272 = sitofp i32 %271 to double
%273 = getelementptr inbounds double, double* %4, i64 %241
store double %272, double* %273
%274 = and i64 %255, 4294967295
%275 = icmp eq i64 %241, %274
br i1 %275, label %440, label %276
276: ; preds = %270
%277 = shl i64 %255, 32
%278 = ashr exact i64 %277, 32
br i1 %236, label %279, label %398
279: ; preds = %398, %276
%280 = phi i64 [ 0, %276 ], [ %416, %398 ]
br i1 %238, label %289, label %281
281: ; preds = %279
%282 = mul nsw i64 %280, %10
%283 = add nsw i64 %282, %278
%284 = getelementptr inbounds double, double* %0, i64 %283
%285 = load double, double* %284
%286 = add nsw i64 %282, %241
%287 = getelementptr inbounds double, double* %0, i64 %286
%288 = load double, double* %287
store double %288, double* %284
store double %285, double* %287
br label %289
289: ; preds = %279, %281
%290 = icmp slt i64 %241, %10
br i1 %290, label %291, label %440
291: ; preds = %289
%292 = mul nsw i32 %271, %1
%293 = mul nsw i64 %241, %10
%294 = sext i32 %292 to i64
%295 = icmp ult i64 %246, 4
br i1 %295, label %381, label %296
296: ; preds = %291
%297 = add i64 %241, %294
%298 = getelementptr double, double* %0, i64 %297
%299 = getelementptr double, double* %248, i64 %297
%300 = bitcast double* %299 to i8*
%301 = icmp ult double* %298, %253
%302 = icmp ult i8* %250, %300
%303 = and i1 %301, %302
br i1 %303, label %381, label %304
304: ; preds = %296
%305 = and i64 %246, -4
%306 = add i64 %241, %305
%307 = and i64 %245, 1
%308 = icmp ult i64 %243, 4
br i1 %308, label %356, label %309
309: ; preds = %304
%310 = and i64 %245, 9223372036854775806
br label %311
311: ; preds = %311, %309
%312 = phi i64 [ 0, %309 ], [ %353, %311 ]
%313 = phi i64 [ 0, %309 ], [ %354, %311 ]
%314 = add i64 %241, %312
%315 = add nsw i64 %314, %294
%316 = getelementptr inbounds double, double* %0, i64 %315
%317 = bitcast double* %316 to <2 x double>*
%318 = load <2 x double>, <2 x double>* %317
%319 = getelementptr inbounds double, double* %316, i64 2
%320 = bitcast double* %319 to <2 x double>*
%321 = load <2 x double>, <2 x double>* %320
%322 = add nsw i64 %314, %293
%323 = getelementptr inbounds double, double* %0, i64 %322
%324 = bitcast double* %323 to <2 x double>*
%325 = load <2 x double>, <2 x double>* %324
%326 = getelementptr inbounds double, double* %323, i64 2
%327 = bitcast double* %326 to <2 x double>*
%328 = load <2 x double>, <2 x double>* %327
%329 = bitcast double* %316 to <2 x double>*
store <2 x double> %325, <2 x double>* %329
%330 = bitcast double* %319 to <2 x double>*
store <2 x double> %328, <2 x double>* %330
%331 = bitcast double* %323 to <2 x double>*
store <2 x double> %318, <2 x double>* %331
%332 = bitcast double* %326 to <2 x double>*
store <2 x double> %321, <2 x double>* %332
%333 = or i64 %312, 4
%334 = add i64 %241, %333
%335 = add nsw i64 %334, %294
%336 = getelementptr inbounds double, double* %0, i64 %335
%337 = bitcast double* %336 to <2 x double>*
%338 = load <2 x double>, <2 x double>* %337
%339 = getelementptr inbounds double, double* %336, i64 2
%340 = bitcast double* %339 to <2 x double>*
%341 = load <2 x double>, <2 x double>* %340
%342 = add nsw i64 %334, %293
%343 = getelementptr inbounds double, double* %0, i64 %342
%344 = bitcast double* %343 to <2 x double>*
%345 = load <2 x double>, <2 x double>* %344
%346 = getelementptr inbounds double, double* %343, i64 2
%347 = bitcast double* %346 to <2 x double>*
%348 = load <2 x double>, <2 x double>* %347
%349 = bitcast double* %336 to <2 x double>*
store <2 x double> %345, <2 x double>* %349
%350 = bitcast double* %339 to <2 x double>*
store <2 x double> %348, <2 x double>* %350
%351 = bitcast double* %343 to <2 x double>*
store <2 x double> %338, <2 x double>* %351
%352 = bitcast double* %346 to <2 x double>*
store <2 x double> %341, <2 x double>* %352
%353 = add nuw i64 %312, 8
%354 = add i64 %313, 2
%355 = icmp eq i64 %354, %310
br i1 %355, label %356, label %311
356: ; preds = %311, %304
%357 = phi i64 [ 0, %304 ], [ %353, %311 ]
%358 = icmp eq i64 %307, 0
br i1 %358, label %379, label %359
359: ; preds = %356
%360 = add i64 %241, %357
%361 = add nsw i64 %360, %294
%362 = getelementptr inbounds double, double* %0, i64 %361
%363 = bitcast double* %362 to <2 x double>*
%364 = load <2 x double>, <2 x double>* %363
%365 = getelementptr inbounds double, double* %362, i64 2
%366 = bitcast double* %365 to <2 x double>*
%367 = load <2 x double>, <2 x double>* %366
%368 = add nsw i64 %360, %293
%369 = getelementptr inbounds double, double* %0, i64 %368
%370 = bitcast double* %369 to <2 x double>*
%371 = load <2 x double>, <2 x double>* %370
%372 = getelementptr inbounds double, double* %369, i64 2
%373 = bitcast double* %372 to <2 x double>*
%374 = load <2 x double>, <2 x double>* %373
%375 = bitcast double* %362 to <2 x double>*
store <2 x double> %371, <2 x double>* %375
%376 = bitcast double* %365 to <2 x double>*
store <2 x double> %374, <2 x double>* %376
%377 = bitcast double* %369 to <2 x double>*
store <2 x double> %364, <2 x double>* %377
%378 = bitcast double* %372 to <2 x double>*
store <2 x double> %367, <2 x double>* %378
br label %379
379: ; preds = %356, %359
%380 = icmp eq i64 %246, %305
br i1 %380, label %440, label %381
381: ; preds = %296, %291, %379
%382 = phi i64 [ %241, %296 ], [ %241, %291 ], [ %306, %379 ]
%383 = sub i64 %13, %382
%384 = xor i64 %382, -1
%385 = and i64 %383, 1
%386 = icmp eq i64 %385, 0
br i1 %386, label %395, label %387
387: ; preds = %381
%388 = add nsw i64 %382, %294
%389 = getelementptr inbounds double, double* %0, i64 %388
%390 = load double, double* %389
%391 = add nsw i64 %382, %293
%392 = getelementptr inbounds double, double* %0, i64 %391
%393 = load double, double* %392
store double %393, double* %389
store double %390, double* %392
%394 = add nuw nsw i64 %382, 1
br label %395
395: ; preds = %387, %381
%396 = phi i64 [ %382, %381 ], [ %394, %387 ]
%397 = icmp eq i64 %384, %239
br i1 %397, label %440, label %419
398: ; preds = %276, %398
%399 = phi i64 [ %416, %398 ], [ 0, %276 ]
%400 = phi i64 [ %417, %398 ], [ 0, %276 ]
%401 = mul nsw i64 %399, %10
%402 = add nsw i64 %401, %278
%403 = getelementptr inbounds double, double* %0, i64 %402
%404 = load double, double* %403
%405 = add nsw i64 %401, %241
%406 = getelementptr inbounds double, double* %0, i64 %405
%407 = load double, double* %406
store double %407, double* %403
store double %404, double* %406
%408 = or i64 %399, 1
%409 = mul nsw i64 %408, %10
%410 = add nsw i64 %409, %278
%411 = getelementptr inbounds double, double* %0, i64 %410
%412 = load double, double* %411
%413 = add nsw i64 %409, %241
%414 = getelementptr inbounds double, double* %0, i64 %413
%415 = load double, double* %414
store double %415, double* %411
store double %412, double* %414
%416 = add nuw nsw i64 %399, 2
%417 = add i64 %400, 2
%418 = icmp eq i64 %417, %237
br i1 %418, label %279, label %398
419: ; preds = %395, %419
%420 = phi i64 [ %434, %419 ], [ %396, %395 ]
%421 = add nsw i64 %420, %294
%422 = getelementptr inbounds double, double* %0, i64 %421
%423 = load double, double* %422
%424 = add nsw i64 %420, %293
%425 = getelementptr inbounds double, double* %0, i64 %424
%426 = load double, double* %425
store double %426, double* %422
store double %423, double* %425
%427 = add nuw nsw i64 %420, 1
%428 = add nsw i64 %427, %294
%429 = getelementptr inbounds double, double* %0, i64 %428
%430 = load double, double* %429
%431 = add nsw i64 %427, %293
%432 = getelementptr inbounds double, double* %0, i64 %431
%433 = load double, double* %432
store double %433, double* %429
store double %430, double* %432
%434 = add nuw nsw i64 %420, 2
%435 = icmp eq i64 %434, %232
br i1 %435, label %440, label %419
436: ; preds = %260
%437 = add nuw nsw i64 %255, 1
%438 = icmp ult i64 %437, %230
%439 = icmp eq i64 %437, %231
br i1 %439, label %450, label %254
440: ; preds = %395, %419, %379, %289, %270
br i1 %256, label %441, label %452
441: ; preds = %440
%442 = add nuw nsw i64 %241, 1
%443 = icmp eq i64 %442, %231
br i1 %443, label %444, label %240
444: ; preds = %32, %441
%445 = phi i1 [ %228, %441 ], [ false, %32 ]
%446 = phi i32 [ %226, %441 ], [ %12, %32 ]
%447 = phi i32 [ %227, %441 ], [ %11, %32 ]
%448 = phi i32 [ %227, %441 ], [ 0, %32 ]
store i32 %446, i32* %3
store i32 %448, i32* %2
%449 = icmp slt i32 %448, %447
br label %522
450: ; preds = %436
%451 = trunc i64 %241 to i32
br label %454
452: ; preds = %440
%453 = trunc i64 %241 to i32
br label %454
454: ; preds = %452, %450, %225
%455 = phi i1 [ false, %225 ], [ %228, %450 ], [ %228, %452 ]
%456 = phi i32 [ 0, %225 ], [ %451, %450 ], [ %453, %452 ]
store i32 %226, i32* %3
store i32 %456, i32* %2
%457 = icmp slt i32 %456, %227
br i1 %457, label %458, label %522
458: ; preds = %454
%459 = zext i32 %456 to i64
%460 = xor i32 %456, -1
%461 = add i32 %460, %227
%462 = zext i32 %461 to i64
%463 = add nuw nsw i64 %462, 1
%464 = icmp ult i32 %461, 3
br i1 %464, label %520, label %465
465: ; preds = %458
%466 = and i64 %463, 8589934588
%467 = add nuw nsw i64 %466, %459
%468 = add nsw i64 %466, -4
%469 = lshr exact i64 %468, 2
%470 = add nuw nsw i64 %469, 1
%471 = and i64 %470, 3
%472 = icmp ult i64 %468, 12
br i1 %472, label %504, label %473
473: ; preds = %465
%474 = and i64 %470, 9223372036854775804
br label %475
475: ; preds = %475, %473
%476 = phi i64 [ 0, %473 ], [ %501, %475 ]
%477 = phi i64 [ 0, %473 ], [ %502, %475 ]
%478 = add i64 %476, %459
%479 = getelementptr inbounds double, double* %4, i64 %478
%480 = bitcast double* %479 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %480
%481 = getelementptr inbounds double, double* %479, i64 2
%482 = bitcast double* %481 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %482
%483 = or i64 %476, 4
%484 = add i64 %483, %459
%485 = getelementptr inbounds double, double* %4, i64 %484
%486 = bitcast double* %485 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %486
%487 = getelementptr inbounds double, double* %485, i64 2
%488 = bitcast double* %487 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %488
%489 = or i64 %476, 8
%490 = add i64 %489, %459
%491 = getelementptr inbounds double, double* %4, i64 %490
%492 = bitcast double* %491 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %492
%493 = getelementptr inbounds double, double* %491, i64 2
%494 = bitcast double* %493 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %494
%495 = or i64 %476, 12
%496 = add i64 %495, %459
%497 = getelementptr inbounds double, double* %4, i64 %496
%498 = bitcast double* %497 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %498
%499 = getelementptr inbounds double, double* %497, i64 2
%500 = bitcast double* %499 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %500
%501 = add nuw i64 %476, 16
%502 = add nuw i64 %477, 4
%503 = icmp eq i64 %502, %474
br i1 %503, label %504, label %475
504: ; preds = %475, %465
%505 = phi i64 [ 0, %465 ], [ %501, %475 ]
%506 = icmp eq i64 %471, 0
br i1 %506, label %518, label %507
507: ; preds = %504, %507
%508 = phi i64 [ %515, %507 ], [ %505, %504 ]
%509 = phi i64 [ %516, %507 ], [ 0, %504 ]
%510 = add i64 %508, %459
%511 = getelementptr inbounds double, double* %4, i64 %510
%512 = bitcast double* %511 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %512
%513 = getelementptr inbounds double, double* %511, i64 2
%514 = bitcast double* %513 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %514
%515 = add nuw i64 %508, 4
%516 = add i64 %509, 1
%517 = icmp eq i64 %516, %471
br i1 %517, label %518, label %507
518: ; preds = %507, %504
%519 = icmp eq i64 %463, %466
br i1 %519, label %522, label %520
520: ; preds = %458, %518
%521 = phi i64 [ %459, %458 ], [ %467, %518 ]
br label %548
522: ; preds = %548, %518, %444, %454
%523 = phi i1 [ false, %454 ], [ %449, %444 ], [ %457, %518 ], [ %457, %548 ]
%524 = phi i32 [ %456, %454 ], [ %448, %444 ], [ %456, %518 ], [ %456, %548 ]
%525 = phi i1 [ %455, %454 ], [ %445, %444 ], [ %455, %518 ], [ %455, %548 ]
%526 = phi i32 [ %227, %454 ], [ %447, %444 ], [ %227, %518 ], [ %227, %548 ]
%527 = icmp slt i32 %524, %1
%528 = sext i32 %524 to i64
%529 = zext i32 %526 to i64
br i1 %523, label %530, label %723
530: ; preds = %522
%531 = sub nsw i64 %10, %528
%532 = add nsw i64 %531, -4
%533 = lshr i64 %532, 2
%534 = add nuw nsw i64 %533, 1
%535 = icmp ult i64 %531, 4
%536 = and i64 %531, -4
%537 = add nsw i64 %536, %528
%538 = and i64 %534, 1
%539 = icmp ult i64 %532, 4
%540 = and i64 %534, 9223372036854775806
%541 = icmp eq i64 %538, 0
%542 = icmp eq i64 %531, %536
%543 = and i64 %529, 1
%544 = icmp eq i32 %526, 1
%545 = and i64 %529, 4294967294
%546 = icmp eq i64 %543, 0
%547 = xor i1 %523, true
br label %554
548: ; preds = %520, %548
%549 = phi i64 [ %551, %548 ], [ %521, %520 ]
%550 = getelementptr inbounds double, double* %4, i64 %549
store double 1.000000e+00, double* %550
%551 = add nuw nsw i64 %549, 1
%552 = trunc i64 %551 to i32
%553 = icmp sgt i32 %227, %552
br i1 %553, label %548, label %522
554: ; preds = %717, %530
%555 = phi i64 [ %528, %530 ], [ %718, %717 ]
%556 = phi i32 [ 1, %530 ], [ %719, %717 ]
%557 = mul nsw i64 %555, %10
br label %558
558: ; preds = %554, %577
%559 = phi i64 [ %528, %554 ], [ %580, %577 ]
%560 = phi double [ 0.000000e+00, %554 ], [ %579, %577 ]
%561 = phi double [ 0.000000e+00, %554 ], [ %578, %577 ]
%562 = icmp eq i64 %559, %555
br i1 %562, label %577, label %563
563: ; preds = %558
%564 = mul nsw i64 %559, %10
%565 = add nsw i64 %564, %555
%566 = getelementptr inbounds double, double* %0, i64 %565
%567 = load double, double* %566
%568 = tail call i64 @fabs(double %567)
%569 = sitofp i64 %568 to double
%570 = fadd double %560, %569
%571 = add nsw i64 %559, %557
%572 = getelementptr inbounds double, double* %0, i64 %571
%573 = load double, double* %572
%574 = tail call i64 @fabs(double %573)
%575 = sitofp i64 %574 to double
%576 = fadd double %561, %575
br label %577
577: ; preds = %558, %563
%578 = phi double [ %576, %563 ], [ %561, %558 ]
%579 = phi double [ %570, %563 ], [ %560, %558 ]
%580 = add nsw i64 %559, 1
%581 = trunc i64 %580 to i32
%582 = icmp eq i32 %526, %581
br i1 %582, label %583, label %558
583: ; preds = %577
%584 = fcmp une double %579, 0.000000e+00
%585 = fcmp une double %578, 0.000000e+00
%586 = select i1 %584, i1 %585, i1 false
br i1 %586, label %587, label %712
587: ; preds = %583
%588 = fmul double %578, 5.000000e-01
%589 = fadd double %578, %579
%590 = fcmp olt double %579, %588
br i1 %590, label %591, label %597
591: ; preds = %587, %591
%592 = phi double [ %595, %591 ], [ %579, %587 ]
%593 = phi double [ %594, %591 ], [ 1.000000e+00, %587 ]
%594 = fmul double %593, 2.000000e+00
%595 = fmul double %592, 4.000000e+00
%596 = fcmp olt double %595, %588
br i1 %596, label %591, label %597
597: ; preds = %591, %587
%598 = phi double [ 1.000000e+00, %587 ], [ %594, %591 ]
%599 = phi double [ %579, %587 ], [ %595, %591 ]
%600 = fmul double %578, 2.000000e+00
%601 = fcmp ult double %599, %600
br i1 %601, label %608, label %602
602: ; preds = %597, %602
%603 = phi double [ %606, %602 ], [ %599, %597 ]
%604 = phi double [ %605, %602 ], [ %598, %597 ]
%605 = fmul double %604, 5.000000e-01
%606 = fmul double %603, 2.500000e-01
%607 = fcmp ult double %606, %600
br i1 %607, label %608, label %602
608: ; preds = %602, %597
%609 = phi double [ %598, %597 ], [ %605, %602 ]
%610 = phi double [ %599, %597 ], [ %606, %602 ]
%611 = fadd double %578, %610
%612 = fdiv double %611, %609
%613 = fmul double %589, 0x3FEE666666666666
%614 = fcmp olt double %612, %613
br i1 %614, label %615, label %712
615: ; preds = %608
%616 = fdiv double 1.000000e+00, %609
%617 = and i64 %555, 4294967295
%618 = getelementptr inbounds double, double* %4, i64 %617
%619 = load double, double* %618
%620 = fmul double %609, %619
store double %620, double* %618
br i1 %527, label %621, label %677
621: ; preds = %615
%622 = mul nsw i64 %555, %10
br i1 %535, label %675, label %623
623: ; preds = %621
%624 = insertelement <2 x double> poison, double %616, i64 0
%625 = shufflevector <2 x double> %624, <2 x double> poison, <2 x i32> zeroinitializer
%626 = insertelement <2 x double> poison, double %616, i64 0
%627 = shufflevector <2 x double> %626, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %539, label %659, label %628
628: ; preds = %623, %628
%629 = phi i64 [ %656, %628 ], [ 0, %623 ]
%630 = phi i64 [ %657, %628 ], [ 0, %623 ]
%631 = add i64 %629, %528
%632 = add nsw i64 %631, %622
%633 = getelementptr inbounds double, double* %0, i64 %632
%634 = bitcast double* %633 to <2 x double>*
%635 = load <2 x double>, <2 x double>* %634
%636 = getelementptr inbounds double, double* %633, i64 2
%637 = bitcast double* %636 to <2 x double>*
%638 = load <2 x double>, <2 x double>* %637
%639 = fmul <2 x double> %625, %635
%640 = fmul <2 x double> %627, %638
%641 = bitcast double* %633 to <2 x double>*
store <2 x double> %639, <2 x double>* %641
%642 = bitcast double* %636 to <2 x double>*
store <2 x double> %640, <2 x double>* %642
%643 = or i64 %629, 4
%644 = add i64 %643, %528
%645 = add nsw i64 %644, %622
%646 = getelementptr inbounds double, double* %0, i64 %645
%647 = bitcast double* %646 to <2 x double>*
%648 = load <2 x double>, <2 x double>* %647
%649 = getelementptr inbounds double, double* %646, i64 2
%650 = bitcast double* %649 to <2 x double>*
%651 = load <2 x double>, <2 x double>* %650
%652 = fmul <2 x double> %625, %648
%653 = fmul <2 x double> %627, %651
%654 = bitcast double* %646 to <2 x double>*
store <2 x double> %652, <2 x double>* %654
%655 = bitcast double* %649 to <2 x double>*
store <2 x double> %653, <2 x double>* %655
%656 = add nuw i64 %629, 8
%657 = add i64 %630, 2
%658 = icmp eq i64 %657, %540
br i1 %658, label %659, label %628
659: ; preds = %628, %623
%660 = phi i64 [ 0, %623 ], [ %656, %628 ]
br i1 %541, label %674, label %661
661: ; preds = %659
%662 = add i64 %660, %528
%663 = add nsw i64 %662, %622
%664 = getelementptr inbounds double, double* %0, i64 %663
%665 = bitcast double* %664 to <2 x double>*
%666 = load <2 x double>, <2 x double>* %665
%667 = getelementptr inbounds double, double* %664, i64 2
%668 = bitcast double* %667 to <2 x double>*
%669 = load <2 x double>, <2 x double>* %668
%670 = fmul <2 x double> %625, %666
%671 = fmul <2 x double> %627, %669
%672 = bitcast double* %664 to <2 x double>*
store <2 x double> %670, <2 x double>* %672
%673 = bitcast double* %667 to <2 x double>*
store <2 x double> %671, <2 x double>* %673
br label %674
674: ; preds = %659, %661
br i1 %542, label %677, label %675
675: ; preds = %621, %674
%676 = phi i64 [ %528, %621 ], [ %537, %674 ]
br label %679
677: ; preds = %679, %674, %615
br i1 %525, label %678, label %712
678: ; preds = %677
br i1 %544, label %704, label %687
679: ; preds = %675, %679
%680 = phi i64 [ %685, %679 ], [ %676, %675 ]
%681 = add nsw i64 %680, %622
%682 = getelementptr inbounds double, double* %0, i64 %681
%683 = load double, double* %682
%684 = fmul double %616, %683
store double %684, double* %682
%685 = add nsw i64 %680, 1
%686 = icmp eq i64 %685, %10
br i1 %686, label %677, label %679
687: ; preds = %678, %687
%688 = phi i64 [ %701, %687 ], [ 0, %678 ]
%689 = phi i64 [ %702, %687 ], [ 0, %678 ]
%690 = mul nsw i64 %688, %10
%691 = add nsw i64 %690, %555
%692 = getelementptr inbounds double, double* %0, i64 %691
%693 = load double, double* %692
%694 = fmul double %609, %693
store double %694, double* %692
%695 = or i64 %688, 1
%696 = mul nsw i64 %695, %10
%697 = add nsw i64 %696, %555
%698 = getelementptr inbounds double, double* %0, i64 %697
%699 = load double, double* %698
%700 = fmul double %609, %699
store double %700, double* %698
%701 = add nuw nsw i64 %688, 2
%702 = add i64 %689, 2
%703 = icmp eq i64 %702, %545
br i1 %703, label %704, label %687
704: ; preds = %687, %678
%705 = phi i64 [ 0, %678 ], [ %701, %687 ]
br i1 %546, label %712, label %706
706: ; preds = %704
%707 = mul nsw i64 %705, %10
%708 = add nsw i64 %707, %555
%709 = getelementptr inbounds double, double* %0, i64 %708
%710 = load double, double* %709
%711 = fmul double %609, %710
store double %711, double* %709
br label %712
712: ; preds = %706, %704, %677, %583, %608
%713 = phi i32 [ %556, %608 ], [ %556, %583 ], [ 0, %677 ], [ 0, %704 ], [ 0, %706 ]
%714 = add nsw i64 %555, 1
%715 = trunc i64 %714 to i32
%716 = icmp eq i32 %526, %715
br i1 %716, label %720, label %717
717: ; preds = %712, %720
%718 = phi i64 [ %714, %712 ], [ %528, %720 ]
%719 = phi i32 [ %713, %712 ], [ 1, %720 ]
br label %554
720: ; preds = %712
%721 = icmp ne i32 %713, 0
%722 = select i1 %721, i1 true, i1 %547
br i1 %722, label %723, label %717
723: ; preds = %720, %522
ret void
}