LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: get_unpadded_len
static i64 get_unpadded_len(const u8 *s, i64 len1)
{
	i64 i;
	i64 len = len1;

	// Stop at NUL, I guess.
	for(i=0; i<len1; i++) {
		if(s[i]==0x00) {
			len = i;
			break;
		}
	}

	for(i=len; i>0; i--) {
		if(s[i-1]!=' ') {
			return i;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x84b21
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x84b11
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x84b21
jmp 0x84b13
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x84aec
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x84b5f
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x84b4f
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x84b67
jmp 0x84b51
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x84b29
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: decode_volume_label_name
static void decode_volume_label_name(deark *c, lctx *d, struct member_data *md)
{
	if(md->fn_ext_len>0) {
		ucstring_append_bytes(md->short_fn, md->fn_base, 8, 0, d->input_encoding);
		ucstring_append_bytes(md->short_fn, md->fn_ext, md->fn_ext_len, 0, d->input_encoding);
	}
	else {
		ucstring_append_bytes(md->short_fn, md->fn_base, md->fn_base_len, 0, d->input_encoding);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jle 0x84bd6
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl (%rax), %r8d
movl $0x8, %edx
xorl %ecx, %ecx
callq 0x171fa0
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
xorl %ecx, %ecx
callq 0x171fa0
jmp 0x84bf8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
xorl %ecx, %ecx
callq 0x171fa0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: decode_short_filename
static void decode_short_filename(deark *c, lctx *d, struct member_data *md)
{
	if(md->fn_base_len>0) {
		ucstring_append_bytes(md->short_fn, md->fn_base, md->fn_base_len, 0, d->input_encoding);
	}
	else {
		ucstring_append_char(md->short_fn, '_');
	}
	if(md->fn_ext_len>0) {
		ucstring_append_char(md->short_fn, '.');
		ucstring_append_bytes(md->short_fn, md->fn_ext, md->fn_ext_len, 0, d->input_encoding);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jle 0x84c43
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
xorl %ecx, %ecx
callq 0x171fa0
jmp 0x84c55
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movl $0x5f, %esi
callq 0x1714c0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jle 0x84c98
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movl $0x2e, %esi
callq 0x1714c0
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
xorl %ecx, %ecx
callq 0x171fa0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x84d17
jmp 0x84db7
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x168120
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
callq 0x85270
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x84d96
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
movq $0x0, 0xa8(%rax)
jmp 0x84db7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x18(%rax), %rdx
leaq 0x129611(%rip), %rsi    # 0x1ae3c1
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: do_fat_eadata_item
static void do_fat_eadata_item(deark *c, lctx *d, struct member_data *md)
{
	de_module_params *mparams = NULL;

	if(!d->ea_data) goto done;
	if(md->ea_handle==0) goto done;
	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.input_encoding = d->input_encoding;
	mparams->in_params.flags = 0x1;
	mparams->in_params.uint1 = (u32)md->ea_handle;
	de_dbg(c, "reading OS/2 extended attributes");
	de_dbg_indent(c, 1);
	// TODO: Better filenames for icons that may be extracted.
	// The ea_data module will use the filename contained in the EA data stream,
	// but it would be better to use the "fullfn" that will be constructed in
	// do_extract_file(). Some refactoring will be needed.
	de_run_module_by_id_on_slice(c, "ea_data", mparams, d->ea_data, 0, d->ea_data->len);
	de_dbg_indent(c, -1);

done:
	de_free(c, mparams);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x84def
jmp 0x84e97
movq -0x18(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x84dfe
jmp 0x84e97
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0x129598(%rip), %rsi    # 0x1ae3d9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x18(%rax), %r9
leaq 0x12957b(%rip), %rsi    # 0x1ae3fa
xorl %eax, %eax
movl %eax, %r8d
callq 0x15c9f0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: extract_file_lowlevel
static int extract_file_lowlevel(deark *c, lctx *d, struct member_data *md, dbuf *outf)
{
	int retval = 0;
	i64 cur_cluster;
	i64 nbytes_remaining;

	cur_cluster = md->first_cluster;
	if(md->is_subdir) {
		nbytes_remaining = 0;
	}
	else {
		nbytes_remaining = md->filesize;
	}

	while(1) {
		i64 dpos;
		i64 nbytes_to_copy;

		if(nbytes_remaining <= 0) break;
		if(!is_good_clusternum(d, cur_cluster)) break;
		if(d->cluster_used_flags[cur_cluster]) break;
		d->cluster_used_flags[cur_cluster] = 1;
		if(c->debug_level>=3) de_dbg3(c, "cluster: %d", (int)cur_cluster);
		dpos = clusternum_to_offset(c, d, cur_cluster);
		nbytes_to_copy = de_min_int(d->bytes_per_cluster, nbytes_remaining);
		dbuf_copy(c->infile, dpos, nbytes_to_copy, outf);
		nbytes_remaining -= nbytes_to_copy;
		cur_cluster = (i64)d->fat_nextcluster[cur_cluster];
	}

	if(nbytes_remaining>0) {
		goto done;
	}

	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0xb(%rax)
je 0x852af
movq $0x0, -0x38(%rbp)
jmp 0x852bb
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x852bd
cmpq $0x0, -0x38(%rbp)
jg 0x852c9
jmp 0x8539b
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x853c0
cmpl $0x0, %eax
jne 0x852e0
jmp 0x8539b
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x30(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x852fa
jmp 0x8539b
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x30(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
jl 0x8532e
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x128c40(%rip), %rsi    # 0x1adf67
movb $0x0, %al
callq 0x15b400
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x85400
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x15ccf0
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x166070
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x30(%rbp)
jmp 0x852bd
cmpq $0x0, -0x38(%rbp)
jle 0x853a4
jmp 0x853ab
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: loaddskf_calc_checksum_noncmpr
static void loaddskf_calc_checksum_noncmpr(deark *c, struct skf_ctx *d)
{
	i64 nbytes_to_checksum;

	nbytes_to_checksum = c->infile->len - d->hdr_size;
	if(d->expected_dcmpr_size && d->expected_dcmpr_size < nbytes_to_checksum) {
		nbytes_to_checksum = d->expected_dcmpr_size;
	}

	de_crcobj_addslice(d->crco, c->infile, d->hdr_size, nbytes_to_checksum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8591d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x18(%rbp), %rax
jge 0x8591d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rcx
callq 0x15f500
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: loaddskf_finish_checksum
static void loaddskf_finish_checksum(deark *c, struct skf_ctx *d)
{
	d->checksum_calc = de_crcobj_getval(d->crco);
	de_dbg(c, "checksum (calculated): 0x%08x", (UI)d->checksum_calc);
	if(d->checksum_calc != d->checksum_reported) {
		de_warn(c, "Checksum mismatch (reported 0x%08x, calculated 0x%08x). "
			"Something may have gone wrong.", (UI)d->checksum_reported,
			(UI)d->checksum_calc);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x15f340
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x128d00(%rip), %rsi    # 0x1ae688
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
je 0x859bf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x128cee(%rip), %rsi    # 0x1ae6a6
movb $0x0, %al
callq 0x15bc10
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: loaddskf_convert_noncmpr_to_ima
static void loaddskf_convert_noncmpr_to_ima(deark *c, struct skf_ctx *d)
{
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "ima", NULL, 0);
	de_dbg(c, "[copying]");
	dbuf_copy(c->infile, d->hdr_size, c->infile->len - d->hdr_size, outf);
	loaddskf_pad_ima_file(c, d, outf);
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x128a86(%rip), %rsi    # 0x1ae479
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x128cf0(%rip), %rsi    # 0x1ae6fd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
subq 0x18(%rax), %rdx
movq -0x18(%rbp), %rcx
callq 0x166070
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x85b20
movq -0x18(%rbp), %rdi
callq 0x1676a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: loaddskf_decode_as_fat
static void loaddskf_decode_as_fat(deark *c, struct skf_ctx *d)
{
	i64 dlen;

	dlen = de_max_int(c->infile->len - d->hdr_size, d->padded_size);
	de_dbg(c, "decoding as FAT, pos=%"I64_FMT", len=%"I64_FMT, d->hdr_size, dlen);
	if(dlen<=0) goto done;

	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice(c, "fat", NULL, c->infile, d->hdr_size, dlen);
	de_dbg_indent(c, -1);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
subq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x15cd20
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rcx
leaq 0x128c4b(%rip), %rsi    # 0x1ae707
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x18(%rbp)
jg 0x85acc
jmp 0x85b10
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %r8
movq -0x18(%rbp), %r9
leaq 0x119344(%rip), %rsi    # 0x19ee3d
xorl %eax, %eax
movl %eax, %edx
callq 0x15c9f0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/fat.c
// Function: loaddskf_pad_ima_file
static void loaddskf_pad_ima_file(deark *c, struct skf_ctx *d, dbuf *outf)
{
	i64 num_padding_bytes;
	u8 padding_value;

	dbuf_flush(outf);
	if(d->padded_size<=0) goto done;
	num_padding_bytes = d->padded_size - outf->len;
	if(num_padding_bytes<=0) goto done;
	de_dbg(c, "[adding padding]");

	// TODO: Does it matter what we pad with? Possibilities include 0x00, 0xe5, 0xf6.
	padding_value = 0x00;
	dbuf_write_run(outf, padding_value, num_padding_bytes);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x167c30
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jg 0x85b4a
jmp 0x85b90
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jg 0x85b67
jmp 0x85b90
movq -0x8(%rbp), %rdi
leaq 0x128b05(%rip), %rsi    # 0x1ae677
movb $0x0, %al
callq 0x15b0d0
movb $0x0, -0x21(%rbp)
movq -0x18(%rbp), %rdi
movb -0x21(%rbp), %al
movq -0x20(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: de_module_flac
void de_module_flac(deark *c, struct deark_module_info *mi)
{
	mi->id = "flac";
	mi->desc = "FLAC";
	mi->run_fn = de_run_flac;
	mi->identify_fn = de_identify_flac;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x128bc5(%rip), %rcx    # 0x1ae77c
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x132bab(%rip), %rcx    # 0x1b8770
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x85bf0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x7d(%rip), %rcx        # 0x85c60
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: de_run_flac
static void de_run_flac(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_id3info id3i;

	d = de_malloc(c, sizeof(lctx));
	fmtutil_handle_id3(c, c->infile, &id3i, 0);
	run_flac_internal(c, d, id3i.main_start, id3i.main_end-id3i.main_start);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x30(%rbp), %rdx
xorl %ecx, %ecx
callq 0x1753e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
subq -0x28(%rbp), %rcx
callq 0x85d00
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: de_identify_flac
static int de_identify_flac(deark *c)
{
	i64 pos = 0;

	if(!c->detection_data->id3.detection_attempted) {
		de_err(c, "flac detection requires id3 module");
		return 0;
	}

	if(c->detection_data->id3.has_id3v2) {
		pos = (i64)c->detection_data->id3.bytes_at_start;
	}

	if(!dbuf_memcmp(c->infile, pos, "fLaC", 4))
		return 100;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpb $0x0, 0x14(%rax)
jne 0x85c9d
movq -0x10(%rbp), %rdi
leaq 0x128bc4(%rip), %rsi    # 0x1ae851
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x85cec
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpb $0x0, 0x15(%rax)
je 0x85cba
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl 0x18(%rax), %eax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq 0x128ba7(%rip), %rdx    # 0x1ae874
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x85ce5
movl $0x64, -0x4(%rbp)
jmp 0x85cec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: get_mdblk_name
static const char *get_mdblk_name(u8 blktype)
{
	const char *name = NULL;
	switch(blktype) {
	case 0: name="STREAMINFO"; break;
	case 1: name="PADDING"; break;
	case 2: name="APPLICATION"; break;
	case 3: name="SEEKTABLE"; break;
	case 4: name="VORBIS_COMMENT"; break;
	case 5: name="CUESHEET"; break;
	case 6: name="PICTURE"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x6, %rax
ja 0x85f3d
movq -0x18(%rbp), %rax
leaq 0x128885(%rip), %rcx    # 0x1ae760
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1288ee(%rip), %rax    # 0x1ae7d9
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288ec(%rip), %rax    # 0x1ae7e4
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288e7(%rip), %rax    # 0x1ae7ec
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288e6(%rip), %rax    # 0x1ae7f8
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288e3(%rip), %rax    # 0x1ae802
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288e5(%rip), %rax    # 0x1ae811
movq %rax, -0x10(%rbp)
jmp 0x85f3d
leaq 0x1288e1(%rip), %rax    # 0x1ae81a
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x85f4e
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x85f5b
leaq 0x131cd8(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x85f5b
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: do_metadata_block
static void do_metadata_block(deark *c, lctx *d, u8 blktype, i64 pos1, i64 len)
{
	switch(blktype) {
	case 4:
		do_metadata_block_vorbiscomment(c, d, pos1, len);
		break;
	case 6:
		do_metadata_block_picture(c, d, pos1, len);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movzbl -0x11(%rbp), %eax
movl %eax, -0x2c(%rbp)
subl $0x4, %eax
je 0x85fa5
jmp 0x85f9b
movl -0x2c(%rbp), %eax
subl $0x6, %eax
je 0x85fbc
jmp 0x85fd1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x85fe0
jmp 0x85fd1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x86060
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: do_metadata_block_vorbiscomment
static void do_metadata_block_vorbiscomment(deark *c, lctx *d, i64 pos1, i64 len)
{
	de_dbg(c, "vorbis comment block at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "ogg", "C", c->infile, pos1, len);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x12881b(%rip), %rsi    # 0x1ae822
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x128807(%rip), %rsi    # 0x1ae83e
leaq 0x129342(%rip), %rdx    # 0x1af380
callq 0x15cab0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/flac.c
// Function: do_metadata_block_picture
static void do_metadata_block_picture(deark *c, lctx *d, i64 pos1, i64 len)
{
	de_dbg(c, "picture at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "id3", "F", c->infile, pos1, len);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1287bb(%rip), %rsi    # 0x1ae842
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x1187df(%rip), %rsi    # 0x19e896
leaq 0x131397(%rip), %rdx    # 0x1b7455
callq 0x15cab0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dlmaker.c
// Function: de_module_dlmaker
void de_module_dlmaker(deark *c, struct deark_module_info *mi)
{
	mi->id = "dlmaker";
	mi->desc = "DL animation (DL MAKER)";
	mi->run_fn = de_run_dlmaker;
	mi->identify_fn = de_identify_dlmaker;
	mi->help_fn = de_help_dlmaker;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x128799(%rip), %rcx    # 0x1ae890
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x128793(%rip), %rcx    # 0x1ae898
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x86140
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x37d(%rip), %rcx       # 0x864a0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x59e(%rip), %rcx       # 0x866d0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dlmaker.c
// Function: do_extract_v3_image
static void do_extract_v3_image(deark *c, lctx *d, i64 pos, i64 xsize, i64 ysize)
{
	de_bitmap *img = NULL;

	if(!de_good_image_dimensions(c, xsize, ysize)) goto done;

	img = de_bitmap_create(c, xsize, ysize, 3);
	de_convert_image_paletted(c->infile, pos, 8, xsize, d->pal, img, 0);
	de_bitmap_write_to_file_finfo(img, d->fi, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0x86c6c
jmp 0x86cc8
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x3, %ecx
callq 0x16b750
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %r8
addq $0x70, %r8
movq -0x30(%rbp), %r9
movl $0x8, %edx
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c520
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
xorl %edx, %edx
callq 0x16afa0
movq -0x30(%rbp), %rdi
callq 0x16af60
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dlmaker.c
// Function: do_audio
static void do_audio(deark *c, lctx *d, i64 pos1)
{
	i64 i;
	i64 pos = pos1;

	for(i=0; i<d->num_audio_components; i++) {
		i64 dlen;

		if(pos+5 > c->infile->len) goto done;
		de_dbg(c, "audio component at %"I64_FMT, pos);
		de_dbg_indent(c, 1);
		dlen = de_getu32le_p(&pos);
		de_dbg(c, "len: %"I64_FMT, dlen);
		pos++; // unused?
		do_extract_audio_component(c, d, pos, dlen);
		de_dbg_indent(c, -1);
		pos += dlen;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jge 0x86fbc
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x86f21
jmp 0x86fbe
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x127a94(%rip), %rsi    # 0x1ae9c4
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x14a25c(%rip), %rsi    # 0x1d11c5
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x87080
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x86ef4
jmp 0x86fbe
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dlmaker.c
// Function: read_name
static void read_name(deark *c, lctx *d, i64 pos, de_ucstring *s, size_t nsize)
{
	size_t i;
	u8 buf[40];

	if(nsize>40) return;
	de_read(buf, pos, nsize);
	for(i=0; i<nsize; i++) {
		if(buf[i]) buf[i] ^= 0xff;
	}
	ucstring_append_bytes(s, buf, nsize, DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x28, -0x28(%rbp)
jbe 0x86ff5
jmp 0x8706b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x60(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x164d10
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x8704e
movq -0x30(%rbp), %rax
cmpb $0x0, -0x60(%rbp,%rax)
je 0x8703e
movq -0x30(%rbp), %rax
movzbl -0x60(%rbp,%rax), %ecx
xorl $0xff, %ecx
movb %cl, -0x60(%rbp,%rax)
jmp 0x87040
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x87016
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
movl $0x1, %ecx
callq 0x171fa0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/dlmaker.c
// Function: do_extract_audio_component
static void do_extract_audio_component(deark *c, lctx *d, i64 pos, i64 len)
{
	dbuf *outf = NULL;

	if(pos+len > c->infile->len) goto done;
	if(len <= 26) goto done;
	outf = dbuf_create_output_file(c, "voc", NULL, 0);
	dbuf_write(outf, (const u8*)"Creative Voice File\x1a", 20);
	dbuf_copy(c->infile, pos+20, len-20, outf);
done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x870b8
jmp 0x87111
cmpq $0x1a, -0x20(%rbp)
jg 0x870c1
jmp 0x87111
movq -0x8(%rbp), %rdi
leaq 0x12790f(%rip), %rsi    # 0x1ae9db
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x1278f9(%rip), %rsi    # 0x1ae9df
movl $0x14, %edx
callq 0x166170
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x14, %rsi
movq -0x20(%rbp), %rdx
subq $0x14, %rdx
movq -0x28(%rbp), %rcx
callq 0x166070
movq -0x28(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: de_module_crush
void de_module_crush(deark *c, struct deark_module_info *mi)
{
	mi->id = "crush";
	mi->desc = "CRUSH archive";
	mi->run_fn = de_run_crush;
	mi->identify_fn = de_identify_crush;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x12790e(%rip), %rcx    # 0x1aea45
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x127906(%rip), %rcx    # 0x1aea4b
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x87170
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x19d(%rip), %rcx       # 0x87300
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: de_run_crush
static void de_run_crush(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->da = de_arch_create_lctx(c);
	d->da->userdata = (void*)d;
	d->da->is_le = 1;

	d->da->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);

	if(!do_archive_header(c, d)) goto done;
	d->is_cri = (d->dir_segment_pos == CRUSH_HEADER_LEN);
	de_declare_fmtf(c, "CRUSH %s", d->is_cri ? "index" : "archive");

	d->paths_segment_pos = d->dir_segment_pos + (CRUSH_DIRENTRY_LEN * d->da->num_members);

	(void)do_read_paths(c, d);
	do_comment(c, d);
	do_read_dir_and_extract_files(c, d);

done:
	if(d) {
		if(d->paths) {
			i64 i;

			for(i=0; i<d->num_paths; i++) {
				ucstring_destroy(d->paths[i]);
			}
		}
		de_arch_destroy_lctx(c, d->da);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x48, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17c220
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xd, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x87380
cmpl $0x0, %eax
jne 0x871ff
jmp 0x8728b
movq -0x18(%rbp), %rax
cmpq $0x1a, 0x20(%rax)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x11b97a(%rip), %rdx    # 0x1a2ba3
leaq 0x131ee9(%rip), %rax    # 0x1b9119
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x12781b(%rip), %rsi    # 0x1aea59
movb $0x0, %al
callq 0x15e3d0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x18, 0x20(%rax), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x87520
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x877b0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x87910
cmpq $0x0, -0x18(%rbp)
je 0x872f5
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x872d8
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x872d6
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x171750
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x872a5
jmp 0x872d8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x17c270
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: de_identify_crush
static int de_identify_crush(deark *c)
{
	u8 buf[14];

	de_read(buf, 0, 14);
	if(!de_memcmp(buf, "CRUSH v", 7) &&
		buf[10]==0x0a && buf[11]==0x1a && buf[12]==0x00)
	{
		return 100;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1e(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xe, %ecx
callq 0x164d10
leaq -0x1e(%rbp), %rdi
leaq 0x127816(%rip), %rsi    # 0x1aeb47
movl $0x7, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x87364
movzbl -0x14(%rbp), %eax
cmpl $0xa, %eax
jne 0x87364
movzbl -0x13(%rbp), %eax
cmpl $0x1a, %eax
jne 0x87364
movzbl -0x12(%rbp), %eax
cmpl $0x0, %eax
jne 0x87364
movl $0x64, -0x4(%rbp)
jmp 0x8736b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: do_archive_header
static int do_archive_header(deark *c, lctx *d)
{
	i64 pos1 = 0;
	u8 b;

	de_dbg(c, "archive header at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);
	b = de_getbyte(pos1+7);
	if(b>='0' && b<='9') d->ver_maj = (UI)(b-'0');
	b = (UI)de_getbyte(pos1+9);
	if(b>='0' && b<='9') d->ver_min = (UI)(b-'0');
	de_dbg(c, "version: %u.%u", d->ver_maj, d->ver_min);

	d->num_paths = de_getu16le(pos1+16);
	de_dbg(c, "num paths %"I64_FMT, d->num_paths);
	d->da->num_members = de_getu16le(pos1+18);
	de_dbg(c, "num files %"I64_FMT, d->da->num_members);
	d->dir_segment_pos = de_getu32le(pos1+22);
	de_dbg(c, "directory pos: %"I64_FMT, d->dir_segment_pos);

	de_dbg_indent(c, -1);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1276bb(%rip), %rsi    # 0x1aea62
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x7, %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x30, %eax
jl 0x873f4
movzbl -0x19(%rbp), %eax
cmpl $0x39, %eax
jg 0x873f4
movzbl -0x19(%rbp), %ecx
subl $0x30, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x9, %rsi
callq 0x165060
movzbl %al, %eax
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x30, %eax
jl 0x8742f
movzbl -0x19(%rbp), %eax
cmpl $0x39, %eax
jg 0x8742f
movzbl -0x19(%rbp), %ecx
subl $0x30, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
leaq 0x11db51(%rip), %rsi    # 0x1a4f99
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x1275f6(%rip), %rsi    # 0x1aea78
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x12, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rdx
leaq 0x1275c4(%rip), %rsi    # 0x1aea86
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x16, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x127598(%rip), %rsi    # 0x1aea94
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: do_comment
static void do_comment(deark *c, lctx *d)
{
	i64 pos;
	i64 len;
	i64 avail_len;
	i64 foundpos;
	int ret;
	de_ucstring *s = NULL;

	if(!d->paths_segment_len_known) goto done;
	pos = d->paths_segment_pos + d->paths_segment_len;
	avail_len = c->infile->len - pos;
	if(avail_len<=1) goto done;

	// Find the terminating NUL
	ret = dbuf_search_byte(c->infile, 0x00, pos, c->infile->len-pos, &foundpos);
	if(!ret) goto done;
	len = foundpos - pos;
	if(len<1 || len>2048) goto done;

	de_dbg(c, "comment at %"I64_FMT, pos);
	s = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, pos, len, s, 0,
		DE_EXTENC_MAKE(d->da->input_encoding, DE_ENCSUBTYPE_HYBRID));
	de_dbg_indent(c, 1);
	de_dbg(c, "archive comment: \"%s\"", ucstring_getpsz_d(s));
	de_dbg_indent(c, -1);

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x877d7
jmp 0x878fc
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x38(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x1, -0x28(%rbp)
jg 0x8780b
jmp 0x878fc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
subq -0x18(%rbp), %rcx
xorl %esi, %esi
leaq -0x30(%rbp), %r8
callq 0x1667a0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x87840
jmp 0x878fc
movq -0x30(%rbp), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jl 0x8785d
cmpq $0x800, -0x20(%rbp)     # imm = 0x800
jle 0x87862
jmp 0x878fc
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x12726c(%rip), %rsi    # 0x1aeadd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %r9d
andl $0xff, %r9d
orl $0x300, %r9d            # imm = 0x300
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0x118cb3(%rip), %rsi    # 0x1a059a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x40(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: do_read_dir_and_extract_files
static void do_read_dir_and_extract_files(deark *c, lctx *d)
{
	i64 i;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	if(d->da->num_members<1) {
		goto done;
	}
	de_dbg(c, "directory at %"I64_FMT, d->dir_segment_pos);
	de_dbg_indent(c, 1);

	d->da->cmpr_data_curpos = CRUSH_HEADER_LEN;

	for(i=0; i<d->da->num_members; i++) {
		if(!do_member_file(c, d, i, d->dir_segment_pos + CRUSH_DIRENTRY_LEN * i)) {
			goto done;
		}
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x1, 0x20(%rax)
jge 0x87940
jmp 0x879ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x127199(%rip), %rsi    # 0x1aeaec
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x1a, 0x28(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x20(%rcx), %rax
jge 0x879c8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
imulq $0x18, -0x18(%rbp), %rax
addq %rax, %rcx
callq 0x879e0
cmpl $0x0, %eax
jne 0x879b8
jmp 0x879ca
jmp 0x879ba
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8797f
jmp 0x879ca
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x15b5a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: fixup_filename
static void fixup_filename(de_ucstring *s)
{
	i64 i;

	for(i=0; i<s->len; i++) {
		if(s->str[i]=='/') {
			s->str[i] = '_';
		}
	}

	if(ucstring_isempty(s)) {
		ucstring_append_char(s, '_');
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x87d67
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpl $0x2f, (%rax,%rcx,4)
jne 0x87d57
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl $0x5f, (%rax,%rcx,4)
jmp 0x87d59
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x87d24
movq -0x8(%rbp), %rdi
callq 0x1717b0
cmpl $0x0, %eax
je 0x87d83
movq -0x8(%rbp), %rdi
movl $0x5f, %esi
callq 0x1714c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/crush.c
// Function: make_fullfilename
static void make_fullfilename(deark *c, lctx *d, struct de_arch_member_data *md)
{
	struct crush_member_data *mdc = (struct crush_member_data*)md->userdata;

	if(mdc->path_num>0 && mdc->path_num<=d->num_paths &&
		d->paths && ucstring_isnonempty(d->paths[mdc->path_num-1]))
	{
		ucstring_append_ucstring(md->filename, d->paths[mdc->path_num-1]);
	}

	ucstring_append_ucstring(md->filename, md->tmpfn_base);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jbe 0x87e1c
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jg 0x87e1c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x87e1c
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0x87e1c
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rsi
callq 0x171460
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x171460
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cdiimage.c
// Function: de_module_cdi_imag
void de_module_cdi_imag(deark *c, struct deark_module_info *mi)
{
	mi->id = "cdi_imag";
	mi->desc = "CD-I IFF IMAG";
	mi->run_fn = de_run_cdi_imag;
	mi->identify_fn = de_identify_cdi_imag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x126cd9(%rip), %rcx    # 0x1aeb80
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x126cd4(%rip), %rcx    # 0x1aeb89
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x87ee0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xbd(%rip), %rcx        # 0x87f90
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cdiimage.c
// Function: de_run_cdi_imag
static void de_run_cdi_imag(deark *c, de_module_params *mparams)
{
	struct cdi_imag_ctx *d = NULL;
	struct de_iffctx *ictx = NULL;

	d = de_malloc(c, sizeof(struct cdi_imag_ctx));
	ictx = fmtutil_create_iff_decoder(c);
	ictx->userdata = (void*)d;
	ictx->has_standard_iff_chunks = 1;
	ictx->handle_chunk_fn = my_cdi_imag_chunk_handler;
	ictx->f = c->infile;
	fmtutil_read_iff_format(ictx, 0, c->infile->len);
	fmtutil_destroy_iff_decoder(ictx);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x430, %esi            # imm = 0x430
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18c8b0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x5d(%rax)
movq -0x20(%rbp), %rax
leaq 0xc2(%rip), %rcx        # 0x88000
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x18c920
movq -0x20(%rbp), %rdi
callq 0x18c8f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/cdiimage.c
// Function: my_cdi_imag_chunk_handler
static int my_cdi_imag_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	struct cdi_imag_ctx *d = (struct cdi_imag_ctx*)ictx->userdata;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_FORM:
		ictx->is_std_container = 1;
		break;
	case CODE_IDAT:
		do_cdi_imag_IDAT(c, d, ictx);
		ictx->handled = 1;
		break;
	case CODE_IHDR:
		do_cdi_imag_IHDR(c, d, ictx);
		ictx->handled = 1;
		break;
	case CODE_PLTE:
		do_cdi_imag_PLTE(c, d, ictx);
		ictx->handled = 1;
		break;
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x464f524d, %eax       # imm = 0x464F524D
je 0x88061
jmp 0x8803d
movl -0x1c(%rbp), %eax
subl $0x49444154, %eax       # imm = 0x49444154
je 0x88071
jmp 0x88049
movl -0x1c(%rbp), %eax
subl $0x49484452, %eax       # imm = 0x49484452
je 0x88092
jmp 0x88055
movl -0x1c(%rbp), %eax
subl $0x504c5445, %eax       # imm = 0x504C5445
je 0x880b3
jmp 0x880d2
movq -0x8(%rbp), %rax
movl $0x1, 0x134(%rax)
jmp 0x880d2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x880e0
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
jmp 0x880d2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x882b0
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
jmp 0x880d2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x88500
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)