LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-unix.c
// Function: de_fopen_for_write
FILE* de_fopen_for_write(deark *c, const char *fn,
	char *errmsg, size_t errmsg_len, int overwrite_mode,
	unsigned int flags)
{
	const char *mode;

	// A simple check to make it harder to accidentally overwrite the input
	// file. (But it can easily be defeated.)
	// TODO?: Make this more robust.
	if(c->input_filename && !de_strcmp(fn, c->input_filename)) {
		de_err(c, "Refusing to write to %s: Same as input filename", fn);
		de_fatalerror(c);
		de_strlcpy(errmsg, "", errmsg_len);
		return NULL;
	}

	if(overwrite_mode!=DE_OVERWRITEMODE_STANDARD) {
		// Check if the file already exists.
		struct stat stbuf;
		int s_ret;

		de_zeromem(&stbuf, sizeof(struct stat));
#if DE_USE_LSTAT
		s_ret = lstat(fn, &stbuf);
#else
		s_ret = stat(fn, &stbuf);
#endif

		 // s_ret==0 = "success"
		if(s_ret==0 && overwrite_mode==DE_OVERWRITEMODE_NEVER) {
			de_strlcpy(errmsg, "Output file already exists", errmsg_len);
			return NULL;
		}

		if(s_ret==0 && overwrite_mode==DE_OVERWRITEMODE_DEFAULT) {
			if(S_ISLNK(stbuf.st_mode)) {
				de_strlcpy(errmsg, "Output file is a symlink", errmsg_len);
				return NULL;
			}
		}
	}

	mode = (flags&0x1) ? "ab" : "wb";
	return de_fopen(c, fn, mode, errmsg, errmsg_len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, %ebp
movl %r8d, %r12d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x50(%rdi), %rsi
testq %rsi, %rsi
je 0x1094e3
movq %rdi, %r13
movq %r15, %rdi
callq 0x181a0
testl %eax, %eax
je 0x10951f
cmpl $0x2, %r12d
je 0x10957f
leaq 0x8(%rsp), %r13
movl $0x90, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x18140
movq %r15, %rdi
movq %r13, %rsi
callq 0x180c0
movl %r12d, %ecx
xorl $0x1, %ecx
orl %eax, %ecx
jne 0x109561
leaq 0x4341b(%rip), %rsi     # 0x14c938
jmp 0x109542
leaq 0x433e2(%rip), %rsi     # 0x14c908
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9295
movq %r13, %rdi
callq 0xe9522
leaq 0x3bb6e(%rip), %rsi     # 0x1450b0
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe8219
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orl %r12d, %eax
jne 0x10957f
movl $0xf000, %eax           # imm = 0xF000
andl 0x20(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x10957f
leaq 0x433d6(%rip), %rsi     # 0x14c953
jmp 0x109542
testb $0x1, %bpl
leaq 0x433e2(%rip), %rax     # 0x14c96c
leaq 0x35a28(%rip), %rsi     # 0x13efb9
cmoveq %rax, %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10946b
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-unix.c
// Function: de_update_file_attribs
void de_update_file_attribs(dbuf *f, u8 preserve_file_times)
{
	struct upd_attr_ctx uactx;

	de_zeromem(&uactx, sizeof(struct upd_attr_ctx));

	update_file_perms(&uactx, f);
	if(preserve_file_times) {
		update_file_time(&uactx, f);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
xorl %ebp, %ebp
movl $0x98, %edx
xorl %esi, %esi
callq 0x18140
movb $0x1, %cl
cmpl $0x2, (%rbx)
jne 0x109687
movq 0xd0(%rbx), %rax
testq %rax, %rax
je 0x109687
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x109687
testb $0x3, 0x14(%rax)
je 0x109687
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0x180f0
movl %eax, -0x4(%r15)
movl $0x1, -0x8(%r15)
xorl %ebp, %ebp
testl %eax, %eax
je 0x109633
xorl %ecx, %ecx
movl %eax, %ebp
jmp 0x109687
movl 0x40(%rsp), %edx
movl %edx, %eax
andl $-0x4a, %eax
movq 0xd0(%rbx), %rcx
movl 0x14(%rcx), %ecx
shll $0x1e, %ecx
sarl $0x1f, %ecx
movl %edx, %r15d
shrl $0x2, %r15d
andl %ecx, %r15d
andl $0x49, %r15d
orl %eax, %r15d
cmpl %edx, %r15d
je 0x109685
movq 0x8(%rbx), %rdi
leaq 0x43302(%rip), %rsi     # 0x14c96f
xorl %ebp, %ebp
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe87e4
movq 0x68(%rbx), %rdi
movl %r15d, %esi
callq 0x18260
xorl %ecx, %ecx
testb %r14b, %r14b
je 0x10974d
cmpl $0x2, (%rbx)
jne 0x10974d
movq 0xd0(%rbx), %r15
testq %r15, %r15
je 0x10974d
cmpb $0x0, 0x18(%r15)
je 0x10974d
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x10974d
leaq 0x18(%r15), %r14
testb %cl, %cl
je 0x1096d5
leaq 0x28(%rsp), %rsi
callq 0x180f0
movl %eax, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0xeacfd
movq %rax, 0x10(%rsp)
cmpb $0x1f, 0x1a(%r15)
jb 0x10971d
movq %r14, %rdi
callq 0xea8b1
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
movq %rdx, 0x18(%rsp)
testl %ebp, %ebp
je 0x10972f
leaq 0x10(%rsp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x10(%rax)
jmp 0x109741
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq 0x68(%rbx), %rdi
movq %rsp, %rsi
callq 0x18180
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-unix.c
// Function: de_current_time_to_timestamp
void de_current_time_to_timestamp(struct de_timestamp *ts)
{
	struct timeval tv;
	int ret;

	de_zeromem(&tv, sizeof(struct timeval));
	ret = gettimeofday(&tv, NULL);
	if(ret!=0) {
		de_zeromem(ts, sizeof(struct de_timestamp));
		return;
	}

	de_unix_time_to_timestamp((i64)tv.tv_sec, ts, 0x1);
	de_timestamp_set_subsec(ts, ((double)tv.tv_usec)/1000000.0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x18110
testl %eax, %eax
je 0x109783
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq (%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xea7f5
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
divsd 0x4315a(%rip), %xmm0    # 0x14c900
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0xea849
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_adler32
mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
{
    mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16);
    size_t block_len = buf_len % 5552;
    if (!ptr)
        return MZ_ADLER32_INIT;
    while (buf_len)
    {
        for (i = 0; i + 7 < block_len; i += 8, ptr += 8)
        {
            s1 += ptr[0], s2 += s1;
            s1 += ptr[1], s2 += s1;
            s1 += ptr[2], s2 += s1;
            s1 += ptr[3], s2 += s1;
            s1 += ptr[4], s2 += s1;
            s1 += ptr[5], s2 += s1;
            s1 += ptr[6], s2 += s1;
            s1 += ptr[7], s2 += s1;
        }
        for (; i < block_len; ++i)
            s1 += *ptr++, s2 += s1;
        s1 %= 65521U, s2 %= 65521U;
        buf_len -= block_len;
        block_len = 5552;
    }
    return (s2 << 16) + s1;
}

// Assembly:
testq %rsi, %rsi
je 0x1098f3
movq %rdx, %r8
movq %rdi, %rcx
shrq $0x10, %rcx
movzwl %di, %edi
testq %rdx, %rdx
je 0x1098ec
movq %r8, %rax
shrq $0x4, %rax
movabsq $0x179baa6bb6398b7, %rdx # imm = 0x179BAA6BB6398B7
mulq %rdx
shrq %rdx
imulq $0x15b0, %rdx, %rdx     # imm = 0x15B0
movq %r8, %rax
subq %rdx, %rax
movl $0x80078071, %edx       # imm = 0x80078071
xorl %r9d, %r9d
cmpq $0x8, %rax
jb 0x109894
movzbl (%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x1(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x2(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x3(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x4(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x5(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x6(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x7(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
addq $0x8, %r9
leal 0x7(%r9), %r10d
cmpl %eax, %r10d
jb 0x109829
addq %r9, %rsi
movq %rax, %r10
subq %r9, %r10
jbe 0x1098b4
xorl %r9d, %r9d
movzbl (%rsi,%r9), %r11d
addl %r11d, %edi
addl %edi, %ecx
incq %r9
cmpq %r9, %r10
jne 0x10989f
addq %r10, %rsi
movl %edi, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %edi
movl %ecx, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %ecx
subq %rax, %r8
movl $0x15b0, %eax           # imm = 0x15B0
jne 0x109820
shll $0x10, %ecx
orl %edi, %ecx
jmp 0x1098f8
movl $0x1, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: mz_deflateInit2
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy)
{
    tdefl_compressor *pComp;
    mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy);

    if (!pStream)
        return MZ_STREAM_ERROR;
    if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)))
        return MZ_PARAM_ERROR;

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

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

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

    if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY)
    {
        mz_deflateEnd(pStream);
        return MZ_PARAM_ERROR;
    }

    return MZ_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
movl %esi, %edi
movl %ecx, %esi
movl %r9d, %edx
callq 0x109a2d
testq %rbx, %rbx
je 0x109a13
movl %eax, %ebp
cmpl $0x8, %r12d
setne %al
addl $-0xa, %r14d
cmpl $-0x9, %r14d
setb %cl
orb %al, %cl
movl $0xffffd8f0, %r14d      # imm = 0xFFFFD8F0
jne 0x109a19
cmpl $0xf, %r15d
je 0x10999b
cmpl $-0xf, %r15d
jne 0x109a19
movl $0x0, 0x58(%rbx)
movq $0x1, 0x60(%rbx)
xorl %eax, %eax
movq %rax, 0x68(%rbx)
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x40(%rbx), %rax
testq %rax, %rax
jne 0x1099cf
leaq -0xca(%rip), %rax       # 0x109901
movq %rax, 0x40(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x1099e1
leaq -0xd0(%rip), %rcx       # 0x10990d
movq %rcx, 0x48(%rbx)
movq 0x50(%rbx), %rdi
movl $0x1, %esi
movl $0x4df78, %edx          # imm = 0x4DF78
callq *%rax
testq %rax, %rax
je 0x109a25
orl $0x2000, %ebp           # imm = 0x2000
movq %rax, 0x38(%rbx)
xorl %r14d, %r14d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x109aa2
jmp 0x109a19
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0x109a19
// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0xa, %edi
movl $0xa, %eax
cmovbl %edi, %eax
testl %edi, %edi
movl $0x6, %ecx
cmovnsl %eax, %ecx
leaq 0x43047(%rip), %rax     # 0x14ca90
xorl %r8d, %r8d
cmpl $0x4, %edi
setl %r8b
shll $0xe, %r8d
orl (%rax,%rcx,4), %r8d
movl %r8d, %eax
orl $0x1000, %eax           # imm = 0x1000
testl %esi, %esi
cmovlel %r8d, %eax
testl %edi, %edi
je 0x109a8a
decl %edx
cmpl $0x3, %edx
ja 0x109a95
leaq 0x42f25(%rip), %rcx     # 0x14c9a0
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
orl $0x20000, %eax          # imm = 0x20000
retq
orl $0x80000, %eax          # imm = 0x80000
retq
orl $0x10000, %eax          # imm = 0x10000
retq
orl $0x40000, %eax          # imm = 0x40000
retq
andl $0xfffff000, %eax       # imm = 0xFFFFF000
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x109be2
movq %rdi, %r14
movq 0x38(%rdi), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x109be7
movq 0x50(%r14), %rdi
callq *0x48(%r14)
movq $0x0, 0x38(%r14)
jmp 0x109be7
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq $0x0, 0x68(%rsp)
movq (%rsi), %rsi
movq %rsi, %rax
orq %rcx, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %ebp       # imm = 0xFFFFD8F0
jne 0x10a087
movq %rsp, %rax
movq %rdx, (%rax)
movl %ecx, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rax, %rdi
movl %r8d, %esi
movl $0x8, %edx
movl $0xf, %ecx
movl $0x9, %r8d
xorl %r9d, %r9d
callq 0x109944
movl %eax, %ebp
testl %eax, %eax
jne 0x10a087
movq %rsp, %rdi
movl $0x4, %esi
callq 0x109c30
cmpl $0x1, %eax
jne 0x10a065
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movq 0x38(%rsp), %rsi
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x10a087
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
jmp 0x10a087
movl %eax, %r14d
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x10a07b
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
testl %r14d, %r14d
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x10a18f
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xf, %esi
je 0x10a10b
movl $0xffffd8f0, %eax       # imm = 0xFFFFD8F0
cmpl $-0xf, %ebx
jne 0x10a19a
movl $0x0, 0x58(%r14)
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x60(%r14)
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x10a13c
leaq -0x837(%rip), %rax      # 0x109901
movq %rax, 0x40(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x10a14e
leaq -0x83d(%rip), %rcx      # 0x10990d
movq %rcx, 0x48(%r14)
movq 0x50(%r14), %rdi
movl $0x1, %esi
movl $0xa0d0, %edx           # imm = 0xA0D0
callq *%rax
testq %rax, %rax
je 0x10a195
movq %rax, 0x38(%r14)
movl $0x0, (%rax)
movl $0x1, 0xa0cc(%rax)
movaps 0x26552(%rip), %xmm0    # 0x1306d0
movups %xmm0, 0x20b8(%rax)
movl %ebx, 0x20c8(%rax)
xorl %eax, %eax
jmp 0x10a19a
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r14
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rsp)
movups %xmm0, 0x50(%rsp)
movups %xmm0, 0x40(%rsp)
movups %xmm0, 0x30(%rsp)
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x10(%rsp)
movq $0x0, 0x70(%rsp)
movq (%rcx), %rsi
movq (%rbx), %rcx
movq %rcx, %rax
orq %rsi, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %r15d      # imm = 0xFFFFD8F0
jne 0x10c42a
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
movl %esi, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %ecx, 0x20(%rax)
movq %rax, %rdi
movl $0xf, %esi
callq 0x10a0e6
movl %eax, %r15d
testl %eax, %eax
jne 0x10c42a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x4, %esi
callq 0x10a1ee
movl %eax, %ebp
movl 0x8(%r15), %eax
subq %rax, (%r14)
cmpl $0x1, %ebp
jne 0x10c402
movq 0x30(%rsp), %rax
movq %rax, (%rbx)
movq 0x40(%rsp), %rsi
xorl %r15d, %r15d
testq %rsi, %rsi
je 0x10c42a
movq 0x58(%rsp), %rdi
callq *0x50(%rsp)
jmp 0x10c42a
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x10c419
movq 0x58(%rsp), %rdi
callq *0x50(%rsp)
movl 0x10(%rsp), %eax
movl %ebp, %ecx
xorl $-0x5, %ecx
orl %eax, %ecx
movl $0xfffffffd, %r15d      # imm = 0xFFFFFFFD
cmovnel %ebp, %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rax
testq %rax, %rax
je 0x10c494
movq 0xb0(%rbx), %rcx
subq 0x88(%rbx), %rcx
movq %rcx, (%rax)
movq 0xa0(%rbx), %rax
testq %rax, %rax
je 0x10c4f4
movq (%rax), %r14
movq 0xc0(%rbx), %rdi
subq %rdi, %r14
movl 0x74(%rbx), %eax
cmpq %rax, %r14
cmovaeq %rax, %r14
movl 0x70(%rbx), %eax
addq 0x90(%rbx), %rdi
leaq (%rbx,%rax), %rsi
addq $0x392aa, %rsi          # imm = 0x392AA
movq %r14, %rdx
callq 0x181e0
addl %r14d, 0x70(%rbx)
subl %r14d, 0x74(%rbx)
addq 0xc0(%rbx), %r14
movq %r14, 0xc0(%rbx)
movq 0xa0(%rbx), %rax
movq %r14, (%rax)
cmpl $0x0, 0x78(%rbx)
je 0x10c505
xorl %eax, %eax
cmpl $0x0, 0x74(%rbx)
sete %al
jmp 0x10c507
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %r13d, %r13d
orb %cl, %al
jne 0x10d5ee
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
movl $0x4df78, %edi          # imm = 0x4DF78
callq 0x18200
testq %rax, %rax
je 0x10d5ee
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
callq 0x109aa2
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x4, %ecx
callq 0x10d52b
xorl %r13d, %r13d
cmpl $0x1, %eax
sete %r13b
movq %rbp, %rdi
callq 0x18030
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x10d64b
movl %ecx, %r8d
movq %rdx, %rbx
movq $0x0, (%rdx)
movq %rsp, %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx        # 0x10d653
callq 0x10d56e
testl %eax, %eax
je 0x10d64b
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
jmp 0x10d64d
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdx), %rdi
movq 0x8(%rdx), %r12
movslq %esi, %r15
leaq (%rdi,%r15), %r13
cmpq %r12, %r13
jbe 0x10d6b5
xorl %ebp, %ebp
cmpl $0x0, 0x18(%rbx)
je 0x10d6cf
movl $0x80, %eax
addq %r12, %r12
cmpq $0x81, %r12
cmovbq %rax, %r12
cmpq %r12, %r13
ja 0x10d684
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x18250
testq %rax, %rax
je 0x10d6cf
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdi
jmp 0x10d6b9
movq 0x10(%rbx), %rax
addq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x181e0
movq %r13, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x10d722
movq %rsp, %rax
movq %rdi, 0x10(%rax)
movq %rsi, 0x8(%rax)
leaq -0xb4(%rip), %r9        # 0x10d653
movq %rdx, %rdi
movq %rcx, %rsi
movq %r9, %rdx
movq %rax, %rcx
callq 0x10d56e
testl %eax, %eax
je 0x10d722
movq (%rsp), %rax
jmp 0x10d724
xorl %eax, %eax
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_decompress_mem_to_heap
void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
    tinfl_decompressor decomp;
    void *pBuf = NULL, *pNew_buf;
    size_t src_buf_ofs = 0, out_buf_capacity = 0;
    *pOut_len = 0;
    tinfl_init(&decomp);
    for (;;)
    {
        size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
        tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8 *)pBuf, pBuf ? (mz_uint8 *)pBuf + *pOut_len : NULL, &dst_buf_size,
                                               (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
        if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
        {
            MZ_FREE(pBuf);
            *pOut_len = 0;
            return NULL;
        }
        src_buf_ofs += src_buf_size;
        *pOut_len += dst_buf_size;
        if (status == TINFL_STATUS_DONE)
            break;
        new_out_buf_capacity = out_buf_capacity * 2;
        if (new_out_buf_capacity < 128)
            new_out_buf_capacity = 128;
        pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
        if (!pNew_buf)
        {
            MZ_FREE(pBuf);
            *pOut_len = 0;
            return NULL;
        }
        pBuf = pNew_buf;
        out_buf_capacity = new_out_buf_capacity;
    }
    return pBuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20e8, %rsp           # imm = 0x20E8
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movq $0x0, (%rdx)
leaq 0x30(%rsp), %rax
movl $0x0, (%rax)
andl $-0x7, %ebp
orl $0x4, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
subq %r15, %rax
movq %rax, 0x18(%rsp)
movq %r12, %rax
subq %r14, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
leaq (%rax,%r15), %rsi
testq %r13, %r13
je 0x10d7ba
addq %r13, %r14
movl %ebp, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %r13, %rcx
movq %r14, %r8
jmp 0x10d7cc
movl %ebp, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x10(%rsp), %r9
callq 0x10a531
testl %eax, %eax
js 0x10d81e
cmpl $0x1, %eax
je 0x10d81e
addq 0x18(%rsp), %r15
movq (%rbx), %r14
addq 0x10(%rsp), %r14
movq %r14, (%rbx)
testl %eax, %eax
je 0x10d830
addq %r12, %r12
cmpq $0x81, %r12
movl $0x80, %eax
cmovbq %rax, %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x18250
testq %rax, %rax
je 0x10d81e
movq %rax, %r13
jmp 0x10d77c
movq %r13, %rdi
callq 0x18030
movq $0x0, (%rbx)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x20e8, %rsp           # imm = 0x20E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_decompress_mem_to_callback
int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
    int result = 0;
    tinfl_decompressor decomp;
    mz_uint8 *pDict = (mz_uint8 *)MZ_MALLOC(TINFL_LZ_DICT_SIZE);
    size_t in_buf_ofs = 0, dict_ofs = 0;
    if (!pDict)
        return TINFL_STATUS_FAILED;
    memset(pDict,0,TINFL_LZ_DICT_SIZE);
    tinfl_init(&decomp);
    for (;;)
    {
        size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs;
        tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8 *)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size,
                                               (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)));
        in_buf_ofs += in_buf_size;
        if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user)))
            break;
        if (status != TINFL_STATUS_HAS_MORE_OUTPUT)
        {
            result = (status == TINFL_STATUS_DONE);
            break;
        }
        dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1);
    }
    MZ_FREE(pDict);
    *pIn_buf_size = in_buf_ofs;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20f8, %rsp           # imm = 0x20F8
movl %r8d, %r15d
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x38(%rsp)
movl $0x1, %edi
movl $0x8000, %esi           # imm = 0x8000
callq 0x18190
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x10d992
leaq 0x40(%rsp), %rax
movl $0x0, (%rax)
andl $-0x7, %r15d
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq (%rax), %rax
subq %r13, %rax
movq %rax, 0x20(%rsp)
movl $0x8000, %eax           # imm = 0x8000
subq %rbp, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
leaq (%rax,%r13), %rsi
movq 0x8(%rsp), %rcx
leaq (%rcx,%rbp), %rbx
movl %r15d, %r14d
movl %r15d, (%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %r8
leaq 0x18(%rsp), %r9
callq 0x10a531
movl %eax, %r12d
addq 0x20(%rsp), %r13
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x10d96c
movq %rbx, %rdi
movl %r15d, %esi
movq 0x30(%rsp), %rdx
callq *0x28(%rsp)
testl %eax, %eax
je 0x10d999
cmpl $0x2, %r12d
jne 0x10d987
addl %ebp, %r15d
andl $0x7fff, %r15d          # imm = 0x7FFF
movq %r15, %rbp
movl %r14d, %r15d
jmp 0x10d8fa
xorl %ebp, %ebp
testl %r12d, %r12d
sete %bpl
jmp 0x10d99b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x10d9ad
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
callq 0x18030
movq 0x10(%rsp), %rax
movq %r13, (%rax)
movl %ebp, %eax
addq $0x20f8, %rsp           # imm = 0x20F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
movl $0x20b8, %edi           # imm = 0x20B8
callq 0x18200
testq %rax, %rax
je 0x10d9d7
movl $0x0, (%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0xa0, %esi
callq 0xe8b2b
movq %rax, %r15
leaq 0x3fbaa(%rip), %rcx     # 0x14d5aa
movq %rcx, 0x28(%rax)
testq %r14, %r14
je 0x10da11
movl (%r14), %ecx
movl %ecx, (%r15)
jmp 0x10da14
movl (%r15), %ecx
movq %r15, 0x28(%rbx)
leaq 0x90(%rip), %rdx        # 0x10daaf
movq %rdx, 0x30(%rbx)
leaq 0x24b(%rip), %rdx       # 0x10dc75
movq %rdx, 0x40(%rbx)
leaq 0x2b6(%rip), %rdx       # 0x10dceb
movq %rdx, 0x48(%rbx)
movq (%rbx), %r14
movq 0x8(%rbx), %rdx
movq $0x0, 0x8(%rdx)
addq $0x30, %rax
leaq 0x15bd(%rip), %rdx      # 0x10f010
movq %rdx, 0x70(%r15)
leaq 0x15b7(%rip), %rdx      # 0x10f015
movq %rdx, 0x78(%r15)
movq %r14, 0x80(%r15)
movq %rax, %rdi
testb $0x1, %cl
jne 0x10da78
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
jmp 0x10da7d
movl $0xf, %esi
callq 0x10a0e6
testl %eax, %eax
je 0x10daa4
movq 0x8(%rbx), %rsi
movq 0x28(%r15), %rdx
leaq 0x3fe40(%rip), %rcx     # 0x14d8d5
movq %r14, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xfa21a
movb $0x1, 0x4(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
cmpb $0x0, 0x4(%r14)
je 0x10dccf
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x10dcae
movq (%rbx), %rdi
movl 0x40(%r14), %ecx
movl 0x58(%r14), %r8d
leaq 0x3fc1b(%rip), %rdx     # 0x14d8bd
movl $0x4, %esi
xorl %eax, %eax
callq 0xe895a
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x10dcca
movq 0x80(%r14), %rdi
callq *0x78(%r14)
movq $0x0, 0x68(%r14)
movb $0x0, 0x4(%r14)
movq 0x10(%r14), %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movb $0x1, %al
movb %al, 0x4(%rcx)
movb %al, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x10dd16
movq (%rbx), %r15
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0xe8be2
movq %r15, %rdi
movq %r14, %rsi
callq 0xe8be2
movq $0x0, 0x28(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x4df80, %esi          # imm = 0x4DF80
callq 0xe8b2b
movq %rax, %r12
movq %r15, (%rax)
leaq 0x8(%rax), %rdi
leaq 0x19(%rip), %rsi        # 0x10dd83
movq %r14, %rdx
movl %ebx, %ecx
callq 0x109aa2
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
addq $0x8, %rdi
leal -0x2(%rcx), %eax
xorl %r8d, %r8d
cmpl $0x3, %eax
cmovael %r8d, %ecx
callq 0x10d52b
leal 0x2(%rax), %ecx
cmpl $0x4, %ecx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovael %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %rbx
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movl $0x1, (%r12)
leaq 0x30(%rsp), %r13
leaq 0x48(%rsp), %rbp
xorl %esi, %esi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xfa1dc
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xf09c5
movq %rax, %r15
movq %rax, %rdi
callq 0xf0855
movq %r15, (%r13)
movq %rbx, 0x10(%r13)
movb $0x1, 0x8(%r13)
leaq -0x16bf(%rip), %rsi     # 0x10d9de
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %rbp, %r12
callq 0xfa325
movq %rax, %r14
movq %rax, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xfa376
movq %r14, %rdi
callq 0xfa3c8
movq %r15, %rdi
callq 0xf08ba
xorl %ebp, %ebp
cmpl $0x0, (%r12)
sete %bpl
movq %r15, %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xee8d4
movq %r14, %rdi
callq 0xfa3d4
movq %r15, %rdi
callq 0xf052b
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-png.c
// Function: write_png_chunk_from_cdbuf
static void write_png_chunk_from_cdbuf(struct deark_png_encode_info *pei,
	dbuf *cdbuf, u32 chunktype)
{
	const u8 *mem;

	mem = dbuf_get_membuf_direct_ptr(cdbuf);
	if(mem==NULL && cdbuf->len!=0) goto done;
	write_png_chunk_from_mem(pei, mem, cdbuf->len, chunktype);

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0xf148f
movq 0x18(%r15), %rdx
testq %rax, %rax
je 0x10facd
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x10fb85
testq %rdx, %rdx
je 0x10fad8
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
jmp 0x10fac1
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-png.c
// Function: my_IDAT_write_cb
static void my_IDAT_write_cb(dbuf *f, void *userdata,
	const u8 *mem_orig, i64 memsize_orig)
{
	struct IDAT_write_userdata_struct *iwu = (struct IDAT_write_userdata_struct*)userdata;
	const u8 *mem = mem_orig;
	i64 memsize = memsize_orig;

	// We *could* just write a single IDAT chunk for each call to this function.
	// We would get a PNG with IDATs having various random-ish sizes.
	// I want the PNG output to be more predictable and stable than that, though,
	// so we'll do some buffering to make each chunk (except the last) have
	// DE_MAX_IDAT_CHUNKSIZE bytes.

	while(iwu->cdbuf->len + memsize >= DE_MAX_IDAT_CHUNKSIZE) {
		i64 amt_to_use_from_membuf;

		if(iwu->cdbuf->len >= DE_MAX_IDAT_CHUNKSIZE) {
			amt_to_use_from_membuf = 0;
		}
		else {
			amt_to_use_from_membuf = DE_MAX_IDAT_CHUNKSIZE - iwu->cdbuf->len;
		}

		dbuf_write(iwu->cdbuf, mem, amt_to_use_from_membuf);
		mem += amt_to_use_from_membuf;
		memsize -= amt_to_use_from_membuf;
		// cdbuf should now have exactly DE_MAX_IDAT_CHUNKSIZE bytes in it.

		write_png_chunk_from_cdbuf(iwu->pei, iwu->cdbuf, CODE_IDAT);
		iwu->IDAT_count++;
		dbuf_empty(iwu->cdbuf);
	}

	// Save any remaining compressed pixel data for next time.
	if(memsize > 0) {
		dbuf_write(iwu->cdbuf, mem, memsize);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq 0x8(%rsi), %rdi
movq 0x18(%rdi), %rax
addq %rax, %rcx
cmpq $0x100000, %rcx         # imm = 0x100000
jl 0x10fb62
movq %rsi, %r15
xorl %r13d, %r13d
leaq -0x100000(%rax), %r12
negq %r12
cmpq $0x100000, %rax         # imm = 0x100000
cmovgeq %r13, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0xef547
addq %r12, %r14
subq %r12, %rbx
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movl $0x49444154, %edx       # imm = 0x49444154
callq 0x10fa9d
incl 0x10(%r15)
movq 0x8(%r15), %rdi
callq 0xf145f
movq 0x8(%r15), %rdi
movq 0x18(%rdi), %rax
leaq (%rax,%rbx), %rcx
cmpq $0xfffff, %rcx          # imm = 0xFFFFF
jg 0x10fb0a
testq %rbx, %rbx
jle 0x10fb7b
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xef547
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-png.c
// Function: write_png_chunk_from_mem
static void write_png_chunk_from_mem(struct deark_png_encode_info *pei,
	const u8 *mem, i64 memlen, u32 chunktype)
{
	u32 crc;
	u8 tmpbuf[4];

	de_crcobj_reset(pei->crco);

	// length field
	dbuf_writeu32be(pei->outf, memlen);

	// chunk type field
	de_writeu32be_direct(tmpbuf, (i64)chunktype);
	de_crcobj_addbuf(pei->crco, tmpbuf, 4);
	dbuf_write(pei->outf, tmpbuf, 4);

	// data field
	de_crcobj_addbuf(pei->crco, mem, memlen);
	dbuf_write(pei->outf, mem, memlen);

	// CRC field
	crc = de_crcobj_getval(pei->crco);
	dbuf_writeu32be(pei->outf, (i64)crc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
callq 0xeb7fe
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xf1026
movl %ebp, %esi
leaq 0xc(%rsp), %r12
movq %r12, %rdi
callq 0xf1021
movq 0x70(%rbx), %rdi
movl $0x4, %edx
movq %r12, %rsi
callq 0xeb8ad
movq 0x8(%rbx), %rdi
movl $0x4, %edx
movq %r12, %rsi
callq 0xef547
movq 0x70(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xeb8ad
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xef547
movq 0x70(%rbx), %rdi
callq 0xeb865
movq 0x8(%rbx), %rdi
movl %eax, %esi
callq 0xf1026
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OhYee[P]computer_application_programming_experiment/utils/bits/test/test_bits.c
// Function: main
int main() {
    mp_init(1 << 30, mp_exit);
    boolean pass = T;
    int     prefix;

    // 0110 1001  1100 0011
    bits *b = bits_init_with_minimum_bytes("\x69\xC3", 0, 16);
    bits *s1 = bits_sub(b, 4, 12); // 0011 0110
    bits *s2 = bits_sub(b, 3, 5);  // 0011 0110

    if ((prefix = bits_prefix(b, s1, 1)) != 0) {
        print_err("prefix want 0, got %d\n", prefix);
        pass = F;
    }

    if ((prefix = bits_prefix(b, s1, 1)) != 0) {
        print_err("prefix want 0, got %d\n", prefix);
        pass = F;
    }

    if ((prefix = bits_prefix(b, s2, 1)) != 2) {
        print_err("prefix want 2, got %d\n", prefix);
        pass = F;
    }

    if (pass) {
        print_ok("All testcases passed.\n");
    } else {
        print_err("Some errors!\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x7ca(%rip), %rsi      # 0x125c
movl $0x40000000, %edi       # imm = 0x40000000
callq 0x1267
leaq 0x765(%rip), %rdi       # 0x219c
xorl %esi, %esi
movl $0x10, %edx
callq 0x1564
movq %rax, %rbx
movq %rax, %rdi
movl $0x4, %esi
movl $0xc, %edx
callq 0x16d1
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movl $0x5, %edx
callq 0x16d1
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x1781
testl %eax, %eax
je 0x1a9d
leaq 0x714(%rip), %rdi       # 0x219f
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
leaq 0x6fd(%rip), %rax       # 0x2198
jmp 0x1aa4
leaq 0x6f0(%rip), %rax       # 0x2194
movl (%rax), %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x1781
testl %eax, %eax
je 0x1ad3
leaq 0x6de(%rip), %rdi       # 0x219f
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
leaq 0x6c7(%rip), %rax       # 0x2198
movl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x1781
cmpl $0x2, %eax
je 0x1b01
leaq 0x6c7(%rip), %rdi       # 0x21b6
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
leaq 0x699(%rip), %rax       # 0x2198
movl (%rax), %ebp
testl %ebp, %ebp
je 0x1b15
leaq 0x6c1(%rip), %rdi       # 0x21cd
xorl %eax, %eax
callq 0x1955
jmp 0x1b23
leaq 0x6c8(%rip), %rdi       # 0x21e4
xorl %eax, %eax
callq 0x10a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aligrudi[P]gpss/gpss.c
// Function: report
static void report(int *S, int n)
{
	char mark[NPT] = {0};
	int i;
	for (i = 0; i < n; i++)
		mark[S[i]] = 1;
	printf("%d", pt_n - n);
	for (i = 0; i < pt_n; i++)
		if (!mark[i])
			printf(" %d", i);
	printf("\n");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2718, %rsp           # imm = 0x2718
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %rdi
movl $0x2710, %edx           # imm = 0x2710
xorl %esi, %esi
callq 0x1070
testl %ebx, %ebx
jle 0x1e4e
movl %ebx, %eax
xorl %ecx, %ecx
movslq (%r14,%rcx,4), %rdx
movb $0x1, (%rsp,%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x1e3e
movl 0x321c(%rip), %esi      # 0x5070
subl %ebx, %esi
leaq 0x1231(%rip), %rdi      # 0x308e
xorl %eax, %eax
callq 0x1060
movl 0x3206(%rip), %eax      # 0x5070
testl %eax, %eax
jle 0x1e9d
leaq 0x1218(%rip), %rbx      # 0x308d
xorl %r14d, %r14d
cmpb $0x0, (%rsp,%r14)
jne 0x1e92
movq %rbx, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x1060
movl 0x31de(%rip), %eax      # 0x5070
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x1e78
movl $0xa, %edi
addq $0x2718, %rsp           # imm = 0x2718
popq %rbx
popq %r14
jmp 0x1040