LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_zlib
void de_module_zlib(deark *c, struct deark_module_info *mi)
{
	mi->id = "zlib";
	mi->desc = "Raw zlib compressed data";
	mi->run_fn = de_run_zlib;
	mi->identify_fn = de_identify_zlib;
}

// Assembly:
leaq 0xd1967(%rip), %rax     # 0x13722a
movq %rax, (%rsi)
leaq 0xbe8cb(%rip), %rax     # 0x124198
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x658e8
movq %rax, 0x18(%rsi)
leaq 0xf(%rip), %rax         # 0x658f2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_zlib
static int de_identify_zlib(deark *c)
{
	u8 b[2];
	de_read(b, 0, 2);

	if((b[0]&0x0f) != 8)
		return 0;

	if(b[0]<0x08 || b[0]>0x78)
		return 0;

	if(((((unsigned int)b[0])<<8)|b[1])%31 != 0)
		return 0;

	return 50;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0x6(%rsp), %r14
movl $0x2, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
movzbl (%r14), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x8, %ecx
setne %cl
leal -0x79(%rax), %edx
cmpb $-0x71, %dl
setb %dl
orb %cl, %dl
jne 0x6594b
shll $0x8, %eax
movzbl 0x7(%rsp), %ecx
orl %eax, %ecx
imull $0xbdef7bdf, %ecx, %eax # imm = 0xBDEF7BDF
xorl %ecx, %ecx
cmpl $0x8421085, %eax        # imm = 0x8421085
movl $0x32, %ebx
cmovael %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_mrw
void de_module_mrw(deark *c, struct deark_module_info *mi)
{
	mi->id = "mrw";
	mi->desc = "Minolta RAW";
	mi->desc2 = "resources only";
	mi->run_fn = de_run_mrw;
	mi->identify_fn = de_identify_mrw;
}

// Assembly:
leaq 0xbe855(%rip), %rax     # 0x1241b1
movq %rax, (%rsi)
leaq 0xbe84f(%rip), %rax     # 0x1241b5
movq %rax, 0x8(%rsi)
leaq 0xaf970(%rip), %rax     # 0x1152e1
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x6598c
movq %rax, 0x18(%rsi)
leaq 0x9b(%rip), %rax        # 0x65a22
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_vgafont
void de_module_vgafont(deark *c, struct deark_module_info *mi)
{
	mi->id = "vgafont";
	mi->desc = "Raw 8xN bitmap font";
	mi->run_fn = de_run_vgafont;
	mi->help_fn = de_help_vgafont;
}

// Assembly:
leaq 0xb17d4(%rip), %rax     # 0x117223
movq %rax, (%rsi)
leaq 0xbe768(%rip), %rax     # 0x1241c1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x65a74
movq %rax, 0x18(%rsi)
leaq 0x19f(%rip), %rax       # 0x65c0e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_vgafont
static void de_run_vgafont(deark *c, de_module_params *mparams)
{
	struct vgafont_ctx *d = NULL;

	d = de_malloc(c, sizeof(struct vgafont_ctx));
	d->height = c->infile->len / 256;
	if((c->infile->len % 256) || d->height<VGAFONT_MINH || d->height>VGAFONT_MAXH) {
		de_err(c, "Bad file size");
		goto done;
	}

	d->font_data_pos = 0;
	d->font_data_size = d->height*256;
	d->fontdata = de_malloc(c, d->font_data_size);
	dbuf_read(c->infile, d->fontdata, d->font_data_pos, d->font_data_size);

	if(de_get_ext_option(c, "vgafont:c")) {
		i64 i;
		dbuf *ff;

		ff = dbuf_create_output_file(c, "h", NULL, 0);
		for(i=0; i<(d->font_data_size); i++) {
			if(i%d->height==0) dbuf_puts(ff, "\t");
			dbuf_printf(ff, "%d", (int)d->fontdata[i]);
			if(i!=(d->font_data_size-1)) dbuf_puts(ff, ",");
			if(i%d->height==(d->height-1)) dbuf_puts(ff, "\n");
		}
		dbuf_close(ff);
		goto done;
	}

	vgafont_common_config1(c, d);
	vgafont_common_config2(c, d);
	vgafont_main(c, d, NULL, 0);

done:
	destroy_vgafont_ctx(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
leaq 0xff(%rax), %rsi
testq %rax, %rax
cmovnsq %rax, %rsi
sarq $0x8, %rsi
movq %rsi, 0x10(%r14)
testb %al, %al
sete %cl
addq $-0x1500, %rax          # imm = 0xEB00
cmpq $-0x1200, %rax          # imm = 0xEE00
setae %al
testb %al, %cl
jne 0x65adb
leaq 0xbccdd(%rip), %rsi     # 0x1227a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x65bf5
movq $0x0, 0x18(%r14)
shlq $0x8, %rsi
movq %rsi, 0x20(%r14)
movq %rbx, %rdi
callq 0xe969b
movq %rax, 0x28(%r14)
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %rax, %rsi
callq 0xeeee8
leaq 0xbeb8a(%rip), %rsi     # 0x12469c
movq %rbx, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x65bd3
leaq 0xe736b(%rip), %rsi     # 0x14ce95
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r15
cmpq $0x0, 0x20(%r14)
jle 0x65bc9
leaq 0xd038e(%rip), %r13     # 0x135ed9
leaq 0xbeb23(%rip), %r12     # 0x124675
xorl %ebp, %ebp
movq %rbp, %rax
cqto
idivq 0x10(%r14)
testq %rdx, %rdx
jne 0x65b71
movq %r15, %rdi
leaq 0xbeb3a(%rip), %rsi     # 0x1246a6
callq 0xf16f0
movq 0x28(%r14), %rax
movzbl (%rax,%rbp), %edx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0xf0ec4
movq 0x20(%r14), %rax
decq %rax
cmpq %rax, %rbp
je 0x65b9d
movq %r15, %rdi
movq %r12, %rsi
callq 0xf16f0
movq 0x10(%r14), %rcx
movq %rbp, %rax
cqto
idivq %rcx
decq %rcx
cmpq %rcx, %rdx
jne 0x65bc0
movq %r15, %rdi
leaq 0xaa5e0(%rip), %rsi     # 0x11019b
callq 0xf16f0
incq %rbp
cmpq 0x20(%r14), %rbp
jl 0x65b54
movq %r15, %rdi
callq 0xf0b13
jmp 0x65bf5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67241
movq %r14, %rdi
callq 0x672b2
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x67354
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x673ab
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_fontmania
void de_module_fontmania(deark *c, struct deark_module_info *mi)
{
	mi->id = "fontmania";
	mi->desc = "Font Mania .COM format";
	mi->run_fn = de_run_fontmania;
	mi->identify_fn = de_identify_fontmania;
}

// Assembly:
leaq 0xbe5b2(%rip), %rax     # 0x1241d5
movq %rax, (%rsi)
leaq 0xbe5b2(%rip), %rax     # 0x1241df
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x65c48
movq %rax, 0x18(%rsi)
leaq 0x10f(%rip), %rax       # 0x65d52
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_fontmania
static void de_run_fontmania(deark *c, de_module_params *mparams)
{
	struct vgafont_ctx *d = NULL;

	d = de_malloc(c, sizeof(struct vgafont_ctx));
	d->font_data_pos = de_getu16le(2);
	de_dbg(c, "data pos: %"I64_FMT, d->font_data_pos);
	d->height = (i64)de_getbyte(5);
	de_dbg(c, "char size: 8"DE_CHAR_TIMES"%d", (int)d->height);
	d->font_data_size = d->height*256;

	if(d->height<VGAFONT_MINH || d->height>VGAFONT_MAXH ||
		(d->font_data_pos + d->font_data_size > c->infile->len))
	{
		d->need_errmsg = 1;
		goto done;
	}

	d->fontdata = de_malloc(c, d->font_data_size);
	de_read(d->fontdata, d->font_data_pos, d->font_data_size);

	vgafont_common_config1(c, d);
	vgafont_common_config2(c, d);
	vgafont_main(c, d, NULL, 0);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported Font Mania font");
		}
		destroy_vgafont_ctx(c, d);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xef1ca
movq %rax, 0x18(%r14)
leaq 0xc0190(%rip), %rsi     # 0x125e05
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movl $0x5, %esi
callq 0xef0d5
movzbl %al, %edx
movq %rdx, 0x10(%r14)
leaq 0xbea27(%rip), %rsi     # 0x1246c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x10(%r14), %rax
movq %rax, %rsi
shlq $0x8, %rsi
movq %rsi, 0x20(%r14)
addq $-0x15, %rax
cmpq $-0x12, %rax
jb 0x65cd2
movq 0x18(%r14), %rax
addq %rsi, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x65cd9
movb $0x1, 0x30(%r14)
jmp 0x65d1b
movq %rbx, %rdi
callq 0xe969b
movq %rax, 0x28(%r14)
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %rax, %rsi
callq 0xeeee8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67241
movq %r14, %rdi
callq 0x672b2
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x67354
testq %r14, %r14
je 0x65d4a
cmpb $0x0, 0x30(%r14)
je 0x65d38
leaq 0xbe9a8(%rip), %rsi     # 0x1246d6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x673ab
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_fontmania
static int de_identify_fontmania(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0xeb) return 0;
	if(dbuf_memcmp(c->infile, 8, (const u8*)"FONT MANIA, V", 13)) {
		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 0x65d9c
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $-0x15, %al
jne 0x65d9c
movq 0x18(%r14), %rdi
leaq 0xbe978(%rip), %rdx     # 0x1246f9
movl $0x8, %esi
movl $0xd, %ecx
callq 0xf025e
xorl %ecx, %ecx
testl %eax, %eax
movl $0x64, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_pcrfont
void de_module_pcrfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcrfont";
	mi->desc = "PCR font";
	mi->run_fn = de_run_pcrfont;
	mi->identify_fn = de_identify_pcrfont;
}

// Assembly:
leaq 0xbe449(%rip), %rax     # 0x1241f6
movq %rax, (%rsi)
leaq 0xbe964(%rip), %rax     # 0x12471b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x65dd2
movq %rax, 0x18(%rsi)
leaq 0x118(%rip), %rax       # 0x65ee5
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_pcrfont
static void de_run_pcrfont(deark *c, de_module_params *mparams)
{
	u8 hdr[11];
	struct vgafont_ctx *d = NULL;

	d = de_malloc(c, sizeof(struct vgafont_ctx));

	de_read(hdr, 0, 11);
	// I assume either hdr[7] or hdr[10] is the high byte of the font data size,
	// but I don't know which.
	if(hdr[6]!=0x1 || hdr[7]!=hdr[10] || hdr[8]!=0 || hdr[9]!=0) {
		d->need_errmsg = 1;
		goto done;
	}
	d->height = (i64)hdr[7];
	de_dbg(c, "char size: 8"DE_CHAR_TIMES"%d", (int)d->height);

	d->font_data_pos = 11;
	d->font_data_size = d->height*256;
	if(d->height<VGAFONT_MINH || d->height>VGAFONT_MAXH ||
		(d->font_data_pos + d->font_data_size > c->infile->len))
	{
		d->need_errmsg = 1;
		goto done;
	}

	d->fontdata = de_malloc(c, d->font_data_size);
	dbuf_read(c->infile, d->fontdata, d->font_data_pos, d->font_data_size);

	vgafont_common_config1(c, d);
	vgafont_common_config2(c, d);
	vgafont_main(c, d, NULL, 0);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Unsupported type of PCR font");
		}
		destroy_vgafont_ctx(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0x5(%rsp), %r15
movl $0xb, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xeeee8
cmpb $0x1, 0x6(%r15)
jne 0x65e6a
movzbl 0xc(%rsp), %edx
cmpb 0xf(%rsp), %dl
jne 0x65e6a
cmpb $0x0, 0xd(%rsp)
jne 0x65e6a
cmpb $0x0, 0xe(%rsp)
jne 0x65e6a
movq %rdx, 0x10(%r14)
leaq 0xbe897(%rip), %rsi     # 0x1246c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq $0xb, 0x18(%r14)
movq 0x10(%r14), %rax
movq %rax, %rsi
shlq $0x8, %rsi
movq %rsi, 0x20(%r14)
addq $-0x15, %rax
cmpq $-0x12, %rax
jb 0x65e6a
movq %rsi, %rax
orq $0xb, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x65ea1
movb $0x1, 0x30(%r14)
testq %r14, %r14
je 0x65e97
cmpb $0x0, 0x30(%r14)
je 0x65e8c
leaq 0xbe885(%rip), %rsi     # 0x124707
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x673ab
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0xe969b
movq %rax, 0x28(%r14)
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %rax, %rsi
callq 0xeeee8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67241
movq %r14, %rdi
callq 0x672b2
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x67354
jmp 0x65e6f
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_pcrfont
static int de_identify_pcrfont(deark *c)
{
	u8 h;

	if(dbuf_memcmp(c->infile, 0, "KPG", 3)) return 0;
	if(de_getbyte(5)!=0x20) return 0;
	h = de_getbyte(7);
	if(h<6 || h>16) return 0;
	if(de_getbyte(10)!=h) return 0;
	return 80;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0xbe82c(%rip), %rdx     # 0x124724
xorl %ebx, %ebx
movl $0x3, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x65f50
movq 0x18(%r14), %rdi
movl $0x5, %esi
callq 0xef0d5
cmpb $0x20, %al
jne 0x65f50
movq 0x18(%r14), %rdi
movl $0x7, %esi
callq 0xef0d5
movl %eax, %r15d
leal -0x11(%r15), %eax
cmpb $-0xb, %al
jb 0x65f50
movq 0x18(%r14), %rdi
movl $0xa, %esi
callq 0xef0d5
xorl %ecx, %ecx
cmpb %r15b, %al
movl $0x50, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_fontedit
void de_module_fontedit(deark *c, struct deark_module_info *mi)
{
	mi->id = "fontedit";
	mi->desc = "FONTEDIT font";
	mi->run_fn = de_run_fontedit;
	mi->identify_fn = de_identify_fontedit;
	mi->help_fn = de_help_fontedit;
}

// Assembly:
leaq 0xbe29f(%rip), %rax     # 0x1241fe
movq %rax, (%rsi)
leaq 0xbe82d(%rip), %rax     # 0x124796
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x65f8f
movq %rax, 0x18(%rsi)
leaq 0x265(%rip), %rax       # 0x661e4
movq %rax, 0x20(%rsi)
leaq 0x2cd(%rip), %rax       # 0x66257
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_fontedit
static int de_identify_fontedit(deark *c)
{
	u8 b1;
	i64 jmp1;

	if(c->infile->len>0x2200 || c->infile->len<(54+3*256)) return 0;
	if(de_getbyte(0) != 0xeb) return 0;
	b1 = de_getbyte(1);
	if(b1<0x32 || b1>0x33) return 0;
	jmp1 = (i64)b1 + 2;
	// Code for "INT 10/AX=1110h": the system call that sets the custom font
	if(dbuf_memcmp(c->infile, jmp1+39,
		(const void*)"\xb8\x10\x11\xcd\x10", 5))
	{
		return 0;
	}
	return 90;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq $-0x2201, %rax          # imm = 0xDDFF
addq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $-0x1ecb, %rax          # imm = 0xE135
jb 0x6624d
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $-0x15, %al
jne 0x6624d
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0xef0d5
leal -0x34(%rax), %ecx
cmpb $-0x2, %cl
jb 0x6624d
movq 0x18(%r14), %rdi
addb $0x29, %al
movzbl %al, %esi
leaq 0xbe56d(%rip), %rdx     # 0x1247a4
movl $0x5, %ecx
callq 0xf025e
xorl %ecx, %ecx
testl %eax, %eax
movl $0x5a, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_evafont
void de_module_evafont(deark *c, struct deark_module_info *mi)
{
	mi->id = "evafont";
	mi->desc = "EVAfont .COM format";
	mi->run_fn = de_run_evafont;
	mi->identify_fn = de_identify_evafont;
}

// Assembly:
leaq 0xbdf9b(%rip), %rax     # 0x124207
movq %rax, (%rsi)
leaq 0xbdf99(%rip), %rax     # 0x12420f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x66291
movq %rax, 0x18(%rsi)
leaq 0x1c5(%rip), %rax       # 0x66451
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_evafont
static int de_identify_evafont(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0xe9) return 0;

	if(!dbuf_memcmp(c->infile, 7, (const u8*)" font driver v", 14)) {
		return 100; // v2.01:
	}
	if(!dbuf_memcmp(c->infile, 11, (const u8*)" font loader v", 14)) {
		return 100; // v3.05:
	}
	return 100;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x664b5
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xef0d5
cmpb $-0x17, %al
jne 0x664b5
movq 0x18(%rbx), %rdi
leaq 0xbe3a1(%rip), %rdx     # 0x124823
movl $0x7, %esi
movl $0xe, %ecx
callq 0xf025e
movl $0x64, %r14d
testl %eax, %eax
je 0x664b5
movq 0x18(%rbx), %rdi
leaq 0xbe38c(%rip), %rdx     # 0x124832
movl $0xb, %esi
movl $0xe, %ecx
callq 0xf025e
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_zbr
void de_module_zbr(deark *c, struct deark_module_info *mi)
{
	mi->id = "zbr";
	mi->desc = "ZBR (Zebra Metafile)";
	mi->desc2 = "extract preview image";
	mi->run_fn = de_run_zbr;
	mi->identify_fn = de_identify_zbr;
}

// Assembly:
leaq 0xbdd5c(%rip), %rax     # 0x124223
movq %rax, (%rsi)
leaq 0xbdd56(%rip), %rax     # 0x124227
movq %rax, 0x8(%rsi)
leaq 0xb5f16(%rip), %rax     # 0x11c3f2
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x664f7
movq %rax, 0x18(%rsi)
leaq 0x71(%rip), %rax        # 0x66563
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_zbr
static void de_run_zbr(deark *c, de_module_params *mparams)
{
	i64 pos = 0;
	dbuf *outf = NULL;
	static const u8 hdrs[54] = {
		0x42,0x4d,0xc6,0x14,0,0,0,0,0,0,0x76,0,0,0, // FILEHEADER
		0x28,0,0,0,0x64,0,0,0,0x64,0,0,0,0x01,0,0x04,0, // INFOHEADER...
		0,0,0,0,0x50,0x14,0,0,0,0,0,0,0,0,0,0,
		0x10,0,0,0,0,0,0,0 };

	pos += 4; // signature, version
	pos += 100; // comment

	de_dbg(c, "preview image at %d", (int)pos);
	// By design, this image is formatted as a headerless BMP/DIB. We'll just
	// add the 54 bytes of headers needed to make it a BMP, and call it done.
	outf = dbuf_create_output_file(c, "preview.bmp", NULL, DE_CREATEFLAG_IS_AUX);
	dbuf_write(outf, hdrs, 54);
	dbuf_copy(c->infile, pos, 16*4 + 100*52, outf);
	dbuf_close(outf);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xbe33c(%rip), %rsi     # 0x124841
movl $0x68, %edx
xorl %eax, %eax
callq 0xe9226
leaq 0xb1803(%rip), %rsi     # 0x117d1b
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, %r14
leaq 0xbe41f(%rip), %rsi     # 0x124950
movl $0x36, %edx
movq %rax, %rdi
callq 0xefb82
movq 0x18(%rbx), %rdi
movl $0x68, %esi
movl $0x1490, %edx           # imm = 0x1490
movq %r14, %rcx
callq 0xefabc
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf0b13
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_compress
void de_module_compress(deark *c, struct deark_module_info *mi)
{
	mi->id = "compress";
	mi->desc = "Compress (.Z)";
	mi->run_fn = de_run_compress;
	mi->identify_fn = de_identify_compress;
}

// Assembly:
leaq 0xbf933(%rip), %rax     # 0x125eed
movq %rax, (%rsi)
leaq 0xbdc78(%rip), %rax     # 0x12423c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x665df
movq %rax, 0x18(%rsi)
leaq 0xed(%rip), %rax        # 0x666c7
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_compress
static void de_run_compress(deark *c, de_module_params *mparams)
{
	struct de_dfilter_results dres;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_lzw_params delzwp;
	dbuf *f = NULL;

	f = dbuf_create_output_file(c, "bin", NULL, 0);
	dbuf_enable_wbuffer(f);

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = 0;
	dcmpri.len = c->infile->len;
	dcmpro.f = f;
	dcmpro.len_known = 0;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_UNIXCOMPRESS;
	delzwp.flags |= DE_LZWFLAG_HAS3BYTEHEADER;

	fmtutil_decompress_lzw(c, &dcmpri, &dcmpro, &dres, &delzwp);
	dbuf_flush(f);
	if(dres.errcode!=0) {
		de_err(c, "%s", de_dfilter_get_errmsg(c, &dres));
	}
	dbuf_close(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
leaq 0xcee38(%rip), %rsi     # 0x135431
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
movq %rax, %rdi
callq 0xf0e3f
leaq 0x30(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0x50(%rsp), %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0xfa6e0
movq 0x18(%rbx), %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movq 0x18(%rax), %rax
movq %rax, 0x10(%r12)
movq %r14, (%r13)
movb $0x0, 0x8(%r13)
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
movl $0x0, 0x10(%r8)
movl $0x1, (%r8)
orb $0x1, 0x4(%r8)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x102cf0
movq %r14, %rdi
callq 0xf0ea4
cmpl $0x0, (%r15)
je 0x666ae
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0xae60e(%rip), %rsi     # 0x114caf
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq %r14, %rdi
callq 0xf0b13
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_hpi
void de_module_hpi(deark *c, struct deark_module_info *mi)
{
	mi->id = "hpi";
	mi->desc = "Hemera Photo-Object image";
	mi->run_fn = de_run_hpi;
	mi->identify_fn = de_identify_hpi;
}

// Assembly:
leaq 0xbdb56(%rip), %rax     # 0x12424a
movq %rax, (%rsi)
leaq 0xbdb50(%rip), %rax     # 0x12424e
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x66719
movq %rax, 0x18(%rsi)
leaq 0x11d(%rip), %rax       # 0x66831
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_hpi
static void de_run_hpi(deark *c, de_module_params *mparams)
{
	i64 jpgpos, pngpos;
	i64 jpglen, pnglen;
	i64 pos;

	pos = 12;
	jpgpos = de_getu32le_p(&pos);
	jpglen = de_getu32le_p(&pos);
	de_dbg(c, "jpeg: pos=%"I64_FMT", len=%"I64_FMT, jpgpos, jpglen);
	pngpos = de_getu32le_p(&pos);
	pnglen = de_getu32le_p(&pos);
	de_dbg(c, "png: pos=%"I64_FMT", len=%"I64_FMT, pngpos, pnglen);

	if(jpglen>0 && jpgpos+jpglen<=c->infile->len && de_getbyte(jpgpos)==0xff) {
		const char *ext;

		if(pnglen==0) ext="jpg";
		else ext="foreground.jpg";
		dbuf_create_file_from_slice(c->infile, jpgpos, jpglen, ext, NULL, 0);
	}
	if(pnglen>0 && pngpos+pnglen<=c->infile->len && de_getbyte(pngpos)==0x89) {
		dbuf_create_file_from_slice(c->infile, pngpos, pnglen, "mask.png", NULL, 0);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq $0xc, (%r15)
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xef3a0
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef3a0
movq %rax, %r13
leaq 0xbe101(%rip), %rsi     # 0x12485b
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef3a0
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef3a0
movq %rax, %r15
leaq 0xbe0e3(%rip), %rsi     # 0x124872
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
testq %r13, %r13
jle 0x667e8
leaq (%r12,%r13), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jg 0x667e8
movq %r12, %rsi
callq 0xef0d5
cmpb $-0x1, %al
jne 0x667e8
testq %r15, %r15
leaq 0xcccf2(%rip), %rax     # 0x1334ba
leaq 0xbe0b9(%rip), %rcx     # 0x124888
cmoveq %rax, %rcx
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf0321
testq %r15, %r15
jle 0x66823
leaq (%r15,%r14), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jg 0x66823
movq %r14, %rsi
callq 0xef0d5
cmpb $-0x77, %al
jne 0x66823
movq 0x18(%rbx), %rdi
leaq 0xbe085(%rip), %rcx     # 0x124897
movq %r14, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf0321
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_dclimplode
void de_module_dclimplode(deark *c, struct deark_module_info *mi)
{
	mi->id = "dclimplode";
	mi->id_alias[0] = "ttcomp";
	mi->desc = "PKWARE DCL Implode compressed file";
	mi->run_fn = de_run_dclimplode;
	mi->identify_fn = de_identify_dclimplode;
}

// Assembly:
leaq 0xbda0a(%rip), %rax     # 0x124268
movq %rax, (%rsi)
leaq 0xbda0b(%rip), %rax     # 0x124273
movq %rax, 0x38(%rsi)
leaq 0xbda07(%rip), %rax     # 0x12427a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6688e
movq %rax, 0x18(%rsi)
leaq 0x19(%rip), %rax        # 0x668a2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_identify_dclimplode
static int de_identify_dclimplode(deark *c)
{
	u8 b0, b1;
	int i;
	u32 x;

	if(c->infile->len<4) return 0;
	b0 = de_getbyte(0);
	if(b0>1) return 0;
	b1 = de_getbyte(1);
	if(b1<4 || b1>6) return 0;

	// Look for the end-of-data code in the last 2 or 3 bytes.
	// Assumes the last byte is padded with '0' bits, and there are
	// no extraneous bytes after that.
	x = (u32)de_getu32le(c->infile->len-4);
	for(i=0; i<8; i++) {
		if((x & 0xfffffe00U)==0x01fe0200U) {
			if(b0==0 && b1==6) return 40;
			return 10;
		}
		x >>= 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0x4, 0x18(%rdi)
jl 0x66923
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $0x1, %al
ja 0x66923
movl %eax, %ebp
movq 0x18(%r15), %rdi
movl $0x1, %esi
callq 0xef0d5
movl %eax, %r14d
leal -0x7(%r14), %eax
cmpb $-0x3, %al
jb 0x66923
movq 0x18(%r15), %rdi
movq 0x18(%rdi), %rsi
addq $-0x4, %rsi
callq 0xef37e
movl $0x8, %ecx
movl %eax, %edx
andl $0xfffffe00, %edx       # imm = 0xFFFFFE00
cmpl $0x1fe0200, %edx        # imm = 0x1FE0200
je 0x6690f
shrl %eax
decl %ecx
jne 0x668f7
jmp 0x66923
xorb $0x6, %r14b
orb %r14b, %bpl
movl $0x28, %eax
movl $0xa, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_lgcompress
void de_module_lgcompress(deark *c, struct deark_module_info *mi)
{
	mi->id = "lgcompress";
	mi->desc = "Logitech Compress";
	mi->run_fn = de_run_lgcompress;
	mi->identify_fn = de_identify_lgcompress;
}

// Assembly:
leaq 0xbd966(%rip), %rax     # 0x12429d
movq %rax, (%rsi)
leaq 0xbd967(%rip), %rax     # 0x1242a8
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6695c
movq %rax, 0x18(%rsi)
leaq 0x83(%rip), %rax        # 0x669da
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_lgcompress
static void de_run_lgcompress(deark *c, de_module_params *mparams)
{
	u8 mfnc;
	i64 orig_len;

	mfnc = de_getbyte(2);
	if(mfnc>=0x33 && mfnc<=126) {
		de_dbg(c, "missing filename char: '%c'", (int)mfnc);
	}
	orig_len = de_getu32le(4);
	de_dbg(c, "orig len: %"I64_FMT, orig_len);

	dclimplode_main(c, 8, c->infile->len-8, 1, orig_len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl $0x2, %esi
callq 0xef0d5
leal -0x33(%rax), %ecx
cmpb $0x4b, %cl
ja 0x6698d
movzbl %al, %edx
leaq 0xbdf26(%rip), %rsi     # 0x1248a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xef37e
movq %rax, %r14
leaq 0xae79e(%rip), %rsi     # 0x115143
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rdx
addq $-0x8, %rdx
movl $0x8, %esi
movq %rbx, %rdi
movl $0x1, %ecx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x673ef
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_lzss_oku
static void de_run_lzss_oku(deark *c, de_module_params *mparams)
{
	dbuf *outf = NULL;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	outf = dbuf_create_output_file(c, "unc", NULL, 0);
	dbuf_enable_wbuffer(outf);
	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = 0;
	dcmpri.len = c->infile->len;
	dcmpro.f = outf;

	fmtutil_decompress_lzss1(c, &dcmpri, &dcmpro, &dres, 0x0);
	dbuf_flush(outf);
	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", de_dfilter_get_errmsg(c, &dres));
	}

	dbuf_close(outf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0xe6423(%rip), %rsi     # 0x14ce7a
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
movq %rax, %rdi
callq 0xf0e3f
leaq 0x20(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x40(%rsp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xfa6e0
movq 0x18(%rbx), %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movq 0x18(%rax), %rax
movq %rax, 0x10(%r15)
movq %r14, (%r12)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0xfb433
movq %r14, %rdi
callq 0xf0ea4
cmpl $0x0, (%r13)
je 0x66aea
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0xad694(%rip), %rsi     # 0x114171
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq %r14, %rdi
callq 0xf0b13
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_lzhuf
static void de_run_lzhuf(deark *c, de_module_params *mparams)
{
	i64 unc_filesize;
	dbuf *outf = NULL;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	// We're assuming the size field is 4 bytes, little-endian. (But it could
	// be platform-specific.)
#define LZHUF_HDRSIZE 4
#define LZHUF_IS_LE   1

	if(c->infile->len<LZHUF_HDRSIZE) goto done;
	unc_filesize = dbuf_getint_ext(c->infile, 0, LZHUF_HDRSIZE, LZHUF_IS_LE, 0);
	de_dbg(c, "orig filesize: %"I64_FMT, unc_filesize);

	outf = dbuf_create_output_file(c, "unc", NULL, 0);
	dbuf_enable_wbuffer(outf);
	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = LZHUF_HDRSIZE;
	dcmpri.len = c->infile->len-LZHUF_HDRSIZE;
	dcmpro.f = outf;
	dcmpro.len_known = 1;
	dcmpro.expected_len = unc_filesize;

	fmtutil_lh1_codectype1(c, &dcmpri, &dcmpro, &dres, NULL);
	dbuf_flush(outf);
	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", de_dfilter_get_errmsg(c, &dres));
	}
done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
cmpq $0x4, 0x18(%rdi)
jge 0x66b4b
xorl %r14d, %r14d
jmp 0x66c20
xorl %esi, %esi
movl $0x4, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xef6f2
movq %rax, %r15
leaq 0xbdd5c(%rip), %rsi     # 0x1248c5
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
leaq 0xe62fd(%rip), %rsi     # 0x14ce7a
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
movq %rax, %rdi
callq 0xf0e3f
leaq 0x18(%rsp), %r12
movq %rsp, %r13
leaq 0x38(%rsp), %rbp
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xfa6e0
movq 0x18(%rbx), %rax
movq %rax, (%r12)
movq $0x4, 0x8(%r12)
movq 0x18(%rax), %rax
addq $-0x4, %rax
movq %rax, 0x10(%r12)
movq %r14, (%r13)
movb $0x1, 0x8(%r13)
movq %r15, 0x10(%r13)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x107127
movq %r14, %rdi
callq 0xf0ea4
cmpl $0x0, (%rbp)
je 0x66c20
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0xad55e(%rip), %rsi     # 0x114171
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq %r14, %rdi
callq 0xf0b13
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_compress_lzh
void de_module_compress_lzh(deark *c, struct deark_module_info *mi)
{
	mi->id = "compress_lzh";
	mi->desc = "SCO compress LZH";
	mi->run_fn = de_run_compress_lzh;
	mi->identify_fn = de_identify_compress_lzh;
}

// Assembly:
leaq 0xbd6b9(%rip), %rax     # 0x1242fa
movq %rax, (%rsi)
leaq 0xbd6bc(%rip), %rax     # 0x124307
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x66c66
movq %rax, 0x18(%rsi)
leaq 0xf6(%rip), %rax        # 0x66d57
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_run_compress_lzh
static void de_run_compress_lzh(deark *c, de_module_params *mparams)
{
	dbuf *outf = NULL;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_lh5x_params lzhparams;

#define SCOLZH_HDRSIZE 2
	if(c->infile->len<SCOLZH_HDRSIZE) goto done;
	outf = dbuf_create_output_file(c, "unc", NULL, 0);
	dbuf_enable_wbuffer(outf);
	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = SCOLZH_HDRSIZE;
	dcmpri.len = c->infile->len-SCOLZH_HDRSIZE;
	dcmpro.f = outf;

	de_zeromem(&lzhparams, sizeof(struct de_lh5x_params));
	lzhparams.fmt = DE_LH5X_FMT_LH5;
	lzhparams.zero_codes_block_behavior = DE_LH5X_ZCB_STOP;

	fmtutil_decompress_lh5x(c, &dcmpri, &dcmpro, &dres, &lzhparams);
	dbuf_flush(outf);
	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", de_dfilter_get_errmsg(c, &dres));
	}
done:
	dbuf_close(outf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq 0x18(%rdi), %rax
cmpq $0x2, 0x18(%rax)
jge 0x66c88
xorl %ebx, %ebx
jmp 0x66d3e
movq %rdi, %r14
leaq 0xe61e8(%rip), %rsi     # 0x14ce7a
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %rbx
movq %rax, %rdi
callq 0xf0e3f
leaq 0x30(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0x50(%rsp), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0xfa6e0
movq 0x18(%r14), %rax
movq %rax, (%r12)
movq $0x2, 0x8(%r12)
movq 0x18(%rax), %rax
addq $-0x2, %rax
movq %rax, 0x10(%r12)
movq %rbx, (%r13)
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
movl $0x5, (%r8)
movb $0x1, 0x4(%r8)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0xff330
movq %rbx, %rdi
callq 0xf0ea4
cmpl $0x0, (%r15)
je 0x66d3e
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xfa6a8
leaq 0xad440(%rip), %rsi     # 0x114171
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
callq 0xf0b13
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_npack
void de_module_npack(deark *c, struct deark_module_info *mi)
{
	mi->id = "npack";
	mi->desc = "NPack compressed file";
	mi->run_fn = de_run_npack;
	mi->identify_fn = de_identify_npack;
}

// Assembly:
leaq 0xbd567(%rip), %rax     # 0x12433e
movq %rax, (%rsi)
leaq 0xbd563(%rip), %rax     # 0x124344
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x66dfc
movq %rax, 0x18(%rsi)
leaq 0x20(%rip), %rax        # 0x66e17
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_lzs221
void de_module_lzs221(deark *c, struct deark_module_info *mi)
{
	mi->id = "lzs221";
	mi->desc = "LZS221 compressed file";
	mi->run_fn = de_run_lzs221;
	mi->identify_fn = de_identify_lzs221;
}

// Assembly:
leaq 0xbd516(%rip), %rax     # 0x12435a
movq %rax, (%rsi)
leaq 0xbd513(%rip), %rax     # 0x124361
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x66e69
movq %rax, 0x18(%rsi)
leaq 0x1d(%rip), %rax        # 0x66e81
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: de_module_xpk
void de_module_xpk(deark *c, struct deark_module_info *mi)
{
	mi->id = "xpk";
	mi->desc = "XPK compressed file";
	mi->run_fn = de_run_xpk;
	mi->identify_fn = de_identify_xpk;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0xbd4ca(%rip), %rax     # 0x124378
movq %rax, (%rsi)
leaq 0xbd4c4(%rip), %rax     # 0x12437c
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x66ed7
movq %rax, 0x18(%rsi)
leaq 0xfa(%rip), %rax        # 0x66fc8
movq %rax, 0x20(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: xor_cbfn
static int xor_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	i64 i;
	struct xorctx_struct *xorctx = (struct xorctx_struct*)brctx->userdata;

	for(i=0; i<buf_len; i++) {
		dbuf_writebyte(xorctx->outf, buf[i] ^ xorctx->key[xorctx->key_pos]);
		if(xorctx->key_len>1) {
			xorctx->key_pos = (xorctx->key_pos+1) % xorctx->key_len;
		}
	}
	return 1;
}

// Assembly:
testq %rdx, %rdx
jle 0x67040
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %r15
xorl %r12d, %r12d
movq (%r15), %rdi
movl 0xc(%r15), %eax
movb 0x10(%r15,%rax), %al
xorb (%r14,%r12), %al
movzbl %al, %esi
callq 0xf11be
movl 0x8(%r15), %ecx
cmpl $0x2, %ecx
jb 0x6702d
movl 0xc(%r15), %eax
incl %eax
xorl %edx, %edx
divl %ecx
movl %edx, 0xc(%r15)
incq %r12
cmpq %r12, %rbx
jne 0x66ffe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: cp437_cbfn
static int cp437_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	i32 u;
	i64 i;
	u8 ch;
	struct cp437ctx_struct *cp437ctx = (struct cp437ctx_struct*)brctx->userdata;

	for(i=0; i<buf_len; i++) {
		ch = buf[i];
		if(ch==0x09 || ch==0x0a || ch==0x0c || ch==0x0d) {
			// Leave HT, NL, FF, CR as-is.
			u = (i32)ch;
		}
		else if(ch==0x1a) {
			// Lots of CP437 files end with a Ctrl+Z character, but modern files
			// don't use any in-band character to signify end-of-file.
			// I don't just want to delete the character, though, so I guess I'll
			// change it to U+2404 SYMBOL FOR END OF TRANSMISSION.
			u = 0x2404;
		}
		else {
			u = de_char_to_unicode_ex((i32)ch, &cp437ctx->es);
		}
		dbuf_write_uchar_as_utf8(cp437ctx->outf, u);
	}

	return 1;
}

// Assembly:
testq %rdx, %rdx
jle 0x670b6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %r12
leaq 0x8(%r12), %r15
xorl %r13d, %r13d
movl $0x3600, %ebp           # imm = 0x3600
movzbl (%r14,%r13), %esi
cmpl $0x1a, %esi
ja 0x6709a
btl %esi, %ebp
jae 0x6708e
movq (%r12), %rdi
callq 0xec81c
incq %r13
cmpq %r13, %rbx
jne 0x6706c
jmp 0x670a8
cmpl $0x1a, %esi
jne 0x6709a
movl $0x2404, %esi           # imm = 0x2404
jmp 0x6707b
movl %esi, %edi
movq %r15, %rsi
callq 0xec6fd
movl %eax, %esi
jmp 0x6707b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: crc_cbfn
static int crc_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct crcctx_struct *crcctx = (struct crcctx_struct*)brctx->userdata;
	size_t n;

	for(n=0; n<CRCM_NUMCRCS; n++) {
		if(!crcctx->crcos[n]) continue;
		de_crcobj_addbuf(crcctx->crcos[n], buf, buf_len);
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %r15
movl $0x1, %r12d
movq (%r15,%r12,8), %rdi
testq %rdi, %rdi
je 0x670e7
movq %r14, %rsi
movq %rbx, %rdx
callq 0xebe72
incq %r12
cmpq $0xc, %r12
jne 0x670d3
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: bytefreq_cbfn
static int bytefreq_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	i64 k;
	struct bytefreqctx_struct *bfctx = (struct bytefreqctx_struct*)brctx->userdata;

	for(k=0; k<buf_len; k++) {
		struct bytefreqentry *bf = &bfctx->e[(unsigned int)buf[k]];

		// Save the location of the first few occurrences of this byte value.
		if(bf->count<DE_BYTEFREQ_NUMLOC) {
			bf->locations[bf->count] = brctx->offset + k;
		}
		bf->count++;
	}
	return 1;
}

// Assembly:
testq %rdx, %rdx
jle 0x67139
movq (%rdi), %rax
xorl %ecx, %ecx
movzbl (%rsi,%rcx), %r9d
shll $0x5, %r9d
leaq (%rax,%r9), %r8
movq (%rax,%r9), %r9
cmpq $0x2, %r9
jg 0x6712e
movq 0x10(%rdi), %r10
addq %rcx, %r10
movq %r10, 0x8(%r8,%r9,8)
incq (%r8)
incq %rcx
cmpq %rcx, %rdx
jne 0x6710b
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: run_deflate_internal
static void run_deflate_internal(deark *c, UI flags)
{
	dbuf *outf = NULL;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_deflate_params deflparams;

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	de_zeromem(&deflparams, sizeof(struct de_deflate_params));
	deflparams.flags = flags;

	outf = dbuf_create_output_file(c, "unc", NULL, 0);
	dbuf_enable_wbuffer(outf);
	dcmpri.f = c->infile;
	dcmpri.pos = 0;
	dcmpri.len = c->infile->len;
	dcmpro.f = outf;
	fmtutil_decompress_deflate_ex(c, &dcmpri, &dcmpro, &dres, &deflparams);
	dbuf_flush(outf);
	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", de_dfilter_get_errmsg(c, &dres));
		goto done;
	}
	if(dres.bytes_consumed_valid) {
		de_dbg(c, "decompressed %"I64_FMT" bytes to %"I64_FMT, dres.bytes_consumed,
			outf->len);
	}

done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x88(%rsp), %r12
leaq 0x70(%rsp), %r13
leaq 0x10(%rsp), %rcx
movq %r12, %rsi
movq %r13, %rdx
callq 0xfa6e0
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movl %ebp, (%r15)
leaq 0xe5cf4(%rip), %rsi     # 0x14ce7a
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
movq %rax, %rdi
callq 0xf0e3f
movq 0x18(%rbx), %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movq 0x18(%rax), %rax
movq %rax, 0x10(%r12)
movq %r14, (%r13)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rcx
movq %r15, %r8
callq 0x100d13
movq %r14, %rdi
callq 0xf0ea4
cmpl $0x0, (%r12)
je 0x67206
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0xacf7a(%rip), %rsi     # 0x114171
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x67227
cmpb $0x0, 0x14(%rsp)
je 0x67227
movq 0x18(%rsp), %rdx
movq 0x18(%r14), %rcx
leaq 0xaba6b(%rip), %rsi     # 0x112c88
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
callq 0xf0b13
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: vgafont_common_config1
static void vgafont_common_config1(deark *c, struct vgafont_ctx *d)
{
	d->encoding_req = de_get_input_encoding(c, NULL, DE_ENCODING_UNKNOWN);
	if(d->encoding_req!=DE_ENCODING_UNKNOWN)
		d->encoding_to_use = d->encoding_req;
	else
		d->encoding_to_use = DE_ENCODING_CP437;

	d->font = de_create_bitmap_font(c);
	d->font->num_chars = 256;
	d->font->has_nonunicode_codepoints = 1;
	d->font->has_unicode_codepoints = 1;
	d->font->prefer_unicode = (d->encoding_req!=DE_ENCODING_UNKNOWN);
	d->font->nominal_width = 8;
	d->font->nominal_height = (int)d->height;
	d->font->char_array = de_mallocarray(c, d->font->num_chars,
		sizeof(struct de_bitmap_font_char));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0xeb7d1
movl %eax, (%rbx)
testl %eax, %eax
movl $0xd, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x4(%rbx)
movq %r14, %rdi
callq 0xf57ec
movq %rax, 0x8(%rbx)
movq $0x100, 0x18(%rax)      # imm = 0x100
movw $0x101, 0x10(%rax)      # imm = 0x101
cmpl $0x0, (%rbx)
setne 0x12(%rax)
movl $0x8, (%rax)
movl 0x10(%rbx), %ecx
movl %ecx, 0x4(%rax)
movl $0x100, %esi            # imm = 0x100
movl $0x28, %edx
movq %r14, %rdi
callq 0xea259
movq 0x8(%rbx), %rcx
movq %rax, 0x20(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: vgafont_common_config2
static void vgafont_common_config2(deark *c, struct vgafont_ctx *d)
{
	i64 i;
	struct de_encconv_state es;

	de_encconv_init(&es, d->encoding_to_use);

	for(i=0; i<d->font->num_chars; i++) {
		d->font->char_array[i].codepoint_nonunicode = (i32)i;
		if(d->font->has_unicode_codepoints) {
			d->font->char_array[i].codepoint_unicode = de_char_to_unicode_ex((i32)i, &es);
		}
		d->font->char_array[i].width = d->font->nominal_width;
		d->font->char_array[i].height = d->font->nominal_height;
		d->font->char_array[i].rowspan = 1;
		d->font->char_array[i].bitmap = &d->fontdata[i*d->font->nominal_height];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leaq 0x8(%rsp), %rdi
callq 0xec207
movq 0x8(%rbx), %rax
cmpq $0x0, 0x18(%rax)
jle 0x67348
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
xorl %r15d, %r15d
movq 0x20(%rax), %rcx
movl %r15d, (%rcx,%r12)
cmpb $0x0, 0x11(%rax)
je 0x67309
movl %r15d, %edi
movq %r14, %rsi
callq 0xec6fd
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rcx
movl %eax, 0x4(%rcx,%r12)
movq 0x8(%rbx), %rax
movl (%rax), %ecx
movq 0x20(%rax), %rdx
movl %ecx, 0x8(%rdx,%r12)
movslq 0x4(%rax), %rax
movl %eax, 0xc(%rdx,%r12)
movq $0x1, 0x18(%rdx,%r12)
imulq %r15, %rax
addq 0x28(%rbx), %rax
movq %rax, 0x20(%rdx,%r12)
incq %r15
movq 0x8(%rbx), %rax
addq $0x28, %r12
cmpq 0x18(%rax), %r15
jl 0x672e3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: vgafont_main
static void vgafont_main(deark *c, struct vgafont_ctx *d, de_finfo *fi, UI createflags)
{
	u8 to_fontfmt = 0;

	de_font_decide_output_fmt(c);

	if(c->font_fmt_req!=DE_FONTFMT_IMAGE) {
		if(d->font->nominal_width==8 &&
			(d->font->nominal_height>=1 && d->font->nominal_height<=32))
		{
			to_fontfmt = 1;
		}
	}

	if(to_fontfmt) {
		// TODO? Most of the relevant formats are very similar to the PSF format
		// that this function will create. It's not ideal to go to all the trouble
		// to convert them to our internal format, only to convert them right
		// back to their original format.
		// (But since we want the option to convert them to an image, this is
		// maybe the easiest way.)
		d->font->force_fontfile_output = 1;
	}

	de_font_bitmap_font_write(c, d->font, fi, createflags);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0xf6717
cmpb $0x3, 0xd5(%r15)
je 0x6738e
movq 0x8(%r12), %rax
cmpl $0x8, (%rax)
jne 0x6738e
movl 0x4(%rax), %ecx
decl %ecx
cmpl $0x1f, %ecx
ja 0x6738e
movb $0x1, 0x13(%rax)
movq 0x8(%r12), %rsi
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf5c29
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc.c
// Function: destroy_vgafont_ctx
static void destroy_vgafont_ctx(deark *c, struct vgafont_ctx *d)
{
	if(!d) return;
	if(d->font) {
		de_free(c, d->font->char_array);
		de_destroy_bitmap_font(c, d->font);
	}
	de_free(c, d->fontdata);
}

// Assembly:
testq %rsi, %rsi
je 0x673ee
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x673db
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0xe9752
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xf5801
movq 0x28(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq