LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: do_all_leaf_nodes
static int do_all_leaf_nodes(deark *c, lctx *d, struct nodedata *hdr_node, int pass)
{
	i64 curr_nodenum;
	struct nodedata *nd = NULL;
	int retval = 0;

	de_dbg(c, "reading leaf nodes, pass %d", pass);
	de_dbg_indent(c, 1);

	// Read all leaf nodes, using the leaf-to-leaf links
	curr_nodenum = hdr_node->bthFNode;

	while(curr_nodenum!=0) {
		nd = de_malloc(c, sizeof(struct nodedata));
		nd->nodenum = curr_nodenum;

		if(!do_node(c, d, nd, pass)) goto done;

		curr_nodenum = nd->f_link;
		destroy_nodedata(c, nd);
		nd = NULL;
	}
	retval = 1;

done:
	destroy_nodedata(c, nd);
	de_dbg_indent(c, -1);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xcabea(%rip), %rsi     # 0x120efb
xorl %r12d, %r12d
movl %ecx, %edx
xorl %eax, %eax
callq 0xe9226
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x38(%r13), %r13
testq %r13, %r13
je 0x5637d
movl $0x50, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r12
movq %r13, 0x8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %r14d, %ecx
callq 0x55b2f
testl %eax, %eax
je 0x5637b
movq 0x18(%r12), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x563a6
testq %r13, %r13
jne 0x56338
xorl %r12d, %r12d
jmp 0x5637d
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x563a6
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
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_O1/jsummers[P]deark/modules/hfs.c
// Function: get_full_path_from_dirid
static void get_full_path_from_dirid(deark *c, lctx *d, u32 dirid, de_ucstring *s,
	int depth)
{
	void *item;
	int ret;
	struct dirid_item_struct *dirid_item;

	if(depth>20) goto done;
	if(dirid==0) goto done;
	ret = de_inthashtable_get_item(c, d->dirid_hash, (i64)dirid, &item);
	if(!ret && dirid>1) {
		de_warn(c, "Unknown parent directory (ID %u)", (unsigned int)dirid);
	}
	if(!ret) goto done;
	dirid_item = (struct dirid_item_struct*)item;

	if(dirid_item->ParID!=0 && dirid_item->ParID!=dirid) {
		get_full_path_from_dirid(c, d, dirid_item->ParID, s, depth+1);
	}

	if(!ucstring_isnonempty(dirid_item->name)) goto done;
	ucstring_append_ucstring(s, dirid_item->name);
	ucstring_append_sz(s, "/", DE_ENCODING_LATIN1);
done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
cmpl $0x15, %r8d
setge %al
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x5694a
movl %r8d, %ebp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
movq 0xb0(%rsi), %rsi
movl %edx, %edx
movq %rsp, %rcx
callq 0xeb8a9
movl %eax, %r13d
testl %eax, %eax
setne %al
cmpl $0x2, %r12d
setb %cl
orb %al, %cl
jne 0x568ee
leaq 0xca40d(%rip), %rsi     # 0x120cee
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9b27
testl %r13d, %r13d
je 0x5694a
movq (%rsp), %r13
movl (%r13), %edx
testl %edx, %edx
sete %al
cmpl %r12d, %edx
sete %cl
orb %al, %cl
jne 0x5691d
incl %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x56888
movq 0x8(%r13), %rdi
callq 0xf6c00
testl %eax, %eax
je 0x5694a
movq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0xf6969
leaq 0xbb731(%rip), %rsi     # 0x11206e
movq %rbx, %rdi
movl $0x5, %edx
callq 0xf6a40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: read_timestamp_fields
static void read_timestamp_fields(deark *c, lctx *d, i64 pos1,
	de_finfo *fi1)
{
	i64 pos = pos1;

	read_one_timestamp(c, d, pos, &fi1->timestamp[DE_TIMESTAMPIDX_CREATE], "create date");
	pos += 4;
	read_one_timestamp(c, d, pos, &fi1->timestamp[DE_TIMESTAMPIDX_MODIFY], "mod date");
	pos += 4;
	read_one_timestamp(c, d, pos, &fi1->timestamp[DE_TIMESTAMPIDX_BACKUP], "backup date");
	//pos += 4;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rdx), %r12
addq $0x28, %rdx
leaq 0xca107(%rip), %rcx     # 0x120a80
callq 0x55a19
leaq 0x4(%r14), %rsi
leaq 0xca10d(%rip), %rcx     # 0x120a96
movq %r15, %rdi
movq %r12, %rdx
callq 0x55a19
addq $0x8, %r14
addq $0x58, %rbx
leaq 0xc01c6(%rip), %rcx     # 0x116b69
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x55a19
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: do_extract_fork_init
static void do_extract_fork_init(deark *c, lctx *d, struct recorddata *rd,
	struct fork_info *fki)
{
	i64 len_avail;

	len_avail = d->drAlBlkSiz * (fki->ExtRec[0].num_alloc_blks +
		fki->ExtRec[1].num_alloc_blks + fki->ExtRec[2].num_alloc_blks);
	if(fki->logical_eof > len_avail) {
		// TODO: Need to be able to read the Extents Overflow tree.
		de_err(c, "%s: Files with more than 3 fragments are not supported",
			rd->name_srd?ucstring_getpsz(rd->name_srd->str):"");
		fki->extract_error_flag = 1;
		goto done;
	}

done:
	;
}

// Assembly:
movq 0x38(%rcx), %rax
addq 0x28(%rcx), %rax
addq 0x48(%rcx), %rax
imulq 0x20(%rsi), %rax
cmpq %rax, 0x10(%rcx)
jle 0x56a17
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x18(%rdx), %rax
testq %rax, %rax
je 0x569f4
movq 0x18(%rax), %rdi
callq 0xf74bd
movq %rax, %rdx
jmp 0x569fb
leaq 0xee1d5(%rip), %rdx     # 0x144bd0
leaq 0xca3ef(%rip), %rsi     # 0x120df1
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: do_extract_fork_run
static void do_extract_fork_run(deark *c, lctx *d, struct recorddata *rd,
	struct fork_info *fki, dbuf *outf)
{
	i64 nbytes_still_to_write;
	size_t k;

	nbytes_still_to_write = fki->logical_eof;

	for(k=0; k<3; k++) {
		i64 fragment_dpos;
		i64 nbytes_to_write_this_time;

		if(nbytes_still_to_write<=0) break;

		fragment_dpos = allocation_blk_dpos(d, fki->ExtRec[k].first_alloc_blk);
		nbytes_to_write_this_time = d->drAlBlkSiz * fki->ExtRec[k].num_alloc_blks;
		if(nbytes_to_write_this_time > nbytes_still_to_write) {
			nbytes_to_write_this_time = nbytes_still_to_write;
		}

		if(fragment_dpos + nbytes_to_write_this_time > c->infile->len) {
			de_err(c, "Member file data goes beyond end of file");
			goto done;
		}

		dbuf_copy(c->infile, fragment_dpos, nbytes_to_write_this_time, outf);

		nbytes_still_to_write -= nbytes_to_write_this_time;
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rcx
movq 0x10(%rdx), %r13
xorl %ebx, %ebx
movq %rdi, 0x8(%rsp)
movb $0x1, %r12b
testq %r13, %r13
jle 0x56ae5
movq 0x20(%r15), %rbp
movq 0x30(%r15), %rax
imulq 0x8(%r15), %rax
movq 0x20(%r14,%rbx), %rsi
imulq %rbp, %rsi
imulq 0x28(%r14,%rbx), %rbp
addq %rax, %rsi
cmpq %r13, %rbp
cmovgeq %r13, %rbp
leaq (%rsi,%rbp), %rax
movq 0x18(%rcx), %rdi
cmpq 0x18(%rdi), %rax
jle 0x56acd
movq %rcx, %rdi
leaq 0xca369(%rip), %rsi     # 0x120e28
xorl %eax, %eax
callq 0xe9df7
movq 0x8(%rsp), %rcx
jmp 0x56ae5
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
callq 0xefabc
movq 0x8(%rsp), %rcx
subq %rbp, %r13
xorl %r12d, %r12d
testb %r12b, %r12b
jne 0x56af7
leaq 0x10(%rbx), %rax
cmpq $0x20, %rbx
movq %rax, %rbx
jne 0x56a79
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: de_module_hlp
void de_module_hlp(deark *c, struct deark_module_info *mi)
{
	mi->id = "hlp";
	mi->desc = "HLP";
	mi->run_fn = de_run_hlp;
	mi->identify_fn = de_identify_hlp;
	mi->help_fn = de_help_hlp;
}

// Assembly:
leaq 0xca4a1(%rip), %rax     # 0x120fb0
movq %rax, (%rsi)
leaq 0xca49b(%rip), %rax     # 0x120fb4
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x56b3f
movq %rax, 0x18(%rsi)
leaq 0x2a2(%rip), %rax       # 0x56dd1
movq %rax, 0x20(%rsi)
leaq 0x2bd(%rip), %rax       # 0x56df7
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_extract_raw_file
static void do_extract_raw_file(deark *c, lctx *d, i64 pos1, i64 used_space,
	struct de_stringreaderdata *fn)
{
	de_finfo *fi = NULL;
	const char *ext = NULL;

	fi = de_finfo_create(c);
	fi->timestamp[DE_TIMESTAMPIDX_MODIFY] = d->gendate;
	if(fn && ucstring_isnonempty(fn->str)) {
		de_finfo_set_name_from_ucstring(c, fi, fn->str, 0);
		fi->original_filename_flag = 1;
	}
	else {
		ext = "bin";
	}
	dbuf_create_file_from_slice(c->infile, pos1, used_space, ext, fi, 0);

	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
callq 0xea9a9
movq %rax, %r15
movups 0x120(%r13), %xmm0
movups %xmm0, 0x18(%rax)
leaq 0xde42c(%rip), %r13     # 0x135431
testq %rbp, %rbp
je 0x57030
movq 0x18(%rbp), %rdi
callq 0xf6c00
testl %eax, %eax
je 0x57030
movq 0x18(%rbp), %rdx
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xea9e4
movb $0x1, 0x8(%r15)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %r9d, %r9d
callq 0xf0321
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea9b3
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_file_PhrImage
static void do_file_PhrImage(deark *c, lctx *d, i64 pos1, i64 len)
{
	de_dbg(c, "PhrImage data at %"I64_FMT", len=%"I64_FMT, pos1, len);
	if(len < d->PhrImageCmprSize) {
		return;
	}

	if(d->PhrImageCmprSize == d->PhrImageUncSize) {
		dbuf_copy(c->infile, pos1, d->PhrImageCmprSize, d->phrases_data);
	}
	else {
		decompress_Phrases(c, d, pos1, d->PhrImageCmprSize, d->PhrImageUncSize);
		de_dbg(c, "decompressed to %"I64_FMT" bytes", d->phrases_data->len);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc8fdf(%rip), %rsi     # 0x1218d5
xorl %eax, %eax
callq 0xe9226
movq 0xe8(%r14), %rcx
cmpq %r12, %rcx
jle 0x58915
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xe0(%r14), %r8
cmpq %r8, %rcx
jne 0x58945
movq 0x18(%rbx), %rdi
movq 0xf0(%r14), %rax
movq %r15, %rsi
movq %rcx, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xefabc
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x59756
movq 0xf0(%r14), %rax
movq 0x18(%rax), %rdx
leaq 0xbaeb1(%rip), %rsi     # 0x113816
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_file_SHG
static void do_file_SHG(deark *c, lctx *d, i64 pos1, i64 used_space)
{
	i64 oldsig;
	const char *ext;
	dbuf *outf = NULL;
	de_finfo *fi = NULL;

	// Reportedly, 0x506c = SHG = 1 image, and 0x706c = MRB = >1 image.
	// But I'm not convinced that's correct.
	// I'm not sure what to do, as far as selecting a file extension, and potentially
	// correcting the signature. Current behavior is to leave the signature the same,
	// and derive the file extension from the number of images.
	oldsig = de_getu16le(pos1);

	if(oldsig==0x506c || oldsig==0x706c) {
		i64 num_images;

		num_images = de_getu16le(pos1+2);
		if(num_images>1) {
			ext="mrb";
		}
		else {
			ext="shg";
		}
	}
	else {
		ext="bin";
	}

	fi = de_finfo_create(c);
	// (Note that if we were to correct the signature, we probably should not copy
	// the mod time.)
	fi->timestamp[DE_TIMESTAMPIDX_MODIFY] = d->gendate;
	outf = dbuf_create_output_file(c, ext, fi, 0);
	dbuf_copy(c->infile, pos1, used_space, outf);
	dbuf_close(outf);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef1ca
andq $-0x2001, %rax          # imm = 0xDFFF
cmpq $0x506c, %rax           # imm = 0x506C
jne 0x58ea2
movq 0x18(%rbx), %rdi
leaq 0x2(%r15), %rsi
callq 0xef1ca
cmpq $0x2, %rax
leaq 0xc8c18(%rip), %rax     # 0x121aad
leaq 0xc81a4(%rip), %r13     # 0x121040
cmovgeq %rax, %r13
jmp 0x58ea9
leaq 0xdc588(%rip), %r13     # 0x135431
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %rbp
movups 0x120(%r12), %xmm0
movups %xmm0, 0x18(%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0xefabc
movq %r12, %rdi
callq 0xf0b13
movq %rbx, %rdi
movq %rbp, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea9b3
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: format_topiclink
static void format_topiclink(deark *c, lctx *d, u32 n, char *buf, size_t buf_len)
{
	if(d->ver_minor<=16) {
		de_snprintf(buf, buf_len, "%u", (UI)n);
	}
	else {
		if(n==INVALIDPOS) {
			de_strlcpy(buf, "-1", buf_len);
		}
		else {
			de_snprintf(buf, buf_len, "Blk%u:%u", (UI)(n/16384),
				(UI)(n%16384));
		}
	}
}

// Assembly:
movq %rdx, %rax
movl %esi, %r8d
cmpl $0x10, 0x8c(%rdi)
jg 0x58f2f
leaq 0xbc4a7(%rip), %rdx     # 0x1153c4
movl $0x18, %esi
movq %rax, %rdi
movl %r8d, %ecx
xorl %eax, %eax
jmp 0xe8d67
cmpl $-0x1, %r8d
je 0x58f58
movl %r8d, %ecx
shrl $0xe, %ecx
andl $0x3fff, %r8d           # imm = 0x3FFF
leaq 0xc84f1(%rip), %rdx     # 0x12143a
movl $0x18, %esi
movq %rax, %rdi
xorl %eax, %eax
jmp 0xe8d67
leaq 0xbd2cb(%rip), %rsi     # 0x11622a
movl $0x18, %edx
movq %rax, %rdi
jmp 0xe8ded
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_phrase_decompression
static void do_phrase_decompression(deark *c, lctx *d, dbuf *inf, i64 pos1, i64 len,
	dbuf *outf,  i64 unc_len_expected)
{
	i64 pos = pos1;
	i64 endpos = pos1+len;

	if(!d->phrases_data) return;

	while(1) {
		u8 b;

		if(pos >= endpos) break;
		b = dbuf_getbyte_p(inf, &pos);
		if(b==0 || b>=0x10) {
			dbuf_writebyte(outf, b);
		}
		else {
			u8 b2;
			UI n;

			if(pos >= endpos) break;
			b2 = dbuf_getbyte_p(inf, &pos);
			n = ((UI)(b-1)<<8) | b2;
			emit_phrase(c, d, outf, n>>1);
			if(n & 0x1) {
				dbuf_writebyte(outf, ' ');
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, (%rsp)
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0xf0(%rdi)
je 0x59063
movq %r8, %r13
movq %rcx, %r14
movq %rsi, %r15
addq %rdx, %r14
movq %r8, 0x8(%rsp)
movl $0x3, %ebx
cmpq %r14, (%rsp)
jge 0x5905b
movq %r15, %rdi
movq %rsp, %rsi
callq 0xef14d
movzbl %al, %ebp
leal -0x10(%rbp), %eax
cmpb $-0x10, %al
ja 0x58fd5
movq %r13, %rdi
movl %ebp, %esi
callq 0xf11be
jmp 0x59059
movq (%rsp), %r12
movl $0x3, %ebx
cmpq %r14, %r12
jge 0x59054
movq %r15, %rdi
movq %rsp, %rsi
callq 0xef14d
movl %eax, %r13d
shll $0x8, %ebp
movzbl %al, %eax
addl %ebp, %eax
addl $0xffffff00, %eax       # imm = 0xFFFFFF00
shrl %eax
movq 0x10(%rsp), %rcx
cmpl %eax, 0xf8(%rcx)
jbe 0x59033
movq 0x10(%rsp), %rcx
movq 0xf0(%rcx), %rdi
movq 0x100(%rcx), %rcx
movl %eax, %eax
movl (%rcx,%rax,8), %esi
movl 0x4(%rcx,%rax,8), %edx
movq 0x8(%rsp), %rcx
callq 0xefabc
xorl %ebx, %ebx
testb $0x1, %r13b
jne 0x59042
movq 0x8(%rsp), %r13
jmp 0x59054
movq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x20, %esi
callq 0xf11be
cmpq %r14, %r12
jge 0x5905b
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x58fa2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_hall_decompression
static void do_hall_decompression(deark *c, lctx *d, dbuf *inf, i64 pos1, i64 len,
	dbuf *outf, i64 unc_len_expected)
{
	static const u8 action[16] = {0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4};
	i64 pos = pos1;
	i64 endpos = pos1+len;
	UI n;
	i64 outf_expected_endpos;

	outf_expected_endpos = outf->len + unc_len_expected;

	while(1) {
		u8 b;

		if(outf->len >= outf_expected_endpos) goto unc_done;
		if(pos >= endpos) goto unc_done;
		b = dbuf_getbyte_p(inf, &pos);
		switch(action[b&0x0f]) {
		case 0:
			emit_phrase(c, d, outf, b>>1);
			break;
		case 1:
			if(pos >= endpos) goto unc_done;
			n = (((UI)b & 0xfc) << 6) | 0x80;
			n += dbuf_getbyte_p(inf, &pos);
			emit_phrase(c, d, outf, n);
			break;
		case 2:
			n = (b >> 3) +1;
			if(pos + (i64)n > endpos) goto unc_done;
			dbuf_copy(inf, pos, (i64)n, outf);
			pos += (i64)n;
			break;
		case 3:
			dbuf_write_run(outf, ' ', (i64)(b>>4)+1);
			break;
		default: // 4
			dbuf_write_zeroes(outf, (i64)(b>>4)+1);
			break;
		}
	}
unc_done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
testq %r9, %r9
setle %al
testq %rcx, %rcx
setle %cl
orb %al, %cl
jne 0x591e5
movq %r9, %rbx
movq %r8, %r14
movq %rsi, %r12
addq 0x18(%r8), %rbx
addq %rdx, %r15
leaq 0xc7ebc(%rip), %r13     # 0x120f74
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movzbl %al, %ebp
movl %ebp, %eax
andl $0xf, %eax
leaq 0xc8a5c(%rip), %rcx     # 0x121b30
movzbl (%rax,%rcx), %eax
cmpq $0x3, %rax
ja 0x591c4
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl %ebp
movq 0x10(%rsp), %rax
cmpl %ebp, 0xf8(%rax)
jbe 0x591d4
movq 0x10(%rsp), %rax
movq 0xf0(%rax), %rdi
movq 0x100(%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,8), %esi
movl 0x4(%rax,%rcx,8), %edx
jmp 0x591ba
shrl $0x3, %ebp
movq 0x8(%rsp), %rsi
leaq (%rsi,%rbp), %rax
incq %rax
cmpq %r15, %rax
jg 0x591e5
incq %rbp
movq %r12, %rdi
movq %rbp, %rdx
movq %r14, %rcx
callq 0xefabc
addq %rbp, 0x8(%rsp)
jmp 0x591d4
shrl $0x4, %ebp
incl %ebp
movq %r14, %rdi
movl $0x20, %esi
movq %rbp, %rdx
callq 0xf14bd
jmp 0x591d4
cmpq %r15, 0x8(%rsp)
jge 0x591e5
shll $0x6, %ebp
andl $0x3f00, %ebp           # imm = 0x3F00
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movzbl %al, %eax
addl %ebp, %eax
addl $0x80, %eax
movq 0x10(%rsp), %rcx
cmpl %eax, 0xf8(%rcx)
jbe 0x591d4
movq 0x10(%rsp), %rcx
movq 0xf0(%rcx), %rdi
movq 0x100(%rcx), %rcx
movl %eax, %eax
movl (%rcx,%rax,8), %esi
movl 0x4(%rcx,%rax,8), %edx
movq %r14, %rcx
callq 0xefabc
jmp 0x591d4
shrl $0x4, %ebp
incl %ebp
movq %r14, %rdi
movq %rbp, %rsi
callq 0xf1346
cmpq %rbx, 0x18(%r14)
jge 0x591e5
cmpq %r15, 0x8(%rsp)
jl 0x590b8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_topiclink_rectype_2
static void do_topiclink_rectype_2(deark *c, lctx *d,
	struct topic_ctx *tctx, struct topiclink_data *tld, dbuf *linkdata2)
{
	if(!d->extract_text) goto done;
	ensure_text_output_file_open(c, d);

	do_topiclink_rectype_2_linkdata2(c, d, tctx, tld, linkdata2);
done:
	;
}

// Assembly:
cmpl $0x0, 0x8(%rsi)
je 0x59570
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x59571
movq 0xd0(%rbx), %rdi
xorl %esi, %esi
callq 0xf152a
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x594d5
leaq 0xc81cc(%rip), %rsi     # 0x12169c
callq 0xf16f0
cmpq $0x0, 0x18(%r15)
jle 0x59531
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
movq %r12, %rsi
callq 0xef0d5
movl %eax, %ebp
testb %al, %al
je 0x59506
movq 0xd0(%rbx), %rdi
movzbl %bpl, %esi
callq 0xf11be
incl %r13d
testb %bpl, %bpl
je 0x59514
incq %r12
cmpq 0x18(%r15), %r12
jl 0x594e2
testl %r13d, %r13d
jle 0x59531
movq 0xd0(%rbx), %rdx
movq 0x18(%rdx), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x59668
jmp 0x59549
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x59549
leaq 0xc815b(%rip), %rsi     # 0x12169f
callq 0xf16f0
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0x59570
leaq 0xc8145(%rip), %rsi     # 0x1216b0
jmp 0xf16f0
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: ensure_text_output_file_open
static void ensure_text_output_file_open(deark *c, lctx *d)
{
	if(d->outf_text) return;
	d->outf_text = dbuf_create_output_file(c, "dump.txt", NULL, 0);
	if(d->output_is_utf8 && c->write_bom) {
		dbuf_write_uchar_as_utf8(d->outf_text, 0xfeff);
	}
	if(ucstring_isnonempty(d->help_file_title)) {
		dbuf_puts(d->outf_text, "Title: ");
		// TODO: This doesn't do the right thing if !d->output_is_utf8.
		ucstring_write_as_utf8(c, d->help_file_title, d->outf_text, 0);
		dbuf_puts(d->outf_text, "\n");
	}
	if(ucstring_isnonempty(d->help_file_copyright)) {
		dbuf_puts(d->outf_text, "Copyright: ");
		ucstring_write_as_utf8(c, d->help_file_copyright, d->outf_text, 0);
		dbuf_puts(d->outf_text, "\n");
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0xc0(%rsi)
je 0x59587
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc80bc(%rip), %rsi     # 0x121650
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, 0xc0(%rbx)
cmpl $0x0, 0x4(%rbx)
je 0x595c1
cmpb $0x0, 0xcc(%r14)
je 0x595c1
movq %rax, %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0xec81c
movq 0x110(%rbx), %rdi
callq 0xf6c00
testl %eax, %eax
je 0x5960f
movq 0xc0(%rbx), %rdi
leaq 0xc807a(%rip), %rsi     # 0x121659
callq 0xf16f0
movq 0xc0(%rbx), %rdx
movq 0x110(%rbx), %rsi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0xf71f7
movq 0xc0(%rbx), %rdi
leaq 0xb6b91(%rip), %rsi     # 0x11019b
callq 0xf16f0
movq 0x118(%rbx), %rdi
callq 0xf6c00
testl %eax, %eax
je 0x5957f
movq 0xc0(%rbx), %rdi
leaq 0xc8030(%rip), %rsi     # 0x121661
callq 0xf16f0
movq 0xc0(%rbx), %rdx
movq 0x118(%rbx), %rsi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0xf71f7
movq 0xc0(%rbx), %rdi
leaq 0xb6b3f(%rip), %rsi     # 0x11019b
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf16f0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: emit_slice
static void emit_slice(deark *c, lctx *d, dbuf *inf, i64 pos, i64 len)
{
	if(!d->outf_text) return;

	if(!d->output_is_utf8) {
		dbuf_copy(inf, pos, len, d->outf_text);
		return;
	}

	ucstring_empty(d->tmpucstring1);
	dbuf_read_to_ucstring(inf, pos, len, d->tmpucstring1, 0, d->input_encoding);
	ucstring_write_as_utf8(c, d->tmpucstring1, d->outf_text, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq 0xc0(%rsi), %rcx
testq %rcx, %rcx
je 0x596d7
movq %rdx, %r12
movq %rsi, %r15
cmpl $0x0, 0x4(%rsi)
je 0x596e3
movq %rdi, %r14
movq 0x108(%r15), %rdi
callq 0xf6883
movq 0x108(%r15), %rcx
movl (%r15), %r9d
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xf01b0
movq 0xc0(%r15), %rdx
movq 0x108(%r15), %rsi
movq %r14, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf71f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xefabc
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: dump_phrase_offset_table
static void dump_phrase_offset_table(deark *c, lctx *d)
{
	UI k;

	for(k=0; k<d->num_phrases; k++) {
		de_dbg2(c, "phrase[%u]: offs=%u, len=%u", k, d->phrase_info[k].pos,
			d->phrase_info[k].len);
	}
}

// Assembly:
cmpl $0x0, 0xf8(%rsi)
je 0x59755
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc8115(%rip), %r15     # 0x12182e
xorl %r12d, %r12d
movq 0x100(%rbx), %rax
movl (%rax,%r12,8), %ecx
movl 0x4(%rax,%r12,8), %r8d
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe93cf
incq %r12
movl 0xf8(%rbx), %eax
cmpq %rax, %r12
jb 0x5971c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: decompress_Phrases
static void decompress_Phrases(deark *c, lctx *d, i64 pos, i64 cmpr_len, i64 uncmpr_len)
{
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = pos;
	dcmpri.len = cmpr_len;
	dcmpro.f = d->phrases_data;
	dcmpro.len_known = 1;
	dcmpro.expected_len = uncmpr_len;
	fmtutil_hlp_lz77_codectype1(c, &dcmpri, &dcmpro, &dres, NULL);
	if(dres.errcode || (d->phrases_data->len!=uncmpr_len)) {
		de_warn(c, "Phrases decompression may have failed");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x28(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0x48(%rsp), %rcx
movq %rbp, %rsi
movq %r14, %rdx
callq 0xfa6e0
movq 0x18(%rbx), %rax
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movq %r12, 0x10(%rbp)
movq %r15, %r12
movq 0x8(%rsp), %r15
movq 0xf0(%r12), %rax
movq %rax, (%r14)
movb $0x1, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xfb446
cmpl $0x0, (%r14)
jne 0x597eb
movq 0xf0(%r12), %rax
cmpq %r15, 0x18(%rax)
je 0x597fc
leaq 0xc8058(%rip), %rsi     # 0x12184a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9b27
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hlp.c
// Function: do_display_and_store_STRINGZ
static void do_display_and_store_STRINGZ(deark *c, lctx *d, i64 pos1, i64 len,
	const char *name, de_ucstring *s1)
{
	de_ucstring *s_tmp = NULL;
	de_ucstring *s;

	if(s1) {
		s = s1;
	}
	else {
		s_tmp = ucstring_create(c);
		s = s_tmp;
	}

	ucstring_empty(s);
	if(len<1) return;

	dbuf_read_to_ucstring_n(c->infile,
		pos1, len, DE_DBG_MAX_STRLEN,
		s, DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz(s));

	if(s_tmp) ucstring_destroy(s_tmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r15
testq %r9, %r9
je 0x5983a
movq %r9, %r13
xorl %r14d, %r14d
jmp 0x59848
movq %r15, %rdi
callq 0xf6870
movq %rax, %r14
movq %rax, %r13
movq %r13, %rdi
callq 0xf6883
testq %r12, %r12
jle 0x598b3
movq 0x18(%r15), %rdi
movl (%rbx), %eax
movl %eax, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %r8
movl $0x1, %r9d
callq 0xf0203
movq %r13, %rdi
callq 0xf74bd
leaq 0xd25bc(%rip), %rsi     # 0x12be42
movq %r15, %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
testq %r14, %r14
je 0x598b3
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6bb0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/dsstore.c
// Function: de_module_dsstore
void de_module_dsstore(deark *c, struct deark_module_info *mi)
{
	mi->id = "dsstore";
	mi->desc = "Mac Finder .DS_Store format";
	mi->run_fn = de_run_dsstore;
	mi->identify_fn = de_identify_dsstore;
	mi->help_fn = de_help_dsstore;
}

// Assembly:
leaq 0xc8275(%rip), %rax     # 0x121b40
movq %rax, (%rsi)
leaq 0xc8273(%rip), %rax     # 0x121b48
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x598fb
movq %rax, 0x18(%rsi)
leaq 0x433(%rip), %rax       # 0x59d1e
movq %rax, 0x20(%rsi)
leaq 0x44e(%rip), %rax       # 0x59d44
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: de_module_fli
void de_module_fli(deark *c, struct deark_module_info *mi)
{
	mi->id = "fli";
	mi->desc = "FLI/FLC animation";
	mi->run_fn = de_run_fli;
	mi->identify_fn = de_identify_fli;
}

// Assembly:
leaq 0xc7a7d(%rip), %rax     # 0x121e48
movq %rax, (%rsi)
leaq 0xc7a77(%rip), %rax     # 0x121e4c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5a3f0
movq %rax, 0x18(%rsi)
leaq 0x6b(%rip), %rax        # 0x5a456
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: de_run_fli
static void de_run_fli(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 bytes_consumed = 0;

	d = de_malloc(c, sizeof(lctx));

	(void)do_chunk(c, d, NULL, 0, c->infile->len, 0, &bytes_consumed);

	if(d) {
		de_free(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movl $0x50, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r8
movq %r15, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x5a4d3
testq %r14, %r14
je 0x5a44c
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe9752
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: de_identify_fli
static int de_identify_fli(deark *c)
{
	UI ct;
	int has_ext;

	ct = (UI)de_getu16le(4);
	if((ct>>8) != 0xaf) return 0;
	has_ext = de_input_file_has_ext(c, "fli") ||
		de_input_file_has_ext(c, "flc");
	if(ct==CHUNKTYPE_FLI || ct==CHUNKTYPE_FLC) {
		if(has_ext) return 100;
		return 20;
	}
	if(has_ext) return 9;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movl $0x4, %esi
callq 0xef1ca
movq %rax, %rbx
movl %ebx, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
xorl %eax, %eax
cmpl $0xaf00, %ecx           # imm = 0xAF00
jne 0x5a4cb
leaq 0xc79c1(%rip), %rsi     # 0x121e48
movq %r14, %rdi
callq 0xea936
movb $0x1, %cl
testl %eax, %eax
jne 0x5a4a9
leaq 0xc7d15(%rip), %rsi     # 0x1221b1
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
setne %cl
addl $0xffff50ef, %ebx       # imm = 0xFFFF50EF
cmpl $0x1, %ebx
ja 0x5a4c5
testb %cl, %cl
movl $0x64, %ecx
movl $0x14, %eax
cmovnel %ecx, %eax
jmp 0x5a4cb
movzbl %cl, %eax
leal (%rax,%rax,8), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: do_chunk_frame
static void do_chunk_frame(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 num_subchunks;
	i64 frame_idx;
	i64 prev_use_count = 0;
	de_finfo *fi = NULL;

	frame_idx = d->frame_count;
	d->frame_count++;
	de_dbg(c, "frame number: %d", (int)frame_idx);

	num_subchunks = de_getu16le(ci->dpos);
	de_dbg(c, "num subchunks: %"I64_FMT, num_subchunks);

	if(ci->ictx) {
		prev_use_count = ci->ictx->use_count;
	}

	do_sequence_of_chunks(c, d, ci, ci->dpos+10, num_subchunks);

	if(ci->ictx) {
		if(ci->ictx->use_count > prev_use_count && !ci->ictx->error_flag) {
			if(d->num_frames>0 && frame_idx==d->num_frames && c->extract_level<2) {
				de_dbg(c, "[not extracting ring frame]");
				goto done;
			}

			fi = de_finfo_create(c);
			fi->density = ci->ictx->density;
			fi->internal_mod_time = d->mod_timestamp;
			de_bitmap_write_to_file_finfo(ci->ictx->img, fi, 0);
		}
	}

done:
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rsi), %r12
leaq 0x1(%r12), %rax
movq %rax, 0x10(%rsi)
leaq 0xc7426(%rip), %rsi     # 0x1220e8
xorl %ebp, %ebp
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
callq 0xef1ca
movq %rax, %r13
leaq 0xc7414(%rip), %rsi     # 0x1220f9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x5acff
movslq 0x10(%rax), %rbp
movq 0x20(%r14), %rcx
addq $0xa, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %r8
callq 0x5b8c6
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x5ad30
movslq 0x10(%rax), %rcx
cmpq %rcx, %rbp
jge 0x5ad30
cmpl $0x0, 0x14(%rax)
je 0x5ad4c
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea9b3
movq 0x8(%r15), %rax
testq %rax, %rax
setle %cl
cmpq %rax, %r12
setne %al
orb %cl, %al
jne 0x5ad7f
cmpl $0x1, 0x90(%rbx)
jg 0x5ad7f
leaq 0xc739c(%rip), %rsi     # 0x12210c
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
jmp 0x5ad33
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r12
movq 0x48(%r14), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x88(%r12)
movups 0x18(%rax), %xmm0
movups %xmm0, 0x78(%r12)
movups 0x28(%r15), %xmm0
movups %xmm0, 0x68(%r12)
movq 0x48(%r14), %rax
movq 0x30(%rax), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf2917
jmp 0x5ad33
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: do_chunk_colormap
static void do_chunk_colormap(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 npackets;
	i64 pknum;
	i64 pos = ci->dpos;
	int bps;
	UI num_entries_total = 0;
	UI next_idx = 0;

	if(!ci->ictx) return;
	if(ci->chunktype==CHUNKTYPE_COLORMAP256)
		bps = 8;
	else
		bps = 6;
	npackets = de_getu16le_p(&pos);

	for(pknum=0; pknum<npackets; pknum++) {
		UI num_entries_to_skip;
		UI num_entries_to_set;
		UI k;

		if(pos >= ci->pos + ci->len)  goto done;
		num_entries_to_skip = (UI)de_getbyte_p(&pos);
		next_idx += num_entries_to_skip;
		num_entries_to_set = (UI)de_getbyte_p(&pos);
		if(num_entries_to_set==0) num_entries_to_set = 256;
		num_entries_total += num_entries_to_set;

		for(k=0; k<num_entries_to_set; k++) {
			u8 samp[3];
			u32 clr;
			UI z;

			for(z=0; z<3; z++) {
				samp[z] = de_getbyte_p(&pos);
				if(bps==6) {
					samp[z] = de_scale_63_to_255(samp[z]);
				}
			}

			clr = DE_MAKE_RGB(samp[0], samp[1], samp[2]);
			if(next_idx < 256) {
				ci->ictx->pal[next_idx] = clr;
				de_dbg_pal_entry(c, (i64)next_idx, clr);
			}
			next_idx++;
		}
	}
done:
	de_dbg(c, "number of entries: %u", num_entries_total);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x20(%rdx), %rax
movq %rax, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x48(%rdx)
je 0x5af51
movq %rdi, %rbx
movq 0x10(%rsp), %rax
movl (%rax), %r13d
movq 0x18(%rdi), %rdi
leaq 0x18(%rsp), %rsi
callq 0xef1ed
testq %rax, %rax
jle 0x5af3c
movq %rax, %r14
xorl %edx, %edx
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rcx
addq 0x10(%rax), %rcx
movl $0x5, %eax
cmpq %rcx, 0x18(%rsp)
jge 0x5af23
movq %rdx, 0x28(%rsp)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef14d
movzbl %al, %eax
addl %eax, %r15d
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef14d
movzbl %al, %ecx
testb %cl, %cl
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %ecx
addl %ecx, %ebp
movl %ecx, 0x24(%rsp)
testl %ecx, %ecx
je 0x5af1c
movl %ebp, 0x20(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef14d
movb %al, 0xd(%rsp,%rbp)
cmpl $0x4, %r13d
je 0x5aeb9
movzbl %al, %edi
callq 0xecde3
movb %al, 0xd(%rsp,%rbp)
incq %rbp
cmpq $0x3, %rbp
jne 0x5ae97
cmpl $0xff, %r15d
ja 0x5af02
movzbl 0xf(%rsp), %eax
movzbl 0xd(%rsp), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0xe(%rsp), %edx
shll $0x8, %edx
orl %ecx, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movl %r15d, %esi
movl %edx, 0x38(%rax,%rsi,4)
movq %rbx, %rdi
callq 0xe9d68
incl %r15d
incl %r14d
cmpl 0x24(%rsp), %r14d
jne 0x5ae95
xorl %eax, %eax
movl 0x20(%rsp), %ebp
movq 0x30(%rsp), %r14
jmp 0x5af1e
xorl %eax, %eax
movq 0x28(%rsp), %rdx
testl %eax, %eax
jne 0x5af35
incq %rdx
cmpq %r14, %rdx
jne 0x5ae33
jmp 0x5af3e
cmpl $0x5, %eax
je 0x5af3e
jmp 0x5af51
xorl %ebp, %ebp
leaq 0xc71e3(%rip), %rsi     # 0x122128
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: do_chunk_rle
static void do_chunk_rle(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 xpos = 0;
	i64 ypos = 0;
	i64 pos = ci->dpos;
	struct image_ctx_type *ictx;

	if(!ci->ictx) goto done;
	de_dbg(c, "doing RLE decompression");
	ictx = ci->ictx;
	ictx->use_count++;
	pos++; // First byte of each line is a packet count (not needed)

	while(1) {
		UI clridx;
		u8 code;
		i64 count;
		i64 k;

		if(pos >= ci->pos + ci->len) break;

		code = de_getbyte_p(&pos); // packet type/size
		if(code >= 128) { // "negative" = run of uncompressed pixels
			count = (i64)256 - (i64)code;
			for(k=0; k<count; k++) {
				clridx = (UI)de_getbyte_p(&pos);
				de_bitmap_setpixel_rgb(ictx->img, xpos, ypos, ictx->pal[clridx]);
				xpos++;
			}
		}
		else { // "positive" = RLE
			count = (i64)code;
			clridx = (UI)de_getbyte_p(&pos);
			for(k=0; k<count; k++) {
				de_bitmap_setpixel_rgb(ictx->img, xpos, ypos, ictx->pal[clridx]);
				xpos++;
			}
		}

		if(xpos >= ictx->w) {
			xpos = 0;
			ypos++;
			pos++; // packet count
			if(ypos>=ictx->h) break;
		}
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x20(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x48(%rdx)
je 0x5b069
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc71af(%rip), %rsi     # 0x12213e
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xe9226
movq 0x48(%rbx), %rbp
incl 0x10(%rbp)
leaq 0x8(%rsp), %r12
incq (%r12)
xorl %r13d, %r13d
movq %rbx, 0x10(%rsp)
movq 0x18(%rbx), %rax
addq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rsp)
jge 0x5b006
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef14d
movzbl %al, %ebx
testb %al, %al
js 0x5b00a
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef14d
testq %rbx, %rbx
je 0x5b03d
movzbl %al, %r12d
movq 0x30(%rbp), %rdi
movl 0x38(%rbp,%r12,4), %ecx
movq %r13, %rsi
movq %r15, %rdx
callq 0xf2afd
incq %r13
decq %rbx
jne 0x5afe8
jmp 0x5b03d
xorl %eax, %eax
jmp 0x5b061
orq $-0x100, %rbx
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movq 0x30(%rbp), %rdi
movzbl %al, %eax
movl 0x38(%rbp,%rax,4), %ecx
movq %r13, %rsi
movq %r15, %rdx
callq 0xf2afd
incq %r13
incq %rbx
jne 0x5b011
movb $0x1, %al
cmpq (%rbp), %r13
jl 0x5b057
incq %r15
incq 0x8(%rsp)
cmpq 0x8(%rbp), %r15
setl %al
xorl %r13d, %r13d
movq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r12
testb %al, %al
jne 0x5afb1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: do_chunk_copy
static void do_chunk_copy(deark *c, lctx *d, struct chunk_info_type *ci)
{
	if(!ci->ictx) return;
	ci->ictx->use_count++;
	de_convert_image_paletted(c->infile, ci->dpos, 8, ci->ictx->w, ci->ictx->pal,
		ci->ictx->img, 0);
}

// Assembly:
movq 0x48(%rdx), %rax
testq %rax, %rax
je 0x5b4fa
pushq %rax
incl 0x10(%rax)
movq 0x18(%rdi), %rdi
movq 0x20(%rdx), %rsi
leaq 0x38(%rax), %r8
movq (%rax), %rcx
movq 0x30(%rax), %r9
movl $0x0, (%rsp)
movl $0x8, %edx
callq 0xf35b8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: read_timestamp
static void read_timestamp(deark *c, lctx *d, i64 pos, struct de_timestamp *ts,
	const char *name)
{
	i64 datetime_raw;
	i64 date_raw, time_raw;
	struct de_timestamp tmp_timestamp;
	char timestamp_buf[64];

	de_zeromem(ts, sizeof(struct de_timestamp));

	// The timestamp is said to be "MS-DOS formatted", but that's uncomfortably
	// vague, and bogus timestamps seem to be common.

	datetime_raw = de_getu32le_p(&pos);
	de_dbg(c, "%s time: %"I64_FMT, name, datetime_raw);
	if(datetime_raw==0) return;

	de_dbg_indent(c, 1);
	time_raw = datetime_raw & 0xffff;
	date_raw = (datetime_raw >> 16) & 0xffff;

	de_zeromem(&tmp_timestamp, sizeof(struct de_timestamp));
	de_dos_datetime_to_timestamp(&tmp_timestamp, date_raw, time_raw);
	tmp_timestamp.tzcode = DE_TZCODE_LOCAL;
	de_timestamp_to_string(&tmp_timestamp, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "... if DOS time/date: %s", timestamp_buf);

	// Autodesk animator was first released in 1989. Assume timestamps older than
	// the middle of 1988 are bogus.
	if(de_timestamp_to_unix_time(&tmp_timestamp) >= 583718400) {
		*ts = tmp_timestamp;
	}

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq 0x18(%rdi), %rdi
movq %rax, %rsi
callq 0xef3a0
movq %rax, %r15
leaq 0xc68f7(%rip), %rsi     # 0x122089
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
testq %r15, %r15
je 0x5b82c
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movzwl %r15w, %edx
shrl $0x10, %r15d
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0xeae33
movb $0x2, 0x1(%r12)
leaq 0x20(%rsp), %r15
movl $0x40, %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xc689c(%rip), %rsi     # 0x122096
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
callq 0xeb296
cmpq $0x22cad600, %rax       # imm = 0x22CAD600
jl 0x5b81f
movaps (%rsp), %xmm0
movups %xmm0, (%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: dbg_id
static void dbg_id(deark *c, lctx *d, i64 pos, const char *name)
{
	i64 n;
	struct de_fourcc id4cc;

	n = de_getu32le(pos);
	if(n<0x01000000) {
		de_dbg(c, "%s: %"I64_FMT,name, n);
		return;
	}
	dbuf_read_fourcc(c->infile, pos, &id4cc, 4, 0x0);
	de_dbg(c, "%s: %"I64_FMT" (0x%08x, '%s')", name, n, (UI)n,
		id4cc.id_dbgstr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
callq 0xef37e
movq %rax, %r14
cmpq $0xffffff, %rax         # imm = 0xFFFFFF
jg 0x5b882
leaq 0xc6848(%rip), %rsi     # 0x1220af
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe9226
movq 0x18(%r15), %rdi
leaq 0x8(%rsp), %rdx
movq %r12, %rsi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1d74
leaq 0x18(%rsp), %r9
leaq 0xc6810(%rip), %rsi     # 0x1220b7
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe9226
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: do_sequence_of_chunks
static void do_sequence_of_chunks(deark *c, lctx *d, struct chunk_info_type *parent_ci,
	i64 pos1, i64 max_nchunks)
{
	i64 pos = pos1;
	i64 endpos = parent_ci->pos + parent_ci->len;
	i64 chunk_idx = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	if(!parent_ci) goto done;
	if(parent_ci->level > 10) goto done;
	if(pos+6 >= endpos) goto done;
	de_dbg(c, "sequence of chunks at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	while(1) {
		i64 bytes_avail;
		i64 bytes_consumed = 0;
		int ret;

		if(max_nchunks>=0 && chunk_idx>=max_nchunks) break;
		bytes_avail = endpos - pos;
		if(bytes_avail<6) break;

		ret = do_chunk(c, d, parent_ci, pos, bytes_avail, parent_ci->level+1, &bytes_consumed);
		if(!ret || bytes_consumed<1) break;
		pos += bytes_consumed;
		chunk_idx++;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movq 0x18(%rdx), %rbp
addq 0x10(%rdx), %rbp
leaq 0x14(%rsp), %rsi
callq 0xe958c
testq %r12, %r12
je 0x5b9b4
cmpl $0xb, 0x4(%r12)
setl %al
leaq 0x6(%r15), %rcx
cmpq %rbp, %rcx
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5b9b4
leaq 0xc67a9(%rip), %rsi     # 0x1220ce
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
testq %rbx, %rbx
sets %al
movq $0x0, 0x18(%rsp)
cmpq %rbx, %r13
setl %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x5b9a2
movq %rbp, %r8
subq %r15, %r8
cmpq $0x6, %r8
jl 0x5b9a2
movl 0x4(%r12), %r9d
incl %r9d
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x5a4d3
testl %eax, %eax
sete %cl
movq 0x18(%rsp), %rax
testq %rax, %rax
setle %dl
orb %cl, %dl
je 0x5b9aa
xorl %eax, %eax
testb %al, %al
jne 0x5b942
jmp 0x5b9b4
addq %rax, %r15
incq %r13
movb $0x1, %al
jmp 0x5b9a4
movl 0x14(%rsp), %esi
movq %r14, %rdi
callq 0xe9595
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fli.c
// Function: destroy_image_ctx
static void destroy_image_ctx(deark *c, struct image_ctx_type *ictx)
{
	if(!ictx) return;
	if(ictx->img) {
		de_bitmap_destroy(ictx->img);
	}
	de_free(c, ictx);
}

// Assembly:
testq %rsi, %rsi
je 0x5b9fe
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
testq %rdi, %rdi
je 0x5b9ec
callq 0xf28d4
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fat.c
// Function: de_module_fat
void de_module_fat(deark *c, struct deark_module_info *mi)
{
	mi->id = "fat";
	mi->desc = "FAT disk image";
	mi->run_fn = de_run_fat;
	mi->identify_fn = de_identify_fat;
	mi->help_fn = de_help_fat;
}

// Assembly:
leaq 0xb737b(%rip), %rax     # 0x112d82
movq %rax, (%rsi)
leaq 0xc67b7(%rip), %rax     # 0x1221c8
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5ba37
movq %rax, 0x18(%rsi)
leaq 0xa76(%rip), %rax       # 0x5c49d
movq %rax, 0x20(%rsi)
leaq 0xc2c(%rip), %rax       # 0x5c65e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fat.c
// Function: de_module_loaddskf
void de_module_loaddskf(deark *c, struct deark_module_info *mi)
{
	mi->id = "loaddskf";
	mi->desc = "LoadDskF/SaveDskF disk image";
	mi->run_fn = de_run_loaddskf;
	mi->identify_fn = de_identify_loaddskf;
	mi->help_fn = de_help_loaddskf;
}

// Assembly:
leaq 0xc5b4e(%rip), %rax     # 0x1221d7
movq %rax, (%rsi)
leaq 0xc5b4d(%rip), %rax     # 0x1221e0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5c6b9
movq %rax, 0x18(%rsi)
leaq 0x529(%rip), %rax       # 0x5cbd2
movq %rax, 0x20(%rsi)
leaq 0x566(%rip), %rax       # 0x5cc1a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fat.c
// Function: do_oem_name
static void do_oem_name(deark *c, lctx *d, i64 pos, i64 len)
{
	struct de_stringreaderdata *srd;
	i64 i;

	srd = dbuf_read_string(c->infile, pos, len, len, 0, DE_ENCODING_ASCII);

	// Require printable ASCII.
	for(i=0; i<len; i++) {
		if(srd->sz[i]<32 || srd->sz[i]>126) {
			goto done;
		}
	}

	de_dbg(c, "OEM name: \"%s\"", ucstring_getpsz_d(srd->str));

done:
	de_destroy_stringreaderdata(c, srd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rdx, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefe67
movq %rax, %r14
testq %r15, %r15
jle 0x5cc69
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
addb $-0x7f, %dl
cmpb $-0x5f, %dl
jb 0x5cc86
incq %rcx
cmpq %rcx, %r15
jne 0x5cc56
movq 0x18(%r14), %rdi
callq 0xf7557
leaq 0xc58f6(%rip), %rsi     # 0x12256f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xf00aa
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/fat.c
// Function: do_fat_eadata
static void do_fat_eadata(deark *c, lctx *d, struct member_data *md)
{
	int ret;

	if(d->ea_data) goto done;
	d->ea_data = dbuf_create_membuf(c, 0, 0);
	dbuf_set_length_limit(d->ea_data, c->infile->len);
	ret = extract_file_lowlevel(c, d, md, d->ea_data);
	if(!ret) {
		dbuf_close(d->ea_data);
		d->ea_data = NULL;
		goto done;
	}
	de_dbg(c, "[read EA data, len=%"I64_FMT"]", d->ea_data->len);
done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0xa8(%rsi)
je 0x5d700
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0xf0faf
movq %rax, 0xa8(%rbx)
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rsi
movq %rax, %rdi
callq 0xf1066
movq 0xa8(%rbx), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5d897
movq 0xa8(%rbx), %rdi
testl %eax, %eax
je 0x5d763
movq 0x18(%rdi), %rdx
leaq 0xc5010(%rip), %rsi     # 0x122764
movq %r14, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
callq 0xf0b13
movq $0x0, 0xa8(%rbx)
jmp 0x5d6fa