LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pklite.c
// Function: read_pklite_code_using_tree
static UI read_pklite_code_using_tree(deark *c, struct decompr_internal_state *dctx,
	struct fmtutil_huffman_decoder *ht)
{
	int ret;
	fmtutil_huffman_valtype val = 0;

	while(1) {
		u8 b;

		b = pklite_getbit(c, dctx);
		if(dctx->d->errflag) goto done;

		ret = fmtutil_huffman_decode_bit(ht->bk, ht->cursor, b, &val);
		if(ret==1) goto done; // finished the code
		if(ret!=2) {
			dctx->d->errflag = 1;
			goto done;
		}
	}
done:
	return val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x4(%rsp), %r12
movl $0x0, (%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xbcd94
movq (%rbx), %rcx
cmpb $0x0, (%rcx)
jne 0xbce29
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movzbl %al, %edx
movq %r12, %rcx
callq 0x1046a2
cmpl $0x2, %eax
je 0xbcdf4
cmpl $0x1, %eax
je 0xbce29
movq (%rbx), %rax
movb $0x1, (%rax)
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pklite.c
// Function: huffman_make_tree_from_u16array
static void huffman_make_tree_from_u16array(deark *c,
	struct fmtutil_huffman_decoder **htp,
	const u16 *lengths_and_codes, UI ncodes,
	const char *dbgtitle)
{
	UI n;
	char b2buf[72];

	if(*htp) return;
	*htp = fmtutil_huffman_create_decoder(c, ncodes, ncodes);
	if(dbgtitle) {
		de_dbg3(c, "[%s codebook]", dbgtitle);
	}
	de_dbg_indent(c, 1);
	for(n=0; n<ncodes; n++) {
		UI nbits;
		u64 code;

		nbits = ((UI)lengths_and_codes[n])>>12;
		code = ((u64)lengths_and_codes[n]) & 0x0fff;

		if(dbgtitle && c->debug_level>=3) {
			de_dbg3(c, "code: \"%s\" = %d",
				de_print_base2_fixed(b2buf, sizeof(b2buf), code, nbits), (int)n);
		}
		fmtutil_huffman_add_code(c, (*htp)->bk, code, nbits,
			(fmtutil_huffman_valtype)n);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
cmpq $0x0, (%rsi)
je 0xbce40
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movl %ecx, %ebx
movq %rsi, %r12
movq %rdi, %r14
movq %rdx, 0x8(%rsp)
movl %ecx, %edx
movq %rdx, %rsi
movq %rdx, (%rsp)
callq 0x104d0e
movq %rax, (%r12)
testq %r13, %r13
je 0xbce89
leaq 0x7bce8(%rip), %rsi     # 0x138b64
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe889f
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
testl %ebx, %ebx
je 0xbcf09
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movzwl (%rax,%rbp,2), %r15d
movl %r15d, %ebx
shrl $0xc, %ebx
andl $0xfff, %r15d           # imm = 0xFFF
testq %r13, %r13
je 0xbcee8
cmpl $0x3, (%r14)
jl 0xbcee8
movl $0x48, %esi
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
movl %ebx, %ecx
callq 0xe9d03
movq %r14, %rdi
leaq 0x61588(%rip), %rsi     # 0x11e464
movq %rax, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe889f
movq (%r12), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
movq %r15, %rdx
movl %ebx, %ecx
movl %ebp, %r8d
callq 0x1044c1
incq %rbp
cmpq %rbp, (%rsp)
jne 0xbce9c
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pklite.c
// Function: detect_pklite_com_quick
static int detect_pklite_com_quick(dbuf *f, i64 *pverpos)
{
	u8 b[10];

	dbuf_read(f, b, 0, sizeof(b));
	if(b[0]==0xb8 && b[3]==0xba && b[6]==0x3b && b[7]==0xc4) {
		if(b[9]==0x67) { // Probably v1.00-1.14
			*pverpos = 44;
			return 1;
		}
		else if(b[9]==0x69) { // Probably v1.15 (usually mislabeled as 1.14)
			*pverpos = 46;
			return 1;
		}
	}
	else if(b[0]==0x50 && b[1]==0xb8 && b[4]==0xba && b[7]==0x3b) {
		*pverpos = 46; // v1.50-2.01
		return 1;
	}
	else if(b[0]==0xba && b[3]==0xa1 && b[6]==0x2d && b[7]==0x20) {
		*pverpos = 36; // v1.00beta
		return 1;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
xorl %r14d, %r14d
leaq 0x6(%rsp), %r15
movl $0xa, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xee8d4
movb (%r15), %dl
movb 0x3(%r15), %al
movl %edx, %ecx
xorb $-0x48, %cl
movl %eax, %esi
xorb $-0x46, %sil
orb %cl, %sil
movb 0x6(%r15), %cl
movl %ecx, %edi
xorb $0x3b, %dil
orb %sil, %dil
movb 0x7(%r15), %sil
movl %esi, %r8d
xorb $-0x3c, %r8b
orb %dil, %r8b
jne 0xbcf90
movzbl 0xf(%rsp), %eax
cmpl $0x67, %eax
je 0xbcfde
cmpl $0x69, %eax
jne 0xbcfec
movl $0x2e, %edi
jmp 0xbcfe3
movl %edx, %edi
xorb $0x50, %dil
movb 0x7(%rsp), %r8b
movb 0xa(%rsp), %r9b
xorb $-0x48, %r8b
orb %dil, %r8b
xorb $-0x46, %r9b
orb %r8b, %r9b
movl %esi, %r8d
xorb $0x3b, %r8b
movl $0x2e, %edi
orb %r9b, %r8b
je 0xbcfe3
xorb $-0x46, %dl
xorb $-0x5f, %al
orb %dl, %al
xorb $0x2d, %cl
orb %al, %cl
xorb $0x20, %sil
xorl %r14d, %r14d
movl $0x24, %edi
orb %cl, %sil
je 0xbcfe3
jmp 0xbcfec
movl $0x2c, %edi
movq %rdi, (%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pif.c
// Function: de_module_pif
void de_module_pif(deark *c, struct deark_module_info *mi)
{
	mi->id = "pif";
	mi->desc = "Windows Program Information File";
	mi->identify_fn = de_identify_pif;
	mi->run_fn = de_run_pif;
	mi->help_fn = de_help_pif;
}

// Assembly:
leaq 0x7c188(%rip), %rax     # 0x13918b
movq %rax, (%rsi)
leaq 0x7c182(%rip), %rax     # 0x13918f
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbd033
movq %rax, 0x20(%rsi)
leaq 0x8d(%rip), %rax        # 0xbd0b0
movq %rax, 0x18(%rsi)
leaq 0x89(%rip), %rax        # 0xbd0b7
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pif.c
// Function: de_identify_pif
static int de_identify_pif(deark *c)
{
	int maybe_oldfmt = 0;
	int has_id = 0;
	int has_ext;

	if(c->infile->len == PIF_BASIC_SECTION_SIZE) {
		maybe_oldfmt = 1;
	}
	else if(c->infile->len >= PIF_BASIC_SECTION_SIZE+22) {
		has_id = !dbuf_memcmp(c->infile, PIF_BASIC_SECTION_SIZE,
			(const u8*)"MICROSOFT PIFEX\0", 16);
	}

	if(!maybe_oldfmt && !has_id) return 0;
	has_ext = de_input_file_has_ext(c, "pif");
	if(maybe_oldfmt) {
		return has_ext ? 24 : 0;
	}
	return has_ext ? 100 : 35;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x18(%rdi), %rax
cmpq $0x171, %rax            # imm = 0x171
jne 0xbd065
leaq 0x7c13a(%rip), %rsi     # 0x13918b
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
movl $0x18, %ebx
cmovel %eax, %ebx
jmp 0xbd089
xorl %ebx, %ebx
cmpq $0x187, %rax            # imm = 0x187
jl 0xbd089
leaq 0x7c3ca(%rip), %rdx     # 0x139440
movl $0x171, %esi            # imm = 0x171
movl $0x10, %ecx
callq 0xefc85
testl %eax, %eax
je 0xbd093
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7c0f1(%rip), %rsi     # 0x13918b
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
movl $0x23, %eax
movl $0x64, %ebx
jmp 0xbd060
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pif.c
// Function: de_module_desqview_dvp
void de_module_desqview_dvp(deark *c, struct deark_module_info *mi)
{
	mi->id = "desqview_dvp";
	mi->desc = "DESQview Program Information File";
	mi->identify_fn = de_identify_desqview_dvp;
	mi->run_fn = de_run_desqview_dvp;
}

// Assembly:
leaq 0x7c0e4(%rip), %rax     # 0x1391b0
movq %rax, (%rsi)
leaq 0x7c0e7(%rip), %rax     # 0x1391bd
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbd0f1
movq %rax, 0x20(%rsi)
leaq 0x51(%rip), %rax        # 0xbd13d
movq %rax, 0x18(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pif.c
// Function: de_identify_desqview_dvp
static int de_identify_desqview_dvp(deark *c)
{
	int has_ext;

	if(c->infile->len!=416) return 0;
	if(de_getbyte(0) != 0x00) return 0;
	has_ext = de_input_file_has_ext(c, "dvp");
	if(has_ext) return 40;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0x1a0, 0x18(%rdi)      # imm = 0x1A0
jne 0xbd132
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeead3
testb %al, %al
jne 0xbd132
leaq 0x7c09b(%rip), %rsi     # 0x1391b9
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x28, %r14d
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_module_printshop
void de_module_printshop(deark *c, struct deark_module_info *mi)
{
	mi->id = "printshop";
	mi->desc = "The Print Shop .DAT/.NAM";
	mi->run_fn = de_run_printshop;
	mi->identify_fn = de_identify_printshop;
}

// Assembly:
leaq 0x7b8fd(%rip), %rax     # 0x13948c
movq %rax, (%rsi)
leaq 0x7b8d7(%rip), %rax     # 0x139470
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbdbb4
movq %rax, 0x18(%rsi)
leaq 0x4b(%rip), %rax        # 0xbdbfa
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_run_printshop
static void de_run_printshop(deark *c, de_module_params *mparams)
{
	lctx *d;
	d = de_malloc(c, sizeof(lctx));
	d->fmt = PRINTSHOP_FMT_DAT;
	de_declare_fmt(c, "The Print Shop (DAT/NAM)");
	do_printshop_etc(c, d);
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x1, (%rax)
leaq 0x7b925(%rip), %rsi     # 0x1394fa
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbdebd
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_module_newprintshop
void de_module_newprintshop(deark *c, struct deark_module_info *mi)
{
	// There's no surefire way to distinguish between Print Shop and
	// New Print Shop files, so it's more convenient to put them in separate
	// modules (so the user can simply use -m to select the format).
	mi->id = "newprintshop";
	mi->desc = "The New Print Shop .POG/.PNM";
	mi->run_fn = de_run_newprintshop;
	mi->identify_fn = de_identify_newprintshop;
}

// Assembly:
leaq 0x7b836(%rip), %rax     # 0x139489
movq %rax, (%rsi)
leaq 0x7b839(%rip), %rax     # 0x139496
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbdc78
movq %rax, 0x18(%rsi)
leaq 0x4b(%rip), %rax        # 0xbdcbe
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_run_newprintshop
static void de_run_newprintshop(deark *c, de_module_params *mparams)
{
	lctx *d;
	d = de_malloc(c, sizeof(lctx));
	d->fmt = PRINTSHOP_FMT_POG;
	de_declare_fmt(c, "The New Print Shop (POG/PNM)");
	do_printshop_etc(c, d);
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x2, (%rax)
leaq 0x7b90e(%rip), %rsi     # 0x1395a7
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbdebd
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_module_printmaster
void de_module_printmaster(deark *c, struct deark_module_info *mi)
{
	mi->id = "printmaster";
	mi->desc = "PrintMaster .SHP/.SDR";
	mi->run_fn = de_run_printmaster;
	mi->identify_fn = de_identify_printmaster;
}

// Assembly:
leaq 0x7b793(%rip), %rax     # 0x1394b3
movq %rax, (%rsi)
leaq 0x7b795(%rip), %rax     # 0x1394bf
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbdd45
movq %rax, 0x18(%rsi)
leaq 0x4b(%rip), %rax        # 0xbdd8b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_run_printmaster
static void de_run_printmaster(deark *c, de_module_params *mparams)
{
	lctx *d;
	d = de_malloc(c, sizeof(lctx));
	d->fmt = PRINTSHOP_FMT_SHP;
	de_declare_fmt(c, "PrintMaster (SHP/SDR)");
	do_printshop_etc(c, d);
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x3, (%rax)
leaq 0x7b862(%rip), %rsi     # 0x1395c8
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbdebd
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_identify_printmaster
static int de_identify_printmaster(deark *c)
{
	u8 b[4];
	int sdr_ext;

	sdr_ext = de_input_file_has_ext(c, "sdr");
	de_read(b, 0, 4);
	if(!de_memcmp(b, "\x0b\x34\x58", 3)) {
		return sdr_ext ? 90 : 10;
	}
	if(!sdr_ext) return 0;
	if(b[0]==0x0b) return 30;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x7b841(%rip), %rsi     # 0x1395de
callq 0xea491
movl %eax, %ebp
movq 0x18(%rbx), %rdi
xorl %ebx, %ebx
leaq 0xc(%rsp), %r14
movl $0x4, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xee8d4
movzwl (%r14), %eax
xorl $0x340b, %eax           # imm = 0x340B
movzbl 0x2(%r14), %ecx
xorl $0x58, %ecx
orw %ax, %cx
je 0xbdde9
testl %ebp, %ebp
je 0xbddf8
xorl %eax, %eax
cmpb $0xb, 0xc(%rsp)
movl $0x1e, %ebx
cmovnel %eax, %ebx
jmp 0xbddf8
testl %ebp, %ebp
movl $0xa, %eax
movl $0x5a, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_module_printshop_gs
void de_module_printshop_gs(deark *c, struct deark_module_info *mi)
{
	mi->id = "printshop_gs";
	mi->desc = "Print Shop - Apple IIgs";
	mi->run_fn = de_run_printshop_gs;
	mi->identify_fn = NULL;
}

// Assembly:
leaq 0x7b6cb(%rip), %rax     # 0x1394d5
movq %rax, (%rsi)
leaq 0x7b6ce(%rip), %rax     # 0x1394e2
movq %rax, 0x8(%rsi)
leaq 0xd(%rip), %rax         # 0xbde2c
movq %rax, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/printshop.c
// Function: de_run_printshop_gs
static void de_run_printshop_gs(deark *c, de_module_params *mparams)
{
	de_bitmap *img = NULL;
	de_finfo *fi = NULL;
	static const de_color pal[8] = {
		0xffffffffU,0xffffff00U,0xffff0000U,0xffff6600U,
		0xff0000ffU,0xff00ff00U,0xffcc00ccU,0xff000000U };

	img = de_bitmap_create(c, 88, 52, 3);
	fi = de_finfo_create(c);
	fi->density.code = DE_DENSITY_UNK_UNITS;
	// I don't know what the density ratio should be.
	// But 88:52 (1.692:1), making the images square, seems pretty close
	// to what was intended.
	fi->density.xdens = 88.0;
	fi->density.ydens = 52.0;
	de_convert_image_paletted_planar(c->infile, 0, 3, 11, 11*52, pal, img, 0x2);
	de_bitmap_write_to_file_finfo(img, fi, DE_CREATEFLAG_OPT_IMAGE);
	de_bitmap_destroy(img);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x58, %esi
movl $0x34, %edx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r14
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movl $0x1, 0x78(%rax)
movaps 0x7b5fc(%rip), %xmm0    # 0x139460
movups %xmm0, 0x80(%rax)
movq 0x18(%rbx), %rdi
leaq 0x7b77a(%rip), %r9      # 0x1395f0
movl $0x3, %edx
movl $0xb, %ecx
movl $0x23c, %r8d            # imm = 0x23C
xorl %esi, %esi
pushq $0x2
pushq %r14
callq 0xf30b3
addq $0x10, %rsp
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0xf22d0
movq %r14, %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xea50e
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psf.c
// Function: de_module_psf
void de_module_psf(deark *c, struct deark_module_info *mi)
{
	mi->id = "psf";
	mi->desc = "PC Screen Font";
	mi->run_fn = de_run_psf;
	mi->identify_fn = de_identify_psf;
	mi->help_fn = de_help_psf;
}

// Assembly:
leaq 0x7b40d(%rip), %rax     # 0x139610
movq %rax, (%rsi)
leaq 0x7b407(%rip), %rax     # 0x139614
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbe233
movq %rax, 0x18(%rsi)
leaq 0x800(%rip), %rax       # 0xbea23
movq %rax, 0x20(%rsi)
leaq 0x84b(%rip), %rax       # 0xbea79
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psf.c
// Function: do_extra_codepoint
static void do_extra_codepoint(deark *c, lctx *d, struct de_bitmap_font *font,
	i64 cur_idx, i32 n)
{
	i64 extra_idx;

	if(!d->read_extra_codepoints) return;
	if(d->num_extra_codepoints >= MAX_EXTRA_CODEPOINTS) return;

	extra_idx = d->index_of_first_extra_codepoint + d->num_extra_codepoints;
	de_dbg2(c, "char[%d] alias [%d] = U+%04x", (int)cur_idx, (int)extra_idx,
		(unsigned int)n);
	if(n == font->char_array[cur_idx].codepoint_unicode) {
		de_dbg2(c, "ignoring superfluous alias");
		return;
	}
	font->char_array[extra_idx].codepoint_unicode = n;
	font->char_array[extra_idx].bitmap = font->char_array[cur_idx].bitmap;
	d->num_extra_codepoints++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x50(%rsi)
je 0xbeb17
movq %rsi, %rbx
movq 0x68(%rsi), %r13
cmpq $0x7cf, %r13            # imm = 0x7CF
jg 0xbeb17
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r14
addq 0x60(%rbx), %r13
leaq 0x7acc7(%rip), %rsi     # 0x139786
movl %r15d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xe87e4
movq 0x20(%r12), %rax
leaq (%r15,%r15,4), %rcx
cmpl %ebp, 0x4(%rax,%rcx,8)
jne 0xbeafa
leaq 0x7acc1(%rip), %rsi     # 0x1397a3
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe87e4
leaq (,%r13,4), %rdx
addq %r13, %rdx
movl %ebp, 0x4(%rax,%rdx,8)
movq 0x20(%rax,%rcx,8), %rcx
movq %rcx, 0x20(%rax,%rdx,8)
incq 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionapp.c
// Function: de_module_psionapp
void de_module_psionapp(deark *c, struct deark_module_info *mi)
{
	mi->id = "psionapp";
	mi->desc = "Psion .APP/.IMG and .OPA/.OPO";
	mi->desc2 = "extract images";
	mi->run_fn = de_run_psionapp;
	mi->identify_fn = de_identify_psionapp;
}

// Assembly:
leaq 0x7acf1(%rip), %rax     # 0x139820
movq %rax, (%rsi)
leaq 0x7acf0(%rip), %rax     # 0x139829
movq %rax, 0x8(%rsi)
leaq 0x7ad03(%rip), %rax     # 0x139847
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0xbeb5f
movq %rax, 0x18(%rsi)
leaq 0x127(%rip), %rax       # 0xbec81
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionapp.c
// Function: de_run_psionapp
static void de_run_psionapp(deark *c, de_module_params *mparams)
{
	u8 b;
	const char *s;
	lctx *d = NULL;

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

	s = de_get_ext_option(c, "psionapp:convertpic");
	if(s) {
		d->convert_images = 1;
	}

	b = de_getbyte(0);
	if(b=='O') {
		do_opo_opa(c, d);
	}
	else {
		do_img_app(c, d);
	}

	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x4, %esi
callq 0xe8b2b
movq %rax, %r14
leaq 0x7acd7(%rip), %rsi     # 0x139856
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0xbeb93
movl $0x1, (%r14)
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0xeead3
cmpb $0x4f, %al
jne 0xbec1c
leaq 0x7acc1(%rip), %rsi     # 0x13986a
movq %rbx, %rdi
callq 0xeb125
movq 0x18(%rbx), %rdi
movl $0x12, %esi
callq 0xeebc8
movq %rax, %r15
leaq 0x7acaf(%rip), %rsi     # 0x139878
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xeead3
movzbl %al, %r12d
addq $0x15, %r12
cmpq %r15, %r12
jge 0xbec6d
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeebc8
movq %rax, %r13
leaq 0x2(%r12), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0xbece7
addq %r13, %r12
addq $0x2, %r12
jmp 0xbebec
leaq 0x7acb8(%rip), %rsi     # 0x1398db
movq %rbx, %rdi
callq 0xeb125
movl $0x28, %r15d
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeebc8
movq %rax, %r12
movq 0x18(%rbx), %rdi
leaq 0x2(%r15), %rsi
callq 0xeebc8
testq %r12, %r12
je 0xbec6d
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0xbece7
addq $0x4, %r15
cmpq $0x38, %r15
jne 0xbec31
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionapp.c
// Function: de_identify_psionapp
static int de_identify_psionapp(deark *c)
{
	u8 b[16];
	de_read(b, 0, 16);
	if(!de_memcmp(b, "ImageFileType**\0", 16))
		return 100;
	if(!de_memcmp(b, "OPLObjectFile**\0", 16))
		return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
movq %rsp, %r14
movl $0x10, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xee8d4
movdqa (%r14), %xmm0
pcmpeqb 0x7ab53(%rip), %xmm0    # 0x139800
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xbecd8
movdqa (%rsp), %xmm0
pcmpeqb 0x7ab4b(%rip), %xmm0    # 0x139810
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
movl $0x64, %eax
cmovel %eax, %ebx
jmp 0xbecdd
movl $0x64, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionapp.c
// Function: handle_embedded_file
static void handle_embedded_file(deark *c, lctx *d, i64 offset, i64 len)
{
	u8 buf[16];
	const char *ext;
	int extract_this_file;
	int is_pic;

	de_dbg(c, "embedded file at %d, len=%d", (int)offset, (int)len);
	is_pic = 0;
	ext = "bin";
	extract_this_file = 0;

	if(len>0 && c->extract_level>=2)
		extract_this_file = 1;

	// As far as I can tell, there's no way to tell the type of an
	// embedded file, except by sniffing it.
	de_read(buf, offset, 16);
	if(len>=8) {
		if(!de_memcmp(buf, "PIC\xdc\x30\x30", 6)) {
			// Looks like a PIC file
			is_pic = 1;
			ext = "pic";
			extract_this_file = 1;
		}
	}

	if(extract_this_file) {
		if(is_pic && d->convert_images) {
			// Convert PIC to PNG.
			// For consistency, this option shouldn't exist. But I'm not sure that
			// PIC files embedded in APP files are really the same as PIC files on
			// their own. They might need special handling. Until I'm sure they don't,
			// I'll leave this option here.
			de_run_module_by_id_on_slice(c, "psionpic", NULL, c->infile, offset, len);
		}
		else {
			// Just extract the file
			dbuf_create_file_from_slice(c->infile, offset, len, ext, NULL, is_pic?0:DE_CREATEFLAG_IS_AUX);
		}
	}
	else {
		de_dbg(c, "(not extracting this file)");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x7ab8e(%rip), %rsi     # 0x139894
xorl %eax, %eax
callq 0xe8617
testq %r15, %r15
jle 0xbed70
movl 0x90(%r14), %ebp
movq 0x18(%r14), %rdi
movq %rsp, %rsi
movl $0x10, %ecx
movq %rbx, %rdx
callq 0xee8d4
cmpq $0x8, %r15
jb 0xbed4a
movl $0xdc434950, %eax       # imm = 0xDC434950
xorl (%rsp), %eax
movzwl 0x4(%rsp), %ecx
xorl $0x3030, %ecx           # imm = 0x3030
orl %eax, %ecx
je 0xbeda2
cmpl $0x2, %ebp
jl 0xbed84
movl $0x1, %r9d
leaq 0x76a61(%rip), %rcx     # 0x1357bd
movq 0x18(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0xefd48
jmp 0xbed95
movq 0x18(%r14), %rdi
movq %rsp, %rsi
movl $0x10, %ecx
movq %rbx, %rdx
callq 0xee8d4
leaq 0x7ab35(%rip), %rsi     # 0x1398c0
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, (%r12)
je 0xbedc6
movq 0x18(%r14), %rcx
leaq 0x7ab03(%rip), %rsi     # 0x1398b7
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %r8
movq %r15, %r9
callq 0xe9aa3
jmp 0xbed95
xorl %r9d, %r9d
leaq 0x77395(%rip), %rcx     # 0x136165
jmp 0xbed5c
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionpic.c
// Function: de_module_psionpic
void de_module_psionpic(deark *c, struct deark_module_info *mi)
{
	mi->id = "psionpic";
	mi->desc = "Psion PIC, a.k.a. EPOC PIC";
	mi->run_fn = de_run_psionpic;
	mi->identify_fn = de_identify_psionpic;
	mi->help_fn = de_help_psionpic;
}

// Assembly:
leaq 0x7aadc(%rip), %rax     # 0x1398b7
movq %rax, (%rsi)
leaq 0x7ab26(%rip), %rax     # 0x13990b
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbee0b
movq %rax, 0x18(%rsi)
leaq 0x384(%rip), %rax       # 0xbf17f
movq %rax, 0x20(%rsi)
leaq 0x39f(%rip), %rax       # 0xbf1a5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionpic.c
// Function: do_bitmap_2planes
static void do_bitmap_2planes(deark *c, lctx *d, i64 pn1, i64 pn2)
{
	de_bitmap *img = NULL;
	i64 planespan;
	// AFAIK, all relevant devices support only 3 colors. Two of the four codes
	// map to black. We'll make the two blacks slightly different, just to avoid
	// losing information.
	static const de_color pal[4] = { 0xffffffff, 0xff808080U, 0xff010101U, 0xff000000U };

	de_dbg(c, "making a grayscale image from planes %d and %d", (int)pn1, (int)pn2);

	// TODO: Support -padpix (need samples with width not a multiple of 16)
	img = de_bitmap_create(c, d->plane_info[pn1].width, d->plane_info[pn1].height, 1);

	planespan = d->plane_info[1].image_pos - d->plane_info[0].image_pos;
	de_convert_image_paletted_planar(c->infile, d->plane_info[0].image_pos, 2,
		d->plane_info[0].rowspan, planespan, pal, img, 0x1);
	de_bitmap_write_to_file(img, NULL, 0);

	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x7a7ec(%rip), %rsi     # 0x1399b4
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r15), %rax
leaq (%r14,%r14,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0xf266a
movq %rax, %r14
movq 0x10(%r15), %rax
movq 0x40(%rax), %r8
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
subq %rsi, %r8
movq 0x18(%rbx), %rdi
leaq 0x7a83e(%rip), %r9      # 0x139a50
movl $0x2, %edx
pushq $0x1
pushq %r14
callq 0xf30b3
addq $0x10, %rsp
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionpic.c
// Function: do_bitmap_1plane
static void do_bitmap_1plane(deark *c, lctx *d, i64 plane_num)
{
	struct plane_info_struct *pi = &d->plane_info[plane_num];

	de_dbg(c, "making a bilevel image from plane %d", (int)plane_num);

	de_convert_and_write_image_bilevel2(c->infile, pi->image_pos, pi->width, pi->height,
		pi->rowspan, DE_CVTF_WHITEISZERO|DE_CVTF_LSBFIRST, NULL, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rdx,%rdx,2), %r15
shlq $0x4, %r15
leaq 0x7a78c(%rip), %rsi     # 0x1399e3
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq 0x10(%rbx,%r15), %rsi
movq (%rbx,%r15), %rdx
movq 0x8(%rbx,%r15), %rcx
movq 0x20(%rbx,%r15), %r8
movl $0x3, %r9d
pushq $0x0
pushq $0x0
callq 0xf2b5b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psionpic.c
// Function: could_be_2bit
static int could_be_2bit(lctx *d, int startpos)
{
	i64 i;
	if( (d->num_planes - startpos)%2 != 0) {
		// Not an even number of bitmaps.
		return 0;
	}
	for(i=startpos; i<d->num_planes; i+=2) {
		if(d->plane_info[i].width!=d->plane_info[i+1].width ||
			d->plane_info[i].height!=d->plane_info[i+1].height)
		{
			// Bitmaps aren't the same size.
			return 0;
		}
	}
	return 1;
}

// Assembly:
movq (%rdi), %rcx
movl %ecx, %edx
subl %esi, %edx
xorl %eax, %eax
testb $0x1, %dl
jne 0xbf2db
movl %esi, %edx
cmpq %rdx, %rcx
jle 0xbf2d6
movq 0x10(%rdi), %rsi
leaq (%rdx,%rdx,2), %rdi
shlq $0x4, %rdi
addq %rdi, %rsi
addq $0x38, %rsi
movq -0x38(%rsi), %rdi
cmpq -0x8(%rsi), %rdi
jne 0xbf2db
movq -0x30(%rsi), %rdi
cmpq (%rsi), %rdi
jne 0xbf2db
addq $0x2, %rdx
addq $0x60, %rsi
cmpq %rcx, %rdx
jl 0xbf2b6
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pcf.c
// Function: de_module_pcf
void de_module_pcf(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcf";
	mi->desc = "PCF font";
	mi->run_fn = de_run_pcf;
	mi->identify_fn = de_identify_pcf;
}

// Assembly:
leaq 0x7a7ad(%rip), %rax     # 0x139a90
movq %rax, (%rsi)
leaq 0x7a7a7(%rip), %rax     # 0x139a94
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbf308
movq %rax, 0x18(%rsi)
leaq 0x8ad(%rip), %rax       # 0xbfbb0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pcf.c
// Function: read_and_check_format_field
static int read_and_check_format_field(deark *c, lctx *d, struct table_entry *te, i64 pos)
{
	u32 format;

	format = (u32)de_getu32le_p(&pos);
	de_dbg(c, "format: 0x%08x", (unsigned int)format);
	if(format != te->fmt.raw_format) {
		de_err(c, "Can't handle conflicting \"format\" fields");
		return 0;
	}
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movq 0x18(%rdi), %rdi
callq 0xeed83
movq %rax, %r15
leaq 0x793b6(%rip), %rsi     # 0x139c12
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movl $0x1, %eax
cmpl %r15d, (%r14)
je 0xc0886
leaq 0x793a7(%rip), %rsi     # 0x139c21
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: de_module_plist
void de_module_plist(deark *c, struct deark_module_info *mi)
{
	mi->id = "plist";
	mi->desc = ".plist property list, binary format";
	mi->run_fn = de_run_plist;
	mi->identify_fn = de_identify_plist;
}

// Assembly:
leaq 0x563c5(%rip), %rax     # 0x116cbc
movq %rax, (%rsi)
leaq 0x79733(%rip), %rax     # 0x13a034
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc091c
movq %rax, 0x18(%rsi)
leaq 0x327(%rip), %rax       # 0xc0c3e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_int
static void do_object_int(deark *c, lctx *d, i64 pos, i64 dlen_raw)
{
	unsigned int nbytes;
	i64 n;

	if(dlen_raw<0 || dlen_raw>3) return;
	nbytes = 1U<<(unsigned int)dlen_raw;
	n = dbuf_getint_ext(c->infile, pos, nbytes, 0, 1);
	de_dbg(c, "value: %"I64_FMT, n);
}

// Assembly:
cmpq $0x3, %rdx
jbe 0xc104e
retq
pushq %rbx
movq %rdi, %rbx
movl $0x1, %eax
movl %edx, %ecx
shll %cl, %eax
movq 0x18(%rdi), %rdi
movl %eax, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xef0f6
leaq 0x51712(%rip), %rsi     # 0x112787
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0xe8617
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_real
static void do_object_real(deark *c, lctx *d, i64 pos, i64 dlen_raw)
{
	double val;

	if(dlen_raw==2) {
		val = dbuf_getfloat32x(c->infile, pos, 0);
	}
	else if(dlen_raw==3) {
		val = dbuf_getfloat64x(c->infile, pos, 0);
	}
	else {
		return;
	}

	de_dbg(c, "value: %f", val);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x3, %rdx
je 0xc10a0
cmpq $0x2, %rdx
jne 0xc10bd
movq 0x18(%rbx), %rdi
xorl %edx, %edx
callq 0xef2fc
jmp 0xc10ab
movq 0x18(%rbx), %rdi
xorl %edx, %edx
callq 0xef39e
leaq 0x5a074(%rip), %rsi     # 0x11b126
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
jmp 0xe8617
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_date
static void do_object_date(deark *c, lctx *d, i64 pos)
{
	double val_flt;
	i64 val_int;
	struct de_timestamp ts;
	char timestamp_buf[64];

	val_flt = dbuf_getfloat64x(c->infile, pos, 0);
	val_int = (i64)val_flt;
	// Epoch is Jan 1, 2001. There are 31 years, with 8 leap days, between
	// that and the Unix time epoch.
	de_unix_time_to_timestamp(val_int + ((365*31 + 8)*86400), &ts, 0x1);
	de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "value: %f (%s)", val_flt, timestamp_buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %edx, %edx
callq 0xef39e
movsd %xmm0, 0x8(%rsp)
cvttsd2si %xmm0, %rdi
addq $0x3a4fc880, %rdi       # imm = 0x3A4FC880
leaq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq 0xea7f5
leaq 0x20(%rsp), %r15
movl $0x40, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0x7915d(%rip), %rsi     # 0x13a275
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
movq %r15, %rdx
movb $0x1, %al
callq 0xe8617
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_string
static void do_object_string(deark *c, lctx *d, i64 pos, i64 len)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, len, DE_DBG_MAX_STRLEN, s, 0, DE_ENCODING_ASCII);
	de_dbg(c, "value: \"%s\"", ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xf6410
movq %rax, %rbx
movq 0x18(%r12), %rdi
movl $0x1, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %rbx, %rdi
callq 0xf70f6
leaq 0x515ec(%rip), %rsi     # 0x11276b
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_utf16string
static void do_object_utf16string(deark *c, lctx *d, i64 pos, i64 len)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, len*2, DE_DBG_MAX_STRLEN*2, s, 0, DE_ENCODING_UTF16BE);
	de_dbg(c, "value: \"%s\"", ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0xf6410
movq %rax, %rbx
movq 0x18(%r14), %rdi
addq %r15, %r15
movl $0x4, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r12, %rsi
movq %r15, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %rbx, %rdi
callq 0xf70f6
leaq 0x51580(%rip), %rsi     # 0x11276b
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_array_or_set
static void do_object_array_or_set(deark *c, lctx *d, const char *tn,
	i64 objpos, i64 pos1, i64 numitems)
{
	i64 k;
	i64 pos = pos1;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	d->nesting_level++;
	if(d->nesting_level>MAX_PLIST_NESTING_LEVEL) {
		report_nesting_level_exceeded(c, d);
		goto done;
	}

	for(k=0; k<numitems; k++) {
		i64 refnum;

		if(d->exceeded_max_objects) goto done;
		de_dbg(c, "item[%d] (for %s@%"I64_FMT")", (int)k, tn, objpos);
		de_dbg_indent(c, 1);

		refnum = dbuf_getint_ext(c->infile, pos, d->nbytes_per_object_refnum, 0, 0);
		pos += (i64)d->nbytes_per_object_refnum;

		de_dbg(c, "refnum: %u", (unsigned int)refnum);
		if(!do_one_object_by_refnum(c, d, refnum)) goto done;

		de_dbg_indent(c, -1);
	}

done:
	d->nesting_level--;
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbp
movq %r8, %r12
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
callq 0xe8a1c
movl (%r14), %eax
leal 0x1(%rax), %ecx
movq %r14, (%rsp)
movl %ecx, (%r14)
cmpl $0x9, %eax
jle 0xc1261
leaq 0x79048(%rip), %rsi     # 0x13a29a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0xc1316
testq %rbp, %rbp
jle 0xc1316
xorl %r13d, %r13d
movq %rbp, 0x10(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xc1316
movq %rbx, %rdi
leaq 0x78ffa(%rip), %rsi     # 0x13a284
movl %r13d, %edx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %rbx, %r14
movq (%rsp), %rbx
movl 0x14(%rbx), %edx
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef0f6
movq %rax, %rbp
movl 0x14(%rbx), %r15d
movq %r14, %rdi
leaq 0x78e1a(%rip), %rsi     # 0x13a0f1
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movq %rbx, %rsi
movq %r14, %rbx
movq %rbp, %rdx
movq 0x10(%rsp), %rbp
callq 0xc0c64
testl %eax, %eax
je 0xc1316
addq %r15, %r12
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %r13
cmpq %r13, %rbp
jne 0xc1272
movq (%rsp), %rax
decl (%rax)
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/plist.c
// Function: do_object_dict
static void do_object_dict(deark *c, lctx *d, i64 objpos, i64 pos1,
	i64 dictsize)
{
	i64 k;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	d->nesting_level++;
	if(d->nesting_level>MAX_PLIST_NESTING_LEVEL) {
		report_nesting_level_exceeded(c, d);
		goto done;
	}

	for(k=0; k<dictsize; k++) {
		i64 keyrefnum;
		i64 valrefnum;

		if(d->exceeded_max_objects) goto done;
		de_dbg(c, "entry[%d] (for dict@%"I64_FMT")", (int)k, objpos);
		de_dbg_indent(c, 1);

		keyrefnum = dbuf_getint_ext(c->infile, pos1+k*(i64)d->nbytes_per_object_refnum,
			d->nbytes_per_object_refnum, 0, 0);
		de_dbg(c, "key objrefnum: %u", (unsigned int)keyrefnum);
		de_dbg_indent(c, 1);
		if(!do_one_object_by_refnum(c, d, keyrefnum)) goto done;
		de_dbg_indent(c, -1);

		valrefnum = dbuf_getint_ext(c->infile, pos1+(dictsize+k)*(i64)d->nbytes_per_object_refnum,
			d->nbytes_per_object_refnum, 0, 0);
		de_dbg(c, "val objrefnum: %u", (unsigned int)valrefnum);
		de_dbg_indent(c, 1);
		if(!do_one_object_by_refnum(c, d, valrefnum)) goto done;
		de_dbg_indent(c, -1);

		de_dbg_indent(c, -1);
	}

done:
	d->nesting_level--;
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
callq 0xe8a1c
movl (%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x9, %eax
jle 0xc1384
leaq 0x78f25(%rip), %rsi     # 0x13a29a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0xc149b
testq %r15, %r15
jle 0xc149b
xorl %ebp, %ebp
cmpl $0x0, 0x4(%r14)
jne 0xc149b
movq %rbx, %rdi
leaq 0x78f15(%rip), %rsi     # 0x13a2b9
movl %ebp, %edx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movl 0x14(%r14), %edx
movq %rdx, %rsi
imulq %rbp, %rsi
addq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef0f6
movq %rax, %r13
movq %rbx, %rdi
leaq 0x78eea(%rip), %rsi     # 0x13a2d2
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xc0c64
testl %eax, %eax
je 0xc149b
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq (%r15,%rbp), %rsi
movl 0x14(%r14), %edx
imulq %rdx, %rsi
addq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef0f6
movq %rax, %r13
movq %rbx, %rdi
leaq 0x78e98(%rip), %rsi     # 0x13a2e4
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xc0c64
testl %eax, %eax
je 0xc149b
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
cmpq %rbp, %r15
jne 0xc138f
decl (%r14)
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/qtif.c
// Function: de_module_qtif
void de_module_qtif(deark *c, struct deark_module_info *mi)
{
	mi->id = "qtif";
	mi->desc = "QTIF (QuickTime Image Format)";
	mi->run_fn = de_run_qtif;
	mi->identify_fn = de_identify_qtif;
}

// Assembly:
leaq 0x75d11(%rip), %rax     # 0x1371d4
movq %rax, (%rsi)
leaq 0x78e29(%rip), %rax     # 0x13a2f6
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc14e8
movq %rax, 0x18(%rsi)
leaq 0x122(%rip), %rax       # 0xc1605
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/qtif.c
// Function: de_run_qtif
static void de_run_qtif(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

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

	if(mparams) {
		if(mparams->in_params.flags & 0x1) {
			d->fail_gracefully_mode = 1;
		}
	}

	if(de_havemodcode(c, mparams, 'I')) {
		// Raw data from a PICT file
		do_raw_idsc_data(c, d);
	}
	else {
		do_qtif_file_format(c, d);
	}

	if(mparams && d->decoded_ok) {
		mparams->out_params.flags |= 0x1;
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x90, %esi
callq 0xe8b2b
movq %rax, %r15
testq %r14, %r14
je 0xc1513
testb $0x1, 0x8(%r14)
je 0xc1513
movb $0x1, (%r15)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x49, %edx
callq 0xea4d9
testl %eax, %eax
je 0xc1591
leaq 0x78de6(%rip), %rsi     # 0x13a314
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xc1655
movl %eax, %ebp
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testl %ebp, %ebp
je 0xc15e1
movq 0x20(%r15), %rax
movq %rax, 0x8(%r15)
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc17da
jmp 0xc15e1
movl $0x30, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %r15, (%rax)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r12)
leaq 0x4e3(%rip), %rax       # 0xc1a97
movq %rax, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf8316
cmpl $0x0, 0x4(%r15)
je 0xc15d6
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc17da
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8be2
testq %r14, %r14
je 0xc15f2
cmpb $0x0, 0x1(%r15)
je 0xc15f2
orb $0x1, 0x40(%r14)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/qtif.c
// Function: do_read_idsc
static int do_read_idsc(deark *c, lctx *d, i64 pos, i64 len)
{
	int retval = 0;

	if(len<8) goto done;

	d->idsc_found = 1;

	d->idsc_size = de_getu32be(pos);
	de_dbg(c, "idsc size: %d", (int)d->idsc_size);

	dbuf_read_fourcc(c->infile, pos+4, &d->cmpr4cc, 4, 0x0);
	de_dbg(c, "compression type: \"%s\"", d->cmpr4cc.id_dbgstr);

	if(len<86) goto done;
	if(d->idsc_size<86) goto done;

	d->width = de_getu16be(pos+32);
	d->height = de_getu16be(pos+34);
	d->hres = dbuf_fmtutil_read_fixed_16_16(c->infile, pos+36);
	d->vres = dbuf_fmtutil_read_fixed_16_16(c->infile, pos+40);
	de_dbg(c, "dpi: %.2f"DE_CHAR_TIMES"%.2f", d->hres, d->vres);
	d->idat_data_size = de_getu32be(pos+44);
	de_dbg(c, "reported data size: %d", (int)d->idat_data_size);
	if(d->idat_data_size>c->infile->len) d->idat_data_size=0;
	d->bitdepth = de_getu16be(pos+82);
	d->palette_id = de_getu16be(pos+84);
	de_dbg(c, "dimensions: %d"DE_CHAR_TIMES"%d, bitdepth: %d, palette: %d", (int)d->width,
		(int)d->height, (int)d->bitdepth, (int)d->palette_id);
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
cmpq $0x8, %rcx
jl 0xc17cf
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, 0x18(%rsi)
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xeed0d
movq %rax, 0x20(%r14)
leaq 0x78c97(%rip), %rsi     # 0x13a32a
xorl %ebp, %ebp
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x4(%r15), %rsi
leaq 0x30(%r14), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x40(%r14), %rdx
leaq 0x78cea(%rip), %rsi     # 0x13a3af
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0x56, %r12
jb 0xc17cf
cmpq $0x56, 0x20(%r14)
jl 0xc17cf
movq 0x18(%rbx), %rdi
leaq 0x20(%r15), %rsi
callq 0xeeb67
movq %rax, 0x60(%r14)
movq 0x18(%rbx), %rdi
leaq 0x22(%r15), %rsi
callq 0xeeb67
movq %rax, 0x68(%r14)
movq 0x18(%rbx), %rdi
leaq 0x24(%r15), %rsi
callq 0xf8078
movsd %xmm0, 0x80(%r14)
movq 0x18(%rbx), %rdi
leaq 0x28(%r15), %rsi
callq 0xf8078
movaps %xmm0, %xmm1
movsd %xmm0, 0x88(%r14)
movsd 0x80(%r14), %xmm0
leaq 0x759f7(%rip), %rsi     # 0x13713c
movq %rbx, %rdi
movb $0x2, %al
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x2c(%r15), %rsi
callq 0xeed0d
movq %rax, 0x28(%r14)
leaq 0x78bd1(%rip), %rsi     # 0x13a338
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x28(%r14), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jle 0xc1789
movq $0x0, 0x28(%r14)
leaq 0x52(%r15), %rsi
callq 0xeeb67
movq %rax, 0x70(%r14)
movq 0x18(%rbx), %rdi
addq $0x54, %r15
movq %r15, %rsi
callq 0xeeb67
movq %rax, 0x78(%r14)
movl 0x60(%r14), %edx
movl 0x68(%r14), %ecx
movl 0x70(%r14), %r8d
leaq 0x78b92(%rip), %rsi     # 0x13a34f
movq %rbx, %rdi
movl %eax, %r9d
xorl %eax, %eax
callq 0xe8617
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/qtif.c
// Function: quicktime_box_handler
static int quicktime_box_handler(deark *c, struct de_boxesctx *bctx)
{
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->boxtype==BOX_idat) {
		d->idat_found = 1;
		d->idat_pos = curbox->payload_pos;
		d->idat_size = curbox->payload_len;
	}
	else if(curbox->boxtype==BOX_idsc) {
		do_read_idsc(c, d, curbox->payload_pos, curbox->payload_len);
	}
	else if(curbox->is_uuid) {
		return fmtutil_default_box_handler(c, bctx);
	}

	return 1;
}

// Assembly:
movq %rsi, %rax
movq (%rsi), %rsi
movq 0x28(%rax), %rcx
movl 0xc(%rcx), %edx
cmpl $0x69647363, %edx       # imm = 0x69647363
je 0xc1ac5
cmpl $0x69646174, %edx       # imm = 0x69646174
jne 0xc1ad9
movl $0x1, 0x4(%rsi)
movups 0x38(%rcx), %xmm0
movups %xmm0, 0x8(%rsi)
jmp 0xc1ae7
pushq %rax
movq 0x38(%rcx), %rdx
movq 0x40(%rcx), %rcx
callq 0xc1655
addq $0x8, %rsp
jmp 0xc1ae7
cmpl $0x0, 0x10(%rcx)
je 0xc1ae7
movq %rax, %rsi
jmp 0xf816a
movl $0x1, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: de_module_riff
void de_module_riff(deark *c, struct deark_module_info *mi)
{
	mi->id = "riff";
	mi->desc = "RIFF-based formats";
	mi->run_fn = de_run_riff;
	mi->identify_fn = de_identify_riff;
}

// Assembly:
leaq 0x78900(%rip), %rax     # 0x13a3f7
movq %rax, (%rsi)
leaq 0x788fb(%rip), %rax     # 0x13a3fc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc1b1c
movq %rax, 0x18(%rsi)
leaq 0x117(%rip), %rax       # 0xc1c2e
movq %rax, 0x20(%rsi)
retq