void ss_swapmerge(const unsigned char *T, const int *PA, int *first,
                  int *middle, int *last, int *buf, int bufsize, int depth) {
  struct {
    int *a, *b, *c;
    int d;
  } stack[(32)];
  int *l, *r, *lm, *rm;
  int m, len, half;
  int ssize;
  int check, next;
  for (check = 0, ssize = 0;;) {
    if ((last - middle) <= bufsize) {
      if ((first < middle) && (middle < last)) {
        ss_mergebackward(T, PA, first, middle, last, buf, depth);
      }
      do {
        if (((check)&1) ||
            (((check)&2) &&
             (ss_compare(T,
                         PA + ((0 <= (*((first)-1))) ? (*((first)-1))
                                                     : (~(*((first)-1)))),
                         PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) &&
            ((ss_compare(T,
                         PA + ((0 <= (*((last)-1))) ? (*((last)-1))
                                                    : (~(*((last)-1)))),
                         PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b,
        (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
      continue;
    }
    if ((middle - first) <= bufsize) {
      if (first < middle) {
        ss_mergeforward(T, PA, first, middle, last, buf, depth);
      }
      do {
        if (((check)&1) ||
            (((check)&2) &&
             (ss_compare(T,
                         PA + ((0 <= (*((first)-1))) ? (*((first)-1))
                                                     : (~(*((first)-1)))),
                         PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) &&
            ((ss_compare(T,
                         PA + ((0 <= (*((last)-1))) ? (*((last)-1))
                                                    : (~(*((last)-1)))),
                         PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b,
        (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
      continue;
    }
    for (m = 0,
        len = (((middle - first) < (last - middle)) ? (middle - first)
                                                    : (last - middle)),
        half = len >> 1;
         0 < len; len = half, half >>= 1) {
      if (ss_compare(T,
                     PA + ((0 <= (*(middle + m + half)))
                               ? (*(middle + m + half))
                               : (~(*(middle + m + half)))),
                     PA + ((0 <= (*(middle - m - half - 1)))
                               ? (*(middle - m - half - 1))
                               : (~(*(middle - m - half - 1)))),
                     depth) < 0) {
        m += half + 1;
        half -= (len & 1) ^ 1;
      }
    }
    if (0 < m) {
      lm = middle - m, rm = middle + m;
      ss_blockswap(lm, middle, m);
      l = r = middle, next = 0;
      if (rm < last) {
        if (*rm < 0) {
          *rm = ~*rm;
          if (first < lm) {
            for (; *--l < 0;) {
            }
            next |= 4;
          }
          next |= 1;
        } else if (first < lm) {
          for (; *r < 0; ++r) {
          }
          next |= 2;
        }
      }
      if ((l - first) <= (last - r)) {
        do {
          stack[ssize].a = (r), stack[ssize].b = (rm), stack[ssize].c = (last),
          stack[ssize++].d = ((next & 3) | (check & 4));
        } while (0);
        middle = lm, last = l, check = (check & 3) | (next & 4);
      } else {
        if ((next & 2) && (r == middle)) {
          next ^= 6;
        }
        do {
          stack[ssize].a = (first), stack[ssize].b = (lm), stack[ssize].c = (l),
          stack[ssize++].d = ((check & 3) | (next & 4));
        } while (0);
        first = r, middle = rm, check = (next & 3) | (check & 4);
      }
    } else {
      if (ss_compare(T,
                     PA + ((0 <= (*(middle - 1))) ? (*(middle - 1))
                                                  : (~(*(middle - 1)))),
                     PA + *middle, depth) == 0) {
        *middle = ~*middle;
      }
      do {
        if (((check)&1) ||
            (((check)&2) &&
             (ss_compare(T,
                         PA + ((0 <= (*((first)-1))) ? (*((first)-1))
                                                     : (~(*((first)-1)))),
                         PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) &&
            ((ss_compare(T,
                         PA + ((0 <= (*((last)-1))) ? (*((last)-1))
                                                    : (~(*((last)-1)))),
                         PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b,
        (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
    }
  }
}


x86 assembly (clang, -O0):
<ss_swapmerge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x550,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x464(%rbp)
movl   $0x0,-0x460(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
movslq 0x10(%rbp),%rcx
cmp    %rcx,%rax
jg     13e5 <ss_swapmerge+0x2a5>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    11da <ss_swapmerge+0x9a>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    11da <ss_swapmerge+0x9a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1060 <ss_mergebackward@plt>
jmp    11df <ss_swapmerge+0x9f>
mov    -0x464(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    128c <ss_swapmerge+0x14c>
mov    -0x464(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     129b <ss_swapmerge+0x15b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x478(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x470(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     123a <ss_swapmerge+0xfa>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x47c(%rbp)
jmp    124a <ss_swapmerge+0x10a>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x47c(%rbp)
mov    -0x478(%rbp),%rdi
mov    -0x470(%rbp),%rsi
mov    -0x47c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    129b <ss_swapmerge+0x15b>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x464(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1345 <ss_swapmerge+0x205>
mov    -0x8(%rbp),%rax
mov    %rax,-0x490(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x488(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     12e4 <ss_swapmerge+0x1a4>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x494(%rbp)
jmp    12f4 <ss_swapmerge+0x1b4>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x494(%rbp)
mov    -0x490(%rbp),%rdi
mov    -0x488(%rbp),%rsi
mov    -0x494(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    1345 <ss_swapmerge+0x205>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    134a <ss_swapmerge+0x20a>
jmp    134f <ss_swapmerge+0x20f>
cmpl   $0x0,-0x460(%rbp)
jne    1361 <ss_swapmerge+0x221>
jmp    1ea2 <ss_swapmerge+0xd62>
mov    -0x460(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x460(%rbp)
movslq %eax,%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x18(%rax),%eax
mov    %eax,-0x464(%rbp)
jmp    117d <ss_swapmerge+0x3d>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
movslq 0x10(%rbp),%rcx
cmp    %rcx,%rax
jg     163f <ss_swapmerge+0x4ff>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1434 <ss_swapmerge+0x2f4>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <ss_mergeforward@plt>
jmp    1439 <ss_swapmerge+0x2f9>
mov    -0x464(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    14e6 <ss_swapmerge+0x3a6>
mov    -0x464(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     14f5 <ss_swapmerge+0x3b5>
mov    -0x8(%rbp),%rax
mov    %rax,-0x4a8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x4a0(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     1494 <ss_swapmerge+0x354>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x4ac(%rbp)
jmp    14a4 <ss_swapmerge+0x364>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4ac(%rbp)
mov    -0x4a8(%rbp),%rdi
mov    -0x4a0(%rbp),%rsi
mov    -0x4ac(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    14f5 <ss_swapmerge+0x3b5>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x464(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     159f <ss_swapmerge+0x45f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x4c0(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x4b8(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     153e <ss_swapmerge+0x3fe>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x4c4(%rbp)
jmp    154e <ss_swapmerge+0x40e>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4c4(%rbp)
mov    -0x4c0(%rbp),%rdi
mov    -0x4b8(%rbp),%rsi
mov    -0x4c4(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    159f <ss_swapmerge+0x45f>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    15a4 <ss_swapmerge+0x464>
jmp    15a9 <ss_swapmerge+0x469>
cmpl   $0x0,-0x460(%rbp)
jne    15bb <ss_swapmerge+0x47b>
jmp    1ea2 <ss_swapmerge+0xd62>
mov    -0x460(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x460(%rbp)
movslq %eax,%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x18(%rax),%eax
mov    %eax,-0x464(%rbp)
jmp    117d <ss_swapmerge+0x3d>
movl   $0x0,-0x454(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rdx
sub    %rdx,%rcx
sar    $0x2,%rcx
cmp    %rcx,%rax
jge    168b <ss_swapmerge+0x54b>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %rax,-0x4d0(%rbp)
jmp    16a1 <ss_swapmerge+0x561>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %rax,-0x4d0(%rbp)
mov    -0x4d0(%rbp),%rax
mov    %eax,-0x458(%rbp)
mov    -0x458(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x45c(%rbp)
xor    %eax,%eax
cmp    -0x458(%rbp),%eax
jge    1896 <ss_swapmerge+0x756>
mov    -0x8(%rbp),%rax
mov    %rax,-0x4e0(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x4d8(%rbp)
mov    -0x20(%rbp),%rcx
movslq -0x454(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
movslq -0x45c(%rbp),%rdx
xor    %eax,%eax
cmp    (%rcx,%rdx,4),%eax
jg     172c <ss_swapmerge+0x5ec>
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x45c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4e4(%rbp)
jmp    1751 <ss_swapmerge+0x611>
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x45c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4e4(%rbp)
mov    -0x4d8(%rbp),%rax
mov    -0x4e4(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x4f8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x4f0(%rbp)
mov    -0x20(%rbp),%rcx
movslq -0x454(%rbp),%rdx
xor    %eax,%eax
sub    %rdx,%rax
shl    $0x2,%rax
add    %rax,%rcx
movslq -0x45c(%rbp),%rax
xor    %edx,%edx
sub    %rax,%rdx
xor    %eax,%eax
cmp    -0x4(%rcx,%rdx,4),%eax
jg     17db <ss_swapmerge+0x69b>
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x45c(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
mov    -0x4(%rax,%rcx,4),%eax
mov    %eax,-0x4fc(%rbp)
jmp    180b <ss_swapmerge+0x6cb>
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x45c(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
mov    -0x4(%rax,%rcx,4),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4fc(%rbp)
mov    -0x4f8(%rbp),%rsi
mov    -0x4e0(%rbp),%rdi
mov    -0x4f0(%rbp),%rdx
mov    -0x4fc(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jge    1871 <ss_swapmerge+0x731>
mov    -0x45c(%rbp),%eax
add    $0x1,%eax
add    -0x454(%rbp),%eax
mov    %eax,-0x454(%rbp)
mov    -0x458(%rbp),%ecx
and    $0x1,%ecx
xor    $0x1,%ecx
mov    -0x45c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x45c(%rbp)
jmp    1876 <ss_swapmerge+0x736>
mov    -0x45c(%rbp),%eax
mov    %eax,-0x458(%rbp)
mov    -0x45c(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x45c(%rbp)
jmp    16bd <ss_swapmerge+0x57d>
xor    %eax,%eax
cmp    -0x454(%rbp),%eax
jge    1bfa <ss_swapmerge+0xaba>
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x448(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x454(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x450(%rbp)
mov    -0x448(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x454(%rbp),%edx
mov    $0x0,%al
call   1050 <ss_blockswap@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x440(%rbp)
mov    %rax,-0x438(%rbp)
movl   $0x0,-0x468(%rbp)
mov    -0x450(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    19fd <ss_swapmerge+0x8bd>
mov    -0x450(%rbp),%rax
cmpl   $0x0,(%rax)
jge    19a2 <ss_swapmerge+0x862>
mov    -0x450(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x450(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
cmp    -0x448(%rbp),%rax
jae    198e <ss_swapmerge+0x84e>
jmp    195b <ss_swapmerge+0x81b>
mov    -0x438(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x438(%rbp)
cmpl   $0x0,-0x4(%rax)
jge    197f <ss_swapmerge+0x83f>
jmp    195b <ss_swapmerge+0x81b>
mov    -0x468(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x468(%rbp)
mov    -0x468(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x468(%rbp)
jmp    19f8 <ss_swapmerge+0x8b8>
mov    -0x18(%rbp),%rax
cmp    -0x448(%rbp),%rax
jae    19f3 <ss_swapmerge+0x8b3>
jmp    19b8 <ss_swapmerge+0x878>
mov    -0x440(%rbp),%rax
cmpl   $0x0,(%rax)
jge    19e4 <ss_swapmerge+0x8a4>
jmp    19cd <ss_swapmerge+0x88d>
mov    -0x440(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x440(%rbp)
jmp    19b8 <ss_swapmerge+0x878>
mov    -0x468(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x468(%rbp)
jmp    19f8 <ss_swapmerge+0x8b8>
jmp    19fd <ss_swapmerge+0x8bd>
mov    -0x438(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    -0x28(%rbp),%rcx
mov    -0x440(%rbp),%rdx
sub    %rdx,%rcx
sar    $0x2,%rcx
cmp    %rcx,%rax
jg     1af9 <ss_swapmerge+0x9b9>
jmp    1a2f <ss_swapmerge+0x8ef>
mov    -0x440(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x450(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x28(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x10(%rax)
mov    -0x468(%rbp),%ecx
and    $0x3,%ecx
mov    -0x464(%rbp),%eax
and    $0x4,%eax
or     %eax,%ecx
mov    -0x460(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x460(%rbp)
movslq %eax,%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %ecx,0x18(%rax)
mov    -0x448(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x438(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x464(%rbp),%eax
and    $0x3,%eax
mov    -0x468(%rbp),%ecx
and    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x464(%rbp)
jmp    1bf5 <ss_swapmerge+0xab5>
mov    -0x468(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1b2b <ss_swapmerge+0x9eb>
mov    -0x440(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1b2b <ss_swapmerge+0x9eb>
mov    -0x468(%rbp),%eax
xor    $0x6,%eax
mov    %eax,-0x468(%rbp)
jmp    1b30 <ss_swapmerge+0x9f0>
mov    -0x18(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x448(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x438(%rbp),%rcx
movslq -0x460(%rbp),%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x10(%rax)
mov    -0x464(%rbp),%ecx
and    $0x3,%ecx
mov    -0x468(%rbp),%eax
and    $0x4,%eax
or     %eax,%ecx
mov    -0x460(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x460(%rbp)
movslq %eax,%rdx
lea    -0x430(%rbp),%rax
shl    $0x5,%rdx
add    %rdx,%rax
mov    %ecx,0x18(%rax)
mov    -0x440(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x450(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x468(%rbp),%eax
and    $0x3,%eax
mov    -0x464(%rbp),%ecx
and    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x464(%rbp)
jmp    1e9d <ss_swapmerge+0xd5d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x510(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x508(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     1c31 <ss_swapmerge+0xaf1>
mov    -0x20(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x514(%rbp)
jmp    1c41 <ss_swapmerge+0xb01>
mov    -0x20(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x514(%rbp)
mov    -0x510(%rbp),%rdi
mov    -0x508(%rbp),%rsi
mov    -0x514(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    1c92 <ss_swapmerge+0xb52>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    1c97 <ss_swapmerge+0xb57>
mov    -0x464(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1d44 <ss_swapmerge+0xc04>
mov    -0x464(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1d53 <ss_swapmerge+0xc13>
mov    -0x8(%rbp),%rax
mov    %rax,-0x528(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x520(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     1cf2 <ss_swapmerge+0xbb2>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x52c(%rbp)
jmp    1d02 <ss_swapmerge+0xbc2>
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x52c(%rbp)
mov    -0x528(%rbp),%rdi
mov    -0x520(%rbp),%rsi
mov    -0x52c(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    1d53 <ss_swapmerge+0xc13>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x464(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1dfd <ss_swapmerge+0xcbd>
mov    -0x8(%rbp),%rax
mov    %rax,-0x540(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x538(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x4(%rcx),%eax
jg     1d9c <ss_swapmerge+0xc5c>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
mov    %eax,-0x544(%rbp)
jmp    1dac <ss_swapmerge+0xc6c>
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x544(%rbp)
mov    -0x540(%rbp),%rdi
mov    -0x538(%rbp),%rsi
mov    -0x544(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    0x18(%rbp),%ecx
mov    $0x0,%al
call   1040 <ss_compare@plt>
cmp    $0x0,%eax
jne    1dfd <ss_swapmerge+0xcbd>
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    1e02 <ss_swapmerge+0xcc2>
jmp    1e07 <ss_swapmerge+0xcc7>
cmpl   $0x0,-0x460(%rbp)
jne    1e19 <ss_swapmerge+0xcd9>
jmp    1ea2 <ss_swapmerge+0xd62>
mov    -0x460(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x460(%rbp)
movslq %eax,%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
movslq -0x460(%rbp),%rcx
lea    -0x430(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x18(%rax),%eax
mov    %eax,-0x464(%rbp)
jmp    1e9d <ss_swapmerge+0xd5d>
jmp    117d <ss_swapmerge+0x3d>
add    $0x550,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss_swapmerge>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
mov    %r9,0x50(%rsp)
mov    %rcx,%r13
mov    %rdx,%r15
mov    %rsi,0x48(%rsp)
mov    %rdi,0x40(%rsp)
mov    0x4a8(%rsp),%r11d
movslq 0x4a0(%rsp),%rbp
xor    %r12d,%r12d
xor    %r10d,%r10d
mov    %rbp,0x30(%rsp)
jmp    11c5 <ss_swapmerge+0x85>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %r12d,%r12d
mov    0x4a8(%rsp),%r11d
je     17ab <ss_swapmerge+0x66b>
movslq %r12d,%rax
add    $0xffffffff,%r12d
shl    $0x5,%rax
lea    0x60(%rsp),%rcx
mov    -0x20(%rax,%rcx,1),%r15
mov    -0x18(%rax,%rcx,1),%r13
mov    -0x10(%rax,%rcx,1),%r8
mov    -0x8(%rax,%rcx,1),%r10d
lea    0x4(%r8),%rax
mov    %rax,0x58(%rsp)
mov    %r13,%r9
mov    %r8,0x18(%rsp)
jmp    125c <ss_swapmerge+0x11c>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rax
mov    %rbp,%rbx
mov    0x10(%rsp),%r10d
mov    0x38(%rsp),%r15
mov    0x20(%rsp),%rdx
mov    0x28(%rsp),%rsi
mov    %r12d,%r11d
mov    0x14(%rsp),%r12d
xor    %edi,%edi
cmp    %rdx,%rsi
jle    1484 <ss_swapmerge+0x344>
mov    %edi,%ecx
xor    $0x6,%ecx
cmp    %rbp,%rbx
cmovne %edi,%ecx
test   $0x2,%dil
cmove  %edi,%ecx
movslq %r12d,%rdx
shl    $0x5,%rdx
mov    %r15,0x60(%rsp,%rdx,1)
mov    %r13,0x68(%rsp,%rdx,1)
mov    %rax,0x70(%rsp,%rdx,1)
mov    %r10d,%eax
and    $0x3,%eax
mov    %ecx,%esi
and    $0xfffffffc,%esi
or     %eax,%esi
add    $0x1,%r12d
mov    %esi,0x78(%rsp,%rdx,1)
and    $0x3,%ecx
and    $0x4,%r10d
or     %ecx,%r10d
mov    %rbx,%r15
mov    0x30(%rsp),%rbp
sub    %r9,%r8
mov    %r8,%r13
sar    $0x2,%r13
cmp    %rbp,%r13
mov    %r10d,0x10(%rsp)
jle    15a0 <ss_swapmerge+0x460>
mov    %r9,%rcx
sub    %r15,%rcx
mov    %rcx,%rax
sar    $0x2,%rax
cmp    %rbp,%rax
jle    1690 <ss_swapmerge+0x550>
mov    %rcx,0x28(%rsp)
mov    %r8,0x20(%rsp)
mov    %r15,0x38(%rsp)
cmp    %r13,%rax
cmovl  %eax,%r13d
test   %r13d,%r13d
jle    14d0 <ss_swapmerge+0x390>
mov    %r12d,0x14(%rsp)
lea    -0x4(%r9),%rbp
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%r12d
mov    %r13d,%ebx
shr    %ebx
mov    %edx,%eax
lea    (%r9,%rax,4),%rcx
shl    $0x2,%rax
mov    (%rcx,%rbx,4),%ecx
lea    0x0(,%rbx,4),%rdx
mov    %ecx,%esi
sar    $0x1f,%esi
xor    %ecx,%esi
movslq %esi,%rcx
mov    0x48(%rsp),%rdi
lea    (%rdi,%rcx,4),%rsi
mov    %rbp,%rcx
sub    %rax,%rcx
sub    %rdx,%rcx
mov    (%rcx),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    (%rdi,%rax,4),%rdx
mov    0x40(%rsp),%rdi
mov    0x4a8(%rsp),%ecx
xor    %eax,%eax
mov    %r9,%r14
mov    %rbp,%r15
call   1040 <ss_compare@plt>
mov    %r14,%r9
lea    0x1(%rbx),%ecx
or     $0xfffffffe,%r13d
mov    %eax,%edx
sar    $0x1f,%edx
and    %ecx,%edx
add    %r12d,%edx
test   %eax,%eax
lea    0x1(%rbx,%r13,1),%r13d
cmovns %ebx,%r13d
test   %r13d,%r13d
jg     12c0 <ss_swapmerge+0x180>
test   %edx,%edx
mov    0x4a8(%rsp),%r11d
mov    0x30(%rsp),%rbp
mov    0x14(%rsp),%r12d
je     14d0 <ss_swapmerge+0x390>
mov    %r11d,%r12d
mov    %edx,%eax
lea    0x0(,%rax,4),%rcx
mov    %r9,%r13
sub    %rcx,%r13
lea    (%r9,%rax,4),%rbx
mov    %r13,%rdi
mov    %r9,%rsi
xor    %eax,%eax
mov    %r9,%rbp
call   1050 <ss_blockswap@plt>
mov    %rbx,%r9
mov    0x18(%rsp),%r8
cmp    %r8,%rbx
jae    11e0 <ss_swapmerge+0xa0>
mov    (%r9),%eax
test   %eax,%eax
mov    0x38(%rsp),%rdx
js     13f3 <ss_swapmerge+0x2b3>
mov    %rdx,%rcx
cmp    %r13,%rdx
mov    0x10(%rsp),%r10d
jae    1438 <ss_swapmerge+0x2f8>
mov    0x58(%rsp),%rdx
mov    %r14,%rbp
sub    %r14,%rdx
mov    0x28(%rsp),%rsi
mov    %r15,%rbx
nopl   0x0(%rax)
mov    %rbx,%r14
add    $0xfffffffffffffffc,%rdx
cmpl   $0x0,0x4(%rbx)
lea    0x4(%rbx),%rbx
js     13d0 <ss_swapmerge+0x290>
mov    $0x2,%edi
mov    %rbp,%rax
mov    %r12d,%r11d
mov    0x14(%rsp),%r12d
jmp    1455 <ss_swapmerge+0x315>
not    %eax
mov    %eax,(%r9)
mov    $0x1,%edi
cmp    %r13,%rdx
mov    0x10(%rsp),%r10d
mov    %rdx,%r15
mov    %r14,%rbp
jae    1463 <ss_swapmerge+0x323>
mov    %r14,%rsi
sub    %r15,%rsi
mov    %r14,%rax
mov    0x20(%rsp),%rdx
mov    %r12d,%r11d
xchg   %ax,%ax
add    $0xfffffffffffffffc,%rsi
cmpl   $0x0,-0x4(%rax)
lea    -0x4(%rax),%rax
js     1420 <ss_swapmerge+0x2e0>
mov    $0x5,%edi
mov    %rbp,%rbx
jmp    1476 <ss_swapmerge+0x336>
mov    %r14,%rbp
mov    %r14,%rax
mov    %r14,%rbx
mov    0x20(%rsp),%rdx
mov    0x28(%rsp),%rsi
mov    %r12d,%r11d
mov    0x14(%rsp),%r12d
xor    %edi,%edi
mov    %rcx,%r15
cmp    %rdx,%rsi
jg     120d <ss_swapmerge+0xcd>
jmp    1484 <ss_swapmerge+0x344>
mov    %r14,%rax
mov    %r14,%rbx
mov    0x20(%rsp),%rdx
mov    0x28(%rsp),%rsi
mov    %r12d,%r11d
mov    0x14(%rsp),%r12d
cmp    %rdx,%rsi
jg     120d <ss_swapmerge+0xcd>
movslq %r12d,%rcx
shl    $0x5,%rcx
mov    %rbx,0x60(%rsp,%rcx,1)
mov    %r9,0x68(%rsp,%rcx,1)
mov    %r8,0x70(%rsp,%rcx,1)
mov    %edi,%edx
and    $0x3,%edx
mov    %r10d,%esi
and    $0x4,%esi
or     %edx,%esi
add    $0x1,%r12d
mov    %esi,0x78(%rsp,%rcx,1)
and    $0x3,%r10d
and    $0xfffffffc,%edi
or     %edi,%r10d
mov    %rax,%r8
mov    0x30(%rsp),%rbp
jmp    11c5 <ss_swapmerge+0x85>
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%r15
mov    -0x4(%r9),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
mov    0x48(%rsp),%rbx
lea    (%rbx,%rax,4),%rsi
movslq (%r9),%rax
lea    (%rbx,%rax,4),%rdx
mov    0x40(%rsp),%r14
mov    %r14,%rdi
mov    %r11d,%ecx
xor    %eax,%eax
mov    %r9,%rbp
call   1040 <ss_compare@plt>
test   %eax,%eax
jne    150d <ss_swapmerge+0x3cd>
notl   0x0(%rbp)
mov    0x10(%rsp),%ecx
test   $0x1,%cl
mov    0x38(%rsp),%rdx
jne    1560 <ss_swapmerge+0x420>
test   $0x2,%cl
je     1562 <ss_swapmerge+0x422>
mov    -0x4(%rdx),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    (%rbx,%rax,4),%rsi
movslq (%rdx),%rax
lea    (%rbx,%rax,4),%rdx
mov    %r14,%rdi
mov    0x4a8(%rsp),%ecx
xor    %eax,%eax
call   1040 <ss_compare@plt>
mov    0x38(%rsp),%rdx
mov    0x10(%rsp),%ecx
test   %eax,%eax
jne    1562 <ss_swapmerge+0x422>
cs nopw 0x0(%rax,%rax,1)
notl   (%rdx)
test   $0x4,%cl
mov    0x18(%rsp),%r13
mov    %r15,%rbp
je     1190 <ss_swapmerge+0x50>
mov    -0x4(%r13),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    (%rbx,%rax,4),%rsi
movslq 0x0(%r13),%rax
lea    (%rbx,%rax,4),%rdx
mov    %r14,%rdi
jmp    1664 <ss_swapmerge+0x524>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdx
cmp    %r9,%r15
mov    0x48(%rsp),%r14
mov    0x40(%rsp),%r15
mov    0x18(%rsp),%r13
jae    15ef <ss_swapmerge+0x4af>
cmp    %r13,%r9
jae    15ef <ss_swapmerge+0x4af>
mov    0x4a8(%rsp),%eax
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r9,%rcx
mov    %r13,%r8
mov    %rbp,%rbx
mov    %rdx,%rbp
mov    0x50(%rsp),%r9
xor    %eax,%eax
call   1060 <ss_mergebackward@plt>
mov    %rbp,%rdx
mov    %rbx,%rbp
mov    0x10(%rsp),%r10d
test   $0x1,%r10b
jne    163b <ss_swapmerge+0x4fb>
test   $0x2,%r10b
je     163d <ss_swapmerge+0x4fd>
mov    %rdx,%rbx
mov    -0x4(%rdx),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    (%r14,%rax,4),%rsi
movslq (%rdx),%rax
lea    (%r14,%rax,4),%rdx
mov    %r15,%rdi
mov    0x4a8(%rsp),%ecx
xor    %eax,%eax
mov    %rbx,%rbp
call   1040 <ss_compare@plt>
mov    %rbx,%rdx
mov    0x30(%rsp),%rbp
mov    0x10(%rsp),%r10d
test   %eax,%eax
jne    163d <ss_swapmerge+0x4fd>
notl   (%rdx)
test   $0x4,%r10b
je     1190 <ss_swapmerge+0x50>
mov    -0x4(%r13),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    (%r14,%rax,4),%rsi
movslq 0x0(%r13),%rax
lea    (%r14,%rax,4),%rdx
mov    %r15,%rdi
mov    0x4a8(%rsp),%ecx
xor    %eax,%eax
call   1040 <ss_compare@plt>
test   %eax,%eax
jne    1190 <ss_swapmerge+0x50>
notl   0x0(%r13)
jmp    1190 <ss_swapmerge+0x50>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %r9,%r15
mov    0x48(%rsp),%r13
mov    0x40(%rsp),%rdi
jae    16dd <ss_swapmerge+0x59d>
mov    %r11d,(%rsp)
mov    %r15,%rdx
mov    %r10d,%r14d
mov    %rdi,%r15
mov    %r13,%rsi
mov    %r9,%rcx
mov    0x18(%rsp),%r8
mov    %rbp,%rbx
mov    %rdx,%rbp
mov    0x50(%rsp),%r9
xor    %eax,%eax
call   1030 <ss_mergeforward@plt>
mov    %r15,%rdi
mov    %rbp,%r15
mov    %rbx,%rbp
mov    %r14d,%r10d
mov    0x4a8(%rsp),%r11d
test   $0x1,%r10b
jne    1748 <ss_swapmerge+0x608>
test   $0x2,%r10b
je     1740 <ss_swapmerge+0x600>
mov    -0x4(%r15),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    0x0(,%rax,4),%rsi
add    %r13,%rsi
movslq (%r15),%rax
lea    0x0(%r13,%rax,4),%rdx
mov    %r11d,%ebx
mov    %rdi,%r14
mov    %r11d,%ecx
xor    %eax,%eax
mov    %r15,%r8
mov    %rbp,%r15
mov    %r8,%rbp
call   1040 <ss_compare@plt>
mov    %r14,%rdi
mov    %rbp,%rcx
mov    %r15,%rbp
mov    %rcx,%r15
mov    0x10(%rsp),%r10d
mov    %ebx,%r11d
test   %eax,%eax
je     1748 <ss_swapmerge+0x608>
nopl   0x0(%rax,%rax,1)
test   $0x4,%r10b
je     1790 <ss_swapmerge+0x650>
jmp    1751 <ss_swapmerge+0x611>
notl   (%r15)
test   $0x4,%r10b
je     1790 <ss_swapmerge+0x650>
mov    0x18(%rsp),%rdx
mov    -0x4(%rdx),%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
lea    0x0(,%rax,4),%rsi
add    %r13,%rsi
movslq (%rdx),%rax
lea    0x0(,%rax,4),%rdx
add    %r13,%rdx
mov    %r11d,%ecx
xor    %eax,%eax
mov    %r11d,%ebx
call   1040 <ss_compare@plt>
mov    %ebx,%r11d
test   %eax,%eax
je     179b <ss_swapmerge+0x65b>
test   %r12d,%r12d
jne    11a1 <ss_swapmerge+0x61>
jmp    17ab <ss_swapmerge+0x66b>
mov    0x18(%rsp),%rax
notl   (%rax)
test   %r12d,%r12d
jne    11a1 <ss_swapmerge+0x61>
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.anon = type { i32*, i32*, i32*, i32 }
define void @ss_swapmerge(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7) {
%9 = alloca [32 x %struct.anon]
%10 = bitcast [32 x %struct.anon]* %9 to i8*
%11 = sext i32 %6 to i64
br label %12
12: ; preds = %86, %8
%13 = phi i32* [ %4, %8 ], [ %87, %86 ]
%14 = phi i32* [ %3, %8 ], [ %88, %86 ]
%15 = phi i32* [ %2, %8 ], [ %89, %86 ]
%16 = phi i32 [ 0, %8 ], [ %90, %86 ]
%17 = phi i32 [ 0, %8 ], [ %91, %86 ]
%18 = ptrtoint i32* %13 to i64
br label %19
19: ; preds = %12, %244
%20 = phi i32* [ %197, %244 ], [ %14, %12 ]
%21 = phi i32* [ %228, %244 ], [ %15, %12 ]
%22 = phi i32 [ %258, %244 ], [ %16, %12 ]
%23 = phi i32 [ %262, %244 ], [ %17, %12 ]
%24 = ptrtoint i32* %20 to i64
%25 = sub i64 %18, %24
%26 = ashr exact i64 %25, 2
%27 = icmp sgt i64 %26, %11
br i1 %27, label %92, label %28
28: ; preds = %19
%29 = icmp ult i32* %21, %20
%30 = icmp ult i32* %20, %13
%31 = select i1 %29, i1 %30, i1 false
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = tail call i32 (i8*, i32*, i32*, i32*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_mergebackward to i32 (i8*, i32*, i32*, i32*, i32*, i32*, i32, ...)*)(i8* %0, i32* %1, i32* %21, i32* %20, i32* %13, i32* %5, i32 %7)
br label %34
34: ; preds = %28, %32
%35 = and i32 %23, 1
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %52
37: ; preds = %34
%38 = and i32 %23, 2
%39 = icmp eq i32 %38, 0
br i1 %39, label %55, label %40
40: ; preds = %37
%41 = getelementptr inbounds i32, i32* %21, i64 -1
%42 = load i32, i32* %41
%43 = ashr i32 %42, 31
%44 = xor i32 %43, %42
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %1, i64 %45
%47 = load i32, i32* %21
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %1, i64 %48
%50 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %46, i32* %49, i32 %7)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %40, %34
%53 = load i32, i32* %21
%54 = xor i32 %53, -1
store i32 %54, i32* %21
br label %55
55: ; preds = %52, %40, %37
%56 = and i32 %23, 4
%57 = icmp eq i32 %56, 0
br i1 %57, label %73, label %58
58: ; preds = %55
%59 = getelementptr inbounds i32, i32* %13, i64 -1
%60 = load i32, i32* %59
%61 = ashr i32 %60, 31
%62 = xor i32 %61, %60
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %1, i64 %63
%65 = load i32, i32* %13
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %1, i64 %66
%68 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %64, i32* %67, i32 %7)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %58
%71 = load i32, i32* %13
%72 = xor i32 %71, -1
store i32 %72, i32* %13
br label %73
73: ; preds = %55, %58, %70
%74 = icmp eq i32 %22, 0
br i1 %74, label %330, label %75
75: ; preds = %73
%76 = add nsw i32 %22, -1
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %77, i32 0
%79 = load i32*, i32** %78
%80 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %77, i32 1
%81 = load i32*, i32** %80
%82 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %77, i32 2
%83 = load i32*, i32** %82
%84 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %77, i32 3
%85 = load i32, i32* %84
br label %86
86: ; preds = %75, %142, %231, %319
%87 = phi i32* [ %327, %319 ], [ %227, %231 ], [ %150, %142 ], [ %83, %75 ]
%88 = phi i32* [ %325, %319 ], [ %196, %231 ], [ %148, %142 ], [ %81, %75 ]
%89 = phi i32* [ %323, %319 ], [ %21, %231 ], [ %146, %142 ], [ %79, %75 ]
%90 = phi i32 [ %320, %319 ], [ %239, %231 ], [ %143, %142 ], [ %76, %75 ]
%91 = phi i32 [ %329, %319 ], [ %243, %231 ], [ %152, %142 ], [ %85, %75 ]
br label %12
92: ; preds = %19
%93 = ptrtoint i32* %21 to i64
%94 = sub i64 %24, %93
%95 = ashr exact i64 %94, 2
%96 = icmp sgt i64 %95, %11
br i1 %96, label %153, label %97
97: ; preds = %92
%98 = icmp ult i32* %21, %20
br i1 %98, label %99, label %101
99: ; preds = %97
%100 = tail call i32 (i8*, i32*, i32*, i32*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_mergeforward to i32 (i8*, i32*, i32*, i32*, i32*, i32*, i32, ...)*)(i8* %0, i32* %1, i32* %21, i32* %20, i32* %13, i32* %5, i32 %7)
br label %101
101: ; preds = %97, %99
%102 = and i32 %23, 1
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %119
104: ; preds = %101
%105 = and i32 %23, 2
%106 = icmp eq i32 %105, 0
br i1 %106, label %122, label %107
107: ; preds = %104
%108 = getelementptr inbounds i32, i32* %21, i64 -1
%109 = load i32, i32* %108
%110 = ashr i32 %109, 31
%111 = xor i32 %110, %109
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %1, i64 %112
%114 = load i32, i32* %21
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %1, i64 %115
%117 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %113, i32* %116, i32 %7)
%118 = icmp eq i32 %117, 0
br i1 %118, label %119, label %122
119: ; preds = %107, %101
%120 = load i32, i32* %21
%121 = xor i32 %120, -1
store i32 %121, i32* %21
br label %122
122: ; preds = %119, %107, %104
%123 = and i32 %23, 4
%124 = icmp eq i32 %123, 0
br i1 %124, label %140, label %125
125: ; preds = %122
%126 = getelementptr inbounds i32, i32* %13, i64 -1
%127 = load i32, i32* %126
%128 = ashr i32 %127, 31
%129 = xor i32 %128, %127
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i32, i32* %1, i64 %130
%132 = load i32, i32* %13
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i32, i32* %1, i64 %133
%135 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %131, i32* %134, i32 %7)
%136 = icmp eq i32 %135, 0
br i1 %136, label %137, label %140
137: ; preds = %125
%138 = load i32, i32* %13
%139 = xor i32 %138, -1
store i32 %139, i32* %13
br label %140
140: ; preds = %122, %125, %137
%141 = icmp eq i32 %22, 0
br i1 %141, label %330, label %142
142: ; preds = %140
%143 = add nsw i32 %22, -1
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %144, i32 0
%146 = load i32*, i32** %145
%147 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %144, i32 1
%148 = load i32*, i32** %147
%149 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %144, i32 2
%150 = load i32*, i32** %149
%151 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %144, i32 3
%152 = load i32, i32* %151
br label %86
153: ; preds = %92
%154 = icmp slt i64 %95, %26
%155 = select i1 %154, i64 %95, i64 %26
%156 = trunc i64 %155 to i32
%157 = icmp sgt i32 %156, 0
br i1 %157, label %158, label %263
158: ; preds = %153
%159 = getelementptr inbounds i32, i32* %20, i64 -1
br label %160
160: ; preds = %158, %160
%161 = phi i32 [ %189, %160 ], [ %156, %158 ]
%162 = phi i32 [ %188, %160 ], [ 0, %158 ]
%163 = lshr i32 %161, 1
%164 = zext i32 %162 to i64
%165 = getelementptr inbounds i32, i32* %20, i64 %164
%166 = zext i32 %163 to i64
%167 = getelementptr inbounds i32, i32* %165, i64 %166
%168 = load i32, i32* %167
%169 = ashr i32 %168, 31
%170 = xor i32 %169, %168
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i32, i32* %1, i64 %171
%173 = sub nsw i64 0, %164
%174 = sub nsw i64 0, %166
%175 = getelementptr inbounds i32, i32* %159, i64 %173
%176 = getelementptr inbounds i32, i32* %175, i64 %174
%177 = load i32, i32* %176
%178 = ashr i32 %177, 31
%179 = xor i32 %178, %177
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i32, i32* %1, i64 %180
%182 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %172, i32* %181, i32 %7)
%183 = icmp slt i32 %182, 0
%184 = add nuw nsw i32 %163, 1
%185 = or i32 %161, -2
%186 = add nsw i32 %184, %185
%187 = select i1 %183, i32 %184, i32 0
%188 = add nuw nsw i32 %162, %187
%189 = select i1 %183, i32 %186, i32 %163
%190 = icmp sgt i32 %189, 0
br i1 %190, label %160, label %191
191: ; preds = %160
%192 = icmp eq i32 %188, 0
br i1 %192, label %263, label %193
193: ; preds = %191
%194 = zext i32 %188 to i64
%195 = sub nsw i64 0, %194
%196 = getelementptr inbounds i32, i32* %20, i64 %195
%197 = getelementptr inbounds i32, i32* %20, i64 %194
%198 = tail call i32 (i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_blockswap to i32 (i32*, i32*, i32, ...)*)(i32* %196, i32* %20, i32 %188)
%199 = icmp ult i32* %197, %13
br i1 %199, label %200, label %224
200: ; preds = %193
%201 = load i32, i32* %197
%202 = icmp slt i32 %201, 0
br i1 %202, label %203, label %211
203: ; preds = %200
%204 = xor i32 %201, -1
store i32 %204, i32* %197
%205 = icmp ult i32* %21, %196
br i1 %205, label %206, label %224
206: ; preds = %203, %206
%207 = phi i32* [ %208, %206 ], [ %20, %203 ]
%208 = getelementptr inbounds i32, i32* %207, i64 -1
%209 = load i32, i32* %208
%210 = icmp slt i32 %209, 0
br i1 %210, label %206, label %218
211: ; preds = %200
%212 = icmp ult i32* %21, %196
br i1 %212, label %213, label %224
213: ; preds = %211, %213
%214 = phi i32* [ %217, %213 ], [ %20, %211 ]
%215 = load i32, i32* %214
%216 = icmp slt i32 %215, 0
%217 = getelementptr inbounds i32, i32* %214, i64 1
br i1 %216, label %213, label %221
218: ; preds = %206
%219 = ptrtoint i32* %208 to i64
%220 = sub i64 %219, %93
br label %224
221: ; preds = %213
%222 = ptrtoint i32* %214 to i64
%223 = sub i64 %18, %222
br label %224
224: ; preds = %221, %218, %203, %211, %193
%225 = phi i64 [ %223, %221 ], [ %25, %218 ], [ %25, %203 ], [ %25, %211 ], [ %25, %193 ]
%226 = phi i64 [ %94, %221 ], [ %220, %218 ], [ %94, %203 ], [ %94, %211 ], [ %94, %193 ]
%227 = phi i32* [ %20, %221 ], [ %208, %218 ], [ %20, %203 ], [ %20, %211 ], [ %20, %193 ]
%228 = phi i32* [ %214, %221 ], [ %20, %218 ], [ %20, %203 ], [ %20, %211 ], [ %20, %193 ]
%229 = phi i32 [ 2, %221 ], [ 5, %218 ], [ 1, %203 ], [ 0, %211 ], [ 0, %193 ]
%230 = icmp sgt i64 %226, %225
br i1 %230, label %244, label %231
231: ; preds = %224
%232 = sext i32 %22 to i64
%233 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %232, i32 0
store i32* %228, i32** %233
%234 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %232, i32 1
store i32* %197, i32** %234
%235 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %232, i32 2
store i32* %13, i32** %235
%236 = and i32 %229, 3
%237 = and i32 %23, 4
%238 = or i32 %236, %237
%239 = add nsw i32 %22, 1
%240 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %232, i32 3
store i32 %238, i32* %240
%241 = and i32 %23, 3
%242 = and i32 %229, 4
%243 = or i32 %242, %241
br label %86
244: ; preds = %224
%245 = and i32 %229, 2
%246 = icmp ne i32 %245, 0
%247 = icmp eq i32* %228, %20
%248 = select i1 %246, i1 %247, i1 false
%249 = xor i32 %229, 6
%250 = select i1 %248, i32 %249, i32 %229
%251 = sext i32 %22 to i64
%252 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %251, i32 0
store i32* %21, i32** %252
%253 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %251, i32 1
store i32* %196, i32** %253
%254 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %251, i32 2
store i32* %227, i32** %254
%255 = and i32 %23, 3
%256 = and i32 %250, 4
%257 = or i32 %256, %255
%258 = add nsw i32 %22, 1
%259 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %251, i32 3
store i32 %257, i32* %259
%260 = and i32 %250, 3
%261 = and i32 %23, 4
%262 = or i32 %260, %261
br label %19
263: ; preds = %153, %191
%264 = getelementptr inbounds i32, i32* %20, i64 -1
%265 = load i32, i32* %264
%266 = ashr i32 %265, 31
%267 = xor i32 %266, %265
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds i32, i32* %1, i64 %268
%270 = load i32, i32* %20
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds i32, i32* %1, i64 %271
%273 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %269, i32* %272, i32 %7)
%274 = icmp eq i32 %273, 0
br i1 %274, label %275, label %278
275: ; preds = %263
%276 = load i32, i32* %20
%277 = xor i32 %276, -1
store i32 %277, i32* %20
br label %278
278: ; preds = %263, %275
%279 = and i32 %23, 1
%280 = icmp eq i32 %279, 0
br i1 %280, label %281, label %296
281: ; preds = %278
%282 = and i32 %23, 2
%283 = icmp eq i32 %282, 0
br i1 %283, label %299, label %284
284: ; preds = %281
%285 = getelementptr inbounds i32, i32* %21, i64 -1
%286 = load i32, i32* %285
%287 = ashr i32 %286, 31
%288 = xor i32 %287, %286
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds i32, i32* %1, i64 %289
%291 = load i32, i32* %21
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds i32, i32* %1, i64 %292
%294 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %290, i32* %293, i32 %7)
%295 = icmp eq i32 %294, 0
br i1 %295, label %296, label %299
296: ; preds = %284, %278
%297 = load i32, i32* %21
%298 = xor i32 %297, -1
store i32 %298, i32* %21
br label %299
299: ; preds = %296, %284, %281
%300 = and i32 %23, 4
%301 = icmp eq i32 %300, 0
br i1 %301, label %317, label %302
302: ; preds = %299
%303 = getelementptr inbounds i32, i32* %13, i64 -1
%304 = load i32, i32* %303
%305 = ashr i32 %304, 31
%306 = xor i32 %305, %304
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds i32, i32* %1, i64 %307
%309 = load i32, i32* %13
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds i32, i32* %1, i64 %310
%312 = tail call i32 (i8*, i32*, i32*, i32, ...) bitcast (i32 (...)* @ss_compare to i32 (i8*, i32*, i32*, i32, ...)*)(i8* %0, i32* %308, i32* %311, i32 %7)
%313 = icmp eq i32 %312, 0
br i1 %313, label %314, label %317
314: ; preds = %302
%315 = load i32, i32* %13
%316 = xor i32 %315, -1
store i32 %316, i32* %13
br label %317
317: ; preds = %299, %302, %314
%318 = icmp eq i32 %22, 0
br i1 %318, label %330, label %319
319: ; preds = %317
%320 = add nsw i32 %22, -1
%321 = sext i32 %320 to i64
%322 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %321, i32 0
%323 = load i32*, i32** %322
%324 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %321, i32 1
%325 = load i32*, i32** %324
%326 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %321, i32 2
%327 = load i32*, i32** %326
%328 = getelementptr inbounds [32 x %struct.anon], [32 x %struct.anon]* %9, i64 0, i64 %321, i32 3
%329 = load i32, i32* %328
br label %86
330: ; preds = %317, %140, %73
ret void
}