#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);
unsigned int fast_read_safe(unsigned char const *, int, unsigned char const *);
size_t hash_func(unsigned int);
int /*<<< orphan*/ memcpy_up(unsigned char *, unsigned char const *, int);
int /*<<< orphan*/ memset(unsigned char *, unsigned char, unsigned int);
size_t qlz_decompress_core(const unsigned char *source, void *destination,
                           size_t size, size_t source_size,
                           unsigned char *first_valid,
                           const unsigned char *hashtable[]) {
  const unsigned char *source_c = (const unsigned char *)source;
  unsigned char *destination_c = (unsigned char *)destination;
  const unsigned char *src = source_c;
  unsigned char *dst = destination_c;
  const unsigned char *last_byte_successor = destination_c + size;
  unsigned int cword_val = 1;
  const unsigned int bitlut[16] = {4, 0, 1, 0, 2, 0, 1, 0,
                                   3, 0, 1, 0, 2, 0, 1, 0};
  const unsigned char *guaranteed_uncompressed = last_byte_successor - 4;
  unsigned char *last_hashed = destination_c + 3;
  first_valid = first_valid;
  last_hashed = last_hashed;
  hashtable = hashtable;
  if (dst >= guaranteed_uncompressed) {
    src += 4;
    while (dst < last_byte_successor) {
      *dst = *src;
      dst++;
      src++;
    }
    return (unsigned int)(dst - destination_c);
  }
  for (;;) {
    unsigned int fetch;
    if (cword_val == 1) {
      cword_val = fast_read_safe(src, 4, source_c + source_size) | (1U << 31);
      src += 4;
    }
    fetch = fast_read_safe(src, 4, source_c + source_size);
    if ((cword_val & 1) == 1) {
      unsigned int matchlen;
      unsigned int hash;
      const unsigned char *offset2;
      cword_val = cword_val >> 1;
      if ((fetch & 0xf) != 15) {
        hash = (fetch >> 4) & 0xfff;
        offset2 = hashtable[hash];
        if ((fetch & 0xf) != 0) {
          matchlen = (fetch & 0xf);
          src += 2;
        } else if ((fetch & 0x00ff0000) != 0) {
          matchlen = *(src + 2);
          src += 3;
        } else {
          matchlen = fast_read(src + 3, 4);
          src += 7;
        }
        memcpy_up(dst, offset2, matchlen);
        while (last_hashed < dst) {
          last_hashed++;
          hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed;
        }
        dst += matchlen;
        last_hashed = dst - 1;
      } else {
        unsigned char rle_char;
        rle_char = (unsigned char)(fetch >> 16);
        matchlen = ((fetch >> 4) & 0xfff);
        if (matchlen != 0)
          src += 3;
        else {
          matchlen = fast_read_safe(src + 3, 4, source_c + source_size);
          src += 7;
        }
        memset(dst, rle_char, matchlen);
        while (last_hashed < dst - 1) {
          last_hashed++;
          hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed;
        }
        last_hashed = dst - 1 + matchlen;
        dst += matchlen;
      }
    } else {
      memcpy_up(dst, src, 4);
      dst += bitlut[cword_val & 0xf];
      src += bitlut[cword_val & 0xf];
      cword_val = cword_val >> (bitlut[cword_val & 0xf]);
      while (last_hashed < dst - 3) {
        last_hashed++;
        hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed;
      }
      if (dst >= guaranteed_uncompressed) {
        while (dst < last_byte_successor) {
          if (cword_val == 1) {
            src += 4;
            cword_val = 1U << 31;
          }
          if (1 > destination_c + size - dst)
            return 0;
          *dst = *src;
          dst++;
          src++;
          cword_val = cword_val >> 1;
        }
        while (last_hashed < last_byte_successor - 4) {
          last_hashed++;
          hashtable[hash_func(fast_read(last_hashed, 4))] = last_hashed;
        }
        if ((src - 1) - source_c > 8)
          return 0;
        else if (dst - destination_c - size == 0)
          return size;
        else
          return 0;
      }
    }
  }
}


x86 assembly (clang, -O0):
<qlz_decompress_core>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%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    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
movl   $0x1,-0x64(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x40,%edx
call   1060 <memcpy@plt>
mov    -0x60(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0xb8(%rbp)
mov    -0x48(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0xc0(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0xb8(%rbp),%rax
jb     1274 <qlz_decompress_core+0x114>
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x60(%rbp),%rax
jae    125e <qlz_decompress_core+0xfe>
mov    -0x50(%rbp),%rax
mov    (%rax),%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1227 <qlz_decompress_core+0xc7>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%eax
mov    %rax,-0x8(%rbp)
jmp    17cf <qlz_decompress_core+0x66f>
jmp    1279 <qlz_decompress_core+0x119>
cmpl   $0x1,-0x64(%rbp)
jne    12ad <qlz_decompress_core+0x14d>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rdx
add    -0x28(%rbp),%rdx
mov    $0x4,%esi
call   1070 <fast_read_safe@plt>
or     $0x80000000,%eax
mov    %eax,-0x64(%rbp)
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rdx
add    -0x28(%rbp),%rdx
mov    $0x4,%esi
call   1070 <fast_read_safe@plt>
mov    %eax,-0xc4(%rbp)
mov    -0x64(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    157f <qlz_decompress_core+0x41f>
mov    -0x64(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0xc4(%rbp),%eax
and    $0xf,%eax
cmp    $0xf,%eax
je     1455 <qlz_decompress_core+0x2f5>
mov    -0xc4(%rbp),%eax
shr    $0x4,%eax
and    $0xfff,%eax
mov    %eax,-0xcc(%rbp)
mov    -0x38(%rbp),%rax
mov    -0xcc(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xd8(%rbp)
mov    -0xc4(%rbp),%eax
and    $0xf,%eax
cmp    $0x0,%eax
je     134e <qlz_decompress_core+0x1ee>
mov    -0xc4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x50(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x50(%rbp)
jmp    13aa <qlz_decompress_core+0x24a>
mov    -0xc4(%rbp),%eax
and    $0xff0000,%eax
cmp    $0x0,%eax
je     1381 <qlz_decompress_core+0x221>
mov    -0x50(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,-0xc8(%rbp)
mov    -0x50(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x50(%rbp)
jmp    13a5 <qlz_decompress_core+0x245>
mov    -0x50(%rbp),%rdi
add    $0x3,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,-0xc8(%rbp)
mov    -0x50(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x50(%rbp)
jmp    13aa <qlz_decompress_core+0x24a>
mov    -0x58(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    -0xc8(%rbp),%edx
call   1080 <memcpy_up@plt>
mov    -0xc0(%rbp),%rax
cmp    -0x58(%rbp),%rax
jae    142e <qlz_decompress_core+0x2ce>
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0xc0(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    -0xf0(%rbp),%rdx
mov    %rax,%rcx
mov    -0xe8(%rbp),%rax
mov    %rdx,(%rax,%rcx,8)
jmp    13c0 <qlz_decompress_core+0x260>
mov    -0xc8(%rbp),%ecx
mov    -0x58(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0xc0(%rbp)
jmp    157a <qlz_decompress_core+0x41a>
mov    -0xc4(%rbp),%eax
shr    $0x10,%eax
mov    %al,-0xd9(%rbp)
mov    -0xc4(%rbp),%eax
shr    $0x4,%eax
and    $0xfff,%eax
mov    %eax,-0xc8(%rbp)
cmpl   $0x0,-0xc8(%rbp)
je     1496 <qlz_decompress_core+0x336>
mov    -0x50(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x50(%rbp)
jmp    14c2 <qlz_decompress_core+0x362>
mov    -0x50(%rbp),%rdi
add    $0x3,%rdi
mov    -0x40(%rbp),%rdx
add    -0x28(%rbp),%rdx
mov    $0x4,%esi
call   1070 <fast_read_safe@plt>
mov    %eax,-0xc8(%rbp)
mov    -0x50(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0xd9(%rbp),%al
mov    -0xc8(%rbp),%edx
movzbl %al,%esi
call   1050 <memset@plt>
mov    -0xc0(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jae    154f <qlz_decompress_core+0x3ef>
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0xc0(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    -0x100(%rbp),%rdx
mov    %rax,%rcx
mov    -0xf8(%rbp),%rax
mov    %rdx,(%rax,%rcx,8)
jmp    14da <qlz_decompress_core+0x37a>
mov    -0x58(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    -0xc8(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc8(%rbp),%ecx
mov    -0x58(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
jmp    17ca <qlz_decompress_core+0x66a>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    $0x4,%edx
call   1080 <memcpy_up@plt>
mov    -0x64(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    -0xb0(%rbp,%rax,4),%ecx
mov    -0x58(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x64(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    -0xb0(%rbp,%rax,4),%ecx
mov    -0x50(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x64(%rbp),%ecx
and    $0xf,%ecx
mov    %ecx,%ecx
mov    -0xb0(%rbp,%rcx,4),%ecx
shr    %cl,%eax
mov    %eax,-0x64(%rbp)
mov    -0xc0(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    $0xfffffffffffffffd,%rcx
cmp    %rcx,%rax
jae    1655 <qlz_decompress_core+0x4f5>
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0xc0(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    -0x110(%rbp),%rdx
mov    %rax,%rcx
mov    -0x108(%rbp),%rax
mov    %rdx,(%rax,%rcx,8)
jmp    15e0 <qlz_decompress_core+0x480>
mov    -0x58(%rbp),%rax
cmp    -0xb8(%rbp),%rax
jb     17c5 <qlz_decompress_core+0x665>
jmp    166b <qlz_decompress_core+0x50b>
mov    -0x58(%rbp),%rax
cmp    -0x60(%rbp),%rax
jae    16f2 <qlz_decompress_core+0x592>
cmpl   $0x1,-0x64(%rbp)
jne    1696 <qlz_decompress_core+0x536>
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
movl   $0x80000000,-0x64(%rbp)
mov    -0x48(%rbp),%rcx
add    -0x20(%rbp),%rcx
mov    -0x58(%rbp),%rax
sub    %rax,%rcx
mov    $0x1,%eax
cmp    %rcx,%rax
jle    16c0 <qlz_decompress_core+0x560>
movq   $0x0,-0x8(%rbp)
jmp    17cf <qlz_decompress_core+0x66f>
mov    -0x50(%rbp),%rax
mov    (%rax),%cl
mov    -0x58(%rbp),%rax
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x64(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    166b <qlz_decompress_core+0x50b>
jmp    16f7 <qlz_decompress_core+0x597>
mov    -0xc0(%rbp),%rax
mov    -0x60(%rbp),%rcx
add    $0xfffffffffffffffc,%rcx
cmp    %rcx,%rax
jae    176c <qlz_decompress_core+0x60c>
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0xc0(%rbp),%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    -0x120(%rbp),%rdx
mov    %rax,%rcx
mov    -0x118(%rbp),%rax
mov    %rdx,(%rax,%rcx,8)
jmp    16f7 <qlz_decompress_core+0x597>
mov    -0x50(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    -0x40(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x8,%rax
jle    1792 <qlz_decompress_core+0x632>
movq   $0x0,-0x8(%rbp)
jmp    17cf <qlz_decompress_core+0x66f>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
sub    -0x20(%rbp),%rax
cmp    $0x0,%rax
jne    17b8 <qlz_decompress_core+0x658>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    17cf <qlz_decompress_core+0x66f>
movq   $0x0,-0x8(%rbp)
jmp    17cf <qlz_decompress_core+0x66f>
jmp    17ca <qlz_decompress_core+0x66a>
jmp    1279 <qlz_decompress_core+0x119>
mov    -0x8(%rbp),%rax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qlz_decompress_core>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    (%rsi,%rdx,1),%r8
lea    (%rsi,%rdx,1),%rax
add    $0xfffffffffffffffc,%rax
cmp    %rsi,%rax
jbe    1404 <qlz_decompress_core+0x2b4>
mov    %r9,%r13
mov    %rcx,%rbx
mov    %rax,0x20(%rsp)
mov    %rdx,0x28(%rsp)
mov    %r8,0x18(%rsp)
lea    0x3(%rsi),%r15
add    %rdi,%rbx
mov    $0x1,%r14d
mov    %rdi,0x30(%rsp)
mov    %rdi,%r12
mov    %rbx,0x10(%rsp)
jmp    11c8 <qlz_decompress_core+0x78>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %rbp,%r12
mov    0x8(%rsp),%rsi
cmp    0x20(%rsp),%rsi
mov    0x10(%rsp),%rbx
jae    1437 <qlz_decompress_core+0x2e7>
mov    %rsi,(%rsp)
cmp    $0x1,%r14d
jne    11f0 <qlz_decompress_core+0xa0>
mov    %r12,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1060 <fast_read_safe@plt>
mov    %eax,%r14d
or     $0x80000000,%r14d
add    $0x4,%r12
mov    %r12,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1060 <fast_read_safe@plt>
test   $0x1,%r14b
jne    1280 <qlz_decompress_core+0x130>
mov    (%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x4,%edx
call   1070 <memcpy_up@plt>
mov    %r14d,%eax
and    $0xf,%eax
lea    0xdd9(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
mov    %ebp,%ecx
shr    %cl,%r14d
lea    (%rbx,%rbp,1),%rax
mov    %rax,0x8(%rsp)
add    %rbp,%rbx
add    $0xfffffffffffffffd,%rbx
cmp    %rbx,%r15
jae    11b0 <qlz_decompress_core+0x60>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    %r15,0x0(%r13,%rax,8)
cmp    %rbx,%r15
jb     1250 <qlz_decompress_core+0x100>
jmp    11b0 <qlz_decompress_core+0x60>
nopw   0x0(%rax,%rax,1)
mov    %eax,%ebp
shr    %r14d
mov    %eax,%ebx
and    $0xf,%ebx
cmp    $0xf,%ebx
jne    12b0 <qlz_decompress_core+0x160>
mov    %ebp,%ebx
shr    $0x10,%ebx
shr    $0x4,%ebp
lea    0x3(%r12),%rdi
and    $0xfff,%ebp
je     12e8 <qlz_decompress_core+0x198>
mov    %rdi,%r12
jmp    12fd <qlz_decompress_core+0x1ad>
nopl   0x0(%rax)
mov    %ebp,%eax
shr    $0x4,%eax
and    $0xfff,%eax
mov    0x0(%r13,%rax,8),%rsi
mov    $0x2,%eax
test   %ebx,%ebx
jne    1390 <qlz_decompress_core+0x240>
test   $0xff0000,%ebp
je     1371 <qlz_decompress_core+0x221>
movzbl 0x2(%r12),%ebx
mov    $0x3,%eax
jmp    1390 <qlz_decompress_core+0x240>
mov    $0x4,%esi
mov    0x10(%rsp),%rdx
call   1060 <fast_read_safe@plt>
mov    %eax,%ebp
add    $0x7,%r12
movzbl %bl,%esi
mov    (%rsp),%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
call   1050 <memset@plt>
lea    -0x1(%rbx),%rax
mov    %rax,0x8(%rsp)
cmp    %rax,%r15
jae    1353 <qlz_decompress_core+0x203>
mov    %r15,%rbx
not    %rbx
add    (%rsp),%rbx
add    $0x1,%r15
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    %r15,0x0(%r13,%rax,8)
add    $0x1,%r15
add    $0xffffffffffffffff,%rbx
jne    1330 <qlz_decompress_core+0x1e0>
mov    %ebp,%eax
mov    0x8(%rsp),%r15
add    %rax,%r15
mov    (%rsp),%rcx
add    %rax,%rcx
mov    %rcx,%rsi
mov    0x10(%rsp),%rbx
jmp    11c8 <qlz_decompress_core+0x78>
lea    0x3(%r12),%rdi
mov    %rsi,%rbx
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %rbx,%rsi
mov    %eax,%ebx
mov    $0x7,%eax
nopl   (%rax)
mov    %rax,0x8(%rsp)
mov    (%rsp),%rbp
mov    %rbp,%rdi
mov    %ebx,%edx
call   1070 <memcpy_up@plt>
cmp    %rbp,%r15
jae    13e3 <qlz_decompress_core+0x293>
mov    (%rsp),%rbp
sub    %r15,%rbp
add    $0x1,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    %r15,0x0(%r13,%rax,8)
add    $0x1,%r15
add    $0xffffffffffffffff,%rbp
jne    13c0 <qlz_decompress_core+0x270>
add    0x8(%rsp),%r12
mov    %ebx,%eax
mov    (%rsp),%rcx
lea    (%rcx,%rax,1),%rsi
lea    (%rcx,%rax,1),%r15
add    $0xffffffffffffffff,%r15
mov    0x10(%rsp),%rbx
jmp    11c8 <qlz_decompress_core+0x78>
mov    %rsi,%rax
test   %rdx,%rdx
jle    1622 <qlz_decompress_core+0x4d2>
lea    0x1(%rsi),%rax
cmp    %rax,%r8
mov    %rax,%r10
cmova  %r8,%r10
lea    0x4(%rdi),%rcx
sub    %rsi,%r10
cmp    $0x20,%r10
jae    150c <qlz_decompress_core+0x3bc>
mov    %rsi,%rax
jmp    1610 <qlz_decompress_core+0x4c0>
mov    0x18(%rsp),%rcx
cmp    %rcx,%rsi
jae    14a5 <qlz_decompress_core+0x355>
mov    (%rsp),%rax
add    %rbp,%rax
sub    %rax,%rcx
xor    %eax,%eax
mov    $0x40000000,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
cmp    $0x1,%r14d
sete   %bl
test   %rcx,%rcx
jle    1624 <qlz_decompress_core+0x4d4>
mov    %bl,%dil
lea    (%r12,%rdi,4),%rbx
lea    0x1(%rsi),%rbp
lea    0x1(%rbx),%r12
mov    %r14d,%edi
shr    %edi
cmp    $0x1,%r14d
movzbl (%rbx),%ebx
mov    %bl,(%rsi)
cmove  %edx,%edi
add    $0xffffffffffffffff,%rcx
mov    %rbp,%rsi
mov    %edi,%r14d
cmp    0x18(%rsp),%rbp
jb     1460 <qlz_decompress_core+0x310>
jmp    14a8 <qlz_decompress_core+0x358>
mov    %rsi,%rbp
mov    0x20(%rsp),%rbx
cmp    %rbx,%r15
jae    14e2 <qlz_decompress_core+0x392>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r15
mov    %r15,%rdi
mov    $0x4,%esi
call   1030 <fast_read@plt>
mov    %eax,%edi
call   1040 <hash_func@plt>
mov    %r15,0x0(%r13,%rax,8)
cmp    %rbx,%r15
jb     14c0 <qlz_decompress_core+0x370>
mov    0x30(%rsp),%rax
not    %rax
add    %r12,%rax
cmp    $0x8,%rax
jle    14fa <qlz_decompress_core+0x3aa>
xor    %eax,%eax
jmp    1624 <qlz_decompress_core+0x4d4>
xor    %eax,%eax
cmp    %rbp,0x18(%rsp)
cmove  0x28(%rsp),%rax
jmp    1624 <qlz_decompress_core+0x4d4>
cmp    %rax,%r8
cmova  %r8,%rax
mov    %rax,%rdx
sub    %rsi,%rdx
add    %rdi,%rdx
add    $0x4,%rdx
cmp    %rsi,%rdx
jbe    1532 <qlz_decompress_core+0x3e2>
cmp    %rax,%rcx
jae    1532 <qlz_decompress_core+0x3e2>
mov    %rsi,%rax
jmp    1610 <qlz_decompress_core+0x4c0>
mov    %r10,%r9
and    $0xffffffffffffffe0,%r9
lea    -0x20(%r9),%rbp
mov    %rbp,%rax
shr    $0x5,%rax
add    $0x1,%rax
mov    %eax,%edx
and    $0x3,%edx
cmp    $0x60,%rbp
jae    1557 <qlz_decompress_core+0x407>
xor    %ebp,%ebp
jmp    15b9 <qlz_decompress_core+0x469>
and    $0xfffffffffffffffc,%rax
xor    %ebp,%ebp
nopl   (%rax)
movups 0x4(%rdi,%rbp,1),%xmm0
movups 0x14(%rdi,%rbp,1),%xmm1
movups %xmm0,(%rsi,%rbp,1)
movups %xmm1,0x10(%rsi,%rbp,1)
movups 0x24(%rdi,%rbp,1),%xmm0
movups 0x34(%rdi,%rbp,1),%xmm1
movups %xmm0,0x20(%rsi,%rbp,1)
movups %xmm1,0x30(%rsi,%rbp,1)
movups 0x44(%rdi,%rbp,1),%xmm0
movups 0x54(%rdi,%rbp,1),%xmm1
movups %xmm0,0x40(%rsi,%rbp,1)
movups %xmm1,0x50(%rsi,%rbp,1)
movups 0x64(%rdi,%rbp,1),%xmm0
movups 0x74(%rdi,%rbp,1),%xmm1
movups %xmm0,0x60(%rsi,%rbp,1)
movups %xmm1,0x70(%rsi,%rbp,1)
sub    $0xffffffffffffff80,%rbp
add    $0xfffffffffffffffc,%rax
jne    1560 <qlz_decompress_core+0x410>
test   %rdx,%rdx
je     15fc <qlz_decompress_core+0x4ac>
lea    (%rsi,%rbp,1),%rax
add    $0x10,%rax
add    %rdi,%rbp
add    $0x14,%rbp
shl    $0x5,%rdx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rbp,%rbx,1),%xmm0
movups 0x0(%rbp,%rbx,1),%xmm1
movups %xmm0,-0x10(%rax,%rbx,1)
movups %xmm1,(%rax,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%rdx
jne    15e0 <qlz_decompress_core+0x490>
lea    (%rsi,%r9,1),%rax
cmp    %r9,%r10
je     1622 <qlz_decompress_core+0x4d2>
add    %r9,%rcx
nopl   0x0(%rax,%rax,1)
movzbl (%rcx),%edx
mov    %dl,(%rax)
add    $0x1,%rax
add    $0x1,%rcx
cmp    %r8,%rax
jb     1610 <qlz_decompress_core+0x4c0>
sub    %esi,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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