LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5e406
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
movl %eax, %ebp
movzbl %al, %r15d
leal -0xe8(%r15), %eax
cmpl $0x2, %eax
jb 0x5e3b6
cmpl $0x8d, %r15d
jne 0x5e406
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
movq %rsp, %rsi
pushq $0x1c
popq %rcx
xorl %edx, %edx
callq 0xe3cb7
cmpb $-0x17, %bpl
je 0x5e413
cmpl $0xe8, %r15d
je 0x5e3e8
cmpl $0x8d, %r15d
jne 0x5e406
leaq 0xe(%rsp), %rdi
jmp 0x5e3ed
leaq 0x5(%rsp), %rdi
leaq 0xb8493(%rip), %rsi     # 0x116887
pushq $0x9
popq %rdx
callq 0x18230
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x5c
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3(%rsp), %r14
leaq 0xb8468(%rip), %rsi     # 0x116887
pushq $0x9
popq %rdx
movq %r14, %rdi
callq 0x18230
pushq $0x5c
popq %rbx
testl %eax, %eax
je 0x5e406
leaq 0xb8459(%rip), %rsi     # 0x116891
pushq $0x9
popq %rdx
movq %r14, %rdi
callq 0x18230
testl %eax, %eax
je 0x5e406
leaq 0xb844d(%rip), %rsi     # 0x11689b
pushq $0x9
popq %rdx
movq %r14, %rdi
jmp 0x5e3f7
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb8241(%rip), %rax     # 0x1166a3
movq %rax, (%rsi)
leaq 0xb8240(%rip), %rax     # 0x1166ac
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5e492
movq %rax, 0x18(%rsi)
leaq 0x152(%rip), %rax       # 0x5e5d4
movq %rax, 0x20(%rsi)
leaq 0x1a9(%rip), %rax       # 0x5e636
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x5fc9f
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5fcb7
leaq 0xb8462(%rip), %rsi     # 0x11691a
movq %rbx, %rdi
callq 0xe07f7
movb $0x1, %al
movb %al, 0x42(%r14)
movb %al, 0x45(%r14)
movl $0x4b0, %esi            # imm = 0x4B0
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x708, %edx            # imm = 0x708
movl $0x4b0, %ecx            # imm = 0x4B0
movq %rax, %rsi
callq 0xe3cb7
leaq 0xb8759(%rip), %rdx     # 0x116c50
pushq $0x10
popq %rcx
pushq $0x3f
popq %r8
leaq 0x8(%rsp), %r9
movl $0x4b0, %esi            # imm = 0x4B0
movq %r15, %rdi
callq 0xe1021
testl %eax, %eax
jne 0x5e538
leaq 0xb843e(%rip), %rdx     # 0x116959
pushq $0x10
popq %rcx
pushq $0x3f
popq %r8
leaq 0x8(%rsp), %r9
movl $0x4b0, %esi            # imm = 0x4B0
movq %r15, %rdi
callq 0xe1021
testl %eax, %eax
je 0x5e54b
movb $0x1, 0x14(%r14)
movl $0x718, %eax            # imm = 0x718
addq 0x8(%rsp), %rax
movq %rax, 0x28(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
cmpb $0x0, 0x14(%r14)
je 0x5e5a9
movq 0x28(%r14), %rdx
leaq 0xb8518(%rip), %rsi     # 0x116a80
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rsi
movq %rsi, %rax
subq 0x28(%r14), %rax
movq %rax, 0x30(%r14)
decq %rsi
callq 0xe3eb4
cmpb $0x1a, %al
jne 0x5e595
decq 0x30(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5fd39
cmpb $0x0, 0x13(%r14)
jne 0x5e5ae
jmp 0x5e5bf
movb $0x1, 0x13(%r14)
leaq 0xb837c(%rip), %rsi     # 0x116931
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5e62c
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
cmpb $-0x17, %al
jne 0x5e62c
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rsi
decq %rsi
callq 0xe3eb4
cmpb $0x1a, %al
jne 0x5e62c
movq 0x18(%r14), %rdi
leaq 0xb864a(%rip), %rdx     # 0x116c61
pushq $0x4
popq %rsi
pushq $0x9
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb807f(%rip), %rax     # 0x1166c1
movq %rax, (%rsi)
leaq 0xb807d(%rip), %rax     # 0x1166c9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5e672
movq %rax, 0x18(%rsi)
leaq 0x3b1(%rip), %rax       # 0x5ea13
movq %rax, 0x20(%rsi)
leaq 0x3e0(%rip), %rax       # 0x5ea4d
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movq 0x18(%rdi), %rcx
xorl %eax, %eax
cmpq $0xff00, 0x18(%rcx)     # imm = 0xFF00
jg 0x5ea4c
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x601eb
xorl %ecx, %ecx
cmpb $0x0, (%rbx)
pushq $0x48
popq %rax
cmovel %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb7c88(%rip), %rax     # 0x1166e1
movq %rax, (%rsi)
leaq 0xb7c86(%rip), %rax     # 0x1166e9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5ea89
movq %rax, 0x18(%rsi)
leaq 0x400(%rip), %rax       # 0x5ee79
movq %rax, 0x20(%rsi)
leaq 0x450(%rip), %rax       # 0x5eed4
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5eec9
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xe3eb4
cmpb $-0x4, %al
je 0x5eea9
movzbl %al, %eax
cmpl $0xbe, %eax
jne 0x5eec9
movq %rsp, %r14
andq $0x0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x604fb
xorl %eax, %eax
cmpb $0x0, (%r14)
pushq $0x49
popq %r14
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb782e(%rip), %rax     # 0x11670e
movq %rax, (%rsi)
leaq 0xb7830(%rip), %rax     # 0x11671a
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5ef10
movq %rax, 0x18(%rsi)
leaq 0x16d(%rip), %rax       # 0x5f06d
movq %rax, 0x20(%rsi)
leaq 0x1c3(%rip), %rax       # 0x5f0ce
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: de_run_doc2com_dkn
static void de_run_doc2com_dkn(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos_of_tpos = 0;
	i64 pos_of_tlen = 0;
	UI n;
	UI b1, b2;

	d = create_lctx(c);
	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);
	d->chartypes[7] = ETCT_CONTROL;
	d->chartypes[8] = ETCT_CONTROL;
	d->chartypes[9] = ETCT_CONTROL;
	d->chartypes[10] = ETCT_CONTROL;
	d->chartypes[13] = ETCT_CONTROL;
	d->chartypes[27] = ETCT_CONTROL;

	n = (UI)de_getu16le(1);
	if(n==0x0093) {
		d->fmtcode = 1;
		pos_of_tpos = 171;
		pos_of_tlen = 178;
	}
	else if(n==0x0107) {
		d->fmtcode = 2;
		pos_of_tpos = 293;
		pos_of_tlen = 300;
	}

	if(d->fmtcode==0) goto done;
	if(de_getbyte(pos_of_tpos-1)!=0xbf) goto done;
	de_dbg(c, "fmt code: %u", d->fmtcode);
	d->tpos = de_getu16le(pos_of_tpos);
	d->tpos -= 0x100;
	if(d->fmtcode==2) d->tpos--;
	de_dbg(c, "tpos: %"I64_FMT, d->tpos);

	b1 = de_getbyte(pos_of_tlen);
	b2 = de_getbyte(pos_of_tlen+2);
	d->tlen = ((UI)b1<<8) | b2;
	de_dbg(c, "tlen: %"I64_FMT, d->tlen);

	exectext_extract_default(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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5fc9f
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5fcb7
movb $0x1, %al
movb %al, 0x45(%r14)
movb %al, 0x53(%r14)
movl $0x1010101, 0x3f(%r14)  # imm = 0x1010101
movq 0x18(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0xe3fa3
cmpl $0x93, %eax
je 0x5ef6a
cmpl $0x107, %eax            # imm = 0x107
jne 0x5ef7f
movl $0x125, %r12d           # imm = 0x125
movl $0x12c, %r15d           # imm = 0x12C
pushq $0x2
jmp 0x5ef78
movl $0xab, %r12d
movl $0xb2, %r15d
pushq $0x1
popq %rax
movl %eax, 0xc(%r14)
jmp 0x5ef90
cmpl $0x0, 0xc(%r14)
je 0x5f042
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
leaq -0x1(%r12), %rsi
callq 0xe3eb4
cmpb $-0x41, %al
jne 0x5f042
movl 0xc(%r14), %edx
leaq 0xb7a83(%rip), %rsi     # 0x116a34
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3fa3
leaq -0x100(%rax), %rdx
movq %rdx, 0x28(%r14)
cmpl $0x2, 0xc(%r14)
jne 0x5efe6
addq $-0x101, %rax           # imm = 0xFEFF
movq %rax, 0x28(%r14)
movq %rax, %rdx
leaq 0xb7a93(%rip), %rsi     # 0x116a80
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x18(%rbx), %rdi
addq $0x2, %r15
movq %r15, %rsi
callq 0xe3eb4
movzbl %al, %eax
movzbl %bpl, %edx
shll $0x8, %edx
orq %rax, %rdx
movq %rdx, 0x30(%r14)
leaq 0xb783f(%rip), %rsi     # 0x11686c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5fd39
cmpb $0x0, 0x13(%r14)
je 0x5f05a
leaq 0xb79f1(%rip), %rsi     # 0x116a41
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5f0c3
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xe404f
cmpl $0xe9930000, %eax       # imm = 0xE9930000
je 0x5f0a1
cmpl $0xe9070100, %eax       # imm = 0xE9070100
jne 0x5f0c3
pushq $0x13
jmp 0x5f0a3
pushq $0x1b
popq %rsi
movq 0x18(%rbx), %rdi
leaq 0xb7a32(%rip), %rdx     # 0x116ae1
pushq $0xe
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x4f
popq %r14
cmovnel %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb7664(%rip), %rax     # 0x11673e
movq %rax, (%rsi)
leaq 0xb765f(%rip), %rax     # 0x116743
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5f10a
movq %rax, 0x18(%rsi)
leaq 0x29c(%rip), %rax       # 0x5f396
movq %rax, 0x20(%rsi)
leaq 0x2f9(%rip), %rax       # 0x5f3fe
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5f3f4
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
cmpb $-0x45, %al
jne 0x5f3f4
movq 0x18(%r14), %rdi
leaq 0xb7a41(%rip), %rdx     # 0x116e06
pushq $0x1
popq %rsi
pushq $0x7
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x5f3f4
movq 0x18(%r14), %rdi
leaq 0xb7739(%rip), %rdx     # 0x116b18
pushq $0x5f
popq %rsi
pushq $0x8
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb7348(%rip), %rax     # 0x116752
movq %rax, (%rsi)
leaq 0xb7347(%rip), %rax     # 0x11675b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5f42f
movq %rax, 0x18(%rsi)
leaq 0x171(%rip), %rax       # 0x5f59b
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: de_run_readmake
static void de_run_readmake(deark *c, de_module_params *mparams)
{
	struct readmake_ctx *rmctx = NULL;
	lctx *d = NULL;

	d = create_lctx(c);

	rmctx = de_malloc(c, sizeof(struct readmake_ctx));
	rmctx->msgpfx = "[READMAKE] ";
	rmctx->ei = de_malloc(c, sizeof(struct fmtutil_exe_info));

	exectext_set_common_enc_opts(c, d, DE_ENCODING_CP437);

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

	fmtutil_collect_exe_info(c, c->infile, rmctx->ei);

	rmctx->edd.restrict_to_fmt = DE_SPECIALEXEFMT_READMAKE;
	fmtutil_detect_specialexe(c, rmctx->ei, &rmctx->edd);
	if(rmctx->edd.detected_fmt!=DE_SPECIALEXEFMT_READMAKE) {
		d->need_errmsg = 1;
		goto done;
	}

	readmake_find_text(c, rmctx, d);
	if(d->tpos==0 || d->errflag) goto done;

	exectext_extract_default(c, d);

done:
	if(d) {
		if(d->need_errmsg && rmctx) {
			de_err(c, "%sBad or unsupported READMAKE file", rmctx->msgpfx);
		}
		de_free(c, d);
		d = NULL;
	}
	if(rmctx) {
		de_free(c, rmctx->ei);
		de_free(c, rmctx);
		rmctx = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5fc9f
movq %rax, %r15
movl $0x88, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
leaq 0xb76c7(%rip), %rax     # 0x116b21
movq %rax, (%r14)
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5fcb7
movb $0x1, %al
movb %al, 0x16(%r15)
movw $0x101, 0x40(%r15)      # imm = 0x101
movb %al, 0x42(%r15)
movb %al, 0x45(%r15)
movq 0x18(%rbx), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf8849
leaq 0x10(%r14), %rdx
movb $-0x36, 0x10(%r14)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xf90d3
cmpb $-0x36, 0x11(%r14)
jne 0x5f4f8
movq 0x8(%r14), %rax
movq 0x48(%rax), %r13
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe409f
movq %rax, %r12
addq %r13, %r12
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe409f
cmpq $0x4, %rax
jne 0x5f4ff
addq $0x4, %r12
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe409f
jmp 0x5f510
movb $0x1, 0x13(%r15)
jmp 0x5f555
cmpq $0xd, %rax
jg 0x5f510
movb $0x1, 0x13(%r15)
movq 0x28(%r15), %rax
jmp 0x5f53e
addq %rax, %r12
movq %r12, 0x28(%r15)
leaq 0xb7562(%rip), %rsi     # 0x116a80
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movq 0x28(%r15), %rax
subq %rax, %rcx
movq %rcx, 0x30(%r15)
testq %rax, %rax
je 0x5f555
cmpb $0x0, 0x12(%r15)
jne 0x5f555
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5fd39
cmpb $0x0, 0x13(%r15)
je 0x5f570
movq (%r14), %rdx
leaq 0xb75c7(%rip), %rsi     # 0x116b2d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb71cd(%rip), %rax     # 0x116774
movq %rax, (%rsi)
leaq 0xb71c8(%rip), %rax     # 0x116779
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5f5cc
movq %rax, 0x18(%rsi)
leaq 0x1d1(%rip), %rax       # 0x5f798
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb6fea(%rip), %rax     # 0x11678e
movq %rax, (%rsi)
leaq 0xb6feb(%rip), %rax     # 0x116799
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5f7c9
movq %rax, 0x18(%rsi)
leaq 0x154(%rip), %rax       # 0x5f918
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: de_run_readamatic
static void de_run_readamatic(deark *c, de_module_params *mparams)
{
	struct readamatic_ctx *tctx = NULL;
	lctx *d = NULL;
	dbuf *tmpdbuf = NULL;

	d = create_lctx(c);

	tctx = de_malloc(c, sizeof(struct readamatic_ctx));
	tctx->msgpfx = "[Read-A-Matic] ";
	tctx->ei = de_malloc(c, sizeof(struct fmtutil_exe_info));

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

	fmtutil_collect_exe_info(c, c->infile, tctx->ei);

	tctx->edd.restrict_to_fmt = DE_SPECIALEXEFMT_READAMATIC;
	fmtutil_detect_specialexe(c, tctx->ei, &tctx->edd);
	if(tctx->edd.detected_fmt!=DE_SPECIALEXEFMT_READAMATIC) {
		d->need_errmsg = 1;
		goto done;
	}

	if(tctx->ei->overlay_len<2 || tctx->ei->overlay_len > 640*1024) {
		d->need_errmsg = 1;
		goto done;
	}

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

	exectext_extract_default(c, d);

done:
	if(d) {
		if(d->need_errmsg && tctx) {
			de_err(c, "%sBad or unsupported Read-A-Matic file", tctx->msgpfx);
		}
		de_free(c, d);
		d = NULL;
	}
	if(tctx) {
		de_free(c, tctx->ei);
		de_free(c, tctx);
		tctx = NULL;
	}
	dbuf_close(tmpdbuf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x5fc9f
movq %rax, %r15
movl $0x88, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
leaq 0xb7383(%rip), %rax     # 0x116b77
movq %rax, (%r14)
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, 0x8(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5fcb7
movb $0x1, %al
movb %al, 0x42(%r15)
movb %al, 0x45(%r15)
movq 0x18(%rbx), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf8849
leaq 0x10(%r14), %rdx
movb $-0x34, 0x10(%r14)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xf90d3
cmpb $-0x34, 0x11(%r14)
jne 0x5f861
movq 0x8(%r14), %rax
movq $-0xa0001, %rcx         # imm = 0xFFF5FFFF
addq 0x50(%rax), %rcx
cmpq $-0xa0000, %rcx         # imm = 0xFFF60000
ja 0x5f8b4
movb $0x1, 0x13(%r15)
cmpb $0x0, 0x13(%r15)
je 0x5f881
movq (%r14), %rdx
leaq 0xb7310(%rip), %rsi     # 0x116b87
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
xorl %edi, %edi
callq 0xe5591
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x48(%rax), %rdx
addq $0xa, %rdx
movq 0x18(%rbx), %rdi
pushq $0xa
popq %rsi
leaq 0x8(%rsp), %r8
movl $0x100, %ecx            # imm = 0x100
callq 0xe4b21
testl %eax, %eax
je 0x5f90c
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x28(%r15)
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rcx
subq %rax, %rcx
movq %rcx, 0x30(%r15)
cmpb $0x0, 0x12(%r15)
jne 0x5f866
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5fd39
jmp 0x5f866
movw $0x101, 0x12(%r15)      # imm = 0x101
jmp 0x5f866
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb6e92(%rip), %rax     # 0x1167b6
movq %rax, (%rsi)
leaq 0xb6e8e(%rip), %rax     # 0x1167bc
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5f954
movq %rax, 0x18(%rsi)
leaq 0x185(%rip), %rax       # 0x5fac9
movq %rax, 0x20(%rsi)
leaq 0x1c8(%rip), %rax       # 0x5fb17
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x5fb0d
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
cmpb $-0x17, %al
jne 0x5fb0d
movq 0x18(%r14), %rdi
leaq 0xb7316(%rip), %rdx     # 0x116e0e
pushq $0x1
popq %rsi
pushq $0xf
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xb6c9f(%rip), %rax     # 0x1167c2
movq %rax, (%rsi)
leaq 0xb6c9e(%rip), %rax     # 0x1167cb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5fb48
movq %rax, 0x18(%rsi)
leaq 0x157(%rip), %rax       # 0x5fc9a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0xd
popq %rdx
xorl %esi, %esi
callq 0xe08d2
movl %eax, 0x8(%rbx)
leaq 0xb6b46(%rip), %rsi     # 0x116821
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0xdfae5
movb %al, 0x10(%rbx)
leaq 0xb6b3c(%rip), %rsi     # 0x11682e
movq %r14, %rdi
movl %ebp, %edx
callq 0xdfae5
cmpl $0x1, 0x8(%rbx)
cmovel %r15d, %eax
movb %al, 0x11(%rbx)
cmpb $0x0, 0x10(%rbx)
je 0x5fd27
testb %al, %al
je 0x5fd1a
movl $0x3, 0x18(%rbx)
jmp 0x5fd2e
movl $0x2, 0x18(%rbx)
cmpb $0x0, 0x17(%rbx)
jne 0x5fd2e
movl $0x1, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x12(%rsi)
jne 0x5fd59
movq %rsi, %r15
movq %rbx, %rdi
callq 0x5fefd
cmpb $0x0, 0x12(%r15)
je 0x5fd89
xorl %r14d, %r14d
movq 0x13241d(%rip), %rdi    # 0x192180
testq %rdi, %rdi
je 0x5fd7c
callq 0x600bc
movq 0x13240c(%rip), %rsi    # 0x192180
movq %rbx, %rdi
callq 0x600d5
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xe5591
leaq 0xbd2d0(%rip), %rsi     # 0x11d060
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r14
cmpl $0x1, 0x18(%r15)
jne 0x5fdbc
movq 0x20(%r15), %rdi
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
movq %r14, %rcx
callq 0xe45f4
jmp 0x5fd5c
movq %r14, %rdi
callq 0xe589c
cmpl $0x3, 0x18(%r15)
jne 0x5fe01
movzbl 0x8(%r15), %edx
orl $0x400, %edx            # imm = 0x400
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x5ff37
movq %rax, 0x132395(%rip)    # 0x192180
cmpb $0x0, 0xcc(%rbx)
je 0x5fe3d
movq %r14, %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0xe1790
movq 0x132378(%rip), %rcx    # 0x192180
testq %rcx, %rcx
jne 0x5fe28
movl 0x18(%r15), %esi
movq %rbx, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x5ff37
movq %rax, %rcx
movq %rax, 0x132358(%rip)    # 0x192180
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
movq %r15, %rdi
callq 0x5ff8c
jmp 0x5fd5c
movq %rax, %rcx
jmp 0x5fe08
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %rdx, (%r15)
leaq 0xb69de(%rip), %rsi     # 0x11684c
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq $-0x100, %r13
leaq (%rax,%r13), %r12
leaq 0xb69d2(%rip), %rsi     # 0x116865
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x2, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
addq %rax, %r13
movq %r13, 0x28(%r14)
leaq 0xb6bc2(%rip), %rsi     # 0x116a80
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3fa3
movq %rax, 0x30(%r14)
leaq 0xb698a(%rip), %rsi     # 0x11686c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movq 0x28(%rsi), %rax
testq %rax, %rax
js 0x5ff30
jne 0x5ff12
movq 0x20(%rsi), %rcx
cmpq 0x18(%rdi), %rcx
je 0x5ff30
movq 0x30(%rsi), %rcx
testq %rcx, %rcx
js 0x5ff30
jne 0x5ff23
cmpb $0x0, 0x16(%rsi)
je 0x5ff30
addq %rax, %rcx
movq 0x20(%rsi), %rax
cmpq 0x18(%rax), %rcx
jle 0x5ff36
movw $0x101, 0x12(%rsi)      # imm = 0x101
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r12
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0xeac74
movq %rax, (%r12)
movq %rbx, 0x8(%r12)
movl %r14d, 0x18(%r12)
movl %ebp, 0x1c(%r12)
leaq 0x20(%r12), %rdi
movl %ebp, %esi
callq 0xe11fc
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: exectext_convert_and_write_slice
static void exectext_convert_and_write_slice(deark *c, lctx *d,
	i64 pos1, i64 len, struct ecnv_ctx *ecnv)
{
	i64 pos = pos1;
	i64 endpos = pos1 + len;

	while(pos < endpos) {
		u8 x;
		u8 tmpbyte;
		u8 next_byte_is_same;
		int k;

		x = dbuf_getbyte_p(d->inf, &pos);
		switch(d->chartypes[x]) {

		case ETCT_CONTROL:
			if(ecnv->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
				ecnv_add_rune(ecnv, (de_rune)x);
			}
			else {
				ecnv_add_byte(ecnv, x);
			}
			break;
		case ETCT_SPECIAL:
			if(ecnv->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
				ecnv_add_rune(ecnv, 0xfffd);
			}
			break;
		case ETCT_8SPACES:
			for(k=0; k<8; k++) {
				ecnv_add_byte(ecnv, 0x20);
			}
			break;
		case ETCT_CRLF:
			if(d->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
				ecnv_add_rune(ecnv, 0x0d);
				ecnv_add_rune(ecnv, 0x0a);
			}
			else {
				ecnv_add_byte(ecnv, 0x0d);
				ecnv_add_byte(ecnv, 0x0a);
			}
			break;
		case ETCT_DOC2COMSPECIAL:
			next_byte_is_same = 0;
			// Escaping is done by doubling the special character.
			// Peek ahead at the next byte:
			if(pos < endpos-1) {
				tmpbyte = dbuf_getbyte(d->inf, pos);
				if(tmpbyte==x) {
					next_byte_is_same = 1;
				}
			}
			if(next_byte_is_same) {
				ecnv_add_byte(ecnv, x);
				pos++; // Skip the extra byte we read
			}
			else {
				if(ecnv->proctype==ET_PROCTYPE_FMTCONV_AND_ENCCONV) {
					ecnv_add_rune(ecnv, 0xfffd);
				}
			}
			break;
		default:
			ecnv_add_byte(ecnv, x);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
leaq (%rdx,%rsi), %rax
decq %rax
movq %rax, 0x10(%rsp)
addq %rsi, %r14
pushq $0x20
popq %rbp
cmpq %r14, %rsi
jge 0x600ad
movq 0x20(%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe3f2a
movl %eax, %r12d
movzbl %al, %r13d
movzbl 0x38(%r15,%r13), %eax
cmpl $0x1, %eax
je 0x60072
cmpl $0x2, %eax
je 0x60048
cmpl $0x66, %eax
je 0x60058
cmpl $0x65, %eax
je 0x6001c
cmpl $0x64, %eax
jne 0x60085
pushq $0x8
popq %r12
subl $0x1, %r12d
jb 0x600a3
movq %rbx, %rdi
movl %ebp, %esi
callq 0x60128
jmp 0x60006
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
jge 0x60048
movq 0x20(%r15), %rdi
callq 0xe3eb4
cmpb %r12b, %al
jne 0x60048
movq %rbx, %rdi
movl %r13d, %esi
callq 0x60128
incq 0x8(%rsp)
jmp 0x600a3
cmpl $0x3, 0x18(%rbx)
jne 0x600a3
movq %rbx, %rdi
movl $0xfffd, %esi           # imm = 0xFFFD
jmp 0x6007e
cmpl $0x3, 0x18(%r15)
jne 0x6008d
movq %rbx, %rdi
pushq $0xd
popq %rsi
callq 0x600ff
movq %rbx, %rdi
pushq $0xa
popq %rsi
jmp 0x6007e
cmpl $0x3, 0x18(%rbx)
jne 0x60085
movq %rbx, %rdi
movl %r13d, %esi
callq 0x600ff
jmp 0x600a3
movq %rbx, %rdi
movl %r13d, %esi
jmp 0x6009e
movq %rbx, %rdi
pushq $0xd
popq %rsi
callq 0x60128
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x60128
movq 0x8(%rsp), %rsi
jmp 0x5ffbd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpl $0x3, 0x18(%rdi)
jne 0x60127
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x60172
movq (%rbx), %rdi
movl %ebp, %esi
callq 0xeada5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6018c
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb %sil, 0xf(%rsp)
cmpl $0x3, 0x18(%rdi)
jne 0x60160
movq (%rbx), %rdi
leaq 0x20(%rbx), %r8
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
pushq $0x40
popq %rcx
callq 0xeaf9a
movq %rbx, %rdi
callq 0x6018c
addq $0x10, %rsp
popq %rbx
retq
movq 0x8(%rbx), %rdi
movzbl %sil, %esi
addq $0x10, %rsp
popq %rbx
jmp 0xe5bc5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: asc2com_identify
static void asc2com_identify(deark *c, struct asc2com_detection_data *idd, UI idmode)
{
	u8 buf[3];
	size_t k;
	const struct asc2com_idinfo *found_item = NULL;

	dbuf_read(c->infile, buf, 0, 3);
	if(buf[0]!=0xe8 && buf[0]!=0xe9 && buf[0]!=0xbb && buf[0]!=0xeb) return;

	for(k=0; k<DE_ARRAYCOUNT(asc2com_idinfo_arr); k++) {
		const struct asc2com_idinfo *t;
		u8 sig_type;

		t = &asc2com_idinfo_arr[k];

		if(buf[0]==t->sig1[0] && buf[1]==t->sig1[1] &&
			(t->sig1[0]==0xeb || (buf[2]==t->sig1[2])))
		{

			sig_type = t->flags & 0x03;
			if(sig_type==1) {
				if(!dbuf_memcmp(c->infile, (i64)t->sig2pos,
					(const void*)"\x49\xe3\x0e\x33\xd2\x8a\x14\xfe\xc2\x03\xf2\x49", 12))
				{
					if(t->flags & 0x40) {
						i64 tmptxtpos;

						tmptxtpos = de_getu16le((i64)t->sig2pos-2) - 0x100;
						if(tmptxtpos == t->txtpos) {
							found_item = t;
						}
					}
					else {
						found_item = t;
					}
				}
			}
			else if(sig_type==2) {
				if(!dbuf_memcmp(c->infile, (i64)t->sig2pos,
					(const void*)"ASC2COM", 7))
				{
					found_item = t;
				}
			}
		}

		if(found_item) {
			break;
		}
	}
	if(!found_item) return;
	idd->found = 1;
	if(idmode) return;

	idd->tpos = (i64)found_item->txtpos;
	idd->fmtcode = found_item->fmtcode;
	if(found_item->flags & 0x80) {
		idd->is_compressed = 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x5(%rsp), %rbx
pushq $0x3
popq %rcx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xe3cb7
movzbl (%rbx), %eax
addl $0xffffff45, %eax       # imm = 0xFFFFFF45
cmpl $0x30, %eax
ja 0x60340
movabsq $0x1600000000001, %rcx  # imm = 0x1600000000001
btq %rax, %rcx
jae 0x60340
pushq $0x8
popq %r15
leaq 0xb6a25(%rip), %r12     # 0x116c70
pushq $0xc
popq %rbx
cmpq $0x188, %r15            # imm = 0x188
je 0x60340
movb 0x5(%rsp), %al
cmpb -0x8(%r15,%r12), %al
jne 0x60304
movb 0x6(%rsp), %cl
cmpb -0x7(%r15,%r12), %cl
jne 0x60304
cmpb $-0x15, %al
je 0x60288
movb 0x7(%rsp), %al
cmpb -0x6(%r15,%r12), %al
jne 0x60304
movzbl -0x5(%r15,%r12), %r13d
movl %r13d, %eax
andl $0x3, %eax
cmpl $0x2, %eax
je 0x602e7
cmpl $0x1, %eax
jne 0x60304
movq 0x18(%r14), %rdi
movzwl -0x4(%r15,%r12), %ebp
movq %rbp, %rsi
leaq 0xb66f6(%rip), %rdx     # 0x1169a8
movq %rbx, %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x60304
testb $0x40, %r13b
je 0x6030d
movq 0x18(%r14), %rdi
addq $-0x2, %rbp
movq %rbp, %rsi
callq 0xe3fa3
addq $-0x100, %rax
movzwl -0x2(%r15,%r12), %ecx
cmpq %rcx, %rax
jne 0x60304
jmp 0x6030d
movq 0x18(%r14), %rdi
movzwl -0x4(%r15,%r12), %esi
leaq 0xb66bd(%rip), %rdx     # 0x1169b5
pushq $0x7
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0x6030d
addq $0xc, %r15
jmp 0x6024e
movq 0x8(%rsp), %rax
movb $0x1, (%rax)
cmpl $0x0, 0x14(%rsp)
jne 0x60340
movzwl -0x2(%r15,%r12), %eax
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rcx)
movl (%r15,%r12), %eax
movl %eax, 0x4(%rcx)
testb %r13b, %r13b
jns 0x60340
movq 0x8(%rsp), %rax
movb $0x1, 0x1(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/exectext.c
// Function: doc2com_detect
static void doc2com_detect(deark *c, struct doc2com_detection_data *idd, UI idmode)
{
	u8 buf[22];

	dbuf_read(c->infile, buf, 0, sizeof(buf));

	if(buf[0]==0xbe && buf[15]==0x72) {
		if(!de_memcmp(&buf[3], (const void*)"\xb9\x18\x00\xe8\xb2\x01\xe2\xfb\x3b\x36", 10)) {
			idd->fmtcode = 10; // old unversioned releases
			idd->found = 1;
		}
	}
	else if(buf[0]==0xfc && buf[1]==0xbe && buf[16]==0x72) {
		if(!de_memcmp(&buf[4], (const void*)"\xb9\x18\x00\xe8\x2f\x02\xe2\xfb\x3b\x36", 10)) {
			idd->fmtcode = 20; // v1.2
			idd->found = 1;
		}
	}
	else if(buf[0]==0xfc && buf[5]==0x49) {
		// Expecting all v1.3+ files to start with:
		//  fc ?? ?? ?? ?? 49 8b 36 ?? ?? 8b fe ac 32 04 aa e2 fa ac 34 ff aa ...
		// First 3 bytes:
		//  fc 8b 0e if encrypted
		//  fc eb 13 if not encrypted
		if(!de_memcmp(&buf[10],
			(const void*)"\x8b\xfe\xac\x32\x04\xaa\xe2\xfa\xac\x34\xff\xaa", 12))
		{
			idd->fmtcode = 30; // v1.3+
			idd->found = 1;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x18(%rdi), %rdi
movq %rsp, %r14
pushq $0x16
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
movb (%r14), %al
cmpb $-0x42, %al
jne 0x60543
cmpb $0x72, 0xf(%rsp)
jne 0x60543
leaq 0x3(%rsp), %rdi
leaq 0xb68bd(%rip), %rsi     # 0x116df0
pushq $0xa
popq %rdx
callq 0x18230
testl %eax, %eax
jne 0x6059d
pushq $0xa
jmp 0x60596
cmpb $-0x4, %al
jne 0x60571
cmpb $-0x42, 0x1(%rsp)
jne 0x60571
cmpb $0x72, 0x10(%rsp)
jne 0x60571
leaq 0x4(%rsp), %rdi
leaq 0xb689a(%rip), %rsi     # 0x116dfb
pushq $0xa
popq %rdx
callq 0x18230
testl %eax, %eax
jne 0x6059d
pushq $0x14
jmp 0x60596
cmpb $-0x4, %al
jne 0x6059d
cmpb $0x49, 0x5(%rsp)
jne 0x6059d
leaq 0xa(%rsp), %rdi
leaq 0xb64e4(%rip), %rsi     # 0x116a6c
pushq $0xc
popq %rdx
callq 0x18230
testl %eax, %eax
jne 0x6059d
pushq $0x1e
popq %rax
movl %eax, 0x4(%rbx)
movb $0x1, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/gws.c
// Function: de_module_imggal_alch
void de_module_imggal_alch(deark *c, struct deark_module_info *mi)
{
	mi->id = "imggal_alch";
	mi->desc = "Image Gallery GAL (Alchemy Mindworks)";
	mi->run_fn = de_run_imggal_alch;
	mi->identify_fn = de_identify_imggal_alch;
}

// Assembly:
leaq 0xb686f(%rip), %rax     # 0x116e1e
movq %rax, (%rsi)
leaq 0xb6871(%rip), %rax     # 0x116e2a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x605d4
movq %rax, 0x18(%rsi)
leaq 0x53e(%rip), %rax       # 0x60b0d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/gws.c
// Function: de_identify_imggal_alch
static int de_identify_imggal_alch(deark *c)
{
	u8 b;

	if(c->infile->len<IMGGAL_HDRSIZE) return 0;
	if(dbuf_memcmp(c->infile, 0, "ALCHGLRY", 8)) return 0;
	b = de_getbyte(75);
	if(b>0x05) return 0;
	return 100;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0x61, 0x18(%rdi)
jl 0x60b52
leaq 0xb63fc(%rip), %rdx     # 0x116f25
xorl %r14d, %r14d
pushq $0x8
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x60b52
movq 0x18(%rbx), %rdi
pushq $0x4b
popq %rsi
callq 0xe3eb4
xorl %ecx, %ecx
cmpb $0x6, %al
pushq $0x64
popq %r14
cmovael %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/gws.c
// Function: de_module_gws_thn
void de_module_gws_thn(deark *c, struct deark_module_info *mi)
{
	mi->id = "gws_thn";
	mi->desc = "Graphic Workshop thumbnail .THN";
	mi->run_fn = de_run_gws_thn;
	mi->identify_fn = de_identify_gws_thn;
}

// Assembly:
leaq 0xb62ec(%rip), %rax     # 0x116e50
movq %rax, (%rsi)
leaq 0xb62ea(%rip), %rax     # 0x116e58
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x60b89
movq %rax, 0x18(%rsi)
leaq 0x2af(%rip), %rax       # 0x60e33
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/gws.c
// Function: gwsexe_decode_decompressed_image
static void gwsexe_decode_decompressed_image(deark *c, struct gws_exepic_ctx *d,
	dbuf *inf, i64 inf_pos)
{
	de_bitmap *img = NULL;

	img = de_bitmap_create(c, d->w, d->h, 3);
	if(d->nplanes>1) {
		de_convert_image_paletted_planar(inf, inf_pos, d->nplanes,
			d->byprpp*d->nplanes, d->byprpp, d->pal, img, 0x2);
	}
	else {
		de_convert_image_paletted(inf, inf_pos, d->depth_adj, d->byprpp, d->pal,
			img, 0);
	}
	de_bitmap_write_to_file(img, NULL, DE_CREATEFLAG_OPT_IMAGE);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq 0x20(%rsi), %rsi
movq 0x28(%r14), %rdx
pushq $0x3
popq %rcx
callq 0xe7437
movq %rax, %rbx
movq 0x30(%r14), %rdx
cmpq $0x2, %rdx
jl 0x61258
movq 0x40(%r14), %r8
movq %r8, %rcx
imulq %rdx, %rcx
addq $0xd8, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %r9
pushq $0x2
pushq %rbx
callq 0xe7de1
jmp 0x6127e
movq 0x18(%r14), %rdx
movq 0x40(%r14), %rcx
addq $0xd8, %r14
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %r8
movq %rbx, %r9
pushq $0x0
callq 0xe7cbc
popq %rax
popq %rcx
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe70b7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/misc.c
// Function: de_module_null
void de_module_null(deark *c, struct deark_module_info *mi)
{
	mi->id = "null";
	mi->desc = "Do nothing";
	mi->run_fn = de_run_null;
	mi->flags |= DE_MODFLAG_NOEXTRACT;
}

// Assembly:
leaq 0xb5d88(%rip), %rax     # 0x11706c
movq %rax, (%rsi)
leaq 0xb5d83(%rip), %rax     # 0x117071
movq %rax, 0x8(%rsi)
leaq 0x9(%rip), %rax         # 0x61302
movq %rax, 0x18(%rsi)
orb $0x4, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/misc.c
// Function: de_module_join
void de_module_join(deark *c, struct deark_module_info *mi)
{
	mi->id = "join";
	mi->desc = "Concatenate files";
	mi->run_fn = de_run_join;
	mi->flags |= DE_MODFLAG_MULTIPART;
}

// Assembly:
leaq 0xb5d72(%rip), %rax     # 0x11707c
movq %rax, (%rsi)
leaq 0xb5d6d(%rip), %rax     # 0x117081
movq %rax, 0x8(%rsi)
leaq 0x9(%rip), %rax         # 0x61328
movq %rax, 0x18(%rsi)
orb $0x40, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/misc.c
// Function: de_run_join
static void de_run_join(deark *c, de_module_params *mparams)
{
	int k;
	int num_parts = 1;
	dbuf *outf = NULL;

	if(c->mp_data) {
		num_parts += c->mp_data->count;
	}

	outf = dbuf_create_output_file(c, "bin", NULL, 0);

	for(k=0; k<num_parts; k++) {
		dbuf *inf;

		if(k>0 && c->mp_data) {
			de_dbg(c, "[mp file %d: %s]", k-1, c->mp_data->item[k-1].fn);
		}
		inf = de_mp_acquire_dbuf(c, k);
		if(!inf) {
			goto done;
		}

		dbuf_copy(inf, 0, inf->len, outf);

		de_mp_release_dbuf(c, k, &inf);
	}

done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x61347
movl (%rax), %r13d
incl %r13d
jmp 0x6134b
pushq $0x1
popq %r13
leaq 0xc718b(%rip), %rsi     # 0x1284dd
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r14
testl %r13d, %r13d
cmovlel %r15d, %r13d
shlq $0x4, %r13
pushq $-0x1
popq %rbp
movq %rsp, %r15
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x613e0
testq %r12, %r12
je 0x613a7
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x613a7
movq 0x8(%rax), %rax
movq -0x10(%rax,%r12), %rcx
movq %rbx, %rdi
leaq 0xa9b25(%rip), %rsi     # 0x10aec3
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe10d7
movq %rax, (%rsp)
testq %rax, %rax
je 0x613e0
movq 0x18(%rax), %rdx
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0xe45f4
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xe1130
addq $0x10, %r12
jmp 0x61378
movq %r14, %rdi
callq 0xe5591
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/misc.c
// Function: de_module_split
void de_module_split(deark *c, struct deark_module_info *mi)
{
	mi->id = "split";
	mi->desc = "Split the file into equal-sized chunks";
	mi->run_fn = de_run_split;
	mi->help_fn = de_help_split;
}

// Assembly:
leaq 0xb5c95(%rip), %rax     # 0x117093
movq %rax, (%rsi)
leaq 0xb5c91(%rip), %rax     # 0x117099
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x61423
movq %rax, 0x18(%rsi)
leaq 0x1a1(%rip), %rax       # 0x615bf
movq %rax, 0x28(%rsi)
retq