// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %ecx
bswapl %ecx
xorl %eax, %eax
cmpl $0x57bc0000, %ecx       # imm = 0x57BC0000
jne 0xed8a
movq %rsi, %r15
movl 0x4(%rsi), %ecx
bswapl %ecx
testl %ecx, %ecx
jne 0xed8a
movq %rdi, %rbx
movl 0x8(%r15), %r14d
bswapl %r14d
movq %r15, 0x112f6(%rip)     # 0x1fe30
movl %edx, %eax
addq %r15, %rax
movq %rax, 0x112f2(%rip)     # 0x1fe38
leaq (%rdi,%r14), %r12
movq %r12, 0x112ef(%rip)     # 0x1fe40
movq %rdi, 0x112f0(%rip)     # 0x1fe48
addq $0x10, %r15
movq %rdi, 0x112ed(%rip)     # 0x1fe50
movzbl (%r15), %esi
cmpl $0x20, %esi
jb 0xeba6
testb %sil, %sil
js 0xec15
cmpb $0x40, %sil
jb 0xec37
shll $0x8, %esi
movzbl 0x1(%r15), %eax
addl %esi, %eax
addl $0xffffc001, %eax       # imm = 0xFFFFC001
subq %rax, %rdi
movzbl 0x2(%r15), %esi
incl %esi
callq 0x112da
addq $0x3, %r15
jmp 0xec2f
cmpb $0x18, %sil
jb 0xebda
shll $0x10, %esi
movzbl 0x1(%r15), %eax
shll $0x8, %eax
movzbl 0x2(%r15), %ecx
orl %esi, %ecx
addl %ecx, %eax
addl $0xffe80001, %eax       # imm = 0xFFE80001
subq %rax, %rdi
movzbl 0x3(%r15), %esi
incl %esi
callq 0x112da
addq $0x4, %r15
jmp 0xec2f
cmpb $0x10, %sil
jb 0xec50
shll $0x10, %esi
movzbl 0x1(%r15), %eax
shll $0x8, %eax
movzbl 0x2(%r15), %ecx
orl %esi, %ecx
addl %ecx, %eax
addl $0xfff00001, %eax       # imm = 0xFFF00001
subq %rax, %rdi
movzwl 0x3(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0x112da
addq $0x5, %r15
jmp 0xec2f
movzbl 0x1(%r15), %eax
notq %rax
addq %rdi, %rax
addl $-0x7f, %esi
movq %rax, %rdi
callq 0x112da
addq $0x2, %r15
movq %r15, %rax
jmp 0xecd1
leaq 0x1(%r15), %rdi
addl $-0x1f, %esi
callq 0x11345
movzbl (%r15), %ecx
movq $-0x1e, %rax
jmp 0xecc2
cmpb $0x8, %sil
jb 0xec83
leaq 0x2(%r15), %rdi
shll $0x8, %esi
movzbl 0x1(%r15), %eax
addl %eax, %esi
addl $0xfffff801, %esi       # imm = 0xFFFFF801
callq 0x11345
movzwl (%r15), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movq $-0x7fd, %rax           # imm = 0xF803
jmp 0xecc2
cmpl $0x4, %esi
je 0xed14
cmpl $0x6, %esi
je 0xece9
cmpl $0x7, %esi
jne 0xed54
leaq 0x3(%r15), %rdi
movzwl 0x1(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0x11345
movzwl 0x1(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movl $0x4, %eax
addq %r15, %rax
addq %rcx, %rax
cmpq %r15, %rax
je 0xed51
movq 0x11178(%rip), %rdi     # 0x1fe50
movq %rax, %r15
cmpq %r12, %rdi
jbe 0xeb63
jmp 0xed96
movzbl 0x1(%r15), %eax
shll $0x10, %eax
movzbl 0x2(%r15), %ecx
shll $0x8, %ecx
movzbl 0x3(%r15), %edx
orq %rax, %rdx
orq %rcx, %rdx
notq %rdx
addq %rdx, %rdi
movzbl 0x4(%r15), %esi
jmp 0xec08
movzbl 0x1(%r15), %eax
shll $0x10, %eax
movzbl 0x2(%r15), %ecx
shll $0x8, %ecx
movzbl 0x3(%r15), %edx
orq %rax, %rdx
orq %rcx, %rdx
notq %rdx
addq %rdx, %rdi
movzwl 0x4(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0x112da
addq $0x6, %r15
jmp 0xec2f
movb (%r15), %sil
cmpb $0x5, %sil
jne 0xedb5
cmpb $-0x6, 0x1(%r15)
jne 0xedb5
cmpq %r12, 0x110e8(%rip)     # 0x1fe50
jne 0xedd4
movl $0x1, %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0xa1b3
movl %eax, %ecx
movl 0x2(%r15), %edx
bswapl %edx
xorl %eax, %eax
cmpl %edx, %ecx
cmovel %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x409e(%rip), %rdi      # 0x12e3b
leaq 0x370d(%rip), %rsi      # 0x124b1
leaq 0x4054(%rip), %rcx      # 0x12dff
movl $0x2803, %edx           # imm = 0x2803
callq 0x2140
leaq 0x3a1a(%rip), %rdi      # 0x127d6
leaq 0x36ee(%rip), %rsi      # 0x124b1
leaq 0x4035(%rip), %rcx      # 0x12dff
movl $0x27ff, %edx           # imm = 0x27FF
callq 0x2140
leaq 0x4009(%rip), %rdi      # 0x12de4
leaq 0x36cf(%rip), %rsi      # 0x124b1
leaq 0x4016(%rip), %rcx      # 0x12dff
movl $0x27f9, %edx           # imm = 0x27F9
callq 0x2140