LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_hs2
void de_module_hs2(deark *c, struct deark_module_info *mi)
{
	mi->id = "hs2";
	mi->desc = "HS2 (POSTERING)";
	mi->run_fn = de_run_hs2;
	mi->identify_fn = de_identify_hs2;
}

// Assembly:
leaq 0xbb322(%rip), %rax     # 0x124fbc
movq %rax, (%rsi)
leaq 0xbb31c(%rip), %rax     # 0x124fc0
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x69cbf
movq %rax, 0x18(%rsi)
leaq 0x4c(%rip), %rax        # 0x69d06
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_lumena_cel
void de_module_lumena_cel(deark *c, struct deark_module_info *mi)
{
	mi->id = "lumena_cel";
	mi->desc = "Lumena CEL";
	mi->run_fn = de_run_lumena_cel;
	mi->identify_fn = de_identify_lumena_cel;
}

// Assembly:
leaq 0xbb276(%rip), %rax     # 0x124fd0
movq %rax, (%rsi)
leaq 0xbb277(%rip), %rax     # 0x124fdb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x69d7f
movq %rax, 0x18(%rsi)
leaq 0x201(%rip), %rax       # 0x69f7b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_lumena_cel
static int de_identify_lumena_cel(deark *c)
{
	i64 width, height;
	int is_16bit = 0;
	int is_32bit = 0;

	if(!de_input_file_has_ext(c, "cel")) return 0;
	width = de_getu16le(0);
	height = de_getu16le(2);

	is_16bit = (c->infile->len == 4 + width*height*2);
	is_32bit = (c->infile->len == 4 + width*height*4);

	if(is_16bit || is_32bit)
		return 60;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xbb04d(%rip), %rsi     # 0x124fd7
callq 0xea936
testl %eax, %eax
je 0x69fe0
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef1ca
movq %rax, %r15
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xef1ca
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rcx
imulq %r15, %rax
leaq 0x4(,%rax,4), %rdx
cmpq %rdx, %rcx
movl $0x3c, %edx
cmovel %edx, %ebx
leaq 0x4(,%rax,2), %rax
cmpq %rax, %rcx
cmovel %edx, %ebx
jmp 0x69fe2
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_deskmate_pnt
void de_module_deskmate_pnt(deark *c, struct deark_module_info *mi)
{
	mi->id = "deskmate_pnt";
	mi->desc = "Tandy DeskMate Paint";
	mi->run_fn = de_run_deskmate_pnt;
	mi->identify_fn = de_identify_deskmate_pnt;
}

// Assembly:
leaq 0xbaff5(%rip), %rax     # 0x124fe6
movq %rax, (%rsi)
leaq 0xbaff8(%rip), %rax     # 0x124ff3
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a016
movq %rax, 0x18(%rsi)
leaq 0x167(%rip), %rax       # 0x6a178
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_run_deskmate_pnt
static void de_run_deskmate_pnt(deark *c, de_module_params *mparams)
{
	i64 w, h;
	i64 rowspan;
	i64 pos = 0;
	int is_compressed;
	de_bitmap *img = NULL;
	dbuf *unc_pixels = NULL;
	i64 unc_pixels_size;
	de_color pal[16];

	pos += 22;
	de_dbg(c, "image at %"I64_FMT, pos);
	w = 312;
	h = 176;
	rowspan = w/2;
	unc_pixels_size = rowspan * h;

	de_copy_std_palette(DE_PALID_PC16, 0, 0, pal, 16, 0);

	is_compressed = (pos+unc_pixels_size != c->infile->len);
	de_dbg(c, "compressed: %d", is_compressed);

	if(is_compressed) {
		unc_pixels = dbuf_create_membuf(c, unc_pixels_size, 0x1);
		while(1) {
			i64 count;
			u8 val;

			if(pos >= c->infile->len) break; // out of source data
			if(unc_pixels->len >= unc_pixels_size) break; // enough dst data
			val = de_getbyte_p(&pos);
			count = (i64)de_getbyte_p(&pos);
			dbuf_write_run(unc_pixels, val, count);
		}
	}
	else {
		unc_pixels = dbuf_open_input_subfile(c->infile, pos, unc_pixels_size);
	}

	img = de_bitmap_create(c, w, h, 3);
	de_convert_image_paletted(unc_pixels, 0, 4, rowspan, pal, img, 0);
	de_bitmap_write_to_file(img, NULL, 0);

	dbuf_close(unc_pixels);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
movq $0x16, 0x8(%rsp)
leaq 0xc44dc(%rip), %rsi     # 0x12e518
movl $0x16, %edx
xorl %eax, %eax
callq 0xe9226
leaq 0x10(%rsp), %rcx
movl $0x10, %r8d
movl $0x14, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0xecbbc
movl $0x6b40, %r14d          # imm = 0x6B40
addq 0x8(%rsp), %r14
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r15
xorl %edx, %edx
cmpq %r15, %r14
setne %dl
leaq 0xcddba(%rip), %rsi     # 0x137e40
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
cmpq %r15, %r14
je 0x6a0fe
movl $0x6b40, %esi           # imm = 0x6B40
movq %rbx, %rdi
movl $0x1, %edx
callq 0xf0faf
movq %rax, %r14
movq 0x8(%rsp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jge 0x6a114
leaq 0x8(%rsp), %r15
cmpq $0x6b3f, 0x18(%r14)     # imm = 0x6B3F
jg 0x6a114
movq %r15, %rsi
callq 0xef14d
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef14d
movzbl %al, %edx
movzbl %bpl, %esi
movq %r14, %rdi
callq 0xf14bd
movq 0x8(%rsp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jl 0x6a0be
jmp 0x6a114
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movl $0x6b40, %edx           # imm = 0x6B40
callq 0xf1988
movq %rax, %r14
movl $0x138, %esi            # imm = 0x138
movl $0xb0, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %rbx
movl $0x0, (%rsp)
leaq 0x10(%rsp), %r8
movl $0x4, %edx
movl $0x9c, %ecx
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %r9
callq 0xf35b8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf2923
movq %r14, %rdi
callq 0xf0b13
movq %rbx, %rdi
callq 0xf28d4
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_mdesk_icn
void de_module_mdesk_icn(deark *c, struct deark_module_info *mi)
{
	mi->id = "mdesk_icn";
	mi->desc = "Magic Desk icon";
	mi->run_fn = de_run_mdesk_icn;
	mi->identify_fn = de_identify_mdesk_icn;
	mi->help_fn = de_help_mdesk_icn;
}

// Assembly:
leaq 0xbae63(%rip), %rax     # 0x125008
movq %rax, (%rsi)
leaq 0xbae63(%rip), %rax     # 0x125012
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6a1d5
movq %rax, 0x18(%rsi)
leaq 0x1a2(%rip), %rax       # 0x6a367
movq %rax, 0x20(%rsi)
leaq 0x22a(%rip), %rax       # 0x6a3fa
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_mdesk_icn
static int de_identify_mdesk_icn(deark *c)
{
	u8 b2;
	int has_ext;
	int b2_ok;

	if(c->infile->len!=515) return 0;
	if(de_getu16be(0)!=0x1f1f) return 0;
	b2 = de_getbyte(2);

	has_ext = (de_input_file_has_ext(c, "icn") ||
		de_input_file_has_ext(c, "tbi"));
	b2_ok = (b2==0x00 || b2==0x03 || b2==0xff);

	if(has_ext && b2_ok) {
		return 90;
	}
	return 14;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0x203, 0x18(%rdi)      # imm = 0x203
jne 0x6a3f2
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xef169
cmpq $0x1f1f, %rax           # imm = 0x1F1F
jne 0x6a3f2
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xef0d5
movl %eax, %ebp
leaq 0xbac66(%rip), %rsi     # 0x12500e
movq %rbx, %rdi
callq 0xea936
movb $0x1, %dl
testl %eax, %eax
jne 0x6a3ca
leaq 0xbb108(%rip), %rsi     # 0x1254c5
movq %rbx, %rdi
callq 0xea936
testl %eax, %eax
setne %dl
incb %bpl
movb $0x13, %al
movl %ebp, %ecx
shrb %cl, %al
testb $0x1, %al
movl $0x5a, %r14d
movl $0xe, %eax
cmovel %eax, %r14d
cmpb $0x5, %bpl
cmovael %eax, %r14d
testb %dl, %dl
cmovel %eax, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_animator_pic
void de_module_animator_pic(deark *c, struct deark_module_info *mi)
{
	mi->id = "animator_pic";
	mi->desc = "Autodesk Animator PIC/CEL";
	mi->run_fn = de_run_animator_pic;
	mi->identify_fn = de_identify_animator_pic;
}

// Assembly:
leaq 0xbac13(%rip), %rax     # 0x125022
movq %rax, (%rsi)
leaq 0xbac16(%rip), %rax     # 0x12502f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a434
movq %rax, 0x18(%rsi)
leaq 0x17d(%rip), %rax       # 0x6a5ac
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_run_animator_pic
static void de_run_animator_pic(deark *c, de_module_params *mparams)
{
	de_bitmap *img = NULL;
	de_finfo *fi = NULL;
	i64 pos = 2;
	i64 w, h;
	i64 imgsize;
	de_color pal[256];

	w = de_getu16le_p(&pos);
	h = de_getu16le_p(&pos);
	de_dbg_dimensions(c, w, h);
	if(!de_good_image_dimensions(c, w, h)) goto done;
	pos += 4; // xcoord/ycoord
	pos += 1; // depth
	pos += 1; // compression type
	imgsize = de_getu32le_p(&pos);
	de_dbg(c, "image size: %"I64_FMT, imgsize);
	pos += 16;
	de_read_simple_palette(c, c->infile, pos, 256, 3, pal, 256, DE_RDPALTYPE_VGA18BIT, 0);
	pos += 3*256;

	fi = de_finfo_create(c);
	fi->density.code = DE_DENSITY_UNK_UNITS;
	fi->density.xdens = 240.0;
	fi->density.ydens = 200.0;
	img = de_bitmap_create(c, w, h, 3);
	de_convert_image_paletted(c->infile, pos, 8, w, pal, img, 0);;
	de_bitmap_write_to_file_finfo(img, fi, 0);

done:
	de_bitmap_destroy(img);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq $0x2, (%r15)
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xef1ed
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef1ed
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe9b05
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf241d
xorl %ebp, %ebp
testl %eax, %eax
je 0x6a584
leaq 0x8(%rsp), %r13
addq $0x6, (%r13)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef3a0
leaq 0xbb044(%rip), %rsi     # 0x1254f9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%r13), %rdx
addq $0x10, %rdx
movq %rdx, (%r13)
movq 0x18(%rbx), %rsi
subq $0x8, %rsp
leaq 0x18(%rsp), %r9
movl $0x100, %ecx            # imm = 0x100
movl $0x3, %r8d
movq %rbx, %rdi
pushq %rbp
pushq $0x2
pushq $0x100                  # imm = 0x100
callq 0xf32f2
addq $0x20, %rsp
addq $0x300, (%r13)          # imm = 0x300
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r15
movl $0x1, 0x78(%rax)
movabsq $0x406e000000000000, %rax # imm = 0x406E000000000000
movq %rax, 0x80(%r15)
movabsq $0x4069000000000000, %rax # imm = 0x4069000000000000
movq %rax, 0x88(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r13), %rsi
subq $0x8, %rsp
movl $0x8, %edx
movq %r14, %rcx
leaq 0x18(%rsp), %r8
movq %rax, %r9
pushq %rbp
callq 0xf35b8
addq $0x10, %rsp
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf2917
movq %r15, %rbp
jmp 0x6a587
xorl %r12d, %r12d
movq %r12, %rdi
callq 0xf28d4
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xea9b3
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_animator_pic
static int de_identify_animator_pic(deark *c)
{
	if(de_getu16le(0)!=0x9119) return 0;
	if(de_getbyte(10)!=0x08) return 0;
	if(de_getbyte(11)!=0x00) return 0;
	if(de_input_file_has_ext(c, "pic") ||
		de_input_file_has_ext(c, "cel"))
	{
		return 100;
	}
	return 80;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xef1ca
cmpq $0x9119, %rax           # imm = 0x9119
jne 0x6a626
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xef0d5
cmpb $0x8, %al
jne 0x6a626
movq 0x18(%rbx), %rdi
movl $0xb, %esi
callq 0xef0d5
testb %al, %al
jne 0x6a626
leaq 0xcb7e9(%rip), %rsi     # 0x135ddd
movq %rbx, %rdi
callq 0xea936
movl $0x64, %r14d
testl %eax, %eax
jne 0x6a626
leaq 0xba9ca(%rip), %rsi     # 0x124fd7
movq %rbx, %rdi
callq 0xea936
testl %eax, %eax
movl $0x50, %eax
movl $0x64, %r14d
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_dgi
void de_module_dgi(deark *c, struct deark_module_info *mi)
{
	mi->id = "dgi";
	mi->desc = "DGI (Digi-Pic)";
	mi->run_fn = de_run_dgi;
	mi->identify_fn = de_identify_dgi;
}

// Assembly:
leaq 0xbaa11(%rip), %rax     # 0x125049
movq %rax, (%rsi)
leaq 0xbaa0b(%rip), %rax     # 0x12504d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a65d
movq %rax, 0x18(%rsi)
leaq 0x13d(%rip), %rax       # 0x6a795
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_run_dgi
static void de_run_dgi(deark *c, de_module_params *mparams)
{
	dbuf *imgbuf = NULL;
	de_bitmap *img = NULL;
	de_finfo *fi = NULL;
	de_color pal[4];

	imgbuf = dbuf_create_membuf(c, 64000, 0x1);

	// Full 640x400 image is stored as four 320x200-pixel quadrants.
	// Each quadrant is interlaced.
	do_dgi_convert_quadrant(c, imgbuf, 0, 0);
	do_dgi_convert_quadrant(c, imgbuf, 16000, 80);
	do_dgi_convert_quadrant(c, imgbuf, 32008, 32000);
	do_dgi_convert_quadrant(c, imgbuf, 48008, 32080);

	de_copy_std_palette(DE_PALID_CGA, 1, 0, pal, 4, 0);

	fi = de_finfo_create(c);
	img = de_bitmap_create(c, 640, 400, 3);
	de_convert_image_paletted(imgbuf, 0, 2, 160, pal, img, 0);

	// DGI targets CGA 320x200.
	fi->density.code = DE_DENSITY_UNK_UNITS;
	fi->density.xdens = 240;
	fi->density.ydens = 200;

	de_bitmap_write_to_file_finfo(img, fi, 0);

	dbuf_close(imgbuf);
	de_bitmap_destroy(img);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0xfa00, %esi           # imm = 0xFA00
movl $0x1, %edx
callq 0xf0faf
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x6d0bc
movl $0x3e80, %edx           # imm = 0x3E80
movl $0x50, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d0bc
movl $0x7d08, %edx           # imm = 0x7D08
movl $0x7d00, %ecx           # imm = 0x7D00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d0bc
movl $0xbb88, %edx           # imm = 0xBB88
movl $0x7d50, %ecx           # imm = 0x7D50
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d0bc
leaq 0x10(%rsp), %r12
movl $0x4, %r8d
movl $0xa, %edi
movl $0x1, %esi
xorl %edx, %edx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0xecbbc
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r15
movl $0x280, %esi            # imm = 0x280
movl $0x190, %edx            # imm = 0x190
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %r13
movl $0x0, (%rsp)
movl $0x2, %edx
movl $0xa0, %ecx
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %r8
movq %rax, %r9
callq 0xf35b8
movl $0x1, 0x78(%r15)
movabsq $0x406e000000000000, %rax # imm = 0x406E000000000000
movq %rax, 0x80(%r15)
movabsq $0x4069000000000000, %rax # imm = 0x4069000000000000
movq %rax, 0x88(%r15)
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf2917
movq %r14, %rdi
callq 0xf0b13
movq %r13, %rdi
callq 0xf28d4
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea9b3
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_dgi
static int de_identify_dgi(deark *c)
{
	int has_ext;

	if(c->infile->len < 64008) return 0;
	has_ext = de_input_file_has_ext(c, "dgi");
	if(!has_ext && c->infile->len!=64008) return 0;
	if(dbuf_memcmp(c->infile, 32000, (const void*)"\x01\x04\0\0\0\0\0\0", 8)) return 0;
	if(has_ext && c->infile->len==64008) return 100;
	return 20; // either no .dgi extension, or file unexpectedly large (but not both)
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $0xfa08, 0x18(%rax)     # imm = 0xFA08
jl 0x6a806
movq %rdi, %r14
leaq 0xba896(%rip), %rsi     # 0x125049
callq 0xea936
movl %eax, %ebp
testl %eax, %eax
jne 0x6a7cc
movq 0x18(%r14), %rax
cmpq $0xfa08, 0x18(%rax)     # imm = 0xFA08
jne 0x6a806
movq 0x18(%r14), %rdi
leaq 0xba249(%rip), %rdx     # 0x124a20
movl $0x7d00, %esi           # imm = 0x7D00
movl $0x8, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x6a806
testl %ebp, %ebp
je 0x6a801
movq 0x18(%r14), %rax
movl $0x64, %ebx
cmpq $0xfa08, 0x18(%rax)     # imm = 0xFA08
je 0x6a806
movl $0x14, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_cserve_rle
void de_module_cserve_rle(deark *c, struct deark_module_info *mi)
{
	mi->id = "cserve_rle";
	mi->desc = "CompuServe RLE";
	mi->run_fn = de_run_cserve_rle;
	mi->identify_fn = de_identify_cserve_rle;
}

// Assembly:
leaq 0xba848(%rip), %rax     # 0x12505c
movq %rax, (%rsi)
leaq 0xba849(%rip), %rax     # 0x125067
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a839
movq %rax, 0x18(%rsi)
leaq 0x22f(%rip), %rax       # 0x6aa63
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_lotus_mscr
void de_module_lotus_mscr(deark *c, struct deark_module_info *mi)
{
	mi->id = "lotus_mscr";
	mi->desc = "Lotus Manuscript graphics";
	mi->run_fn = de_run_lotus_mscr;
	mi->identify_fn = de_identify_lotus_mscr;
}

// Assembly:
leaq 0xba5fa(%rip), %rax     # 0x125076
movq %rax, (%rsi)
leaq 0xba5fb(%rip), %rax     # 0x125081
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6aaa1
movq %rax, 0x18(%rsi)
leaq 0x2c5(%rip), %rax       # 0x6ad61
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_lotus_mscr
static int de_identify_lotus_mscr(deark *c)
{
	u8 is_rle, x;
	i64 d1, d2, h, rb;

	x = de_getbyte(0);
	if(x=='B' && de_input_file_has_ext(c, "bit")) {
		is_rle = 0;
	}
	else if(x=='R' && de_input_file_has_ext(c, "rle")) {
		is_rle = 1;
	}
	else {
		return 0;
	}

	d1 = de_getu16le(1);
	d2 = de_getu16le(3);
	if(is_rle) {
		// RLE is particularly hard to detect, because we can't use the file size.
		if(d1!=d2) return 0;
		if(d1!=72 && d1!=300) return 0;
	}
	else {
		if(d1>=600 || d2>600) return 0;
	}

	h = de_getu16le(5);
	rb = de_getu16le(7);
	if(h==0 || rb==0 || h>3300 || rb>320) return 0;
	if(is_rle) {
		return 12;
	}
	else {
		if(9+h*rb == c->infile->len) return 75;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xef0d5
cmpb $0x52, %al
je 0x6ada8
movl %eax, %ebp
movzbl %al, %eax
cmpl $0x42, %eax
jne 0x6aea2
leaq 0xdad74(%rip), %rsi     # 0x145b03
movq %rbx, %rdi
callq 0xea936
movb $0x1, %r15b
testl %eax, %eax
jne 0x6adc7
cmpb $0x52, %bpl
jne 0x6aea2
leaq 0xba2b4(%rip), %rsi     # 0x125063
movq %rbx, %rdi
callq 0xea936
xorl %r15d, %r15d
movl $0x0, %ecx
testl %eax, %eax
je 0x6aea4
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0xef1ca
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x3, %esi
callq 0xef1ca
testb %r15b, %r15b
je 0x6ae0c
cmpq $0x258, %r14            # imm = 0x258
setge %cl
cmpq $0x259, %rax            # imm = 0x259
setge %al
orb %cl, %al
movl $0x0, %ecx
je 0x6ae29
jmp 0x6aea4
cmpq %rax, %r14
jne 0x6aea2
cmpq $0x48, %r14
je 0x6ae29
movl $0x0, %ecx
cmpq $0x12c, %r14            # imm = 0x12C
jne 0x6aea4
movq 0x18(%rbx), %rdi
movl $0x5, %esi
callq 0xef1ca
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x7, %esi
callq 0xef1ca
testq %r14, %r14
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpq $0xce5, %r14            # imm = 0xCE5
setl %cl
cmpq $0x141, %rax            # imm = 0x141
setl %sil
andb %cl, %sil
andb %dl, %sil
andb %sil, %r15b
xorl %edx, %edx
testb %sil, %sil
movl $0xc, %ecx
cmovel %edx, %ecx
cmpb $0x1, %r15b
jne 0x6aea4
imulq %r14, %rax
addq $0x9, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
movl $0x4b, %eax
cmovel %eax, %edx
movl %edx, %ecx
jmp 0x6aea4
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_fastgraph_spr
void de_module_fastgraph_spr(deark *c, struct deark_module_info *mi)
{
	mi->id = "fastgraph_spr";
	mi->desc = "Fastgraph SPR";
	mi->run_fn = de_run_fastgraph_spr;
	mi->identify_fn = de_identify_fastgraph_spr;
	mi->help_fn = de_help_fastgraph_spr;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0xba1e3(%rip), %rax     # 0x12509b
movq %rax, (%rsi)
leaq 0xba1e7(%rip), %rax     # 0x1250a9
movq %rax, 0x8(%rsi)
leaq 0x1f(%rip), %rax        # 0x6aeec
movq %rax, 0x18(%rsi)
leaq 0xcc(%rip), %rax        # 0x6afa4
movq %rax, 0x20(%rsi)
leaq 0xe7(%rip), %rax        # 0x6afca
movq %rax, 0x28(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_run_fastgraph_spr
static void de_run_fastgraph_spr(deark *c, de_module_params *mparams)
{
	struct fastgraph_ctx *d = NULL;

	d = de_malloc(c, sizeof(struct fastgraph_ctx));
	d->is_ppr = 0;

	if(has_fastgraph_spr_sig(c)) {
		d->w = 1 + 256*(i64)de_getbyte(18) + (i64)de_getbyte(16);
		d->h = 1 + 256*(i64)de_getbyte(22) + (i64)de_getbyte(20);
		d->img_startpos = 26;
	}

	do_fastgraph_internal(c, d);

	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x430, %esi            # imm = 0x430
callq 0xe969b
movq %rax, %r14
movb $0x0, (%rax)
movq 0x18(%rbx), %rdi
leaq 0xb9b1a(%rip), %rdx     # 0x124a29
movl $0xa, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x6af89
movq 0x18(%rbx), %rdi
movl $0x12, %esi
callq 0xef0d5
movzbl %al, %r15d
shll $0x8, %r15d
movq 0x18(%rbx), %rdi
movl $0x10, %esi
callq 0xef0d5
movzbl %al, %eax
addq %r15, %rax
incq %rax
movq %rax, 0x8(%r14)
movq 0x18(%rbx), %rdi
movl $0x16, %esi
callq 0xef0d5
movzbl %al, %r15d
shll $0x8, %r15d
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xef0d5
movzbl %al, %eax
addq %r15, %rax
incq %rax
movq %rax, 0x10(%r14)
movq $0x1a, 0x18(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d1d1
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_fastgraph_ppr
void de_module_fastgraph_ppr(deark *c, struct deark_module_info *mi)
{
	mi->id = "fastgraph_ppr";
	mi->desc = "Fastgraph PPR";
	mi->run_fn = de_run_fastgraph_ppr;
	mi->identify_fn = NULL;
	mi->help_fn = de_help_fastgraph_ppr;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0xba0c2(%rip), %rax     # 0x1250b7
movq %rax, (%rsi)
leaq 0xba0c6(%rip), %rax     # 0x1250c5
movq %rax, 0x8(%rsi)
leaq 0x1c(%rip), %rax        # 0x6b026
movq %rax, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
leaq 0x3d(%rip), %rax        # 0x6b05a
movq %rax, 0x28(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_run_fastgraph_ppr
static void de_run_fastgraph_ppr(deark *c, de_module_params *mparams)
{
	struct fastgraph_ctx *d = NULL;

	d = de_malloc(c, sizeof(struct fastgraph_ctx));
	d->is_ppr = 1;

	do_fastgraph_internal(c, d);

	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x430, %esi            # imm = 0x430
callq 0xe969b
movq %rax, %r14
movb $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6d1d1
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_young_picasso
void de_module_young_picasso(deark *c, struct deark_module_info *mi)
{
	mi->id = "young_picasso";
	mi->desc = "Young Picasso .YP";
	mi->run_fn = de_run_yp;
	mi->identify_fn = de_identify_yp;
}

// Assembly:
leaq 0xba04e(%rip), %rax     # 0x1250d3
movq %rax, (%rsi)
leaq 0xba052(%rip), %rax     # 0x1250e1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b0aa
movq %rax, 0x18(%rsi)
leaq 0x1f7(%rip), %rax       # 0x6b29c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_iconmgr_ica
void de_module_iconmgr_ica(deark *c, struct deark_module_info *mi)
{
	mi->id = "iconmgr_ica";
	mi->desc = "Icon Manager Archive (.ica)";
	mi->run_fn = de_run_iconmgr_ica;
	mi->identify_fn = de_identify_iconmgr_ica;
}

// Assembly:
leaq 0xb9e00(%rip), %rax     # 0x1250f3
movq %rax, (%rsi)
leaq 0xb9e02(%rip), %rax     # 0x1250ff
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b318
movq %rax, 0x18(%rsi)
leaq 0x3c0(%rip), %rax       # 0x6b6d3
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_iconmgr_ica
static int de_identify_iconmgr_ica(deark *c)
{
	u8 b;

	if(dbuf_memcmp(c->infile, 0, "IC", 2)) return 0;
	b = de_getbyte(2);
	if(de_getbyte(3) != 0) return 0;
	if(b=='M' || b=='2') {
		return 90;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0xb01ba(%rip), %rdx     # 0x11b89f
xorl %ebx, %ebx
movl $0x2, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x6b72e
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xef0d5
movl %eax, %ebp
movq 0x18(%r14), %rdi
movl $0x3, %esi
callq 0xef0d5
testb %al, %al
jne 0x6b72e
xorl %ebx, %ebx
cmpb $0x32, %bpl
movl $0x5a, %eax
cmovel %eax, %ebx
cmpb $0x4d, %bpl
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_thumbsplus
void de_module_thumbsplus(deark *c, struct deark_module_info *mi)
{
	mi->id = "thumbsplus";
	mi->desc = "ThumbsPlus v1-2 database (.tud)";
	mi->run_fn = de_run_thumbsplus;
	mi->identify_fn = de_identify_thumbsplus;
}

// Assembly:
leaq 0xb99df(%rip), %rax     # 0x12511b
movq %rax, (%rsi)
leaq 0xb99e0(%rip), %rax     # 0x125126
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b761
movq %rax, 0x18(%rsi)
leaq 0x487(%rip), %rax       # 0x6bbe3
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_fmtowns_icn
void de_module_fmtowns_icn(deark *c, struct deark_module_info *mi)
{
	mi->id = "fmtowns_icn";
	mi->desc = "FM Towns icons";
	mi->run_fn = de_run_fmtowns_icn;
	mi->identify_fn = de_identify_fmtowns_icn;
}

// Assembly:
leaq 0xb953f(%rip), %rax     # 0x125146
movq %rax, (%rsi)
leaq 0xb9541(%rip), %rax     # 0x125152
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6bc2c
movq %rax, 0x18(%rsi)
leaq 0x4f1(%rip), %rax       # 0x6c118
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_fmtowns_icn
static int de_identify_fmtowns_icn(deark *c)
{
	u8 buf[10];

	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, (const void*)"ICNFILE\0\0\x1a", 10)) {
		return 100;
	}
	if(!de_memcmp(buf, (const void*)"CRI-FJ2 ", 8)) {
		return 100;
	}
	if(!de_memcmp(buf, (const void*)"CRI-FUJI", 8)) {
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rdi), %rdi
leaq 0x6(%rsp), %rbx
movl $0xa, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xeeee8
movabsq $0x454c49464e4349, %rcx # imm = 0x454C49464E4349
xorq (%rbx), %rcx
movzwl 0x8(%rbx), %edx
xorq $0x1a00, %rdx           # imm = 0x1A00
movl $0x64, %eax
orq %rcx, %rdx
je 0x6c181
movabsq $0x20324a462d495243, %rcx # imm = 0x20324A462D495243
cmpq %rcx, 0x6(%rsp)
je 0x6c181
xorl %ecx, %ecx
movabsq $0x494a55462d495243, %rax # imm = 0x494A55462D495243
cmpq %rax, 0x6(%rsp)
movl $0x64, %eax
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_fmtowns_hel
void de_module_fmtowns_hel(deark *c, struct deark_module_info *mi)
{
	mi->id = "fmtowns_hel";
	mi->desc = "FM Towns animation (.hel)";
	mi->run_fn = de_run_fmtowns_hel;
	mi->identify_fn = de_identify_fmtowns_hel;
	mi->help_fn = de_help_fmtowns_hel;
}

// Assembly:
leaq 0xb8fd3(%rip), %rax     # 0x125161
movq %rax, (%rsi)
leaq 0xb8fd5(%rip), %rax     # 0x12516d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6c1be
movq %rax, 0x18(%rsi)
leaq 0x227(%rip), %rax       # 0x6c3d5
movq %rax, 0x20(%rsi)
leaq 0x242(%rip), %rax       # 0x6c3fb
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_pixfolio
void de_module_pixfolio(deark *c, struct deark_module_info *mi)
{
	mi->id = "pixfolio";
	mi->desc = "PixFolio catalog";
	mi->run_fn = de_run_pixfolio;
	mi->identify_fn = de_identify_pixfolio;
	mi->help_fn = de_help_pixfolio;
}

// Assembly:
leaq 0xb8d77(%rip), %rax     # 0x125187
movq %rax, (%rsi)
leaq 0xb8d76(%rip), %rax     # 0x125190
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6c440
movq %rax, 0x18(%rsi)
leaq 0x590(%rip), %rax       # 0x6c9c0
movq %rax, 0x20(%rsi)
leaq 0x637(%rip), %rax       # 0x6ca72
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_identify_pixfolio
static int de_identify_pixfolio(deark *c)
{
	u8 buf[20];
	i64 n1, n2;

	// This probably doesn't identify *every* PixFolio CAT file.
	// It assumes the first item contains an image, which is quite possibly not
	// always true.
	if(de_getbyte(0)<0x20) return 0;
	if(!de_input_file_has_ext(c, "cat")) return 0;
	de_read(buf, 343, 20);
	if(buf[2]!='/' && buf[2]!='-') return 0;
	if(buf[13]!=':') return 0;
	n1 = de_getu16le(369); // Descr len
	n2 = de_getu32le(373+n1+1); // DIB header size
	if(n2 != 40) return 0;
	n2 = de_getu16le(373+n1+1+12); // #planes
	if(n2 != 1) return 0;
	return 80;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $0x20, %al
jb 0x6ca66
leaq 0xb8eef(%rip), %rsi     # 0x1258d7
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
je 0x6ca66
movq 0x18(%r14), %rdi
movq %rsp, %r15
movl $0x157, %edx            # imm = 0x157
movl $0x14, %ecx
movq %r15, %rsi
callq 0xeeee8
movb 0x2(%r15), %al
andb $-0x3, %al
cmpb $0x2d, %al
jne 0x6ca66
cmpb $0x3a, 0xd(%rsp)
jne 0x6ca66
movq 0x18(%r14), %rdi
movl $0x171, %esi            # imm = 0x171
callq 0xef1ca
movq %rax, %r15
movq 0x18(%r14), %rdi
leaq 0x176(%rax), %rsi
callq 0xef37e
cmpq $0x28, %rax
jne 0x6ca66
movq 0x18(%r14), %rdi
addq $0x182, %r15            # imm = 0x182
movq %r15, %rsi
callq 0xef1ca
xorl %ecx, %ecx
cmpq $0x1, %rax
movl $0x50, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: de_module_apple2icons
void de_module_apple2icons(deark *c, struct deark_module_info *mi)
{
	mi->id = "apple2icons";
	mi->desc = "Apple II icons archive";
	mi->run_fn = de_run_apple2icons;
	mi->identify_fn = NULL;
}

// Assembly:
leaq 0xb871a(%rip), %rax     # 0x1251a1
movq %rax, (%rsi)
leaq 0xb871c(%rip), %rax     # 0x1251ad
movq %rax, 0x8(%rsi)
leaq 0xd(%rip), %rax         # 0x6caa9
movq %rax, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: xpuzz_read_header
static void xpuzz_read_header(deark *c, struct xpuzzhdr *hdr)
{
	hdr->w = de_getu32be(0);
	hdr->h = de_getu32be(4);
	hdr->palentries = (i64)de_getbyte(8);
	if(hdr->palentries==0) hdr->palentries = 256;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xef32a
movq %rax, (%rbx)
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xef32a
movq %rax, 0x8(%rbx)
movq 0x18(%r14), %rdi
movl $0x8, %esi
callq 0xef0d5
movzbl %al, %eax
testb %al, %al
movl $0x100, %ecx            # imm = 0x100
cmovneq %rax, %rcx
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: lss16_get_nibble
static u8 lss16_get_nibble(deark *c, struct lss16ctx *d)
{
	u8 n;
	if(d->nextnibble_valid) {
		d->nextnibble_valid = 0;
		return d->nextnibble;
	}
	n = de_getbyte(d->pos);
	d->pos++;
	// The low nibble of each byte is interpreted first.
	// Record the high nibble, and return the low nibble.
	d->nextnibble = (n&0xf0)>>4;
	d->nextnibble_valid = 1;
	return n&0x0f;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0x8(%rsi)
je 0x6d00c
movl $0x0, 0x8(%rbx)
movb 0xc(%rbx), %al
jmp 0x6d02c
movq 0x18(%rdi), %rdi
movq (%rbx), %rsi
callq 0xef0d5
incq (%rbx)
movl %eax, %ecx
shrb $0x4, %cl
movb %cl, 0xc(%rbx)
movl $0x1, 0x8(%rbx)
andb $0xf, %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc2.c
// Function: fp_art_read_hdr_std
static void fp_art_read_hdr_std(deark *c, struct fp_art_stdhdr_data *hd,
	UI fld1)
{
	i64 pos = 2;
	i64 b_left, b_right, b_top, b_bottom;

	b_left = (i64)fld1;
	b_right = de_getu16le_p(&pos);
	b_top = de_getu16le_p(&pos);
	b_bottom = de_getu16le_p(&pos);
	hd->w = b_right - b_left;
	hd->h = b_bottom - b_top;
	if(hd->w<1 || hd->h<1) return;
	hd->rowspan = ((hd->w+15)/16)*2;
	hd->ok = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %r12
movq $0x2, (%r12)
movl %edx, %ebp
movq 0x18(%rdi), %rdi
movq %r12, %rsi
callq 0xef1ed
movq %rax, %r14
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef1ed
movq %rax, %r13
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef1ed
subq %r13, %rax
subq %rbp, %r14
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
setle %cl
testq %rax, %rax
setle %al
orb %cl, %al
jne 0x6d0ad
addq $0xf, %r14
shrq $0x3, %r14
movabsq $0xffffffffffffffe, %rax # imm = 0xFFFFFFFFFFFFFFE
andq %r14, %rax
movq %rax, 0x18(%rbx)
movb $0x1, (%rbx)
addq $0x8, %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/misc2.c
// Function: do_dgi_convert_quadrant
static void do_dgi_convert_quadrant(deark *c, dbuf *imgbuf, i64 srcoffs, i64 dstoffs)
{
	i64 j;

	for(j=0; j<50; j++) {
		dbuf_copy_at(c->infile, srcoffs+j*160, 80, imgbuf, dstoffs+j*640);
		dbuf_copy_at(c->infile, srcoffs+j*160+80, 80, imgbuf, dstoffs+j*640+320);
		dbuf_copy_at(c->infile, srcoffs+8000+j*160, 80, imgbuf, dstoffs+j*640+160);
		dbuf_copy_at(c->infile, srcoffs+8000+j*160+80, 80, imgbuf, dstoffs+j*640+480);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebp, %ebp
movq 0x18(%r12), %rdi
leaq (%rbx,%rbp), %r13
movl $0x50, %edx
movq %r14, %rsi
movq %r15, %rcx
movq %r13, %r8
callq 0xefe16
movq 0x18(%r12), %rdi
leaq 0x50(%r14), %rsi
leaq (%rbx,%rbp), %r8
addq $0x140, %r8             # imm = 0x140
movl $0x50, %edx
movq %r15, %rcx
callq 0xefe16
movq 0x18(%r12), %rdi
leaq 0x1f40(%r14), %rsi
movl $0xa0, %eax
addq %rax, %r13
movl $0x50, %edx
movq %r15, %rcx
movq %r13, %r8
callq 0xefe16
movq 0x18(%r12), %rdi
leaq 0x1f90(%r14), %rsi
leaq (%rbx,%rbp), %r8
addq $0x1e0, %r8             # imm = 0x1E0
movl $0x50, %edx
movq %r15, %rcx
callq 0xefe16
addq $0x280, %rbp            # imm = 0x280
movl $0xa0, %eax
addq %rax, %r14
cmpq $0x7d00, %rbp           # imm = 0x7D00
jne 0x6d0d5
addq $0x8, %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/misc2.c
// Function: get_cserve_rle_fmt
static int get_cserve_rle_fmt(deark *c)
{
	u8 buf[3];

	de_read(buf, 0, 3);
	if(buf[0]!=0x1b || buf[1]!=0x47) return 0;
	if(buf[2]==0x4d) return 1;
	if(buf[2]==0x48) return 2;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0x5(%rsp), %r14
movl $0x3, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
cmpb $0x1b, (%r14)
jne 0x6d1c7
cmpb $0x47, 0x6(%rsp)
jne 0x6d1c7
movb 0x7(%rsp), %al
xorl %ecx, %ecx
cmpb $0x48, %al
sete %cl
addl %ecx, %ecx
cmpb $0x4d, %al
movl $0x1, %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/misc2.c
// Function: decompress_fastgraph_ppr
static void decompress_fastgraph_ppr(deark *c, struct fastgraph_ctx *d,
	dbuf *unc_pixels, i64 pos1)
{
	i64 pos = pos1;
	i64 unc_total = 0;

	d->max_color_used = 1;

	while(1) {
		u8 b;
		u8 clr[2];
		i64 count;
		UI k;

		if(pos >= c->infile->len) break;
		if(unc_total >= d->max_unc_bytes) break;

		b = de_getbyte_p(&pos);
		clr[0] = b>>4;
		clr[1] = b & 0x0f;

		for(k=0; k<2; k++) {
			count = (i64)de_getbyte_p(&pos);
			if(count>0) {
				if(clr[k] > d->max_color_used) {
					d->max_color_used = clr[k];
				}
				dbuf_write_run(unc_pixels, clr[k], count);
				unc_total += count;
			}
		}
	}

	dbuf_flush(unc_pixels);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x428(%rsi)
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq 0x18(%r15), %rdi
cmpq 0x18(%rdi), %rax
jge 0x6d51c
cmpq 0x20(%r14), %rbp
jge 0x6d51c
leaq 0x10(%rsp), %rsi
callq 0xef14d
movl %eax, %ecx
shrb $0x4, %cl
movb %cl, 0xe(%rsp)
andb $0xf, %al
movb %al, 0xf(%rsp)
xorl %r12d, %r12d
movq 0x18(%r15), %rdi
leaq 0x10(%rsp), %rsi
callq 0xef14d
testb %al, %al
je 0x6d50f
movb 0xe(%rsp,%r12), %cl
cmpb 0x428(%r14), %cl
jbe 0x6d4fa
movb %cl, 0x428(%r14)
movzbl %al, %r13d
movzbl %cl, %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf14bd
addq %r13, %rbp
incq %r12
cmpq $0x1, %r12
je 0x6d4d3
movb $0x1, %al
jmp 0x6d51e
xorl %eax, %eax
testb %al, %al
jne 0x6d4a2
movq %rbx, %rdi
callq 0xf0ea4
addq $0x18, %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/misc2.c
// Function: thumbsplus_icon_destroy
static void thumbsplus_icon_destroy(deark *c, struct thumbsplus_icon_ctx *md)
{
	if(!md) return;
	de_destroy_stringreaderdata(c, md->orig_name_srd);
	ucstring_destroy(md->name_token);
	de_free(c, md);
}

// Assembly:
testq %rsi, %rsi
je 0x6d56c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rsi
callq 0xf00aa
movq 0x20(%rbx), %rdi
callq 0xf6bb0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_cpshrink
void de_module_cpshrink(deark *c, struct deark_module_info *mi)
{
	mi->id = "cpshrink";
	mi->desc = "CP Shrink .CPZ";
	mi->run_fn = de_run_cpshrink;
	mi->identify_fn = de_identify_cpshrink;
}

// Assembly:
leaq 0xb81c4(%rip), %rax     # 0x125943
movq %rax, (%rsi)
leaq 0xb81c3(%rip), %rax     # 0x12594c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6d7a4
movq %rax, 0x18(%rsi)
leaq 0x3b6(%rip), %rax       # 0x6db55
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_identify_cpshrink
static int de_identify_cpshrink(deark *c)
{
	i64 n;

	if(!de_input_file_has_ext(c, "cpz")) return 0;
	n = de_getu32le(0);
	if(n<1 || n>0xffff) return 0;
	if(de_getbyte(27)>2) return 0; // cmpr meth of 1st file
	return 25;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb81a6(%rip), %rsi     # 0x125d09
callq 0xea936
testl %eax, %eax
je 0x6dba6
movq 0x18(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xef37e
addq $-0x10000, %rax         # imm = 0xFFFF0000
cmpq $-0xffff, %rax          # imm = 0xFFFF0001
jb 0x6dba9
movq 0x18(%rbx), %rdi
movl $0x1b, %esi
callq 0xef0d5
xorl %ecx, %ecx
cmpb $0x3, %al
movl $0x19, %r14d
cmovael %ecx, %r14d
jmp 0x6dba9
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_dwc
void de_module_dwc(deark *c, struct deark_module_info *mi)
{
	mi->id = "dwc";
	mi->desc = "DWC compressed archive";
	mi->run_fn = de_run_dwc;
	mi->identify_fn = de_identify_dwc;
	mi->help_fn = de_help_dwc;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
leaq 0xb7da0(%rip), %rax     # 0x12595b
movq %rax, (%rsi)
leaq 0xb7d9a(%rip), %rax     # 0x12595f
movq %rax, 0x8(%rsi)
leaq 0x1f(%rip), %rax        # 0x6dbef
movq %rax, 0x18(%rsi)
leaq 0x637(%rip), %rax       # 0x6e212
movq %rax, 0x20(%rsi)
leaq 0x6d6(%rip), %rax       # 0x6e2bc
movq %rax, 0x28(%rsi)
orb $0x20, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_identify_dwc
static int de_identify_dwc(deark *c)
{
	i64 tsize;
	int has_ext;
	u8 dsize;

	if(!has_dwc_sig(c)) return 0;
	tsize = de_getu16le(c->infile->len-27);
	if(tsize<27 || tsize>c->infile->len) return 0;
	dsize = de_getbyte(c->infile->len-25);
	if(dsize<30) return 0;
	has_ext = de_input_file_has_ext(c, "dwc");
	if(tsize==27 && dsize==34) {
		if(has_ext) return 100;
		return 60;
	}
	if(has_ext) return 10;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x18(%rdi), %rsi
addq $-0x3, %rsi
leaq 0xb7bcc(%rip), %rdx     # 0x125dfb
movl $0x3, %ecx
callq 0xf025e
xorl %ebp, %ebp
testl %eax, %eax
jne 0x6e2af
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rsi
addq $-0x1b, %rsi
callq 0xef1ca
cmpq $0x1b, %rax
jl 0x6e2af
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rsi
cmpq %rsi, %rax
jg 0x6e2af
addq $-0x19, %rsi
callq 0xef0d5
cmpb $0x1e, %al
jb 0x6e2af
movl %eax, %r15d
leaq 0xb76de(%rip), %rsi     # 0x12595b
movq %rbx, %rdi
callq 0xea936
cmpq $0x1b, %r14
setne %cl
cmpb $0x22, %r15b
setne %dl
orb %cl, %dl
jne 0x6e2a5
testl %eax, %eax
movl $0x3c, %eax
movl $0x64, %ebp
jmp 0x6e2ac
testl %eax, %eax
movl $0xa, %ebp
cmovel %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_edi_pack
void de_module_edi_pack(deark *c, struct deark_module_info *mi)
{
	mi->id = "edi_pack";
	mi->desc = "EDI Install packed file";
	mi->run_fn = de_run_edi_pack;
	mi->identify_fn = de_identify_edi_pack;
}

// Assembly:
leaq 0xb76a5(%rip), %rax     # 0x125976
movq %rax, (%rsi)
leaq 0xb76a4(%rip), %rax     # 0x12597f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6e2f6
movq %rax, 0x18(%rsi)
leaq 0x2ad(%rip), %rax       # 0x6e59e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_identify_edi_pack
static int de_identify_edi_pack(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, g_edilzss_sig, 7)) {
		u8 v;

		v = de_getbyte(7);
		if(v=='1' || v=='2') return 100;
		return 0;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0xb7985(%rip), %rdx     # 0x125f35
xorl %ebx, %ebx
movl $0x7, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x6e5de
movq 0x18(%r14), %rdi
movl $0x7, %esi
callq 0xef0d5
addb $-0x31, %al
xorl %ecx, %ecx
cmpb $0x2, %al
movl $0x64, %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/misc3.c
// Function: de_module_qip
void de_module_qip(deark *c, struct deark_module_info *mi)
{
	mi->id = "qip";
	mi->desc = "QIP (Quarterdeck)";
	mi->run_fn = de_run_qip;
	mi->identify_fn = de_identify_qip;
}

// Assembly:
leaq 0xb73a8(%rip), %rax     # 0x125997
movq %rax, (%rsi)
leaq 0xb73a2(%rip), %rax     # 0x12599b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6e614
movq %rax, 0x18(%rsi)
leaq 0x243(%rip), %rax       # 0x6e852
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_identify_qip
static int de_identify_qip(deark *c)
{
	u8 b;
	i64 n;

	if(de_getbyte(0)!='Q') return 0;
	b = de_getbyte(1);
	if(b=='P') {
		if(de_getbyte(8)!=0x02) return 0;
		n = de_getu32le(16);
		if(n>c->infile->len) return 0;
		if(!dbuf_memcmp(c->infile, n, "QD", 2)) return 100;
	}
	else if(b=='D') {
		if(de_getu16le(2)==0 &&
			de_getu16le(8)==1)
		{
			return 70;
		}
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $0x51, %al
jne 0x6e8ff
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0xef0d5
cmpb $0x44, %al
je 0x6e8d1
movzbl %al, %eax
cmpl $0x50, %eax
jne 0x6e8fd
movq 0x18(%r14), %rdi
movl $0x8, %esi
callq 0xef0d5
cmpb $0x2, %al
jne 0x6e8ff
movq 0x18(%r14), %rdi
movl $0x10, %esi
callq 0xef37e
movq 0x18(%r14), %rdi
cmpq 0x18(%rdi), %rax
jg 0x6e8ff
leaq 0xb769f(%rip), %rdx     # 0x125f58
movl $0x2, %ecx
movq %rax, %rsi
callq 0xf025e
testl %eax, %eax
jne 0x6e8fd
movl $0x64, %ebx
jmp 0x6e8ff
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xef1ca
testq %rax, %rax
jne 0x6e8fd
movq 0x18(%r14), %rdi
movl $0x8, %esi
callq 0xef1ca
movl $0x46, %ebx
cmpq $0x1, %rax
je 0x6e8ff
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_pcxlib
void de_module_pcxlib(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcxlib";
	mi->desc = "PCX Library";
	mi->run_fn = de_run_pcxlib;
	mi->identify_fn = de_identify_pcxlib;
}

// Assembly:
leaq 0xb709d(%rip), %rax     # 0x1259ad
movq %rax, (%rsi)
leaq 0xb709a(%rip), %rax     # 0x1259b4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6e935
movq %rax, 0x18(%rsi)
leaq 0xc(%rip), %rax         # 0x6e93c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_gxlib
void de_module_gxlib(deark *c, struct deark_module_info *mi)
{
	mi->id = "gxlib";
	mi->desc = "GX Library";
	mi->run_fn = de_run_gxlib;
	mi->identify_fn = de_identify_gxlib;
}

// Assembly:
leaq 0xb7057(%rip), %rax     # 0x1259c0
movq %rax, (%rsi)
leaq 0xb7053(%rip), %rax     # 0x1259c6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6e98e
movq %rax, 0x18(%rsi)
leaq 0xf(%rip), %rax         # 0x6e998
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_identify_gxlib
static int de_identify_gxlib(deark *c)
{
	UI n;
	u8 has_copyr, has_ver;

	n = (UI)de_getu16be(0);
	if(n!=0x01ca) return 0;
	has_copyr = !dbuf_memcmp(c->infile, 2, "Copyri", 6);
	n = (UI)de_getu16le(52);
	has_ver = (n==100);
	if(has_copyr && has_ver) return 100;
	if(has_copyr || has_ver) return 25;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xef169
cmpl $0x1ca, %eax            # imm = 0x1CA
jne 0x6ea11
movq 0x18(%rbx), %rdi
leaq 0xb75da(%rip), %rdx     # 0x125f9c
movl $0x2, %esi
movl $0x6, %ecx
callq 0xf025e
movl %eax, %ebp
testl %eax, %eax
sete %r15b
movq 0x18(%rbx), %rdi
movl $0x34, %esi
callq 0xef1ca
movl %eax, %eax
cmpq $0x64, %rax
sete %cl
movl $0x64, %r14d
testb %cl, %r15b
jne 0x6ea11
xorl %r14d, %r14d
cmpq $0x64, %rax
movl $0x19, %eax
cmovel %eax, %r14d
testl %ebp, %ebp
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_mdcd
void de_module_mdcd(deark *c, struct deark_module_info *mi)
{
	mi->id = "mdcd";
	mi->desc = "MDCD archive";
	mi->run_fn = de_run_mdcd;
	mi->identify_fn = de_identify_mdcd;
}

// Assembly:
leaq 0xb6fab(%rip), %rax     # 0x1259d1
movq %rax, (%rsi)
leaq 0xb6fa6(%rip), %rax     # 0x1259d6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6ea4b
movq %rax, 0x18(%rsi)
leaq 0x496(%rip), %rax       # 0x6eedc
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/misc3.c
// Function: de_module_cazip
void de_module_cazip(deark *c, struct deark_module_info *mi)
{
	mi->id = "cazip";
	mi->desc = "CAZIP compressed file";
	mi->run_fn = de_run_cazip;
	mi->identify_fn = de_identify_cazip;
}

// Assembly:
leaq 0xb6ada(%rip), %rax     # 0x1259e3
movq %rax, (%rsi)
leaq 0xb6ad6(%rip), %rax     # 0x1259e9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6ef2e
movq %rax, 0x18(%rsi)
leaq 0x151(%rip), %rax       # 0x6f07a
movq %rax, 0x20(%rsi)
retq