LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_destroy
void ucstring_destroy(de_ucstring *s)
{
	deark *c;
	if(s) {
		c = s->c;
		de_free(c, s->str);
		de_free(c, s->tmp_string);
		de_free(c, s);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xf678c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %r14, %rdi
callq 0xe8be2
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_count_utf8_bytes
i64 ucstring_count_utf8_bytes(de_ucstring *s)
{
	i64 i;
	i64 n = 0;
	if(!s) return n;
	for(i=0; i<s->len; i++) {
		if(s->str[i]<0 || s->str[i]>0xffff) n+=4;
		else if(s->str[i]<=0x7f) n+=1;
		else if(s->str[i]<=0x7ff) n+=2;
		else n+=3;
	}
	return n;
}

// Assembly:
testq %rdi, %rdi
je 0xf6d9f
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
jle 0xf6d9f
movq 0x8(%rdi), %rdx
xorl %eax, %eax
xorl %esi, %esi
movl (%rdx,%rsi,4), %r8d
movl $0x4, %edi
cmpl $0xffff, %r8d           # imm = 0xFFFF
ja 0xf6d93
movl $0x1, %edi
cmpl $0x80, %r8d
jb 0xf6d93
cmpl $0x800, %r8d            # imm = 0x800
movl $0x3, %edi
sbbq $0x0, %rdi
addq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0xf6d63
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_write_as_utf8
void ucstring_write_as_utf8(deark *c, de_ucstring *s, dbuf *outf, int add_bom_if_needed)
{
	i64 i;

	if(add_bom_if_needed &&
		c->write_bom &&
		(s->len>0 && s->str[0]!=0xfeff) &&
		!ucstring_is_ascii(s))
	{
		// Write a BOM
		dbuf_write_uchar_as_utf8(outf, 0xfeff);
	}

	for(i=0; i<s->len; i++) {
		dbuf_write_uchar_as_utf8(outf, s->str[i]);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testl %ecx, %ecx
je 0xf6df1
cmpb $0x0, 0xcc(%rdi)
je 0xf6df1
movq 0x10(%r14), %rax
testq %rax, %rax
jle 0xf6df1
movq 0x8(%r14), %rcx
cmpl $0xfeff, (%rcx)         # imm = 0xFEFF
je 0xf6df1
xorl %edx, %edx
cmpl $0x80, (%rcx,%rdx,4)
jae 0xf6de4
incq %rdx
cmpq %rdx, %rax
jne 0xf6dd1
jmp 0xf6df1
movq %rbx, %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0xec1c4
cmpq $0x0, 0x10(%r14)
jle 0xf6e14
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0xec1c4
incq %r15
cmpq 0x10(%r14), %r15
jl 0xf6dfb
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_getpsz_internal
static const char *ucstring_getpsz_internal(de_ucstring *s,
	int has_max, i64 max_bytes)
{
	i64 allocsize;

	if(!s) {
		if(has_max && max_bytes<6) return "";
		return "(null)";
	}

	if(has_max) {
		allocsize = max_bytes + 1;
	}
	else {
		// TODO: Calculating the proper allocsize could be difficult,
		// depending on how DE_CONVFLAG_MAKE_PRINTABLE is implemented.
		allocsize = s->len * 4 + 1 + 100;
	}

	if(s->tmp_string)
		de_free(s->c, s->tmp_string);
	s->tmp_string = de_malloc(s->c, allocsize);

	ucstring_to_sz(s, s->tmp_string, (size_t)allocsize, DE_CONVFLAG_MAKE_PRINTABLE, DE_ENCODING_UTF8);

	return s->tmp_string;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
testq %rdi, %rdi
je 0xf707a
movq %rdi, %rbx
testl %esi, %esi
je 0xf7098
incq %r14
jmp 0xf70a4
cmpq $0x6, %r14
leaq 0x4e02b(%rip), %rax     # 0x1450b0
leaq 0x52f0e(%rip), %rcx     # 0x149f9a
cmovgeq %rcx, %rax
testl %esi, %esi
cmoveq %rcx, %rax
jmp 0xf70e1
movq 0x10(%rbx), %rax
leaq 0x65(,%rax,4), %r14
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0xf70b5
movq (%rbx), %rdi
callq 0xe8be2
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xe8b2b
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movl $0x2, %r8d
callq 0xf6e1a
movq 0x20(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_create
struct de_strarray *de_strarray_create(deark *c, size_t max_elems)
{
	struct de_strarray *sa;
	sa = de_malloc(c, sizeof(struct de_strarray));
	sa->c = c;
	sa->max_elems = max_elems;
	return sa;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x28, %esi
callq 0xe8b2b
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_destroy
void de_strarray_destroy(struct de_strarray *sa)
{
	deark *c;

	if(!sa) return;
	c = sa->c;
	while(sa->count>0) {
		de_strarray_pop(sa);
	}
	de_free(c, sa->ss);
	de_free(c, sa);
}

// Assembly:
testq %rdi, %rdi
je 0xf7266
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpq $0x0, 0x10(%rbx)
je 0xf7248
movq %rbx, %rdi
callq 0xf7267
jmp 0xf7237
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_pop
int de_strarray_pop(struct de_strarray *sa)
{
	if(sa->count<1) return 0;
	ucstring_destroy(sa->ss[sa->count-1]);
	sa->ss[sa->count-1] = NULL;
	sa->count--;
	return 1;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xf72a1
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rdi
callq 0xf6753
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movq $0x0, -0x8(%rcx,%rax,8)
decq %rax
movq %rax, 0x10(%rbx)
movl $0x1, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_push
int de_strarray_push(struct de_strarray *sa, de_ucstring *s)
{
	deark *c = sa->c;
	size_t newidx = sa->count;

	if(sa->count >= sa->max_elems) return 0;
	if(newidx >= sa->num_alloc) {
		size_t old_num_alloc = sa->num_alloc;
		sa->num_alloc *= 2;
		if(sa->num_alloc<8) sa->num_alloc=8;
		sa->ss = de_reallocarray(c, sa->ss, old_num_alloc, sizeof(de_ucstring*),
			sa->num_alloc);
	}
	sa->ss[newidx] = ucstring_clone(s);
	sa->count++;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r15
xorl %eax, %eax
cmpq 0x8(%rdi), %r15
jae 0xf7307
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdx
cmpq %rdx, %r15
jb 0xf72ee
movq (%rbx), %rdi
leaq (%rdx,%rdx), %r8
cmpq $0x9, %r8
movl $0x8, %eax
cmovbq %rax, %r8
movq %r8, 0x18(%rbx)
movq 0x20(%rbx), %rsi
movl $0x8, %ecx
callq 0xe9758
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0xf66ff
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq 0x10(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_make_path
void de_strarray_make_path(struct de_strarray *sa, de_ucstring *path, unsigned int flags)
{
	size_t i;

	for(i=0; i<sa->count; i++) {
		i64 oldlen = path->len;

		if(ucstring_isnonempty(sa->ss[i])) {
			ucstring_append_ucstring(path, sa->ss[i]);
		}
		else {
			ucstring_append_char(path, '_');
		}

		mp_squash_slashes(path, oldlen);
		if((i+1 < sa->count) || !(flags & DE_MPFLAG_NOTRAILINGSLASH)) {
			ucstring_append_char(path, '/');
		}
	}
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0xf73af
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq 0x10(%r14), %r13
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rsi
testq %rsi, %rsi
je 0xf734e
cmpq $0x0, 0x10(%rsi)
jle 0xf734e
movq %r14, %rdi
callq 0xf6509
jmp 0xf735b
movq %r14, %rdi
movl $0x5f, %esi
callq 0xf6542
movq 0x10(%r14), %rax
cmpq %r13, %rax
jle 0xf737f
movq 0x8(%r14), %rcx
cmpl $0x2f, (%rcx,%r13,4)
jne 0xf7377
movl $0x5f, (%rcx,%r13,4)
incq %r13
cmpq %r13, %rax
jne 0xf7368
incq %r12
movq 0x10(%r15), %rax
cmpq %rax, %r12
setae %cl
testb %cl, %bl
jne 0xf73a1
movq %r14, %rdi
movl $0x2f, %esi
callq 0xf6542
movq 0x10(%r15), %rax
cmpq %rax, %r12
jb 0xf732c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_get_bmp_compression_name
void fmtutil_get_bmp_compression_name(u32 code, char *s, size_t s_len,
	int is_os2v2)
{
	const char *name1 = "?";
	switch(code) {
	case 0: name1 = "BI_RGB, uncompressed"; break;
	case 1: name1 = "BI_RLE8"; break;
	case 2: name1 = "BI_RLE4"; break;
	case 3:
		if(is_os2v2)
			name1 = "Huffman 1D";
		else
			name1 = "BI_BITFIELDS, uncompressed";
		break;
	case 4:
		if(is_os2v2)
			name1 = "RLE24";
		else
			name1 = "BI_JPEG";
		break;
	case 5: name1 = "BI_PNG"; break;
	}
	de_strlcpy(s, name1, s_len);
}

// Assembly:
movq %rsi, %rax
cmpl $0x5, %edi
ja 0xf7416
movl %edi, %esi
leaq 0x52c4f(%rip), %rdi     # 0x14a010
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
leaq 0x52faf(%rip), %rsi     # 0x14a380
jmp 0xf741d
testl %ecx, %ecx
leaq 0x52fef(%rip), %rcx     # 0x14a3cb
leaq 0x25015(%rip), %rsi     # 0x11c3f8
jmp 0xf73fe
leaq 0x52fb1(%rip), %rsi     # 0x14a39d
jmp 0xf741d
testl %ecx, %ecx
leaq 0x52fb9(%rip), %rcx     # 0x14a3b0
leaq 0x52fa7(%rip), %rsi     # 0x14a3a5
cmoveq %rcx, %rsi
jmp 0xf741d
leaq 0x52f8a(%rip), %rsi     # 0x14a395
jmp 0xf741d
leaq 0x52fbf(%rip), %rsi     # 0x14a3d3
jmp 0xf741d
leaq 0x34d34(%rip), %rsi     # 0x12c151
movq %rax, %rdi
jmp 0xe8219
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_generate_bmpfileheader
void fmtutil_generate_bmpfileheader(deark *c, dbuf *outf, const struct de_bmpinfo *bi,
	i64 file_size_override)
{
	i64 file_size_to_write;

	dbuf_write(outf, (const u8*)"BM", 2);

	if(file_size_override)
		file_size_to_write = file_size_override;
	else
		file_size_to_write = 14 + bi->total_size;
	dbuf_writeu32le(outf, file_size_to_write);

	dbuf_write_zeroes(outf, 4);
	dbuf_writeu32le(outf, 14 + bi->size_of_headers_and_pal);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x247ff(%rip), %rsi     # 0x11c10e
movl $0x2, %edx
movq %rbx, %rdi
callq 0xef547
testq %r15, %r15
jne 0xf792c
movq 0x90(%r14), %r15
addq $0xe, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf1042
movl $0x4, %esi
movq %rbx, %rdi
callq 0xf0d35
movq 0x88(%r14), %rsi
addq $0xe, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf1042
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_exif2
void fmtutil_handle_exif2(deark *c, i64 pos, i64 len,
	u32 *returned_flags, u32 *orientation, u32 *exifversion)
{
	int user_opt;
	de_module_params *mparams = NULL;

	if(returned_flags) {
		*returned_flags = 0;
	}

	user_opt = de_get_ext_option_bool(c, "extractexif", -1);
	if(user_opt==1 || (c->extract_level>=2 && user_opt!=0)) {
		// Writing raw Exif data isn't very useful, but do so if requested.
		dbuf_create_file_from_slice(c->infile, pos, len, "exif.tif", NULL, DE_CREATEFLAG_IS_AUX);

		// Caller will have to reprocess the Exif file to extract anything from it.
		return;
	}

	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.codes = "E";

	de_run_module_by_id_on_slice(c, "tiff", mparams, c->infile, pos, len);
	if(returned_flags) {
		// FIXME: It's an unfortunate bug that returned_flags does not work if
		// extract_level>=2, but for now there's no reasonable way to fix it.
		// We have to process -- not extract -- the Exif chunk if we want to
		// know what's in it.
		*returned_flags = mparams->out_params.flags;
		if((mparams->out_params.flags & 0x20) && orientation) {
			*orientation = mparams->out_params.uint1;
		}

		if((mparams->out_params.flags & 0x40) && exifversion) {
			*exifversion = mparams->out_params.uint2;
		}
	}

	de_free(c, mparams);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
testq %rcx, %rcx
je 0xf7986
movl $0x0, (%r12)
leaq 0x52ac9(%rip), %rsi     # 0x14a456
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xe9bd0
cmpl $0x1, %eax
je 0xf79ad
testl %eax, %eax
je 0xf79da
cmpl $0x2, 0x90(%r14)
jl 0xf79da
movq 0x18(%r14), %rdi
leaq 0x52aaa(%rip), %rcx     # 0x14a462
movq %rbx, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xefd48
movq %rbp, (%rsp)
movl $0x70, %esi
movq %r14, %rdi
callq 0xe8b2b
movq %rax, %rbp
leaq 0x31c6f(%rip), %rax     # 0x129664
movq %rax, (%rbp)
movq 0x18(%r14), %rcx
leaq 0x52a8c(%rip), %rsi     # 0x14a490
movq %r14, %rdi
movq %rbp, %rdx
movq %rbx, %r8
movq %r13, %r9
callq 0xe9aa3
testq %r12, %r12
je 0xf7a4e
movl 0x40(%rbp), %eax
movl %eax, (%r12)
testb $0x20, %al
sete %cl
testq %r15, %r15
sete %dl
orb %cl, %dl
jne 0xf7a39
movl 0x44(%rbp), %eax
movl %eax, (%r15)
movl 0x40(%rbp), %eax
cmpq $0x0, (%rsp)
je 0xf7a4e
andl $0x40, %eax
je 0xf7a4e
movl 0x48(%rbp), %eax
movq (%rsp), %rcx
movl %eax, (%rcx)
movq %r14, %rdi
movq %rbp, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_iptc
void fmtutil_handle_iptc(deark *c, dbuf *f, i64 pos, i64 len,
	unsigned int flags)
{
	int should_decode;
	int should_extract;
	int user_opt;
	int extract_fmt = 1; // 0=raw, 1=TIFF-wrapped

	if(len<1) return;

	user_opt = de_get_ext_option_bool(c, "extractiptc", -1);

	if(user_opt==1 || (c->extract_level>=2 && user_opt!=0)) {
		should_decode = 0;
		should_extract = 1;
		if(flags&0x2) {
			// Avoid "extracting" in a way that would just recreate the exact same file.
			extract_fmt = 0;
		}
	}
	else {
		should_decode = 1;
		should_extract = 0;
	}

	if(should_decode) {
		de_run_module_by_id_on_slice(c, "iptc", NULL, f, pos, len);
	}

	if(should_extract && extract_fmt==0) {
		dbuf_create_file_from_slice(f, pos, len, "iptc", NULL, DE_CREATEFLAG_IS_AUX);
	}
	else if(should_extract && extract_fmt==1) {
		wrap_in_tiff(c, f, pos, len, "Deark extracted IPTC", 33723, "iptctiff",
			DE_CREATEFLAG_IS_AUX);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rcx, %rcx
jle 0xf7ae8
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x529d0(%rip), %rsi     # 0x14a46b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xe9bd0
cmpl $0x1, %eax
je 0xf7ab9
testl %eax, %eax
je 0xf7b1f
cmpl $0x1, 0x90(%r12)
jle 0xf7b1f
testb $0x2, %bpl
jne 0xf7af5
leaq 0x529c6(%rip), %rax     # 0x14a48c
movq %rax, (%rsp)
leaq 0x529a6(%rip), %r8      # 0x14a477
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x83bb, %r9d           # imm = 0x83BB
callq 0xf7b45
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x52976(%rip), %rcx     # 0x14a472
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xefd48
leaq 0x5294c(%rip), %rsi     # 0x14a472
movq %r12, %rdi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe9aa3
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_photoshop_rsrc2
void fmtutil_handle_photoshop_rsrc2(deark *c, dbuf *f, i64 pos, i64 len,
	unsigned int flags, struct de_module_out_params *oparams)
{
	int should_decode;
	int should_extract;
	int extract_fmt = 1; // 0=raw, 1=TIFF-wrapped

	if(flags&0x1) {
		should_decode = 0;
		should_extract = 1;
	}
	else if(de_get_ext_option_bool(c, "extract8bim", 0)) {
		should_extract = 1;
		should_decode = 0;
		if(flags&0x2) {
			// Avoid "extracting" in a way that would just recreate the exact same file.
			extract_fmt = 0;
		}
	}
	else {
		should_decode = 1;
		should_extract = 0;
	}

	if(should_decode) {
		de_module_params *mparams = NULL;

		mparams = de_malloc(c, sizeof(de_module_params));
		mparams->in_params.codes = "R";
		if(oparams) {
			// Since mparams->out_params is an embedded struct, not a pointer,
			// we have to copy oparam's fields to and from it.
			mparams->out_params = *oparams; // struct copy
		}
		de_run_module_by_id_on_slice(c, "psd", mparams, f, pos, len);
		if(oparams) {
			*oparams = mparams->out_params; // struct copy
		}
		de_free(c, mparams);
	}

	if(should_extract && extract_fmt==0) {
		dbuf_create_file_from_slice(f, pos, len, "8bim", NULL, DE_CREATEFLAG_IS_AUX);
	}
	else if(should_extract && extract_fmt==1) {
		wrap_in_tiff(c, f, pos, len, "Deark extracted 8BIM", 34377, "8bimtiff",
			DE_CREATEFLAG_IS_AUX);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testb $0x1, %bpl
jne 0xf7dad
movq %r9, %r13
leaq 0x3b19d(%rip), %rsi     # 0x132f32
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe9bd0
testl %eax, %eax
je 0xf7de5
testb $0x2, %bpl
jne 0xf7e58
leaq 0x526f6(%rip), %rax     # 0x14a4aa
movq %rax, (%rsp)
leaq 0x526d6(%rip), %r8      # 0x14a495
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl $0x8649, %r9d           # imm = 0x8649
callq 0xf7b45
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %rbp
leaq 0x543ea(%rip), %rax     # 0x14c1e6
movq %rax, (%rbp)
testq %r13, %r13
je 0xf7e84
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x60(%rbp)
movups %xmm1, 0x50(%rbp)
movups %xmm0, 0x40(%rbp)
leaq 0x3aff1(%rip), %rsi     # 0x132e18
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xe9aa3
movups 0x40(%rbp), %xmm0
movups 0x50(%rbp), %xmm1
movups 0x60(%rbp), %xmm2
movups %xmm0, (%r13)
movups %xmm1, 0x10(%r13)
movups %xmm2, 0x20(%r13)
jmp 0xf7e9f
leaq 0x3b0da(%rip), %rcx     # 0x132f39
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xefd48
leaq 0x3af8d(%rip), %rsi     # 0x132e18
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0xe9aa3
movq %rbx, %rdi
movq %rbp, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_plist
void fmtutil_handle_plist(deark *c, dbuf *f, i64 pos, i64 len,
	de_finfo *fi, unsigned int flags)
{
	if(de_get_ext_option_bool(c, "extractplist", 0)) {
		dbuf_create_file_from_slice(f, pos, len,
			fi?NULL:"plist", fi, DE_CREATEFLAG_IS_AUX);
		return;
	}

	de_run_module_by_id_on_slice(c, "plist", NULL, f, pos, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x525d4(%rip), %rsi     # 0x14a4b3
xorl %edx, %edx
callq 0xe9bd0
testl %eax, %eax
je 0xf7f1a
xorl %ecx, %ecx
testq %r12, %r12
leaq 0x1edc6(%rip), %rax     # 0x116cbc
cmoveq %rax, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
movl $0x1, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xefd48
leaq 0x1ed9b(%rip), %rsi     # 0x116cbc
movq %r13, %rdi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe9aa3
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_detect_SAUCE
int fmtutil_detect_SAUCE(deark *c, dbuf *f, struct de_SAUCE_detection_data *sdd,
	unsigned int flags)
{
	de_zeromem(sdd, sizeof(struct de_SAUCE_detection_data));
	if(f->len<128) return 0;
	if(dbuf_memcmp(f, f->len-128, "SAUCE00", 7)) return 0;
	if(flags & 0x1) {
		de_dbg(c, "SAUCE metadata, signature at %"I64_FMT, f->len-128);
	}
	sdd->has_SAUCE = 1;
	sdd->data_type = dbuf_getbyte(f, f->len-128+94);
	sdd->file_type = dbuf_getbyte(f, f->len-128+95);
	return (int)sdd->has_SAUCE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movb $0x0, 0x2(%rdx)
movw $0x0, (%rdx)
movq 0x18(%rsi), %rsi
xorl %r12d, %r12d
cmpq $0x80, %rsi
jl 0xf7fd1
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r15
addq $-0x80, %rsi
leaq 0x4ae15(%rip), %rdx     # 0x142d89
movl $0x7, %ecx
movq %r14, %rdi
callq 0xefc85
testl %eax, %eax
jne 0xf7fd1
testb $0x1, %bpl
je 0xf7fa4
movq 0x18(%r14), %rdx
addq $-0x80, %rdx
leaq 0x52526(%rip), %rsi     # 0x14a4c0
movq %r15, %rdi
xorl %eax, %eax
callq 0xe8617
movb $0x1, (%rbx)
movq 0x18(%r14), %rsi
addq $-0x22, %rsi
movq %r14, %rdi
callq 0xeead3
movb %al, 0x1(%rbx)
movq 0x18(%r14), %rsi
addq $-0x21, %rsi
movq %r14, %rdi
callq 0xeead3
movb %al, 0x2(%rbx)
movzbl (%rbx), %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_free_SAUCE
void fmtutil_free_SAUCE(deark *c, struct de_SAUCE_info *si)
{
	if(!si) return;
	ucstring_destroy(si->title);
	ucstring_destroy(si->artist);
	ucstring_destroy(si->organization);
	ucstring_destroy(si->comment);
	de_free(c, si);
}

// Assembly:
testq %rsi, %rsi
je 0xf8077
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
callq 0xf6753
movq 0x10(%rbx), %rdi
callq 0xf6753
movq 0x18(%rbx), %rdi
callq 0xf6753
movq 0x60(%rbx), %rdi
callq 0xf6753
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_read_boxes_format
void fmtutil_read_boxes_format(deark *c, struct de_boxesctx *bctx)
{
	struct boxes_parser_data *pctx = NULL;

	if(!bctx->f || !bctx->handle_box_fn) return; // Internal error
	if(bctx->curbox) return; // Internal error

	pctx = de_malloc(c, sizeof(struct boxes_parser_data));
	bctx->private_data = (void*)pctx;
	do_box_sequence(c, bctx, 0, bctx->f->len, -1, 0);
	bctx->private_data = NULL;
	de_free(c, pctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x10(%rsi)
je 0xf8333
movq %rsi, %r14
cmpq $0x0, 0x20(%rsi)
je 0xf8333
cmpq $0x0, 0x28(%r14)
je 0xf8339
popq %rbx
popq %r14
popq %r15
retq
movq %rdi, %rbx
movl $0x82, %esi
callq 0xe8b2b
movq %rax, %r15
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rax
movq 0x18(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %r8
xorl %r9d, %r9d
callq 0xf8384
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_find_zip_eocd
int fmtutil_find_zip_eocd(deark *c, dbuf *f, UI flags, i64 *foundpos)
{
	u32 bof_sig;
	u32 sig;
	int skip_sanity_check = 0;
	u8 *buf = NULL;
	int retval = 0;
	i64 buf_offset;
	i64 buf_size;
	i64 pos;
	i64 i;

	*foundpos = 0;
	if(f->len < 22) goto done;

	bof_sig = (u32)dbuf_getu32be(f, 0);
	if(bof_sig==CODE_PK36) {
		skip_sanity_check = 1;
	}

	// End-of-central-dir record usually starts 22 bytes from EOF. Try that first.
	pos = f->len - 22;
	sig = (u32)dbuf_getu32be(f, pos);
	if(sig==CODE_PK56 && (skip_sanity_check || is_sane_zip_eocd(f, pos))) {
		*foundpos = pos;
		retval = 1;
		goto done;
	}

	if(flags & 0x1) goto done;

	// Search for the signature.
	// The end-of-central-directory record could theoretically appear anywhere
	// in the file. We'll follow Info-Zip/UnZip's lead and search the last 66000
	// bytes.
#define MAX_ZIP_EOCD_SEARCH 66000
	buf_size = f->len;
	if(buf_size > MAX_ZIP_EOCD_SEARCH) buf_size = MAX_ZIP_EOCD_SEARCH;

	buf = de_malloc(c, buf_size);
	buf_offset = f->len - buf_size;
	dbuf_read(f, buf, buf_offset, buf_size);

	for(i=buf_size-22; i>=0; i--) {
		if(buf[i]=='P' && buf[i+1]=='K' && buf[i+2]==5 && buf[i+3]==6 &&
			(skip_sanity_check || is_sane_zip_eocd(f, buf_offset+i)))
		{
			*foundpos = buf_offset + i;
			retval = 1;
			goto done;
		}
	}

done:
	de_free(c, buf);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $0x0, (%rcx)
cmpq $0x16, 0x18(%rsi)
jge 0xf8efb
xorl %r15d, %r15d
xorl %ebp, %ebp
jmp 0xf9008
movq %rcx, %r14
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, (%rsp)
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
callq 0xeed0d
movl %eax, %ebp
movq 0x18(%r12), %r13
addq $-0x16, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xeed0d
cmpl $0x504b0506, %eax       # imm = 0x504B0506
jne 0xf8f58
cmpl $0x504b0306, %ebp       # imm = 0x504B0306
je 0xf8f48
movq %r12, %rdi
movq %r13, %rsi
callq 0xf9022
testl %eax, %eax
je 0xf8f58
xorl %ebp, %ebp
movq %r13, (%r14)
movl $0x1, %r15d
jmp 0xf9004
testb $0x1, %bl
jne 0xf9002
movq %rbp, 0x8(%rsp)
movq 0x18(%r12), %rax
movq %rax, 0x10(%rsp)
movl $0x101d0, %ebx          # imm = 0x101D0
cmpq %rbx, %rax
cmovlq %rax, %rbx
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xe8b2b
movq %rax, %rbp
movq 0x18(%r12), %r13
movq %r13, %rdx
subq %rbx, %rdx
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0xee8d4
cmpq $0x16, 0x10(%rsp)
jl 0xf9004
addq $-0x16, %rbx
addq $-0x16, %r13
cmpb $0x50, (%rbp,%rbx)
jne 0xf8ff1
cmpb $0x4b, 0x1(%rbp,%rbx)
jne 0xf8ff1
cmpb $0x5, 0x2(%rbp,%rbx)
jne 0xf8ff1
cmpb $0x6, 0x3(%rbp,%rbx)
jne 0xf8ff1
cmpl $0x504b0306, 0x8(%rsp)  # imm = 0x504B0306
je 0xf8f4a
movq %r12, %rdi
movq %r13, %rsi
callq 0xf9022
testl %eax, %eax
jne 0xf8f4a
leaq -0x1(%rbx), %rax
decq %r13
testq %rbx, %rbx
movq %rax, %rbx
jg 0xf8fb4
jmp 0xf9004
xorl %ebp, %ebp
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0xe8be2
movl %r15d, %eax
addq $0x18, %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/fmtutil.c
// Function: is_sane_zip_eocd
static int is_sane_zip_eocd(dbuf *f, i64 pos)
{
	i64 this_disk_num;
	i64 disk_num_with_central_dir_start;
	i64 central_dir_num_entries;
	i64 central_dir_byte_size;
	i64 central_dir_offset;

	// Validating Zip64 would take more work.
	if(dbuf_getu32be(f, pos-20) == CODE_PK67) return 1;

	this_disk_num = dbuf_getu16le(f, pos+4);
	disk_num_with_central_dir_start = dbuf_getu16le(f, pos+6);

	if(this_disk_num > 100) return 0;
	if(disk_num_with_central_dir_start > this_disk_num) return 0;
	if(disk_num_with_central_dir_start < this_disk_num-1) return 0;

	central_dir_num_entries = dbuf_getu16le(f, pos+10);
	central_dir_byte_size = dbuf_getu32le(f, pos+12);

	if(central_dir_byte_size < 46*central_dir_num_entries) return 0;

	if(this_disk_num==disk_num_with_central_dir_start) {
		if(central_dir_byte_size > f->len) return 0;
		central_dir_offset = dbuf_getu32le(f, pos+16);
		if(central_dir_offset > f->len) return 0;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $-0x14, %rsi
callq 0xeed0d
movl $0x1, %ebp
cmpq $0x504b0607, %rax       # imm = 0x504B0607
je 0xf90d3
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
callq 0xeebc8
movq %rax, %r15
leaq 0x6(%r14), %rsi
movq %rbx, %rdi
callq 0xeebc8
movq %rax, %r12
cmpq $0x65, %r15
setge %al
cmpq %r15, %r12
setg %cl
orb %al, %cl
leaq -0x1(%r15), %rax
cmpq %rax, %r12
setl %al
xorl %ebp, %ebp
orb %cl, %al
jne 0xf90d3
leaq 0xa(%r14), %rsi
movq %rbx, %rdi
callq 0xeebc8
movq %rax, %r13
leaq 0xc(%r14), %rsi
movq %rbx, %rdi
callq 0xeed61
imulq $0x2e, %r13, %rcx
cmpq %rcx, %rax
jl 0xf90d3
cmpq %r12, %r15
jne 0xf90ce
cmpq 0x18(%rbx), %rax
jg 0xf90d3
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xeed61
cmpq 0x18(%rbx), %rax
jg 0xf90d3
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/fmtutil.c
// Function: fmtutil_riscos_read_load_exec
void fmtutil_riscos_read_load_exec(deark *c, dbuf *f, struct de_riscos_file_attrs *rfa, i64 pos1)
{
	i64 pos = pos1;

	rfa->load_addr = (u32)dbuf_getu32le_p(f, &pos);
	rfa->exec_addr = (u32)dbuf_getu32le_p(f, &pos);
	de_dbg(c, "load/exec addrs: 0x%08x, 0x%08x", (unsigned int)rfa->load_addr,
		(unsigned int)rfa->exec_addr);
	de_dbg_indent(c, 1);
	if((rfa->load_addr&0xfff00000U)==0xfff00000U) {
		rfa->file_type = (unsigned int)((rfa->load_addr&0xfff00)>>8);
		rfa->file_type_known = 1;
		de_dbg(c, "file type: %03X", rfa->file_type);

		de_riscos_loadexec_to_timestamp(rfa->load_addr, rfa->exec_addr, &rfa->mod_time);
		dbg_timestamp(c, &rfa->mod_time, "timestamp");
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %rcx, (%r12)
movq %rsi, %rdi
movq %r12, %rsi
callq 0xeed83
movl %eax, 0x4(%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0xeed83
movl %eax, 0x8(%r14)
movl 0x4(%r14), %edx
leaq 0x514e9(%rip), %rsi     # 0x14a7b3
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0x4(%r14), %edx
cmpl $0xfff00000, %edx       # imm = 0xFFF00000
jb 0xf9357
shrl $0x8, %edx
andl $0xfff, %edx            # imm = 0xFFF
movl %edx, 0x10(%r14)
movb $0x1, (%r14)
leaq 0x514cc(%rip), %rsi     # 0x14a7d3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x4(%r14), %edi
movl 0x8(%r14), %esi
addq $0x20, %r14
movq %r14, %rdx
callq 0xeac2b
leaq 0x10(%rsp), %r15
movl $0x40, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0x5003f(%rip), %rsi     # 0x149382
leaq 0x4ab99(%rip), %rdx     # 0x143ee3
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_riscos_read_attribs_field
void fmtutil_riscos_read_attribs_field(deark *c, dbuf *f, struct de_riscos_file_attrs *rfa,
	i64 pos, unsigned int flags)
{
	rfa->attribs = (u32)dbuf_getu32le(f, pos);
	de_dbg(c, "attribs: 0x%08x", (unsigned int)rfa->attribs);
	de_dbg_indent(c, 1);
	rfa->crc_from_attribs = rfa->attribs>>16;
	if(flags & DE_RISCOS_FLAG_HAS_CRC) {
		de_dbg(c, "crc (reported): 0x%04x", (unsigned int)rfa->crc_from_attribs);
	}
	if(flags & DE_RISCOS_FLAG_HAS_LZWMAXBITS) {
		rfa->lzwmaxbits = (unsigned int)((rfa->attribs&0xff00)>>8);
		de_dbg(c, "lzw maxbits: %u", rfa->lzwmaxbits);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rcx, %rsi
callq 0xeed61
movl %eax, 0xc(%r14)
leaq 0x4c146(%rip), %rsi     # 0x1454d9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0xc(%r14), %edx
shrl $0x10, %edx
movl %edx, 0x18(%r14)
testb $0x1, %bpl
je 0xf93ce
leaq 0x4ba68(%rip), %rsi     # 0x144e2c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
testb $0x2, %bpl
je 0xf93ee
movzbl 0xd(%r14), %edx
movl %edx, 0x14(%r14)
leaq 0x513ff(%rip), %rsi     # 0x14a7e3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_riscos_append_type_to_filename
void fmtutil_riscos_append_type_to_filename(deark *c, de_finfo *fi, de_ucstring *fn,
	struct de_riscos_file_attrs *rfa, int is_dir, int enabled_by_default)
{
	if(is_dir || !rfa->file_type_known) return;
	if(ucstring_isempty(fn)) return;

	// 0xff = Haven't looked for this opt
	// 0xfe = We looked, it's not there
	// 0 = Requested to be off
	// 1 = Requested to be on
	if(c->append_riscos_type==0xff) {
		c->append_riscos_type = (u8)de_get_ext_option_bool(c, "riscos:appendtype", 0xfe);
	}
	if(c->append_riscos_type==0) return;
	if(c->append_riscos_type==0xfe) {
		if(!enabled_by_default) return;
		if(!c->filenames_from_file) return;

		// By default, with ZIP output, we'll use extended fields instead of
		// mangling the filename.
		if(c->output_style==DE_OUTPUTSTYLE_ARCHIVE && c->archive_fmt==DE_ARCHIVEFMT_ZIP)
			return;
	}

	ucstring_printf(fn, DE_ENCODING_LATIN1, ",%03X", rfa->file_type);
	fi->riscos_appended_type = 1;
}

// Assembly:
testl %r8d, %r8d
je 0xf9405
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
cmpb $0x0, (%rcx)
je 0xf94a7
movl %r9d, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq %rdx, %rdi
callq 0xf678d
testl %eax, %eax
jne 0xf94a7
movb 0xd4(%r12), %al
cmpb $-0x1, %al
jne 0xf9459
leaq 0x513af(%rip), %rsi     # 0x14a7f3
movq %r12, %rdi
movl $0xfe, %edx
callq 0xe9bd0
movb %al, 0xd4(%r12)
testb %al, %al
je 0xf94a7
movzbl %al, %eax
cmpl $0xfe, %eax
jne 0xf9489
testl %ebp, %ebp
je 0xf94a7
cmpb $0x0, 0xd0(%r12)
je 0xf94a7
cmpl $0x1, 0x7c(%r12)
jne 0xf9489
cmpl $0x1, 0x80(%r12)
je 0xf94a7
movl 0x10(%r15), %ecx
leaq 0x51371(%rip), %rdx     # 0x14a805
movq %r14, %rdi
movl $0x5, %esi
xorl %eax, %eax
callq 0xf6653
movb $0x1, 0x11(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_macbitmap_read_baseaddr
void fmtutil_macbitmap_read_baseaddr(deark *c, dbuf *f, struct fmtutil_macbitmap_info *bi, i64 pos)
{
	i64 n;
	de_dbg(c, "baseAddr part of PixMap, at %d", (int)pos);
	de_dbg_indent(c, 1);
	n = dbuf_getu32be(f, pos);
	de_dbg(c, "baseAddr: 0x%08x", (unsigned int)n);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x51346(%rip), %rsi     # 0x14a80b
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r15, %rdi
movq %r14, %rsi
callq 0xeed0d
leaq 0x5133c(%rip), %rsi     # 0x14a82a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_macbitmap_read_rowbytes_and_bounds
void fmtutil_macbitmap_read_rowbytes_and_bounds(deark *c, dbuf *f,
	struct fmtutil_macbitmap_info *bi, i64 pos)
{
	struct pict_rect tmprect;
	i64 rowbytes_code;

	de_dbg(c, "rowBytes/bounds part of bitmap/PixMap header, at %d", (int)pos);
	de_dbg_indent(c, 1);
	rowbytes_code = dbuf_getu16be(f, pos);
	bi->rowbytes = rowbytes_code & 0x7fff;
	bi->pixmap_flag = (rowbytes_code & 0x8000)?1:0;
	de_dbg(c, "rowBytes: %d", (int)bi->rowbytes);
	de_dbg(c, "pixmap flag: %d", bi->pixmap_flag);

	pict_read_rect(f, pos+2, &tmprect, "rect");
	bi->npwidth = tmprect.r - tmprect.l;
	bi->pdwidth = bi->npwidth; // default
	bi->height = tmprect.b - tmprect.t;

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x5130e(%rip), %rsi     # 0x14a83b
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r15, %rdi
movq %r12, %rsi
callq 0xeeb67
movl %eax, %edx
andl $0x7fff, %edx           # imm = 0x7FFF
movq %rdx, (%rbx)
shrl $0xf, %eax
andl $0x1, %eax
movl %eax, 0x6c(%rbx)
leaq 0x3b9a7(%rip), %rsi     # 0x134f11
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x6c(%rbx), %edx
leaq 0x512f1(%rip), %rsi     # 0x14a86f
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
leaq 0x2(%r12), %rsi
movq %r15, %rdi
callq 0xeec17
movq %rax, 0x10(%rsp)
leaq 0x4(%r12), %rsi
movq %r15, %rdi
callq 0xeec17
movq %rax, %rbp
leaq 0x6(%r12), %rsi
movq %r15, %rdi
callq 0xeec17
movq %rax, %r13
addq $0x8, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xeec17
movq %rax, %r12
movq 0x8(%r15), %rdi
movl %r13d, (%rsp)
leaq 0x3a386(%rip), %rsi     # 0x133961
leaq 0x2f73e(%rip), %rdx     # 0x128d20
movl %ebp, %ecx
movq 0x10(%rsp), %r15
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0xe8617
subq %rbp, %r12
movq %r12, 0x10(%rbx)
movq %r12, 0x18(%rbx)
subq %r15, %r13
movq %r13, 0x20(%rbx)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_cus_p
i64 fmtutil_hlp_get_cus_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = (i64)dbuf_getbyte_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two.
		return x1>>1;
	}
	// If it's odd, divide by two, and add 128 times the value of
	// the next byte.
	x2 = (i64)dbuf_getbyte_p(f, ppos);
	return (x1>>1) | (x2<<7);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xeeb4b
movzbl %al, %ebx
testb $0x1, %bl
jne 0xf99f1
shrl %ebx
jmp 0xf9a06
movq %r15, %rdi
movq %r14, %rsi
callq 0xeeb4b
shrl %ebx
movzbl %al, %eax
shll $0x7, %eax
orl %eax, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_css_p
i64 fmtutil_hlp_get_css_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = (i64)dbuf_getbyte_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two, and subtract 64
		return (x1>>1) - 64;
	}
	// If it's odd, divide by two, add 128 times the value of
	// the next byte, and subtract 16384.
	x1 >>= 1;
	x2 = (i64)dbuf_getbyte_p(f, ppos);
	x1 += x2 * 128;
	x1 -= 16384;
	return x1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xeeb4b
movzbl %al, %eax
movl %eax, %ebx
shrl %ebx
testb $0x1, %al
jne 0xf9a30
addq $-0x40, %rbx
jmp 0xf9a4b
movq %r15, %rdi
movq %r14, %rsi
callq 0xeeb4b
movzbl %al, %eax
shll $0x7, %eax
addq %rax, %rbx
addq $-0x4000, %rbx          # imm = 0xC000
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_cul_p
i64 fmtutil_hlp_get_cul_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;
	x1 = dbuf_getu16le_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two.
		return x1>>1;
	}
	// If it's odd, divide by two, and add 32768 times the value of
	// the next two bytes.
	x2 = dbuf_getu16le_p(f, ppos);
	return (x1>>1) | (x2<<15);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xeebeb
movq %rax, %rbx
testb $0x1, %bl
jne 0xf9a71
sarq %rbx
jmp 0xf9a86
movq %r15, %rdi
movq %r14, %rsi
callq 0xeebeb
sarq %rbx
shlq $0xf, %rax
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_csl_p
i64 fmtutil_hlp_get_csl_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = dbuf_getu16le_p(f, ppos);

	if(x1%2 == 0) {
		// If it's even, divide by two, and subtract 16384
		return (x1>>1) - 16384;
	}
	// If it's odd, divide by two, add 32768 times the value of
	// the next two bytes, and subtract 67108864.
	x1 >>= 1;
	x2 = dbuf_getu16le_p(f, ppos);
	x1 += x2*32768;
	x1 -= 67108864;
	return x1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xeebeb
movq %rax, %rbx
sarq %rbx
testb $0x1, %al
jne 0xf9ab2
addq $-0x4000, %rbx          # imm = 0xC000
jmp 0xf9acb
movq %r15, %rdi
movq %r14, %rsi
callq 0xeebeb
shlq $0xf, %rax
addq %rax, %rbx
addq $-0x4000000, %rbx       # imm = 0xFC000000
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_scan_for_arj_data
int fmtutil_scan_for_arj_data(dbuf *f, i64 startpos, i64 max_skip,
	UI flags, i64 *pfoundpos)
{
	struct de_crcobj *crco = NULL;
	i64 curpos, endpos;
	int retval = 0;

	curpos = startpos;
	endpos = startpos + max_skip + 2; // Search space includes the 2-byte signature
	if(endpos-2 > f->len-ARJ_MIN_FILE_SIZE) endpos = (f->len-ARJ_MIN_FILE_SIZE)+2;

	while(curpos<=(endpos-2)) {
		int ret;

		ret = dbuf_search(f, (const u8*)"\x60\xea", 2, curpos, endpos-curpos,
			pfoundpos);
		if(!ret) goto done;

		if(crco) {
			de_crcobj_reset(crco);
		}
		else {
			crco = de_crcobj_create(f->c, DE_CRCOBJ_CRC32_IEEE);
		}
		if(is_arj_data_at1(f, *pfoundpos, crco)) {
			retval = 1;
			goto done;
		}
		curpos = *pfoundpos+2; // Continue the search here
	}

done:
	de_crcobj_destroy(crco);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rcx
leaq (%rdx,%rsi), %rax
addq $0x2, %rax
addq %rsi, %rdx
movq 0x18(%rdi), %rbx
leaq -0x54(%rbx), %rsi
addq $-0x52, %rbx
cmpq %rsi, %rdx
cmovleq %rax, %rbx
leaq -0x2(%rbx), %rax
movq %rax, 0x10(%rsp)
cmpq %rcx, %rax
jge 0xf9b19
xorl %r12d, %r12d
jmp 0xf9be6
movq %r8, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq %rbx, 0x8(%rsp)
movq %rbx, %r8
subq %rcx, %r8
movl $0x2, %edx
movq %r15, %rdi
leaq 0x1e488(%rip), %rsi     # 0x117fc4
movq %r14, %r9
callq 0xf149c
testl %eax, %eax
je 0xf9be6
testq %r12, %r12
je 0xf9b5b
movq %r12, %rdi
callq 0xeb7fe
jmp 0xf9b6c
movq 0x8(%r15), %rdi
movl $0x10, %esi
callq 0xeb499
movq %rax, %r12
movq (%r14), %r13
leaq 0x2(%r13), %rsi
movq %r15, %rdi
callq 0xeebc8
movq %rax, %rbp
addq $-0xa29, %rax           # imm = 0xF5D7
cmpq $-0xa0b, %rax           # imm = 0xF5F5
jb 0xf9bd4
leaq 0xa(%r13), %rsi
movq %r15, %rdi
callq 0xeead3
cmpb $0x2, %al
jne 0xf9bd4
leaq 0x4(%r13), %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0xeb944
movq %r12, %rdi
callq 0xeb865
movl %eax, %ebx
leaq 0x4(,%r13), %rsi
addq %rbp, %rsi
movq %r15, %rdi
callq 0xeed61
cmpl %eax, %ebx
movq 0x8(%rsp), %rbx
je 0xf9c01
movq (%r14), %rcx
addq $0x2, %rcx
cmpq 0x10(%rsp), %rcx
jle 0xf9b27
xorl %ebx, %ebx
movq %r12, %rdi
callq 0xeb858
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %ebx
jmp 0xf9be8
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil.c
// Function: fmtid_is_dll
static int fmtid_is_dll(deark *c, struct fmtutil_fmtid_ctx *idctx)
{
	int retval = 0;
	dbuf *tmpf = NULL;
	struct fmtutil_exe_info *ei = NULL;

	if(!idctx->inf) goto done;
	if(de_getu32le_direct(&idctx->bof64bytes[60]) == 0) goto done;

	tmpf = dbuf_open_input_subfile(idctx->inf, idctx->inf_pos, idctx->inf_len);
	ei = de_malloc(c, sizeof(struct fmtutil_exe_info));
	fmtutil_collect_exe_info(c, tmpf, ei);
	if(ei->is_dll) {
		retval = 1;
	}

done:
	de_free(c, ei);
	dbuf_close(tmpf);
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0xfa178
movq %rsi, %r14
leaq 0x64(%rsi), %rdi
callq 0xeed5e
testq %rax, %rax
je 0xfa178
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
callq 0xf1388
movq %rax, %r14
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x104f96
xorl %r15d, %r15d
cmpb $0x0, 0x63(%r12)
setne %r15b
jmp 0xfa181
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8be2
movq %r14, %rdi
callq 0xf052b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_init_objects
void de_dfilter_init_objects(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	if(dcmpri)
		de_zeromem(dcmpri, sizeof(struct de_dfilter_in_params));
	if(dcmpro)
		de_zeromem(dcmpro, sizeof(struct de_dfilter_out_params));
	if(dres)
		de_dfilter_results_clear(c, dres);
}

// Assembly:
testq %rsi, %rsi
je 0xfa1eb
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
testq %rdx, %rdx
je 0xfa1fe
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
testq %rcx, %rcx
je 0xfa219
movl $0x0, (%rcx)
xorl %eax, %eax
movb %al, 0x4(%rcx)
movq $0x0, 0x8(%rcx)
movb %al, 0x10(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_set_errorf
void de_dfilter_set_errorf(deark *c, struct de_dfilter_results *dres, const char *modname,
	const char *fmt, ...)
{
	va_list ap;

	if(dres->errcode != 0) return; // Only record the first error
	dres->errcode = 1;

	va_start(ap, fmt);
	if(modname) {
		char tmpbuf[80];

		de_vsnprintf(tmpbuf, sizeof(tmpbuf), fmt, ap);
		de_snprintf(dres->errmsg, sizeof(dres->errmsg), "[%s] %s", modname, tmpbuf);
	}
	else {
		de_vsnprintf(dres->errmsg, sizeof(dres->errmsg), fmt, ap);
	}
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xfa26b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x0, (%rsi)
jne 0xfa304
movq %rdx, %r14
movq %rsi, %rbx
movl $0x1, (%rsi)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rsp)
testq %rdx, %rdx
je 0xfa2ea
leaq 0xd0(%rsp), %r15
movq %rsp, %rax
movl $0x50, %esi
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x10, %rbx
leaq 0x4283f(%rip), %rdx     # 0x13cb12
movl $0x50, %esi
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0xe8193
jmp 0xfa304
addq $0x10, %rbx
movq %rsp, %rax
movl $0x50, %esi
movq %rbx, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109360
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_create
struct de_dfilter_ctx *de_dfilter_create(deark *c,
	dfilter_codec_type codec_init_fn, void *codec_private_params,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dfilter_ctx *dfctx = NULL;

	dfctx = de_malloc(c, sizeof(struct de_dfilter_ctx));
	dfctx->c = c;
	dfctx->dres = dres;
	dfctx->dcmpro = dcmpro;

	if(codec_init_fn) {
		codec_init_fn(dfctx, codec_private_params);
	}
	// TODO: How should we handle failure to initialize a codec?

	return dfctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rbp
movl $0x50, %esi
callq 0xe8b2b
movq %rax, %r15
movq %rbp, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
testq %rbx, %rbx
je 0xfa364
movq %r15, %rdi
movq %r14, %rsi
callq *%rbx
movq %r15, %rax
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/fmtutil-cmpr.c
// Function: de_dfilter_addbuf
void de_dfilter_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	if(dfctx->finished_flag) return;

	if(dfctx->codec_addbuf_fn && (buf_len>0)) {
		dfctx->codec_addbuf_fn(dfctx, buf, buf_len);

		if(dfctx->dres->errcode) {
			dfctx->finished_flag = 1;
		}
	}
}

// Assembly:
cmpb $0x0, 0x20(%rdi)
je 0xfa37d
retq
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
sete %cl
testq %rdx, %rdx
setle %dil
orb %cl, %dil
jne 0xfa3a9
movq %rbx, %rdi
callq *%rax
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
je 0xfa3a9
movb $0x1, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_destroy
void de_dfilter_destroy(struct de_dfilter_ctx *dfctx)
{
	deark *c;

	if(!dfctx) return;
	c = dfctx->c;
	if(dfctx->codec_destroy_fn) {
		dfctx->codec_destroy_fn(dfctx);
	}

	de_free(c, dfctx);
}

// Assembly:
testq %rdi, %rdi
je 0xfa403
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0xfa3f1
movq %rbx, %rdi
callq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_dfilter_addslice_buffered_read_cbfn
static int my_dfilter_addslice_buffered_read_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct de_dfilter_ctx *dfctx = (struct de_dfilter_ctx *)brctx->userdata;

	de_dfilter_addbuf(dfctx, buf, buf_len);
	if(dfctx->finished_flag) return 0;
	return 1;
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
xorl %eax, %eax
cmpb $0x0, 0x20(%rbx)
jne 0xfa46d
movq 0x30(%rbx), %rcx
testq %rcx, %rcx
sete %dil
testq %rdx, %rdx
setle %r8b
movl $0x1, %eax
orb %dil, %r8b
jne 0xfa46d
movq %rbx, %rdi
callq *%rcx
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
je 0xfa464
movb $0x1, 0x20(%rbx)
xorl %eax, %eax
jmp 0xfa46d
xorl %eax, %eax
cmpb $0x0, 0x20(%rbx)
sete %al
popq %rbx
retq