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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
unsigned int fast_read(unsigned char const *, int);
int /*<<< orphan*/ fast_write(unsigned int, unsigned char *, int);
size_t hash_func(unsigned int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
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    1204 <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    1217 <qlz_compress_core+0xd7>
jmp    1249 <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    11d6 <qlz_compress_core+0x96>
jmp    124e <qlz_compress_core+0x10e>
mov    -0x58(%rbp),%rax
cmp    -0x78(%rbp),%rax
jae    1931 <qlz_compress_core+0x7f1>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    14c2 <qlz_compress_core+0x382>
mov    -0x68(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    %rdx,%rcx
cmp    %rcx,%rax
jbe    128e <qlz_compress_core+0x14e>
movl   $0x0,-0x4(%rbp)
jmp    1ae3 <qlz_compress_core+0x9a3>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
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    14bd <qlz_compress_core+0x37d>
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    $0x3e8,%rcx
cmp    %rcx,%rax
jbe    14bd <qlz_compress_core+0x37d>
movl   $0x0,-0x90(%rbp)
xor    %eax,%eax
cmpl   $0x1e,-0x90(%rbp)
mov    %al,-0xca(%rbp)
jge    1354 <qlz_compress_core+0x214>
mov    -0x58(%rbp),%rcx
add    $0x1f,%rcx
xor    %eax,%eax
cmp    -0x78(%rbp),%rcx
mov    %al,-0xca(%rbp)
jae    1354 <qlz_compress_core+0x214>
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    1367 <qlz_compress_core+0x227>
jmp    14b8 <qlz_compress_core+0x378>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1f,-0x94(%rbp)
jge    1444 <qlz_compress_core+0x304>
mov    -0x58(%rbp),%rdi
movslq -0x94(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x58(%rbp),%rdi
movslq -0x94(%rbp),%rax
add    %rax,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0xec(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x8c(%rbp),%edi
call   1050 <hash_func@plt>
mov    -0xec(%rbp),%ecx
mov    %rax,%rdx
mov    -0xe8(%rbp),%rax
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
call   1050 <hash_func@plt>
mov    -0xe0(%rbp),%rcx
mov    %rax,%rdx
mov    -0xd8(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1371 <qlz_compress_core+0x231>
mov    -0x68(%rbp),%rsi
add    $0xfffffffffffffffc,%rsi
mov    $0x80000000,%edi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x1f,%edx
call   1060 <memcpy@plt>
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    1307 <qlz_compress_core+0x1c7>
jmp    14bd <qlz_compress_core+0x37d>
jmp    14c2 <qlz_compress_core+0x382>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0xf0(%rbp)
mov    -0x58(%rbp),%rdi
add    $0x1,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%ecx
mov    -0xf0(%rbp),%eax
cmp    %ecx,%eax
jne    163b <qlz_compress_core+0x4fb>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
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     156d <qlz_compress_core+0x42d>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
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    1517 <qlz_compress_core+0x3d7>
mov    -0x58(%rbp),%rax
mov    -0xa0(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x7ff,%rax
jg     15da <qlz_compress_core+0x49a>
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
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x68(%rbp)
jmp    1628 <qlz_compress_core+0x4e8>
mov    -0x8c(%rbp),%edi
and    $0xff,%edi
shl    $0x10,%edi
or     $0xf,%edi
mov    -0x68(%rbp),%rsi
mov    $0x4,%edx
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
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    192c <qlz_compress_core+0x7ec>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edi
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     18fa <qlz_compress_core+0x7ba>
mov    -0xb4(%rbp),%eax
and    $0xffffff,%eax
cmp    $0x0,%eax
jne    18fa <qlz_compress_core+0x7ba>
mov    -0x58(%rbp),%rax
mov    -0xa8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x3,%rax
jle    18fa <qlz_compress_core+0x7ba>
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     1772 <qlz_compress_core+0x632>
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
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    18f5 <qlz_compress_core+0x7b5>
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    17ec <qlz_compress_core+0x6ac>
mov    -0x58(%rbp),%rax
cmp    -0x78(%rbp),%rax
setb   %al
mov    %al,-0xf9(%rbp)
mov    -0xf9(%rbp),%al
test   $0x1,%al
jne    17ff <qlz_compress_core+0x6bf>
jmp    1810 <qlz_compress_core+0x6d0>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    17ab <qlz_compress_core+0x66b>
mov    -0x58(%rbp),%rax
mov    -0xc8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0xb0(%rbp)
cmpl   $0xf,-0xb0(%rbp)
jae    1861 <qlz_compress_core+0x721>
mov    -0xb0(%rbp),%edi
mov    -0xac(%rbp),%eax
shl    $0x4,%eax
or     %eax,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x68(%rbp)
jmp    18f0 <qlz_compress_core+0x7b0>
cmpl   $0xff,-0xb0(%rbp)
jae    18a8 <qlz_compress_core+0x768>
mov    -0xac(%rbp),%edi
shl    $0x4,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
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    18eb <qlz_compress_core+0x7ab>
mov    -0xac(%rbp),%edi
shl    $0x4,%edi
mov    -0x68(%rbp),%rsi
mov    $0x2,%edx
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
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x68(%rbp)
jmp    18f0 <qlz_compress_core+0x7b0>
jmp    18f5 <qlz_compress_core+0x7b5>
jmp    1927 <qlz_compress_core+0x7e7>
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    192c <qlz_compress_core+0x7ec>
jmp    124e <qlz_compress_core+0x10e>
jmp    1936 <qlz_compress_core+0x7f6>
mov    -0x58(%rbp),%rax
cmp    -0x50(%rbp),%rax
ja     1a78 <qlz_compress_core+0x938>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1988 <qlz_compress_core+0x848>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
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    1a46 <qlz_compress_core+0x906>
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    $0x3,%rcx
cmp    %rcx,%rax
jbe    1a46 <qlz_compress_core+0x906>
mov    -0x58(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1050 <hash_func@plt>
mov    -0x120(%rbp),%rcx
mov    %rax,%rdx
mov    -0x118(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,0x8(%rax)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0x10c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1050 <hash_func@plt>
mov    -0x10c(%rbp),%ecx
mov    %rax,%rdx
mov    -0x108(%rbp),%rax
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    1936 <qlz_compress_core+0x7f6>
jmp    1a7d <qlz_compress_core+0x93d>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
je     1a9a <qlz_compress_core+0x95a>
mov    -0x6c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1a7d <qlz_compress_core+0x93d>
mov    -0x6c(%rbp),%edi
shr    $0x1,%edi
or     $0x80000000,%edi
mov    -0x60(%rbp),%rsi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    -0x68(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x9,%rax
jge    1ad5 <qlz_compress_core+0x995>
movl   $0x9,-0x4(%rbp)
jmp    1ae3 <qlz_compress_core+0x9a3>
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    %rdi,%r10
mov    %edx,%edx
lea    0x4(%rsi),%r14
lea    (%rdi,%rdx,1),%r12
add    $0xfffffffffffffff7,%r12
cmp    %rdi,%r12
mov    %rsi,0x50(%rsp)
mov    %rdx,0x58(%rsp)
mov    %r14,0x40(%rsp)
jbe    11b2 <qlz_compress_core+0x72>
lea    -0xa(%rdx),%rcx
cmp    $0x3,%rcx
mov    $0x3,%eax
cmovb  %rcx,%rax
lea    0x1(%rax),%r9
mov    (%r10),%cl
mov    %cl,0x4(%rsi)
test   %rax,%rax
je     11bd <qlz_compress_core+0x7d>
mov    0x1(%r10),%cl
mov    %cl,0x5(%rsi)
cmp    $0x1,%rax
jne    11c9 <qlz_compress_core+0x89>
lea    0x6(%rsi),%r14
mov    $0x20000000,%r15d
jmp    11f3 <qlz_compress_core+0xb3>
mov    $0x80000000,%r15d
xor    %r9d,%r9d
jmp    11f3 <qlz_compress_core+0xb3>
lea    0x5(%rsi),%r14
mov    $0x40000000,%r15d
jmp    11f3 <qlz_compress_core+0xb3>
mov    0x2(%r10),%cl
mov    %cl,0x6(%rsi)
cmp    $0x2,%rax
jne    11e2 <qlz_compress_core+0xa2>
lea    0x7(%rsi),%r14
mov    $0x10000000,%r15d
jmp    11f3 <qlz_compress_core+0xb3>
mov    0x3(%r10),%al
mov    %al,0x7(%rsi)
lea    0x8(%rsi),%r14
mov    $0x8000000,%r15d
lea    (%r10,%r9,1),%rbp
cmp    %r12,%rbp
mov    %r10,0x10(%rsp)
jae    1713 <qlz_compress_core+0x5d3>
mov    0x50(%rsp),%r8
mov    0x58(%rsp),%rcx
add    %r8,%rcx
mov    %rcx,0x60(%rsp)
lea    -0x4(%r12),%rcx
mov    %rcx,0x48(%rsp)
lea    0x3a2(%r10),%rcx
mov    %rcx,0x80(%rsp)
lea    0x3(%r10),%rcx
mov    %rcx,0x68(%rsp)
mov    %r10,0x38(%rsp)
mov    %r12,0x28(%rsp)
jmp    1289 <qlz_compress_core+0x149>
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14),%al
mov    0x18(%rsp),%rbx
mov    %al,(%rbx)
mov    0x20(%rsp),%r9
add    $0x1,%r9
add    $0x1,%rbx
shr    %r15d
mov    0x10(%rsp),%r10
mov    0x28(%rsp),%r12
mov    0x8(%rsp),%r8
lea    (%r10,%r9,1),%rbp
mov    %rbx,%r14
cmp    %r12,%rbp
jae    171b <qlz_compress_core+0x5db>
test   $0x1,%r15b
jne    1360 <qlz_compress_core+0x220>
mov    %r14,%rdi
mov    %rdi,0x18(%rsp)
mov    %r8,0x8(%rsp)
mov    %r10,%rbp
lea    (%r10,%r9,1),%r14
mov    %r14,%rdi
mov    $0x4,%esi
mov    %r9,%rbx
call   1030 <fast_read@plt>
mov    %eax,0x34(%rsp)
mov    %rbx,0x20(%rsp)
lea    (%rbx,%rbp,1),%rdi
add    $0x1,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%r12d
cmp    %ebp,0x34(%rsp)
jne    1510 <qlz_compress_core+0x3d0>
mov    $0x4,%ecx
mov    $0x40,%edx
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rbp
mov    %edx,%ebx
lea    (%r14,%rcx,1),%rdi
cmp    0x48(%rsp),%rdi
ja     1326 <qlz_compress_core+0x1e6>
mov    $0x4,%esi
call   1030 <fast_read@plt>
lea    0x4(%rbp),%rcx
lea    0x40(%rbx),%edx
cmp    %eax,%r12d
je     1300 <qlz_compress_core+0x1c0>
movzbl %r12b,%edi
shl    $0x10,%edi
cmp    $0x7ff,%rbp
jg     15a0 <qlz_compress_core+0x460>
or     %ebx,%edi
or     $0xf,%edi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    $0x3,%eax
jmp    15ca <qlz_compress_core+0x48a>
nopl   0x0(%rax,%rax,1)
cmp    0x60(%rsp),%r14
ja     1896 <qlz_compress_core+0x756>
mov    %r10,%r12
mov    %r9,%rbx
shr    %r15d
or     $0x80000000,%r15d
mov    %r15d,%edi
mov    %r8,%rsi
mov    $0x4,%edx
call   1040 <fast_write@plt>
lea    0x4(%r14),%rax
mov    %rax,%rdi
mov    0x40(%rsp),%rsi
sub    %rsi,%rax
sub    0x38(%rsp),%rbp
cmp    %rbp,%rax
jle    15f3 <qlz_compress_core+0x4b3>
mov    %rbx,%rbp
cmp    $0x3e9,%rbx
jl     1607 <qlz_compress_core+0x4c7>
mov    %r12,%r10
lea    (%r12,%rbp,1),%rax
add    $0x1f,%rax
cmp    0x28(%rsp),%rax
jae    161b <qlz_compress_core+0x4db>
mov    0x80(%rsp),%rcx
add    %rbp,%rcx
mov    %rcx,0x70(%rsp)
lea    0x41a(%r14),%rcx
mov    %rcx,0x78(%rsp)
lea    0x1f(%rbp),%rcx
lea    (%r10,%rbp,1),%r12
xor    %edx,%edx
mov    0x38(%rsp),%rbx
mov    %r14,%r8
nopl   0x0(%rax)
mov    %rax,0x38(%rsp)
lea    0x23(%rdi),%rax
cmp    0x60(%rsp),%rax
jae    1686 <qlz_compress_core+0x546>
mov    %edx,0x34(%rsp)
mov    %rcx,0x20(%rsp)
mov    %rdi,0x18(%rsp)
mov    %rax,0x40(%rsp)
add    %r10,%rbp
mov    %rbp,0x8(%rsp)
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r12,%r14,1),%rbp
mov    %rbp,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1050 <hash_func@plt>
shl    $0x4,%rax
mov    %r15d,0x0(%r13,%rax,1)
mov    %ebx,%edi
call   1050 <hash_func@plt>
shl    $0x4,%rax
mov    %rbp,0x8(%r13,%rax,1)
add    $0x1,%r14
cmp    $0x1f,%r14
jne    1440 <qlz_compress_core+0x300>
mov    0x18(%rsp),%rbx
lea    -0x4(%rbx),%rsi
mov    $0x80000000,%r15d
mov    $0x80000000,%edi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
mov    $0x1f,%edx
call   1060 <memcpy@plt>
mov    0x34(%rsp),%edx
add    $0x1,%edx
cmp    $0x1e,%edx
je     169e <qlz_compress_core+0x55e>
mov    %rbx,%r8
add    $0x1f,%r8
mov    0x20(%rsp),%r9
lea    0x1f(%r9),%rcx
mov    0x10(%rsp),%r10
lea    (%r10,%r9,1),%rax
add    $0x1f,%rax
add    $0x1f,%r12
mov    0x38(%rsp),%rbx
mov    0x40(%rsp),%rdi
mov    %rdi,%rsi
mov    %r9,%rbp
cmp    0x28(%rsp),%rax
jb     1400 <qlz_compress_core+0x2c0>
jmp    1296 <qlz_compress_core+0x156>
xchg   %ax,%ax
mov    %r12d,%edi
call   1050 <hash_func@plt>
mov    %eax,%esi
shl    $0x4,%rsi
mov    0x0(%r13,%rsi,1),%edx
xor    %r12d,%edx
mov    %r12d,0x0(%r13,%rsi,1)
mov    0x8(%r13,%rsi,1),%rcx
mov    %r14,0x8(%r13,%rsi,1)
test   %rcx,%rcx
je     1250 <qlz_compress_core+0x110>
mov    %edx,%esi
and    $0xffffff,%esi
jne    1250 <qlz_compress_core+0x110>
mov    %r14,%rsi
sub    %rcx,%rsi
cmp    $0x4,%rsi
jl     1250 <qlz_compress_core+0x110>
test   %edx,%edx
je     162c <qlz_compress_core+0x4ec>
shl    $0x4,%eax
or     $0x3,%eax
mov    %eax,%edi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <fast_write@plt>
mov    0x20(%rsp),%r9
add    $0x3,%r9
mov    $0x2,%eax
mov    0x10(%rsp),%r10
mov    0x28(%rsp),%r12
mov    0x8(%rsp),%r8
jmp    15e1 <qlz_compress_core+0x4a1>
nopl   (%rax)
or     $0xf,%edi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x4,%edx
call   1040 <fast_write@plt>
lea    0x3(%rbx),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    $0x7,%eax
mov    0x10(%rsp),%r10
mov    0x28(%rsp),%r12
mov    0x8(%rsp),%r8
mov    0x20(%rsp),%r9
add    %rbp,%r9
add    %rax,%rbx
shr    %r15d
or     $0x80000000,%r15d
jmp    1279 <qlz_compress_core+0x139>
mov    $0x80000000,%r15d
mov    %r14,%r8
mov    %rbx,%r9
mov    %r12,%r10
jmp    1296 <qlz_compress_core+0x156>
mov    $0x80000000,%r15d
mov    %r14,%r8
mov    %rbp,%r9
mov    %r12,%r10
jmp    1296 <qlz_compress_core+0x156>
mov    $0x80000000,%r15d
mov    %r14,%r8
mov    %rbp,%r9
jmp    1296 <qlz_compress_core+0x156>
mov    $0x2,%ebp
mov    0x28(%rsp),%r12
mov    0x68(%rsp),%rsi
mov    0x20(%rsp),%rdi
movzbl 0x1(%rcx,%rbp,1),%edx
lea    0x1(%rdi),%r14
add    $0x1,%rbp
cmp    (%rsi,%rdi,1),%dl
jne    165d <qlz_compress_core+0x51d>
add    %rsi,%rdi
cmp    %r12,%rdi
mov    %r14,%rdi
jb     1640 <qlz_compress_core+0x500>
add    $0x2,%r14
shl    $0x4,%eax
cmp    $0xe,%ebp
ja     16c1 <qlz_compress_core+0x581>
or     %eax,%ebp
mov    %ebp,%edi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <fast_write@plt>
mov    $0x2,%eax
jmp    1701 <qlz_compress_core+0x5c1>
mov    %rbx,0x38(%rsp)
mov    %rsi,0x40(%rsp)
mov    $0x80000000,%r15d
mov    %rbp,%r9
jmp    1296 <qlz_compress_core+0x156>
mov    0x70(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x40(%rsp),%rdi
mov    0x78(%rsp),%r8
mov    0x10(%rsp),%r10
mov    0x20(%rsp),%r9
jmp    1296 <qlz_compress_core+0x156>
mov    %eax,%edi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <fast_write@plt>
cmp    $0xfe,%ebp
ja     16e8 <qlz_compress_core+0x5a8>
mov    %bpl,0x2(%rbx)
mov    $0x3,%eax
jmp    1701 <qlz_compress_core+0x5c1>
movb   $0x0,0x2(%rbx)
lea    0x3(%rbx),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1040 <fast_write@plt>
mov    $0x7,%eax
mov    0x8(%rsp),%r8
mov    %r14,%r9
mov    0x10(%rsp),%r10
jmp    15e1 <qlz_compress_core+0x4a1>
mov    %r14,%rbx
mov    0x50(%rsp),%r8
mov    0x58(%rsp),%rax
lea    (%r10,%rax,1),%rcx
add    $0xffffffffffffffff,%rcx
lea    (%r10,%r9,1),%rax
cmp    %rcx,%rax
jbe    1785 <qlz_compress_core+0x645>
mov    %rbx,%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%eax
shr    %r15d
test   $0x1,%al
je     1740 <qlz_compress_core+0x600>
or     $0x80000000,%r15d
mov    %r15d,%edi
mov    %r8,%rsi
mov    $0x4,%edx
call   1040 <fast_write@plt>
sub    0x50(%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(%rcx),%rax
mov    %rax,0x18(%rsp)
mov    %rcx,0x48(%rsp)
jmp    17c8 <qlz_compress_core+0x688>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%r10,%r9,1),%eax
mov    %al,(%r12)
add    $0x1,%r12
shr    %r15d
lea    (%r10,%r9,1),%rax
add    $0x1,%rax
add    $0x1,%r9
mov    %r12,%rbx
cmp    %rcx,%rax
ja     1740 <qlz_compress_core+0x600>
test   $0x1,%r15b
jne    17e0 <qlz_compress_core+0x6a0>
mov    %rbx,%r12
cmp    $0x4,%r9
jge    181e <qlz_compress_core+0x6de>
jmp    17a0 <qlz_compress_core+0x660>
nopl   0x0(%rax)
shr    %r15d
or     $0x80000000,%r15d
mov    %r15d,%edi
mov    %r8,%rsi
mov    $0x4,%edx
mov    %r9,%r14
mov    %r10,%rbp
call   1040 <fast_write@plt>
mov    0x48(%rsp),%rcx
mov    %rbp,%r10
mov    %r14,%r9
lea    0x4(%rbx),%r12
mov    $0x80000000,%r15d
mov    %rbx,%r8
cmp    $0x4,%r9
jl     17a0 <qlz_compress_core+0x660>
lea    (%r10,%r9,1),%rbp
cmp    0x18(%rsp),%rbp
jae    17a0 <qlz_compress_core+0x660>
mov    %rbp,%rdi
mov    $0x4,%esi
mov    %r8,0x8(%rsp)
mov    %r9,%rbx
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1050 <hash_func@plt>
shl    $0x4,%rax
mov    %rbp,0x8(%r13,%rax,1)
mov    %rbp,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1050 <hash_func@plt>
mov    0x48(%rsp),%rcx
mov    %rbx,%r9
mov    0x8(%rsp),%r8
shl    $0x4,%rax
mov    %r14d,0x0(%r13,%rax,1)
mov    0x10(%rsp),%r10
jmp    17a0 <qlz_compress_core+0x660>
xor    %eax,%eax
jmp    1773 <qlz_compress_core+0x633>

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 %187
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 %508
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 @fast_write(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 %186
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 %186
115: ; preds = %110
store i32 0, i32* %25
br label %116
116: ; preds = %182, %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 %185
134: ; preds = %132
store i32 0, i32* %26
br label %135
135: ; preds = %164, %134
%136 = load i32, i32* %26
%137 = icmp slt i32 %136, 31
br i1 %137, label %138, label %167
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 @fast_read(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 @fast_read(i8* %147, i32 4)
%149 = load [2 x i8*]*, [2 x i8*]** %11
%150 = load i32, i32* %24
%151 = call i64 @hash_func(i32 %150)
%152 = getelementptr inbounds [2 x i8*], [2 x i8*]* %149, i64 %151
%153 = getelementptr inbounds [2 x i8*], [2 x i8*]* %152, i64 0, i64 0
%154 = bitcast i8** %153 to i32*
store i32 %148, i32* %154
%155 = load i8*, i8** %17
%156 = load i32, i32* %26
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i8, i8* %155, i64 %157
%159 = load [2 x i8*]*, [2 x i8*]** %11
%160 = load i32, i32* %24
%161 = call i64 @hash_func(i32 %160)
%162 = getelementptr inbounds [2 x i8*], [2 x i8*]* %159, i64 %161
%163 = getelementptr inbounds [2 x i8*], [2 x i8*]* %162, i64 0, i64 1
store i8* %158, i8** %163
br label %164
164: ; preds = %138
%165 = load i32, i32* %26
%166 = add nsw i32 %165, 1
store i32 %166, i32* %26
br label %135
167: ; preds = %135
%168 = load i8*, i8** %19
%169 = getelementptr inbounds i8, i8* %168, i64 -4
%170 = call i32 @fast_write(i32 -2147483648, i8* %169, i32 4)
%171 = load i8*, i8** %19
%172 = load i8*, i8** %17
%173 = call i32 @memcpy(i8* %171, i8* %172, i32 31)
%174 = load i8*, i8** %19
%175 = getelementptr inbounds i8, i8* %174, i64 35
store i8* %175, i8** %19
%176 = load i8*, i8** %17
%177 = getelementptr inbounds i8, i8* %176, i64 31
store i8* %177, i8** %17
%178 = load i8*, i8** %17
store i8* %178, i8** %23
%179 = load i8*, i8** %19
store i8* %179, i8** %22
%180 = load i8*, i8** %19
%181 = getelementptr inbounds i8, i8* %180, i64 -4
store i8* %181, i8** %18
br label %182
182: ; preds = %167
%183 = load i32, i32* %25
%184 = add nsw i32 %183, 1
store i32 %184, i32* %25
br label %116
185: ; preds = %132
br label %186
186: ; preds = %185, %110, %90
br label %187
187: ; preds = %186, %78
%188 = load i8*, i8** %17
%189 = call i32 @fast_read(i8* %188, i32 4)
%190 = load i8*, i8** %17
%191 = getelementptr inbounds i8, i8* %190, i64 1
%192 = call i32 @fast_read(i8* %191, i32 4)
%193 = icmp eq i32 %189, %192
br i1 %193, label %194, label %259
194: ; preds = %187
%195 = load i8*, i8** %17
%196 = call i32 @fast_read(i8* %195, i32 4)
store i32 %196, i32* %24
%197 = load i8*, i8** %17
store i8* %197, i8** %27
br label %198
198: ; preds = %211, %194
%199 = load i8*, i8** %17
%200 = getelementptr inbounds i8, i8* %199, i64 4
store i8* %200, i8** %17
br label %201
201: ; preds = %198
%202 = load i8*, i8** %17
%203 = load i8*, i8** %21
%204 = getelementptr inbounds i8, i8* %203, i64 -4
%205 = icmp ule i8* %202, %204
br i1 %205, label %206, label %211
206: ; preds = %201
%207 = load i32, i32* %24
%208 = load i8*, i8** %17
%209 = call i32 @fast_read(i8* %208, i32 4)
%210 = icmp eq i32 %207, %209
br label %211
211: ; preds = %206, %201
%212 = phi i1 [ false, %201 ], [ %210, %206 ]
br i1 %212, label %198, label %213
213: ; preds = %211
%214 = load i8*, i8** %17
%215 = load i8*, i8** %27
%216 = ptrtoint i8* %214 to i64
%217 = ptrtoint i8* %215 to i64
%218 = sub i64 %216, %217
%219 = icmp sle i64 %218, 2047
br i1 %219, label %220, label %237
220: ; preds = %213
%221 = load i32, i32* %24
%222 = and i32 %221, 255
%223 = shl i32 %222, 16
%224 = load i8*, i8** %17
%225 = load i8*, i8** %27
%226 = ptrtoint i8* %224 to i64
%227 = ptrtoint i8* %225 to i64
%228 = sub i64 %226, %227
%229 = shl i64 %228, 4
%230 = trunc i64 %229 to i32
%231 = or i32 %223, %230
%232 = or i32 %231, 15
%233 = load i8*, i8** %19
%234 = call i32 @fast_write(i32 %232, i8* %233, i32 4)
%235 = load i8*, i8** %19
%236 = getelementptr inbounds i8, i8* %235, i64 3
store i8* %236, i8** %19
br label %255
237: ; preds = %213
%238 = load i32, i32* %24
%239 = and i32 %238, 255
%240 = shl i32 %239, 16
%241 = or i32 %240, 15
%242 = load i8*, i8** %19
%243 = call i32 @fast_write(i32 %241, i8* %242, i32 4)
%244 = load i8*, i8** %17
%245 = load i8*, i8** %27
%246 = ptrtoint i8* %244 to i64
%247 = ptrtoint i8* %245 to i64
%248 = sub i64 %246, %247
%249 = trunc i64 %248 to i32
%250 = load i8*, i8** %19
%251 = getelementptr inbounds i8, i8* %250, i64 3
%252 = call i32 @fast_write(i32 %249, i8* %251, i32 4)
%253 = load i8*, i8** %19
%254 = getelementptr inbounds i8, i8* %253, i64 7
store i8* %254, i8** %19
br label %255
255: ; preds = %237, %220
%256 = load i32, i32* %20
%257 = lshr i32 %256, 1
%258 = or i32 %257, -2147483648
store i32 %258, i32* %20
br label %424
259: ; preds = %187
%260 = load i8*, i8** %17
%261 = call i32 @fast_read(i8* %260, i32 4)
store i32 %261, i32* %24
%262 = load i32, i32* %24
%263 = call i64 @hash_func(i32 %262)
%264 = trunc i64 %263 to i32
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 = %259
%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 @fast_write(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 @fast_write(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 @fast_write(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 @fast_write(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 @fast_write(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, %259
%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, %255
br label %74
425: ; preds = %74
br label %426
426: ; preds = %470, %425
%427 = load i8*, i8** %17
%428 = load i8*, i8** %16
%429 = icmp ule i8* %427, %428
br i1 %429, label %430, label %480
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 @fast_write(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 %470
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 %470
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 @fast_read(i8* %456, i32 4)
%458 = call i64 @hash_func(i32 %457)
%459 = getelementptr inbounds [2 x i8*], [2 x i8*]* %455, i64 %458
%460 = getelementptr inbounds [2 x i8*], [2 x i8*]* %459, i64 0, i64 1
store i8* %454, i8** %460
%461 = load i8*, i8** %17
%462 = call i32 @fast_read(i8* %461, i32 4)
%463 = load [2 x i8*]*, [2 x i8*]** %11
%464 = load i8*, i8** %17
%465 = call i32 @fast_read(i8* %464, i32 4)
%466 = call i64 @hash_func(i32 %465)
%467 = getelementptr inbounds [2 x i8*], [2 x i8*]* %463, i64 %466
%468 = getelementptr inbounds [2 x i8*], [2 x i8*]* %467, i64 0, i64 0
%469 = bitcast i8** %468 to i32*
store i32 %462, i32* %469
br label %470
470: ; preds = %453, %448, %443
%471 = load i8*, i8** %17
%472 = load i8, i8* %471
%473 = load i8*, i8** %19
store i8 %472, i8* %473
%474 = load i8*, i8** %17
%475 = getelementptr inbounds i8, i8* %474, i32 1
store i8* %475, i8** %17
%476 = load i8*, i8** %19
%477 = getelementptr inbounds i8, i8* %476, i32 1
store i8* %477, i8** %19
%478 = load i32, i32* %20
%479 = lshr i32 %478, 1
store i32 %479, i32* %20
br label %426
480: ; preds = %426
br label %481
481: ; preds = %485, %480
%482 = load i32, i32* %20
%483 = and i32 %482, 1
%484 = icmp ne i32 %483, 1
br i1 %484, label %485, label %488
485: ; preds = %481
%486 = load i32, i32* %20
%487 = lshr i32 %486, 1
store i32 %487, i32* %20
br label %481
488: ; preds = %481
%489 = load i32, i32* %20
%490 = lshr i32 %489, 1
%491 = or i32 %490, -2147483648
%492 = load i8*, i8** %18
%493 = call i32 @fast_write(i32 %491, i8* %492, i32 4)
%494 = load i8*, i8** %19
%495 = load i8*, i8** %15
%496 = ptrtoint i8* %494 to i64
%497 = ptrtoint i8* %495 to i64
%498 = sub i64 %496, %497
%499 = icmp slt i64 %498, 9
br i1 %499, label %500, label %501
500: ; preds = %488
store i32 9, i32* %7
br label %508
501: ; preds = %488
%502 = load i8*, i8** %19
%503 = load i8*, i8** %15
%504 = ptrtoint i8* %502 to i64
%505 = ptrtoint i8* %503 to i64
%506 = sub i64 %504, %505
%507 = trunc i64 %506 to i32
store i32 %507, i32* %7
br label %508
508: ; preds = %501, %500, %89
%509 = load i32, i32* %7
ret i32 %509
}

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