LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/comicchat.c
// Function: reconstruct_bmp_and_cvt_to_img
static void reconstruct_bmp_and_cvt_to_img(deark *c, lctx *d,
	struct image_extract_ctx *ic, struct image_highlevel_ctx *ih, int itype,
	u8 direct_to_bmp)
{
	dbuf *tmpbmp = NULL;

	tmpbmp = dbuf_create_membuf(c, 0, 0);
	fmtutil_generate_bmpfileheader(c, tmpbmp, &ic->bi, 0);
	dbuf_copy(c->infile, ic->ihpos, ic->bi.infohdrsize, tmpbmp);
	write_palette(c, d, tmpbmp, ic->pal, ic->bi.pal_entries);
	dbuf_copy(ic->unc_pixels, 0, ic->unc_pixels->len, tmpbmp);
	dbuf_flush(tmpbmp);
	if(direct_to_bmp) {
		extract_whole_bmp(c, d, tmpbmp, 0, ih);
	}
	else {
		read_bmp_to_img(c, d, tmpbmp, 0, ih, itype);
	}
	dbuf_close(tmpbmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movb %al, -0x25(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1734e0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x30(%rbp), %rcx
callq 0x166070
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0xb8, %rcx
movq -0x18(%rbp), %rax
movq 0x50(%rax), %r8
callq 0x8be90
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x30(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x166070
movq -0x30(%rbp), %rdi
callq 0x167c30
cmpb $0x0, -0x25(%rbp)
je 0x8be5b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0x8b420
jmp 0x8be78
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
xorl %eax, %eax
movl %eax, %ecx
callq 0x8b4e0
movq -0x30(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/comicchat.c
// Function: write_palette
static void write_palette(deark *c, lctx *d, dbuf *outf,
	de_color *pal, i64 num_entries)
{
	i64 i;

	for(i=0; i<num_entries; i++) {
		dbuf_writebyte(outf, DE_COLOR_B(pal[i]));
		dbuf_writebyte(outf, DE_COLOR_G(pal[i]));
		dbuf_writebyte(outf, DE_COLOR_R(pal[i]));
		dbuf_writebyte(outf, 0);
	}
}

// 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 %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x8bf31
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x168380
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x168380
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x168380
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x168380
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8beb4
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_txt2com
void de_module_txt2com(deark *c, struct deark_module_info *mi)
{
	mi->id = "txt2com";
	mi->desc = "TXT2COM (K. P. Graham)";
	mi->run_fn = de_run_txt2com;
	mi->identify_fn = de_identify_txt2com;
	mi->help_fn = de_help_txt2com;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x12321e(%rip), %rcx    # 0x1af175
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x123218(%rip), %rcx    # 0x1af17d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8bfa0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xfd(%rip), %rcx        # 0x8c080
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x28e(%rip), %rcx       # 0x8c220
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_run_txt2com
static void de_run_txt2com(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = create_lctx(c);
	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);
	d->chartypes[10] = ETCT_CONTROL;
	d->chartypes[13] = ETCT_CONTROL;
	de_declare_fmt(c, "TXT2COM");

	txt2com_search1(c, d);
	if(!d->found_text) {
		txt2com_search2(c, d);
	}
	if(!d->found_text) {
		d->need_errmsg = 1;
		goto done;
	}
	if(d->errflag) goto done;

	exectext_extract_default(c, d);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Not a TXT2COM file, or unsupported version");
		}
		destroy_lctx(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
callq 0x8dcb0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xd, %edx
callq 0x8dcf0
movq -0x18(%rbp), %rax
movb $0x1, 0x42(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x45(%rax)
movq -0x8(%rbp), %rdi
leaq 0x1232ed(%rip), %rsi    # 0x1af2df
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8ddd0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x14(%rax)
jne 0x8c01b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8de80
movq -0x18(%rbp), %rax
cmpb $0x0, 0x14(%rax)
jne 0x8c02f
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
jmp 0x8c048
movq -0x18(%rbp), %rax
cmpb $0x0, 0x12(%rax)
je 0x8c03b
jmp 0x8c048
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8df30
cmpq $0x0, -0x18(%rbp)
je 0x8c078
movq -0x18(%rbp), %rax
cmpb $0x0, 0x13(%rax)
je 0x8c06b
movq -0x8(%rbp), %rdi
leaq 0x123283(%rip), %rsi    # 0x1af2e7
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8e0b0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_txt2com
static int de_identify_txt2com(deark *c)
{
	u8 b1;
	u8 flag = 0;
	u8 buf[28];
	const char *ids[3] = {"TXT2COM C", "TXT2RES C", "TXT2PAS C"};

	if(c->infile->len>65280) return 0;
	b1 = de_getbyte(0);
	if(b1!=0x8d && b1!=0xe8 && b1!=0xe9) return 0;
	de_read(buf, 0, sizeof(buf));
	if(b1==0x8d) {
		if(!de_memcmp(&buf[14], ids[0], 9)) flag = 1;
	}
	else if(b1==0xe8) {
		if(!de_memcmp(&buf[5], ids[0], 9)) flag = 1;
	}
	else if(b1==0xe9) {
		if(!de_memcmp(&buf[3], ids[0], 9)) flag = 1;
		else if(!de_memcmp(&buf[3], ids[1], 9)) flag = 1;
		else if(!de_memcmp(&buf[3], ids[2], 9)) flag = 1;
	}
	return flag ? 92 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x12(%rbp)
movq 0x18be29(%rip), %rax    # 0x217ec0
movq %rax, -0x50(%rbp)
movq 0x18be26(%rip), %rax    # 0x217ec8
movq %rax, -0x48(%rbp)
movq 0x18be23(%rip), %rax    # 0x217ed0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8c0cf
movl $0x0, -0x4(%rbp)
jmp 0x8c20f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x8d, %eax
je 0x8c110
movzbl -0x11(%rbp), %eax
cmpl $0xe8, %eax
je 0x8c110
movzbl -0x11(%rbp), %eax
cmpl $0xe9, %eax
je 0x8c110
movl $0x0, -0x4(%rbp)
jmp 0x8c20f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1c, %ecx
callq 0x164d10
movzbl -0x11(%rbp), %eax
cmpl $0x8d, %eax
jne 0x8c159
leaq -0x30(%rbp), %rdi
addq $0xe, %rdi
movq -0x50(%rbp), %rsi
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x8c154
movb $0x1, -0x12(%rbp)
jmp 0x8c1fb
movzbl -0x11(%rbp), %eax
cmpl $0xe8, %eax
jne 0x8c185
leaq -0x30(%rbp), %rdi
addq $0x5, %rdi
movq -0x50(%rbp), %rsi
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x8c183
movb $0x1, -0x12(%rbp)
jmp 0x8c1f9
movzbl -0x11(%rbp), %eax
cmpl $0xe9, %eax
jne 0x8c1f7
leaq -0x30(%rbp), %rdi
addq $0x3, %rdi
movq -0x50(%rbp), %rsi
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x8c1b1
movb $0x1, -0x12(%rbp)
jmp 0x8c1f5
leaq -0x30(%rbp), %rdi
addq $0x3, %rdi
movq -0x48(%rbp), %rsi
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x8c1d2
movb $0x1, -0x12(%rbp)
jmp 0x8c1f3
leaq -0x30(%rbp), %rdi
addq $0x3, %rdi
movq -0x40(%rbp), %rsi
movl $0x9, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x8c1f1
movb $0x1, -0x12(%rbp)
jmp 0x8c1f3
jmp 0x8c1f5
jmp 0x8c1f7
jmp 0x8c1f9
jmp 0x8c1fb
movzbl -0x12(%rbp), %edx
xorl %eax, %eax
movl $0x5c, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_show_gmr
void de_module_show_gmr(deark *c, struct deark_module_info *mi)
{
	mi->id = "show_gmr";
	mi->desc = "SHOW (G. M. Raymond)";
	mi->run_fn = de_run_show_gmr;
	mi->identify_fn = de_identify_show_gmr;
	mi->help_fn = de_help_show_gmr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x122f3d(%rip), %rcx    # 0x1af194
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122f38(%rip), %rcx    # 0x1af19d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8c2a0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x8c3d0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fe(%rip), %rcx       # 0x8c490
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_run_show_gmr
static void de_run_show_gmr(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = create_lctx(c);
	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);
	de_declare_fmt(c, "SHOW (executable text)");
	d->chartypes[10] = ETCT_CONTROL;
	d->chartypes[13] = ETCT_CONTROL;

	showgmr_search(c, d);
	if(!d->found_text) {
		d->need_errmsg = 1;
		goto done;
	}
	de_dbg(c, "tpos: %"I64_FMT, d->tpos);

	d->tlen = c->infile->len - d->tpos;
	if(de_getbyte(c->infile->len-1) == 0x1a) {
		d->tlen--;
	}

	exectext_extract_default(c, d);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Not a SHOW file, or unsupported version");
		}
		destroy_lctx(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
callq 0x8dcb0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xd, %edx
callq 0x8dcf0
movq -0x8(%rbp), %rdi
leaq 0x123129(%rip), %rsi    # 0x1af40b
callq 0x15e380
movq -0x18(%rbp), %rax
movb $0x1, 0x42(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x45(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8e710
movq -0x18(%rbp), %rax
cmpb $0x0, 0x14(%rax)
jne 0x8c318
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
jmp 0x8c390
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x123246(%rip), %rsi    # 0x1af571
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x1a, %eax
jne 0x8c383
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8df30
cmpq $0x0, -0x18(%rbp)
je 0x8c3c0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x13(%rax)
je 0x8c3b3
movq -0x8(%rbp), %rdi
leaq 0x123076(%rip), %rsi    # 0x1af422
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8e0b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_show_gmr
static int de_identify_show_gmr(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0xe9) return 0;
	// Testing the last byte of the file may screen out corrupt files, but
	// more importantly screens out the SHOW.COM utility itself, which
	// annoyingly has the same the start-of-file signature as the files it
	// generates.
	if(de_getbyte(c->infile->len-1) != 0x1a) return 0;
	// Byte at offset 3 is 0x30 in pristine files, but it's used to save the
	// color scheme (it's a self-modifying COM file).
	if(dbuf_memcmp(c->infile, 4,
		(const u8*)"\x00\x1f\xa0\x00\x00\x53\x48\x4f\x57", 9))
	{
		return 0;
	}
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8c3fa
movl $0x0, -0x4(%rbp)
jmp 0x8c47f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0xe9, %eax
je 0x8c41e
movl $0x0, -0x4(%rbp)
jmp 0x8c47f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x1a, %eax
je 0x8c44c
movl $0x0, -0x4(%rbp)
jmp 0x8c47f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
leaq 0x1232f1(%rip), %rdx    # 0x1af751
movl $0x9, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x8c478
movl $0x0, -0x4(%rbp)
jmp 0x8c47f
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_asc2com
void de_module_asc2com(deark *c, struct deark_module_info *mi)
{
	mi->id = "asc2com";
	mi->desc = "Asc2Com executable text";
	mi->run_fn = de_run_asc2com;
	mi->identify_fn = de_identify_asc2com;
	mi->help_fn = de_help_asc2com;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x122ceb(%rip), %rcx    # 0x1af1b2
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122ce5(%rip), %rcx    # 0x1af1ba
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8c510
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ad(%rip), %rcx       # 0x8c6a0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x20e(%rip), %rcx       # 0x8c710
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_run_asc2com
static void de_run_asc2com(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct asc2com_ctx *a2cc = NULL;
	struct asc2com_detection_data idd;

	a2cc = de_malloc(c, sizeof(struct asc2com_ctx));

	de_zeromem(&idd, sizeof(struct asc2com_detection_data));
	asc2com_identify(c, &idd, 0);
	if(!idd.found) {
		de_err(c, "Not a known Asc2Com format");
		goto done;
	}
	de_dbg(c, "format code: 0x%08x", idd.fmtcode);
	de_dbg(c, "compressed: %u", (UI)idd.is_compressed);
	a2cc->version = (idd.fmtcode >> 20) & 0xfff;
	a2cc->lister = idd.fmtcode & 0xf;

	d = create_lctx(c);
	d->userdata = (void*)a2cc;

	d->supports_fmtconv = 1;
	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);

	asc2com_find_special_chars(c, d, &idd);

	d->tpos = idd.tpos;
	de_dbg(c, "tpos: %"I64_FMT, d->tpos);
	d->tlen = c->infile->len - d->tpos;

	// TODO: Can we read and use the original filename?
	if(idd.is_compressed) {
		asc2com_extract_compressed(c, d);
	}
	else {
		asc2com_extract_uncompressed(c, d);
	}

done:
	destroy_lctx(c, d);
	de_free(c, a2cc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x8e810
cmpb $0x0, -0x30(%rbp)
jne 0x8c57e
movq -0x8(%rbp), %rdi
leaq 0x122ee9(%rip), %rsi    # 0x1af45b
movb $0x0, %al
callq 0x15bfb0
jmp 0x8c671
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0x122eea(%rip), %rsi    # 0x1af476
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movzbl -0x2f(%rbp), %edx
leaq 0x122ee8(%rip), %rsi    # 0x1af48a
movb $0x0, %al
callq 0x15b0d0
movl -0x2c(%rbp), %ecx
shrl $0x14, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
andl $0xf, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0x8dcb0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x17(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xd, %edx
callq 0x8dcf0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x8ea40
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x122f47(%rip), %rsi    # 0x1af571
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
cmpb $0x0, -0x2f(%rbp)
je 0x8c662
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8ec60
jmp 0x8c66f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8ee00
jmp 0x8c671
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8e0b0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_asc2com
static int de_identify_asc2com(deark *c)
{
	struct asc2com_detection_data idd;

	if(c->infile->len>65280) return 0;
	de_zeromem(&idd, sizeof(struct asc2com_detection_data));
	asc2com_identify(c, &idd, 1);
	if(idd.found) return 72;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8c6c7
movl $0x0, -0x4(%rbp)
jmp 0x8c6ff
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0x8e810
cmpb $0x0, -0x20(%rbp)
je 0x8c6f8
movl $0x48, -0x4(%rbp)
jmp 0x8c6ff
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_doc2com
void de_module_doc2com(deark *c, struct deark_module_info *mi)
{
	mi->id = "doc2com";
	mi->desc = "DOC2COM executable text (G. DePyper)";
	mi->run_fn = de_run_doc2com;
	mi->identify_fn = de_identify_doc2com;
	mi->help_fn = de_help_doc2com;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x122a8b(%rip), %rcx    # 0x1af1d2
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122a85(%rip), %rcx    # 0x1af1da
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8c790
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x8c8c0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1de(%rip), %rcx       # 0x8c960
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_run_doc2com
static void de_run_doc2com(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct doc2com_detection_data idd;

	d = create_lctx(c);
	d->supports_fmtconv = 1;
	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);

	de_zeromem(&idd, sizeof(struct doc2com_detection_data));
	doc2com_detect(c, &idd, 0);
	if(!idd.found) {
		d->need_errmsg = 1;
		goto done;
	}
	d->fmtcode = idd.fmtcode;
	de_dbg(c, "fmt code: %u", d->fmtcode);
	doc2com_analyze(c, d);

	d->allow_tlen_0 = 1;
	d->chartypes[9] = ETCT_CONTROL;
	d->chartypes[10] = ETCT_CONTROL;
	d->chartypes[12] = ETCT_CONTROL;
	d->chartypes[13] = ETCT_CONTROL;

	doc2com_find_special_codes(c, d);

	if(d->errflag) goto done;
	doc2com_output(c, d);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Not a DOC2COM file, or unsupported version");
		}
		destroy_lctx(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
callq 0x8dcb0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x1, 0x17(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xd, %edx
callq 0x8dcf0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x19140
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x8f090
cmpb $0x0, -0x20(%rbp)
jne 0x8c7fe
movq -0x18(%rbp), %rax
movb $0x1, 0x13(%rax)
jmp 0x8c87c
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %edx
leaq 0x122d0b(%rip), %rsi    # 0x1af525
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8f1b0
movq -0x18(%rbp), %rax
movb $0x1, 0x16(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x41(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x42(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x44(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x45(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8f410
movq -0x18(%rbp), %rax
cmpb $0x0, 0x12(%rax)
je 0x8c86f
jmp 0x8c87c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8f580
cmpq $0x0, -0x18(%rbp)
je 0x8c8ac
movq -0x18(%rbp), %rax
cmpb $0x0, 0x13(%rax)
je 0x8c89f
movq -0x8(%rbp), %rdi
leaq 0x122c9a(%rip), %rsi    # 0x1af532
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8e0b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_doc2com
static int de_identify_doc2com(deark *c)
{
	struct doc2com_detection_data idd;
	u8 b;

	if(c->infile->len>65280) return 0;
	b = de_getbyte(0);
	if(b!=0xbe && b!=0xfc) return 0;

	de_zeromem(&idd, sizeof(struct doc2com_detection_data));
	doc2com_detect(c, &idd, 1);
	if(idd.found) return 73;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8c8e7
movl $0x0, -0x4(%rbp)
jmp 0x8c952
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0xbe, %eax
je 0x8c91a
movzbl -0x19(%rbp), %eax
cmpl $0xfc, %eax
je 0x8c91a
movl $0x0, -0x4(%rbp)
jmp 0x8c952
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x19140
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x8f090
cmpb $0x0, -0x18(%rbp)
je 0x8c94b
movl $0x49, -0x4(%rbp)
jmp 0x8c952
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_doc2com_dkn
void de_module_doc2com_dkn(deark *c, struct deark_module_info *mi)
{
	mi->id = "doc2com_dkn";
	mi->desc = "DOC2COM executable text (D. Nelson)";
	mi->run_fn = de_run_doc2com_dkn;
	mi->identify_fn = de_identify_doc2com_dkn;
	mi->help_fn = de_help_doc2com_dkn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x122868(%rip), %rcx    # 0x1af1ff
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122866(%rip), %rcx    # 0x1af20b
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8c9e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x24d(%rip), %rcx       # 0x8cc10
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ee(%rip), %rcx       # 0x8ccc0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_doc2com_dkn
static int de_identify_doc2com_dkn(deark *c)
{
	UI n;
	i64 pos;

	if(c->infile->len>65280) return 0;
	n = (UI)de_getu32be(0);
	if(n==0xe9930000U) {
		pos = 27;
	}
	else if(n==0xe9070100U) {
		pos = 19;
	}
	else {
		return 0;
	}

	if(dbuf_memcmp(c->infile, pos, (const void*)"Press  Home  P", 14)) {
		return 0;
	}
	return 79;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8cc37
movl $0x0, -0x4(%rbp)
jmp 0x8ccae
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0xe9930000, -0x14(%rbp) # imm = 0xE9930000
jne 0x8cc5e
movq $0x1b, -0x20(%rbp)
jmp 0x8cc7c
cmpl $0xe9070100, -0x14(%rbp) # imm = 0xE9070100
jne 0x8cc71
movq $0x13, -0x20(%rbp)
jmp 0x8cc7a
movl $0x0, -0x4(%rbp)
jmp 0x8ccae
jmp 0x8cc7c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0x122943(%rip), %rdx    # 0x1af5d2
movl $0xe, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x8cca7
movl $0x0, -0x4(%rbp)
jmp 0x8ccae
movl $0x4f, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_gtxt
void de_module_gtxt(deark *c, struct deark_module_info *mi)
{
	mi->id = "gtxt";
	mi->desc = "GTXT (E. Gans)";
	mi->run_fn = de_run_gtxt;
	mi->identify_fn = de_identify_gtxt;
	mi->help_fn = de_help_gtxt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x122538(%rip), %rcx    # 0x1af22f
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x12252f(%rip), %rcx    # 0x1af234
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8cd40
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x21d(%rip), %rcx       # 0x8cf40
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ce(%rip), %rcx       # 0x8d000
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_gtxt
static int de_identify_gtxt(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0xbb) return 0;

	if(dbuf_memcmp(c->infile, 1, (const void*)"\xbc\x01\xb4\x02\xb1\x00\x8a", 7)) {
		return 0;
	}
	if(dbuf_memcmp(c->infile, 95, (const void*)"\x73\x01\xc3\x2c\x40\xc3\xcd\x20", 8)) {
		return 0;
	}
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8cf6a
movl $0x0, -0x4(%rbp)
jmp 0x8cfed
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0xbb, %eax
je 0x8cf8e
movl $0x0, -0x4(%rbp)
jmp 0x8cfed
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
leaq 0x122954(%rip), %rdx    # 0x1af8f6
movl $0x7, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x8cfba
movl $0x0, -0x4(%rbp)
jmp 0x8cfed
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x5f, %esi
leaq 0x12263b(%rip), %rdx    # 0x1af609
movl $0x8, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x8cfe6
movl $0x0, -0x4(%rbp)
jmp 0x8cfed
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_readmake
void de_module_readmake(deark *c, struct deark_module_info *mi)
{
	mi->id = "readmake";
	mi->desc = "READMAKE executable text";
	mi->run_fn = de_run_readmake;
	mi->help_fn = de_help_readmake;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x12220c(%rip), %rcx    # 0x1af243
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122207(%rip), %rcx    # 0x1af24c
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x8d070
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1bd(%rip), %rcx       # 0x8d220
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_texe
void de_module_texe(deark *c, struct deark_module_info *mi)
{
	mi->id = "texe";
	mi->desc = "TEXE executable text";
	mi->run_fn = de_run_texe;
	mi->help_fn = de_help_texe;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x12200e(%rip), %rcx    # 0x1af265
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x122005(%rip), %rcx    # 0x1af26a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x8d290
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x24d(%rip), %rcx       # 0x8d4d0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_readamatic
void de_module_readamatic(deark *c, struct deark_module_info *mi)
{
	mi->id = "readamatic";
	mi->desc = "Read-A-Matic executable text";
	mi->run_fn = de_run_readamatic;
	mi->help_fn = de_help_readamatic;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x121d78(%rip), %rcx    # 0x1af27f
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x121d75(%rip), %rcx    # 0x1af28a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x8d540
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1cd(%rip), %rcx       # 0x8d700
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_ascom
void de_module_ascom(deark *c, struct deark_module_info *mi)
{
	mi->id = "ascom";
	mi->desc = "ASCOM";
	mi->run_fn = de_run_ascom;
	mi->identify_fn = de_identify_ascom;
	mi->help_fn = de_help_ascom;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x121b70(%rip), %rcx    # 0x1af2a7
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x121b68(%rip), %rcx    # 0x1af2ad
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x8d780
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ed(%rip), %rcx       # 0x8d950
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x26e(%rip), %rcx       # 0x8d9e0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_identify_ascom
static int de_identify_ascom(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0xe9) return 0;
	if(dbuf_memcmp(c->infile, 1,
		(const u8*)"\x00\x00\xe8\x00\x00\x8b\xfc\x36\x8b\x2d\x83\xc4\x02\x81\xed", 15))
	{
		return 0;
	}
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x8d977
movl $0x0, -0x4(%rbp)
jmp 0x8d9ce
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0xe9, %eax
je 0x8d99b
movl $0x0, -0x4(%rbp)
jmp 0x8d9ce
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
leaq 0x121f4f(%rip), %rdx    # 0x1af8fe
movl $0xf, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x8d9c7
movl $0x0, -0x4(%rbp)
jmp 0x8d9ce
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: de_module_textlife
void de_module_textlife(deark *c, struct deark_module_info *mi)
{
	mi->id = "textlife";
	mi->desc = "TextLife or Breeze executable text";
	mi->run_fn = de_run_textlife;
	mi->help_fn = de_help_textlife;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x12189c(%rip), %rcx    # 0x1af2b3
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x121897(%rip), %rcx    # 0x1af2bc
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x8da50
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x24d(%rip), %rcx       # 0x8dc90
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: exectext_set_common_enc_opts
static void exectext_set_common_enc_opts(deark *c, lctx *d, de_encoding dflt_enc)
{
	d->input_encoding = de_get_input_encoding(c, NULL, dflt_enc);
	d->opt_fmtconv = (u8)de_get_ext_option_bool(c, "text:fmtconv", 1);
	d->opt_encconv = (u8)de_get_ext_option_bool(c, "text:encconv", 1);
	if(d->input_encoding==DE_ENCODING_ASCII) {
		d->opt_encconv = 0;
	}
	if(d->opt_fmtconv) {
		if(d->opt_encconv) {
			d->proctype = ET_PROCTYPE_FMTCONV_AND_ENCCONV;
		}
		else {
			d->proctype = ET_PROCTYPE_FMTCONV_ONLY;
		}
	}
	else {
		d->proctype = ET_PROCTYPE_RAW;
	}

	if(!d->supports_fmtconv) {
		if(d->proctype==ET_PROCTYPE_FMTCONV_ONLY) {
			d->proctype = ET_PROCTYPE_RAW;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x15e4a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x1215eb(%rip), %rsi    # 0x1af312
movl $0x1, %edx
callq 0x15cbc0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0x1215da(%rip), %rsi    # 0x1af31f
movl $0x1, %edx
callq 0x15cbc0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x11(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x8dd6a
movq -0x10(%rbp), %rax
movb $0x0, 0x11(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x10(%rax)
je 0x8dd98
movq -0x10(%rbp), %rax
cmpb $0x0, 0x11(%rax)
je 0x8dd8b
movq -0x10(%rbp), %rax
movl $0x3, 0x18(%rax)
jmp 0x8dd96
movq -0x10(%rbp), %rax
movl $0x2, 0x18(%rax)
jmp 0x8dda3
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x17(%rax)
jne 0x8ddc4
movq -0x10(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0x8ddc2
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
jmp 0x8ddc4
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: txt2com_search1
static void txt2com_search1(deark *c, lctx *d)
{
#define TXT2COM_BUF_POS1 700
#define TXT2COM_BUF_LEN1 3000
	u8 *mem = NULL;
	i64 foundpos;
	int ret;

	mem = de_malloc(c, TXT2COM_BUF_LEN1);
	de_read(mem, TXT2COM_BUF_POS1, TXT2COM_BUF_LEN1);
	ret = de_memsearch_match(mem, TXT2COM_BUF_LEN1,
		(const u8*)"\x8b\xd8\xb4\x40\x8b\x0e??\x8d\x16??\xcd\x21\xb4\x3e", 16,
		'?', &foundpos);
	if(!ret) goto done;
	d->found_text = 1;
	txt2com_read_textpos(c, d, TXT2COM_BUF_POS1+foundpos+6);

done:
	de_free(c, mem);
}

// 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 $0xbb8, %esi            # imm = 0xBB8
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x2bc, %edx            # imm = 0x2BC
movl $0xbb8, %ecx            # imm = 0xBB8
callq 0x164d10
movq -0x18(%rbp), %rdi
movl $0xbb8, %esi            # imm = 0xBB8
leaq 0x121507(%rip), %rdx    # 0x1af32c
movl $0x10, %ecx
movl $0x3f, %r8d
leaq -0x20(%rbp), %r9
callq 0x15f740
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x8de44
jmp 0x8de68
movq -0x10(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x2bc, %rdx            # imm = 0x2BC
addq $0x6, %rdx
callq 0x8e0e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: txt2com_search2
static void txt2com_search2(deark *c, lctx *d)
{
#define TXT2COM_BUF_POS2 7500
#define TXT2COM_BUF_LEN2 4000
	u8 *mem = NULL;
	i64 foundpos;
	int ret;

	mem = de_malloc(c, TXT2COM_BUF_LEN2);
	de_read(mem, TXT2COM_BUF_POS2, TXT2COM_BUF_LEN2);
	ret = de_memsearch_match(mem, TXT2COM_BUF_LEN2,
		(const u8*)"\xcd?\xa1??\xd1\xe0\x03\x06??\x8d???\x03", 16,
		'?', &foundpos);
	if(!ret) goto done;
	d->found_text = 1;
	txt2com_read_textpos(c, d, TXT2COM_BUF_POS2+foundpos+9);

done:
	de_free(c, mem);
}

// 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 $0xfa0, %esi            # imm = 0xFA0
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x1d4c, %edx           # imm = 0x1D4C
movl $0xfa0, %ecx            # imm = 0xFA0
callq 0x164d10
movq -0x18(%rbp), %rdi
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x121492(%rip), %rdx    # 0x1af367
movl $0x10, %ecx
movl $0x3f, %r8d
leaq -0x20(%rbp), %r9
callq 0x15f740
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x8def4
jmp 0x8df18
movq -0x10(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1d4c, %rdx           # imm = 0x1D4C
addq $0x9, %rdx
callq 0x8e0e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: exectext_extract_default
static void exectext_extract_default(deark *c, lctx *d)
{
	dbuf *outf = NULL;
	static struct ecnv_ctx *ecnv = NULL;

	if(d->errflag) goto done;
	exectext_check_tpos(c, d);
	if(d->errflag) goto done;

	outf = dbuf_create_output_file(c, "txt", NULL, 0);
	if(d->proctype!=ET_PROCTYPE_RAW) {
		dbuf_enable_wbuffer(outf);

		if(d->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
			ecnv = ecnv_create(c, d->proctype, DE_EXTENC_MAKE(d->input_encoding,
				DE_ENCSUBTYPE_PRINTABLE), outf);
			if(c->write_bom) {
				dbuf_write_uchar_as_utf8(outf, 0xfeff);
			}
		}
		if(!ecnv) {
			ecnv = ecnv_create(c, d->proctype, DE_ENCODING_UNKNOWN, outf);
		}

		exectext_convert_and_write_slice(c, d, d->tpos, d->tlen, ecnv);
	}
	else {
		dbuf_copy(d->inf, d->tpos, d->tlen, outf);
	}

done:
	if(ecnv) {
		ecnv_hard_flush(c, ecnv);
		ecnv_destroy(c, ecnv);
	}
	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 -0x10(%rbp), %rax
cmpb $0x0, 0x12(%rax)
je 0x8df57
jmp 0x8e069
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8e1d0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x12(%rax)
je 0x8df73
jmp 0x8e069
movq -0x8(%rbp), %rdi
leaq 0x127c73(%rip), %rsi    # 0x1b5bf1
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
je 0x8e046
movq -0x18(%rbp), %rdi
callq 0x167b90
movq -0x10(%rbp), %rax
cmpl $0x3, 0x18(%rax)
jne 0x8dff9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
andl $0xff, %edx
orl $0x400, %edx            # imm = 0x400
movq -0x18(%rbp), %rcx
callq 0x8e260
movq %rax, 0x197c3c(%rip)    # 0x225c18
movq -0x8(%rbp), %rax
cmpb $0x0, 0xcc(%rax)
je 0x8dff7
movq -0x18(%rbp), %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0x160cc0
jmp 0x8dff9
cmpq $0x0, 0x197c17(%rip)    # 0x225c18
jne 0x8e020
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq 0x8e260
movq %rax, 0x197bf8(%rip)    # 0x225c18
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x197bd9(%rip), %r8     # 0x225c18
callq 0x8e2f0
jmp 0x8e067
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x18(%rbp), %rcx
callq 0x166070
jmp 0x8e069
cmpq $0x0, 0x197ba7(%rip)    # 0x225c18
je 0x8e093
movq -0x8(%rbp), %rdi
movq 0x197b9a(%rip), %rsi    # 0x225c18
callq 0x8e4e0
movq -0x8(%rbp), %rdi
movq 0x197b8a(%rip), %rsi    # 0x225c18
callq 0x8e520
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/exectext.c
// Function: txt2com_read_textpos
static void txt2com_read_textpos(deark *c, lctx *d, i64 pos1)
{
	i64 pos = pos1;
	i64 pos_of_tlen;

	de_dbg(c, "pos of tlen pointer: %"I64_FMT, pos1);

	pos_of_tlen = de_getu16le_p(&pos) - 256;
	de_dbg(c, "pos of tlen: %"I64_FMT, pos_of_tlen);

	pos += 2;

	d->tpos = de_getu16le_p(&pos) - 256;
	de_dbg(c, "tpos: %"I64_FMT, d->tpos);

	d->tlen = de_getu16le(pos_of_tlen);
	de_dbg(c, "tlen: %"I64_FMT, d->tlen);
}

// 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, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x121232(%rip), %rsi    # 0x1af33d
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
subq $0x100, %rax            # imm = 0x100
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x12121a(%rip), %rsi    # 0x1af356
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
subq $0x100, %rcx            # imm = 0x100
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x1213ec(%rip), %rsi    # 0x1af571
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x1211a2(%rip), %rsi    # 0x1af35d
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: exectext_check_tpos
static void exectext_check_tpos(deark *c, lctx *d)
{
	if(d->tpos<0 || (d->tpos==0 && d->inf==c->infile) ||
		d->tlen<0 || (d->tlen==0 && !d->allow_tlen_0) ||
		(d->tpos+d->tlen > d->inf->len))
	{
		d->errflag = 1;
		d->need_errmsg = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jl 0x8e242
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x8e204
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x8e242
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jl 0x8e242
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x8e224
movq -0x10(%rbp), %rax
cmpb $0x0, 0x16(%rax)
je 0x8e242
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x30(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x8e252
movq -0x10(%rbp), %rax
movb $0x1, 0x12(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x13(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: ecnv_create
static struct ecnv_ctx *ecnv_create(deark *c, enum et_proctype proctype,
	int ext_enc, dbuf *outf)
{
	struct ecnv_ctx *ecnv;

	ecnv = (struct ecnv_ctx*)de_malloc(c, sizeof(struct ecnv_ctx));
	ecnv->c = c;
	ecnv->tmpstr = ucstring_create(c);
	ecnv->outf = outf;
	ecnv->proctype = proctype;
	ecnv->ext_enc = ext_enc;
	de_encconv_init(&ecnv->es, ext_enc);
	return ecnv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movl -0x10(%rbp), %esi
callq 0x160150
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: ecnv_add_rune
static void ecnv_add_rune(struct ecnv_ctx *ecnv, de_rune n)
{
	if(ecnv->proctype!=ET_PROCTYPE_FMTCONV_AND_ENCCONV) return;
	ecnv_barrier(ecnv);
	ucstring_append_char(ecnv->tmpstr, n);
	ecnv_flush_if_needed(ecnv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x3, 0x18(%rax)
je 0x8e57b
jmp 0x8e59c
movq -0x8(%rbp), %rdi
callq 0x8e610
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x1714c0
movq -0x8(%rbp), %rdi
callq 0x8e650
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: ecnv_add_byte
static void ecnv_add_byte(struct ecnv_ctx *ecnv, u8 b)
{
	if(ecnv->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
		ucstring_append_bytes_ex(ecnv->tmpstr, &b, 1, DE_CONVFLAG_PARTIAL_DATA, &ecnv->es);
		ecnv_flush_if_needed(ecnv);
	}
	else {
		dbuf_writebyte(ecnv->outf, b);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x3, 0x18(%rax)
jne 0x8e5f9
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %r8
addq $0x20, %r8
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
movl $0x40, %ecx
callq 0x171820
movq -0x8(%rbp), %rdi
callq 0x8e650
jmp 0x8e60a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movzbl -0x9(%rbp), %esi
callq 0x168380
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/exectext.c
// Function: showgmr_search
static void showgmr_search(deark *c, lctx *d)
{
#define SHOW_BUF_POS1 1800
#define SHOW_BUF_LEN1 1200
	u8 *mem = NULL;
	i64 foundpos;
	int ret;

	mem = de_malloc(c, SHOW_BUF_LEN1);
	de_read(mem, SHOW_BUF_POS1, SHOW_BUF_LEN1);

	// v2.0, 2.0A, 2.1(?)
	ret = de_memsearch_match(mem, SHOW_BUF_LEN1,
		(const u8*)"\x06?\x03\x19\xa1\x6c\x00\x3b\x06?\x03\x72\xf7\x58\x1f\xc3", 16,
		'?', &foundpos);
	if(ret) {
		d->found_text = 1;
		d->tpos = SHOW_BUF_POS1+foundpos+16;
		goto done;
	}

	// v1.0, 1.4, 1.5
	ret = de_memsearch_match(mem, SHOW_BUF_LEN1,
		(const u8*)"\x4e\x8a\x04\x3c\x0a\x75\xf9\x4d\x75\xf5\x46\x89\x36?\x02\xc3", 16,
		'?', &foundpos);
	if(ret) {
		d->found_text = 1;
		d->tpos = SHOW_BUF_POS1+foundpos+16;
		goto done;
	}

done:
	de_free(c, mem);
}

// 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 $0x4b0, %esi            # imm = 0x4B0
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x708, %edx            # imm = 0x708
movl $0x4b0, %ecx            # imm = 0x4B0
callq 0x164d10
movq -0x18(%rbp), %rdi
movl $0x4b0, %esi            # imm = 0x4B0
leaq 0x120fdb(%rip), %rdx    # 0x1af740
movl $0x10, %ecx
movl $0x3f, %r8d
leaq -0x20(%rbp), %r9
callq 0x15f740
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x8e7a3
movq -0x10(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x20(%rbp), %rcx
addq $0x708, %rcx            # imm = 0x708
addq $0x10, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x8e7f3
movq -0x18(%rbp), %rdi
movl $0x4b0, %esi            # imm = 0x4B0
leaq 0x120c97(%rip), %rdx    # 0x1af44a
movl $0x10, %ecx
movl $0x3f, %r8d
leaq -0x20(%rbp), %r9
callq 0x15f740
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x8e7f1
movq -0x10(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x20(%rbp), %rcx
addq $0x708, %rcx            # imm = 0x708
addq $0x10, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x8e7f3
jmp 0x8e7f3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)