LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_create_comp_flags_from_zip_params
mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy)
{
    mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0);
    if (window_bits > 0)
        comp_flags |= TDEFL_WRITE_ZLIB_HEADER;

    if (!level)
        comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS;
    else if (strategy == MZ_FILTERED)
        comp_flags |= TDEFL_FILTER_MATCHES;
    else if (strategy == MZ_HUFFMAN_ONLY)
        comp_flags &= ~TDEFL_MAX_PROBES_MASK;
    else if (strategy == MZ_FIXED)
        comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS;
    else if (strategy == MZ_RLE)
        comp_flags |= TDEFL_RLE_MATCHES;

    return comp_flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x1906a5
movl $0xa, %eax
cmpl -0x4(%rbp), %eax
jge 0x190697
movl $0xa, %eax
movl %eax, -0x14(%rbp)
jmp 0x19069d
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1906af
movl $0x6, %eax
movl %eax, -0x18(%rbp)
jmp 0x1906af
movl -0x18(%rbp), %eax
movslq %eax, %rcx
leaq 0x47fa4(%rip), %rax     # 0x1d8660
movl (%rax,%rcx,4), %eax
movl -0x4(%rbp), %esi
xorl %ecx, %ecx
movl $0x4000, %edx           # imm = 0x4000
cmpl $0x3, %esi
cmovlel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jle 0x1906e5
movl -0x10(%rbp), %eax
orl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x1906f8
movl -0x10(%rbp), %eax
orl $0x80000, %eax          # imm = 0x80000
movl %eax, -0x10(%rbp)
jmp 0x19074a
cmpl $0x1, -0xc(%rbp)
jne 0x19070b
movl -0x10(%rbp), %eax
orl $0x20000, %eax          # imm = 0x20000
movl %eax, -0x10(%rbp)
jmp 0x190748
cmpl $0x2, -0xc(%rbp)
jne 0x19071e
movl -0x10(%rbp), %eax
andl $0xfffff000, %eax       # imm = 0xFFFFF000
movl %eax, -0x10(%rbp)
jmp 0x190746
cmpl $0x4, -0xc(%rbp)
jne 0x190731
movl -0x10(%rbp), %eax
orl $0x40000, %eax          # imm = 0x40000
movl %eax, -0x10(%rbp)
jmp 0x190744
cmpl $0x3, -0xc(%rbp)
jne 0x190742
movl -0x10(%rbp), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x10(%rbp)
jmp 0x190744
jmp 0x190746
jmp 0x190748
jmp 0x19074a
movl -0x10(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_deflateEnd
int mz_deflateEnd(mz_streamp pStream)
{
    if (!pStream)
        return MZ_STREAM_ERROR;
    if (pStream->state)
    {
        pStream->zfree(pStream->opaque, pStream->state);
        pStream->state = NULL;
    }
    return MZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x190a2c
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x190a64
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x190a5d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_deflateReset
int mz_deflateReset(mz_streamp pStream)
{
    if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || (!pStream->zfree))
        return MZ_STREAM_ERROR;
    pStream->total_in = pStream->total_out = 0;
    tdefl_init((tdefl_compressor *)pStream->state, NULL, NULL, ((tdefl_compressor *)pStream->state)->m_flags);
    return MZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x190aa4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x190aa4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x190aa4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x190aad
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x190aeb
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %ecx
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x190750
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_compress2
int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
{
    int status;
    mz_stream stream;
    memset(&stream, 0, sizeof(stream));

    /* In case mz_ulong is 64-bits (argh I hate longs). */
    if ((mz_uint64)(source_len | *pDest_len) > 0xFFFFFFFFU)
        return MZ_PARAM_ERROR;

    stream.next_in = pSource;
    stream.avail_in = (mz_uint32)source_len;
    stream.next_out = pDest;
    stream.avail_out = (mz_uint32)*pDest_len;

    status = mz_deflateInit(&stream, level);
    if (status != MZ_OK)
        return status;

    status = mz_deflate(&stream, MZ_FINISH);
    if (status != MZ_STREAM_END)
    {
        mz_deflateEnd(&stream);
        return (status == MZ_OK) ? MZ_BUF_ERROR : status;
    }

    *pDest_len = stream.total_out;
    return mz_deflateEnd(&stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x19140
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
orq (%rcx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x191163
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x191214
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rax
movl %eax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x80(%rbp)
movl -0x2c(%rbp), %esi
leaq -0xa0(%rbp), %rdi
callq 0x1904c0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x1911ad
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x191214
leaq -0xa0(%rbp), %rdi
movl $0x4, %esi
callq 0x190b00
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x30(%rbp)
je 0x1911fa
leaq -0xa0(%rbp), %rdi
callq 0x190a10
cmpl $0x0, -0x30(%rbp)
jne 0x1911e6
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
movl %eax, -0xa4(%rbp)
jmp 0x1911ef
movl -0x30(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x191214
movq -0x78(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0xa0(%rbp), %rdi
callq 0x190a10
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_inflateInit2
int mz_inflateInit2(mz_streamp pStream, int window_bits)
{
    inflate_state *pDecomp;
    if (!pStream)
        return MZ_STREAM_ERROR;
    if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))
        return MZ_PARAM_ERROR;

    pStream->data_type = 0;
    pStream->adler = 0;
    pStream->msg = NULL;
    pStream->total_in = 0;
    pStream->total_out = 0;
    pStream->reserved = 0;
    if (!pStream->zalloc)
        pStream->zalloc = miniz_def_alloc_func;
    if (!pStream->zfree)
        pStream->zfree = miniz_def_free_func;

    pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
    if (!pDecomp)
        return MZ_MEM_ERROR;

    pStream->state = (struct mz_internal_state *)pDecomp;

    tinfl_init(&pDecomp->m_decomp);
    pDecomp->m_dict_ofs = 0;
    pDecomp->m_dict_avail = 0;
    pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
    pDecomp->m_first_call = 1;
    pDecomp->m_has_flushed = 0;
    pDecomp->m_window_bits = window_bits;

    return MZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1912a2
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1913d9
cmpl $0xf, -0x14(%rbp)
je 0x1912be
xorl %eax, %eax
subl -0x14(%rbp), %eax
cmpl $0xf, %eax
je 0x1912be
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x1913d9
movq -0x10(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x19131f
movq -0x10(%rbp), %rax
leaq -0xeeb(%rip), %rcx      # 0x190430
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x191339
movq -0x10(%rbp), %rax
leaq -0xed5(%rip), %rcx      # 0x190460
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movl $0x1, %esi
movl $0xa0d0, %edx           # imm = 0xA0D0
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x191369
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x1913d9
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x20b8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x20bc(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0xa0cc(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x20c0(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x20c4(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20c8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_inflateReset
int mz_inflateReset(mz_streamp pStream)
{
    inflate_state *pDecomp;
    if (!pStream)
        return MZ_STREAM_ERROR;

    pStream->data_type = 0;
    pStream->adler = 0;
    pStream->msg = NULL;
    pStream->total_in = 0;
    pStream->total_out = 0;
    pStream->reserved = 0;

    pDecomp = (inflate_state *)pStream->state;

    tinfl_init(&pDecomp->m_decomp);
    pDecomp->m_dict_ofs = 0;
    pDecomp->m_dict_avail = 0;
    pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
    pDecomp->m_first_call = 1;
    pDecomp->m_has_flushed = 0;
    /* pDecomp->m_window_bits = window_bits */;

    return MZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19142b
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1914d5
movq -0x10(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x20b8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x20bc(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0xa0cc(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x20c0(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x20c4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_uncompress2
int mz_uncompress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong *pSource_len)
{
    mz_stream stream;
    int status;
    memset(&stream, 0, sizeof(stream));

    /* In case mz_ulong is 64-bits (argh I hate longs). */
    if ((mz_uint64)(*pSource_len | *pDest_len) > 0xFFFFFFFFU)
        return MZ_PARAM_ERROR;

    stream.next_in = pSource;
    stream.avail_in = (mz_uint32)*pSource_len;
    stream.next_out = pDest;
    stream.avail_out = (mz_uint32)*pDest_len;

    status = mz_inflateInit(&stream);
    if (status != MZ_OK)
        return status;

    status = mz_inflate(&stream, MZ_FINISH);
    *pSource_len = *pSource_len - stream.avail_in;
    if (status != MZ_STREAM_END)
    {
        mz_inflateEnd(&stream);
        return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
    }
    *pDest_len = stream.total_out;

    return mz_inflateEnd(&stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x19140
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
orq (%rcx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x1948c2
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x1949a8
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x78(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x1913f0
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x194915
movl -0x9c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1949a8
leaq -0x98(%rbp), %rdi
movl $0x4, %esi
callq 0x1914e0
movl %eax, -0x9c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movl -0x90(%rbp), %eax
subq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x1, -0x9c(%rbp)
je 0x19498e
leaq -0x98(%rbp), %rdi
callq 0x194810
cmpl $-0x5, -0x9c(%rbp)
jne 0x194977
cmpl $0x0, -0x90(%rbp)
jne 0x194977
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl %eax, -0xa0(%rbp)
jmp 0x194983
movl -0x9c(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1949a8
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0x98(%rbp), %rdi
callq 0x194810
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_error
const char *mz_error(int err)
{
    static struct
    {
        int m_err;
        const char *m_pDesc;
    } s_error_descs[] =
        {
          { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" }
        };
    mz_uint i;
    for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i)
        if (s_error_descs[i].m_err == err)
            return s_error_descs[i].m_pDesc;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpq $0xa, %rax
jae 0x194a5b
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x9114d(%rip), %rax     # 0x225b70
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x194a4e
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x91133(%rip), %rax     # 0x225b70
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x194a63
jmp 0x194a50
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x194a0e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_flush_output_buffer
static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
{
    if (d->m_pIn_buf_size)
    {
        *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
    }

    if (d->m_pOut_buf_size)
    {
        size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining);
        memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
        d->m_output_flush_ofs += (mz_uint)n;
        d->m_output_flush_remaining -= (mz_uint)n;
        d->m_out_buf_ofs += n;

        *d->m_pOut_buf_size = d->m_out_buf_ofs;
    }

    return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x194ab1
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
subq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x194b9f
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
subq 0xc0(%rcx), %rax
movq -0x8(%rbp), %rcx
movl 0x74(%rcx), %ecx
cmpq %rcx, %rax
jae 0x194b07
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
subq 0xc0(%rcx), %rax
movq %rax, -0x18(%rbp)
jmp 0x194b12
movq -0x8(%rbp), %rax
movl 0x74(%rax), %eax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0xc0(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x392aa, %rsi          # imm = 0x392AA
movq -0x8(%rbp), %rax
movl 0x70(%rax), %eax
addq %rax, %rsi
movq -0x10(%rbp), %rdx
callq 0x191e0
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x70(%rax), %ecx
movl %ecx, 0x70(%rax)
movq -0x10(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movl 0x74(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x74(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0xc0(%rax), %rcx
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x78(%rcx)
movb %al, -0x19(%rbp)
je 0x194bbe
movq -0x8(%rbp), %rax
cmpl $0x0, 0x74(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_compress_mem_to_output
mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
    tdefl_compressor *pComp;
    mz_bool succeeded;
    if (((buf_len) && (!pBuf)) || (!pPut_buf_func))
        return MZ_FALSE;
    pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
    if (!pComp)
        return MZ_FALSE;
    succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
    succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
    MZ_FREE(pComp);
    return succeeded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x19732a
cmpq $0x0, -0x10(%rbp)
je 0x197331
cmpq $0x0, -0x20(%rbp)
jne 0x19733d
movl $0x0, -0x4(%rbp)
jmp 0x1973c1
movl $0x4df78, %edi          # imm = 0x4DF78
callq 0x19200
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x19735b
movl $0x0, -0x4(%rbp)
jmp 0x1973c1
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x190750
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x3c(%rbp)
movb %al, -0x3d(%rbp)
je 0x1973a7
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x4, %ecx
callq 0x197270
cmpl $0x1, %eax
sete %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x19030
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_compress_mem_to_heap
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
    tdefl_output_buffer out_buf;
    MZ_CLEAR_OBJ(out_buf);
    if (!pOut_len)
        return MZ_FALSE;
    else
        *pOut_len = 0;
    out_buf.m_expandable = MZ_TRUE;
    if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
        return NULL;
    *pOut_len = out_buf.m_size;
    return out_buf.m_pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x19140
cmpq $0x0, -0x20(%rbp)
jne 0x197408
movq $0x0, -0x8(%rbp)
jmp 0x197458
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x1, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %r8d
leaq 0x43(%rip), %rdx        # 0x197470
leaq -0x48(%rbp), %rcx
callq 0x197300
cmpl $0x0, %eax
jne 0x197445
movq $0x0, -0x8(%rbp)
jmp 0x197458
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_output_buffer_putter
static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
{
    tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
    size_t new_size = p->m_size + len;
    if (new_size > p->m_capacity)
    {
        size_t new_capacity = p->m_capacity;
        mz_uint8 *pNew_buf;
        if (!p->m_expandable)
            return MZ_FALSE;
        do
        {
            new_capacity = MZ_MAX(128U, new_capacity << 1U);
        } while (new_size > new_capacity);
        pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity);
        if (!pNew_buf)
            return MZ_FALSE;
        p->m_pBuf = pNew_buf;
        p->m_capacity = new_capacity;
    }
    memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len);
    p->m_size = new_size;
    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x197549
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1974d1
movl $0x0, -0x4(%rbp)
jmp 0x197577
jmp 0x1974d3
movq -0x38(%rbp), %rcx
shlq %rcx
movl $0x80, %eax
cmpq %rcx, %rax
jbe 0x1974ef
movl $0x80, %eax
movq %rax, -0x48(%rbp)
jmp 0x1974fa
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x1974d3
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x19240
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x197531
movl $0x0, -0x4(%rbp)
jmp 0x197577
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
addq (%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x191e0
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_compress_mem_to_mem
size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
{
    tdefl_output_buffer out_buf;
    MZ_CLEAR_OBJ(out_buf);
    if (!pOut_buf)
        return 0;
    out_buf.m_pBuf = (mz_uint8 *)pOut_buf;
    out_buf.m_capacity = out_buf_len;
    if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
        return 0;
    return out_buf.m_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x19140
cmpq $0x0, -0x10(%rbp)
jne 0x1975bd
movq $0x0, -0x8(%rbp)
jmp 0x197600
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %r8d
leaq -0x170(%rip), %rdx      # 0x197470
leaq -0x50(%rbp), %rcx
callq 0x197300
cmpl $0x0, %eax
jne 0x1975f8
movq $0x0, -0x8(%rbp)
jmp 0x197600
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_validate_code_size_table
static int tinfl_validate_code_size_table(const mz_uint8 *tbl, mz_uint32 tbl_len)
{
    mz_uint8 i;
    mz_uint8 max_cs = 0;
    mz_uint32 t_cur = 0;
    mz_uint32 t_expected;

    for (i=0; i<tbl_len; i++) {
        if (tbl[i]>max_cs) {
            max_cs = tbl[i];
        }
    }
    if (max_cs<1 || max_cs>29) return 0;

    t_expected = 1U<<max_cs;
    for (i=0; i<tbl_len; i++) {
        if (tbl[i]) {
            t_cur += 1U<<(max_cs-(mz_uint32)tbl[i]);
        }
        if (t_cur > t_expected) return 0;
    }
    if (t_cur != t_expected) return 0;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb $0x0, -0x16(%rbp)
movl $0x0, -0x1c(%rbp)
movb $0x0, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x197691
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzbl -0x16(%rbp), %ecx
cmpl %ecx, %eax
jle 0x197685
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x16(%rbp)
jmp 0x197687
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x19765a
movzbl -0x16(%rbp), %eax
cmpl $0x1, %eax
jl 0x1976a3
movzbl -0x16(%rbp), %eax
cmpl $0x1d, %eax
jle 0x1976ac
movl $0x0, -0x4(%rbp)
jmp 0x197729
movzbl -0x16(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
movb $0x0, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x197711
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x1976f4
movzbl -0x16(%rbp), %ecx
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %edx
movzbl (%rax,%rdx), %eax
subl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0x197705
movl $0x0, -0x4(%rbp)
jmp 0x197729
jmp 0x197707
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x1976be
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x197722
movl $0x0, -0x4(%rbp)
jmp 0x197729
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_clear_tree
static void tinfl_clear_tree(tinfl_decompressor *r)
{
    if (r->m_type == 0)
        MZ_CLEAR_ARR(r->m_tree_0);
    else if (r->m_type == 1)
        MZ_CLEAR_ARR(r->m_tree_1);
    else
        MZ_CLEAR_ARR(r->m_tree_2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x19775f
movq -0x8(%rbp), %rdi
addq $0x1848, %rdi           # imm = 0x1848
xorl %esi, %esi
movl $0x480, %edx            # imm = 0x480
callq 0x19140
jmp 0x19779b
movq -0x8(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x197782
movq -0x8(%rbp), %rdi
addq $0x1cc8, %rdi           # imm = 0x1CC8
xorl %esi, %esi
movl $0x80, %edx
callq 0x19140
jmp 0x197799
movq -0x8(%rbp), %rdi
addq $0x1d48, %rdi           # imm = 0x1D48
xorl %esi, %esi
movl $0x4c, %edx
callq 0x19140
jmp 0x19779b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_decompress_mem_to_mem
size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
{
    tinfl_decompressor decomp;
    tinfl_status status;
    tinfl_init(&decomp);
    status = tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf, &src_buf_len, (mz_uint8 *)pOut_buf, (mz_uint8 *)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
    return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2100, %rsp           # imm = 0x2100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x0, -0x20e0(%rbp)
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %r8
movl -0x24(%rbp), %eax
andl $-0x3, %eax
orl $0x4, %eax
leaq -0x20e0(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x10(%rbp), %r9
movl %eax, (%rsp)
callq 0x191aa0
movl %eax, -0x20e4(%rbp)
cmpl $0x0, -0x20e4(%rbp)
je 0x197a44
movq $-0x1, %rax
movq %rax, -0x20f0(%rbp)
jmp 0x197a4f
movq -0x10(%rbp), %rax
movq %rax, -0x20f0(%rbp)
movq -0x20f0(%rbp), %rax
addq $0x2100, %rsp           # imm = 0x2100
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_decompressor_alloc
tinfl_decompressor *tinfl_decompressor_alloc(void)
{
    tinfl_decompressor *pDecomp = (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor));
    if (pDecomp)
        tinfl_init(pDecomp);
    return pDecomp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20b8, %edi           # imm = 0x20B8
callq 0x19200
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x197c3b
jmp 0x197c2f
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x197c3b
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: dfilter_deflate_codec_miniz
void dfilter_deflate_codec_miniz(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct deflate_pushable_ctx *dc = NULL;
	struct de_deflate_params *deflparams = (struct de_deflate_params*)codec_private_params;

	dc = de_malloc(dfctx->c, sizeof(struct deflate_pushable_ctx));
	dc->modname = "deflate-mz";
	if(deflparams) {
		dc->flags = deflparams->flags;
	}

	dfctx->codec_private = (void*)dc;
	dfctx->codec_addbuf_fn = my_deflate_codec_addbuf;
	dfctx->codec_finish_fn = my_deflate_codec_finish;
	dfctx->codec_destroy_fn = my_deflate_codec_destroy;

	deflate_codec_init(dfctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0xa0, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x414ca(%rip), %rcx     # 0x1d917a
movq %rcx, 0x28(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x197cc7
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x32(%rip), %rcx        # 0x197d10
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
leaq 0x263(%rip), %rcx       # 0x197f50
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0x304(%rip), %rcx       # 0x198000
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
callq 0x198060
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: my_deflate_codec_finish
static void my_deflate_codec_finish(struct de_dfilter_ctx *dfctx)
{
	struct deflate_pushable_ctx *dc = (struct deflate_pushable_ctx*)dfctx->codec_private;

	if(dc->stream_open_flag) {
		if(!dfctx->dres->errcode) {
			de_dbgx(dfctx->c, 4, "inflated %u to %u bytes", (unsigned int)dc->strm.total_in,
				(unsigned int)dc->strm.total_out);
		}
		mz_inflateEnd(&dc->strm);
		dc->stream_open_flag = 0;
	}

	dfctx->dres->bytes_consumed = dc->total_nbytes_processed;
	dfctx->dres->bytes_consumed_valid = 1;
	dfctx->finished_flag = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0x197fc3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
jne 0x197fae
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl %eax, %r8d
movl $0x4, %esi
leaq 0x41518(%rip), %rdx     # 0x1d94bf
movb $0x0, %al
callq 0x15b4b0
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x194810
movq -0x10(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: my_deflate_codec_destroy
static void my_deflate_codec_destroy(struct de_dfilter_ctx *dfctx)
{
	struct deflate_pushable_ctx *dc = (struct deflate_pushable_ctx*)dfctx->codec_private;
	deark *c = dfctx->c;

	if(dc) {
		de_free(c, dc->outbuf);
		de_free(c, dc);
	}
	dfctx->codec_private = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x198048
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: deflate_codec_init
static void deflate_codec_init(struct de_dfilter_ctx *dfctx)
{
	struct deflate_pushable_ctx *dc = (struct deflate_pushable_ctx*)dfctx->codec_private;
	deark *c = dfctx->c;
	int ret;

	dfctx->dres->bytes_consumed = 0;

	dc->strm.zalloc = our_miniz_alloc_func;
	dc->strm.zfree = our_miniz_free_func;
	dc->strm.opaque = (void*)c;

	if(dc->flags&DE_DEFLATEFLAG_ISZLIB) {
		ret = mz_inflateInit(&dc->strm);
	}
	else {
		ret = mz_inflateInit2(&dc->strm, -MZ_DEFAULT_WINDOW_BITS);
	}
	if(ret!=MZ_OK) {
		de_dfilter_set_errorf(c, dfctx->dres, dc->modname, "Inflate error");
		goto done;
	}

	dc->stream_open_flag = 1;
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2592(%rip), %rcx      # 0x19a630
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
leaq 0x25b3(%rip), %rcx      # 0x19a660
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1980e0
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x1913f0
movl %eax, -0x1c(%rbp)
jmp 0x1980f5
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq 0x191280
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x19811f
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x413c1(%rip), %rcx     # 0x1d94d7
movb $0x0, %al
callq 0x177450
jmp 0x198127
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: fmtutil_tdefl_create
struct fmtutil_tdefl_ctx *fmtutil_tdefl_create(deark *c, dbuf *outf, int flags)
{
	struct fmtutil_tdefl_ctx *tdctx = NULL;

	tdctx = de_malloc(c, sizeof(struct fmtutil_tdefl_ctx));
	tdctx->c = c;
	tdefl_init(&tdctx->pComp, my_fmtutil_tdefl_output_buffer_putter, (void*)outf,
		flags);
	return tdctx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4df80, %esi          # imm = 0x4DF80
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
leaq 0x12(%rip), %rsi        # 0x1981e0
callq 0x190750
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: fmtutil_tdefl_compress_buffer
enum fmtutil_tdefl_status fmtutil_tdefl_compress_buffer(struct fmtutil_tdefl_ctx *tdctx,
	const void *pIn_buf, size_t in_buf_size, enum fmtutil_tdefl_flush flush)
{
	tdefl_status st;

	st = tdefl_compress_buffer(&tdctx->pComp, pIn_buf, in_buf_size,
		fmtutil_flush_to_tdefl(flush));
	return tdefl_status_to_fmtutil(st);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %edi
callq 0x198280
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl %eax, %ecx
callq 0x197270
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
callq 0x1982e0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: fmtutil_flush_to_tdefl
static tdefl_flush fmtutil_flush_to_tdefl(enum fmtutil_tdefl_flush n)
{
	switch(n) {
	case FMTUTIL_TDEFL_NO_FLUSH: return TDEFL_NO_FLUSH;
	case FMTUTIL_TDEFL_SYNC_FLUSH: return TDEFL_SYNC_FLUSH;
	case FMTUTIL_TDEFL_FULL_FLUSH: return TDEFL_FULL_FLUSH;
	case FMTUTIL_TDEFL_FINISH: return TDEFL_FINISH ;
	}
	return TDEFL_NO_FLUSH;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0x4, %rax
ja 0x1982cc
movq -0x10(%rbp), %rax
leaq 0x40395(%rip), %rcx     # 0x1d8634
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x1982d3
movl $0x2, -0x4(%rbp)
jmp 0x1982d3
movl $0x3, -0x4(%rbp)
jmp 0x1982d3
movl $0x4, -0x4(%rbp)
jmp 0x1982d3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-miniz.c
// Function: tdefl_status_to_fmtutil
static enum fmtutil_tdefl_status tdefl_status_to_fmtutil(tdefl_status n)
{
	switch(n) {
	case TDEFL_STATUS_BAD_PARAM: return FMTUTIL_TDEFL_STATUS_BAD_PARAM;
	case TDEFL_STATUS_PUT_BUF_FAILED: return FMTUTIL_TDEFL_STATUS_PUT_BUF_FAILED;
	case TDEFL_STATUS_OKAY: return FMTUTIL_TDEFL_STATUS_OKAY;
	case TDEFL_STATUS_DONE: return FMTUTIL_TDEFL_STATUS_DONE;
	}
	return FMTUTIL_TDEFL_STATUS_PUT_BUF_FAILED;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x2, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x3, %eax
ja 0x198330
movq -0x10(%rbp), %rax
leaq 0x40345(%rip), %rcx     # 0x1d8648
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x198337
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x198337
movl $0x0, -0x4(%rbp)
jmp 0x198337
movl $0x1, -0x4(%rbp)
jmp 0x198337
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_compress_block
static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block)
{
    if (static_block)
        tdefl_start_static_block(d);
    else
        tdefl_start_dynamic_block(d);
    return tdefl_compress_lz_codes(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1983d0
movq -0x8(%rbp), %rdi
callq 0x1983f0
jmp 0x1983d9
movq -0x8(%rbp), %rdi
callq 0x1985d0
movq -0x8(%rbp), %rdi
callq 0x199560
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_huffman_enforce_max_code_size
static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size)
{
    int i;
    mz_uint32 total = 0;
    if (code_list_len <= 1)
        return;
    for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++)
        pNum_codes[max_code_size] += pNum_codes[i];
    for (i = max_code_size; i > 0; i--)
        total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i));
    while (total != (1UL << max_code_size))
    {
        pNum_codes[max_code_size]--;
        for (i = max_code_size - 1; i > 0; i--)
            if (pNum_codes[i])
            {
                pNum_codes[i]--;
                pNum_codes[i + 1] += 2;
                break;
            }
        total--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x1, -0xc(%rbp)
jg 0x19a540
jmp 0x19a62d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jg 0x19a573
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19a549
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x19a5a3
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
subl -0x14(%rbp), %ecx
shll %cl, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19a579
jmp 0x19a5a5
movl -0x18(%rbp), %eax
movl -0x10(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
je 0x19a62d
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x19a61f
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x19a612
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x2, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x19a61f
jmp 0x19a614
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19a5d5
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x19a5a5
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util2.c
// Function: de_decompress_zlib_mem2mem
int de_decompress_zlib_mem2mem(deark *c,
	const u8 *src, i64 src_len, u8 *dst, i64 dst_len)
{
	int retval = 0;
	dbuf *outf = NULL;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_deflate_params inflparams;
	struct de_dfilter_ctx *dfctx = NULL;

	de_zeromem(&inflparams, sizeof(struct de_deflate_params));
	inflparams.flags = DE_DEFLATEFLAG_ISZLIB;

	de_dfilter_init_objects(c, NULL, &dcmpro, &dres);

	outf = dbuf_create_membuf(c, dst_len, 0x1);
	dbuf_enable_wbuffer(outf);

	dcmpro.f = outf;
	dcmpro.expected_len = dst_len;
	dcmpro.len_known = 1;

	dfctx = de_dfilter_create(c, dfilter_deflate_codec_miniz, (void*)&inflparams,
		&dcmpro, &dres);

	de_dfilter_addbuf(dfctx, src, src_len);
	de_dfilter_finish(dfctx);
	dbuf_flush(outf);
	if(dres.errcode==0) {
		retval = 1;
	}
	// TODO: There's too much copying. Could use a custom dbuf to
	// reduce the # of copies by 1.
	dbuf_read(outf, dst, 0, dst_len);

	de_dfilter_destroy(dfctx);
	dbuf_close(outf);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movl $0x1, -0xc0(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x1773f0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x167b90
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x1, -0x48(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x2acc(%rip), %rsi     # 0x197c70
leaq -0xc0(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0xb0(%rbp), %r8
callq 0x1775a0
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x177620
movq -0xc8(%rbp), %rdi
callq 0x1776f0
movq -0x38(%rbp), %rdi
callq 0x167c30
cmpl $0x0, -0xb0(%rbp)
jne 0x19a793
movl $0x1, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x164d10
movq -0xc8(%rbp), %rdi
callq 0x177720
movq -0x38(%rbp), %rdi
callq 0x1676a0
movl -0x2c(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util2.c
// Function: make_cp932_table
static void make_cp932_table(deark *c)
{
	u8 *tbl;
	int ret;

	if(c->persistent_item[DE_PERSISTENT_ITEM_CP932_TBL]) {
		return;
	}

	tbl = de_malloc(c, DE_CP932DATA_ORIG_LEN);
	ret = de_decompress_zlib_mem2mem(c, de_cp932data, DE_CP932DATA_LEN,
		tbl, DE_CP932DATA_ORIG_LEN);
	if(!ret) {
		de_internal_err_fatal(c, "Problem with cp932 data");
	}
	c->persistent_item[DE_PERSISTENT_ITEM_CP932_TBL] = (void*)tbl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2e0(%rax)
je 0x19aa0c
jmp 0x19aa67
movq -0x8(%rbp), %rdi
movl $0x18000, %esi          # imm = 0x18000
callq 0x15b780
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x3eae3(%rip), %rsi     # 0x1d9510
movl $0x44cb, %edx           # imm = 0x44CB
movl $0x18000, %r8d          # imm = 0x18000
callq 0x19a690
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x19aa58
movq -0x8(%rbp), %rdi
leaq 0x42f8a(%rip), %rsi     # 0x1dd9db
movb $0x0, %al
callq 0x15c2a0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2e0(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-png.c
// Function: write_png_chunk_IHDR
static void write_png_chunk_IHDR(struct deark_png_encode_info *pei,
	dbuf *cdbuf)
{
	static const u8 color_type_code[] = {0x00, 0x00, 0x04, 0x02, 0x06};

	dbuf_writeu32be(cdbuf, (i64)pei->width);
	dbuf_writeu32be(cdbuf, (i64)pei->height);
	if(pei->encode_as_bwimg) {
		dbuf_writebyte(cdbuf, 1); // bit depth
		dbuf_writebyte(cdbuf, 0x00);
	}
	else {
		dbuf_writebyte(cdbuf, (pei->imglo ? 16 : 8)); // bit depth
		dbuf_writebyte(cdbuf, color_type_code[pei->num_chans]);
	}
	dbuf_truncate(cdbuf, 13); // rest of chunk is zeroes
	write_png_chunk_from_cdbuf(pei, cdbuf, CODE_IHDR);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x20(%rax), %rsi
callq 0x168b80
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x24(%rax), %rsi
callq 0x168b80
movq -0x8(%rbp), %rax
cmpb $0x0, 0x62(%rax)
je 0x19b1f7
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x168380
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x168380
jmp 0x19b238
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x8, %eax
movl $0x10, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movzbl %al, %esi
callq 0x168380
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x2c(%rax), %rcx
leaq 0x427f9(%rip), %rax     # 0x1dda28
movzbl (%rax,%rcx), %esi
callq 0x168380
movq -0x10(%rbp), %rdi
movl $0xd, %esi
callq 0x168900
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x49484452, %edx       # imm = 0x49484452
callq 0x19b690
addq $0x10, %rsp
popq %rbp
retq
nop