LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_identify_fp_art
static int de_identify_fp_art(deark *c)
{
	UI fld1;

	if(!de_input_file_has_ext(c, "art")) return 0;
	fld1 = (UI)de_getu16le(0);
	if(fld1==0xffff) {
		return fp_art_id_hires(c);
	}
	return fp_art_id_stdres(c, fld1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0xc86e8(%rip), %rsi     # 0x130c24
callq 0xea491
testl %eax, %eax
je 0x685e4
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xeebc8
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x685e8
movq %rsp, %rsi
movq $0x2, (%rsi)
movq 0x18(%r14), %rdi
callq 0xeebeb
xorl %ebx, %ebx
cmpl $0x12c, %eax            # imm = 0x12C
jne 0x68649
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
cmpl $0x12c, %eax            # imm = 0x12C
jne 0x68649
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
addl $0xffffdfff, %eax       # imm = 0xFFFFDFFF
cmpl $0xffffe000, %eax       # imm = 0xFFFFE000
jb 0x68649
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
addl $0xffffdfff, %eax       # imm = 0xFFFFDFFF
cmpl $0xffffe000, %eax       # imm = 0xFFFFE000
jb 0x68649
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
xorl %ecx, %ecx
cmpl $0x1, %eax
movl $0x3b, %ebx
jmp 0x68646
xorl %ebx, %ebx
jmp 0x68649
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x6cded
cmpb $0x0, (%r15)
je 0x68649
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rax, %rsi
imulq %rcx, %rsi
addq $0x8, %rsi
movq 0x18(%r14), %rdx
movq 0x18(%rdx), %rdx
movl $0x4a, %ebx
cmpq %rdx, %rsi
je 0x68649
incq %rax
imulq %rcx, %rax
addq $0x8, %rax
xorl %ecx, %ecx
cmpq %rdx, %rax
movl $0x18, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_ybm
void de_module_ybm(deark *c, struct deark_module_info *mi)
{
	mi->id = "ybm";
	mi->desc = "Bennet Yee's face format, a.k.a. YBM";
	mi->run_fn = de_run_ybm;
	mi->identify_fn = de_identify_ybm;
}

// Assembly:
leaq 0xbcabd(%rip), %rax     # 0x125119
movq %rax, (%rsi)
leaq 0xbcab7(%rip), %rax     # 0x12511d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x68681
movq %rax, 0x18(%rsi)
leaq 0x186(%rip), %rax       # 0x68802
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_run_ybm
static void de_run_ybm(deark *c, de_module_params *mparams)
{
	de_bitmap *img = NULL;
	i64 npwidth, pdwidth, height;
	i64 i, j;
	i64 words_per_row;
	i64 pos;

	pos = 2;
	npwidth = de_getu16be_p(&pos);
	height = de_getu16be_p(&pos);
	de_dbg_dimensions(c, npwidth, height);
	if(!de_good_image_dimensions(c, npwidth, height)) goto done;
	pdwidth = de_pad_to_n(npwidth, 16);
	words_per_row = pdwidth/16;

	img = de_bitmap_create2(c, npwidth, pdwidth, height, 1);

	for(j=0; j<height; j++) {
		for(i=0; i<words_per_row; i++) {
			u8 x;

			// This encoding is unusual: LSB-first 16-bit integers.
			x = de_getbyte_p(&pos);
			de_unpack_pixels_bilevel_from_byte(img, i*16+8, j, x, 8,
				DE_CVTF_WHITEISZERO|DE_CVTF_LSBFIRST|DE_CVTF_ONLYWHITE);
			x = de_getbyte_p(&pos);
			de_unpack_pixels_bilevel_from_byte(img, i*16, j, x, 8,
				DE_CVTF_WHITEISZERO|DE_CVTF_LSBFIRST|DE_CVTF_ONLYWHITE);
		}
	}
	de_bitmap_write_to_file(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
movq $0x2, (%r15)
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe8f88
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x687e9
movl $0x10, %esi
movq %r14, %rdi
callq 0xe9cb4
leaq 0xf(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
movq %rcx, (%rsp)
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, 0x20(%rsp)
movq %rax, %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0xf26a5
movq %rax, 0x8(%rsp)
testq %r12, %r12
jle 0x687d6
sarq $0x4, (%rsp)
xorl %r15d, %r15d
leaq 0x30(%rsp), %rbx
movq %r12, 0x10(%rsp)
movq 0x18(%rsp), %r13
cmpq $0x10, 0x20(%rsp)
jl 0x687c5
movl $0x8, %r14d
movq (%rsp), %rbp
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xeeb4b
leaq -0x8(%r14), %rcx
movq %rcx, 0x28(%rsp)
movzbl %al, %ecx
movq %r15, %r12
movq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x8, %r8d
movl $0x7, %r9d
callq 0xf292a
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xeeb4b
movzbl %al, %ecx
movq %r15, %rdi
movq %r12, %r15
movq 0x28(%rsp), %rsi
movq %r12, %rdx
movl $0x8, %r8d
movl $0x7, %r9d
callq 0xf292a
addq $0x10, %r14
decq %rbp
jne 0x68754
incq %r15
movq 0x10(%rsp), %r12
cmpq %r12, %r15
jne 0x68742
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
jmp 0x687eb
xorl %ebx, %ebx
movq %rbx, %rdi
callq 0xf228d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_identify_ybm
static int de_identify_ybm(deark *c)
{
	i64 width, height;
	i64 rowspan;

	if(dbuf_memcmp(c->infile, 0, "!!", 2))
		return 0;
	width = de_getu16be(2);
	height = de_getu16be(4);
	rowspan = ((width+15)/16)*2;
	if(6+height*rowspan == c->infile->len)
		return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0xb1be3(%rip), %rdx     # 0x11a3f7
xorl %r14d, %r14d
movl $0x2, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x68879
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeeb67
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeeb67
leaq 0xf(%r14), %rcx
addq $0x1e, %r14
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x4, %r14
imulq %rax, %r14
leaq 0x6(,%r14,2), %rax
movq 0x18(%rbx), %rcx
xorl %edx, %edx
cmpq 0x18(%rcx), %rax
movl $0x64, %r14d
cmovnel %edx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_olpc565
void de_module_olpc565(deark *c, struct deark_module_info *mi)
{
	mi->id = "olpc565";
	mi->desc = "OLPC .565 firmware icon";
	mi->run_fn = de_run_olpc565;
	mi->identify_fn = de_identify_olpc565;
}

// Assembly:
leaq 0xbc8b7(%rip), %rax     # 0x125142
movq %rax, (%rsi)
leaq 0xbc8b5(%rip), %rax     # 0x12514a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x688b0
movq %rax, 0x18(%rsi)
leaq 0x141(%rip), %rax       # 0x689ec
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_run_olpc565
static void de_run_olpc565(deark *c, de_module_params *mparams)
{
	de_bitmap *img = NULL;
	i64 width, height;
	i64 i, j;
	i64 rowspan;
	u8 b0, b1;
	u32 clr;

	width = de_getu16le(4);
	height = de_getu16le(6);
	if(!de_good_image_dimensions(c, width, height)) goto done;
	rowspan = width*2;

	img = de_bitmap_create(c, width, height, 3);

	for(j=0; j<height; j++) {
		for(i=0; i<width; i++) {
			b0 = de_getbyte(8 + j*rowspan + i*2);
			b1 = de_getbyte(8 + j*rowspan + i*2 + 1);
			clr = (((u32)b1)<<8) | b0;
			clr = de_rgb565_to_888(clr);
			de_bitmap_setpixel_rgb(img, i, j, clr);
		}
	}
	de_bitmap_write_to_file(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl $0x4, %esi
callq 0xeebc8
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xeebc8
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x689d3
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r12
testq %r15, %r15
jle 0x689c5
leaq (%r14,%r14), %rax
movq %rax, 0x8(%rsp)
movl $0x9, %eax
movq %rax, (%rsp)
xorl %r13d, %r13d
movq %r15, 0x10(%rsp)
movq 0x18(%rsp), %rbx
testq %r14, %r14
jle 0x689a7
movq (%rsp), %rbp
xorl %r15d, %r15d
movq %r13, 0x20(%rsp)
movq 0x18(%rbx), %rdi
leaq -0x1(%rbp), %rsi
callq 0xeead3
movq %r12, %r13
movq %r14, %r12
movl %eax, %r14d
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xeead3
movzbl %al, %eax
shll $0x8, %eax
movzbl %r14b, %edi
movq %r12, %r14
movq %r13, %r12
movq 0x20(%rsp), %r13
orl %eax, %edi
callq 0xec844
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %eax, %ecx
callq 0xf24ba
incq %r15
addq $0x2, %rbp
cmpq %r15, %r14
jne 0x6894d
incq %r13
movq (%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %r15
cmpq %r15, %r13
jne 0x6893c
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
jmp 0x689d6
xorl %r12d, %r12d
movq %r12, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_iim
void de_module_iim(deark *c, struct deark_module_info *mi)
{
	mi->id = "iim";
	mi->desc = "InShape IIM";
	mi->run_fn = de_run_iim;
	mi->identify_fn = de_identify_iim;
}

// Assembly:
leaq 0xbc749(%rip), %rax     # 0x125162
movq %rax, (%rsi)
leaq 0xbc743(%rip), %rax     # 0x125166
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x68a3e
movq %rax, 0x18(%rsi)
leaq 0x143(%rip), %rax       # 0x68b7c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_run_iim
static void de_run_iim(deark *c, de_module_params *mparams)
{
	de_bitmap *img = NULL;
	i64 width, height;
	i64 i, j;
	i64 n, bpp;
	i64 rowspan;
	u32 clr;

	// This code is based on reverse engineering, and may be incorrect.

	n = de_getu16be(8); // Unknown field
	bpp = de_getu16be(10);
	if(n!=4 || bpp!=24) {
		de_dbg(c, "This type of IIM image is not supported");
		goto done;
	}
	width = de_getu16be(12);
	height = de_getu16be(14);
	if(!de_good_image_dimensions(c, width, height)) goto done;
	rowspan = width*3;

	img = de_bitmap_create(c, width, height, 3);

	for(j=0; j<height; j++) {
		for(i=0; i<width; i++) {
			clr = dbuf_getRGB(c->infile, 16+j*rowspan+i*3, 0);
			de_bitmap_setpixel_rgb(img, i, j, clr);
		}
	}
	de_bitmap_write_to_file(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl $0x8, %esi
callq 0xeeb67
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xeeb67
cmpq $0x4, %r14
jne 0x68b4d
cmpq $0x18, %rax
jne 0x68b4d
movq 0x18(%rbx), %rdi
movl $0xc, %esi
callq 0xeeb67
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0xe, %esi
callq 0xeeb67
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x68b63
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r15
testq %r12, %r12
jle 0x68b3f
leaq (%r14,%r14,2), %rax
movq %rax, 0x8(%rsp)
movl $0x10, %eax
movq %rax, (%rsp)
xorl %r13d, %r13d
movq %r12, 0x10(%rsp)
testq %r14, %r14
jle 0x68b25
movq (%rsp), %rbp
xorl %r12d, %r12d
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xef42f
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl %eax, %ecx
callq 0xf24ba
incq %r12
addq $0x3, %rbp
cmpq %r12, %r14
jne 0x68afb
incq %r13
movq (%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %r12
cmpq %r12, %r13
jne 0x68aef
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
jmp 0x68b66
leaq 0xbc93d(%rip), %rsi     # 0x125491
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x68b66
xorl %r15d, %r15d
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_pm_xv
void de_module_pm_xv(deark *c, struct deark_module_info *mi)
{
	mi->id = "pm_xv";
	mi->desc = "PM (XV)";
	mi->run_fn = de_run_pm_xv;
	mi->identify_fn = de_identify_pm_xv;
}

// Assembly:
leaq 0xbc5c9(%rip), %rax     # 0x125172
movq %rax, (%rsi)
leaq 0xbc5c5(%rip), %rax     # 0x125178
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x68bce
movq %rax, 0x18(%rsi)
leaq 0x262(%rip), %rax       # 0x68e2b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_crg
void de_module_crg(deark *c, struct deark_module_info *mi)
{
	mi->id = "crg";
	mi->desc = "Calamus Raster Graphic";
	mi->run_fn = de_run_crg;
	mi->identify_fn = de_identify_crg;
}

// Assembly:
leaq 0xbc2f8(%rip), %rax     # 0x125180
movq %rax, (%rsi)
leaq 0xbc2f2(%rip), %rax     # 0x125184
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x68ead
movq %rax, 0x18(%rsi)
leaq 0x1c0(%rip), %rax       # 0x69068
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_farbfeld
void de_module_farbfeld(deark *c, struct deark_module_info *mi)
{
	mi->id = "farbfeld";
	mi->desc = "farbfeld image";
	mi->run_fn = de_run_farbfeld;
	mi->identify_fn = de_identify_farbfeld;
}

// Assembly:
leaq 0xbc106(%rip), %rax     # 0x12519b
movq %rax, (%rsi)
leaq 0xbc105(%rip), %rax     # 0x1251a4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x690ba
movq %rax, 0x18(%rsi)
leaq 0x1ed(%rip), %rax       # 0x692a2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_hsiraw
void de_module_hsiraw(deark *c, struct deark_module_info *mi)
{
	mi->id = "hsiraw";
	mi->desc = "HSI Raw";
	mi->run_fn = de_run_hsiraw;
	mi->identify_fn = de_identify_hsiraw;
}

// Assembly:
leaq 0xbbee4(%rip), %rax     # 0x1251b3
movq %rax, (%rsi)
leaq 0xbbee1(%rip), %rax     # 0x1251ba
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x692f4
movq %rax, 0x18(%rsi)
leaq 0x295(%rip), %rax       # 0x69584
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_qdv
void de_module_qdv(deark *c, struct deark_module_info *mi)
{
	mi->id = "qdv";
	mi->desc = "QDV (Giffer)";
	mi->run_fn = de_run_qdv;
	mi->identify_fn = de_identify_qdv;
}

// Assembly:
leaq 0xbbc11(%rip), %rax     # 0x1251c2
movq %rax, (%rsi)
leaq 0xbbc0b(%rip), %rax     # 0x1251c6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x695d6
movq %rax, 0x18(%rsi)
leaq 0x120(%rip), %rax       # 0x696f1
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_run_qdv
static void de_run_qdv(deark *c, de_module_params *mparams)
{
	i64 w, h;
	i64 num_pal_colors;
	i64 pos;
	de_bitmap *img = NULL;
	de_color pal[256];

	// Warning: This decoder is based on reverse engineering, and may be
	// incorrect or incomplete.

	w = de_getu16be(0);
	h = de_getu16be(2);
	de_dbg_dimensions(c, w, h);
	if(!de_good_image_dimensions(c, w, h)) goto done;

	num_pal_colors = 1 + (i64)de_getbyte(4);
	de_dbg(c, "number of palette colors: %d", (int)num_pal_colors);

	pos = 5;
	de_read_simple_palette(c, c->infile, pos, num_pal_colors, 3, pal, 256,
		DE_RDPALTYPE_24BIT, DE_RDPALFLAG_INITPAL);
	pos += 3*num_pal_colors;

	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(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
callq 0xeeb67
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeeb67
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe8f88
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x696d7
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeead3
movzbl %al, %ebp
leaq 0x1(%rbp), %r12
leaq 0xa7d77(%rip), %rsi     # 0x1113c3
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rsi
subq $0x8, %rsp
leaq 0x8(%rsp), %r13
movl $0x5, %edx
movl $0x3, %r8d
movq %rbx, %rdi
movq %r12, %rcx
movq %r13, %r9
pushq $0x10
pushq $0x1
pushq $0x100                  # imm = 0x100
callq 0xf2cb1
addq $0x20, %rsp
leaq 0x8(%rbp,%rbp,2), %rbp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r12
movq 0x18(%rbx), %rdi
subq $0x8, %rsp
movl $0x8, %edx
movq %rbp, %rsi
movq %r14, %rcx
movq %r13, %r8
movq %rax, %r9
pushq $0x0
callq 0xf2f79
addq $0x10, %rsp
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq %r12, %rdi
callq 0xf228d
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_identify_qdv
static int de_identify_qdv(deark *c)
{
	i64 w, h;
	i64 num_pal_colors;

	w = de_getu16be(0);
	h = de_getu16be(2);
	num_pal_colors = 1 + (i64)de_getbyte(4);
	if(5+num_pal_colors*3+w*h != c->infile->len)
		return 0;
	if(de_input_file_has_ext(c, "qdv"))
		return 100;
	return 30;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeeb67
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeeb67
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeead3
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
imulq %r15, %r12
addq %r12, %rax
addq $0x8, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x69768
leaq 0xbba73(%rip), %rsi     # 0x1251c2
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x1e, %eax
movl $0x64, %r14d
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_module_vitec
void de_module_vitec(deark *c, struct deark_module_info *mi)
{
	mi->id = "vitec";
	mi->desc = "VITec image format";
	mi->run_fn = de_run_vitec;
	mi->identify_fn = de_identify_vitec;
}

// Assembly:
leaq 0xbba55(%rip), %rax     # 0x1251d3
movq %rax, (%rsi)
leaq 0xbba51(%rip), %rax     # 0x1251d9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x697a3
movq %rax, 0x18(%rsi)
leaq 0x281(%rip), %rax       # 0x69a1f
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbb7a0(%rip), %rax     # 0x1251ec
movq %rax, (%rsi)
leaq 0xbb79a(%rip), %rax     # 0x1251f0
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x69a71
movq %rax, 0x18(%rsi)
leaq 0x4c(%rip), %rax        # 0x69ab8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbb6f4(%rip), %rax     # 0x125200
movq %rax, (%rsi)
leaq 0xbb6f5(%rip), %rax     # 0x12520b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x69b31
movq %rax, 0x18(%rsi)
leaq 0x201(%rip), %rax       # 0x69d2d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbb4cb(%rip), %rsi     # 0x125207
callq 0xea491
testl %eax, %eax
je 0x69d92
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xeebc8
movq %rax, %r15
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xeebc8
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 0x69d94
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbb473(%rip), %rax     # 0x125216
movq %rax, (%rsi)
leaq 0xbb476(%rip), %rax     # 0x125223
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x69dc8
movq %rax, 0x18(%rsi)
leaq 0x157(%rip), %rax       # 0x69f1a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x16, 0x8(%rsp)
leaq 0xc4a2b(%rip), %rsi     # 0x12e810
movl $0x16, %edx
xorl %eax, %eax
callq 0xe8617
leaq 0x10(%rsp), %rcx
movl $0x10, %r8d
movl $0x14, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0xec55a
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r14
xorl %edx, %edx
cmpq $0x6b56, %r14           # imm = 0x6B56
setne %dl
leaq 0xce3a4(%rip), %rsi     # 0x1381cc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0x6b56, %r14           # imm = 0x6B56
je 0x69ea0
movl $0x6b40, %esi           # imm = 0x6B40
movq %rbx, %rdi
movl $0x1, %edx
callq 0xf09c5
movq %rax, %r14
movq 0x18(%rbx), %rdi
cmpq $0x17, 0x18(%rdi)
jl 0x69eb6
leaq 0x8(%rsp), %r15
cmpq $0x6b3f, 0x18(%r14)     # imm = 0x6B3F
jg 0x69eb6
movq %r15, %rsi
callq 0xeeb4b
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
movzbl %bpl, %esi
movq %r14, %rdi
callq 0xf0eba
movq 0x8(%rsp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jl 0x69e60
jmp 0x69eb6
movq 0x18(%rbx), %rdi
movl $0x16, %esi
movl $0x6b40, %edx           # imm = 0x6B40
callq 0xf1388
movq %rax, %r14
movl $0x138, %esi            # imm = 0x138
movl $0xb0, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
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 0xf2f79
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq %r14, %rdi
callq 0xf052b
movq %rbx, %rdi
callq 0xf228d
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbb2f1(%rip), %rax     # 0x125238
movq %rax, (%rsi)
leaq 0xbb2f1(%rip), %rax     # 0x125242
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x69f77
movq %rax, 0x18(%rsi)
leaq 0x1c0(%rip), %rax       # 0x6a127
movq %rax, 0x20(%rsi)
leaq 0x248(%rip), %rax       # 0x6a1ba
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6a1b2
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeeb67
cmpq $0x1f1f, %rax           # imm = 0x1F1F
jne 0x6a1b2
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeead3
movl %eax, %ebp
leaq 0xbb0d6(%rip), %rsi     # 0x12523e
movq %rbx, %rdi
callq 0xea491
movb $0x1, %dl
testl %eax, %eax
jne 0x6a18a
leaq 0xbb578(%rip), %rsi     # 0x1256f5
movq %rbx, %rdi
callq 0xea491
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_O3/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 0xbb083(%rip), %rax     # 0x125252
movq %rax, (%rsi)
leaq 0xbb086(%rip), %rax     # 0x12525f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a1f4
movq %rax, 0x18(%rsi)
leaq 0x169(%rip), %rax       # 0x6a358
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeebeb
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeebeb
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe8f88
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf1db1
xorl %ebp, %ebp
testl %eax, %eax
je 0x6a330
leaq 0x8(%rsp), %r13
addq $0x6, (%r13)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeed83
leaq 0xbb4b4(%rip), %rsi     # 0x125729
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
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 0xf2cb1
addq $0x20, %rsp
addq $0x300, (%r13)          # imm = 0x300
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movl $0x1, 0x78(%rax)
movaps 0xa9005(%rip), %xmm0    # 0x1132e0
movups %xmm0, 0x80(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0xf266a
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 0xf2f79
addq $0x10, %rsp
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf22d0
movq %r15, %rbp
jmp 0x6a333
xorl %r12d, %r12d
movq %r12, %rdi
callq 0xf228d
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xea50e
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeebc8
cmpq $0x9119, %rax           # imm = 0x9119
jne 0x6a3d2
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xeead3
cmpb $0x8, %al
jne 0x6a3d2
movq 0x18(%rbx), %rdi
movl $0xb, %esi
callq 0xeead3
testb %al, %al
jne 0x6a3d2
leaq 0xcbdc5(%rip), %rsi     # 0x136165
movq %rbx, %rdi
callq 0xea491
movl $0x64, %r14d
testl %eax, %eax
jne 0x6a3d2
leaq 0xbae4e(%rip), %rsi     # 0x125207
movq %rbx, %rdi
callq 0xea491
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_O3/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 0xbae95(%rip), %rax     # 0x125279
movq %rax, (%rsi)
leaq 0xbae8f(%rip), %rax     # 0x12527d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a409
movq %rax, 0x18(%rsi)
leaq 0x12a(%rip), %rax       # 0x6a52e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf09c5
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x6ce7b
movl $0x3e80, %edx           # imm = 0x3E80
movl $0x50, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6ce7b
movl $0x7d08, %edx           # imm = 0x7D08
movl $0x7d00, %ecx           # imm = 0x7D00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6ce7b
movl $0xbb88, %edx           # imm = 0xBB88
movl $0x7d50, %ecx           # imm = 0x7D50
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6ce7b
leaq 0x10(%rsp), %r12
movl $0x4, %r8d
movl $0xa, %edi
movl $0x1, %esi
xorl %edx, %edx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0xec55a
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movl $0x280, %esi            # imm = 0x280
movl $0x190, %edx            # imm = 0x190
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
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 0xf2f79
movl $0x1, 0x78(%r15)
movaps 0xa8df0(%rip), %xmm0    # 0x1132e0
movups %xmm0, 0x80(%r15)
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf22d0
movq %r14, %rdi
callq 0xf052b
movq %r13, %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea50e
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $0xfa08, 0x18(%rax)     # imm = 0xFA08
jl 0x6a5b1
movq %rdi, %r14
leaq 0xbad2d(%rip), %rsi     # 0x125279
callq 0xea491
movq 0x18(%r14), %rdi
testl %eax, %eax
je 0x6a588
leaq 0xba6e0(%rip), %rdx     # 0x124c40
movl $0x7d00, %esi           # imm = 0x7D00
movl $0x8, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x6a5b1
movq 0x18(%r14), %rax
movl $0x64, %ebx
cmpq $0xfa08, 0x18(%rax)     # imm = 0xFA08
jne 0x6a5ac
jmp 0x6a5b1
cmpq $0xfa08, 0x18(%rdi)     # imm = 0xFA08
jne 0x6a5b1
leaq 0xba6a7(%rip), %rdx     # 0x124c40
movl $0x7d00, %esi           # imm = 0x7D00
movl $0x8, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x6a5b1
movl $0x14, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbacca(%rip), %rax     # 0x12528c
movq %rax, (%rsi)
leaq 0xbaccb(%rip), %rax     # 0x125297
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a5e7
movq %rax, 0x18(%rsi)
leaq 0x23c(%rip), %rax       # 0x6a81e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbaa6b(%rip), %rax     # 0x1252a6
movq %rax, (%rsi)
leaq 0xbaa6c(%rip), %rax     # 0x1252b1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6a860
movq %rax, 0x18(%rsi)
leaq 0x2b8(%rip), %rax       # 0x6ab13
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xeead3
cmpb $0x52, %al
je 0x6ab50
movzbl %al, %eax
cmpl $0x42, %eax
jne 0x6ac49
leaq 0xdb4b1(%rip), %rsi     # 0x145fed
movq %rbx, %rdi
callq 0xea491
movb $0x1, %bpl
testl %eax, %eax
jne 0x6ab6e
jmp 0x6ac49
leaq 0xba73c(%rip), %rsi     # 0x125293
movq %rbx, %rdi
callq 0xea491
xorl %ebp, %ebp
movl $0x0, %ecx
testl %eax, %eax
je 0x6ac4b
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0xeebc8
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x3, %esi
callq 0xeebc8
testb %bpl, %bpl
je 0x6abb3
cmpq $0x258, %r14            # imm = 0x258
setge %cl
cmpq $0x259, %rax            # imm = 0x259
setge %al
orb %cl, %al
movl $0x0, %ecx
je 0x6abd0
jmp 0x6ac4b
cmpq %rax, %r14
jne 0x6ac49
cmpq $0x48, %r14
je 0x6abd0
movl $0x0, %ecx
cmpq $0x12c, %r14            # imm = 0x12C
jne 0x6ac4b
movq 0x18(%rbx), %rdi
movl $0x5, %esi
callq 0xeebc8
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x7, %esi
callq 0xeebc8
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, %bpl
xorl %edx, %edx
testb %sil, %sil
movl $0xc, %ecx
cmovel %edx, %ecx
cmpb $0x1, %bpl
jne 0x6ac4b
imulq %r14, %rax
addq $0x9, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
movl $0x4b, %eax
cmovel %eax, %edx
movl %edx, %ecx
jmp 0x6ac4b
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xba672(%rip), %rax     # 0x1252cb
movq %rax, (%rsi)
leaq 0xba676(%rip), %rax     # 0x1252d9
movq %rax, 0x8(%rsi)
leaq 0x1f(%rip), %rax        # 0x6ac8d
movq %rax, 0x18(%rsi)
leaq 0xcc(%rip), %rax        # 0x6ad45
movq %rax, 0x20(%rsi)
leaq 0xe7(%rip), %rax        # 0x6ad6b
movq %rax, 0x28(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r14
movb $0x0, (%rax)
movq 0x18(%rbx), %rdi
leaq 0xb9f99(%rip), %rdx     # 0x124c49
movl $0xa, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x6ad2a
movq 0x18(%rbx), %rdi
movl $0x12, %esi
callq 0xeead3
movzbl %al, %r15d
shll $0x8, %r15d
movq 0x18(%rbx), %rdi
movl $0x10, %esi
callq 0xeead3
movzbl %al, %eax
addq %r15, %rax
incq %rax
movq %rax, 0x8(%r14)
movq 0x18(%rbx), %rdi
movl $0x16, %esi
callq 0xeead3
movzbl %al, %r15d
shll $0x8, %r15d
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xeead3
movzbl %al, %eax
addq %r15, %rax
incq %rax
movq %rax, 0x10(%r14)
movq $0x1a, 0x18(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6cf8c
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/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 0xba551(%rip), %rax     # 0x1252e7
movq %rax, (%rsi)
leaq 0xba555(%rip), %rax     # 0x1252f5
movq %rax, 0x8(%rsi)
leaq 0x1c(%rip), %rax        # 0x6adc7
movq %rax, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
leaq 0x3d(%rip), %rax        # 0x6adfb
movq %rax, 0x28(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r14
movb $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6cf8c
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/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 0xba4dd(%rip), %rax     # 0x125303
movq %rax, (%rsi)
leaq 0xba4e1(%rip), %rax     # 0x125311
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6ae4b
movq %rax, 0x18(%rsi)
leaq 0x1e3(%rip), %rax       # 0x6b029
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc2.c
// Function: de_identify_yp
static int de_identify_yp(deark *c)
{
	if(has_yp_sig(c)) {
		if(de_input_file_has_ext(c, "yp")) return 100;
		return 75;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0xb9c19(%rip), %rdx     # 0x124c54
xorl %r14d, %r14d
movl $0x9, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x6b06e
leaq 0xba85d(%rip), %rsi     # 0x1258b2
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x4b, %eax
movl $0x64, %r14d
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xba2a3(%rip), %rax     # 0x125323
movq %rax, (%rsi)
leaq 0xba2a5(%rip), %rax     # 0x12532f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b0a5
movq %rax, 0x18(%rsi)
leaq 0x3c3(%rip), %rax       # 0x6b463
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb0552(%rip), %rdx     # 0x11b9c7
xorl %ebx, %ebx
movl $0x2, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x6b4be
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%r14), %rdi
movl $0x3, %esi
callq 0xeead3
testb %al, %al
jne 0x6b4be
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_O3/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 0xb9e7f(%rip), %rax     # 0x12534b
movq %rax, (%rsi)
leaq 0xb9e80(%rip), %rax     # 0x125356
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b4f1
movq %rax, 0x18(%rsi)
leaq 0x494(%rip), %rax       # 0x6b980
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb99d2(%rip), %rax     # 0x125376
movq %rax, (%rsi)
leaq 0xb99d4(%rip), %rax     # 0x125382
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6b9c9
movq %rax, 0x18(%rsi)
leaq 0x508(%rip), %rax       # 0x6becc
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xee8d4
movabsq $0x454c49464e4349, %rcx # imm = 0x454C49464E4349
xorq (%rbx), %rcx
movzwl 0x8(%rbx), %edx
xorq $0x1a00, %rdx           # imm = 0x1A00
movl $0x64, %eax
orq %rcx, %rdx
je 0x6bf35
movabsq $0x20324a462d495243, %rcx # imm = 0x20324A462D495243
cmpq %rcx, 0x6(%rsp)
je 0x6bf35
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_O3/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 0xb944f(%rip), %rax     # 0x125391
movq %rax, (%rsi)
leaq 0xb9451(%rip), %rax     # 0x12539d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6bf72
movq %rax, 0x18(%rsi)
leaq 0x219(%rip), %rax       # 0x6c17b
movq %rax, 0x20(%rsi)
leaq 0x234(%rip), %rax       # 0x6c1a1
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb9201(%rip), %rax     # 0x1253b7
movq %rax, (%rsi)
leaq 0xb9200(%rip), %rax     # 0x1253c0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6c1e6
movq %rax, 0x18(%rsi)
leaq 0x5b1(%rip), %rax       # 0x6c787
movq %rax, 0x20(%rsi)
leaq 0x658(%rip), %rax       # 0x6c839
movq %rax, 0x28(%rsi)
retq