LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/abk.c
// Function: de_identify_abk
static int de_identify_abk(deark *c)
{
	int ext_bonus = 0;
	UI sig;

	if(de_input_file_has_ext(c, "abk")) ext_bonus=40;

	sig = (UI)de_getu32be(0);
	if(sig==CODE_AmBk)
		return 60+ext_bonus;
	if(sig==CODE_AmSp)
		return 60+ext_bonus;
	if(sig==CODE_AmIc)
		return 60+ext_bonus;
	if(sig==CODE_AmBs)
		return 60+ext_bonus;
	if(sig==AMOS_PIC_HDR_ID || is_scr_hdr_id(sig)) {
		if(is_amos_picture_file(c, sig)) {
			return 60+ext_bonus;
		}
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0xeaa46(%rip), %rsi     # 0x104182
callq 0xdfcd5
testl %eax, %eax
pushq $0x3c
popq %rax
pushq $0x64
popq %rbx
cmovel %eax, %ebx
movq 0x18(%r14), %rdi
xorl %esi, %esi
callq 0xe404f
pushq $0x5a
popq %r15
cmpl $0x31990, %eax          # imm = 0x31990
je 0x19796
cmpl $0x416d5370, %eax       # imm = 0x416D5370
je 0x197c3
cmpl $0x12030090, %eax       # imm = 0x12030090
je 0x19796
cmpl $0x12031990, %eax       # imm = 0x12031990
je 0x19796
cmpl $0x416d426b, %eax       # imm = 0x416D426B
je 0x197c3
cmpl $0x416d4273, %eax       # imm = 0x416D4273
je 0x197c3
cmpl $0x416d4963, %eax       # imm = 0x416D4963
je 0x197c3
cmpl $0x6071963, %eax        # imm = 0x6071963
jne 0x197c1
xorl %r15d, %r15d
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe404f
cmpl $0x6071963, %eax        # imm = 0x6071963
jne 0x197c1
movq 0x18(%r14), %rdi
addq $0xe, %r15
movq %r15, %rsi
callq 0xe3f46
addl $-0x7, %eax
cmpl $-0x7, %eax
ja 0x197c3
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/abk.c
// Function: de_module_amos_source
void de_module_amos_source(deark *c, struct deark_module_info *mi)
{
	mi->id = "amos_source";
	mi->desc = "AMOS source code";
	mi->run_fn = de_run_amos_source;
	mi->identify_fn = de_identify_amos_source;
}

// Assembly:
leaq 0xea5b6(%rip), %rax     # 0x103d96
movq %rax, (%rsi)
leaq 0xea5b8(%rip), %rax     # 0x103da2
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x19805
movq %rax, 0x18(%rsi)
leaq 0x128(%rip), %rax       # 0x19928
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/abk.c
// Function: de_run_amos_source
static void de_run_amos_source(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 basic_len;
	i64 pos;
	i64 nbanks;

	d = de_malloc(c, sizeof(lctx));

	pos = 16;
	basic_len = de_getu32be(pos);
	pos += 4;
	de_dbg(c, "BASIC code at %"I64_FMT", len=%"I64_FMT, pos, basic_len);
	pos += basic_len;
	if(pos >= c->infile->len) goto done;
	if(dbuf_memcmp(c->infile, pos, "AmBs", 4)) {
		de_err(c, "AmBs segment not found, expected at offset %"I64_FMT, pos);
		goto done;
	}

	de_dbg(c, "AmBs segment at %"I64_FMT, pos);
	nbanks = de_getu16be(pos+4);
	de_dbg_indent(c, 1);
	de_dbg(c, "number of banks: %d", (int)nbanks);
	if(nbanks>0 || c->extract_level>=2) {
		dbuf_create_file_from_slice(c->infile, pos, c->infile->len-pos, "AmBs.abk", NULL, 0);
	}
	else {
		de_dbg(c, "not extracting empty AmBs segment");
	}
	de_dbg_indent(c, -1);


done:
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq 0x18(%rbx), %rdi
pushq $0x10
popq %rsi
callq 0xe404f
movq %rax, %r12
leaq 0xea9e5(%rip), %rsi     # 0x104216
pushq $0x14
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
leaq 0x14(%r12), %r15
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r15
jge 0x198ff
leaq 0xea9d6(%rip), %rdx     # 0x104231
pushq $0x4
popq %rcx
movq %r15, %rsi
callq 0xe4d48
testl %eax, %eax
je 0x19880
leaq 0xea9c5(%rip), %rsi     # 0x104236
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xdf2a5
jmp 0x198ff
leaq 0xea9de(%rip), %rsi     # 0x104265
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
addq $0x18, %r12
movq %r12, %rsi
callq 0xe3f46
movq %rax, %r12
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
leaq 0xea8fc(%rip), %rsi     # 0x1041b5
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
testq %r12, %r12
jg 0x198d4
cmpl $0x2, 0x90(%rbx)
jl 0x19915
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
subq %r15, %rdx
leaq 0xea993(%rip), %rcx     # 0x104279
movq %r15, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe4e0b
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xded32
leaq 0xea966(%rip), %rsi     # 0x104282
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0x198f4
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/abk.c
// Function: de_identify_amos_source
static int de_identify_amos_source(deark *c)
{
	u8 b[10];
	int ext_bonus = 0;

	if(de_input_file_has_ext(c, "amos")) ext_bonus=20;

	de_read(b, 0, 10);
	if(!de_memcmp(b, "AMOS Basic", 10))
		return 80+ext_bonus;
	if(!de_memcmp(b, "AMOS Pro", 8))
		return 80+ext_bonus;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0xea967(%rip), %rsi     # 0x1042a4
callq 0xdfcd5
testl %eax, %eax
pushq $0x50
popq %rax
pushq $0x64
popq %rbx
cmovel %eax, %ebx
movq 0x18(%r14), %rdi
xorl %r12d, %r12d
leaq 0xe(%rsp), %r14
pushq $0xa
popq %r15
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xe3cb7
leaq 0xea938(%rip), %rsi     # 0x1042a9
movq %r14, %rdi
movq %r15, %rdx
callq 0x18230
testl %eax, %eax
je 0x19996
movabsq $0x6f725020534f4d41, %rax # imm = 0x6F725020534F4D41
cmpq %rax, 0xe(%rsp)
cmovel %ebx, %r12d
movl %r12d, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/abk.c
// Function: do_read_sprite_or_pic_palette
static void do_read_sprite_or_pic_palette(deark *c, lctx *d, struct amosbank *bk)
{
	i64 k;
	UI n;
	u8 cr, cg, cb;
	u8 cr1, cg1, cb1;
	i64 pos;
	i64 colors_used;
	char tmps[64];

	pos = bk->pal_pos;
	de_dbg(c, "palette at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	colors_used = de_pow2(bk->max_planes);

	for(k=0; k<32; k++) {
		n = (UI)dbuf_getu16be(bk->f, pos+k*2);
		cr1 = (u8)((n>>8)&0xf);
		cg1 = (u8)((n>>4)&0xf);
		cb1 = (u8)(n&0xf);
		cr = cr1*17;
		cg = cg1*17;
		cb = cb1*17;
		bk->pal[k] = DE_MAKE_RGB(cr, cg, cb);
		de_snprintf(tmps, sizeof(tmps), "0x%04x (%2d,%2d,%2d) "DE_CHAR_RIGHTARROW" ",
			n, (int)cr1, (int)cg1, (int)cb1);
		de_dbg_pal_entry2(c, k, bk->pal[k], tmps, NULL,
			(k>=colors_used)?" [unused]":"");

		// Set up colors #32-63 for 6-plane "Extra Half-Brite" mode.
		// For normal images (<=5 planes), these colors won't be used.
		bk->pal[k+32] = DE_MAKE_RGB(cr/2, cg/2, cb/2);
	}

	bk->pal[0] = DE_SET_ALPHA(bk->pal[0], 0); // First color is transparent.
	// (Don't know if pal[32] should be transparent also.)

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x68(%rsi), %r14
leaq 0x10edc8(%rip), %rsi    # 0x1292eb
movq %r14, %rdx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0xdeba7
movq %r15, 0x10(%rsp)
movq 0x488(%r15), %rdi
callq 0xdfba1
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
movq 0x10(%rsp), %r15
cmpq $0x20, %r13
je 0x1a63f
movq 0x50(%r15), %rdi
movq %r14, %rsi
callq 0xe3f46
movl %eax, %ebx
shrl $0x8, %ebx
andl $0xf, %ebx
movl %eax, %r12d
shrl $0x4, %r12d
movl %eax, %ecx
andl $0xf, %ecx
andl $0xf, %r12d
imull $0x11, %ecx, %ebp
imull $0x110000, %ebx, %edx   # imm = 0x110000
imull $0x1100, %r12d, %esi    # imm = 0x1100
orl %edx, %esi
orl %ebp, %esi
movq %r14, 0x28(%rsp)
movl $0xff000000, %edx       # imm = 0xFF000000
orl %edx, %esi
movl %esi, 0x70(%r15,%r13,4)
movl %ecx, (%rsp)
leaq 0x30(%rsp), %r14
movq %r14, %rdi
pushq $0x40
popq %rsi
leaq 0xe99ab(%rip), %rdx     # 0x103f6e
movl %eax, %ecx
movl %ebx, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0xde40c
movl 0x70(%r15,%r13,4), %edx
cmpq 0x20(%rsp), %r13
leaq 0xe99a5(%rip), %r9      # 0x103f88
leaq 0x11d676(%rip), %rax    # 0x137c60
cmovlq %rax, %r9
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xdf153
imull $0x88000, %ebx, %eax    # imm = 0x88000
andl $0x7f0000, %eax         # imm = 0x7F0000
imull $0x880, %r12d, %ecx     # imm = 0x880
andl $0x7f00, %ecx           # imm = 0x7F00
shrl %ebp
orl %ecx, %ebp
orl %eax, %ebp
movl $0xff000000, %eax       # imm = 0xFF000000
orl %eax, %ebp
movq 0x28(%rsp), %r14
movl %ebp, 0xf0(%r15,%r13,4)
incq %r13
addq $0x2, %r14
jmp 0x1a55b
movq 0x10(%rsp), %rax
movb $0x0, 0x73(%rax)
pushq $-0x1
popq %rsi
movq 0x18(%rsp), %rdi
callq 0xdeba7
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/alphabmp.c
// Function: de_module_alphabmp
void de_module_alphabmp(deark *c, struct deark_module_info *mi)
{
	mi->id = "alphabmp";
	mi->desc = "Alpha Microsystems BMP";
	mi->run_fn = de_run_alphabmp;
	mi->identify_fn = de_identify_alphabmp;
}

// Assembly:
leaq 0xe9a0a(%rip), %rax     # 0x1042bd
movq %rax, (%rsi)
leaq 0xe9a09(%rip), %rax     # 0x1042c6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1a8d8
movq %rax, 0x18(%rsi)
leaq 0x48e(%rip), %rax       # 0x1ad61
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amigaicon.c
// Function: de_module_amigaicon
void de_module_amigaicon(deark *c, struct deark_module_info *mi)
{
	mi->id = "amigaicon";
	mi->desc = "Amiga Workbench icon (.info), NewIcons, GlowIcons";
	mi->run_fn = de_run_amigaicon;
	mi->identify_fn = de_identify_amigaicon;
}

// Assembly:
leaq 0xe9655(%rip), %rax     # 0x1043f4
movq %rax, (%rsi)
leaq 0xe9655(%rip), %rax     # 0x1043fe
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1adc4
movq %rax, 0x18(%rsi)
leaq 0xe8e(%rip), %rax       # 0x1bc4d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amigaicon.c
// Function: do_newicons_process_bit
static void do_newicons_process_bit(deark *c, lctx *d, dbuf *f, u8 b)
{
	UI nbits_needed;

	de_bitbuf_lowlevel_add_bits(&d->newicons_bbll, (u64)b, 1);

	// If line_count==0, we're still reading palette samples, which are always 8 bits.
	nbits_needed = (d->newicons_finished_pal==0) ? 8 : d->newicons_bits_per_pixel;

	if(d->newicons_bbll.nbits_in_bitbuf >= nbits_needed) {
		UI x;

		x = (UI)de_bitbuf_lowlevel_get_bits(&d->newicons_bbll, nbits_needed);
		if(x>255 && d->newicons_finished_pal) {
			// For now at least, we only support 9-bit images if they don't
			// actually use the 9th bit.
			d->newicons_largepalentry_flag = 1;
		}
		dbuf_writebyte(f, (u8)x);
		d->newicons_bbll.nbits_in_bitbuf = 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rdi), %r15
movl %edx, %esi
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0xe6997
cmpb $0x0, 0x54(%rbx)
je 0x1bc96
movl 0x50(%rbx), %esi
jmp 0x1bc99
pushq $0x8
popq %rsi
cmpl %esi, 0x5c(%rbx)
jb 0x1bcc6
movq %r15, %rdi
callq 0xe69f9
testl $0xffffff00, %eax       # imm = 0xFFFFFF00
je 0x1bcb7
cmpb $0x0, 0x54(%rbx)
je 0x1bcb7
movb $0x1, 0x55(%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0xe5bc5
andl $0x0, 0x5c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movq %rcx, %r14
xorps %xmm0, %xmm0
leaq 0x28(%rsp), %rax
movups %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rdi, -0x20(%rax)
movq %rsi, -0x18(%rax)
addq %rsi, %rdx
movq %rdx, -0x10(%rax)
movq %rax, %rdi
callq 0xe6a40
leaq 0x8(%rsp), %r15
pushq $0x8
popq %rbp
movq %r15, %rdi
movl %ebp, %esi
callq 0xe6a4a
cmpb $0x0, 0x20(%rsp)
jne 0x1c1ee
movzbl %al, %ecx
cmpl $0x7f, %ecx
ja 0x1c1b8
movzbl %al, %r12d
incq %r12
subq $0x1, %r12
jb 0x1c17b
movq %r15, %rdi
movl %ebx, %esi
callq 0xe6a4a
movzbl %al, %esi
movq %r14, %rdi
callq 0xe5bc5
jmp 0x1c19b
cmpl $0x80, %ecx
je 0x1c17b
movzbl %al, %r13d
movq %r15, %rdi
movl %ebx, %esi
callq 0xe6a4a
addq $-0x101, %r13           # imm = 0xFEFF
movzbl %al, %r12d
testq %r13, %r13
je 0x1c17b
movq %r14, %rdi
movl %r12d, %esi
callq 0xe5bc5
incq %r13
jmp 0x1c1d9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0xe8939(%rip), %rax     # 0x104b40
movq %rax, (%rsi)
leaq 0xe74e9(%rip), %rax     # 0x1036fa
movq %rax, 0x38(%rsi)
leaq 0xe892c(%rip), %rax     # 0x104b48
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x1c242
movq %rax, 0x18(%rsi)
leaq 0x119e(%rip), %rax      # 0x1d3d0
movq %rax, 0x20(%rsi)
leaq 0x1255(%rip), %rax      # 0x1d492
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1d43b
movq 0x18(%r14), %rdi
xorl %ebx, %ebx
leaq 0xc(%rsp), %r15
pushq $0x4
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpl $0x342e3104, (%r15)     # imm = 0x342E3104
je 0x1d486
leaq 0x111825(%rip), %rsi    # 0x12ec33
movq %r14, %rdi
callq 0xdfcd5
movq 0x28(%r14), %rcx
cmpb $0x0, 0x10(%rcx)
je 0x1d450
cmpb $0x1, 0x11(%rcx)
jne 0x1d450
cmpb $0x1, 0x12(%rcx)
jne 0x1d450
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,8), %ebx
addl $0x5b, %ebx
jmp 0x1d486
leaq 0xe79ef(%rip), %rsi     # 0x104e31
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x1d486
cmpb $0x1b, 0xc(%rsp)
jne 0x1d47e
cmpb $0x5b, 0xd(%rsp)
jne 0x1d47e
movb 0xe(%rsp), %cl
cmpb $0x3f, %cl
setne %dl
addb $-0x30, %cl
cmpb $0xa, %cl
setae %cl
testb %cl, %dl
jne 0x1d47e
testl %eax, %eax
pushq $0x32
popq %rax
pushq $0x64
jmp 0x1d482
testl %eax, %eax
pushq $0xa
popq %rbx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe79c1(%rip), %rsi     # 0x104e5e
xorl %eax, %eax
callq 0xdf42e
leaq 0xe79e7(%rip), %rsi     # 0x104e92
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xe7a09(%rip), %rsi     # 0x104ec5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xe7a1c(%rip), %rsi     # 0x104ee9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xe7a48(%rip), %rsi     # 0x104f26
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xe7a6e(%rip), %rsi     # 0x104f5d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xe7a90(%rip), %rsi     # 0x104f90
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0xdf42e
// File: /workspace/github_c_makefile_star2_O2/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 0x1d53c
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 0x1d53f
xorl %eax, %eax
jmp 0x1d553
xorl %eax, %eax
retq
movq 0x10(%r15), %rax
movq (%rax,%r14,8), %rcx
testq %rcx, %rcx
je 0x1d559
imulq $0x14, %rbx, %rax
addq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x14
popq %rdx
callq 0xdf66f
movq 0x10(%r15), %rcx
movq %rax, (%rcx,%r14,8)
movq (%r15), %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
movq 0x10(%r15), %rcx
movq (%rcx,%r14,8), %rcx
movaps 0xe749c(%rip), %xmm0    # 0x104a20
movq %rcx, %rdx
subq $0x1, %rax
jb 0x1d54c
movups %xmm0, (%rdx)
addq $0x14, %rdx
jmp 0x1d587
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x1d618
movl 0x120(%rbx), %ecx
movl $0x0, %eax
testl %ecx, %ecx
jle 0x1d5d6
movq 0x128(%rbx), %r14
decq %r14
cmpl $0x1, %ecx
jne 0x1d5cc
xorl %eax, %eax
jmp 0x1d5d6
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_O2/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
andl $0x0, 0x120(%rdi)
addq $0xb8, %rdi
movq %rdi, 0x8(%rsp)
callq 0x180e0
movq %rax, %r13
xorl %ecx, %ecx
cmpl $0xf, %ecx
jg 0x1d6b5
movq 0x8(%rsp), %rax
leaq (%rax,%rbx), %r14
movq %r14, %rdi
pushq $0x3b
popq %rsi
callq 0xde55b
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 0x1d68f
movq %r14, %rdi
callq 0xdfb3b
movslq 0x120(%r15), %rdx
leal 0x1(%rdx), %ecx
movq %rax, 0x128(%r15,%rdx,8)
movl %ecx, 0x120(%r15)
testq %r12, %r12
je 0x1d6b5
addq %rbp, %rbx
incq %rbx
jmp 0x1d64e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xf4db2(%rip), %rax     # 0x11247d
movq %rax, (%rsi)
leaq 0x111156(%rip), %rax    # 0x12e82b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1d6f0
movq %rax, 0x18(%rsi)
leaq 0x498(%rip), %rax       # 0x1db83
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe7519(%rip), %rax     # 0x1050c8
movq %rax, (%rsi)
leaq 0xe7513(%rip), %rax     # 0x1050cc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1dbd4
movq %rax, 0x18(%rsi)
leaq 0x49(%rip), %rax        # 0x1dc18
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rcx
callq 0xe3cb7
movq %r14, %rdi
callq 0xec883
testq %rbx, %rbx
je 0x1df07
movq 0x8(%r15), %rdi
pushq $0x32
popq %rcx
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xec7c5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1df7e
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 0xe409f
movq %rax, %r12
leaq 0xe745d(%rip), %rsi     # 0x105399
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
addq $0x6, %rdx
addq $-0x6, %rcx
movl 0x20(%r15), %r8d
incl %r8d
movq %r12, (%rsp)
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1dc3a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1e44b
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 0xe409f
movq %rax, %r12
leaq 0xe71e1(%rip), %rsi     # 0x1055e3
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
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
andq $0x0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0x1dc3a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1ea97
movq %rdx, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
cmpq $0x5, %r12
je 0x1e9ef
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x10(%rsp,%r12,8)
incq %r12
jmp 0x1e9d3
movq %r14, %rdi
callq 0xeac74
movq %rax, %r15
xorl %r12d, %r12d
cmpq $0x14, %r12
je 0x1ea8f
movq 0x10(%rsp,%r12,2), %r13
movq 0x8(%rsp), %rax
addq %r13, %rax
movq 0x18(%rbx), %rcx
addq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jg 0x1ea8f
movq %r15, %rdi
callq 0xeac85
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 0xe4ced
movq %r15, %rdi
callq 0xeacc0
leaq 0xe6fd9(%rip), %rax     # 0x105a34
movslq (%r12,%rax), %rbp
addq %rax, %rbp
movq %r15, %rdi
callq 0xeb877
movq %r14, %rdi
leaq 0x100446(%rip), %rsi    # 0x11eeba
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
addq %r13, 0x8(%rsp)
addq $0x4, %r12
jmp 0x1e9fd
movq %r15, %rdi
callq 0xeaf3c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1f51a
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xeaf3c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe3fc4
movq %rax, %r12
leaq 0xe64c0(%rip), %rsi     # 0x1059f8
xorl %r15d, %r15d
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
callq 0xeac74
movq %rax, %r13
testq %r12, %r12
cmovleq %r15, %r12
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x1f503
movq 0x10(%rsp), %rcx
movq 0x18(%rbx), %rax
addq 0x10(%rbx), %rax
cmpq %rax, %rcx
jge 0x1f503
movq %r14, %rdi
leaq 0xe6498(%rip), %rsi     # 0x105a15
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe3f2a
movzbl %al, %r15d
movq %r13, %rdi
callq 0xeac85
movq 0x18(%r14), %rdi
movq 0x10(%rsp), %rsi
movl $0x3, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r15, %rdx
movq %r13, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, %rdi
callq 0xeacc0
movq %r13, %rdi
callq 0xeb877
movq %r14, %rdi
leaq 0x1013d9(%rip), %rsi    # 0x1209c1
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq %r15, 0x10(%rsp)
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %rbp
jmp 0x1f55c
// File: /workspace/github_c_makefile_star2_O2/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 0x1f63b
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0xe0051
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xe0644
jmp 0x1f64d
leaq 0xe5e3a(%rip), %rsi     # 0x10547c
pushq $0x40
popq %rdx
movq %rbx, %rdi
callq 0xde492
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/asf.c
// Function: get_uuid_name
static const char *get_uuid_name(const u8 *uuid)
{
	const struct uuid_info *uui;
	uui = find_uuid_info(uuid);
	if(uui && uui->name) return uui->name;
	return "?";
}

// Assembly:
leaq 0x16181f(%rip), %rax    # 0x180ea8
pushq $0x11
popq %rcx
decq %rcx
je 0x1f6b7
movdqu (%rax), %xmm0
addq $0x28, %rax
movdqu (%rdi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
jne 0x1f68c
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x1f6b7
retq
leaq 0xff823(%rip), %rax     # 0x11eee1
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe60d6(%rip), %rax     # 0x105a59
movq %rax, (%rsi)
leaq 0xe60d0(%rip), %rax     # 0x105a5d
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x1f9ac
movq %rax, 0x18(%rsi)
leaq 0xa4(%rip), %rax        # 0x1fa47
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe5ff1(%rip), %rax     # 0x105a72
movq %rax, (%rsi)
leaq 0xe5feb(%rip), %rax     # 0x105a76
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x1faa6
movq %rax, 0x18(%rsi)
leaq 0x4ff(%rip), %rax       # 0x1ffa0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe5c5c(%rip), %rax     # 0x105c3c
movq %rax, (%rsi)
leaq 0xe5aa8(%rip), %rax     # 0x105a92
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x20010
movq %rax, 0x18(%rsi)
leaq 0x5a7(%rip), %rax       # 0x205a7
movq %rax, 0x20(%rsi)
leaq 0x5e0(%rip), %rax       # 0x205eb
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe3f46
cmpq $0xe0f, %rax            # imm = 0xE0F
jne 0x205e0
leaq 0xe5671(%rip), %rsi     # 0x105c3c
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
pushq $0x2d
popq %rax
pushq $0x64
popq %r14
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe549d(%rip), %rax     # 0x105ab3
movq %rax, (%rsi)
leaq 0xe5499(%rip), %rax     # 0x105ab9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x20646
movq %rax, 0x18(%rsi)
leaq 0x8e2(%rip), %rax       # 0x20f18
movq %rax, 0x20(%rsi)
leaq 0x8f9(%rip), %rax       # 0x20f3a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe5441(%rip), %rax     # 0x106390
movq %rax, (%rsi)
leaq 0xe543d(%rip), %rax     # 0x106396
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x20f7f
movq %rax, 0x18(%rsi)
leaq 0x4f5(%rip), %rax       # 0x21464
movq %rax, 0x20(%rsi)
leaq 0x583(%rip), %rax       # 0x214fd
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
leaq 0xe4e64(%rip), %r15     # 0x1062dc
xorl %r12d, %r12d
cmpq $0x18, %r12
je 0x214ef
movslq (%r12,%r15), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0xdfcd5
addq $0x4, %r12
testl %eax, %eax
je 0x2147b
movq 0x18(%r14), %rdi
xorl %esi, %esi
callq 0xe3f46
cmpq $0x2, %rax
ja 0x214d0
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
pushq $0x64
popq %rbx
cmpq $0x7d22, %rax           # imm = 0x7D22
je 0x214ef
cmpq $0x7d42, %rax           # imm = 0x7D42
je 0x214ef
cmpq $0x7d80, %rax           # imm = 0x7D80
jne 0x214e1
pushq $0x28
jmp 0x214de
addq $-0x8000, %rax          # imm = 0x8000
cmpq $0x3, %rax
jae 0x214ed
pushq $0x3c
popq %rbx
jmp 0x214ef
cmpq $0x3e80, %rax           # imm = 0x3E80
jle 0x214ed
pushq $0xa
jmp 0x214de
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe4ea1(%rip), %rax     # 0x1063b7
movq %rax, (%rsi)
leaq 0xe4ea2(%rip), %rax     # 0x1063c2
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2153b
movq %rax, 0x18(%rsi)
leaq 0x49c(%rip), %rax       # 0x219d2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe49f5(%rip), %rax     # 0x1063f0
movq %rax, (%rsi)
leaq 0xe49ef(%rip), %rax     # 0x1063f4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x21a20
movq %rax, 0x18(%rsi)
leaq 0xad(%rip), %rax        # 0x21ac8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq $0x10, (%rax)
movq $0x180, 0x10(%rax)      # imm = 0x180
movq $0xf0, 0x18(%rax)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%r14)
pushq $0x3
popq %rcx
movl $0x180, %esi            # imm = 0x180
movl $0xf0, %edx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x38(%r14)
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r15
movl $0x1, 0x78(%rax)
movaps 0xe47dc(%rip), %xmm0    # 0x106260
movups %xmm0, 0x80(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xed22a
movq 0x38(%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe70ab
movq 0x38(%r14), %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdfd24
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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 0xe4916(%rip), %rax     # 0x106411
movq %rax, (%rsi)
leaq 0xe4915(%rip), %rax     # 0x10641a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x21b20
movq %rax, 0x18(%rsi)
leaq 0xec(%rip), %rax        # 0x21c07
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq 0x18(%rbx), %rdi
leaq 0xe4d55(%rip), %rdx     # 0x106893
pushq $0x4
popq %r15
xorl %esi, %esi
movq %r15, %rcx
callq 0xe4d48
testl %eax, %eax
leaq 0xe4d43(%rip), %rax     # 0x106898
leaq 0xe4d4b(%rip), %rsi     # 0x1068a7
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0xe07f7
movq $0x10, (%r14)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f46
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
pushq $0x6
popq %rsi
callq 0xe3f46
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdf038
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
addq $-0x8, %rdx
pushq $0x8
popq %rsi
callq 0xe6248
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xed22a
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe70b7
movq 0x20(%r14), %rdi
callq 0xe5591
movq 0x38(%r14), %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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 0xe47d2(%rip), %rax     # 0x10642e
movq %rax, (%rsi)
leaq 0xe47d2(%rip), %rax     # 0x106438
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x21c81
movq %rax, 0x18(%rsi)
leaq 0xbd(%rip), %rax        # 0x21d39
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq $0x10, (%rax)
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe3f46
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
pushq $0x6
popq %rsi
callq 0xe3f46
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdf038
movq 0x18(%rbx), %rdi
movq $-0x100, %rdx
addq 0x18(%rdi), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0xe6248
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xed22a
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe70b7
movq 0x20(%r14), %rdi
callq 0xe5591
movq 0x38(%r14), %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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 0xe46eb(%rip), %rax     # 0x10644d
movq %rax, (%rsi)
leaq 0xe46ea(%rip), %rax     # 0x106456
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x21d87
movq %rax, 0x18(%rsi)
leaq 0xb8(%rip), %rax        # 0x21e3a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq $0x10, (%rax)
movq 0x18(%rbx), %rdi
pushq $0x2
popq %rsi
callq 0xe3f46
movq %rax, 0x10(%r14)
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe3f46
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdf038
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
addq $-0x6, %rdx
pushq $0x6
popq %rsi
callq 0xe6248
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xed22a
movq 0x38(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe70b7
movq 0x20(%r14), %rdi
callq 0xe5591
movq 0x38(%r14), %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3f46
movq %rax, %r15
cmpq $0x4734, %rax           # imm = 0x4734
je 0x21e63
cmpq $0x400, %r15            # imm = 0x400
jne 0x21e8a
leaq 0xe4a50(%rip), %rsi     # 0x1068ba
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0x21e7b
pushq $0x64
popq %rbx
jmp 0x21e8a
xorl %eax, %eax
cmpq $0x4734, %r15           # imm = 0x4734
sete %al
leal (%rax,%rax,4), %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe45d3(%rip), %rax     # 0x10646c
movq %rax, (%rsi)
leaq 0xe45d3(%rip), %rax     # 0x106476
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x21ec9
movq %rax, 0x18(%rsi)
leaq 0x639(%rip), %rax       # 0x224f2
movq %rax, 0x20(%rsi)
leaq 0x6b8(%rip), %rax       # 0x2257c
movq %rax, 0x28(%rsi)
retq