unsigned int qlz_compress_core(const void *source, unsigned char *destination,
                               unsigned int size,
                               const unsigned char *hashtable[][1 + 1],
                               const unsigned char *first_valid,
                               unsigned char *hash_counter) {
  const unsigned char *source_c = (const unsigned char *)source;
  unsigned char *destination_c = (unsigned char *)destination;
  const unsigned char *last_byte = source_c + size - 1;
  const unsigned char *src = source_c;
  unsigned char *cword_ptr = destination_c;
  unsigned char *dst = destination_c + 4;
  unsigned int cword_val = 1U << 31;
  const unsigned char *guarantee_uncompressed = last_byte - 8;
  unsigned char *prev_dst = dst;
  const unsigned char *prev_src = src;
  hash_counter = hash_counter;
  first_valid = first_valid;
  while (src < source_c + 4 && src < guarantee_uncompressed) {
    cword_val = (cword_val >> 1);
    *dst = *src;
    dst++;
    src++;
  }
  while (src < guarantee_uncompressed) {
    unsigned int fetch;
    if ((cword_val & 1) == 1) {
      if (dst > destination_c + size)
        return 0;
      fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4);
      cword_ptr = dst;
      dst += 4;
      cword_val = 1U << 31;
      if (dst - prev_dst > src - prev_src && src > source_c + 1000) {
        int q;
        for (q = 0; q < 30 && src + 31 < guarantee_uncompressed &&
                    dst + 35 < destination_c + size;
             q++) {
          int w;
          for (w = 0; w < 31; w++) {
            fetch = fast_read(src + w, 4);
            *(unsigned int *)&hashtable[hash_func(fetch)][0] =
                fast_read(src + w, 4);
            hashtable[hash_func(fetch)][1] = src + w;
          }
          fast_write((1U << 31), dst - 4, 4);
          memcpy(dst, src, 31);
          dst += 4 * 8 - 1 + 4;
          src += 4 * 8 - 1;
          prev_src = src;
          prev_dst = dst;
          cword_ptr = dst - 4;
        }
      }
    }
    if (fast_read(src, 4) == fast_read(src + 1, 4)) {
      const unsigned char *orig_src;
      fetch = fast_read(src, 4);
      orig_src = src;
      do
        src = src + 4;
      while (src <= guarantee_uncompressed - 4 && fetch == fast_read(src, 4));
      if ((src - orig_src) <= 2047) {
        fast_write(((fetch & 0xff) << 16) |
                       (unsigned int)((src - orig_src) << 4) | 15,
                   dst, 4);
        dst = dst + 3;
      } else {
        fast_write(((fetch & 0xff) << 16) | 15, dst, 4);
        fast_write((unsigned int)(src - orig_src), dst + 3, 4);
        dst = dst + 7;
      }
      cword_val = (cword_val >> 1) | (1 << 31);
    } else {
      const unsigned char *o;
      unsigned int hash, matchlen;
      unsigned int cached;
      fetch = fast_read(src, 4);
      hash = hash_func(fetch);
      cached = fetch ^ *(unsigned int *)&hashtable[hash][0];
      *(unsigned int *)&hashtable[hash][0] = fetch;
      o = hashtable[hash][1];
      hashtable[hash][1] = src;
      if (o != 0 && (cached & 0xffffff) == 0 && src - o > 3) {
        unsigned int offset;
        offset = (unsigned int)(src - o);
        if (cached & 0xffffffff) {
          cword_val = (cword_val >> 1) | (1U << 31);
          fast_write(3 | (hash << 4), dst, 2);
          src += 3;
          dst += 2;
        } else {
          unsigned int offset;
          const unsigned char *old_src = src;
          offset = (unsigned int)(src - o);
          cword_val = (cword_val >> 1) | (1U << 31);
          src += 3;
          while (*(o + (src - old_src)) == *src && src < guarantee_uncompressed)
            src++;
          matchlen = (unsigned int)(src - old_src);
          if (matchlen < 15) {
            fast_write(matchlen | (hash << 4), dst, 2);
            dst += 2;
          } else if (matchlen < 255) {
            fast_write(hash << 4, dst, 2);
            *(dst + 2) = (unsigned char)matchlen;
            dst += 3;
          } else {
            fast_write(hash << 4, dst, 2);
            *(dst + 2) = 0;
            fast_write(matchlen, dst + 3, 4);
            dst += 7;
          }
        }
      } else {
        *dst = *src;
        src++;
        dst++;
        cword_val = (cword_val >> 1);
      }
    }
  }
  while (src <= last_byte) {
    if ((cword_val & 1) == 1) {
      fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4);
      cword_ptr = dst;
      dst += 4;
      cword_val = 1U << 31;
    }
    if (src < last_byte - 2 && src > source_c + 3) {
      hashtable[hash_func(fast_read(src, 4))][1] = src;
      *(unsigned int *)&hashtable[hash_func(fast_read(src, 4))][0] =
          fast_read(src, 4);
    }
    *dst = *src;
    src++;
    dst++;
    cword_val = (cword_val >> 1);
  }
  while ((cword_val & 1) != 1)
    cword_val = (cword_val >> 1);
  fast_write((cword_val >> 1) | (1U << 31), cword_ptr, 4);
  if (dst - destination_c < 9)
    return 9;
  else
    return (unsigned int)(dst - destination_c);
}


x86 assembly (clang, -O0):
<qlz_compress_core>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x68(%rbp)
movl   $0x80000000,-0x6c(%rbp)
mov    -0x50(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x78(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x58(%rbp),%rcx
mov    -0x40(%rbp),%rdx
add    $0x4,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0xc9(%rbp)
jae    11f4 <qlz_compress_core+0xc4>
mov    -0x58(%rbp),%rax
cmp    -0x78(%rbp),%rax
setb   %al
mov    %al,-0xc9(%rbp)
mov    -0xc9(%rbp),%al
test   $0x1,%al
jne    1207 <qlz_compress_core+0xd7>
jmp    1239 <qlz_compress_core+0x109>
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    11c6 <qlz_compress_core+0x96>
jmp    123e <qlz_compress_core+0x10e>
mov    -0x58(%rbp),%rax
cmp    -0x78(%rbp),%rax
jae    196d <qlz_compress_core+0x83d>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    14e2 <qlz_compress_core+0x3b2>
mov    -0x68(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    %rdx,%rcx
cmp    %rcx,%rax
jbe    127e <qlz_compress_core+0x14e>
movl   $0x0,-0x4(%rbp)
jmp    1b31 <qlz_compress_core+0xa01>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x68(%rbp)
movl   $0x80000000,-0x6c(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x80(%rbp),%rcx
sub    %rcx,%rax
mov    -0x58(%rbp),%rcx
mov    -0x88(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jle    14dd <qlz_compress_core+0x3ad>
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    $0x3e8,%rcx
cmp    %rcx,%rax
jbe    14dd <qlz_compress_core+0x3ad>
movl   $0x0,-0x90(%rbp)
xor    %eax,%eax
cmpl   $0x1e,-0x90(%rbp)
mov    %al,-0xca(%rbp)
jge    1346 <qlz_compress_core+0x216>
mov    -0x58(%rbp),%rcx
add    $0x1f,%rcx
xor    %eax,%eax
cmp    -0x78(%rbp),%rcx
mov    %al,-0xca(%rbp)
jae    1346 <qlz_compress_core+0x216>
mov    -0x68(%rbp),%rax
add    $0x23,%rax
mov    -0x48(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    %rdx,%rcx
cmp    %rcx,%rax
setb   %al
mov    %al,-0xca(%rbp)
mov    -0xca(%rbp),%al
test   $0x1,%al
jne    1359 <qlz_compress_core+0x229>
jmp    14d8 <qlz_compress_core+0x3a8>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1f,-0x94(%rbp)
jge    1442 <qlz_compress_core+0x312>
mov    -0x58(%rbp),%rdi
movslq -0x94(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x58(%rbp),%rdi
movslq -0x94(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0xec(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x8c(%rbp),%edi
mov    $0x0,%al
call   1050 <hash_func@plt>
mov    -0xec(%rbp),%ecx
mov    %eax,%edx
mov    -0xe8(%rbp),%rax
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rax
movslq -0x94(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0xe0(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x8c(%rbp),%edi
mov    $0x0,%al
call   1050 <hash_func@plt>
mov    -0xe0(%rbp),%rcx
mov    %eax,%edx
mov    -0xd8(%rbp),%rax
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1363 <qlz_compress_core+0x233>
mov    -0x68(%rbp),%rsi
add    $0xfffffffffffffffc,%rsi
mov    $0x80000000,%edi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rcx),%rdx
mov    %rdx,(%rax)
mov    0x8(%rcx),%rdx
mov    %rdx,0x8(%rax)
mov    0x10(%rcx),%rdx
mov    %rdx,0x10(%rax)
mov    0x18(%rcx),%edx
mov    %edx,0x18(%rax)
mov    0x1c(%rcx),%dx
mov    %dx,0x1c(%rax)
mov    0x1e(%rcx),%cl
mov    %cl,0x1e(%rax)
mov    -0x68(%rbp),%rax
add    $0x23,%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
add    $0x1f,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x68(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x60(%rbp)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    12f9 <qlz_compress_core+0x1c9>
jmp    14dd <qlz_compress_core+0x3ad>
jmp    14e2 <qlz_compress_core+0x3b2>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0xf0(%rbp)
mov    -0x58(%rbp),%rdi
add    $0x1,%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,%ecx
mov    -0xf0(%rbp),%eax
cmp    %ecx,%eax
jne    1669 <qlz_compress_core+0x539>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x58(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rcx
mov    -0x78(%rbp),%rdx
add    $0xfffffffffffffffc,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0xf1(%rbp)
ja     1595 <qlz_compress_core+0x465>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,%ecx
mov    -0xf8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0xf1(%rbp)
mov    -0xf1(%rbp),%al
test   $0x1,%al
jne    153d <qlz_compress_core+0x40d>
mov    -0x58(%rbp),%rax
mov    -0xa0(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x7ff,%rax
jg     1604 <qlz_compress_core+0x4d4>
mov    -0x8c(%rbp),%edi
and    $0xff,%edi
shl    $0x10,%edi
mov    -0x58(%rbp),%rax
mov    -0xa0(%rbp),%rcx
sub    %rcx,%rax
shl    $0x4,%rax
or     %eax,%edi
or     $0xf,%edi
mov    -0x68(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x68(%rbp)
jmp    1656 <qlz_compress_core+0x526>
mov    -0x8c(%rbp),%edi
and    $0xff,%edi
shl    $0x10,%edi
or     $0xf,%edi
mov    -0x68(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x58(%rbp),%rax
mov    -0xa0(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edi
mov    -0x68(%rbp),%rsi
add    $0x3,%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x68(%rbp)
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
or     $0x80000000,%eax
mov    %eax,-0x6c(%rbp)
jmp    1968 <qlz_compress_core+0x838>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edi
mov    $0x0,%al
call   1050 <hash_func@plt>
mov    %eax,-0xac(%rbp)
mov    -0x8c(%rbp),%eax
mov    -0x28(%rbp),%rcx
mov    -0xac(%rbp),%edx
shl    $0x4,%rdx
add    %rdx,%rcx
xor    (%rcx),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x8c(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    -0xac(%rbp),%edx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    -0xac(%rbp),%ecx
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x58(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    -0xac(%rbp),%edx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
cmpq   $0x0,-0xa8(%rbp)
je     1936 <qlz_compress_core+0x806>
mov    -0xb4(%rbp),%eax
and    $0xffffff,%eax
cmp    $0x0,%eax
jne    1936 <qlz_compress_core+0x806>
mov    -0x58(%rbp),%rax
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x3,%rax
jle    1936 <qlz_compress_core+0x806>
mov    -0x58(%rbp),%rax
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0xb8(%rbp)
mov    -0xb4(%rbp),%eax
and    $0xffffffff,%eax
cmp    $0x0,%eax
je     17a6 <qlz_compress_core+0x676>
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
or     $0x80000000,%eax
mov    %eax,-0x6c(%rbp)
mov    -0xac(%rbp),%edi
shl    $0x4,%edi
or     $0x3,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x58(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x58(%rbp)
mov    -0x68(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x68(%rbp)
jmp    1931 <qlz_compress_core+0x801>
mov    -0x58(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x58(%rbp),%rax
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0xbc(%rbp)
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
or     $0x80000000,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x58(%rbp)
mov    -0xa8(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    -0xc8(%rbp),%rdx
sub    %rdx,%rcx
movzbl (%rax,%rcx,1),%ecx
mov    -0x58(%rbp),%rax
movzbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0xf9(%rbp)
jne    1820 <qlz_compress_core+0x6f0>
mov    -0x58(%rbp),%rax
cmp    -0x78(%rbp),%rax
setb   %al
mov    %al,-0xf9(%rbp)
mov    -0xf9(%rbp),%al
test   $0x1,%al
jne    1833 <qlz_compress_core+0x703>
jmp    1844 <qlz_compress_core+0x714>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    17df <qlz_compress_core+0x6af>
mov    -0x58(%rbp),%rax
mov    -0xc8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0xb0(%rbp)
cmpl   $0xf,-0xb0(%rbp)
jae    1897 <qlz_compress_core+0x767>
mov    -0xb0(%rbp),%edi
mov    -0xac(%rbp),%eax
shl    $0x4,%eax
or     %eax,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x68(%rbp)
jmp    192c <qlz_compress_core+0x7fc>
cmpl   $0xff,-0xb0(%rbp)
jae    18e0 <qlz_compress_core+0x7b0>
mov    -0xac(%rbp),%edi
shl    $0x4,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0xb0(%rbp),%eax
mov    %al,%cl
mov    -0x68(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x68(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x68(%rbp)
jmp    1927 <qlz_compress_core+0x7f7>
mov    -0xac(%rbp),%edi
shl    $0x4,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
movb   $0x0,0x2(%rax)
mov    -0xb0(%rbp),%edi
mov    -0x68(%rbp),%rsi
add    $0x3,%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x68(%rbp)
jmp    192c <qlz_compress_core+0x7fc>
jmp    1931 <qlz_compress_core+0x801>
jmp    1963 <qlz_compress_core+0x833>
mov    -0x58(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1968 <qlz_compress_core+0x838>
jmp    123e <qlz_compress_core+0x10e>
jmp    1972 <qlz_compress_core+0x842>
mov    -0x58(%rbp),%rax
cmp    -0x50(%rbp),%rax
ja     1ac4 <qlz_compress_core+0x994>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    19c6 <qlz_compress_core+0x896>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x68(%rbp)
movl   $0x80000000,-0x6c(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x50(%rbp),%rcx
add    $0xfffffffffffffffe,%rcx
cmp    %rcx,%rax
jae    1a92 <qlz_compress_core+0x962>
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    $0x3,%rcx
cmp    %rcx,%rax
jbe    1a92 <qlz_compress_core+0x962>
mov    -0x58(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1050 <hash_func@plt>
mov    -0x120(%rbp),%rcx
mov    %eax,%edx
mov    -0x118(%rbp),%rax
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,-0x10c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <fast_read@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1050 <hash_func@plt>
mov    -0x10c(%rbp),%ecx
mov    %eax,%edx
mov    -0x108(%rbp),%rax
movslq %edx,%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rax
mov    (%rax),%cl
mov    -0x68(%rbp),%rax
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1972 <qlz_compress_core+0x842>
jmp    1ac9 <qlz_compress_core+0x999>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
je     1ae6 <qlz_compress_core+0x9b6>
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1ac9 <qlz_compress_core+0x999>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x9,%rax
jge    1b23 <qlz_compress_core+0x9f3>
movl   $0x9,-0x4(%rbp)
jmp    1b31 <qlz_compress_core+0xa01>
mov    -0x68(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qlz_compress_core>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rcx,%r13
mov    %edx,%ebp
lea    0x4(%rsi),%rdx
lea    (%rdi,%rbp,1),%r14
add    $0xfffffffffffffff7,%r14
cmp    %rdi,%r14
mov    %rbp,0x58(%rsp)
jbe    118e <qlz_compress_core+0x5e>
lea    -0xa(%rbp),%rax
cmp    $0x3,%rax
mov    $0x3,%ecx
cmovb  %rax,%rcx
mov    (%rdi),%al
mov    %al,0x4(%rsi)
test   %rcx,%rcx
je     119a <qlz_compress_core+0x6a>
mov    0x1(%rdi),%al
mov    %al,0x5(%rsi)
cmp    $0x1,%rcx
jne    11a5 <qlz_compress_core+0x75>
lea    0x6(%rsi),%r8
mov    $0x20000000,%ebx
jmp    11cb <qlz_compress_core+0x9b>
mov    $0x80000000,%ebx
xor    %ecx,%ecx
mov    %rdx,%r8
jmp    11cf <qlz_compress_core+0x9f>
lea    0x5(%rsi),%r8
mov    $0x40000000,%ebx
jmp    11cb <qlz_compress_core+0x9b>
mov    0x2(%rdi),%al
mov    %al,0x6(%rsi)
cmp    $0x2,%rcx
jne    11bc <qlz_compress_core+0x8c>
lea    0x7(%rsi),%r8
mov    $0x10000000,%ebx
jmp    11cb <qlz_compress_core+0x9b>
mov    0x3(%rdi),%al
mov    %al,0x7(%rsi)
lea    0x8(%rsi),%r8
mov    $0x8000000,%ebx
add    $0x1,%rcx
lea    (%rdi,%rcx,1),%r12
cmp    %r14,%r12
mov    %rsi,0x70(%rsp)
mov    %rdi,0x18(%rsp)
jae    1701 <qlz_compress_core+0x5d1>
mov    %rdx,0x38(%rsp)
mov    0x58(%rsp),%rax
add    %rsi,%rax
mov    %rax,0x48(%rsp)
lea    -0x4(%r14),%rax
mov    %rax,0x50(%rsp)
lea    0x3a2(%rdi),%rax
mov    %rax,0x68(%rsp)
lea    0x3(%rdi),%rax
mov    %rax,0x60(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,0x40(%rsp)
mov    %r14,0x30(%rsp)
jmp    1264 <qlz_compress_core+0x134>
nopw   0x0(%rax,%rax,1)
mov    (%r14),%al
mov    0x8(%rsp),%rbp
mov    %al,0x0(%rbp)
mov    0x20(%rsp),%rcx
add    $0x1,%rcx
add    $0x1,%rbp
shr    %ebx
mov    0x30(%rsp),%r14
mov    0x18(%rsp),%rdi
lea    (%rdi,%rcx,1),%r12
mov    %rbp,%r8
cmp    %r14,%r12
jae    1709 <qlz_compress_core+0x5d9>
test   $0x1,%bl
jne    1280 <qlz_compress_core+0x150>
mov    %ebx,%r12d
mov    %r8,0x8(%rsp)
mov    %rcx,%rbp
jmp    1490 <qlz_compress_core+0x360>
nopl   0x0(%rax)
cmp    0x48(%rsp),%r8
ja     1886 <qlz_compress_core+0x756>
mov    %r14,%rbp
mov    %rcx,%r14
mov    %rdi,%r15
shr    %ebx
or     $0x80000000,%ebx
mov    %ebx,%edi
mov    0x10(%rsp),%rsi
mov    $0x4,%edx
xor    %eax,%eax
mov    %r8,%rbx
call   1040 <fast_write@plt>
mov    %rbx,%rsi
lea    0x4(%rbx),%rax
mov    %rax,0x8(%rsp)
sub    0x38(%rsp),%rax
sub    0x40(%rsp),%r12
cmp    %r12,%rax
jle    1440 <qlz_compress_core+0x310>
cmp    $0x3e9,%r14
jl     1440 <qlz_compress_core+0x310>
mov    %r15,%rdi
lea    (%r15,%r14,1),%rax
add    $0x1f,%rax
cmp    %rbp,%rax
jae    1453 <qlz_compress_core+0x323>
lea    0x27(%rsi),%rcx
cmp    0x48(%rsp),%rcx
jae    1453 <qlz_compress_core+0x323>
mov    0x68(%rsp),%rdx
add    %r14,%rdx
mov    %rdx,0x78(%rsp)
add    $0x41a,%rsi
mov    %rsi,0x80(%rsp)
lea    0x1f(%r14),%r8
lea    (%rdi,%r14,1),%r15
xor    %edx,%edx
mov    0x8(%rsp),%rsi
nopl   0x0(%rax)
mov    %edx,0x2c(%rsp)
mov    %rax,0x40(%rsp)
mov    %r8,0x20(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rcx,0x38(%rsp)
add    %rdi,%r14
mov    %r14,0x8(%rsp)
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%r15,%r12,1),%rbp
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%r14d
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <hash_func@plt>
cltq
shl    $0x4,%rax
mov    %r14d,0x0(%r13,%rax,1)
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <hash_func@plt>
cltq
shl    $0x4,%rax
mov    %rbp,0x8(%r13,%rax,1)
add    $0x1,%r12
cmp    $0x1f,%r12
jne    1360 <qlz_compress_core+0x230>
mov    0x10(%rsp),%rbx
lea    -0x4(%rbx),%rsi
mov    $0x80000000,%r12d
mov    $0x80000000,%edi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    0x8(%rsp),%rax
movups (%rax),%xmm0
movups 0xf(%rax),%xmm1
movups %xmm0,(%rbx)
movups %xmm1,0xf(%rbx)
mov    0x2c(%rsp),%edx
add    $0x1,%edx
cmp    $0x1e,%edx
je     1463 <qlz_compress_core+0x333>
mov    0x18(%rsp),%rdi
mov    0x20(%rsp),%rbp
lea    (%rdi,%rbp,1),%rax
add    $0x1f,%rax
cmp    0x30(%rsp),%rax
mov    0x38(%rsp),%rsi
jae    1430 <qlz_compress_core+0x300>
lea    0x1f(%rbp),%r8
lea    0x23(%rsi),%rcx
add    $0x1f,%r15
mov    %rbp,%r14
cmp    0x48(%rsp),%rcx
jb     1330 <qlz_compress_core+0x200>
add    $0x1f,%rbx
mov    %rbx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
jmp    1490 <qlz_compress_core+0x360>
mov    $0x80000000,%r12d
mov    %rsi,0x10(%rsp)
mov    %r14,%rbp
mov    %r15,%rdi
jmp    1490 <qlz_compress_core+0x360>
mov    $0x80000000,%r12d
mov    %rsi,0x10(%rsp)
mov    %r14,%rbp
jmp    1490 <qlz_compress_core+0x360>
mov    0x78(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0x38(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rdi
mov    0x20(%rsp),%rbp
xchg   %ax,%ax
lea    (%rdi,%rbp,1),%r14
mov    %rdi,%rbx
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,0x2c(%rsp)
mov    %rbp,0x20(%rsp)
lea    (%rbx,%rbp,1),%rdi
add    $0x1,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%r15d
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%ebp
cmp    %r15d,0x2c(%rsp)
jne    1550 <qlz_compress_core+0x420>
mov    $0x4,%ecx
mov    $0x40,%edx
nopl   0x0(%rax,%rax,1)
mov    %rcx,%r15
mov    %edx,%ebx
lea    (%r14,%rcx,1),%rdi
cmp    0x50(%rsp),%rdi
ja     1517 <qlz_compress_core+0x3e7>
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
lea    0x4(%r15),%rcx
lea    0x40(%rbx),%edx
cmp    %eax,%ebp
je     14f0 <qlz_compress_core+0x3c0>
movzbl %bpl,%edi
shl    $0x10,%edi
cmp    $0x7ff,%r15
jg     15e0 <qlz_compress_core+0x4b0>
or     %ebx,%edi
or     $0xf,%edi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    $0x3,%eax
jmp    160f <qlz_compress_core+0x4df>
xchg   %ax,%ax
mov    %ebp,%edi
xor    %eax,%eax
call   1050 <hash_func@plt>
mov    %eax,%esi
shl    $0x4,%rsi
mov    0x0(%r13,%rsi,1),%edx
xor    %ebp,%edx
mov    %ebp,0x0(%r13,%rsi,1)
mov    0x8(%r13,%rsi,1),%rcx
mov    %r14,0x8(%r13,%rsi,1)
test   %rcx,%rcx
mov    %r12d,%ebx
je     1230 <qlz_compress_core+0x100>
mov    %edx,%esi
and    $0xffffff,%esi
jne    1230 <qlz_compress_core+0x100>
mov    %r14,%rsi
sub    %rcx,%rsi
cmp    $0x4,%rsi
jl     1230 <qlz_compress_core+0x100>
test   %edx,%edx
je     1634 <qlz_compress_core+0x504>
shl    $0x4,%eax
or     $0x3,%eax
mov    %eax,%edi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    0x20(%rsp),%rcx
add    $0x3,%rcx
mov    $0x2,%eax
mov    0x30(%rsp),%r14
mov    0x18(%rsp),%rdi
jmp    16f9 <qlz_compress_core+0x5c9>
or     $0xf,%edi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
lea    0x3(%rbp),%rsi
mov    %r15d,%edi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    $0x7,%eax
mov    0x18(%rsp),%rdi
mov    0x30(%rsp),%r14
mov    0x20(%rsp),%rcx
add    %r15,%rcx
add    %rax,%rbp
mov    %r12d,%ebx
shr    %ebx
or     $0x80000000,%ebx
jmp    1254 <qlz_compress_core+0x124>
mov    $0x2,%ebp
mov    0x30(%rsp),%r14
mov    0x60(%rsp),%rsi
mov    0x20(%rsp),%rdi
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rcx,%rbp,1),%edx
lea    0x1(%rdi),%r15
add    $0x1,%rbp
cmp    (%rsi,%rdi,1),%dl
jne    166d <qlz_compress_core+0x53d>
add    %rsi,%rdi
cmp    %r14,%rdi
mov    %r15,%rdi
jb     1650 <qlz_compress_core+0x520>
add    $0x2,%r15
cmp    $0xe,%ebp
ja     16a0 <qlz_compress_core+0x570>
shl    $0x4,%eax
or     %eax,%ebp
mov    %ebp,%edi
mov    0x8(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    $0x2,%eax
mov    0x18(%rsp),%rdi
mov    %r15,%rcx
jmp    16f9 <qlz_compress_core+0x5c9>
mov    %r14,%r12
shl    $0x4,%eax
mov    %eax,%edi
mov    0x8(%rsp),%r14
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
cmp    $0xfe,%ebp
ja     16cf <qlz_compress_core+0x59f>
mov    %bpl,0x2(%r14)
mov    $0x3,%eax
jmp    16eb <qlz_compress_core+0x5bb>
movb   $0x0,0x2(%r14)
lea    0x3(%r14),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
mov    $0x7,%eax
mov    0x18(%rsp),%rdi
mov    %r15,%rcx
mov    %r14,%rbp
mov    %r12,%r14
add    %rax,%rbp
jmp    1627 <qlz_compress_core+0x4f7>
mov    %r8,%rbp
mov    %rsi,0x10(%rsp)
mov    0x58(%rsp),%rax
lea    (%rdi,%rax,1),%rdx
add    $0xffffffffffffffff,%rdx
lea    (%rdi,%rcx,1),%rax
cmp    %rdx,%rax
jbe    1773 <qlz_compress_core+0x643>
mov    %rbp,%r12
mov    0x10(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %ebx,%eax
shr    %ebx
test   $0x1,%al
je     1730 <qlz_compress_core+0x600>
or     $0x80000000,%ebx
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fast_write@plt>
sub    0x70(%rsp),%r12
cmp    $0xa,%r12
mov    $0x9,%eax
cmovge %r12d,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    -0x2(%rdx),%rax
mov    %rax,0x50(%rsp)
mov    0x10(%rsp),%r15
mov    %rdx,0x20(%rsp)
jmp    17b6 <qlz_compress_core+0x686>
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%eax
mov    %al,(%r12)
add    $0x1,%r12
shr    %ebx
lea    (%rdi,%rcx,1),%rax
add    $0x1,%rax
add    $0x1,%rcx
mov    %r12,%rbp
cmp    %rdx,%rax
ja     1730 <qlz_compress_core+0x600>
lea    (%rdi,%rcx,1),%r14
test   $0x1,%bl
jne    17d0 <qlz_compress_core+0x6a0>
mov    %rbp,%r12
cmp    0x50(%rsp),%r14
jb     180c <qlz_compress_core+0x6dc>
jmp    1790 <qlz_compress_core+0x660>
nopl   0x0(%rax,%rax,1)
shr    %ebx
or     $0x80000000,%ebx
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x4,%edx
xor    %eax,%eax
mov    %rcx,%rbx
call   1040 <fast_write@plt>
mov    0x20(%rsp),%rdx
mov    %rbx,%rcx
mov    0x18(%rsp),%rdi
lea    0x4(%rbp),%r12
mov    $0x80000000,%ebx
mov    %rbp,%r15
cmp    0x50(%rsp),%r14
jae    1790 <qlz_compress_core+0x660>
cmp    $0x4,%rcx
jl     1790 <qlz_compress_core+0x660>
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
mov    %rcx,0x8(%rsp)
call   1030 <fast_read@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1050 <hash_func@plt>
cltq
shl    $0x4,%rax
mov    %r14,0x8(%r13,%rax,1)
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fast_read@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1050 <hash_func@plt>
mov    0x20(%rsp),%rdx
mov    0x8(%rsp),%rcx
mov    0x18(%rsp),%rdi
cltq
shl    $0x4,%rax
mov    %ebp,0x0(%r13,%rax,1)
jmp    1790 <qlz_compress_core+0x660>
xor    %eax,%eax
jmp    1761 <qlz_compress_core+0x631>

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

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