// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_decompress
NK_INTERN unsigned int
nk_decompress(unsigned char *output, unsigned char *i, unsigned int length)
{
    unsigned int olen;
    if (nk__in4(0) != 0x57bC0000) return 0;
    if (nk__in4(4) != 0)          return 0; /* error! stream is > 4GB */
    olen = nk_decompress_length(i);
    nk__barrier2 = i;
    nk__barrier3 = i+length;
    nk__barrier = output + olen;
    nk__barrier4 = output;
    i += 16;

    nk__dout = output;
    for (;;) {
        unsigned char *old_i = i;
        i = nk_decompress_token(i);
        if (i == old_i) {
            if (*i == 0x05 && i[1] == 0xfa) {
                NK_ASSERT(nk__dout == output + olen);
                if (nk__dout != output + olen) return 0;
                if (nk_adler32(1, output, olen) != (unsigned int) nk__in4(2))
                    return 0;
                return olen;
            } else {
                NK_ASSERT(0); /* NOTREACHED */
                return 0;
            }
        }
        NK_ASSERT(nk__dout <= output + olen);
        if (nk__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 0x48838
movl $0x0, 0x24(%rsp)
jmp 0x48abc
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 0x4887d
movl $0x0, 0x24(%rsp)
jmp 0x48abc
movq 0x10(%rsp), %rdi
callq 0x487a0
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x7daf1(%rip)     # 0xc6388
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x7dae6(%rip)     # 0xc6390
movq 0x18(%rsp), %rax
movl 0x8(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x7dadb(%rip)     # 0xc6398
movq 0x18(%rsp), %rax
movq %rax, 0x7dad7(%rip)     # 0xc63a0
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x7dac5(%rip)     # 0xc63a8
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x848c0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
jne 0x48a46
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x5, %eax
jne 0x48a07
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfa, %eax
jne 0x48a07
jmp 0x48931
movq 0x7da70(%rip), %rax     # 0xc63a8
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x4897c
movq 0x7c6a0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x68a46(%rip), %rsi     # 0xb13a0
leaq 0x68a5d(%rip), %rdx     # 0xb13be
movl $0x43c2, %ecx           # imm = 0x43C2
movb $0x0, %al
callq 0x13ec0
movq 0x7c67c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x4897e
movq 0x7da23(%rip), %rax     # 0xc63a8
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x489a3
movl $0x0, 0x24(%rsp)
jmp 0x48abc
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
movl $0x1, %edi
callq 0x84c50
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 0x489fa
movl $0x0, 0x24(%rsp)
jmp 0x48abc
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x48abc
jmp 0x48a09
movq 0x7c5e0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x68986(%rip), %rsi     # 0xb13a0
leaq 0x6899d(%rip), %rdx     # 0xb13be
movl $0x43c8, %ecx           # imm = 0x43C8
movb $0x0, %al
callq 0x13ec0
movq 0x7c5bc(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
movl $0x0, 0x24(%rsp)
jmp 0x48abc
jmp 0x48a48
movq 0x7d959(%rip), %rax     # 0xc63a8
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x48a93
movq 0x7c589(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x6892f(%rip), %rsi     # 0xb13a0
leaq 0x68946(%rip), %rdx     # 0xb13be
movl $0x43cc, %ecx           # imm = 0x43CC
movb $0x0, %al
callq 0x13ec0
movq 0x7c565(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x48a95
movq 0x7d90c(%rip), %rax     # 0xc63a8
movq 0x18(%rsp), %rcx
movl 0x8(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x48ab7
movl $0x0, 0x24(%rsp)
jmp 0x48abc
jmp 0x488e3
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)