#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 */
int decode_bit(unsigned int *, unsigned int *, int *, unsigned char **,
               unsigned char *);
int decode_number(unsigned char *, int, int *, unsigned int *, unsigned int *,
                  unsigned char **);
int decode_word(unsigned char *, int, int *, unsigned int *, unsigned int *,
                unsigned char **);
int /*<<< orphan*/ memcpy(unsigned char *, void const *, unsigned int);
int /*<<< orphan*/ memset(unsigned char *, int, int);
int decompress(unsigned char *out, unsigned char *in, unsigned int size) {
  int result;
  unsigned char tmp[0xA70];
  int offset = 0;
  int bit_flag = 0;
  int data_length = 0;
  int data_offset = 0;
  unsigned char *tmp_sect1, *tmp_sect2, *tmp_sect3;
  unsigned char *buf_start, *buf_end;
  unsigned char prev = 0;
  unsigned char *start = out;
  unsigned char *end = (out + size);
  unsigned char head = in[0];
  unsigned int range = 0xFFFFFFFF;
  unsigned int code = (in[1] << 24) | (in[2] << 16) | (in[3] << 8) | in[4];
  if (head < 0) {
    result = -1;
    if (code <= size) {
      memcpy(out, (const void *)(in + 5), code);
      result = (start - out);
    }
  } else {
    memset(tmp, 0x80, 0xA60);
    while (1) {
      tmp_sect1 = tmp + offset + 0x920;
      if (!decode_bit(&range, &code, 0, &in, tmp_sect1)) {
        if (offset > 0)
          offset--;
        if (start == end)
          return (start - out);
        int sect =
            (((((((int)(start - out)) & 7) << 8) + prev) >> head) & 7) * 0xFF -
            1;
        tmp_sect1 = tmp + sect;
        int index = 1;
        do {
          decode_bit(&range, &code, &index, &in, tmp_sect1 + index);
        } while ((index >> 8) == 0);
        *start++ = index;
      } else {
        int index = -1;
        do {
          tmp_sect1 += 8;
          bit_flag = decode_bit(&range, &code, 0, &in, tmp_sect1);
          index += bit_flag;
        } while ((bit_flag != 0) && (index < 6));
        int b_size = 0x40;
        tmp_sect2 = tmp + index + 0x7F1;
        if ((index >= 0) || (bit_flag != 0)) {
          int sect = (index << 5) |
                     (((((int)(start - out)) << index) & 3) << 3) |
                     (offset & 7);
          tmp_sect1 = tmp + 0x960 + sect;
          data_length =
              decode_number(tmp_sect1, index, &bit_flag, &range, &code, &in);
          if ((data_length != 3) && ((index > 0) || (bit_flag != 0))) {
            tmp_sect2 += 0x38;
            b_size = 0x80;
          }
        } else {
          data_length = 1;
        }
        int diff = 0;
        int shift = 1;
        do {
          diff = (shift << 4) - b_size;
          bit_flag =
              decode_bit(&range, &code, &shift, &in, tmp_sect2 + (shift << 3));
        } while (diff < 0);
        if ((diff > 0) || (bit_flag != 0)) {
          if (bit_flag == 0)
            diff -= 8;
          tmp_sect3 = tmp + 0x8A8 + diff;
          data_offset =
              decode_word(tmp_sect3, diff, &bit_flag, &range, &code, &in);
        } else {
          data_offset = 1;
        }
        buf_start = start - data_offset;
        buf_end = start + data_length + 1;
        if (buf_start < out)
          return -1;
        if (buf_end > end)
          return -1;
        offset = ((((int)(buf_end - out)) + 1) & 1) + 6;
        do {
          *start++ = *buf_start++;
        } while (start < buf_end);
      }
      prev = *(start - 1);
    }
    result = (start - out);
  }
  return result;
}


x86 assembly (clang, -O0):
<decompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb10,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0xa94(%rbp)
movl   $0x0,-0xa98(%rbp)
movl   $0x0,-0xa9c(%rbp)
movl   $0x0,-0xaa0(%rbp)
movb   $0x0,-0xac9(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0xad8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0xae0(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xae1(%rbp)
movl   $0xffffffff,-0xae8(%rbp)
ff ff ff
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x18,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xaec(%rbp)
movzbl -0xae1(%rbp),%eax
cmp    $0x0,%eax
jge    124f <decompress+0xff>
movl   $0xffffffff,-0x20(%rbp)
mov    -0xaec(%rbp),%eax
cmp    -0x1c(%rbp),%eax
ja     124a <decompress+0xfa>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x5,%rsi
mov    -0xaec(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0xad8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x20(%rbp)
jmp    174d <decompress+0x5fd>
lea    -0xa90(%rbp),%rdi
mov    $0x80,%esi
mov    $0xa60,%edx
call   1040 <memset@plt>
lea    -0xa90(%rbp),%rax
movslq -0xa94(%rbp),%rcx
add    %rcx,%rax
add    $0x920,%rax
mov    %rax,-0xaa8(%rbp)
mov    -0xaa8(%rbp),%r8
lea    -0xae8(%rbp),%rdi
lea    -0xaec(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x18(%rbp),%rcx
call   1070 <decode_bit@plt>
cmp    $0x0,%eax
jne    13b3 <decompress+0x263>
cmpl   $0x0,-0xa94(%rbp)
jle    12ca <decompress+0x17a>
mov    -0xa94(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa94(%rbp)
mov    -0xad8(%rbp),%rax
cmp    -0xae0(%rbp),%rax
jne    12f4 <decompress+0x1a4>
mov    -0xad8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    1753 <decompress+0x603>
mov    -0xad8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
and    $0x7,%eax
shl    $0x8,%eax
movzbl -0xac9(%rbp),%ecx
add    %ecx,%eax
movzbl -0xae1(%rbp),%ecx
sar    %cl,%eax
and    $0x7,%eax
imul   $0xff,%eax,%eax
sub    $0x1,%eax
mov    %eax,-0xaf0(%rbp)
lea    -0xa90(%rbp),%rax
movslq -0xaf0(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0xaa8(%rbp)
movl   $0x1,-0xaf4(%rbp)
mov    -0xaa8(%rbp),%r8
movslq -0xaf4(%rbp),%rax
add    %rax,%r8
lea    -0xae8(%rbp),%rdi
lea    -0xaec(%rbp),%rsi
lea    -0xaf4(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1070 <decode_bit@plt>
mov    -0xaf4(%rbp),%eax
sar    $0x8,%eax
cmp    $0x0,%eax
je     134e <decompress+0x1fe>
mov    -0xaf4(%rbp),%eax
mov    %al,%cl
mov    -0xad8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0xad8(%rbp)
mov    %cl,(%rax)
jmp    1738 <decompress+0x5e8>
movl   $0xffffffff,-0xaf8(%rbp)
ff ff ff
mov    -0xaa8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0xaa8(%rbp)
mov    -0xaa8(%rbp),%r8
lea    -0xae8(%rbp),%rdi
lea    -0xaec(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x18(%rbp),%rcx
call   1070 <decode_bit@plt>
mov    %eax,-0xa98(%rbp)
mov    -0xa98(%rbp),%eax
add    -0xaf8(%rbp),%eax
mov    %eax,-0xaf8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xa98(%rbp)
mov    %al,-0xb09(%rbp)
je     142e <decompress+0x2de>
cmpl   $0x6,-0xaf8(%rbp)
setl   %al
mov    %al,-0xb09(%rbp)
mov    -0xb09(%rbp),%al
test   $0x1,%al
jne    13bd <decompress+0x26d>
movl   $0x40,-0xafc(%rbp)
lea    -0xa90(%rbp),%rax
movslq -0xaf8(%rbp),%rcx
add    %rcx,%rax
add    $0x7f1,%rax
mov    %rax,-0xab0(%rbp)
cmpl   $0x0,-0xaf8(%rbp)
jge    147e <decompress+0x32e>
cmpl   $0x0,-0xa98(%rbp)
je     1551 <decompress+0x401>
mov    -0xaf8(%rbp),%eax
shl    $0x5,%eax
mov    -0xad8(%rbp),%rcx
mov    -0x10(%rbp),%rdx
sub    %rdx,%rcx
mov    %ecx,%edx
mov    -0xaf8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    -0xa94(%rbp),%ecx
and    $0x7,%ecx
or     %ecx,%eax
mov    %eax,-0xb00(%rbp)
lea    -0xa90(%rbp),%rax
add    $0x960,%rax
movslq -0xb00(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0xaa8(%rbp)
mov    -0xaa8(%rbp),%rdi
mov    -0xaf8(%rbp),%esi
lea    -0xa98(%rbp),%rdx
lea    -0xae8(%rbp),%rcx
lea    -0xaec(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1030 <decode_number@plt>
mov    %eax,-0xa9c(%rbp)
cmpl   $0x3,-0xa9c(%rbp)
je     154c <decompress+0x3fc>
cmpl   $0x0,-0xaf8(%rbp)
jg     1530 <decompress+0x3e0>
cmpl   $0x0,-0xa98(%rbp)
je     154c <decompress+0x3fc>
mov    -0xab0(%rbp),%rax
add    $0x38,%rax
mov    %rax,-0xab0(%rbp)
movl   $0x80,-0xafc(%rbp)
jmp    155b <decompress+0x40b>
movl   $0x1,-0xa9c(%rbp)
movl   $0x0,-0xb04(%rbp)
movl   $0x1,-0xb08(%rbp)
mov    -0xb08(%rbp),%eax
shl    $0x4,%eax
sub    -0xafc(%rbp),%eax
mov    %eax,-0xb04(%rbp)
mov    -0xab0(%rbp),%r8
mov    -0xb08(%rbp),%eax
shl    $0x3,%eax
cltq
add    %rax,%r8
lea    -0xae8(%rbp),%rdi
lea    -0xaec(%rbp),%rsi
lea    -0xb08(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1070 <decode_bit@plt>
mov    %eax,-0xa98(%rbp)
cmpl   $0x0,-0xb04(%rbp)
jl     156f <decompress+0x41f>
cmpl   $0x0,-0xb04(%rbp)
jg     15e4 <decompress+0x494>
cmpl   $0x0,-0xa98(%rbp)
je     1654 <decompress+0x504>
cmpl   $0x0,-0xa98(%rbp)
jne    1600 <decompress+0x4b0>
mov    -0xb04(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0xb04(%rbp)
lea    -0xa90(%rbp),%rax
add    $0x8a8,%rax
movslq -0xb04(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0xab8(%rbp)
mov    -0xab8(%rbp),%rdi
mov    -0xb04(%rbp),%esi
lea    -0xa98(%rbp),%rdx
lea    -0xae8(%rbp),%rcx
lea    -0xaec(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1060 <decode_word@plt>
mov    %eax,-0xaa0(%rbp)
jmp    165e <decompress+0x50e>
movl   $0x1,-0xaa0(%rbp)
mov    -0xad8(%rbp),%rax
movslq -0xaa0(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0xac0(%rbp)
mov    -0xad8(%rbp),%rax
movslq -0xa9c(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0xac8(%rbp)
mov    -0xac0(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    16b4 <decompress+0x564>
movl   $0xffffffff,-0x4(%rbp)
jmp    1753 <decompress+0x603>
mov    -0xac8(%rbp),%rax
cmp    -0xae0(%rbp),%rax
jbe    16d4 <decompress+0x584>
movl   $0xffffffff,-0x4(%rbp)
jmp    1753 <decompress+0x603>
mov    -0xac8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%eax
and    $0x1,%eax
add    $0x6,%eax
mov    %eax,-0xa94(%rbp)
mov    -0xac0(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xac0(%rbp)
mov    (%rax),%cl
mov    -0xad8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0xad8(%rbp)
mov    %cl,(%rax)
mov    -0xad8(%rbp),%rax
cmp    -0xac8(%rbp),%rax
jb     16f1 <decompress+0x5a1>
jmp    1738 <decompress+0x5e8>
mov    -0xad8(%rbp),%rax
mov    -0x1(%rax),%al
mov    %al,-0xac9(%rbp)
jmp    1265 <decompress+0x115>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decompress>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xab8,%rsp
mov    %rdi,%r12
mov    %rsi,0x20(%rsp)
movl   $0x0,0x10(%rsp)
mov    %edx,0x30(%rsp)
mov    %edx,%eax
add    %rdi,%rax
mov    %rax,0x38(%rsp)
movzbl (%rsi),%eax
mov    %eax,0x34(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
mov    0x1(%rsi),%eax
bswap  %eax
mov    %eax,0xc(%rsp)
lea    0x40(%rsp),%rdi
mov    $0x80,%esi
mov    $0xa60,%edx
call   1040 <memset@plt>
lea    0x8(%rsp),%rdi
lea    0x20(%rsp),%r14
xor    %ebx,%ebx
mov    %r12,%r15
xor    %r10d,%r10d
mov    %r12,0x28(%rsp)
jmp    11c8 <decompress+0x88>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    $0x7,%r10d
mov    -0x1(%r15),%bl
movslq %r10d,%r13
lea    (%rsp,%r13,1),%r8
add    $0x960,%r8
lea    0xc(%rsp),%rsi
xor    %edx,%edx
mov    %r14,%rcx
mov    %r10,%rbp
call   1060 <decode_bit@plt>
test   %eax,%eax
je     1270 <decompress+0x130>
mov    %rbp,0x18(%rsp)
lea    0x968(%rsp),%rax
add    %rax,%r13
mov    $0xffffffff,%r12d
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %r14,%rcx
mov    %r13,%r8
call   1060 <decode_bit@plt>
mov    %eax,0x10(%rsp)
add    %eax,%r12d
test   %eax,%eax
je     1238 <decompress+0xf8>
add    $0x8,%r13
cmp    $0x6,%r12d
jl     1210 <decompress+0xd0>
movslq %r12d,%rbx
lea    (%rsp,%rbx,1),%r13
add    $0x831,%r13
test   %eax,%eax
jne    1330 <decompress+0x1f0>
test   %r12d,%r12d
jns    1330 <decompress+0x1f0>
movl   $0x1,0x18(%rsp)
mov    $0xffffffc0,%ebp
jmp    13c2 <decompress+0x282>
nopl   0x0(%rax)
test   %ebp,%ebp
lea    -0x1(%rbp),%eax
mov    %eax,%ecx
mov    $0x0,%eax
cmovle %eax,%ecx
cmp    0x38(%rsp),%r15
je     15fa <decompress+0x4ba>
mov    %rcx,0x18(%rsp)
mov    %r15d,%eax
sub    %r12d,%eax
and    $0x7,%eax
shl    $0x8,%eax
movzbl %bl,%edx
or     %eax,%edx
mov    0x34(%rsp),%ecx
shr    %cl,%edx
and    $0x7,%edx
mov    %edx,%eax
shl    $0x8,%eax
sub    %edx,%eax
lea    0x40(%rsp),%rcx
lea    (%rax,%rcx,1),%rbx
add    $0xffffffffffffffff,%rbx
movl   $0x1,0x14(%rsp)
mov    $0x1,%eax
mov    %r14,%rbp
lea    0xc(%rsp),%r14
lea    0x14(%rsp),%r12
lea    0x8(%rsp),%r13
nopl   0x0(%rax)
mov    %eax,%r8d
add    %rbx,%r8
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %rbp,%rcx
call   1060 <decode_bit@plt>
mov    0x14(%rsp),%eax
cmp    $0x100,%eax
jb     12e0 <decompress+0x1a0>
mov    %al,(%r15)
add    $0x1,%r15
mov    -0x1(%r15),%bl
mov    %rbp,%r14
mov    0x28(%rsp),%r12
mov    0x18(%rsp),%r10
mov    %r13,%rdi
jmp    11c8 <decompress+0x88>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15d,%eax
sub    0x28(%rsp),%eax
mov    %r12d,%ecx
shl    %cl,%eax
mov    %r12d,%ecx
shl    $0x5,%ecx
and    $0x3,%eax
lea    (%rcx,%rax,8),%eax
mov    0x18(%rsp),%rcx
and    $0x7,%ecx
or     %eax,%ecx
movslq %ecx,%rdi
lea    0x9a0(%rsp),%rax
add    %rax,%rdi
mov    %r12d,%esi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    %r14,%r9
call   1030 <decode_number@plt>
cmp    $0x3,%eax
jne    138e <decompress+0x24e>
movl   $0x3,0x18(%rsp)
mov    $0xffffffc0,%ebp
jmp    13c2 <decompress+0x282>
lea    (%rsp,%rbx,1),%rcx
add    $0x40,%rcx
test   %r12d,%r12d
setg   %dl
cmpl   $0x0,0x10(%rsp)
setne  %bl
or     %dl,%bl
add    $0x829,%rcx
test   %bl,%bl
cmovne %rcx,%r13
not    %bl
movzbl %bl,%ebp
shl    $0x6,%ebp
or     $0xffffff80,%ebp
mov    %eax,0x18(%rsp)
lea    0x8(%rsp),%r12
movl   $0x1,0x14(%rsp)
lea    0x8(%r13),%r8
mov    %r12,%rdi
lea    0xc(%rsp),%rsi
lea    0x14(%rsp),%rbx
mov    %rbx,%rdx
lea    0x20(%rsp),%rcx
call   1060 <decode_bit@plt>
mov    %eax,0x10(%rsp)
mov    %ebp,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x14(%rsp),%eax
mov    %eax,%ebp
shl    $0x4,%ebp
shl    $0x3,%eax
movslq %eax,%r8
add    %r13,%r8
mov    %r12,%rdi
lea    0xc(%rsp),%rsi
mov    %rbx,%rdx
lea    0x20(%rsp),%rcx
call   1060 <decode_bit@plt>
add    %r14d,%ebp
mov    %eax,0x10(%rsp)
js     1400 <decompress+0x2c0>
mov    $0x1,%ecx
mov    %ebp,%edx
or     %eax,%edx
lea    0xc(%rsp),%r8
lea    0x20(%rsp),%r14
je     1470 <decompress+0x330>
lea    -0x8(%rbp),%ecx
test   %eax,%eax
cmovne %ebp,%ecx
movslq %ecx,%rsi
lea    0x8e8(%rsp),%rax
lea    (%rax,%rsi,1),%rdi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %r14,%r9
call   1050 <decode_word@plt>
mov    %eax,%ecx
movslq %ecx,%rdx
mov    %r15,%rax
sub    %rdx,%rax
mov    0x28(%rsp),%r12
cmp    %r12,%rax
jb     15f3 <decompress+0x4b3>
movslq 0x18(%rsp),%rcx
lea    (%r15,%rcx,1),%r10
add    $0x1,%r10
cmp    0x38(%rsp),%r10
ja     15f3 <decompress+0x4b3>
add    %r15,%rcx
sub    %r12d,%r10d
and    $0x1,%r10d
mov    %rcx,%rsi
sub    %r15,%rsi
mov    $0x0,%r9d
cmovae %rsi,%r9
add    $0x1,%r9
cmp    $0x20,%r9
jb     14f0 <decompress+0x3b0>
mov    %rcx,%rdi
sub    %r15,%rdi
mov    $0x0,%esi
cmovae %rdi,%rsi
mov    %rsi,%rdi
sub    %rdx,%rdi
add    %r15,%rdi
add    $0x1,%rdi
cmp    %rdi,%r15
jae    151a <decompress+0x3da>
add    %r15,%rsi
add    $0x1,%rsi
cmp    %rsi,%rax
jae    151a <decompress+0x3da>
lea    0x8(%rsp),%rdi
mov    %r15,%rdx
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ebx
add    $0x1,%rax
lea    0x1(%rdx),%r15
mov    %bl,(%rdx)
cmp    %rcx,%rdx
mov    %r15,%rdx
jb     1500 <decompress+0x3c0>
jmp    11c0 <decompress+0x80>
neg    %rdx
mov    %r9,%r8
and    $0xffffffffffffffe0,%r8
lea    -0x20(%r8),%rsi
mov    %rsi,%rbp
shr    $0x5,%rbp
add    $0x1,%rbp
mov    %ebp,%ebx
and    $0x3,%ebx
cmp    $0x60,%rsi
jae    1542 <decompress+0x402>
xor    %edi,%edi
jmp    15b0 <decompress+0x470>
and    $0xfffffffffffffffc,%rbp
lea    (%r15,%rdx,1),%rsi
add    $0x70,%rsi
xor    %edi,%edi
movups -0x70(%rsi,%rdi,1),%xmm0
movups -0x60(%rsi,%rdi,1),%xmm1
movups %xmm0,(%r15,%rdi,1)
movups %xmm1,0x10(%r15,%rdi,1)
movups -0x50(%rsi,%rdi,1),%xmm0
movups -0x40(%rsi,%rdi,1),%xmm1
movups %xmm0,0x20(%r15,%rdi,1)
movups %xmm1,0x30(%r15,%rdi,1)
movups -0x30(%rsi,%rdi,1),%xmm0
movups -0x20(%rsi,%rdi,1),%xmm1
movups %xmm0,0x40(%r15,%rdi,1)
movups %xmm1,0x50(%r15,%rdi,1)
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,0x60(%r15,%rdi,1)
movups %xmm1,0x70(%r15,%rdi,1)
sub    $0xffffffffffffff80,%rdi
add    $0xfffffffffffffffc,%rbp
jne    1550 <decompress+0x410>
test   %rbx,%rbx
je     15da <decompress+0x49a>
lea    (%r15,%rdi,1),%rsi
add    $0x10,%rsi
nopl   (%rax)
movups -0x10(%rsi,%rdx,1),%xmm0
movups (%rsi,%rdx,1),%xmm1
movups %xmm0,-0x10(%rsi)
movups %xmm1,(%rsi)
add    $0x20,%rsi
add    $0xffffffffffffffff,%rbx
jne    15c0 <decompress+0x480>
add    %r8,%r15
cmp    %r8,%r9
lea    0x8(%rsp),%rdi
je     11c0 <decompress+0x80>
add    %r8,%rax
jmp    14f5 <decompress+0x3b5>
mov    $0xffffffff,%eax
jmp    15fe <decompress+0x4be>
mov    0x30(%rsp),%eax
add    $0xab8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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