// File: Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: stb_decompress(unsigned char*, unsigned char const*, unsigned int)
static unsigned int stb_decompress(unsigned char *output, const unsigned char *i, unsigned int /*length*/)
{
    if (stb__in4(0) != 0x57bC0000) return 0;
    if (stb__in4(4) != 0)          return 0; // error! stream is > 4GB
    const unsigned int olen = stb_decompress_length(i);
    stb__barrier_in_b = i;
    stb__barrier_out_e = output + olen;
    stb__barrier_out_b = output;
    i += 16;

    stb__dout = output;
    for (;;) {
        const unsigned char *old_i = i;
        i = stb_decompress_token(i);
        if (i == old_i) {
            if (*i == 0x05 && i[1] == 0xfa) {
                IM_ASSERT(stb__dout == output + olen);
                if (stb__dout != output + olen) return 0;
                if (stb_adler32(1, output, olen) != (unsigned int) stb__in4(2))
                    return 0;
                return olen;
            } else {
                IM_ASSERT(0); /* NOTREACHED */
                return 0;
            }
        }
        IM_ASSERT(stb__dout <= output + olen);
        if (stb__dout > output + olen)
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
movq -0x18(%rbp), %rsi
movzbl 0x3(%rsi), %esi
addl %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
cmpl $0x57bc0000, %eax       # imm = 0x57BC0000
je 0x116d64
movl $0x0, -0x4(%rbp)
jmp 0x116f5f
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
shll $0x18, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x6(%rdx), %edx
shll $0x8, %edx
movq -0x18(%rbp), %rsi
movzbl 0x7(%rsi), %esi
addl %esi, %edx
addl %edx, %ecx
addl %ecx, %eax
cmpl $0x0, %eax
je 0x116da4
movl $0x0, -0x4(%rbp)
jmp 0x116f5f
movq -0x18(%rbp), %rdi
callq 0x116cd0
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x102e15(%rip)    # 0x219bd0
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, 0x102e0c(%rip)    # 0x219bd8
movq -0x10(%rbp), %rax
movq %rax, 0x102e09(%rip)    # 0x219be0
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x102dfa(%rip)    # 0x219be8
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x126530
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x116f04
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5, %eax
jne 0x116ee5
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfa, %eax
jne 0x116ee5
movq 0x102dad(%rip), %rax    # 0x219be8
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x116e4c
jmp 0x116e6b
leaq 0x74b8e(%rip), %rdi     # 0x18b9e1
leaq 0x7331c(%rip), %rsi     # 0x18a176
movl $0xec2, %edx            # imm = 0xEC2
leaq 0x74b96(%rip), %rcx     # 0x18b9fc
callq 0xd180
movq 0x102d76(%rip), %rax    # 0x219be8
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x116e8d
movl $0x0, -0x4(%rbp)
jmp 0x116f5f
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
movl $0x1, %edi
callq 0x1268c0
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x3(%rdx), %edx
shll $0x10, %edx
movq -0x18(%rbp), %rsi
movzbl 0x4(%rsi), %esi
shll $0x8, %esi
movq -0x18(%rbp), %rdi
movzbl 0x5(%rdi), %edi
addl %edi, %esi
addl %esi, %edx
addl %edx, %ecx
cmpl %ecx, %eax
je 0x116edd
movl $0x0, -0x4(%rbp)
jmp 0x116f5f
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x116f5f
leaq 0x5e21e(%rip), %rdi     # 0x17510a
leaq 0x73283(%rip), %rsi     # 0x18a176
movl $0xec8, %edx            # imm = 0xEC8
leaq 0x74afd(%rip), %rcx     # 0x18b9fc
callq 0xd180
movq 0x102cdd(%rip), %rax    # 0x219be8
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x116f1c
jmp 0x116f3b
leaq 0x74b2b(%rip), %rdi     # 0x18ba4e
leaq 0x7324c(%rip), %rsi     # 0x18a176
movl $0xecc, %edx            # imm = 0xECC
leaq 0x74ac6(%rip), %rcx     # 0x18b9fc
callq 0xd180
movq 0x102ca6(%rip), %rax    # 0x219be8
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x116f5a
movl $0x0, -0x4(%rbp)
jmp 0x116f5f
jmp 0x116dee
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)