LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nufx.c
// Function: decompress_chunk_rle_layer
static void decompress_chunk_rle_layer(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres, u8 rlechar)
{
	i64 srcpos = dcmpri->pos;
	i64 endpos;
	i64 nbytes_written = 0;
	const char *modname = "rle";

	endpos = dcmpri->pos + dcmpri->len;
	while(srcpos < endpos) {
		u8 x;

		if(nbytes_written >= dcmpro->expected_len) break;
		x = dbuf_getbyte_p(dcmpri->f, &srcpos);
		if(x==rlechar) {
			i64 count;
			u8 val;

			val = dbuf_getbyte_p(dcmpri->f, &srcpos);
			count = 1 + (i64)dbuf_getbyte_p(dcmpri->f, &srcpos);
			if(nbytes_written+count > dcmpro->expected_len) {
				goto done;
			}
			dbuf_write_run(dcmpro->f, val, count);
			nbytes_written += count;
		}
		else {
			dbuf_writebyte(dcmpro->f, x);
			nbytes_written++;
		}
	}

done:
	if(nbytes_written != dcmpro->expected_len) {
		de_dfilter_set_generic_error(c, dres, modname);
	}
	dres->bytes_consumed = srcpos - dcmpri->pos;
	dres->bytes_consumed_valid = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r15d
movq %rcx, 0x30(%rsp)
movq %rdx, %r12
movq %rdi, 0x28(%rsp)
movq 0x8(%rsi), %rax
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
addq 0x10(%rsi), %rax
xorl %ebp, %ebp
movl %r8d, 0xc(%rsp)
movq %rsi, 0x20(%rsp)
movq %rax, 0x18(%rsp)
cmpq %rax, 0x10(%rsp)
jge 0x93f41
cmpq 0x10(%r12), %rbp
jge 0x93f19
movq (%rsi), %rdi
movq %rsi, %rbx
movq %r14, %rsi
callq 0xef14d
cmpb %r15b, %al
jne 0x93f1e
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movb %al, 0xb(%rsp)
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %edx
leaq (%rdx,%rbp), %r15
incq %r15
cmpq 0x10(%r12), %r15
setle %r13b
jg 0x93f08
incq %rdx
movq (%r12), %rdi
movzbl 0xb(%rsp), %esi
callq 0xf14bd
movq %r15, %rbp
movl 0xc(%rsp), %r15d
leaq 0x10(%rsp), %r14
movq 0x20(%rsp), %rsi
jmp 0x93f33
xorl %r13d, %r13d
jmp 0x93f38
movq (%r12), %rdi
movzbl %al, %esi
callq 0xf11be
incq %rbp
movb $0x1, %r13b
movq %rbx, %rsi
movq 0x18(%rsp), %rax
testb %r13b, %r13b
jne 0x93ea0
cmpq 0x10(%r12), %rbp
movq 0x30(%rsp), %rbx
je 0x93f67
leaq 0x9110f(%rip), %rdx     # 0x125063
movq 0x28(%rsp), %rdi
movq %rsi, %r14
movq %rbx, %rsi
callq 0xfa815
movq %r14, %rsi
movq 0x10(%rsp), %rax
subq 0x8(%rsi), %rax
movq %rax, 0x8(%rbx)
movb $0x1, 0x4(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nufx.c
// Function: my_advfile_cbfn_diskimage
static int my_advfile_cbfn_diskimage(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	struct nufx_record *rec = (struct nufx_record*)advf->userdata;
	struct nufx_ctx *d = rec->d;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		decompress_thread(c, d, rec, rec->disk_image_thread_ptr, afp->outf);
	}

	return 1;
}

// Assembly:
cmpl $0x1, (%rdx)
jne 0x93fab
pushq %rax
movq 0x8(%rsi), %rax
movq (%rax), %rsi
movq 0xc0(%rax), %rcx
movq 0x8(%rdx), %r8
movq %rax, %rdx
callq 0x93156
addq $0x8, %rsp
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nufx.c
// Function: my_advfile_cbfn
static int my_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	struct nufx_record *rec = (struct nufx_record*)advf->userdata;
	struct nufx_ctx *d = rec->d;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		decompress_thread(c, d, rec, rec->data_thread_ptr, afp->outf);
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		decompress_thread(c, d, rec, rec->resource_thread_ptr, afp->outf);
	}

	return 1;
}

// Assembly:
movq %rdx, %rax
movq 0x8(%rsi), %rdx
movq (%rdx), %rsi
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x93fce
cmpl $0x2, %ecx
jne 0x93fe5
movl $0xb8, %ecx
jmp 0x93fd3
movl $0xb0, %ecx
pushq %rax
movq (%rdx,%rcx), %rcx
movq 0x8(%rax), %r8
callq 0x93156
addq $0x8, %rsp
movl $0x1, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/macpaint.c
// Function: de_module_macpaint
void de_module_macpaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "macpaint";
	mi->desc = "MacPaint image";
	mi->run_fn = de_run_macpaint;
	mi->identify_fn = de_identify_macpaint;
	mi->help_fn = de_help_macpaint;
}

// Assembly:
leaq 0x9b6dd(%rip), %rax     # 0x12f6d0
movq %rax, (%rsi)
leaq 0x9b6dc(%rip), %rax     # 0x12f6d9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x94023
movq %rax, 0x18(%rsi)
leaq 0xb08(%rip), %rax       # 0x94b1b
movq %rax, 0x20(%rsi)
leaq 0xbb9(%rip), %rax       # 0x94bd7
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/macpaint.c
// Function: de_identify_macpaint
static int de_identify_macpaint(deark *c)
{
	u8 buf[8];

	if(is_fmac2com(c)) return 85;
	de_read(buf, 65, 8);

	// Not all MacPaint files can be easily identified, but this will work
	// for some of them.
	if(!de_memcmp(buf, "PNTG", 4)) {
		if(c->detection_data->is_macbinary) return 100;
		if(!de_memcmp(&buf[4], "MPNT", 4)) return 80;
		return 70;
	}

	if(de_input_file_has_ext(c, "mac")) return 10;
	if(de_input_file_has_ext(c, "macp")) return 15;
	if(de_input_file_has_ext(c, "pntg")) return 15;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x94bfb
movl %eax, %ecx
movl $0x55, %eax
testb %cl, %cl
je 0x94b3a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%rbx), %rdi
movq %rsp, %r14
movl $0x41, %edx
movl $0x8, %ecx
movq %r14, %rsi
callq 0xeeee8
cmpl $0x47544e50, (%r14)     # imm = 0x47544E50
je 0x94baa
leaq 0x7fa0c(%rip), %rsi     # 0x11456f
movq %rbx, %rdi
callq 0xea936
movl %eax, %ecx
movl $0xa, %eax
testl %ecx, %ecx
jne 0x94b32
leaq 0x9af47(%rip), %rsi     # 0x12fac4
movq %rbx, %rdi
callq 0xea936
movl %eax, %ecx
movl $0xf, %eax
testl %ecx, %ecx
jne 0x94b32
leaq 0x9af32(%rip), %rsi     # 0x12fac9
movq %rbx, %rdi
callq 0xea936
movl %eax, %ecx
testl %eax, %eax
movl $0xf, %eax
jmp 0x94bcf
movq 0x28(%rbx), %rcx
movl $0x64, %eax
cmpb $0x0, 0x4(%rcx)
jne 0x94b32
cmpl $0x544e504d, 0x4(%rsp)  # imm = 0x544E504D
movl $0x50, %ecx
movl $0x46, %eax
cmovel %ecx, %eax
jmp 0x94b32
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/makichan.c
// Function: de_module_makichan
void de_module_makichan(deark *c, struct deark_module_info *mi)
{
	mi->id = "makichan";
	mi->desc = "MAKIchan graphics";
	mi->run_fn = de_run_makichan;
	mi->identify_fn = de_identify_makichan;
	mi->help_fn = de_help_makichan;
}

// Assembly:
leaq 0x9ad45(%rip), %rax     # 0x12fb64
movq %rax, (%rsi)
leaq 0x9ad44(%rip), %rax     # 0x12fb6d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x94e4f
movq %rax, 0x18(%rsi)
leaq 0xbe4(%rip), %rax       # 0x95a23
movq %rax, 0x20(%rsi)
leaq 0xbff(%rip), %rax       # 0x95a49
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/makichan.c
// Function: read_palette
static void read_palette(deark *c, lctx *d, i64 pos)
{
	i64 k;
	u8 cr, cg, cb;

	de_dbg(c, "palette at %d", (int)pos);
	de_dbg_indent(c, 1);

	for(k=0; k<d->num_colors; k++) {
		cg = de_getbyte(pos+3*k);
		cr = de_getbyte(pos+3*k+1);
		cb = de_getbyte(pos+3*k+2);
		d->pal[k] = DE_MAKE_RGB(cr,cg,cb);
		de_dbg_pal_entry(c, k, d->pal[k]);
	}

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x9a6fe(%rip), %rsi     # 0x130170
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
cmpq $0x0, 0x48(%r15)
jle 0x95af6
xorl %r12d, %r12d
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xef0d5
movl %eax, %ebp
movq 0x18(%r14), %rdi
leaq 0x1(%rbx), %rsi
callq 0xef0d5
movl %eax, %r13d
movq 0x18(%r14), %rdi
leaq 0x2(%rbx), %rsi
callq 0xef0d5
movzbl %r13b, %ecx
shll $0x10, %ecx
movzbl %bpl, %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl %al, %edx
orl %esi, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movl %edx, 0x90(%r15,%r12,4)
movq %r14, %rdi
movq %r12, %rsi
callq 0xe9d68
incq %r12
addq $0x3, %rbx
cmpq 0x48(%r15), %r12
jl 0x95a90
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/makichan.c
// Function: do_create_image
static void do_create_image(deark *c, lctx *d)
{
	de_bitmap *img = NULL;
	de_finfo *fi = NULL;

	img = de_bitmap_create(c, d->width, d->height, 3);

	fi = de_finfo_create(c);

	if(d->aspect_ratio_flag) {
		fi->density.code = DE_DENSITY_UNK_UNITS;
		fi->density.xdens = 2.0;
		fi->density.ydens = 1.0;
	}

	de_convert_image_paletted(d->unc_pixels, 0,
		d->bits_per_pixel, d->rowspan, d->pal, img, 0);

	de_bitmap_write_to_file_finfo(img, fi, 0);
	de_bitmap_destroy(img);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq 0x10(%r15), %rdx
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %r14
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r12
cmpb $0x0, 0x70(%r15)
je 0x95b73
movl $0x1, 0x78(%r12)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x80(%r12)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x88(%r12)
movq 0x88(%r15), %rdi
movq 0x50(%r15), %rdx
movq 0x58(%r15), %rcx
addq $0x90, %r15
movl $0x0, (%rsp)
xorl %esi, %esi
movq %r15, %r8
movq %r14, %r9
callq 0xf35b8
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf2917
movq %r14, %rdi
callq 0xf28d4
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xea9b3
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_module_mbk
void de_module_mbk(deark *c, struct deark_module_info *mi)
{
	mi->id = "stos";
	mi->desc = "STOS Memory Bank (.MBK)";
	mi->run_fn = de_run_mbk_mbs;
	mi->identify_fn = de_identify_mbk;
	mi->help_fn = de_help_mbk;
	mi->id_alias[0] = "mbk";
}

// Assembly:
leaq 0x9a2e8(%rip), %rax     # 0x12feb7
movq %rax, (%rsi)
leaq 0x9a2e3(%rip), %rax     # 0x12febc
movq %rax, 0x8(%rsi)
leaq 0x26(%rip), %rax        # 0x95c0a
movq %rax, 0x18(%rsi)
leaq 0x22(%rip), %rax        # 0x95c11
movq %rax, 0x20(%rsi)
leaq 0x98(%rip), %rax        # 0x95c92
movq %rax, 0x28(%rsi)
leaq 0x9a2cf(%rip), %rax     # 0x12fed4
movq %rax, 0x38(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_identify_mbk
static int de_identify_mbk(deark *c)
{
	u8 buf[10];
	UI id;

	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, g_lion_sig, 10))
		return 99;
	id = (UI)de_getu32be_direct(buf);
	if(id==BANKID_SPRITE) {
		return 100;
	}
	else if(id==BANKID_PKSCREEN) {
		int is_pkscr;
		UI res;

		is_pkscr = is_stos_packedscreen(c, &res);
		if(is_pkscr) {
			return 99;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x6(%rsp), %r14
movl $0xa, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
movabsq $0x62756f706e6f694c, %rax # imm = 0x62756F706E6F694C
xorq (%r14), %rax
movzwl 0x8(%r14), %ecx
xorq $0x6b6e, %rcx           # imm = 0x6B6E
movl $0x63, %ebp
orq %rax, %rcx
je 0x95c87
leaq 0x6(%rsp), %rdi
callq 0xef325
cmpl $0x19861987, %eax       # imm = 0x19861987
je 0x95c82
cmpl $0x6071963, %eax        # imm = 0x6071963
jne 0x95c7e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x974b0
testl %eax, %eax
jne 0x95c87
xorl %ebp, %ebp
jmp 0x95c87
movl $0x64, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_module_stos_pp1
void de_module_stos_pp1(deark *c, struct deark_module_info *mi)
{
	mi->id = "stos_pp1";
	mi->desc = "Picture Packer low res";
	mi->run_fn = de_run_stos_pp1;
	mi->identify_fn = de_identify_stos_pp1;
	mi->help_fn = de_help_mbk;
}

// Assembly:
leaq 0x9a213(%rip), %rax     # 0x12fed8
movq %rax, (%rsi)
leaq 0x9a212(%rip), %rax     # 0x12fee1
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x95cf5
movq %rax, 0x18(%rsi)
leaq 0x1a(%rip), %rax        # 0x95cff
movq %rax, 0x20(%rsi)
leaq -0x5e(%rip), %rax       # 0x95c92
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_identify_stos_pp1
static int de_identify_stos_pp1(deark *c)
{
	int has_ext;
	int is_pkscr;
	UI res;

	has_ext = de_input_file_has_ext(c, "pp1");
	if(!has_ext) return 0;
	is_pkscr = is_stos_packedscreen(c, &res);
	if(is_pkscr && res==1) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9a1d0(%rip), %rsi     # 0x12fedd
callq 0xea936
testl %eax, %eax
je 0x95d3b
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x974b0
xorl %edx, %edx
cmpl $0x1, (%r14)
movl $0x64, %ecx
cmovnel %edx, %ecx
testl %eax, %eax
cmovel %eax, %ecx
jmp 0x95d3d
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_module_stos_pp2
void de_module_stos_pp2(deark *c, struct deark_module_info *mi)
{
	mi->id = "stos_pp2";
	mi->desc = "Picture Packer med res";
	mi->run_fn = de_run_stos_pp2;
	mi->identify_fn = de_identify_stos_pp2;
	mi->help_fn = de_help_mbk;
}

// Assembly:
leaq 0x9a1aa(%rip), %rax     # 0x12fef8
movq %rax, (%rsi)
leaq 0x9a1a9(%rip), %rax     # 0x12ff01
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x95d7e
movq %rax, 0x18(%rsi)
leaq 0x1a(%rip), %rax        # 0x95d88
movq %rax, 0x20(%rsi)
leaq -0xe7(%rip), %rax       # 0x95c92
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_identify_stos_pp2
static int de_identify_stos_pp2(deark *c)
{
	int has_ext;
	int is_pkscr;
	UI res;

	has_ext = de_input_file_has_ext(c, "pp2");
	if(!has_ext) return 0;
	is_pkscr = is_stos_packedscreen(c, &res);
	if(is_pkscr && res==1) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9a167(%rip), %rsi     # 0x12fefd
callq 0xea936
testl %eax, %eax
je 0x95dc4
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x974b0
xorl %edx, %edx
cmpl $0x1, (%r14)
movl $0x64, %ecx
cmovnel %edx, %ecx
testl %eax, %eax
cmovel %eax, %ecx
jmp 0x95dc6
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_module_stos_pp3
void de_module_stos_pp3(deark *c, struct deark_module_info *mi)
{
	mi->id = "stos_pp3";
	mi->desc = "Picture Packer high res";
	mi->run_fn = de_run_stos_pp3;
	mi->identify_fn = de_identify_stos_pp3;
	mi->help_fn = de_help_mbk;
}

// Assembly:
leaq 0x9a141(%rip), %rax     # 0x12ff18
movq %rax, (%rsi)
leaq 0x9a140(%rip), %rax     # 0x12ff21
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x95e07
movq %rax, 0x18(%rsi)
leaq 0x1a(%rip), %rax        # 0x95e11
movq %rax, 0x20(%rsi)
leaq -0x170(%rip), %rax      # 0x95c92
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_identify_stos_pp3
static int de_identify_stos_pp3(deark *c)
{
	int has_ext;
	int is_pkscr;
	UI res;

	has_ext = de_input_file_has_ext(c, "pp3");
	if(!has_ext) return 0;
	is_pkscr = is_stos_packedscreen(c, &res);
	if(is_pkscr && res==1) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9a0fe(%rip), %rsi     # 0x12ff1d
callq 0xea936
testl %eax, %eax
je 0x95e4d
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x974b0
xorl %edx, %edx
cmpl $0x1, (%r14)
movl $0x64, %ecx
cmovnel %edx, %ecx
testl %eax, %eax
cmovel %eax, %ecx
jmp 0x95e4f
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_module_stos_daj
void de_module_stos_daj(deark *c, struct deark_module_info *mi)
{
	mi->id = "stos_daj";
	mi->desc = "Picture Packer DAJ";
	mi->run_fn = de_run_stos_daj;
	mi->identify_fn = de_identify_stos_daj;
	mi->help_fn = de_help_mbk;
}

// Assembly:
leaq 0x9a0d9(%rip), %rax     # 0x12ff39
movq %rax, (%rsi)
leaq 0x9a0d8(%rip), %rax     # 0x12ff42
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x95e90
movq %rax, 0x18(%rsi)
leaq 0x17(%rip), %rax        # 0x95e97
movq %rax, 0x20(%rsi)
leaq -0x1f9(%rip), %rax      # 0x95c92
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: de_identify_stos_daj
static int de_identify_stos_daj(deark *c)
{
	int has_ext;
	int is_pkscr;
	UI res;

	has_ext = de_input_file_has_ext(c, "daj");
	if(!has_ext) return 0;
	is_pkscr = is_stos_packedscreen(c, &res);
	if(is_pkscr && (res==0 || res==1)) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9a099(%rip), %rsi     # 0x12ff3e
callq 0xea936
testl %eax, %eax
je 0x95ed3
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x974b0
xorl %edx, %edx
cmpl $0x2, (%r14)
movl $0x64, %ecx
cmovael %edx, %ecx
testl %eax, %eax
cmovel %eax, %ecx
jmp 0x95ed5
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mbk.c
// Function: is_stos_packedscreen
static int is_stos_packedscreen(deark *c, UI *res)
{
	u8 buf[24];
	u8 is_mbk = 0;
	UI id = 0;
	UI field14;
	UI field18;
	i64 bpos = 0;

	*res = 0;
	de_read(buf, 0, sizeof(buf));

	if(!de_memcmp(buf, g_lion_sig, 10)) is_mbk = 1;
	if(is_mbk) {
		if((UI)de_getu32be_direct(&buf[10]) == 0) return 0; // screen out MBS
		if(buf[14] != 0x81) return 0; // must be type 'data'
		bpos = 18;
	}

	id = (UI)de_getu32be_direct(&buf[bpos]);
	if(id!=BANKID_PKSCREEN) return 0;
	*res = (UI)de_getu16be_direct(&buf[bpos+4]);
	if(*res > 2) return 0;

	field14 = (UI)de_getu16be_direct(&buf[bpos+14]);
	if(field14>=1 && field14<=6) {
		// It's likely that this is the AMOS format, not the STOS format.
		field18 = (UI)de_getu16be_direct(&buf[bpos+18]);
		// Expecting STOS flags to be small
		if(field18>=8) return 0;
	}
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl $0x0, (%rsi)
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
movq %rsp, %r15
movl $0x18, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xeeee8
movabsq $0x62756f706e6f694c, %rax # imm = 0x62756F706E6F694C
xorq (%r15), %rax
movzwl 0x8(%r15), %ecx
xorq $0x6b6e, %rcx           # imm = 0x6B6E
orq %rax, %rcx
movl $0x0, %r12d
jne 0x97520
leaq 0xa(%rsp), %rdi
callq 0xef325
testl %eax, %eax
je 0x97574
cmpb $-0x7f, 0xe(%rsp)
jne 0x97574
leaq 0x12(%rsp), %r15
movl $0x12, %r12d
movq %r15, %rdi
callq 0xef325
cmpl $0x6071963, %eax        # imm = 0x6071963
jne 0x97574
leaq (%rsp,%r12), %rdi
addq $0x4, %rdi
callq 0xef15e
movl %eax, (%r14)
cmpl $0x2, %eax
ja 0x97574
movq %rsp, %r14
leaq (%r12,%r14), %rdi
addq $0xe, %rdi
callq 0xef15e
decl %eax
cmpl $0x5, %eax
ja 0x9756f
leaq (%r12,%r14), %rdi
addq $0x12, %rdi
callq 0xef15e
testl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
jne 0x97574
movl $0x1, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mmm.c
// Function: de_module_mmm
void de_module_mmm(deark *c, struct deark_module_info *mi)
{
	mi->id = "mmm";
	mi->desc = "RIFF Multimedia Movie";
	mi->run_fn = de_run_mmm;
	mi->identify_fn = de_identify_mmm;
	mi->help_fn = de_help_mmm;
}

// Assembly:
leaq 0x98e4a(%rip), %rax     # 0x1303d5
movq %rax, (%rsi)
leaq 0x98e44(%rip), %rax     # 0x1303d9
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x975bb
movq %rax, 0x18(%rsi)
leaq 0x37d(%rip), %rax       # 0x97928
movq %rax, 0x20(%rsi)
leaq 0x3b4(%rip), %rax       # 0x9796a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mmm.c
// Function: my_mmm_handle_nonchunk_data_fn
static int my_mmm_handle_nonchunk_data_fn(struct de_iffctx *ictx,
	i64 pos, i64 *plen)
{
	u8 buf[6];

	dbuf_read(ictx->f, buf, pos, sizeof(buf));

	if(buf[0]<65 || buf[1]<65) {
		if(looks_like_a_4cc_b(&buf[2])) {
			*plen = 2;
			de_dbg(ictx->c, "[%"I64_FMT" non-RIFF bytes at %"I64_FMT"]", *plen, pos);
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
leaq 0x2(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rsi
movq %rbx, %rdx
callq 0xeeee8
xorl %eax, %eax
cmpb $0x41, (%r12)
jb 0x97dc9
cmpb $0x40, 0x3(%rsp)
ja 0x97e12
movq $-0x3, %rcx
movb 0x7(%rsp,%rcx), %dl
addb $-0x7f, %dl
cmpb $-0x5f, %dl
jb 0x97de8
leaq 0x1(%rcx), %rsi
testq %rcx, %rcx
movq %rsi, %rcx
jne 0x97dd0
cmpb $-0x5f, %dl
jb 0x97e12
movq $0x2, (%r14)
movq (%r15), %rdi
leaq 0x987d4(%rip), %rsi     # 0x1305d2
movl $0x2, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe9226
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mmm.c
// Function: do_mmm_cftc
static void do_mmm_cftc(deark *c, struct mmm_ctx *d, struct de_iffctx *ictx,
	i64 dpos1, i64 dlen)
{
	i64 nentries;
	i64 i;
	i64 pos;
	struct de_fourcc tmp4cc;

	if(dlen<4) goto done;
	nentries = (dlen-4)/16;

	pos = dpos1+4;
	for(i=0; i<nentries; i++) {
		int chk_id;
		i64 chk_pos;
		i64 chk_dlen;
		de_zeromem(&tmp4cc, sizeof(struct de_fourcc));
		dbuf_read_fourcc(ictx->f, pos, &tmp4cc, 4, 0);
		pos += 4;
		if(tmp4cc.id==0) break;
		chk_dlen = dbuf_getu32le_p(ictx->f, &pos);
		chk_id = (int)dbuf_geti32le_p(ictx->f, &pos);
		chk_pos = dbuf_getu32le_p(ictx->f, &pos);
		de_dbg(c, "toc entry '%s' id=%d pos=%"I64_FMT" dlen=%"I64_FMT,
			tmp4cc.id_sanitized_sz, chk_id, chk_pos, chk_dlen);
	}

done:
	;
}

// Assembly:
cmpq $0x4, %rcx
jl 0x97f40
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
addq $-0x4, %rbx
addq $0x4, %rdx
movq %rdx, 0x8(%rsp)
cmpq $0x10, %rbx
jb 0x97f32
movq %rsi, %r14
movq %rdi, %r15
shrq $0x4, %rbx
cmpq $0x1, %rbx
adcq $0x0, %rbx
leaq 0x8(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq 0x18(%r14), %rdi
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1d74
addq $0x4, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0x97f32
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xef3a0
movq %rax, %r13
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xef475
movq %rax, %r12
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xef3a0
movq %r15, %rdi
leaq 0x98590(%rip), %rsi     # 0x1304a4
leaq 0x18(%rsp), %rdx
movl %r12d, %ecx
movq %rax, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0xe9226
decq %rbx
jne 0x97ea6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mmm.c
// Function: mmm_read_name_p
static void mmm_read_name_p(deark *c, struct mmm_ctx *d, struct de_iffctx *ictx,
	i64 *ppos, const char *name)
{
	i64 pos = *ppos;
	i64 namelen;

	ucstring_empty(d->tmp_namestr);
	namelen = (i64)dbuf_getbyte(ictx->f, pos);
	if(namelen) {
		dbuf_read_to_ucstring(ictx->f, pos+1, namelen, d->tmp_namestr, 0, d->input_encoding);
		de_dbg(c, "%s: \"%s\"", (name ? name : "name"), ucstring_getpsz_d(d->tmp_namestr));
	}
	*ppos += de_pad_to_2(1+namelen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, (%rsp)
movq (%rcx), %rbp
movq 0x28(%rsi), %rdi
callq 0xf6883
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xef0d5
movzbl %al, %r15d
testb %r15b, %r15b
je 0x988ee
movq 0x18(%r14), %rdi
incq %rbp
movq 0x28(%r13), %rcx
movl 0xc(%r13), %r9d
movq %rbp, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0xf01b0
testq %r12, %r12
leaq 0x8fd59(%rip), %r14     # 0x128622
cmovneq %r12, %r14
movq 0x28(%r13), %rdi
callq 0xf7557
leaq 0x93565(%rip), %rsi     # 0x12be42
movq (%rsp), %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
leaq 0x1(%r15), %rdi
callq 0xea7d5
addq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mp3.c
// Function: de_module_apetag
void de_module_apetag(deark *c, struct deark_module_info *mi)
{
	mi->id = "apetag";
	mi->desc = "APE tag";
	mi->run_fn = de_run_apetag;
	mi->identify_fn = NULL;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0x97e83(%rip), %rax     # 0x130796
movq %rax, (%rsi)
leaq 0x97e80(%rip), %rax     # 0x13079d
movq %rax, 0x8(%rsi)
leaq 0x11(%rip), %rax        # 0x98939
movq %rax, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mp3.c
// Function: de_module_mpegaudio
void de_module_mpegaudio(deark *c, struct deark_module_info *mi)
{
	mi->id = "mpegaudio";
	mi->id_alias[0] = "mp3";
	mi->desc = "MP3 / MPEG audio";
	mi->run_fn = de_run_mpegaudio;
	mi->identify_fn = de_identify_mpegaudio;
}

// Assembly:
leaq 0x9782d(%rip), %rax     # 0x1307a5
movq %rax, (%rsi)
leaq 0x9782d(%rip), %rax     # 0x1307af
movq %rax, 0x38(%rsi)
leaq 0x97826(%rip), %rax     # 0x1307b3
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x98fa8
movq %rax, 0x18(%rsi)
leaq 0x5bd(%rip), %rax       # 0x99560
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mp3.c
// Function: de_module_monkeys_audio
void de_module_monkeys_audio(deark *c, struct deark_module_info *mi)
{
	mi->id = "monkeys_audio";
	mi->desc = "Monkey's Audio (.ape)";
	mi->run_fn = de_run_monkeys_audio;
	mi->identify_fn = de_identify_monkeys_audio;
}

// Assembly:
leaq 0x97107(%rip), %rax     # 0x1307c4
movq %rax, (%rsi)
leaq 0x9710b(%rip), %rax     # 0x1307d2
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x996e2
movq %rax, 0x18(%rsi)
leaq 0x85(%rip), %rax        # 0x99762
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mp3.c
// Function: de_run_monkeys_audio
static void de_run_monkeys_audio(deark *c, de_module_params *mparams)
{
	i64 endpos = c->infile->len;

	if(is_apetag_sig_at(c->infile, endpos-32)) {
		de_dbg(c, "APE tag found, ending at %"I64_FMT, endpos);
		de_dbg_indent(c, 1);
		de_run_module_by_id_on_slice2(c, "apetag", NULL, c->infile, 0, endpos);
		de_dbg_indent(c, -1);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x18(%rdi), %r14
leaq -0x20(%r14), %rsi
leaq 0x97115(%rip), %rdx     # 0x130811
movl $0x8, %ecx
callq 0xf025e
testl %eax, %eax
je 0x99712
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x97232(%rip), %rsi     # 0x13094b
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rcx
leaq 0x97058(%rip), %rsi     # 0x130796
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
movq %r14, %r9
callq 0xea66a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mp3.c
// Function: de_identify_monkeys_audio
static int de_identify_monkeys_audio(deark *c)
{
	unsigned int n;

	if(dbuf_memcmp(c->infile, 0, "MAC ", 4)) return 0;
	n = (unsigned int)de_getu16le(6);
	if(ma_is_known_cmpr(n)) return 100;
	n = (unsigned int)de_getu16le(52);
	if(ma_is_known_cmpr(n)) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x974bd(%rip), %rdx     # 0x130c31
xorl %r14d, %r14d
movl $0x4, %ecx
xorl %esi, %esi
callq 0xf025e
testl %eax, %eax
jne 0x997fc
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef1ca
leal -0x1389(%rax), %ecx
cmpl $0xfffff05f, %ecx       # imm = 0xFFFFF05F
jb 0x997c0
movl %eax, %ecx
imulq $0x10624dd3, %rcx, %rcx # imm = 0x10624DD3
shrq $0x26, %rcx
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
movl $0x64, %r14d
subl %ecx, %eax
je 0x997fc
movq 0x18(%rbx), %rdi
movl $0x34, %esi
callq 0xef1ca
leal -0x1389(%rax), %ecx
movl $0x0, %r14d
cmpl $0xfffff05f, %ecx       # imm = 0xFFFFF05F
jb 0x997fc
imull $0x26e978d5, %eax, %eax # imm = 0x26E978D5
rorl $0x3, %eax
xorl %ecx, %ecx
cmpl $0x418938, %eax         # imm = 0x418938
movl $0x64, %r14d
cmovael %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: de_module_mscompress
void de_module_mscompress(deark *c, struct deark_module_info *mi)
{
	mi->id = "mscompress";
	mi->desc = "MS-DOS Installation Compression";
	mi->run_fn = de_run_mscompress;
	mi->identify_fn = de_identify_mscompress;
	mi->flags |= DE_MODFLAG_MULTIPART;
}

// Assembly:
leaq 0x975aa(%rip), %rax     # 0x130db9
movq %rax, (%rsi)
leaq 0x975ab(%rip), %rax     # 0x130dc4
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x99838
movq %rax, 0x18(%rsi)
leaq 0x1226(%rip), %rax      # 0x9aa55
movq %rax, 0x20(%rsi)
orb $0x40, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: de_module_is_ibt
void de_module_is_ibt(deark *c, struct deark_module_info *mi)
{
	mi->id = "is_ibt";
	mi->desc = "InstallShield IBT archive";
	mi->run_fn = de_run_is_ibt;
	mi->identify_fn = de_identify_is_ibt;
}

// Assembly:
leaq 0x96376(%rip), %rax     # 0x130de4
movq %rax, (%rsi)
leaq 0x96373(%rip), %rax     # 0x130deb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9aa93
movq %rax, 0x18(%rsi)
leaq 0x312(%rip), %rax       # 0x9ada0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: de_module_mrnz
void de_module_mrnz(deark *c, struct deark_module_info *mi)
{
	mi->id = "mrnz";
	mi->desc = "MRNZ obfuscated file";
	mi->run_fn = de_run_mrnz;
	mi->identify_fn = de_identify_mrnz;
}

// Assembly:
leaq 0x96038(%rip), %rax     # 0x130e05
movq %rax, (%rsi)
leaq 0x96033(%rip), %rax     # 0x130e0a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9adf2
movq %rax, 0x18(%rsi)
leaq 0xb9(%rip), %rax        # 0x9aea6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: de_run_mrnz
static void de_run_mrnz(deark *c, de_module_params *mparams)
{
	dbuf *outf = NULL;
	i64 ipos;
	i64 i;
	i64 ocount;
	u8 errflag = 0;

	ipos = 8;
	// Guessing that this is the number of obfuscated bytes
	ocount = de_getu32le_p(&ipos);
	if(ocount>0xff) {
		errflag = 1;
		goto done;
	}

	outf = dbuf_create_output_file(c, "bin", NULL, 0);
	for(i=0; i<ocount; i++) {
		u8 b;

		if(ipos >= c->infile->len) goto done;
		b = de_getbyte_p(&ipos);
		dbuf_writebyte(outf, b^0xae);
	}

	dbuf_copy(c->infile, ipos, c->infile->len-ipos, outf);

done:
	dbuf_close(outf);
	if(errflag) {
		de_err(c, "Failed to decode MRNZ file");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rsi
movq $0x8, (%rsi)
movq 0x18(%rdi), %rdi
callq 0xef3a0
cmpq $0xff, %rax
jg 0x9ae82
movq %rax, %r15
leaq 0x9a60f(%rip), %rsi     # 0x135431
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
testq %r15, %r15
jle 0x9ae61
movq %rsp, %r12
movq (%rsp), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jge 0x9ae78
movq %r12, %rsi
callq 0xef14d
xorb $-0x52, %al
movzbl %al, %esi
movq %r14, %rdi
callq 0xf11be
decq %r15
jne 0x9ae39
movq 0x18(%rbx), %rdi
movq (%rsp), %rsi
movq 0x18(%rdi), %rdx
subq %rsi, %rdx
movq %r14, %rcx
callq 0xefabc
movq %r14, %rdi
callq 0xf0b13
jmp 0x9ae9a
xorl %edi, %edi
callq 0xf0b13
leaq 0x96283(%rip), %rsi     # 0x131113
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: detect_fmt_internal
static int detect_fmt_internal(deark *c)
{
	u8 buf[8];

	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, "\x53\x5a\x44\x44\x88\xf0\x27\x33", 8))
		return FMT_SZDD;
	if(!de_memcmp(buf, "\x4b\x57\x41\x4a\x88\xf0\x27\xd1", 8))
		return FMT_KWAJ;
	if(!de_memcmp(buf, "SZ \x88\xf0\x27\x33", 7))
		return FMT_SZ;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rdi), %rdi
leaq 0x8(%rsp), %rbx
movl $0x8, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xeeee8
movabsq $0x3327f08844445a53, %rax # imm = 0x3327F08844445A53
cmpq %rax, (%rbx)
je 0x9af27
movabsq $-0x2ed80f77b5bea8b5, %rax # imm = 0xD127F0884A41574B
cmpq %rax, 0x8(%rsp)
je 0x9af2e
movl $0x88205a53, %eax       # imm = 0x88205A53
xorl 0x8(%rsp), %eax
movl $0x3327f088, %ecx       # imm = 0x3327F088
xorl 0xb(%rsp), %ecx
xorl %edx, %edx
orl %eax, %ecx
sete %dl
leal (%rdx,%rdx,2), %eax
jmp 0x9af33
movl $0x1, %eax
jmp 0x9af33
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: get_cmpr_meth_name
static const char *get_cmpr_meth_name(UI n)
{
	char *name = NULL;

	switch(n) {
	case CMPR_NONE: name="uncompressed"; break;
	case CMPR_XOR: name="XOR"; break;
	case CMPR_LZSS16: case CMPR_LZSS18: name="LZSS"; break;
	case CMPR_LZHUFF: name="LZ+Huffman"; break;
	case CMPR_MSZIP: name="MSZIP"; break;
	}
	return name?name:"?";
}

// Assembly:
cmpl $0x4, %edi
ja 0x9af58
movl %edi, %eax
leaq 0x95e49(%rip), %rcx     # 0x130d90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xaee81(%rip), %rax     # 0x149dd8
retq
cmpl $0x10000, %edi          # imm = 0x10000
jne 0x9af68
leaq 0x8afd1(%rip), %rax     # 0x125f38
retq
leaq 0x90efa(%rip), %rax     # 0x12be69
retq
leaq 0x7e32b(%rip), %rax     # 0x1192a2
retq
leaq 0x8db76(%rip), %rax     # 0x128af5
retq
leaq 0x95f76(%rip), %rax     # 0x130efd
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: XOR_cbfn
static int XOR_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	i64 k;
	dbuf *f = (dbuf*)brctx->userdata;

	for(k=0; k<buf_len; k++) {
		dbuf_writebyte(f, buf[k] ^ (u8)0xff);
	}
	return 1;
}

// Assembly:
testq %rdx, %rdx
jle 0x9afc7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %r15
xorl %r12d, %r12d
movzbl (%r14,%r12), %esi
xorl $0xff, %esi
movq %r15, %rdi
callq 0xf11be
incq %r12
cmpq %r12, %rbx
jne 0x9afa1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_lz77buf_writebytecb
static void mslzh_lz77buf_writebytecb(struct de_lz77buffer *rb, u8 n)
{
	struct mslzh_context *lzhctx = (struct mslzh_context*)rb->userdata;

	if(mslzh_have_enough_output(lzhctx)) return;
	dbuf_writebyte(lzhctx->dcmpro->f, n);
	lzhctx->nbytes_written++;
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
movq 0x8(%rbx), %rax
cmpb $0x0, 0x8(%rax)
je 0x9afe5
movq 0x10(%rbx), %rcx
cmpq 0x10(%rax), %rcx
jge 0x9aff5
movq (%rax), %rdi
movzbl %sil, %esi
callq 0xf11be
incq 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_getnextcode
static MSLZH_VALUE_TYPE mslzh_getnextcode(struct mslzh_context *lzhctx,
	struct mslzh_tree *htr)
{
	fmtutil_huffman_valtype val = 0;
	int ret;

	fmtutil_huffman_reset_cursor(htr->fmtuht->cursor); // Should be unnecessary

	ret = fmtutil_huffman_read_next_value(htr->fmtuht->bk, &lzhctx->bitrd, &val, NULL);
	if(!ret) return 0;
	return (MSLZH_VALUE_TYPE)val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq 0x10(%rsi), %rax
movq (%rax), %rdi
callq 0x1048fa
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rdi
addq $0x20, %r14
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x104b4d
testl %eax, %eax
je 0x9b03f
movl 0xc(%rsp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mscompress.c
// Function: read_sz_p
static int read_sz_p(dbuf *f, i64 maxlen, de_ucstring *s, de_encoding enc, i64 *ppos)
{
	i64 startpos = *ppos;
	i64 foundpos;
	i64 len;
	int ret;

	ret = dbuf_search_byte(f, 0x00, startpos, maxlen, &foundpos);
	if(!ret) return 0;
	len = foundpos - startpos; // length w/o NUL
	dbuf_read_to_ucstring(f, startpos, len, s, 0, enc);
	*ppos = foundpos+1;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r12
movq (%rcx), %r15
xorl %r13d, %r13d
movq %rsp, %r8
movl $0x50, %ecx
xorl %esi, %esi
movq %r15, %rdx
callq 0xf0057
testl %eax, %eax
je 0x9b0a6
movq (%rsp), %rdx
subq %r15, %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0xf01b0
movq (%rsp), %rax
incq %rax
movq %rax, (%rbx)
movl $0x1, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mac-arch.c
// Function: de_module_tome
void de_module_tome(deark *c, struct deark_module_info *mi)
{
	mi->id = "tome";
	mi->desc = "Tome";
	mi->run_fn = de_run_tome;
	mi->identify_fn = de_identify_tome;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
leaq 0x96078(%rip), %rax     # 0x131137
movq %rax, (%rsi)
leaq 0x96073(%rip), %rax     # 0x13113c
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x9b0e8
movq %rax, 0x18(%rsi)
leaq 0x653(%rip), %rax       # 0x9b732
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mac-arch.c
// Function: destroy_tome_md
static void destroy_tome_md(deark *c, struct tome_md *md)
{
	if(!md) return;
	de_advfile_destroy(md->advf);
	de_destroy_stringreaderdata(c, md->fname);
	de_free(c, md);
}

// Assembly:
testq %rsi, %rsi
je 0x9b785
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
callq 0xfca9a
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0xf00aa
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mac-arch.c
// Function: tome_read_timestamp
static void tome_read_timestamp(deark *c, struct tome_ctx *d, struct tome_md *md,
	i64 pos, UI tzi, const char *name)
{
	i64 n;
	struct de_timestamp ts;
	char timestamp_buf[64];

	n = dbuf_getu32be(c->infile, pos);
	de_mac_time_to_timestamp(n, &ts);
	de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s time: %"U64_FMT" (%s)", name, n, timestamp_buf);
	md->advf->mainfork.fi->timestamp[tzi] = ts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r15
movl %ecx, 0xc(%rsp)
movq %rsi, %r14
movq %rdi, %r13
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef32a
movq %rax, %rbp
leaq 0x10(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0xeae04
leaq 0x20(%rsp), %rbx
movl $0x40, %edx
movq %r12, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0x95a53(%rip), %rsi     # 0x131231
movq %r13, %rdi
movq %r15, %rdx
movq %rbp, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0xe9226
movq 0x30(%r14), %rax
movq 0x20(%rax), %rax
movl 0xc(%rsp), %ecx
shlq $0x4, %rcx
movups (%r12), %xmm0
movups %xmm0, 0x18(%rax,%rcx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mac-arch.c
// Function: tome_writelistener
static void tome_writelistener(dbuf *f, void *userdata, const u8 *buf, i64 buf_len)
{
	struct tome_fork_data *fdata = (struct tome_fork_data*)userdata;
	struct tome_md *md = fdata->md;
	i64 i;

	for(i=0; i<buf_len; i++) {
		md->frk[fdata->forknum].checksum_calc = (u32)buf[i] ^
			((u32)(md->frk[fdata->forknum].checksum_calc >> 0x18) +
				(u32)(md->frk[fdata->forknum].checksum_calc <<8));
	}
}

// Assembly:
testq %rcx, %rcx
jle 0x9b84b
movq (%rsi), %rax
movl 0x8(%rsi), %esi
imulq $0x38, %rsi, %rsi
addq %rsi, %rax
addq $0xd4, %rax
movl (%rax), %esi
xorl %edi, %edi
movzbl (%rdx,%rdi), %r8d
roll $0x8, %esi
xorl %r8d, %esi
movl %esi, (%rax)
incq %rdi
cmpq %rdi, %rcx
jne 0x9b836
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/mac-arch.c
// Function: tome_advfile_cbfn
static int tome_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	UI forknum;
	struct tome_md *md = (struct tome_md*)advf->userdata;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		forknum = 0;
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		forknum = 1;
	}
	else {
		return 0;
	}

	if(md->frk[forknum].is_compressed) {
		tome_decompress_fork(md, forknum, afp->outf);
	}
	else {
		tome_copy_fork(md, forknum, afp->outf);
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rsi), %rbp
movl (%rdx), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
je 0x9b878
cmpl $0x2, %ecx
jne 0x9b9d5
movl $0x1, %eax
leaq 0xc0(%rbp), %r15
movl %eax, %r13d
imulq $0x38, %r13, %r12
cmpb $0x0, 0xcc(%rbp,%r12)
movq 0x8(%rdx), %r14
je 0x9b95f
movq (%rbp), %rbx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xe958c
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %rbx, %rdi
callq 0xfa6e0
imull $0x3e8, 0x10(%rbp), %eax # imm = 0x3E8
orl %r13d, %eax
leaq 0x28(%rsp), %rsi
movl %eax, 0x18(%rsi)
movq 0x18(%rbx), %rax
movq %rax, (%rsi)
leaq (%r15,%r12), %r13
movq 0x20(%r15,%r12), %rax
movq %rax, 0x8(%rsi)
movq 0x28(%r15,%r12), %rax
movq %rax, 0x10(%rsi)
leaq 0x10(%rsp), %rdx
movq %r14, (%rdx)
movb $0x1, 0x8(%rdx)
movq 0x18(%r15,%r12), %rax
movq %rax, 0x10(%rdx)
movq %rbx, %rdi
leaq 0x48(%rsp), %r14
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x102160
cmpl $0x0, (%r14)
je 0x9b9bf
movq 0x38(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xf7557
movq %rax, %r14
addq $0x30, %r13
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0x791f4(%rip), %rsi     # 0x114b3e
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xe9df7
jmp 0x9b9c4
leaq (%r15,%r12), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%r15,%r12), %rbx
testq %rbx, %rbx
jle 0x9b9b4
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r13
leaq 0x4(%r13), %r15
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0xea792
movq %rax, %r12
movq 0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xefabc
addq %r12, %r13
addq $0x4, %r13
subq %r12, %rbx
jg 0x9b97b
movq 0x8(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x9b9d0
movb $0x1, 0xd(%r13)
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
movl $0x1, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/msp.c
// Function: de_module_msp
void de_module_msp(deark *c, struct deark_module_info *mi)
{
	mi->id = "msp";
	mi->desc = "Microsoft Paint image";
	mi->run_fn = de_run_msp;
	mi->identify_fn = de_identify_msp;
}

// Assembly:
leaq 0x95854(%rip), %rax     # 0x131243
movq %rax, (%rsi)
leaq 0x9584e(%rip), %rax     # 0x131247
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9ba14
movq %rax, 0x18(%rsi)
leaq 0x37e(%rip), %rax       # 0x9bd8d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/msp.c
// Function: de_identify_msp
static int de_identify_msp(deark *c)
{
	u8 b[4];
	de_read(b, 0, 4);

	if(b[0]==0x44 && b[1]==0x61 && b[2]==0x6e && b[3]==0x4d)
		return 100;
	if(b[0]==0x4c && b[1]==0x69 && b[2]==0x6e && b[3]==0x53)
		return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
leaq 0x4(%rsp), %rbx
movl $0x4, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xeeee8
movb (%rbx), %dl
movb 0x1(%rbx), %cl
movl %edx, %eax
xorb $0x44, %al
movl %ecx, %r8d
xorb $0x61, %r8b
orb %al, %r8b
movb 0x2(%rbx), %sil
xorb $0x6e, %sil
orb %sil, %r8b
movb 0x3(%rbx), %dil
movl %edi, %r9d
xorb $0x4d, %r9b
movl $0x64, %eax
orb %r8b, %r9b
je 0x9bdf8
xorb $0x4c, %dl
xorb $0x69, %cl
orb %dl, %cl
xorb $0x53, %dil
orb %dil, %sil
orb %cl, %sil
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nokia.c
// Function: de_module_nol
void de_module_nol(deark *c, struct deark_module_info *mi)
{
	mi->id = "nol";
	mi->desc = "Nokia Operator Logo";
	mi->run_fn = de_run_nol;
	mi->identify_fn = de_identify_nol;
}

// Assembly:
leaq 0x954c2(%rip), %rax     # 0x1312c9
movq %rax, (%rsi)
leaq 0x954bc(%rip), %rax     # 0x1312cd
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9be2c
movq %rax, 0x18(%rsi)
leaq 0x7f(%rip), %rax        # 0x9bea6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nokia.c
// Function: de_run_nol
static void de_run_nol(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

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

	d->w = de_getu16le(10);
	d->h = de_getu16le(12);
	de_dbg_dimensions(c, d->w, d->h);
	if(!de_good_image_dimensions(c, d->w, d->h)) goto done;

	nol_ngg_read_bitmap(c, d, 20);
done:
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x18, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xef1ca
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movl $0xc, %esi
callq 0xef1ca
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe9b05
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf241d
testl %eax, %eax
je 0x9be94
movl $0x14, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c327
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nokia.c
// Function: de_module_ngg
void de_module_ngg(deark *c, struct deark_module_info *mi)
{
	mi->id = "ngg";
	mi->desc = "Nokia Group Graphic";
	mi->run_fn = de_run_ngg;
	mi->identify_fn = de_identify_ngg;
}

// Assembly:
leaq 0x9540e(%rip), %rax     # 0x1312e1
movq %rax, (%rsi)
leaq 0x95408(%rip), %rax     # 0x1312e5
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9bef8
movq %rax, 0x18(%rsi)
leaq 0x7f(%rip), %rax        # 0x9bf72
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nokia.c
// Function: de_run_ngg
static void de_run_ngg(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

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

	d->w = de_getu16le(6);
	d->h = de_getu16le(8);
	de_dbg_dimensions(c, d->w, d->h);
	if(!de_good_image_dimensions(c, d->w, d->h)) goto done;

	nol_ngg_read_bitmap(c, d, 16);
done:
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x18, %esi
callq 0xe969b
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef1ca
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xef1ca
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe9b05
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf241d
testl %eax, %eax
je 0x9bf60
movl $0x10, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c327
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/nokia.c
// Function: de_module_npm
void de_module_npm(deark *c, struct deark_module_info *mi)
{
	mi->id = "npm";
	mi->desc = "Nokia Picture Message";
	mi->run_fn = de_run_npm;
	mi->identify_fn = de_identify_npm;
}

// Assembly:
leaq 0x9535a(%rip), %rax     # 0x1312f9
movq %rax, (%rsi)
leaq 0x95354(%rip), %rax     # 0x1312fd
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9bfc4
movq %rax, 0x18(%rsi)
leaq 0x12a(%rip), %rax       # 0x9c0e9
movq %rax, 0x20(%rsi)
retq