LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x11661f(%rip), %rcx    # 0x1b07e6
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x11661d(%rip), %rcx    # 0x1b07f2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x9a200
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xfd(%rip), %rcx        # 0x9a2f0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: de_run_fmtowns_icn
static void de_run_fmtowns_icn(deark *c, de_module_params *mparams)
{
	struct fmtownsicn_ctx *d = NULL;
	u8 b;

	d = de_malloc(c, sizeof(struct fmtownsicn_ctx));
	fmtownsicn_make_palettes(c, d);

	b = de_getbyte(6);
	if(b=='E') {
		do_fmtownsicn_ICNFILE(c, d);
	}
	else if(b=='2') {
		d->is_le = 1;
		do_fmtownsicn_FJ(c, d);
	}
	else if(b=='J') {
		d->is_le = 0;
		do_fmtownsicn_FJ(c, d);
	}
	else {
		d->need_errmsg = 1;
		goto done;
	}

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported file");
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9c970
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x45, %eax
jne 0x9a264
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9c9c0
jmp 0x9a2b8
movzbl -0x19(%rbp), %eax
cmpl $0x32, %eax
jne 0x9a287
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cac0
jmp 0x9a2b6
movzbl -0x19(%rbp), %eax
cmpl $0x4a, %eax
jne 0x9a2aa
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cac0
jmp 0x9a2b4
movq -0x18(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x9a2ba
jmp 0x9a2b6
jmp 0x9a2b8
jmp 0x9a2ba
cmpq $0x0, -0x18(%rbp)
je 0x9a2ea
movq -0x18(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0x9a2dd
movq -0x8(%rbp), %rdi
leaq 0x10a959(%rip), %rsi    # 0x1a4c2f
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xa, %ecx
callq 0x164d10
leaq -0x1a(%rbp), %rdi
leaq 0x11703f(%rip), %rsi    # 0x1b1360
movl $0xa, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x9a339
movl $0x64, -0x4(%rbp)
jmp 0x9a390
leaq -0x1a(%rbp), %rax
movq (%rax), %rax
movabsq $0x20324a462d495243, %rcx # imm = 0x20324A462D495243
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9a361
movl $0x64, -0x4(%rbp)
jmp 0x9a390
leaq -0x1a(%rbp), %rax
movq (%rax), %rax
movabsq $0x494a55462d495243, %rcx # imm = 0x494A55462D495243
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9a389
movl $0x64, -0x4(%rbp)
jmp 0x9a390
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x11644a(%rip), %rcx    # 0x1b0801
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x116448(%rip), %rcx    # 0x1b080d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x9a400
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x25d(%rip), %rcx       # 0x9a640
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x29e(%rip), %rcx       # 0x9a690
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x116150(%rip), %rcx    # 0x1b0827
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x11614b(%rip), %rcx    # 0x1b0830
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x9a720
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ad(%rip), %rcx       # 0x9a8b0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ce(%rip), %rcx       # 0x9a9e0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: de_run_pixfolio
static void de_run_pixfolio(deark *c, de_module_params *mparams)
{
	struct pixfolio_ctx *d = NULL;
	struct pixfolio_item_ctx *md = NULL;
	i64 pos;

	d = de_malloc(c, sizeof(struct pixfolio_ctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);
	d->opt_undelete = (u8)de_get_ext_option_bool(c, "pixfolio:undelete", 0);
	d->tmpstr = ucstring_create(c);

	pos = 0;
	while(1) {
		if(d->fatalerrflag) goto done;
		if(pos+373 > c->infile->len) goto done;
		if(md) {
			pixfolio_item_destroy(c, md);
			md = NULL;
		}
		md = de_malloc(c, sizeof(struct pixfolio_item_ctx));
		md->pos = pos;
		do_pixfolio_item(c, d, md);
		if(md->total_len<=0) goto done;
		pos += md->total_len;
	}

done:
	pixfolio_item_destroy(c, md);
	if(d) {
		if(d->deleted_count!=0 && !d->opt_undelete) {
			de_info(c, "Note: Deleted items found. Use \"-opt pixfolio:undelete\" "
				"to extract them.");
		}
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported file");
		}
		ucstring_destroy(d->tmpstr);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x9, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x116724(%rip), %rsi    # 0x1b0e9b
xorl %edx, %edx
callq 0x15cbc0
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x5(%rax)
je 0x9a7b2
jmp 0x9a838
movq -0x28(%rbp), %rax
addq $0x175, %rax            # imm = 0x175
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x9a7cc
jmp 0x9a838
cmpq $0x0, -0x20(%rbp)
je 0x9a7e8
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x9d3a0
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc0, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x9d3e0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0x9a823
jmp 0x9a838
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x9a7a3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x9d3a0
cmpq $0x0, -0x18(%rbp)
je 0x9a8a8
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x9a872
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4(%rax)
jne 0x9a872
movq -0x8(%rbp), %rdi
leaq 0x116642(%rip), %rsi    # 0x1b0ead
movb $0x0, %al
callq 0x15c0c0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x6(%rax)
je 0x9a88e
movq -0x8(%rbp), %rdi
leaq 0x10a3a8(%rip), %rsi    # 0x1a4c2f
movb $0x0, %al
callq 0x15bfb0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x20, %eax
jge 0x9a8e1
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movq -0x10(%rbp), %rdi
leaq 0x11668b(%rip), %rsi    # 0x1b0f77
callq 0x15d180
cmpl $0x0, %eax
jne 0x9a902
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
movl $0x157, %edx            # imm = 0x157
movl $0x14, %ecx
callq 0x164d10
movzbl -0x2e(%rbp), %eax
cmpl $0x2f, %eax
je 0x9a93b
movzbl -0x2e(%rbp), %eax
cmpl $0x2d, %eax
je 0x9a93b
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movzbl -0x23(%rbp), %eax
cmpl $0x3a, %eax
je 0x9a950
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x171, %esi            # imm = 0x171
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
addq $0x175, %rsi            # imm = 0x175
addq $0x1, %rsi
callq 0x165540
movq %rax, -0x40(%rbp)
cmpq $0x28, -0x40(%rbp)
je 0x9a996
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
addq $0x175, %rsi            # imm = 0x175
addq $0x1, %rsi
addq $0xc, %rsi
callq 0x165280
movq %rax, -0x40(%rbp)
cmpq $0x1, -0x40(%rbp)
je 0x9a9ca
movl $0x0, -0x4(%rbp)
jmp 0x9a9d1
movl $0x50, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x115e1a(%rip), %rcx    # 0x1b0841
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x115e18(%rip), %rcx    # 0x1b084d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x9aa60
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: de_run_apple2icons
static void de_run_apple2icons(deark *c, de_module_params *mparams)
{
	struct a2icons_ctx *d = NULL;
	i64 curpos;
	i64 i;
	// Some colors here are just educated guesses.
	static const u8 dflt_pal[16*3] = {
		0,0,0, 0,0,128, 128,128,0, 128,128,128,
		128,0,0, 128,0,128, 255,128,0, 255,128,128,
		0,128,0, 0,128,128, 128,255,0, 128,255,128,
		192,192,192, 128,128,255, 255,255,128, 255,255,255 };

	d = de_malloc(c, sizeof(struct a2icons_ctx));
	de_copy_palette_from_rgb24(dflt_pal, d->pal, 16);

	d->maskpal[0] = DE_STOCKCOLOR_BLACK;
	for(i=1; i<16; i++) {
		d->maskpal[i] = DE_STOCKCOLOR_WHITE;
	}

	curpos = 26;
	while(1) {
		if(curpos+A2I_GROUP_HDR_SIZE > c->infile->len) goto done;
		d->group_startpos = curpos;
		d->group_len = de_getu16le(curpos);
		if(d->group_len<A2I_GROUP_HDR_SIZE) goto done;
		d->group_endpos = d->group_startpos+d->group_len;
		if(d->group_endpos > c->infile->len) goto done;

		do_a2i_icon_group(c, d);
		curpos = d->group_endpos;
	}

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0xa0, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x1168eb(%rip), %rdi    # 0x1b1380
movl $0x10, %edx
callq 0x1613d0
movq -0x18(%rbp), %rax
movl $0xff000000, 0x40(%rax) # imm = 0xFF000000
movq $0x1, -0x28(%rbp)
cmpq $0x10, -0x28(%rbp)
jge 0x9aad7
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movl $0xffffffff, 0x40(%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x9aab2
movq $0x1a, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x56, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x9aafa
jmp 0x9ab95
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x18(%rbp), %rax
cmpq $0x56, 0x88(%rax)
jge 0x9ab38
jmp 0x9ab95
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x18(%rbp), %rax
addq 0x88(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x9ab74
jmp 0x9ab95
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9da40
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9aadf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x165470
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x165060
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x9ac9e
movq -0x10(%rbp), %rax
movq $0x100, 0x10(%rax)      # imm = 0x100
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: applevol_get_gray_shade
static u8 applevol_get_gray_shade(u8 clr)
{
	switch(clr) {
		// TODO: These gray shades may not be quite right. I can't find good
		// information about them.
	case 0x00: return 0xff;
	case 0xf6: return 0xee;
	case 0xf7: return 0xdd;
	case 0x2a: return 0xcc;
	case 0xf8: return 0xbb;
	case 0xf9: return 0xaa;
	case 0x55: return 0x99;
	case 0xfa: return 0x88;
	case 0xfb: return 0x77;
	case 0x80: return 0x66;
	case 0xfc: return 0x55;
	case 0xfd: return 0x44;
	case 0xab: return 0x33;
	case 0xfe: return 0x22;
	case 0xff: return 0x11;
	case 0xd6: return 0x00;
	}
	return 0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movzbl -0x2(%rbp), %eax
movl %eax, -0x8(%rbp)
testl %eax, %eax
je 0x9ad8f
jmp 0x9accb
movl -0x8(%rbp), %eax
subl $0x2a, %eax
je 0x9ada1
jmp 0x9acd9
movl -0x8(%rbp), %eax
subl $0x55, %eax
je 0x9adb3
jmp 0x9ace7
movl -0x8(%rbp), %eax
subl $0x80, %eax
je 0x9adc5
jmp 0x9acf7
movl -0x8(%rbp), %eax
subl $0xab, %eax
je 0x9add7
jmp 0x9ad07
movl -0x8(%rbp), %eax
subl $0xd6, %eax
je 0x9ade9
jmp 0x9ad17
movl -0x8(%rbp), %eax
subl $0xf6, %eax
je 0x9ad95
jmp 0x9ad23
movl -0x8(%rbp), %eax
subl $0xf7, %eax
je 0x9ad9b
jmp 0x9ad2f
movl -0x8(%rbp), %eax
subl $0xf8, %eax
je 0x9ada7
jmp 0x9ad3b
movl -0x8(%rbp), %eax
subl $0xf9, %eax
je 0x9adad
jmp 0x9ad47
movl -0x8(%rbp), %eax
subl $0xfa, %eax
je 0x9adb9
jmp 0x9ad53
movl -0x8(%rbp), %eax
subl $0xfb, %eax
je 0x9adbf
jmp 0x9ad5f
movl -0x8(%rbp), %eax
subl $0xfc, %eax
je 0x9adcb
jmp 0x9ad6b
movl -0x8(%rbp), %eax
subl $0xfd, %eax
je 0x9add1
jmp 0x9ad77
movl -0x8(%rbp), %eax
subl $0xfe, %eax
je 0x9addd
jmp 0x9ad83
movl -0x8(%rbp), %eax
subl $0xff, %eax
je 0x9ade3
jmp 0x9adef
movb $-0x1, -0x1(%rbp)
jmp 0x9adf3
movb $-0x12, -0x1(%rbp)
jmp 0x9adf3
movb $-0x23, -0x1(%rbp)
jmp 0x9adf3
movb $-0x34, -0x1(%rbp)
jmp 0x9adf3
movb $-0x45, -0x1(%rbp)
jmp 0x9adf3
movb $-0x56, -0x1(%rbp)
jmp 0x9adf3
movb $-0x67, -0x1(%rbp)
jmp 0x9adf3
movb $-0x78, -0x1(%rbp)
jmp 0x9adf3
movb $0x77, -0x1(%rbp)
jmp 0x9adf3
movb $0x66, -0x1(%rbp)
jmp 0x9adf3
movb $0x55, -0x1(%rbp)
jmp 0x9adf3
movb $0x44, -0x1(%rbp)
jmp 0x9adf3
movb $0x33, -0x1(%rbp)
jmp 0x9adf3
movb $0x22, -0x1(%rbp)
jmp 0x9adf3
movb $0x11, -0x1(%rbp)
jmp 0x9adf3
movb $0x0, -0x1(%rbp)
jmp 0x9adf3
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x9b081
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movb 0xc(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x9b0d0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movzbl -0x19(%rbp), %eax
andl $0xf0, %eax
sarl $0x4, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movzbl -0x19(%rbp), %eax
andl $0xf, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: do_fp_art_stdres
static void do_fp_art_stdres(deark *c, struct fp_art_ctx *d, UI fld1)
{
	struct fp_art_stdhdr_data *hd = &d->hd;

	fp_art_read_hdr_std(c, hd, fld1);
	if(!hd->ok) {
		d->need_errmsg = 1;
		goto done;
	}

	de_dbg_dimensions(c, hd->w, hd->h);
	if(!de_good_image_dimensions(c,hd->w, hd->h)) goto done;
	de_convert_and_write_image_bilevel2(c->infile, 8, hd->w, hd->h,
		hd->rowspan, 0, NULL, 0);

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x9b490
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x9b40e
movq -0x10(%rbp), %rax
movb $0x1, 0x21(%rax)
jmp 0x9b486
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x15bba0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0x9b447
jmp 0x9b486
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %r8
movl $0x8, %esi
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x16c000
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x2, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rcx
subq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rcx
subq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jl 0x9b527
movq -0x10(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x9b529
jmp 0x9b554
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xf, %rax
movl $0x10, %ecx
cqto
idivq %rcx
movq %rax, %rcx
shlq %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: fp_art_id_hires
static int fp_art_id_hires(deark *c)
{
	UI n;
	i64 pos = 2;

	n = (UI)de_getu16le_p(&pos); // xres?
	if(n!=300) return 0;
	n = (UI)de_getu16le_p(&pos); // yres?
	if(n!=300) return 0;
	n = (UI)de_getu16le_p(&pos); // width
	if(n<1 || n>8192) return 0;
	n = (UI)de_getu16le_p(&pos); // height
	if(n<1 || n>8192) return 0;
	n = (UI)de_getu16le_p(&pos); // ?
	if(n!=1) return 0;
	return 59;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x2, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x14(%rbp)
cmpl $0x12c, -0x14(%rbp)     # imm = 0x12C
je 0x9b59d
movl $0x0, -0x4(%rbp)
jmp 0x9b648
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x14(%rbp)
cmpl $0x12c, -0x14(%rbp)     # imm = 0x12C
je 0x9b5c6
movl $0x0, -0x4(%rbp)
jmp 0x9b648
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jb 0x9b5e9
cmpl $0x2000, -0x14(%rbp)    # imm = 0x2000
jbe 0x9b5f2
movl $0x0, -0x4(%rbp)
jmp 0x9b648
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jb 0x9b615
cmpl $0x2000, -0x14(%rbp)    # imm = 0x2000
jbe 0x9b61e
movl $0x0, -0x4(%rbp)
jmp 0x9b648
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x9b641
movl $0x0, -0x4(%rbp)
jmp 0x9b648
movl $0x3b, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: fp_art_id_stdres
static int fp_art_id_stdres(deark *c, UI fld1)
{
	struct fp_art_stdhdr_data hd;

	de_zeromem(&hd, sizeof(struct fp_art_stdhdr_data));
	fp_art_read_hdr_std(c, &hd, fld1);
	if(!hd.ok) return 0;
	if(8 + hd.rowspan*hd.h == c->infile->len) {
		return 74;
	}
	if(8 + hd.rowspan*(hd.h+1) == c->infile->len) {
		// e.g. BANNER.ART from v3.0
		return 24;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x19140
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq -0x38(%rbp), %rsi
callq 0x9b490
cmpb $0x0, -0x38(%rbp)
jne 0x9b69e
movl $0x0, -0x4(%rbp)
jmp 0x9b6f4
movq -0x20(%rbp), %rax
imulq -0x28(%rbp), %rax
addq $0x8, %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x9b6c2
movl $0x4a, -0x4(%rbp)
jmp 0x9b6f4
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
imulq %rcx, %rax
addq $0x8, %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x9b6ed
movl $0x18, -0x4(%rbp)
jmp 0x9b6f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x32, -0x28(%rbp)
jge 0x9b837
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
imulq $0xa0, -0x28(%rbp), %rax
addq %rax, %rsi
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %r8
imulq $0x280, -0x28(%rbp), %rax # imm = 0x280
addq %rax, %r8
movl $0x50, %edx
callq 0x166410
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
imulq $0xa0, -0x28(%rbp), %rax
addq %rax, %rsi
addq $0x50, %rsi
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %r8
imulq $0x280, -0x28(%rbp), %rax # imm = 0x280
addq %rax, %r8
addq $0x140, %r8             # imm = 0x140
movl $0x50, %edx
callq 0x166410
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x1f40, %rsi           # imm = 0x1F40
imulq $0xa0, -0x28(%rbp), %rax
addq %rax, %rsi
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %r8
imulq $0x280, -0x28(%rbp), %rax # imm = 0x280
addq %rax, %r8
addq $0xa0, %r8
movl $0x50, %edx
callq 0x166410
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x1f40, %rsi           # imm = 0x1F40
imulq $0xa0, -0x28(%rbp), %rax
addq %rax, %rsi
addq $0x50, %rsi
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %r8
imulq $0x280, -0x28(%rbp), %rax # imm = 0x280
addq %rax, %r8
addq $0x1e0, %r8             # imm = 0x1E0
movl $0x50, %edx
callq 0x166410
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x9b720
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x13(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %ecx
callq 0x164d10
movzbl -0x13(%rbp), %eax
cmpl $0x1b, %eax
jne 0x9b878
movzbl -0x12(%rbp), %eax
cmpl $0x47, %eax
je 0x9b881
movl $0x0, -0x4(%rbp)
jmp 0x9b8ac
movzbl -0x11(%rbp), %eax
cmpl $0x4d, %eax
jne 0x9b893
movl $0x1, -0x4(%rbp)
jmp 0x9b8ac
movzbl -0x11(%rbp), %eax
cmpl $0x48, %eax
jne 0x9b8a5
movl $0x2, -0x4(%rbp)
jmp 0x9b8ac
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x428(%rax)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x9be7a
jmp 0x9bf3e
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jl 0x9be8d
jmp 0x9bf3e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %eax
sarl $0x4, %eax
movb %al, -0x33(%rbp)
movzbl -0x31(%rbp), %eax
andl $0xf, %eax
movb %al, -0x32(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jae 0x9bf39
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jle 0x9bf2c
movl -0x44(%rbp), %eax
movzbl -0x33(%rbp,%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x428(%rcx), %ecx
cmpl %ecx, %eax
jle 0x9bf09
movl -0x44(%rbp), %eax
movb -0x33(%rbp,%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x428(%rax)
movq -0x18(%rbp), %rdi
movl -0x44(%rbp), %eax
movb -0x33(%rbp,%rax), %al
movq -0x40(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x9bf2e
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x9bebc
jmp 0x9be63
movq -0x18(%rbp), %rdi
callq 0x167c30
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: decompress_fastgraph_spr
static void decompress_fastgraph_spr(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 clr;
		i64 count;

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

		clr = de_getbyte_p(&pos);
		count = (i64)de_getbyte_p(&pos);
		if(count>0) {
			if(clr > d->max_color_used) {
				d->max_color_used = clr;
			}
			dbuf_write_run(unc_pixels, clr, count);
		}
		unc_total += count;
	}

	dbuf_flush(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x428(%rax)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x9bf9a
jmp 0x9c021
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jl 0x9bfaa
jmp 0x9c021
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jle 0x9c010
movzbl -0x31(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x428(%rcx), %ecx
cmpl %ecx, %eax
jle 0x9bffd
movb -0x31(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x428(%rax)
movq -0x18(%rbp), %rdi
movb -0x31(%rbp), %al
movq -0x40(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x9bf83
movq -0x18(%rbp), %rdi
callq 0x167c30
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9c409
jmp 0x9c434
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x166830
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: thumbsplus_decompress
static void thumbsplus_decompress(deark *c, struct thumbsplus_ctx *d,
	struct thumbsplus_icon_ctx *md, i64 pos1, i64 len, dbuf *unc_pixels)
{
	i64 endpos = pos1 + len;
	i64 pos = pos1;

	while(1) {
		i64 count;
		u8 val;
		u8 b;

		if(pos >= endpos) break;
		b = de_getbyte_p(&pos);
		if(b>=236) {
			if(b==0xff) {
				count = (i64)de_getbyte_p(&pos);
			}
			else {
				count = (i64)b - 233;
			}
			val = de_getbyte_p(&pos);
			dbuf_write_run(unc_pixels, val, count);
		}
		else {
			dbuf_writebyte(unc_pixels, b);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jl 0x9c8d3
jmp 0x9c960
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165170
movb %al, -0x4a(%rbp)
movzbl -0x4a(%rbp), %eax
cmpl $0xec, %eax
jl 0x9c94e
movzbl -0x4a(%rbp), %eax
cmpl $0xff, %eax
jne 0x9c917
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x48(%rbp)
jmp 0x9c925
movzbl -0x4a(%rbp), %eax
subq $0xe9, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165170
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rdi
movb -0x49(%rbp), %al
movq -0x48(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
jmp 0x9c95b
movq -0x30(%rbp), %rdi
movzbl -0x4a(%rbp), %esi
callq 0x168380
jmp 0x9c8c4
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: do_fmtownsicn_ICNFILE
static void do_fmtownsicn_ICNFILE(deark *c, struct fmtownsicn_ctx *d)
{
	i64 i;
	i64 pos1 = 0;
	i64 pos = pos1;

	de_dbg(c, "header at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);
	pos += 10;
	pos += 2; // version
	d->num_tables = de_getu16le_p(&pos);
	de_dbg(c, "num tables: %u", (UI)d->num_tables);
	de_dbg_indent(c, -1);

	for(i=0; i<d->num_tables; i++) {
		if(d->fatalerrflag) goto done;
		do_fmtownsicn_table(c, d, i, 32+32*i);
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x112374(%rip), %rsi    # 0x1aed63
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x28(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %edx
leaq 0x1142e4(%rip), %rsi    # 0x1b0d31
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x9caae
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x9ca83
jmp 0x9cab0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq $0x20, %rcx
callq 0x9cdc0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9ca6a
jmp 0x9cab0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: hel_apply_frame
static void hel_apply_frame(deark *c, struct hel_ctx *d)
{
	i64 i, j;
	de_color px1, px2;

	for(j=0; j<d->h; j++) {
		for(i=0; i<d->w; i++) {
			px2 = de_bitmap_getpixel(d->frame_data, i, j);
			// If pixel is "white", negate the canvas pixel.
			if(DE_COLOR_K(px2)!=0) {
				de_colorsample s;

				px1 = de_bitmap_getpixel(d->canvas, i, j);
				s = (DE_COLOR_K(px1)==0) ? 0xff : 0;
				de_bitmap_setpixel_gray(d->canvas, i, j, s);
				d->change_flag = 1;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x9d38c
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x9d379
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x16b540
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movzbl %al, %eax
cmpl $0x0, %eax
je 0x9d366
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x16b540
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xff, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movzbl -0x29(%rbp), %ecx
callq 0x16b1c0
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x9d368
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9d2d2
jmp 0x9d37b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x9d2b8
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: pixfolio_check_blank_name
static void pixfolio_check_blank_name(deark *c, struct pixfolio_ctx *d,
	struct pixfolio_item_ctx *md)
{
	size_t k;

	if(!md->basefn_srd) return;
	if(md->basefn_srd->sz_strlen!=12) return;

	for(k=0; k<12; k++) {
		if(md->basefn_srd->sz[k]!=0x20) return;
	}
	md->blank_basefn = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x9d8ed
jmp 0x9d940
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0xc, 0x10(%rax)
je 0x9d8fe
jmp 0x9d940
movq $0x0, -0x20(%rbp)
cmpq $0xc, -0x20(%rbp)
jae 0x9d938
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x9d928
jmp 0x9d940
jmp 0x9d92a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x9d906
movq -0x18(%rbp), %rax
movb $0x1, 0x18(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: read_pixfolio_timestamp
static void read_pixfolio_timestamp(deark *c, struct pixfolio_ctx *d,
	struct pixfolio_item_ctx *md)
{
	de_ucstring *dtstr = NULL;
	de_ucstring *tmstr = NULL;

	dtstr = ucstring_create(c);
	tmstr = ucstring_create(c);

	dbuf_read_to_ucstring(c->infile, md->pos+343, 10, dtstr, DE_CONVFLAG_STOP_AT_NUL,
		DE_ENCODING_LATIN1);
	dbuf_read_to_ucstring(c->infile, md->pos+354, 8, tmstr, DE_CONVFLAG_STOP_AT_NUL,
		DE_ENCODING_LATIN1);
	de_dbg(c, "timestamp: \"%s %s\"", ucstring_getpsz_d(dtstr),
		ucstring_getpsz_d(tmstr));

	// We don't do anything with the timestamp, because:
	// * There are at least 3 different date formats ("MM/DD/YYYY", "DD/MM/YYYY",
	// "MM-DD-YYYY") and seemingly no way to tell which was used.
	// * The time of day seems to be a 12-hour clock with no AM/PM flag.

	ucstring_destroy(tmstr);
	ucstring_destroy(dtstr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x157, %rsi            # imm = 0x157
movq -0x20(%rbp), %rcx
movl $0xa, %edx
movl $0x1, %r8d
movl $0x5, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x162, %rsi            # imm = 0x162
movq -0x28(%rbp), %rcx
movl $0x8, %edx
movl $0x1, %r8d
movl $0x5, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172650
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq %rax, %rcx
leaq 0x113546(%rip), %rsi    # 0x1b0f64
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/misc2.c
// Function: do_a2i_icon_group
static void do_a2i_icon_group(deark *c, struct a2icons_ctx *d)
{
	int saved_indent_level;
	i64 curpos;

	de_dbg_indent_save(c, &saved_indent_level);
	de_dbg(c, "icon group at %"I64_FMT, d->group_startpos);
	de_dbg_indent(c, 1);
	de_dbg(c, "len: %"I64_FMT, d->group_len);

	curpos = d->group_startpos+A2I_GROUP_HDR_SIZE;
	while(1) {
		if(curpos >= d->group_endpos) goto done;
		d->last_icon_len = 0;
		do_a2i_one_icon(c, d, curpos);
		if(d->last_icon_len==0) goto done;
		curpos = curpos + 8 + d->last_icon_len*2;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdx
leaq 0x11353d(%rip), %rsi    # 0x1b0fb0
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdx
leaq 0x133727(%rip), %rsi    # 0x1d11c5
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
addq $0x56, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x90(%rcx), %rax
jl 0x9dacb
jmp 0x9db1a
movq -0x10(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x9db30
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x9dafb
jmp 0x9db1a
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq -0x10(%rbp), %rcx
movq 0x98(%rcx), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x9dab8
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x15b5a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x113639(%rip), %rcx    # 0x1b13b0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x113634(%rip), %rcx    # 0x1b13b9
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x9ddb0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x2cd(%rip), %rcx       # 0x9e070
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1136ef(%rip), %rsi    # 0x1b1776
callq 0x15d180
cmpl $0x0, %eax
jne 0x9e09a
movl $0x0, -0x4(%rbp)
jmp 0x9e0f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jl 0x9e0c0
cmpq $0xffff, -0x18(%rbp)    # imm = 0xFFFF
jle 0x9e0c9
movl $0x0, -0x4(%rbp)
jmp 0x9e0f3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1b, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x2, %eax
jle 0x9e0ec
movl $0x0, -0x4(%rbp)
jmp 0x9e0f3
movl $0x19, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1132b1(%rip), %rcx    # 0x1b13c8
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1132a7(%rip), %rcx    # 0x1b13cc
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x3c(%rip), %rcx        # 0x9e170
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x2dd(%rip), %rcx       # 0x9e420
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x3ce(%rip), %rcx       # 0x9e520
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa1220
cmpl $0x0, %eax
jne 0x9e446
movl $0x0, -0x4(%rbp)
jmp 0x9e50f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x1b, %rsi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x1b, -0x18(%rbp)
jl 0x9e480
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x9e48c
movl $0x0, -0x4(%rbp)
jmp 0x9e50f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x19, %rsi
callq 0x165060
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0x1e, %eax
jge 0x9e4be
movl $0x0, -0x4(%rbp)
jmp 0x9e50f
movq -0x10(%rbp), %rdi
leaq 0x112eff(%rip), %rsi    # 0x1b13c8
callq 0x15d180
movl %eax, -0x1c(%rbp)
cmpq $0x1b, -0x18(%rbp)
jne 0x9e4f9
movzbl -0x1d(%rbp), %eax
cmpl $0x22, %eax
jne 0x9e4f9
cmpl $0x0, -0x1c(%rbp)
je 0x9e4f0
movl $0x64, -0x4(%rbp)
jmp 0x9e50f
movl $0x3c, -0x4(%rbp)
jmp 0x9e50f
cmpl $0x0, -0x1c(%rbp)
je 0x9e508
movl $0xa, -0x4(%rbp)
jmp 0x9e50f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x112e7c(%rip), %rcx    # 0x1b13e3
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x112e77(%rip), %rcx    # 0x1b13ec
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x9e5a0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fd(%rip), %rcx       # 0x9e790
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)