LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/dosbackup.c
// Function: v33_looks_like_control_file
static int v33_looks_like_control_file(dbuf *f)
{
	int has_sig1;
	UI sig2;

	has_sig1 = !dbuf_memcmp(f, 0, "\x8b" "BACKUP", 7);
	if(!has_sig1) return 0;

	// Found a compressed variant format where the next two bytes are
	// different, but no plans to support it.
	sig2 = (UI)dbuf_getu16be(f, 7);
	if(sig2!=0x2020) {
		return 0;
	}
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xd0681(%rip), %rdx     # 0x11e9d1
xorl %ebx, %ebx
movl $0x7, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x4e379
movl $0x7, %esi
movq %r14, %rdi
callq 0xef169
xorl %ebx, %ebx
cmpl $0x2020, %eax           # imm = 0x2020
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/dosbackup.c
// Function: logical_member_finish_and_free
static void logical_member_finish_and_free(deark *c, lctx *d)
{
	if(!d->clm) return;

	if(d->fmtver==DOSBK_VER_DOS33 && d->clm->nbytes_written!=d->clm->v33_nbytes_expected) {
		de_err(c, "%s: Expected %"I64_FMT" bytes, got %"I64_FMT,
			ucstring_getpsz_d(d->clm->fullfn), d->clm->v33_nbytes_expected,
			d->clm->nbytes_written);
	}
	dbuf_close(d->clm->outf);
	ucstring_destroy(d->clm->fullfn);
	de_free(c, d->clm);
	d->clm = NULL;
}

// Assembly:
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x4e42e
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x3, 0x4(%rsi)
jne 0x4e3fa
movq 0x8(%rax), %rcx
cmpq 0x10(%rax), %rcx
je 0x4e3fa
movq 0x18(%rax), %rdi
callq 0xf7557
movq 0x30(%rbx), %rcx
movq 0x8(%rcx), %r8
movq 0x10(%rcx), %rcx
leaq 0xd06a7(%rip), %rsi     # 0x11ea94
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq 0x30(%rbx), %rax
movq (%rax), %rdi
callq 0xf0b13
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0xf6bb0
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0xe9752
movq $0x0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/flif.c
// Function: de_module_flif
void de_module_flif(deark *c, struct deark_module_info *mi)
{
	mi->id = "flif";
	mi->desc = "FLIF image format";
	mi->run_fn = de_run_flif;
	mi->identify_fn = de_identify_flif;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
leaq 0xd0769(%rip), %rax     # 0x11eba0
movq %rax, (%rsi)
leaq 0xd0764(%rip), %rax     # 0x11eba5
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x4e460
movq %rax, 0x18(%rsi)
leaq 0x317(%rip), %rax       # 0x4e76e
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/flif.c
// Function: read_varint
static int read_varint(deark *c, i64 pos1, i64 *result, i64 *bytes_consumed)
{
	i64 val = 0;
	u8 b;
	i64 pos = pos1;
	int retval = 0;

	*result = 0;

	while(1) {
		b = de_getbyte(pos++);
		val = (val<<7)|(b&0x7f);
		if((b&0x80)==0) break;
		if(pos - pos1 >= 8) {
			// We allow varints up to 8 bytes (8*7=56 bits).
			// If we've read 8 bytes without finding the terminating byte,
			// give up.
			// (Note that if we were to allow 63 bits, we could have int64
			// overflow when we convert from a physical value to a logical
			// value.)
			de_err(c, "Excessively large varint at %d", (int)pos1);
			goto done;
		}
	}

	*result = val;
	retval = 1;
done:
	*bytes_consumed = pos - pos1;
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rdx)
xorl %eax, %eax
xorl %ebp, %ebp
movq %rax, %r13
leaq (%r14,%rax), %rsi
movq 0x18(%r15), %rdi
callq 0xef0d5
movq %rbp, %rcx
shlq $0x7, %rcx
movl %eax, %edx
andb $0x7f, %dl
movzbl %dl, %ebp
orq %rcx, %rbp
testb %al, %al
jns 0x4e7fe
leaq 0x1(%r13), %rax
cmpq $0x8, %rax
jb 0x4e7b6
leaq 0xd0448(%rip), %rsi     # 0x11ec35
xorl %ebp, %ebp
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9df7
jmp 0x4e807
movq %rbp, (%r12)
movl $0x1, %ebp
incq %r13
movq %r13, (%rbx)
movl %ebp, %eax
addq $0x8, %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/fnt.c
// Function: de_module_fnt
void de_module_fnt(deark *c, struct deark_module_info *mi)
{
	mi->id = "fnt";
	mi->desc = "Windows FNT font";
	mi->run_fn = de_run_fnt;
	mi->identify_fn = de_identify_fnt;
}

// Assembly:
leaq 0xcea96(%rip), %rax     # 0x11d2bd
movq %rax, (%rsi)
leaq 0xd0499(%rip), %rax     # 0x11ecca
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x4e84c
movq %rax, 0x18(%rsi)
leaq 0xb31(%rip), %rax       # 0x4f378
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gemfont.c
// Function: de_module_gemfont
void de_module_gemfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemfont";
	mi->desc = "GEM bitmap font";
	mi->run_fn = de_run_gemfont;
	mi->identify_fn = de_identify_gemfont;
}

// Assembly:
leaq 0xcfb95(%rip), %rax     # 0x11ef5c
movq %rax, (%rsi)
leaq 0xcfb93(%rip), %rax     # 0x11ef64
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x4f3ec
movq %rax, 0x18(%rsi)
leaq 0x648(%rip), %rax       # 0x4fa2f
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gemfont.c
// Function: de_identify_gemfont
static int de_identify_gemfont(deark *c)
{
	int has_usual_lm;
	i64 fdoffs, fwidth, fheight, eofd;

	if(!de_input_file_has_ext(c, "fnt") &&
		!de_input_file_has_ext(c, "gft"))
	{
		return 0;
	}

	has_usual_lm = !dbuf_memcmp(c->infile, 62, "UUUU", 4);
	fdoffs = de_getu32le(76);
	if(fdoffs<88) return 0;
	fwidth = de_getu16le(80);
	fheight = de_getu16le(82);
	if(fwidth<1 || fheight<1) return 0;
	eofd = fdoffs + fwidth*fheight; // end of font data
	if(eofd > c->infile->len) return 0;
	if(eofd==c->infile->len && has_usual_lm) return 100;
	if(eofd==c->infile->len) return 70;
	if(has_usual_lm) return 25;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xcd87c(%rip), %rsi     # 0x11d2bd
callq 0xea936
testl %eax, %eax
jne 0x4fa61
leaq 0xcf6b6(%rip), %rsi     # 0x11f107
movq %rbx, %rdi
callq 0xea936
testl %eax, %eax
je 0x4fb0c
movq 0x18(%rbx), %rdi
leaq 0xcf69f(%rip), %rdx     # 0x11f10b
movl $0x3e, %esi
movl $0x4, %ecx
callq 0xf025e
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl $0x4c, %esi
callq 0xef37e
xorl %r14d, %r14d
cmpq $0x58, %rax
jl 0x4fb0f
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x50, %esi
callq 0xef1ca
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x52, %esi
callq 0xef1ca
testq %r12, %r12
setle %cl
testq %rax, %rax
setle %dl
orb %cl, %dl
jne 0x4fb0f
imulq %r12, %rax
addq %r15, %rax
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rcx
cmpq %rcx, %rax
jg 0x4fb0f
testl %ebp, %ebp
sete %dl
cmpq %rcx, %rax
sete %sil
movl $0x64, %r14d
testb %dl, %sil
jne 0x4fb0f
xorl %edx, %edx
testl %ebp, %ebp
movl $0x19, %esi
cmovnel %edx, %esi
cmpq %rcx, %rax
movl $0x46, %r14d
cmovnel %esi, %r14d
jmp 0x4fb0f
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gemmeta.c
// Function: de_module_gemmeta
void de_module_gemmeta(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemmeta";
	mi->desc = "GEM VDI Metafile";
	mi->run_fn = de_run_gemmeta;
	mi->identify_fn = de_identify_gemmeta;
}

// Assembly:
leaq 0xcf5ed(%rip), %rax     # 0x11f110
movq %rax, (%rsi)
leaq 0xcf5eb(%rip), %rax     # 0x11f118
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x4fb48
movq %rax, 0x18(%rsi)
leaq 0x21f(%rip), %rax       # 0x4fd62
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gemmeta.c
// Function: do_opcode_5
static void do_opcode_5(deark *c, lctx *d, struct opcode_data *op)
{
	i64 sub_opcode_id;
	const char *name;

	if(op->func_id!=99) return;
	if(op->intin_count<1) return;
	sub_opcode_id = de_getu16le(op->intin_pos);

	switch(sub_opcode_id) {
	case 10: name="Start Group"; break;
	case 11: name="End Group"; break;
	case 49: name="Set No Line Style"; break;
	case 50: name="Set Attribute Shadow On"; break;
	case 51: name="Set Attribute Shadow Off"; break;
	case 80: name="Start Draw Area Type Primitive"; break;
	case 81: name="End Draw Area Type Primitive"; break;
	default:
		if(sub_opcode_id>100) {
			name="for developer use";
		}
		else {
			name="?";
		}
	}

	de_dbg(c, "sub-opcode id: %d (%s)", (int)sub_opcode_id, name);
}

// Assembly:
cmpq $0x63, 0x20(%rdx)
jne 0x4fdc8
cmpq $0x0, 0x30(%rdx)
jle 0x4fdc8
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x10(%rdx), %rsi
callq 0xef1ca
cmpq $0x31, %rax
jle 0x4fdc9
cmpq $0x4f, %rax
jg 0x4fde4
cmpq $0x32, %rax
je 0x4fe1a
cmpq $0x33, %rax
jne 0x4fe02
leaq 0xcf600(%rip), %rcx     # 0x11f3c6
jmp 0x4fe33
retq
cmpq $0xa, %rax
je 0x4fdf9
cmpq $0xb, %rax
je 0x4fe2c
cmpq $0x31, %rax
jne 0x4fe02
leaq 0xcf5ba(%rip), %rcx     # 0x11f39c
jmp 0x4fe33
cmpq $0x50, %rax
je 0x4fe23
cmpq $0x51, %rax
jne 0x4fe02
leaq 0xcf607(%rip), %rcx     # 0x11f3fe
jmp 0x4fe33
leaq 0xcf586(%rip), %rcx     # 0x11f386
jmp 0x4fe33
cmpq $0x65, %rax
leaq 0xcf60e(%rip), %rdx     # 0x11f41b
leaq 0xdc055(%rip), %rcx     # 0x12be69
cmovgeq %rdx, %rcx
jmp 0x4fe33
leaq 0xcf58d(%rip), %rcx     # 0x11f3ae
jmp 0x4fe33
leaq 0xcf5b5(%rip), %rcx     # 0x11f3df
jmp 0x4fe33
leaq 0xcf55f(%rip), %rcx     # 0x11f392
leaq 0xcf5f3(%rip), %rsi     # 0x11f42d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gemras.c
// Function: de_module_gemraster
void de_module_gemraster(deark *c, struct deark_module_info *mi)
{
	mi->id = "gemraster";
	mi->id_alias[0] = "gemras";
	mi->desc = "GEM VDI Bit Image, a.k.a. GEM Raster";
	mi->run_fn = de_run_gemraster;
	mi->identify_fn = de_identify_gemraster;
	mi->help_fn = de_help_gemraster;
}

// Assembly:
leaq 0xcf675(%rip), %rax     # 0x11f4f8
movq %rax, (%rsi)
leaq 0xcf675(%rip), %rax     # 0x11f502
movq %rax, 0x38(%rsi)
leaq 0xcf671(%rip), %rax     # 0x11f509
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x4febe
movq %rax, 0x18(%rsi)
leaq 0x5f7(%rip), %rax       # 0x504a5
movq %rax, 0x20(%rsi)
leaq 0x804(%rip), %rax       # 0x506bd
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: de_module_gif
void de_module_gif(deark *c, struct deark_module_info *mi)
{
	mi->id = "gif";
	mi->desc = "GIF image";
	mi->run_fn = de_run_gif;
	mi->identify_fn = de_identify_gif;
	mi->help_fn = de_help_gif;
}

// Assembly:
leaq 0xceb0d(%rip), %rax     # 0x11f9d0
movq %rax, (%rsi)
leaq 0xceb07(%rip), %rax     # 0x11f9d4
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x50ef3
movq %rax, 0x18(%rsi)
leaq 0x1705(%rip), %rax      # 0x525e8
movq %rax, 0x20(%rsi)
leaq 0x175b(%rip), %rax      # 0x52649
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: de_identify_gif
static int de_identify_gif(deark *c)
{
	u8 buf[6];

	de_read(buf, 0, 6);
	if(!de_memcmp(buf, "GIF87a", 6)) return 100;
	if(!de_memcmp(buf, "GIF89a", 6)) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0x2(%rsp), %r14
movl $0x6, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
movl $0x38464947, %eax       # imm = 0x38464947
movl (%r14), %ecx
xorl %eax, %ecx
movzwl 0x4(%r14), %edx
xorl $0x6137, %edx           # imm = 0x6137
orl %ecx, %edx
je 0x5263a
xorl 0x2(%rsp), %eax
movzwl 0x6(%rsp), %ecx
xorl $0x6139, %ecx           # imm = 0x6139
orl %eax, %ecx
movl $0x64, %eax
cmovel %eax, %ebx
jmp 0x5263f
movl $0x64, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: do_read_subblocks_p
static void do_read_subblocks_p(deark *c, lctx *d, dbuf *inf,
	subblock_callback_fn_type cbfn, void *userdata, i64 *ppos)
{
	struct subblock_reader_data sbrd;
	int eof_flag = 0;

	de_zeromem(&sbrd, sizeof(struct subblock_reader_data));
	sbrd.userdata = userdata;
	sbrd.inf = inf;

	while(1) {
		sbrd.subblkpos = *ppos;

		if(*ppos >= inf->len) {
			on_unexpected_eof(c, d);
			*ppos = inf->len;
			return;
		}
		sbrd.reported_dlen = (i64)de_getbyte_p(ppos);

		sbrd.dpos = *ppos;

		if(sbrd.dpos + sbrd.reported_dlen > inf->len) {
			eof_flag = 1;
			sbrd.dlen = inf->len - sbrd.dpos;
		}
		else {
			sbrd.dlen = sbrd.reported_dlen;
		}

		*ppos += sbrd.dlen;

		if(sbrd.dlen>0 || !eof_flag) {
			cbfn(c, d, &sbrd);
		}

		if(eof_flag) {
			on_unexpected_eof(c, d);
			*ppos = inf->len;
			return;
		}

		if(sbrd.reported_dlen==0) break;
		sbrd.subblock_idx++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movq %rcx, 0x40(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq %r8, (%rsp)
movq %rdx, 0x10(%rsp)
movq (%r9), %rax
movq %rax, 0x18(%rsp)
cmpq 0x18(%rdx), %rax
jge 0x5274b
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %ecx
movq %rcx, 0x20(%rsp)
movq (%rbx), %rax
movq %rax, 0x28(%rsp)
leaq (%rax,%rcx), %rbp
movq 0x18(%r14), %r13
cmpq %r13, %rbp
jle 0x526fe
movq %r13, %rcx
subq %rax, %rcx
movq %rcx, 0x30(%rsp)
cmpq %r13, %rbp
setg %cl
movq 0x30(%rsp), %rdx
addq %rdx, %rax
movq %rax, (%rbx)
testq %rdx, %rdx
setle %al
testb %al, %cl
jne 0x5272b
movq %r12, %rdi
movq %r15, %rsi
movq %rsp, %rdx
callq *0x40(%rsp)
cmpq %r13, %rbp
jg 0x5274b
cmpq $0x0, 0x20(%rsp)
je 0x52772
incq 0x8(%rsp)
movq (%rbx), %rax
movq %rax, 0x18(%rsp)
cmpq 0x18(%r14), %rax
jl 0x526ce
cmpb $0x0, 0x10(%r15)
jne 0x5276b
addq $0x10, %r15
leaq 0xc05a7(%rip), %rsi     # 0x112d04
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9df7
movb $0x1, (%r15)
movq 0x18(%r14), %rax
movq %rax, (%rbx)
addq $0x48, %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/gif.c
// Function: decode_text_color
static void decode_text_color(deark *c, lctx *d, const char *name, u8 clr_idx,
	de_color *pclr)
{
	de_color clr;
	const char *alphastr;
	char csamp[32];

	clr = d->global_ct[(unsigned int)clr_idx];
	*pclr = clr;

	if(d->gce && d->gce->trns_color_idx_valid && d->gce->trns_color_idx==clr_idx) {
		alphastr = ",A=0";
		*pclr = DE_SET_ALPHA(*pclr, 0);
	}
	else {
		alphastr = "";
	}
	de_get_colorsample_code(c, clr, csamp, sizeof(csamp));
	de_dbg(c, "%s color: idx=%3u (%3u,%3u,%3u%s)%s", name,
		(unsigned int)clr_idx, (unsigned int)DE_COLOR_R(clr),
		(unsigned int)DE_COLOR_G(clr), (unsigned int)DE_COLOR_B(clr),
		alphastr, csamp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %r15
movl %ecx, %eax
movl 0x38(%rsi,%rax,4), %ebx
movl %ebx, (%r8)
movq 0x440(%rsi), %rax
leaq 0xf1f8d(%rip), %r13     # 0x144bd0
testq %rax, %rax
je 0x52c64
cmpb $0x0, 0x1(%rax)
je 0x52c64
cmpb %cl, 0x2(%rax)
jne 0x52c64
movl %ebx, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, (%r8)
leaq 0xccf9d(%rip), %r13     # 0x11fc01
movzbl %cl, %ebp
movq %rsp, %r12
movl $0x20, %ecx
movq %r15, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0xe9bb8
movl %ebx, %r8d
shrl $0x10, %r8d
movl $0xff, %eax
andl %eax, %r8d
movl %ebx, %r9d
shrl $0x8, %r9d
andl %eax, %r9d
andl %eax, %ebx
subq $0x8, %rsp
leaq 0xccf64(%rip), %rsi     # 0x11fc06
movq %r15, %rdi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r12
pushq %r13
pushq %rbx
callq 0xe9226
addq $0x48, %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/gif.c
// Function: callback_for_comment_ext
static void callback_for_comment_ext(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct comment_ext_ctx *ctx = (struct comment_ext_ctx*)sbrd->userdata;

	if(sbrd->dlen<1) return;

	if(ctx->outf) {
		// GIF comments are supposed to be 7-bit ASCII, so just copy them as-is.
		dbuf_copy(sbrd->inf, sbrd->dpos, sbrd->dlen, ctx->outf);
	}

	if(ctx->s->len<DE_DBG_MAX_STRLEN) {
		dbuf_read_to_ucstring(sbrd->inf, sbrd->dpos, sbrd->dlen, ctx->s, 0, DE_ENCODING_ASCII);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x30(%rdx), %rdx
testq %rdx, %rdx
jle 0x52d1c
movq (%rbx), %r14
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x52cee
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0xefabc
movq (%r14), %rcx
cmpq $0x1f3, 0x10(%rcx)      # imm = 0x1F3
jg 0x52d1c
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf01b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: do_mgk8bim_extension
static void do_mgk8bim_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *tmpf = NULL;
	tmpf = dbuf_create_membuf(c, 0, 0);
	do_copy_subblocks_to_dbuf(c, d, tmpf, pos, 1, 4*1048576);
	de_dbg(c, "photoshop data at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	fmtutil_handle_photoshop_rsrc(c, tmpf, 0, tmpf->len, 0x0);
	de_dbg_indent(c, -1);
	dbuf_close(tmpf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0xf0faf
movq %rax, %r14
movq %rsp, %r9
movq %r15, (%r9)
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movl $0x1, 0x8(%r8)
movq $0x400000, 0x10(%r8)    # imm = 0x400000
movq $0x0, 0x18(%r8)
movq 0x18(%rbx), %rdx
leaq 0x22e(%rip), %rcx       # 0x52fa3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5267e
leaq 0xcd058(%rip), %rsi     # 0x11fddf
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r14), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0xf8388
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r14, %rdi
callq 0xf0b13
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: do_mgkiptc_extension
static void do_mgkiptc_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *tmpf = NULL;
	tmpf = dbuf_create_membuf(c, 0, 0);
	do_copy_subblocks_to_dbuf(c, d, tmpf, pos, 1, 4*1048576);
	de_dbg(c, "IPTC-IIM data at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	fmtutil_handle_iptc(c, tmpf, 0, tmpf->len, 0x0);
	de_dbg_indent(c, -1);
	dbuf_close(tmpf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0xf0faf
movq %rax, %r14
movq %rsp, %r9
movq %r15, (%r9)
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movl $0x1, 0x8(%r8)
movq $0x400000, 0x10(%r8)    # imm = 0x400000
movq $0x0, 0x18(%r8)
movq 0x18(%rbx), %rdx
leaq 0x17c(%rip), %rcx       # 0x52fa3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5267e
leaq 0xccfbc(%rip), %rsi     # 0x11fdf5
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r14), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0xf7eb8
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r14, %rdi
callq 0xf0b13
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: do_giflite_extension
static void do_giflite_extension(deark *c, lctx *d, i64 pos1)
{
	i64 sub_block_len;
	i64 pos = pos1;
	UI vmajor, vminor;
	i64 olen;

	sub_block_len = (i64)de_getbyte_p(&pos);
	if(sub_block_len<2) return;
	vmajor = (UI)de_getbyte_p(&pos);
	vminor = (UI)de_getbyte_p(&pos);
	de_dbg(c, "GIFLITE ver: %u.%02u", vmajor, vminor);
	if(sub_block_len<6) return;
	olen = de_getu32le_p(&pos);
	de_dbg(c, "orig file size: %"I64_FMT, olen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
movq 0x18(%rdi), %rdi
movq %rax, %rsi
callq 0xef14d
cmpb $0x2, %al
jb 0x52f06
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0xef14d
movzbl %al, %r15d
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %ecx
leaq 0xccf37(%rip), %rsi     # 0x11fe0a
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
cmpb $0x6, %bpl
jb 0x52f06
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
callq 0xef3a0
leaq 0xccf26(%rip), %rsi     # 0x11fe1f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: do_unknown_extension
static void do_unknown_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *tmpf = NULL;
	tmpf = dbuf_create_membuf(c, 0, 0);
	do_copy_subblocks_to_dbuf(c, d, tmpf, pos, 1, 256);
	de_dbg_hexdump(c, tmpf, 0, tmpf->len, 256, NULL, 0x1);
	dbuf_close(tmpf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0xf0faf
movq %rax, %r14
leaq 0x8(%rsp), %r9
movq %r15, (%r9)
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movl $0x1, %ebp
movl %ebp, 0x8(%r8)
movq $0x100, 0x10(%r8)       # imm = 0x100
movq $0x0, 0x18(%r8)
movq 0x18(%rbx), %rdx
leaq 0x3d(%rip), %rcx        # 0x52fa3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5267e
movq 0x18(%r14), %rcx
movl %ebp, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0xe975a
movq %r14, %rdi
callq 0xf0b13
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: callback_for_copy_subblocks
static void callback_for_copy_subblocks(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct copy_subblocks_ctx *ctx = (struct copy_subblocks_ctx*)sbrd->userdata;
	i64 nbytes_to_copy;

	if(ctx->has_max && (ctx->nbytes_copied >= ctx->maxlen)) return;
	if(sbrd->dlen<1) return;

	nbytes_to_copy = sbrd->dlen;
	if(ctx->has_max) {
		if(ctx->nbytes_copied + nbytes_to_copy > ctx->maxlen) {
			nbytes_to_copy = ctx->maxlen - ctx->nbytes_copied;
		}
	}
	dbuf_copy(sbrd->inf, sbrd->dpos, nbytes_to_copy, ctx->outf);
	ctx->nbytes_copied += nbytes_to_copy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdx), %r14
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x52fbc
movq 0x18(%r14), %rcx
cmpq 0x10(%r14), %rcx
jge 0x52ff8
movq 0x30(%rdx), %rbx
testq %rbx, %rbx
jle 0x52ff8
testl %eax, %eax
je 0x52fe1
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
movq %rax, %rsi
subq %rcx, %rsi
addq %rbx, %rcx
cmpq %rax, %rcx
cmovgq %rsi, %rbx
movq 0x10(%rdx), %rdi
movq 0x28(%rdx), %rsi
movq (%r14), %rcx
movq %rbx, %rdx
callq 0xefabc
addq %rbx, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: my_giflzw_write_cb
static void my_giflzw_write_cb(dbuf *f, void *userdata,
	const u8 *buf, i64 size)
{
	i64 i;
	struct my_giflzw_userdata *u = (struct my_giflzw_userdata*)userdata;

	for(i=0; i<(i64)size; i++) {
		do_record_pixel(u->c, u->d, u->gi,
			buf[i], i);
	}
	u->gi->pixels_set += (i64)size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
testq %rcx, %rcx
jle 0x530ac
movq %rdx, %r15
xorl %r12d, %r12d
movq 0x10(%r14), %rsi
movq 0x28(%rsi), %rax
addq %r12, %rax
cqto
idivq 0x18(%rsi)
movq 0x50(%rsi), %rcx
testq %rcx, %rcx
je 0x53042
cmpq 0x20(%rsi), %rax
jge 0x53042
movzwl (%rcx,%rax,2), %eax
movq 0x8(%r14), %r8
movzbl (%r15,%r12), %edi
cmpl $0x0, 0x34(%rsi)
je 0x53061
cmpq %rdi, 0x48(%rsi)
jle 0x53061
leaq (%rsi,%rdi,4), %rcx
addq $0x58, %rcx
jmp 0x53069
leaq (%r8,%rdi,4), %rcx
addq $0x38, %rcx
movl (%rcx), %ecx
movq 0x440(%r8), %r8
testq %r8, %r8
je 0x5308c
cmpb $0x0, 0x1(%r8)
je 0x5308c
cmpb %dil, 0x2(%r8)
jne 0x5308c
andl $0xffffff, %ecx         # imm = 0xFFFFFF
jmp 0x53092
orl $0xff000000, %ecx       # imm = 0xFF000000
movq (%rsi), %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xf2afd
incq %r12
cmpq %r12, %rbx
jne 0x5301e
movq 0x10(%r14), %rax
addq %rbx, 0x28(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/gif.c
// Function: callback_for_image_subblock
static void callback_for_image_subblock(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct gif_image_data *gi = (struct gif_image_data*)sbrd->userdata;

	if(sbrd->reported_dlen==0) {
		de_dbg(c, "block terminator at %"I64_FMT, sbrd->subblkpos);
		return;
	}
	de_dbg2(c, "sub-block at %"I64_FMT", size=%"I64_FMT, sbrd->subblkpos, sbrd->reported_dlen);

	if(!gi->failure_flag && !gi->dfctx->finished_flag) {
		de_dfilter_addslice(gi->dfctx, sbrd->inf, sbrd->dpos, sbrd->dlen);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x18(%rdx), %rdx
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x530fe
movq (%rbx), %r14
leaq 0xccec2(%rip), %rsi     # 0x11ffa0
xorl %eax, %eax
callq 0xe93cf
cmpl $0x0, 0x38(%r14)
jne 0x530f6
movq 0x40(%r14), %rdi
cmpb $0x0, 0x20(%rdi)
je 0x53113
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xcce83(%rip), %rsi     # 0x11ff88
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9226
movq 0x10(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x30(%rbx), %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfa908
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grasp.c
// Function: de_module_graspgl
void de_module_graspgl(deark *c, struct deark_module_info *mi)
{
	mi->id = "graspgl";
	mi->desc = "GRASP GL animation";
	mi->run_fn = de_run_graspgl;
	mi->identify_fn = de_identify_graspgl;
}

// Assembly:
leaq 0xccfe5(%rip), %rax     # 0x120118
movq %rax, (%rsi)
leaq 0xccfe3(%rip), %rax     # 0x120120
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x53158
movq %rax, 0x18(%rsi)
leaq 0x35f(%rip), %rax       # 0x534b2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grasp.c
// Function: de_identify_graspgl
static int de_identify_graspgl(deark *c)
{
	i64 index_size;
	i64 index_pos;
	i64 first_offset;
	int is_le = 1;
	int gl_ext;

	index_size = de_getu16le(0);
	if(index_size==0x4741) {
		if((UI)de_getu16be(2)==0x0100U) {
			is_le = 0; // Amiga GL?
			index_size = de_getu16be(4);
		}
	}

	// Header should be a nonzero multiple of 17 bytes.
	if(index_size==0 || (index_size%17 != 0)) return 0;
	index_pos = is_le ? 2 : 6;
	if(index_pos+index_size>c->infile->len) return 0;

	gl_ext = de_input_file_has_ext(c, "gl");

	// Most likely, the first embedded file immediately follows
	// the header. If so, it's pretty good evidence this is a
	// grasp_gl file.
	first_offset = dbuf_getu32x(c->infile, index_pos, is_le);

	if(first_offset>c->infile->len || first_offset<index_pos+index_size) return 0;
	if(first_offset == index_pos+index_size)
		return gl_ext ? 100 : 70;

	if(gl_ext) return 5;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef1ca
movl $0x1, %ebp
cmpq $0x4741, %rax           # imm = 0x4741
jne 0x53516
movq 0x18(%r14), %rdi
movl $0x2, %r12d
movl $0x2, %esi
callq 0xef169
movl $0x4741, %r15d          # imm = 0x4741
cmpl $0x100, %eax            # imm = 0x100
jne 0x5351f
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xef169
movq %rax, %r15
xorl %ebp, %ebp
movl $0x6, %r12d
jmp 0x5351f
movq %rax, %r15
movl $0x2, %r12d
movabsq $0x7878787878787879, %rcx # imm = 0x7878787878787879
movq %r15, %rax
imulq %rcx
testq %r15, %r15
je 0x53561
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x3, %rdx
addq %rax, %rdx
movq %rdx, %rax
shlq $0x4, %rax
addq %rdx, %rax
movq %r15, %rcx
subq %rax, %rcx
jne 0x53561
addq %r12, %r15
movq 0x18(%r14), %rax
cmpq 0x18(%rax), %r15
jle 0x53572
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xccba4(%rip), %rsi     # 0x12011d
movq %r14, %rdi
callq 0xea936
movl %eax, %r13d
movq 0x18(%r14), %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0xef614
cmpq %r15, %rax
jl 0x53561
movq 0x18(%r14), %rcx
cmpq 0x18(%rcx), %rax
jg 0x53561
cmpq %r15, %rax
jne 0x535b8
testl %r13d, %r13d
movl $0x46, %eax
movl $0x64, %ebx
cmovel %eax, %ebx
jmp 0x53561
xorl %eax, %eax
testl %r13d, %r13d
setne %al
leal (%rax,%rax,4), %ebx
jmp 0x53561
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grasp.c
// Function: de_module_graspfont
void de_module_graspfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "graspfont";
	mi->desc = "GRASP font";
	mi->run_fn = de_run_graspfont;
	mi->identify_fn = de_identify_graspfont;
}

// Assembly:
leaq 0xccb67(%rip), %rax     # 0x120133
movq %rax, (%rsi)
leaq 0xccb67(%rip), %rax     # 0x12013d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x535f1
movq %rax, 0x18(%rsi)
leaq 0x580(%rip), %rax       # 0x53b6c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grasp.c
// Function: de_identify_graspfont
static int de_identify_graspfont(deark *c)
{
	i64 reported_filesize;
	i64 num_chars;
	i64 bytes_per_glyph;

	if(!de_input_file_has_ext(c, "set") && !de_input_file_has_ext(c, "fnt"))
		return 0;

	if(gfont_is_new_format(c)) {
		return 30;
	}

	reported_filesize = de_getu16le(0);
	if(reported_filesize != c->infile->len) return 0;
	num_chars = (i64)de_getbyte(2);
	if(num_chars==0) num_chars=256;
	bytes_per_glyph = (i64)de_getbyte(6);
	if(7+num_chars*bytes_per_glyph == reported_filesize)
		return 100;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xcaf5e(%rip), %rsi     # 0x11ead9
callq 0xea936
testl %eax, %eax
jne 0x53b97
leaq 0xc9732(%rip), %rsi     # 0x11d2bd
movq %rbx, %rdi
callq 0xea936
testl %eax, %eax
je 0x53c07
movq %rbx, %rdi
callq 0x53c13
movl $0x1e, %r15d
testl %eax, %eax
jne 0x53c0a
movq 0x18(%rbx), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0xef1ca
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jne 0x53c0a
movq %rax, %r14
movl $0x2, %esi
callq 0xef0d5
movzbl %al, %eax
testb %al, %al
movl $0x100, %r15d           # imm = 0x100
cmovneq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef0d5
movzbl %al, %eax
imulq %r15, %rax
addq $0x7, %rax
xorl %ecx, %ecx
cmpq %r14, %rax
movl $0x64, %r15d
cmovnel %ecx, %r15d
jmp 0x53c0a
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grob.c
// Function: de_module_grob
void de_module_grob(deark *c, struct deark_module_info *mi)
{
	mi->id = "grob";
	mi->desc = "GROB - HP48/49 calculator image";
	mi->run_fn = de_run_grob;
	mi->identify_fn = de_identify_grob;
	mi->help_fn = de_help_grob;
}

// Assembly:
leaq 0xcc6cd(%rip), %rax     # 0x120320
movq %rax, (%rsi)
leaq 0xcc6c8(%rip), %rax     # 0x120325
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x53c83
movq %rax, 0x18(%rsi)
leaq 0x4c2(%rip), %rax       # 0x54135
movq %rax, 0x20(%rsi)
leaq 0x54a(%rip), %rax       # 0x541c8
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grob.c
// Function: de_identify_grob
static int de_identify_grob(deark *c)
{
	u8 buf[10];
	de_read(buf, 0, 10);

	if(buf[0]=='H' && buf[1]=='P' && buf[2]=='H' && buf[3]=='P' &&
		buf[4]=='4' && (buf[5]=='8' || buf[5]=='9') &&
		buf[8]==0x1e && buf[9]==0x2b)
	{
			return 100;
	}

	if(buf[0]=='G' && buf[1]=='R' && buf[2]=='O' && buf[3]=='B') {
		return 90;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
leaq 0xe(%rsp), %rbx
movl $0xa, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xeeee8
movb (%rbx), %dil
movb 0x1(%rbx), %cl
movb 0x2(%rbx), %sil
movb 0x3(%rbx), %dl
cmpb $0x48, %dil
jne 0x5419e
cmpb $0x50, %cl
jne 0x5419e
cmpb $0x48, %sil
jne 0x5419e
cmpb $0x50, %dl
jne 0x5419e
cmpb $0x34, 0x12(%rsp)
jne 0x5419e
movb 0x13(%rsp), %al
andb $-0x2, %al
cmpb $0x38, %al
jne 0x5419e
cmpb $0x1e, 0x16(%rsp)
jne 0x5419e
movl $0x64, %eax
cmpb $0x2b, 0x17(%rsp)
je 0x541c0
xorb $0x47, %dil
xorb $0x52, %cl
orb %dil, %cl
xorb $0x4f, %sil
xorb $0x42, %dl
orb %sil, %dl
orb %cl, %dl
movl $0x5a, %eax
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/grob.c
// Function: grob_read_binary_bitmap
static void grob_read_binary_bitmap(deark *c, lctx *d, dbuf *inf, i64 pos)
{
	i64 h_logical;
	i64 rowspan;
	i64 pdwidth;
	de_bitmap *img = NULL;
	de_color pal[256];

	if(d->num_planes<=1) {
		de_convert_and_write_image_bilevel2(inf, pos, d->w, d->h_phys, (d->w+7)/8,
			DE_CVTF_WHITEISZERO|DE_CVTF_LSBFIRST, NULL, 0);
		return;
	}
	if(d->num_planes>8) goto done;

	if((d->h_phys % d->num_planes) != 0) {
		de_warn(c, "Number of rows is not divisible by number of planes. The grob:planes "
			"setting is probably not correct.");
	}
	h_logical = d->h_phys/d->num_planes;

	if(!de_good_image_dimensions(c, d->w, h_logical))
		goto done;

	de_dbg(c, "logical dimensions: %d"DE_CHAR_TIMES"%d", (int)d->w, (int)h_logical);

	rowspan = (d->w+7)/8;
	pdwidth = rowspan * 8;
	img = de_bitmap_create2(c, d->w, pdwidth, h_logical, 1);

	de_zeromem(pal, sizeof(pal));
	de_make_grayscale_palette(pal, 1ULL<<d->num_planes, 0x1);

	de_convert_image_paletted_planar(inf, pos, d->num_planes,
		rowspan, h_logical*rowspan, pal, img, 0x1 | (d->grayscale_lsb?0x02:0));

	de_bitmap_write_to_file_finfo(img, NULL, 0);
done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x18(%rsi), %rcx
cmpq $0x1, %rcx
jg 0x5424b
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq 0x7(%rdx), %rax
leaq 0xe(%rdx), %r8
testq %rax, %rax
cmovnsq %rax, %r8
sarq $0x3, %r8
movq %r14, %rdi
movq %rbx, %rsi
movl $0x3, %r9d
pushq $0x0
pushq $0x0
callq 0xf319c
addq $0x418, %rsp            # imm = 0x418
jmp 0x5435b
cmpq $0x8, %rcx
jg 0x54349
movq %rdi, %r13
movq 0x8(%r15), %rax
cqto
idivq %rcx
testq %rdx, %rdx
je 0x54277
leaq 0xcc1b6(%rip), %rsi     # 0x120423
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9b27
movq (%r15), %rsi
movq 0x8(%r15), %rax
cqto
idivq 0x18(%r15)
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rdx
callq 0xf241d
testl %eax, %eax
je 0x54349
movl (%r15), %edx
leaq 0xcc1e5(%rip), %rsi     # 0x120489
movq %r13, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rsi
leaq 0x7(%rsi), %rax
leaq 0xe(%rsi), %rdx
testq %rax, %rax
cmovnsq %rax, %rdx
movq %rdx, %rbp
sarq $0x3, %rbp
andq $-0x8, %rdx
movq %r13, %rdi
movq %r12, %rcx
movl $0x1, %r8d
callq 0xf2ce6
movq %rax, %r13
movq %rsp, %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x18140
movb 0x18(%r15), %cl
movl $0x1, %esi
shlq %cl, %rsi
movq %rsp, %rdi
movl $0x1, %edx
callq 0xf41f4
movq 0x18(%r15), %rdx
imulq %rbp, %r12
xorl %eax, %eax
cmpl $0x0, 0x20(%r15)
setne %al
leal 0x1(%rax,%rax), %eax
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rcx
movq %r12, %r8
movq %rsp, %r9
pushq %rax
pushq %r13
callq 0xf36f9
addq $0x10, %rsp
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf2917
jmp 0x5434c
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xf28d4
addq $0x408, %rsp            # imm = 0x408
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/gzip.c
// Function: de_module_gzip
void de_module_gzip(deark *c, struct deark_module_info *mi)
{
	mi->id = "gzip";
	mi->desc = "gzip compressed file";
	mi->run_fn = de_run_gzip;
	mi->identify_fn = de_identify_gzip;
}

// Assembly:
leaq 0xcc1f8(%rip), %rax     # 0x120567
movq %rax, (%rsi)
leaq 0xcc1f3(%rip), %rax     # 0x12056c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x54394
movq %rax, 0x18(%rsi)
leaq 0x5b1(%rip), %rax       # 0x54940
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_module_cdr_wl
void de_module_cdr_wl(deark *c, struct deark_module_info *mi)
{
	mi->id = "cdr_wl";
	mi->desc = "CorelDRAW (old WL format)";
	mi->desc2 = "extract preview image";
	mi->run_fn = de_run_cdr_wl;
	mi->identify_fn = de_identify_cdr_wl;
	mi->help_fn = de_help_cdr_wl;
}

// Assembly:
leaq 0xcbddd(%rip), %rax     # 0x120770
movq %rax, (%rsi)
leaq 0xcbdda(%rip), %rax     # 0x120777
movq %rax, 0x8(%rsi)
leaq 0xc7a4a(%rip), %rax     # 0x11c3f2
movq %rax, 0x10(%rsi)
leaq 0x1b(%rip), %rax        # 0x549ce
movq %rax, 0x18(%rsi)
leaq 0x14e(%rip), %rax       # 0x54b0c
movq %rax, 0x20(%rsi)
leaq 0x193(%rip), %rax       # 0x54b5c
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_module_corel_clb
void de_module_corel_clb(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_clb";
	mi->desc = "CorelMOSAIC .CLB library";
	mi->run_fn = de_run_corel_clb;
	mi->identify_fn = de_identify_corel_clb;
	mi->help_fn = de_help_corel_clb;
}

// Assembly:
leaq 0xcbc20(%rip), %rax     # 0x120791
movq %rax, (%rsi)
leaq 0xcbc20(%rip), %rax     # 0x12079b
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x54ba1
movq %rax, 0x18(%rsi)
leaq 0x3e6(%rip), %rax       # 0x54f77
movq %rax, 0x20(%rsi)
leaq 0x461(%rip), %rax       # 0x54ffd
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_identify_corel_clb
static int de_identify_corel_clb(deark *c)
{
	i64 nlen, n;

	// This might be too strict. Need more samples.
	if(!de_input_file_has_ext(c, "clb")) return 0;
	nlen = de_getu16le(0);
	if(nlen<1 || nlen>63) return 0;
	if(de_getbyte(2+nlen-1)!=0x00) return 0;
	n = de_getu32le(2+nlen+4);
	if(n!=0x00000001) return 0;
	n = de_getu32le(2+nlen+16);
	if(n!=2+nlen+20 && n!=0) return 0;
	return 100;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xcb811(%rip), %rsi     # 0x120797
callq 0xea936
testl %eax, %eax
je 0x54ff3
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef1ca
movq %rax, %r15
addq $-0x40, %rax
cmpq $-0x3f, %rax
jb 0x54ff5
movq 0x18(%r14), %rdi
leaq 0x1(%r15), %rsi
callq 0xef0d5
testb %al, %al
jne 0x54ff5
movq 0x18(%r14), %rdi
leaq 0x6(%r15), %rsi
callq 0xef37e
cmpq $0x1, %rax
jne 0x54ff5
movq 0x18(%r14), %rdi
leaq 0x12(%r15), %rsi
callq 0xef37e
addq $0x16, %r15
xorl %ebx, %ebx
testq %rax, %rax
movl $0x64, %ecx
cmovel %ecx, %ebx
cmpq %r15, %rax
cmovel %ecx, %ebx
jmp 0x54ff5
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_module_corel_bmf
void de_module_corel_bmf(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_bmf";
	mi->desc = "Corel Gallery BMF";
	mi->run_fn = de_run_corel_bmf;
	mi->identify_fn = de_identify_corel_bmf;
}

// Assembly:
leaq 0xcb7a2(%rip), %rax     # 0x1207b4
movq %rax, (%rsi)
leaq 0xcb7a2(%rip), %rax     # 0x1207be
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x55037
movq %rax, 0x18(%rsi)
leaq 0x102(%rip), %rax       # 0x55134
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_run_corel_bmf
static void de_run_corel_bmf(deark *c, de_module_params *mparams1)
{
	de_module_params *mparams2 = NULL;
	int saved_indent_level;
	i64 pos;
	i64 n;
	i64 seg_size;

	de_dbg_indent_save(c, &saved_indent_level);
	pos = 65;
	seg_size = de_getu32le_p(&pos);
	de_dbg(c, "preview image segment at %"I64_FMT", len=%"I64_FMT, pos, seg_size);
	de_dbg_indent(c, 1);

	if(pos + seg_size > c->infile->len) {
		seg_size = c->infile->len - pos;
	}

	n = de_getu32le(pos);
	if(n!=40) {
		de_err(c, "Unsupported Corel BMF version");
		goto done;
	}

	mparams2 = de_malloc(c, sizeof(de_module_params));
	mparams2->in_params.codes = "X";
	mparams2->in_params.flags = 0x81;
	de_run_module_by_id_on_slice(c, "dib", mparams2, c->infile, pos, seg_size);

done:
	de_free(c, mparams2);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
callq 0xe958c
leaq 0x8(%rsp), %r15
movq $0x41, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef3a0
movq %rax, %r14
movq (%r15), %rdx
leaq 0xcb8a6(%rip), %rsi     # 0x12091c
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%r15), %r15
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %r13
movq %r15, %rsi
callq 0xef37e
cmpq $0x28, %rax
jne 0x550fb
movq %r13, %r12
subq %r15, %r12
addq %r14, %r15
cmpq %r13, %r15
cmovleq %r14, %r12
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r14
leaq 0xee48c(%rip), %rax     # 0x14355c
movq %rax, (%r14)
movl $0x81, 0x8(%r14)
movq 0x18(%rbx), %rcx
movq 0x8(%rsp), %r8
leaq 0xce144(%rip), %rsi     # 0x12322f
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %r9
callq 0xea5fa
jmp 0x5510f
leaq 0xcb840(%rip), %rsi     # 0x120942
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: de_module_corel_ccx
void de_module_corel_ccx(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_ccx";
	mi->desc = "Corel CCX";
	mi->desc2 = "Decompress to CMX";
	mi->run_fn = de_run_corel_ccx;
	mi->identify_fn = de_identify_corel_ccx;
}

// Assembly:
leaq 0xcb66f(%rip), %rax     # 0x1207d0
movq %rax, (%rsi)
leaq 0xcb66f(%rip), %rax     # 0x1207da
movq %rax, 0x8(%rsi)
leaq 0xcb66e(%rip), %rax     # 0x1207e4
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x55191
movq %rax, 0x18(%rsi)
leaq 0x327(%rip), %rax       # 0x554b3
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/corel.c
// Function: my_ccx_chunk_handler
static int my_ccx_chunk_handler(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_RIFF:
		ictx->is_std_container = 1;
		return 1;
	case CODE_pack:
		d->pack_pos = ictx->chunkctx->pos;
		d->pack_dpos = ictx->chunkctx->dpos;
		d->pack_dlen = ictx->chunkctx->dlen;
		// We have what we need; tell the RIFF parser to stop.
		return 0;
	}

	ictx->handled = 1; // We're just scanning the file, so suppress default chunk handling
	return 1;
}

// Assembly:
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x7061636b, %ecx       # imm = 0x7061636B
je 0x55513
cmpl $0x52494646, %ecx       # imm = 0x52494646
jne 0x55531
movl $0x1, 0x134(%rdi)
jmp 0x5553b
movq 0x10(%rdi), %rcx
movq 0x30(%rax), %rdx
movq %rdx, (%rcx)
movq 0x40(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq 0x48(%rax), %rax
movq %rax, 0x10(%rcx)
xorl %eax, %eax
retq
movl $0x1, 0x130(%rdi)
movl $0x1, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: de_module_hfs
void de_module_hfs(deark *c, struct deark_module_info *mi)
{
	mi->id = "hfs";
	mi->desc = "HFS filesystem image";
	mi->run_fn = de_run_hfs;
	mi->identify_fn = de_identify_hfs;
}

// Assembly:
leaq 0xbee48(%rip), %rax     # 0x114393
movq %rax, (%rsi)
leaq 0xcb4e6(%rip), %rax     # 0x120a3b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x55570
movq %rax, 0x18(%rsi)
leaq 0x441(%rip), %rax       # 0x559ac
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: de_identify_hfs
static int de_identify_hfs(deark *c)
{
	i64 drAlBlkSiz;
	int has_ext;

	if(dbuf_memcmp(c->infile, 1024, "BD", 2)) return 0;

	// Allocation block size must be a nonzero multiple of 512.
	drAlBlkSiz = de_getu32be(1024+20);
	if(drAlBlkSiz==0 || (drAlBlkSiz%512)!=0) return 0;

	has_ext = de_input_file_has_ext(c, "hfs");
	return has_ext?90:15;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0xcb55a(%rip), %rdx     # 0x120f17
movl $0x400, %esi            # imm = 0x400
movl $0x2, %ecx
callq 0xf025e
xorl %ebp, %ebp
testl %eax, %eax
jne 0x55a10
movq 0x18(%rbx), %rdi
movl $0x414, %esi            # imm = 0x414
callq 0xef32a
testq %rax, %rax
sete %cl
testl $0x1ff, %eax            # imm = 0x1FF
setne %al
orb %cl, %al
jne 0x55a10
leaq 0xbe99a(%rip), %rsi     # 0x114393
movq %rbx, %rdi
callq 0xea936
testl %eax, %eax
movl $0xf, %eax
movl $0x5a, %ebp
cmovel %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: read_one_timestamp
static void read_one_timestamp(deark *c, lctx *d, i64 pos, struct de_timestamp *returned_ts,
	const char *name)
{
	i64 ts_raw;
	struct de_timestamp ts;
	char timestamp_buf[64];

	de_zeromem(&ts, sizeof(struct de_timestamp));
	ts.is_valid = 0;
	ts_raw = de_getu32be(pos);
	if(ts_raw!=0) {
		de_mac_time_to_timestamp(ts_raw, &ts);
	}

	if(returned_ts) {
		*returned_ts = ts;
	}

	if(ts.is_valid) {
		de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	}
	else {
		de_strlcpy(timestamp_buf, "unknown", sizeof(timestamp_buf));
	}
	de_dbg(c, "%s: %"I64_FMT" (%s)", name, ts_raw, timestamp_buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq 0x18(%rdi), %rdi
callq 0xef32a
movq %rax, %r15
testq %rax, %rax
je 0x55a50
movq %rsp, %rsi
movq %r15, %rdi
callq 0xeae04
testq %r12, %r12
je 0x55a5e
movaps (%rsp), %xmm0
movups %xmm0, (%r12)
cmpb $0x0, (%rsp)
je 0x55a7a
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0xeb4f8
jmp 0x55a90
leaq 0xbca0b(%rip), %rsi     # 0x11248c
leaq 0x10(%rsp), %rdi
movl $0x40, %edx
callq 0xe8ded
leaq 0xc10ea(%rip), %rsi     # 0x116b81
leaq 0x10(%rsp), %r8
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9226
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/hfs.c
// Function: read_ExtDataRecs
static void read_ExtDataRecs(deark *c, lctx *d, i64 pos1,
	struct ExtDescriptor *eds, size_t num_eds, const char *name)
{
	size_t i;
	i64 pos = pos1;

	for(i=0; i<num_eds; i++) {
		eds[i].first_alloc_blk = de_getu16be_p(&pos);
		eds[i].num_alloc_blks = de_getu16be_p(&pos);
		de_dbg(c, "%s[%u]: first_blk=%u, num_blks=%u", name, (unsigned int)i,
			(unsigned int)eds[i].first_alloc_blk, (unsigned int)eds[i].num_alloc_blks);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %rsi, (%r12)
leaq 0xcb091(%rip), %r13     # 0x120b6b
xorl %ebp, %ebp
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef193
movq %rax, (%r14)
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef193
movq %rax, 0x8(%r14)
movl (%r14), %r8d
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movl %eax, %r9d
xorl %eax, %eax
callq 0xe9226
incq %rbp
addq $0x10, %r14
cmpq $0x3, %rbp
jne 0x55adc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq