// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %ecx
bswapl %ecx
xorl %eax, %eax
cmpl $0x57bc0000, %ecx       # imm = 0x57BC0000
jne 0xd59a
movq %rsi, %r14
movl 0x4(%rsi), %ecx
bswapl %ecx
testl %ecx, %ecx
jne 0xd59a
movl %edx, %r15d
movq %rdi, %rbx
movq %r14, %rdi
callq 0xd2fc
movl %eax, %ebp
movq %r14, 0x10aea(%rip)     # 0x1de30
movl %r15d, %eax
addq %r14, %rax
movq %rax, 0x10ae5(%rip)     # 0x1de38
movl %ebp, %r15d
addq %rbx, %r15
movq %r15, 0x10ae0(%rip)     # 0x1de40
movq %rbx, 0x10ae1(%rip)     # 0x1de48
addq $0x10, %r14
movq %rbx, 0x10ade(%rip)     # 0x1de50
pushq $-0x1e
popq %r12
pushq $0x4
popq %r13
movq %rbx, %rdi
movzbl (%r14), %esi
cmpl $0x20, %esi
jb 0xd3c0
testb %sil, %sil
js 0xd42f
cmpb $0x40, %sil
jb 0xd451
shll $0x8, %esi
movzbl 0x1(%r14), %eax
addl %esi, %eax
addl $0xffffc001, %eax       # imm = 0xFFFFC001
subq %rax, %rdi
movzbl 0x2(%r14), %esi
incl %esi
callq 0xf738
addq $0x3, %r14
jmp 0xd449
cmpb $0x18, %sil
jb 0xd3f4
shll $0x10, %esi
movzbl 0x1(%r14), %eax
shll $0x8, %eax
movzbl 0x2(%r14), %ecx
orl %esi, %ecx
addl %ecx, %eax
addl $0xffe80001, %eax       # imm = 0xFFE80001
subq %rax, %rdi
movzbl 0x3(%r14), %esi
incl %esi
callq 0xf738
addq $0x4, %r14
jmp 0xd449
cmpb $0x10, %sil
jb 0xd466
shll $0x10, %esi
movzbl 0x1(%r14), %eax
shll $0x8, %eax
movzbl 0x2(%r14), %ecx
orl %esi, %ecx
addl %ecx, %eax
addl $0xfff00001, %eax       # imm = 0xFFF00001
subq %rax, %rdi
movzwl 0x3(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0xf738
addq $0x5, %r14
jmp 0xd449
movzbl 0x1(%r14), %eax
notq %rax
addq %rdi, %rax
addl $-0x7f, %esi
movq %rax, %rdi
callq 0xf738
addq $0x2, %r14
movq %r14, %rax
jmp 0xd4e5
leaq 0x1(%r14), %rdi
addl $-0x1f, %esi
callq 0xf7a6
movzbl (%r14), %ecx
movq %r12, %rax
jmp 0xd4d6
cmpb $0x8, %sil
jb 0xd499
leaq 0x2(%r14), %rdi
shll $0x8, %esi
movzbl 0x1(%r14), %eax
addl %eax, %esi
addl $0xfffff801, %esi       # imm = 0xFFFFF801
callq 0xf7a6
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movq $-0x7fd, %rax           # imm = 0xF803
jmp 0xd4d6
cmpl $0x4, %esi
je 0xd528
cmpl $0x6, %esi
je 0xd4fd
cmpl $0x7, %esi
jne 0xd568
leaq 0x3(%r14), %rdi
movzwl 0x1(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0xf7a6
movzwl 0x1(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movq %r13, %rax
addq %r14, %rax
addq %rcx, %rax
cmpq %r14, %rax
je 0xd565
movq 0x10964(%rip), %rdi     # 0x1de50
movq %rax, %r14
cmpq %r15, %rdi
jbe 0xd37d
jmp 0xd5a9
movzbl 0x1(%r14), %eax
shll $0x10, %eax
movzbl 0x2(%r14), %ecx
shll $0x8, %ecx
movzbl 0x3(%r14), %edx
orq %rax, %rdx
orq %rcx, %rdx
notq %rdx
addq %rdx, %rdi
movzbl 0x4(%r14), %esi
jmp 0xd422
movzbl 0x1(%r14), %eax
shll $0x10, %eax
movzbl 0x2(%r14), %ecx
shll $0x8, %ecx
movzbl 0x3(%r14), %edx
orq %rax, %rdx
orq %rcx, %rdx
notq %rdx
addq %rdx, %rdi
movzwl 0x4(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %esi
incl %esi
callq 0xf738
addq $0x6, %r14
jmp 0xd449
movb (%r14), %sil
cmpb $0x5, %sil
jne 0xd5c8
cmpb $-0x6, 0x1(%r14)
jne 0xd5c8
cmpq %r15, 0x108d4(%rip)     # 0x1de50
jne 0xd5e7
pushq $0x1
popq %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x923e
movl %eax, %ecx
movl 0x2(%r14), %edx
bswapl %edx
xorl %eax, %eax
cmpl %edx, %ecx
cmovel %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37fb(%rip), %rdi      # 0x10dab
leaq 0x2e6a(%rip), %rsi      # 0x10421
leaq 0x37b1(%rip), %rcx      # 0x10d6f
movl $0x2803, %edx           # imm = 0x2803
callq 0x2140
leaq 0x3177(%rip), %rdi      # 0x10746
leaq 0x2e4b(%rip), %rsi      # 0x10421
leaq 0x3792(%rip), %rcx      # 0x10d6f
movl $0x27ff, %edx           # imm = 0x27FF
callq 0x2140
leaq 0x3766(%rip), %rdi      # 0x10d54
leaq 0x2e2c(%rip), %rsi      # 0x10421
leaq 0x3773(%rip), %rcx      # 0x10d6f
movl $0x27f9, %edx           # imm = 0x27F9
callq 0x2140