// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb_decompress
stb_uint stb_decompress(stb_uchar *output, stb_uchar *i, stb_uint length)
{
   stb_uint olen;
   if (stb__in4(0) != 0x57bC0000) return 0;
   if (stb__in4(4) != 0)          return 0; // error! stream is > 4GB
   olen = stb_decompress_length(i);
   stb__barrier2 = i;
   stb__barrier3 = i+length;
   stb__barrier = output + olen;
   stb__barrier4 = output;
   i += 16;

   stb__dout = output;
   while (1) {
      stb_uchar *old_i = i;
      i = stb_decompress_token(i);
      if (i == old_i) {
         if (*i == 0x05 && i[1] == 0xfa) {
            assert(stb__dout == output + olen);
            if (stb__dout != output + olen) return 0;
            if (stb_adler32(1, output, olen) != (stb_uint) stb__in4(2))
               return 0;
            return olen;
         } else {
            assert(0); /* NOTREACHED */
            return 0;
         }
      }
      assert(stb__dout <= output + olen); 
      if (stb__dout > output + olen)
         return 0;
   }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq 0x10(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
movq 0x10(%rsp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
movq 0x10(%rsp), %rsi
movzbl 0x3(%rsi), %esi
addl %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
cmpl $0x57bc0000, %eax       # imm = 0x57BC0000
je 0x197e8
movl $0x0, 0x24(%rsp)
jmp 0x19a1d
movq 0x10(%rsp), %rax
movzbl 0x4(%rax), %eax
shll $0x18, %eax
movq 0x10(%rsp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
movq 0x10(%rsp), %rdx
movzbl 0x6(%rdx), %edx
shll $0x8, %edx
movq 0x10(%rsp), %rsi
movzbl 0x7(%rsi), %esi
addl %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
cmpl $0x0, %eax
je 0x1982d
movl $0x0, 0x24(%rsp)
jmp 0x19a1d
movq 0x10(%rsp), %rdi
callq 0x19750
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x12759(%rip)     # 0x2bfa0
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x1274e(%rip)     # 0x2bfa8
movq 0x18(%rsp), %rax
movl 0x8(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x12743(%rip)     # 0x2bfb0
movq 0x18(%rsp), %rax
movq %rax, 0x1273f(%rip)     # 0x2bfb8
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x1272d(%rip)     # 0x2bfc0
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x19a30
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
jne 0x199bd
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x5, %eax
jne 0x1999e
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfa, %eax
jne 0x1999e
movq 0x126da(%rip), %rax     # 0x2bfc0
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x198f9
jmp 0x19918
leaq 0x63f5(%rip), %rdi      # 0x1fcf5
leaq 0x5a82(%rip), %rsi      # 0x1f389
movl $0x27f9, %edx           # imm = 0x27F9
leaq 0x63fd(%rip), %rcx      # 0x1fd10
callq 0x2140
movq 0x126a1(%rip), %rax     # 0x2bfc0
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x1993d
movl $0x0, 0x24(%rsp)
jmp 0x19a1d
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
movl $0x1, %edi
callq 0x10a30
movq 0x10(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x18, %ecx
movq 0x10(%rsp), %rdx
movzbl 0x3(%rdx), %edx
shll $0x10, %edx
movq 0x10(%rsp), %rsi
movzbl 0x4(%rsi), %esi
shll $0x8, %esi
movq 0x10(%rsp), %rdi
movzbl 0x5(%rdi), %edi
addl %edi, %esi
addl %esi, %edx
addl %edx, %ecx
cmpl %ecx, %eax
je 0x19994
movl $0x0, 0x24(%rsp)
jmp 0x19a1d
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x19a1d
leaq 0x5d09(%rip), %rdi      # 0x1f6ae
leaq 0x59dd(%rip), %rsi      # 0x1f389
movl $0x27ff, %edx           # imm = 0x27FF
leaq 0x6358(%rip), %rcx      # 0x1fd10
callq 0x2140
movq 0x125fc(%rip), %rax     # 0x2bfc0
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x199d7
jmp 0x199f6
leaq 0x636e(%rip), %rdi      # 0x1fd4c
leaq 0x59a4(%rip), %rsi      # 0x1f389
movl $0x2803, %edx           # imm = 0x2803
leaq 0x631f(%rip), %rcx      # 0x1fd10
callq 0x2140
movq 0x125c3(%rip), %rax     # 0x2bfc0
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x19a18
movl $0x0, 0x24(%rsp)
jmp 0x19a1d
jmp 0x19893
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)