LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/amigaicon.c
// Function: glowdata_decompress
static void glowdata_decompress(dbuf *f, i64 pos, i64 len,
	dbuf *outf, UI bits_per_pixel)
{
	i64 x;
	i64 i;
	u8 b, b2;
	struct de_bitreader bitrd;

	de_zeromem(&bitrd, sizeof(struct de_bitreader));
	bitrd.f = f;
	bitrd.curpos = pos;
	bitrd.endpos = pos + len;
	bitrd.bbll.is_lsb = 0;
	de_bitbuf_lowlevel_empty(&bitrd.bbll);

	while(1) {
		b = (u8)de_bitreader_getbits(&bitrd, 8);
		if(bitrd.eof_flag) break;

		if(b<=127) {
			// 1+b literal pixels
			x = 1+(i64)b;
			for(i=0; i<x; i++) {
				b2 = (u8)de_bitreader_getbits(&bitrd, bits_per_pixel);
				dbuf_writebyte(outf, b2);
			}
		}
		else if(b>=129) {
			// 257-b repeated pixels
			x = 257 - (i64)b;
			b2 = (u8)de_bitreader_getbits(&bitrd, bits_per_pixel);
			for(i=0; i<x; i++) {
				dbuf_writebyte(outf, b2);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %r8d, %ebx
movq %rcx, %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movups %xmm0, -0x8(%rax)
movq $0x0, 0x8(%rax)
movq %rdi, -0x20(%rax)
movq %rsi, -0x18(%rax)
addq %rsi, %rdx
movq %rdx, -0x10(%rax)
movq %rax, %rdi
callq 0xf1bdd
movq %rsp, %r15
movq %r15, %rdi
movl $0x8, %esi
callq 0xf1bed
cmpb $0x0, 0x18(%r15)
jne 0x1c602
movq %rsp, %r15
movzbl %al, %ecx
cmpl $0x7f, %ecx
ja 0x1c5bf
movzbl %al, %r12d
incq %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0xf1bed
movzbl %al, %esi
movq %r14, %rdi
callq 0xf0bd6
decq %r12
jne 0x1c5a3
jmp 0x1c5ee
cmpl $0x80, %ecx
je 0x1c5ee
movzbl %al, %r12d
movq %r15, %rdi
movl %ebx, %esi
callq 0xf1bed
addq $-0x101, %r12           # imm = 0xFEFF
movzbl %al, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0xf0bd6
incq %r12
jne 0x1c5df
movq %r15, %rdi
movl $0x8, %esi
callq 0xf1bed
cmpb $0x0, 0x18(%rsp)
je 0x1c594
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: de_module_ansiart
void de_module_ansiart(deark *c, struct deark_module_info *mi)
{
	mi->id = "ansiart";
	mi->id_alias[0] = "ansi";
	mi->desc = "ANSI Art character graphics";
	mi->run_fn = de_run_ansiart;
	mi->identify_fn = de_identify_ansiart;
	mi->help_fn = de_help_ansiart;
}

// Assembly:
leaq 0xf5549(%rip), %rax     # 0x111b60
movq %rax, (%rsi)
leaq 0xf40d9(%rip), %rax     # 0x1106fa
movq %rax, 0x38(%rsi)
leaq 0xf553c(%rip), %rax     # 0x111b68
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x1c652
movq %rax, 0x18(%rsi)
leaq 0x1245(%rip), %rax      # 0x1d887
movq %rax, 0x20(%rsi)
leaq 0x1309(%rip), %rax      # 0x1d956
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: de_identify_ansiart
static int de_identify_ansiart(deark *c)
{
	u8 buf[4];
	int has_ans_ext;

	if(!c->detection_data->SAUCE_detection_attempted) {
		de_err(c, "ansiart detection requires sauce module");
		return 0;
	}

	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "\x04\x31\x2e\x34", 4)) {
		// Looks like iCEDraw format, which may use the same SAUCE identifiers
		// as ANSI Art, even though it is incompatible.
		return 0;
	}

	has_ans_ext = de_input_file_has_ext(c, "ans");

	if(c->detection_data->sauce.has_SAUCE) {
		if(c->detection_data->sauce.data_type==1 &&
			c->detection_data->sauce.file_type==1)
		{
			// Unfortunately, iCEDraw and possibly other formats may use the
			// same SAUCE identifiers as ANSI Art, so we probably shouldn't always
			// return 100.
			if(has_ans_ext)
				return 100;
			return 91;
		}
	}

	// ANSI Art files usually start with an ANSI escape sequence.
	// TODO: Another possibility is that the file could start with email headers.
	if(buf[0]==0x1b && buf[1]==0x5b && (buf[2]=='?' ||
		(buf[2]>='0' && buf[2]<='9')))
	{
		return has_ans_ext ? 100 : 50;
	}

	if(has_ans_ext)
		return 10;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x28(%rdi), %rax
cmpb $0x0, 0x5(%rax)
je 0x1d8f8
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
leaq 0xc(%rsp), %r15
movl $0x4, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xee8d4
cmpl $0x342e3104, (%r15)     # imm = 0x342E3104
je 0x1d94a
leaq 0x11e658(%rip), %rsi    # 0x13bf23
movq %r14, %rdi
callq 0xea491
movq 0x28(%r14), %rcx
cmpb $0x0, 0x10(%rcx)
je 0x1d90d
cmpb $0x1, 0x11(%rcx)
jne 0x1d90d
cmpb $0x1, 0x12(%rcx)
jne 0x1d90d
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,8), %ebx
addl $0x5b, %ebx
jmp 0x1d94a
leaq 0xf4552(%rip), %rsi     # 0x111e51
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x1d94a
cmpb $0x1b, 0xc(%rsp)
jne 0x1d940
cmpb $0x5b, 0xd(%rsp)
jne 0x1d940
movb 0xe(%rsp), %cl
cmpb $0x3f, %cl
setne %dl
addb $-0x30, %cl
cmpb $0xa, %cl
setae %cl
testb %cl, %dl
jne 0x1d940
testl %eax, %eax
movl $0x32, %eax
movl $0x64, %ebx
jmp 0x1d947
testl %eax, %eax
movl $0xa, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: de_help_ansiart
static void de_help_ansiart(deark *c)
{
	de_msg(c, "-opt ansiart:no24bitcolor : Disable extended colors");
	de_msg(c, "-opt ansiart:noblink : Disable blinking characters");
	de_msg(c, "-opt ansiart:vt100 : Use VT100 mode");
	de_msg(c, "-opt char:output=image : Write an image file instead of HTML");
	de_msg(c, " -opt char:charwidth=<8|9> : Width of a character cell");
	de_msg(c, "-opt char:width=<n> : Number of characters per row");
	// TODO: SAUCE help is relevant to more formats than this one.
	de_msg(c, "-opt sauce:combinecomments=1 : Don't put line breaks between comments");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xf451d(%rip), %rsi     # 0x111e7e
xorl %eax, %eax
callq 0xe9461
leaq 0xf4543(%rip), %rsi     # 0x111eb2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xf4565(%rip), %rsi     # 0x111ee5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xf4578(%rip), %rsi     # 0x111f09
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xf45a4(%rip), %rsi     # 0x111f46
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xf45ca(%rip), %rsi     # 0x111f7d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xf45ec(%rip), %rsi     # 0x111fb0
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0xe9461
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: get_cell_at
static struct de_char_cell *get_cell_at(deark *c, struct de_char_screen *screen,
	i64 xpos, i64 ypos)
{
	i64 i;
	struct de_char_cell *cell;

	if(xpos<0 || ypos<0) return NULL;
	if(xpos>=screen->width || ypos>=MAX_ROWS) return NULL;
	if(!screen->cell_rows[ypos]) {
		screen->cell_rows[ypos] = de_mallocarray(c, screen->width, sizeof(struct de_char_cell));
		for(i=0; i<screen->width; i++) {
			// Initialize each new cell
			cell = &screen->cell_rows[ypos][i];
			init_cell(c, cell);
		}
	}
	return &(screen->cell_rows[ypos][xpos]);
}

// Assembly:
movq %rcx, %rax
orq %rdx, %rax
js 0x1da00
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq (%rsi), %rsi
cmpq %rdx, %rsi
setle %al
cmpq $0x1388, %rcx           # imm = 0x1388
setge %cl
orb %al, %cl
je 0x1da03
xorl %eax, %eax
jmp 0x1da50
xorl %eax, %eax
retq
movq 0x10(%r15), %rax
movq (%rax,%r14,8), %rax
testq %rax, %rax
jne 0x1da48
movl $0x14, %edx
callq 0xe96f7
movq 0x10(%r15), %rcx
movq %rax, (%rcx,%r14,8)
movq (%r15), %rcx
movq 0x10(%r15), %rax
movq (%rax,%r14,8), %rax
testq %rcx, %rcx
jle 0x1da48
movaps 0xf4007(%rip), %xmm0    # 0x111a40
movq %rax, %rdx
movups %xmm0, (%rdx)
addq $0x14, %rdx
decq %rcx
jne 0x1da3c
leaq (%rbx,%rbx,4), %rcx
leaq (%rax,%rcx,4), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: do_code_H
static void do_code_H(deark *c, lctx *d)
{
	i64 row, col;

	parse_params(c, d, 1, 0);

	if(d->parse_results.num_params>=1) row = d->parse_results.params[0];
	else row = 1;

	if(d->parse_results.num_params>=2) col = d->parse_results.params[1];
	else col = 1;

	d->xpos = col-1;
	d->ypos = row-1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x1, %esi
xorl %edx, %edx
callq 0x1daa8
movl 0x120(%rbx), %ecx
movl $0x0, %eax
testl %ecx, %ecx
jle 0x1da98
movq 0x128(%rbx), %r14
decq %r14
cmpl $0x1, %ecx
jne 0x1da8e
xorl %eax, %eax
jmp 0x1da98
movq 0x130(%rbx), %rax
decq %rax
movq %rax, 0x28(%rbx)
movq %r14, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: parse_params
static void parse_params(deark *c, lctx *d, i64 default_val, i64 offset)
{
	i64 buf_len;
	i64 ppos;
	i64 param_len;
	char *p_ptr;
	int last_param = 0;

	d->parse_results.num_params = 0;

	buf_len = de_strlen((const char*)d->param_string_buf);

	ppos = offset;
	while(1) {
		if(d->parse_results.num_params >= MAX_ESC_PARAMS) {
			break;
		}

		p_ptr = de_strchr((const char*)&d->param_string_buf[ppos], ';');
		if(p_ptr) {
			param_len = p_ptr - (char*)&d->param_string_buf[ppos];
		}
		else {
			param_len = buf_len - ppos;
			last_param = 1;
		}

		if(param_len>=1) {
			d->parse_results.params[d->parse_results.num_params] = de_atoi64((const char*)&d->param_string_buf[ppos]);
		}
		else {
			d->parse_results.params[d->parse_results.num_params] = default_val;
		}
		d->parse_results.num_params++;

		if(last_param) {
			break;
		}

		// Advance past the parameter data and the terminating semicolon.
		ppos += param_len + 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movl $0x0, 0x120(%rdi)
addq $0xb8, %rdi
movq %rdi, 0x8(%rsp)
callq 0x180e0
movq %rax, %r13
movq 0x8(%rsp), %rax
leaq (%rax,%rbx), %r14
movq %r14, %rdi
movl $0x3b, %esi
callq 0xe82ee
movq %rax, %r12
movq %rax, %rbp
subq %r14, %rbp
movq %r13, %rcx
subq %rbx, %rcx
testq %rax, %rax
cmovneq %rbp, %rcx
movq 0x10(%rsp), %rax
testq %rcx, %rcx
jle 0x1db1d
movq %r14, %rdi
callq 0xe9c2f
movslq 0x120(%r15), %rcx
leal 0x1(%rcx), %edx
movq %rax, 0x128(%r15,%rcx,8)
movl %edx, 0x120(%r15)
testq %r12, %r12
je 0x1db46
addq %rbp, %rbx
incq %rbx
cmpl $0xf, %ecx
jl 0x1dadf
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ar.c
// Function: de_module_ar
void de_module_ar(deark *c, struct deark_module_info *mi)
{
	mi->id = "ar";
	mi->desc = "ar archive";
	mi->run_fn = de_run_ar;
	mi->identify_fn = de_identify_ar;
}

// Assembly:
leaq 0x1019ee(%rip), %rax    # 0x11f54d
movq %rax, (%rsi)
leaq 0x11dfb2(%rip), %rax    # 0x13bb1b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1db84
movq %rax, 0x18(%rsi)
leaq 0x4bf(%rip), %rax       # 0x1e03e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: de_module_asf
void de_module_asf(deark *c, struct deark_module_info *mi)
{
	mi->id = "asf";
	mi->desc = "ASF, WMV, WMA";
	mi->run_fn = de_run_asf;
	mi->identify_fn = de_identify_asf;
}

// Assembly:
leaq 0xf407d(%rip), %rax     # 0x1120e8
movq %rax, (%rsi)
leaq 0xf4077(%rip), %rax     # 0x1120ec
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1e090
movq %rax, 0x18(%rsi)
leaq 0x4e(%rip), %rax        # 0x1e0d9
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: read_and_render_guid
static void read_and_render_guid(dbuf *f, u8 *id, i64 pos,
	char *id_string, size_t id_string_len)
{
	dbuf_read(f, id, pos, 16);
	fmtutil_guid_to_uuid(id);
	if(id_string) {
		fmtutil_render_uuid(f->c, id, id_string, id_string_len);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x10, %ecx
callq 0xee8d4
movq %r14, %rdi
callq 0xf814b
testq %rbx, %rbx
je 0x1e40d
movq 0x8(%r15), %rdi
movl $0x32, %ecx
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xf808d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: handler_Header
static void handler_Header(deark *c, lctx *d, struct handler_params *hp)
{
	i64 numhdrobj;

	if(hp->dlen<6) return;
	numhdrobj = de_getu32le(hp->dpos);
	de_dbg(c, "number of header objects: %u", (unsigned int)numhdrobj);
	do_object_sequence(c, d, hp->dpos+6, hp->dlen-6, hp->level+1, 1, numhdrobj);
}

// Assembly:
cmpq $0x6, 0x18(%rdx)
jl 0x1e486
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x10(%rdx), %rsi
callq 0xeed61
movq %rax, %r12
leaq 0xf3f77(%rip), %rsi     # 0x1123b9
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
addq $0x6, %rdx
addq $-0x6, %rcx
movl 0x20(%r15), %r8d
incl %r8d
movq %r12, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %r9d
callq 0x1e0ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: handler_HeaderExtension
static void handler_HeaderExtension(deark *c, lctx *d, struct handler_params *hp)
{
	i64 datasize;

	if(hp->dlen<22) return;
	datasize = de_getu32le(hp->dpos+18);
	de_dbg(c, "extension data size: %u", (unsigned int)datasize);
	if(datasize > hp->dlen-22) datasize = hp->dlen-22;
	do_object_sequence(c, d, hp->dpos+22, datasize, hp->level+1, 0, 0);
}

// Assembly:
cmpq $0x16, 0x18(%rdx)
jl 0x1e9ae
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x10(%rdx), %rsi
addq $0x12, %rsi
callq 0xeed61
movq %rax, %r12
leaq 0xf3ca1(%rip), %rsi     # 0x112603
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r15), %rcx
addq $-0x16, %rcx
cmpq %rcx, %r12
cmovlq %r12, %rcx
movq 0x10(%r15), %rdx
addq $0x16, %rdx
movl 0x20(%r15), %r8d
incl %r8d
movq $0x0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0x1e0ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: handler_ContentDescr
static void handler_ContentDescr(deark *c, lctx *d, struct handler_params *hp)
{
	i64 lengths[5];
	const char *names[5] = { "title", "author", "copyright",
		"description", "rating" };
	de_ucstring *s = NULL;
	i64 pos = hp->dpos;
	size_t k;

	if(hp->dlen<10) return;

	for(k=0; k<5; k++) {
		lengths[k] = de_getu16le_p(&pos);
	}

	s = ucstring_create(c);
	for(k=0; k<5; k++) {
		if(pos+lengths[k] > hp->dpos+hp->dlen) break;
		ucstring_empty(s);
		dbuf_read_to_ucstring_n(c->infile, pos, lengths[k], DE_DBG_MAX_STRLEN*2, s,
			0, DE_ENCODING_UTF16LE);
		ucstring_truncate_at_NUL(s);
		de_dbg(c, "%s: \"%s\"", names[k], ucstring_getpsz_d(s));
		pos += lengths[k];
	}

	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x10(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq $0xa, 0x18(%rdx)
jl 0x1eff4
movq %rdx, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeebeb
movq %rax, 0x10(%rsp,%r12,8)
incq %r12
cmpq $0x5, %r12
jne 0x1ef2f
movq %r14, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x8(%rsp), %rax
xorl %r12d, %r12d
movq 0x10(%rsp,%r12,2), %r13
addq %r13, %rax
movq 0x18(%rbx), %rcx
addq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jg 0x1efec
movq %r15, %rdi
callq 0xf6423
movq 0x18(%r14), %rdi
movq 0x8(%rsp), %rsi
movl $0x3, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r13, %rdx
movq %r15, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r15, %rdi
callq 0xf6461
leaq 0xf3aa9(%rip), %rax     # 0x112a54
movslq (%r12,%rax), %rbp
addq %rax, %rbp
movq %r15, %rdi
callq 0xf70f6
movq %r14, %rdi
leaq 0x10d166(%rip), %rsi    # 0x12c12a
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
addq 0x8(%rsp), %r13
movq %r13, 0x8(%rsp)
addq $0x4, %r12
movq %r13, %rax
cmpq $0x14, %r12
jne 0x1ef5c
movq %r15, %rdi
callq 0xf6753
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/asf.c
// Function: handler_LanguageList
static void handler_LanguageList(deark *c, lctx *d, struct handler_params *hp)
{
	i64 pos = hp->dpos;
	i64 nlangs;
	i64 k;
	de_ucstring *s = NULL;

	if(hp->dlen<2) goto done;

	nlangs = de_getu16le_p(&pos);
	de_dbg(c, "language id record count: %d", (int)nlangs);

	s = ucstring_create(c);

	for(k=0; k<nlangs; k++) {
		i64 id_len;

		if(pos+1 > hp->dpos+hp->dlen) goto done;
		de_dbg(c, "language id record[%d] at %"I64_FMT, (int)k, pos);
		de_dbg_indent(c, 1);

		id_len = (i64)de_getbyte_p(&pos);

		ucstring_empty(s);
		dbuf_read_to_ucstring_n(c->infile, pos, id_len, DE_DBG_MAX_STRLEN*2, s,
			0, DE_ENCODING_UTF16LE);
		ucstring_truncate_at_NUL(s);
		de_dbg(c, "id: \"%s\"", ucstring_getpsz_d(s));
		pos += id_len;

		de_dbg_indent(c, -1);
	}

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rsp)
cmpq $0x2, 0x18(%rdx)
jge 0x1fa3c
xorl %r12d, %r12d
jmp 0x1fb32
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeebeb
movq %rax, %r15
leaq 0xf2fbe(%rip), %rsi     # 0x112a18
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
callq 0xf6410
movq %rax, %r12
testq %r15, %r15
jle 0x1fb32
xorl %ebp, %ebp
movq 0x10(%rsp), %rcx
movq 0x18(%rbx), %rax
addq 0x10(%rbx), %rax
cmpq %rax, %rcx
jge 0x1fb32
movq %r14, %rdi
leaq 0xf2f98(%rip), %rsi     # 0x112a35
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
movzbl %al, %r13d
movq %r12, %rdi
callq 0xf6423
movq 0x18(%r14), %rdi
movq 0x10(%rsp), %rsi
movl $0x3, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r13, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r12, %rdi
callq 0xf6461
movq %r12, %rdi
callq 0xf70f6
movq %r14, %rdi
leaq 0x10e127(%rip), %rsi    # 0x12dc31
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq %r13, 0x10(%rsp)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
cmpq %rbp, %r15
jne 0x1fa7d
movq %r12, %rdi
callq 0xf6753
addq $0x18, %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/asf.c
// Function: format_date
static char *format_date(i64 t_FILETIME, char *buf, size_t buf_len)
{
	struct de_timestamp timestamp;

	if(t_FILETIME==0) {
		de_strlcpy(buf, "unknown", buf_len);
	}
	else {
		de_FILETIME_to_timestamp(t_FILETIME, &timestamp, 0x1);
		de_timestamp_to_string(&timestamp, buf, buf_len, 0);
	}
	return buf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1fb7e
leaq 0x8(%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq 0xea829
movl $0x40, %edx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeaf46
jmp 0x1fb92
leaq 0xf2917(%rip), %rsi     # 0x11249c
movl $0x40, %edx
movq %rbx, %rdi
callq 0xe8219
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: do_ECD_ID3
static void do_ECD_ID3(deark *c, lctx *d, i64 pos, i64 len)
{
	de_dbg(c, "ID3 data at %"I64_FMT", len=%"I64_FMT, pos, len);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "id3", "I", c->infile, pos, len);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xf2960(%rip), %rsi     # 0x1127bd
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rcx
leaq 0xf2954(%rip), %rsi     # 0x1127d6
leaq 0x111073(%rip), %rdx    # 0x130efc
movq %r15, %rdi
movq %r14, %r8
movq %rbx, %r9
callq 0xe9b13
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/asf.c
// Function: do_ECD_WMPicture
static void do_ECD_WMPicture(deark *c, lctx *d, i64 pos, i64 len)
{
	de_dbg(c, "WM/Picture data at %"I64_FMT", len=%"I64_FMT, pos, len);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "id3", "P", c->infile, pos, len);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xf291c(%rip), %rsi     # 0x1127da
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rcx
leaq 0xf28f3(%rip), %rsi     # 0x1127d6
leaq 0x103dc4(%rip), %rdx    # 0x123cae
movq %r15, %rdi
movq %r14, %r8
movq %rbx, %r9
callq 0xe9b13
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0xe8a15
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-dsk.c
// Function: de_module_atari_cas
void de_module_atari_cas(deark *c, struct deark_module_info *mi)
{
	mi->id = "cas";
	mi->desc = "Atari CAS tape image";
	mi->run_fn = de_run_cas;
	mi->identify_fn = de_identify_cas;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
leaq 0xf2b66(%rip), %rax     # 0x112a79
movq %rax, (%rsi)
leaq 0xf2b60(%rip), %rax     # 0x112a7d
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x1ff3c
movq %rax, 0x18(%rsi)
leaq 0xaf(%rip), %rax        # 0x1ffe2
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-dsk.c
// Function: de_module_atr
void de_module_atr(deark *c, struct deark_module_info *mi)
{
	mi->id = "atr";
	mi->desc = "ATR Atari floppy disk image";
	mi->run_fn = de_run_atr;
	mi->identify_fn = de_identify_atr;
}

// Assembly:
leaq 0xf2a72(%rip), %rax     # 0x112a92
movq %rax, (%rsi)
leaq 0xf2a6c(%rip), %rax     # 0x112a96
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x20045
movq %rax, 0x18(%rsi)
leaq 0x516(%rip), %rax       # 0x20556
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-dsk.c
// Function: de_module_msa
void de_module_msa(deark *c, struct deark_module_info *mi)
{
	mi->id = "msa";
	mi->desc = "MSA - Atari ST floppy disk image";
	mi->run_fn = de_run_msa;
	mi->identify_fn = de_identify_msa;
	mi->help_fn = de_help_msa;
}

// Assembly:
leaq 0xf26c2(%rip), %rax     # 0x112c5c
movq %rax, (%rsi)
leaq 0xf250e(%rip), %rax     # 0x112ab2
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x205ca
movq %rax, 0x18(%rsi)
leaq 0x5f6(%rip), %rax       # 0x20bb0
movq %rax, 0x20(%rsi)
leaq 0x633(%rip), %rax       # 0x20bf8
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-dsk.c
// Function: de_identify_msa
static int de_identify_msa(deark *c)
{
	i64 sig;
	int has_ext;

	sig = de_getu16be(0);
	if(sig != 0x0e0f) return 0;
	has_ext = de_input_file_has_ext(c, "msa");
	if(has_ext) return 100;
	return 45;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeeb67
cmpq $0xe0f, %rax            # imm = 0xE0F
jne 0x20bed
leaq 0xf2088(%rip), %rsi     # 0x112c5c
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x2d, %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/atari-dsk.c
// Function: de_module_pasti
void de_module_pasti(deark *c, struct deark_module_info *mi)
{
	mi->id = "pasti";
	mi->desc = "Pasti - Atari ST floppy disk image";
	mi->run_fn = de_run_pasti;
	mi->identify_fn = de_identify_pasti;
	mi->help_fn = de_help_pasti;
}

// Assembly:
leaq 0xf1eb0(%rip), %rax     # 0x112ad3
movq %rax, (%rsi)
leaq 0xf1eac(%rip), %rax     # 0x112ad9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x20c53
movq %rax, 0x18(%rsi)
leaq 0x947(%rip), %rax       # 0x2158a
movq %rax, 0x20(%rsi)
leaq 0x962(%rip), %rax       # 0x215b0
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_degas
void de_module_degas(deark *c, struct deark_module_info *mi)
{
	mi->id = "degas";
	mi->desc = "Atari DEGAS or DEGAS Elite image";
	mi->run_fn = de_run_degas;
	mi->identify_fn = de_identify_degas;
	mi->help_fn = de_help_degas;
}

// Assembly:
leaq 0xf1e29(%rip), %rax     # 0x1133f0
movq %rax, (%rsi)
leaq 0xf1e25(%rip), %rax     # 0x1133f6
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x215f7
movq %rax, 0x18(%rsi)
leaq 0x510(%rip), %rax       # 0x21af7
movq %rax, 0x20(%rsi)
leaq 0x5a3(%rip), %rax       # 0x21b95
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_identify_degas
static int de_identify_degas(deark *c)
{
	static const char *exts[6] = {"pi1", "pi2", "pi3", "pc1", "pc2", "pc3" };
	i64 i;
	int flag;
	i64 sig;

	flag = 0;
	for(i=0; i<6; i++) {
		if(de_input_file_has_ext(c, exts[i])) {
			flag = 1;
			break;
		}
	}
	if(!flag) return 0;

	sig = de_getu16be(0);
	if(sig==0x0000 || sig==0x0001 || sig==0x0002) {
		if(c->infile->len==32034) return 100; // DEGAS
		if(c->infile->len==32066) return 100; // DEGAS Elite
		if(c->infile->len==32128) return 40; // Could be padded to a multiple of 128 bytes
		if(c->infile->len>16000) return 10;
	}
	else if(sig==0x8000 || sig==0x8001 || sig==0x8002) {
		return 60;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0xf1833(%rip), %r15     # 0x11333c
movslq (%r14,%r15), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
jne 0x21b28
addq $0x4, %r14
cmpq $0x18, %r14
jne 0x21b09
jmp 0x21b7d
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeeb67
cmpq $0x2, %rax
ja 0x21b68
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movl $0x64, %eax
cmpq $0x7d22, %rcx           # imm = 0x7D22
je 0x21b7f
cmpq $0x7d42, %rcx           # imm = 0x7D42
je 0x21b7f
cmpq $0x7d80, %rcx           # imm = 0x7D80
jne 0x21b85
movl $0x28, %eax
jmp 0x21b7f
movq %rax, %rcx
addq $-0x8000, %rcx          # imm = 0x8000
movl $0x3c, %eax
cmpq $0x3, %rcx
jb 0x21b7f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0xa, %eax
cmpq $0x3e80, %rcx           # imm = 0x3E80
jle 0x21b7d
jmp 0x21b7f
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_prismpaint
void de_module_prismpaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "prismpaint";
	mi->desc = "Atari Prism Paint .PNT, a.k.a. TruePaint .TPI";
	mi->run_fn = de_run_prismpaint;
	mi->identify_fn = de_identify_prismpaint;
}

// Assembly:
leaq 0xf1860(%rip), %rax     # 0x113417
movq %rax, (%rsi)
leaq 0xf1861(%rip), %rax     # 0x113422
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x21bdc
movq %rax, 0x18(%rsi)
leaq 0x4b2(%rip), %rax       # 0x22089
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_ftc
void de_module_ftc(deark *c, struct deark_module_info *mi)
{
	mi->id = "ftc";
	mi->desc = "Atari Falcon True Color .FTC";
	mi->run_fn = de_run_ftc;
	mi->identify_fn = de_identify_ftc;
}

// Assembly:
leaq 0xf139a(%rip), %rax     # 0x113450
movq %rax, (%rsi)
leaq 0xf1394(%rip), %rax     # 0x113454
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x220db
movq %rax, 0x18(%rsi)
leaq 0xb1(%rip), %rax        # 0x22187
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_run_ftc
static void de_run_ftc(deark *c, de_module_params *mparams)
{
	struct atari_img_decode_data *adata = NULL;
	de_finfo *fi = NULL;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->bpp = 16;
	adata->w = 384;
	adata->h = 240;
	adata->unc_pixels = c->infile;
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fi = de_finfo_create(c);
	fi->density.code = DE_DENSITY_UNK_UNITS;
	fi->density.xdens = 288;
	fi->density.ydens = 240;
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file_finfo(adata->img, fi, 0);
	de_bitmap_destroy(adata->img);
	de_finfo_destroy(c, fi);
	de_free(c, adata);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
movq $0x10, (%rax)
movq $0x180, 0x10(%rax)      # imm = 0x180
movq $0xf0, 0x18(%rax)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%r14)
movl $0x180, %esi            # imm = 0x180
movl $0xf0, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movl $0x1, 0x78(%rax)
movaps 0xf113d(%rip), %xmm0    # 0x113280
movups %xmm0, 0x80(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf22d0
movq 0x38(%r14), %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea50e
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/atari-img.c
// Function: de_module_eggpaint
void de_module_eggpaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "eggpaint";
	mi->desc = "Atari EggPaint .TRP";
	mi->run_fn = de_run_eggpaint;
	mi->identify_fn = de_identify_eggpaint;
}

// Assembly:
leaq 0xf12b5(%rip), %rax     # 0x113471
movq %rax, (%rsi)
leaq 0xf12b4(%rip), %rax     # 0x11347a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x221e1
movq %rax, 0x18(%rsi)
leaq 0xf5(%rip), %rax        # 0x222d1
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_run_eggpaint
static void de_run_eggpaint(deark *c, de_module_params *mparams)
{
	struct atari_img_decode_data *adata = NULL;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));

	if(!dbuf_memcmp(c->infile, 0, "tru?", 4)) {
		de_declare_fmt(c, "Spooky Sprites");
	}
	else {
		de_declare_fmt(c, "EggPaint");
	}

	adata->bpp = 16;
	adata->w = de_getu16be(4);
	adata->h = de_getu16be(6);
	de_dbg_dimensions(c, adata->w, adata->h);
	adata->unc_pixels = dbuf_open_input_subfile(c->infile, 8, c->infile->len-8);
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file(adata->img, NULL, 0);

	dbuf_close(adata->unc_pixels);
	de_bitmap_destroy(adata->img);
	de_free(c, adata);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0xf16f3(%rip), %rdx     # 0x1138f3
movl $0x4, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
leaq 0xf16e3(%rip), %rax     # 0x1138f8
leaq 0xf16eb(%rip), %rsi     # 0x113907
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0xeb125
movq $0x10, (%r14)
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeeb67
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xeeb67
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe8f88
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
addq $-0x8, %rdx
movl $0x8, %esi
callq 0xf1388
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq 0x20(%r14), %rdi
callq 0xf052b
movq 0x38(%r14), %rdi
callq 0xf228d
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/atari-img.c
// Function: de_module_indypaint
void de_module_indypaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "indypaint";
	mi->desc = "Atari IndyPaint .TRU";
	mi->run_fn = de_run_indypaint;
	mi->identify_fn = de_identify_indypaint;
}

// Assembly:
leaq 0xf1160(%rip), %rax     # 0x11348e
movq %rax, (%rsi)
leaq 0xf1160(%rip), %rax     # 0x113498
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x22353
movq %rax, 0x18(%rsi)
leaq 0xc5(%rip), %rax        # 0x22413
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_run_indypaint
static void de_run_indypaint(deark *c, de_module_params *mparams)
{
	struct atari_img_decode_data *adata = NULL;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->bpp = 16;
	adata->w = de_getu16be(4);
	adata->h = de_getu16be(6);
	de_dbg_dimensions(c, adata->w, adata->h);
	adata->unc_pixels = dbuf_open_input_subfile(c->infile, 256, c->infile->len-256);
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file(adata->img, NULL, 0);

	dbuf_close(adata->unc_pixels);
	de_bitmap_destroy(adata->img);
	de_free(c, adata);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
movq $0x10, (%rax)
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeeb67
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xeeb67
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe8f88
movq 0x18(%rbx), %rdi
movq $-0x100, %rdx
addq 0x18(%rdi), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0xf1388
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq 0x20(%r14), %rdi
callq 0xf052b
movq 0x38(%r14), %rdi
callq 0xf228d
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/atari-img.c
// Function: de_module_godpaint
void de_module_godpaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "godpaint";
	mi->desc = "Atari Falcon GodPaint";
	mi->run_fn = de_run_godpaint;
	mi->identify_fn = de_identify_godpaint;
}

// Assembly:
leaq 0xf106d(%rip), %rax     # 0x1134ad
movq %rax, (%rsi)
leaq 0xf106c(%rip), %rax     # 0x1134b6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x22465
movq %rax, 0x18(%rsi)
leaq 0xc2(%rip), %rax        # 0x22522
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_run_godpaint
static void de_run_godpaint(deark *c, de_module_params *mparams)
{
	struct atari_img_decode_data *adata = NULL;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->bpp = 16;
	adata->w = de_getu16be(2);
	adata->h = de_getu16be(4);
	de_dbg_dimensions(c, adata->w, adata->h);
	adata->unc_pixels = dbuf_open_input_subfile(c->infile, 6, c->infile->len-6);
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file(adata->img, NULL, 0);

	dbuf_close(adata->unc_pixels);
	de_bitmap_destroy(adata->img);
	de_free(c, adata);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
movq $0x10, (%rax)
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeeb67
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeeb67
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe8f88
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
addq $-0x6, %rdx
movl $0x6, %esi
callq 0xf1388
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq 0x20(%r14), %rdi
callq 0xf052b
movq 0x38(%r14), %rdi
callq 0xf228d
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/atari-img.c
// Function: de_identify_godpaint
static int de_identify_godpaint(deark *c)
{
	i64 sig;

	sig = de_getu16be(0);
	if(sig!=0x4734 && sig!=0x0400) return 0;
	if(de_input_file_has_ext(c, "god")) return 100;
	if(sig==0x4734) return 5;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeeb67
movq %rax, %rbx
cmpq $0x4734, %rax           # imm = 0x4734
je 0x2254c
cmpq $0x400, %rbx            # imm = 0x400
jne 0x22575
leaq 0xf13c7(%rip), %rsi     # 0x11391a
movq %r15, %rdi
callq 0xea491
movl $0x64, %r14d
testl %eax, %eax
jne 0x22575
xorl %eax, %eax
cmpq $0x4734, %rbx           # imm = 0x4734
sete %al
leal (%rax,%rax,4), %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_tinystuff
void de_module_tinystuff(deark *c, struct deark_module_info *mi)
{
	mi->id = "tinystuff";
	mi->desc = "Atari Tiny Stuff, a.k.a. Tiny image format";
	mi->run_fn = de_run_tinystuff;
	mi->identify_fn = de_identify_tinystuff;
	mi->help_fn = de_help_tinystuff;
}

// Assembly:
leaq 0xf0f47(%rip), %rax     # 0x1134cc
movq %rax, (%rsi)
leaq 0xf0f47(%rip), %rax     # 0x1134d6
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x225b5
movq %rax, 0x18(%rsi)
leaq 0x653(%rip), %rax       # 0x22bf8
movq %rax, 0x20(%rsi)
leaq 0x6d4(%rip), %rax       # 0x22c84
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_identify_tinystuff
static int de_identify_tinystuff(deark *c)
{
	// TODO: Can we identify these files?
	if(de_getbyte(0)>0x05) return 0;
	if(de_input_file_has_ext(c, "tny") ||
		de_input_file_has_ext(c, "tn1") ||
		de_input_file_has_ext(c, "tn2") ||
		de_input_file_has_ext(c, "tn3") ||
		de_input_file_has_ext(c, "tn4"))
	{
		return 8;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xeead3
cmpb $0x5, %al
ja 0x22c7a
leaq 0xf0e8d(%rip), %rsi     # 0x113aa4
movq %r14, %rdi
callq 0xea491
movl $0x8, %ebx
testl %eax, %eax
jne 0x22c7a
leaq 0xf0e79(%rip), %rsi     # 0x113aa8
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x22c7a
leaq 0xf0e6a(%rip), %rsi     # 0x113aac
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x22c7a
leaq 0xf0e5b(%rip), %rsi     # 0x113ab0
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x22c7a
leaq 0xf0e4c(%rip), %rsi     # 0x113ab4
movq %r14, %rdi
callq 0xea491
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
shll $0x3, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_doodle
void de_module_doodle(deark *c, struct deark_module_info *mi)
{
	mi->id = "doodle";
	mi->desc = "Atari Doodle";
	mi->run_fn = de_run_doodle;
	mi->identify_fn = de_identify_doodle;
}

// Assembly:
leaq 0xf085b(%rip), %rax     # 0x113501
movq %rax, (%rsi)
leaq 0xf0858(%rip), %rax     # 0x113508
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x22ccb
movq %rax, 0x18(%rsi)
leaq 0xd1(%rip), %rax        # 0x22d97
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_run_doodle
static void de_run_doodle(deark *c, de_module_params *mparams)
{
	struct atari_img_decode_data *adata = NULL;
	de_finfo *fi = NULL;
	u32 pal[2];

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->pal = pal;
	adata->bpp = 1;

	adata->w = 640;
	adata->h = 400;
	adata->ncolors = 2;
	adata->pal[0] = DE_STOCKCOLOR_WHITE;
	adata->pal[1] = DE_STOCKCOLOR_BLACK;

	adata->unc_pixels = c->infile;
	adata->img = de_bitmap_create(c, adata->w, adata->h, 1);
	fi = de_finfo_create(c);
	fmtutil_atari_set_standard_density(c, adata, fi);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file_finfo(adata->img, fi, 0);

	if(adata) {
		de_bitmap_destroy(adata->img);
		de_free(c, adata);
	}
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
leaq 0x8(%rsp), %rax
movq %rax, 0x30(%r14)
movq $0x1, (%r14)
movq $0x280, 0x10(%r14)      # imm = 0x280
movq $0x190, 0x18(%r14)      # imm = 0x190
movq $0x2, 0x8(%r14)
movabsq $-0xffffff00000001, %rcx # imm = 0xFF000000FFFFFFFF
movq %rcx, (%rax)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%r14)
movl $0x280, %esi            # imm = 0x280
movl $0x190, %edx            # imm = 0x190
movq %rbx, %rdi
movl $0x1, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf8e1c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf22d0
movq 0x38(%r14), %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea50e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_neochrome
void de_module_neochrome(deark *c, struct deark_module_info *mi)
{
	mi->id = "neochrome";
	mi->desc = "Atari NEOchrome image";
	mi->run_fn = de_run_neochrome;
	mi->identify_fn = de_identify_neochrome;
	mi->help_fn = de_help_neochrome;
}

// Assembly:
leaq 0xf0749(%rip), %rax     # 0x113515
movq %rax, (%rsi)
leaq 0xf0749(%rip), %rax     # 0x11351f
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x22dfc
movq %rax, 0x18(%rsi)
leaq 0x18d(%rip), %rax       # 0x22f79
movq %rax, 0x20(%rsi)
leaq 0x1b4(%rip), %rax       # 0x22fab
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_neochrome_ani
void de_module_neochrome_ani(deark *c, struct deark_module_info *mi)
{
	mi->id = "neochrome_ani";
	mi->desc = "NEOchrome Animation";
	mi->run_fn = de_run_neochrome_ani;
	mi->identify_fn = de_identify_neochrome_ani;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
leaq 0xf057e(%rip), %rax     # 0x113535
movq %rax, (%rsi)
leaq 0xf0582(%rip), %rax     # 0x113543
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x22fe0
movq %rax, 0x18(%rsi)
leaq 0x1e3(%rip), %rax       # 0x231ba
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_animatic
void de_module_animatic(deark *c, struct deark_module_info *mi)
{
	mi->id = "animatic";
	mi->desc = "Animatic Film";
	mi->run_fn = de_run_animatic;
	mi->identify_fn = de_identify_animatic;
	mi->help_fn = de_help_animatic;
}

// Assembly:
leaq 0xf0370(%rip), %rax     # 0x113557
movq %rax, (%rsi)
leaq 0xf036f(%rip), %rax     # 0x113560
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x23217
movq %rax, 0x18(%rsi)
leaq 0x1f4(%rip), %rax       # 0x233fb
movq %rax, 0x20(%rsi)
leaq 0x212(%rip), %rax       # 0x23424
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_fpaint_pi4
void de_module_fpaint_pi4(deark *c, struct deark_module_info *mi)
{
	mi->id = "fpaint_pi4";
	mi->desc = "Atari Falcon PI4 image";
	mi->run_fn = de_run_fpaint_pi4;
	mi->identify_fn = de_identify_fpaint_pi4;
}

// Assembly:
leaq 0xf013e(%rip), %rax     # 0x11356e
movq %rax, (%rsi)
leaq 0xf013f(%rip), %rax     # 0x113579
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x23455
movq %rax, 0x18(%rsi)
leaq 0x14(%rip), %rax        # 0x23464
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_identify_fpaint_pi4
static int de_identify_fpaint_pi4(deark *c)
{
	if(c->infile->len==77824) {
		if(de_input_file_has_ext(c, "pi4") ||
			de_input_file_has_ext(c, "pi9"))
		{
			return 50; // Must be lower than fpaint_pi9
		}
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
cmpq $0x13000, 0x18(%rax)    # imm = 0x13000
jne 0x234a1
movq %rdi, %r14
leaq 0xf00f5(%rip), %rsi     # 0x113575
callq 0xea491
movl $0x32, %ebx
testl %eax, %eax
jne 0x234a3
leaq 0xf0102(%rip), %rsi     # 0x113597
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x234a3
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_fpaint_pi9
void de_module_fpaint_pi9(deark *c, struct deark_module_info *mi)
{
	mi->id = "fpaint_pi9";
	mi->desc = "Atari Falcon PI9 image";
	mi->run_fn = de_run_fpaint_pi9;
	mi->identify_fn = de_identify_fpaint_pi9;
}

// Assembly:
leaq 0xf00dc(%rip), %rax     # 0x113590
movq %rax, (%rsi)
leaq 0xf00dd(%rip), %rax     # 0x11359b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x234d9
movq %rax, 0x18(%rsi)
leaq 0x14(%rip), %rax        # 0x234e8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_identify_fpaint_pi9
static int de_identify_fpaint_pi9(deark *c)
{
	int pi4_ext, pi9_ext;

	if(c->infile->len!=77824 && c->infile->len!=65024) return 0;

	pi4_ext = de_input_file_has_ext(c, "pi4");
	pi9_ext = de_input_file_has_ext(c, "pi9");
	if(!pi4_ext && !pi9_ext) return 0;

	if(c->infile->len==65024) return 60;

	// If file size is 77824, we need to distinguish between PI4 (320x240) and
	// PI9 (320x200) format.
	// Best guess is that if the last 12800 bytes are all 0, we should assume PI9.
	if(!dbuf_is_all_zeroes(c->infile, 65024, 12800)) {
		return 0; // Will be identified elsewhere as PI4.
	}

	return 60; // PI9. Must be higher than the value PI4 uses.
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
xorl %ebx, %ebx
cmpq $0x13000, %rax          # imm = 0x13000
je 0x23509
cmpq $0xfe00, %rax           # imm = 0xFE00
jne 0x23559
leaq 0xf0065(%rip), %rsi     # 0x113575
movq %r14, %rdi
callq 0xea491
movl %eax, %ebp
leaq 0xf0076(%rip), %rsi     # 0x113597
movq %r14, %rdi
callq 0xea491
orl %ebp, %eax
je 0x23559
movq 0x18(%r14), %rdi
movl $0x3c, %ebx
cmpq $0xfe00, 0x18(%rdi)     # imm = 0xFE00
je 0x23559
movl $0xfe00, %esi           # imm = 0xFE00
movl $0x3200, %edx           # imm = 0x3200
callq 0xf1856
testl %eax, %eax
movl $0x3c, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_atari_pi7
void de_module_atari_pi7(deark *c, struct deark_module_info *mi)
{
	mi->id = "atari_pi7";
	mi->desc = "Atari PI7 image";
	mi->run_fn = de_run_atari_pi7;
	mi->identify_fn = de_identify_atari_pi7;
}

// Assembly:
leaq 0xf004b(%rip), %rax     # 0x1135b2
movq %rax, (%rsi)
leaq 0xf004b(%rip), %rax     # 0x1135bc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2358c
movq %rax, 0x18(%rsi)
leaq 0x14(%rip), %rax        # 0x2359b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/atari-img.c
// Function: de_module_falcon_xga
void de_module_falcon_xga(deark *c, struct deark_module_info *mi)
{
	mi->id = "falcon_xga";
	mi->desc = "Atari Falcon XGA image";
	mi->run_fn = de_run_falcon_xga;
	mi->identify_fn = de_identify_falcon_xga;
}

// Assembly:
leaq 0xefffb(%rip), %rax     # 0x1135cc
movq %rax, (%rsi)
leaq 0xefffc(%rip), %rax     # 0x1135d7
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x235f6
movq %rax, 0x18(%rsi)
leaq 0xef(%rip), %rax        # 0x236e0
movq %rax, 0x20(%rsi)
retq