LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1162fd
jmp 0x116416
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x188560
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x116337
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0xae0e8(%rip), %rsi     # 0x1c4418
movb $0x0, %al
callq 0x15b400
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x116408
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
shrl $0xc, %eax
movl %eax, -0x84(%rbp)
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
andq $0xfff, %rax            # imm = 0xFFF
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1163d5
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
jl 0x1163d5
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rdx
movl -0x84(%rbp), %ecx
movl $0x48, %esi
callq 0x15cf60
movq -0x98(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %ecx
leaq 0x93c46(%rip), %rsi     # 0x1aa014
movb $0x0, %al
callq 0x15b400
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq -0x90(%rbp), %rdx
movl -0x84(%rbp), %ecx
movl -0x2c(%rbp), %r8d
callq 0x187720
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x11634c
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: find_min_mem_needed
static void find_min_mem_needed(deark *c, lctx *d, i64 *pminmem)
{
	i64 pos;
	i64 n;
	u8 b;

	if(d->data_before_decoder) {
		// File from a registered v1.00beta?
		return;
	}

	pos = d->host_ei->entry_point;
	b = de_getbyte_p(&pos);
	if(b==0x50) {
		b = de_getbyte_p(&pos);
	}
	if(b==0xb8) {
		// This is not always exactly right. Not sure that's possible.
		n = de_getu16le_p(&pos);
		n = (n<<4) + 0x100 - d->dcmpr_code->len;
		if(n>=0) {
			*pminmem = (n+0xf)>>4;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x6(%rax)
je 0x116eb3
jmp 0x116f51
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0x50, %eax
jne 0x116ef4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0xb8, %eax
jne 0x116f51
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x4, %rax
addq $0x100, %rax            # imm = 0x100
movq -0x10(%rbp), %rcx
movq 0xd8(%rcx), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jl 0x116f4f
movq -0x28(%rbp), %rcx
addq $0xf, %rcx
sarq $0x4, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x116f51
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x22(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xa, %ecx
callq 0x164d10
movzbl -0x22(%rbp), %eax
cmpl $0xb8, %eax
jne 0x116ff4
movzbl -0x1f(%rbp), %eax
cmpl $0xba, %eax
jne 0x116ff4
movzbl -0x1c(%rbp), %eax
cmpl $0x3b, %eax
jne 0x116ff4
movzbl -0x1b(%rbp), %eax
cmpl $0xc4, %eax
jne 0x116ff4
movzbl -0x19(%rbp), %eax
cmpl $0x67, %eax
jne 0x116fd0
movq -0x18(%rbp), %rax
movq $0x2c, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117077
movzbl -0x19(%rbp), %eax
cmpl $0x69, %eax
jne 0x116ff0
movq -0x18(%rbp), %rax
movq $0x2e, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117077
jmp 0x116ff2
jmp 0x117070
movzbl -0x22(%rbp), %eax
cmpl $0x50, %eax
jne 0x117030
movzbl -0x21(%rbp), %eax
cmpl $0xb8, %eax
jne 0x117030
movzbl -0x1e(%rbp), %eax
cmpl $0xba, %eax
jne 0x117030
movzbl -0x1b(%rbp), %eax
cmpl $0x3b, %eax
jne 0x117030
movq -0x18(%rbp), %rax
movq $0x2e, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117077
movzbl -0x22(%rbp), %eax
cmpl $0xba, %eax
jne 0x11706c
movzbl -0x1f(%rbp), %eax
cmpl $0xa1, %eax
jne 0x11706c
movzbl -0x1c(%rbp), %eax
cmpl $0x2d, %eax
jne 0x11706c
movzbl -0x1b(%rbp), %eax
cmpl $0x20, %eax
jne 0x11706c
movq -0x18(%rbp), %rax
movq $0x24, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117077
jmp 0x11706e
jmp 0x117070
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: do_analyze_pklite_com
static void do_analyze_pklite_com(deark *c, lctx *d)
{
	d->dparams.large_cmpr = 0;
	d->dparams.extra_cmpr = 0;
	d->dparams.v120_cmpr = 0;

	analyze_intro_COM(c, d);
	if(d->errflag) goto done;

	analyze_copier_COM(c, d);
	if(d->errflag) goto done;

	analyze_decompressor_COM(c, d);

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, 0x19(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x1a(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x117230
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x117110
jmp 0x117135
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x117360
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x117128
jmp 0x117135
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x117500
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: report_detected_version_number_com
static void report_detected_version_number_com(deark *c, lctx *d)
{
	const char *s = "?";

	if(d->dparams.cmpr_data_pos==500) {
		s = "1.00beta";
	}
	else if(d->dparams.cmpr_data_pos==448) {
		switch(de_getbyte(260)) {
		case 0x1d: s = "1.00-1.03"; break;
		case 0x1c: s = "1.05-1.14"; break;
		default: s = "1.00-1.14"; break;
		}
	}
	else if(d->dparams.cmpr_data_pos==450) {
		s = "1.15";
	}
	else if(d->dparams.cmpr_data_pos==464) {
		s = "1.50-2.01";
	}

	de_dbg(c, "detected PKLITE version: %s", s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xa0ad6(%rip), %rax     # 0x1b7c2d
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1f4, 0x10(%rax)      # imm = 0x1F4
jne 0x117179
leaq 0xad5ef(%rip), %rax     # 0x1c475f
movq %rax, -0x18(%rbp)
jmp 0x117210
movq -0x10(%rbp), %rax
cmpq $0x1c0, 0x10(%rax)      # imm = 0x1C0
jne 0x1171d6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x104, %esi            # imm = 0x104
callq 0x165060
movzbl %al, %ecx
movl %ecx, -0x1c(%rbp)
subb $0x1c, %al
je 0x1171bc
jmp 0x1171a5
movl -0x1c(%rbp), %eax
subl $0x1d, %eax
jne 0x1171c9
jmp 0x1171af
leaq 0xad5b2(%rip), %rax     # 0x1c4768
movq %rax, -0x18(%rbp)
jmp 0x1171d4
leaq 0xad5af(%rip), %rax     # 0x1c4772
movq %rax, -0x18(%rbp)
jmp 0x1171d4
leaq 0xad5ac(%rip), %rax     # 0x1c477c
movq %rax, -0x18(%rbp)
jmp 0x11720e
movq -0x10(%rbp), %rax
cmpq $0x1c2, 0x10(%rax)      # imm = 0x1C2
jne 0x1171f1
leaq 0xad59b(%rip), %rax     # 0x1c4786
movq %rax, -0x18(%rbp)
jmp 0x11720c
movq -0x10(%rbp), %rax
cmpq $0x1d0, 0x10(%rax)      # imm = 0x1D0
jne 0x11720a
leaq 0xad585(%rip), %rax     # 0x1c478b
movq %rax, -0x18(%rbp)
jmp 0x11720c
jmp 0x11720e
jmp 0x117210
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xad576(%rip), %rsi     # 0x1c4795
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: analyze_intro_COM
static void analyze_intro_COM(deark *c, lctx *d)
{
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	de_dbg(c, "intro at 0");
	de_dbg_indent(c, 1);

	if(pkl_memmatch(&d->epbytes[0],
		(const u8*)"\xb8??\xba??\x3b\xc4\x73", 9, '?', 0))
	{
		d->copier_class = INTRO_CLASS_COM_100;
		d->position2 = 10;
	}
	else if(pkl_memmatch(&d->epbytes[0],
		(const u8*)"\x50\xb8??\xba??\x3b\xc4\x73", 10, '?', 0))
	{
		d->copier_class = INTRO_CLASS_COM_150;
		d->position2 = 11;
	}
	else if(pkl_memmatch(&d->epbytes[0],
		(const u8*)"\xba??\xa1\x02\x00\x2d??\x8c\xcb??????\x77", 18, '?', 0))
	{
		d->copier_class = INTRO_CLASS_COM_BETA;
		d->position2 = read_and_follow_1byte_jump(d, 18);
	}

	if(!d->position2) {
		d->errflag = 1;
	}
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
leaq 0xad49f(%rip), %rsi     # 0x1c46f7
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
leaq 0xad484(%rip), %rsi     # 0x1c4703
movl $0x9, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x1172af
movq -0x10(%rbp), %rax
movb $-0xf, 0x68(%rax)
movq -0x10(%rbp), %rax
movq $0xa, 0x40(%rax)
jmp 0x11733c
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
leaq 0xad441(%rip), %rsi     # 0x1c4702
movl $0xa, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x1172ee
movq -0x10(%rbp), %rax
movb $-0xe, 0x68(%rax)
movq -0x10(%rbp), %rax
movq $0xb, 0x40(%rax)
jmp 0x11733a
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
leaq 0xad720(%rip), %rsi     # 0x1c4a20
movl $0x12, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x117338
movq -0x10(%rbp), %rax
movb $-0x10, 0x68(%rax)
movq -0x10(%rbp), %rdi
movl $0x12, %esi
callq 0x115c90
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x11733a
jmp 0x11733c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x11734e
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x15b5a0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: analyze_decompressor_COM
static void analyze_decompressor_COM(deark *c, lctx *d)
{
	int saved_indent_level;
	i64 pos = d->decompr_pos;
	i64 keypos = 0;

	de_dbg_indent_save(c, &saved_indent_level);
	if(pos<0 || pos+100>EPBYTES_LEN) goto done;

	de_dbg(c, "decompressor at %u", (UI)pos);
	de_dbg_indent(c, 1);

	if(pkl_memmatch(&d->epbytes[pos],
		(const u8*)"\xfd\x8b\xf8\x4f\x4f\xbe", 6, '?', 0))
	{
		d->decompr_class = DECOMPR_CLASS_COM_100;
		keypos = pos+6;
	}
	else if(pkl_memmatch(&d->epbytes[pos],
		(const u8*)"\xfd\xbe??\x03\xf2\x8b\xfa\x4f\x4f", 10, '?', 0))
	{
		d->decompr_class = DECOMPR_CLASS_COM_BETA;
		keypos = pos+2;
	}

	if(keypos) {
		d->dparams.cmpr_data_pos = de_getu16le_direct(&d->epbytes[keypos]) + 2 - 0x100;
	}

done:
	if(d->dparams.cmpr_data_pos<1 || d->dparams.cmpr_data_pos>c->infile->len) {
		d->dparams.cmpr_data_pos = 0;
		d->errflag = 1;
	}
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x15b580
cmpq $0x0, -0x20(%rbp)
jl 0x117548
movq -0x20(%rbp), %rax
addq $0x64, %rax
cmpq $0x3e8, %rax            # imm = 0x3E8
jle 0x11754d
jmp 0x117632
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xad1dc(%rip), %rsi     # 0x1c473a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq -0x20(%rbp), %rdi
leaq 0xad1c4(%rip), %rsi     # 0x1c474d
movl $0x6, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x1175b9
movq -0x10(%rbp), %rax
movb $-0xf, 0x80(%rax)
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
jmp 0x1175ff
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq -0x20(%rbp), %rdi
leaq 0xad185(%rip), %rsi     # 0x1c4754
movl $0xa, %edx
movl $0x3f, %ecx
xorl %r8d, %r8d
callq 0x15f6b0
cmpl $0x0, %eax
je 0x1175fd
movq -0x10(%rbp), %rax
movb $-0x10, 0x80(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x1175ff
cmpq $0x0, -0x28(%rbp)
je 0x117630
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
addq -0x28(%rbp), %rdi
callq 0x165260
movq %rax, %rcx
addq $0x2, %rcx
subq $0x100, %rcx            # imm = 0x100
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x117632
movq -0x10(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jl 0x117653
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x117666
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pklite.c
// Function: pklite_com_has_copyright_string
static int pklite_com_has_copyright_string(dbuf *f, i64 verpos)
{
	u8 buf[4];

	if(verpos==38) {
		return !dbuf_memcmp(f, verpos+2, (const void*)"PK Copyr", 8);
	}
	dbuf_read(f, buf, verpos+2, sizeof(buf));

	if((buf[0]=='P') && (buf[1]=='K' || buf[1]=='k') &&
		(buf[2]=='L' || buf[2]=='l') && (buf[3]=='I' || buf[3]=='i'))
	{
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x26, -0x18(%rbp)
jne 0x1176c6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
leaq 0xad107(%rip), %rdx     # 0x1c47b1
movl $0x8, %ecx
callq 0x166ab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x11772f
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x2, %rdx
movl $0x4, %ecx
callq 0x164d10
movzbl -0x1c(%rbp), %eax
cmpl $0x50, %eax
jne 0x117728
movzbl -0x1b(%rbp), %eax
cmpl $0x4b, %eax
je 0x1176fb
movzbl -0x1b(%rbp), %eax
cmpl $0x6b, %eax
jne 0x117728
movzbl -0x1a(%rbp), %eax
cmpl $0x4c, %eax
je 0x11770d
movzbl -0x1a(%rbp), %eax
cmpl $0x6c, %eax
jne 0x117728
movzbl -0x19(%rbp), %eax
cmpl $0x49, %eax
je 0x11771f
movzbl -0x19(%rbp), %eax
cmpl $0x69, %eax
jne 0x117728
movl $0x1, -0x4(%rbp)
jmp 0x11772f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xad2e4(%rip), %rcx     # 0x1c4a3b
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xad2da(%rip), %rcx     # 0x1c4a3f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x1177a0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0xfd(%rip), %rcx        # 0x117880
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x11e(%rip), %rcx       # 0x1178b0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x171, 0x18(%rax)      # imm = 0x171
jne 0x1177d5
movl $0x1, -0x14(%rbp)
jmp 0x117817
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x187, 0x18(%rax)      # imm = 0x187
jl 0x117815
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x171, %esi            # imm = 0x171
leaq 0xad4f5(%rip), %rdx     # 0x1c4cf0
movl $0x10, %ecx
callq 0x166ab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18(%rbp)
jmp 0x117817
cmpl $0x0, -0x14(%rbp)
jne 0x11782c
cmpl $0x0, -0x18(%rbp)
jne 0x11782c
movl $0x0, -0x4(%rbp)
jmp 0x117870
movq -0x10(%rbp), %rdi
leaq 0xad204(%rip), %rsi     # 0x1c4a3b
callq 0x15d180
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x11785a
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl $0x18, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x117870
movl -0x1c(%rbp), %edx
movl $0x23, %eax
movl $0x64, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xad169(%rip), %rcx     # 0x1c4a60
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xad168(%rip), %rcx     # 0x1c4a6d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x117930
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x8d(%rip), %rcx        # 0x1179b0
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x1a0, 0x18(%rax)      # imm = 0x1A0
je 0x117957
movl $0x0, -0x4(%rbp)
jmp 0x1179a2
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
je 0x117979
movl $0x0, -0x4(%rbp)
jmp 0x1179a2
movq -0x10(%rbp), %rdi
leaq 0xad0e5(%rip), %rsi     # 0x1c4a69
callq 0x15d180
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x11799b
movl $0x28, -0x4(%rbp)
jmp 0x1179a2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: do_pif_main
static void do_pif_main(deark *c, de_module_params *mparams, int is_dvp)
{
	const char *tmps;
	struct pif_ctx *d = NULL;
	int is_oldfmt = 0;

	d = de_malloc(c, sizeof(struct pif_ctx));
	d->tmpstr = ucstring_create(c);

	d->input_encoding_ansi = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);

	d->input_encoding_oem = DE_ENCODING_CP437; // default
	tmps = de_get_ext_option(c, "oemenc");
	if(tmps) {
		d->input_encoding_oem = de_encoding_name_to_code(tmps);
		if(d->input_encoding_oem == DE_ENCODING_UNKNOWN) {
			d->input_encoding_oem = DE_ENCODING_CP437;
		}
	}

	d->pos_seen = de_inthashtable_create(c);

	if(!is_dvp && (c->infile->len < PIF_BASIC_SECTION_SIZE+22)) {
		is_oldfmt = 1;
	}

	if(is_oldfmt) {
		do_pif_section_basic(c, d, 0, PIF_BASIC_SECTION_SIZE);
	}
	else if(is_dvp) {
		do_pif_section_basic(c, d, 0, PIF_BASIC_SECTION_SIZE);
		do_dvp_extensions(c, d);
	}
	else {
		do_pif_sections(c, d);
	}

	if(d) {
		ucstring_destroy(d->tmpstr);
		de_inthashtable_destroy(c, d->pos_seen);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0x28, %esi
callq 0x15b780
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x9, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl $0xd, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x97292(%rip), %rsi     # 0x1aecea
callq 0x15cb30
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x117a8e
movq -0x20(%rbp), %rdi
callq 0x161de0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x117a8c
movq -0x28(%rbp), %rax
movl $0xd, (%rax)
jmp 0x117a8e
movq -0x8(%rbp), %rdi
callq 0x15e600
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x117ac1
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x187, 0x18(%rax)      # imm = 0x187
jge 0x117ac1
movl $0x1, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x117adf
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x171, %ecx            # imm = 0x171
callq 0x117b60
jmp 0x117b19
cmpl $0x0, -0x14(%rbp)
je 0x117b0a
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x171, %ecx            # imm = 0x171
callq 0x117b60
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x117e80
jmp 0x117b17
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x117f30
jmp 0x117b19
cmpq $0x0, -0x28(%rbp)
je 0x117b4b
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x15e630
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: do_dvp_extensions
static void do_dvp_extensions(deark *c, struct pif_ctx *d)
{
	i64 pos;
	u8 dvextver;

	pos = PIF_BASIC_SECTION_SIZE;
	ucstring_empty(d->tmpstr);
	dbuf_read_to_ucstring(c->infile, pos, 2, d->tmpstr, 0, DE_ENCODING_ASCII);
	de_dbg(c, "keys: \"%s\"", ucstring_getpsz_d(d->tmpstr));

	pos = PIF_BASIC_SECTION_SIZE + 13;
	dvextver = de_getbyte(pos);
	de_dbg(c, "DV extensions ver: %u", (UI)dvextver);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x171, -0x18(%rbp)     # imm = 0x171
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x171210
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x2, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x172650
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0xacc0e(%rip), %rsi     # 0x1c4afd
movb $0x0, %al
callq 0x15b0d0
movq $0x17e, -0x18(%rbp)     # imm = 0x17E
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x19(%rbp), %edx
leaq 0xacbe7(%rip), %rsi     # 0x1c4b08
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: do_pif_sections
static void do_pif_sections(deark *c, struct pif_ctx *d)
{
	d->next_section_heading_pos = PIF_BASIC_SECTION_SIZE;

	while(1) {
		i64 this_section_heading_pos;

		this_section_heading_pos = d->next_section_heading_pos;
		if(this_section_heading_pos == PIF_INVALID_HEADING_POS) break;
		d->next_section_heading_pos = PIF_INVALID_HEADING_POS;
		if(this_section_heading_pos+22 > c->infile->len) break;
		if(!pif_validate_pos(c, d, this_section_heading_pos)) break;

		if(!do_pif_section(c, d, this_section_heading_pos)) break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x171, 0x10(%rax)      # imm = 0x171
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0xffff, -0x18(%rbp)    # imm = 0xFFFF
jne 0x117f64
jmp 0x117fba
movq -0x10(%rbp), %rax
movq $0xffff, 0x10(%rax)     # imm = 0xFFFF
movq -0x18(%rbp), %rax
addq $0x16, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x117f88
jmp 0x117fba
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x117fc0
cmpl $0x0, %eax
jne 0x117fa0
jmp 0x117fba
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x118020
cmpl $0x0, %eax
jne 0x117fb8
jmp 0x117fba
jmp 0x117f4c
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: pif_validate_pos
static int pif_validate_pos(deark *c, struct pif_ctx *d, i64 pos)
{
	if(de_inthashtable_add_item(c, d->pos_seen, pos, NULL)) {
		return 1;
	}
	de_err(c, "Bad offset detected");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x15e810
cmpl $0x0, %eax
je 0x117ffb
movl $0x1, -0x4(%rbp)
jmp 0x118014
movq -0x10(%rbp), %rdi
leaq 0xacb18(%rip), %rsi     # 0x1c4b1e
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: do_pif_section_win286
static void do_pif_section_win286(deark *c, struct pif_ctx *d, i64 pos1, i64 len)
{
	i64 pos = pos1;
	i64 n;
	UI flags;

	if(len<6) return;
	n = de_getu16le_p(&pos);
	de_dbg(c, "max XMS: %"I64_FMT, n);
	n = de_getu16le_p(&pos);
	de_dbg(c, "min XMS: %"I64_FMT, n);
	flags = (UI)de_getu16le_p(&pos);
	de_dbg(c, "flags: 0x%04x", (UI)flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x6, -0x20(%rbp)
jge 0x1183a9
jmp 0x118428
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0xac820(%rip), %rsi     # 0x1c4bed
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0xac802(%rip), %rsi     # 0x1c4bfa
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %edx
leaq 0x9c83a(%rip), %rsi     # 0x1b4c5b
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pif.c
// Function: do_pif_section_winnt31
static void do_pif_section_winnt31(deark *c, struct pif_ctx *d, i64 pos1, i64 len)
{
	i64 pos = pos1;

	if(len<140) return;
	pos += 12;

	ucstring_empty(d->tmpstr);
	dbuf_read_to_ucstring(c->infile, pos, 64, d->tmpstr, DE_CONVFLAG_STOP_AT_NUL,
		d->input_encoding_ansi);
	de_dbg(c, "alt config.sys: \"%s\"", ucstring_getpsz_d(d->tmpstr));
	pos += 64;

	ucstring_empty(d->tmpstr);
	dbuf_read_to_ucstring(c->infile, pos, 64, d->tmpstr, DE_CONVFLAG_STOP_AT_NUL,
		d->input_encoding_ansi);
	de_dbg(c, "alt autoexec.bat: \"%s\"", ucstring_getpsz_d(d->tmpstr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x8c, -0x20(%rbp)
jge 0x1188af
jmp 0x11898d
movq -0x28(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x171210
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x40, %edx
movl $0x1, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0xac3ad(%rip), %rsi     # 0x1c4cc4
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x171210
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x40, %edx
movl $0x1, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x172650
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xac353(%rip), %rsi     # 0x1c4cd9
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xac2dd(%rip), %rcx     # 0x1c4d34
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xac2b3(%rip), %rcx     # 0x1c4d18
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x118a90
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0x118af0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
leaq 0xac2db(%rip), %rsi     # 0x1c4da2
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x118ef0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printshop.c
// Function: de_identify_printshop
static int de_identify_printshop(deark *c)
{
	// TODO: Check to see if the base filename begins with "gr".
	// TODO: Check to see if the last [len mod 572] bytes of the file are either
	// 0x00 or 0x1a.

	if(de_input_file_has_ext(c, "dat")) {
		if((c->infile->len % 572)==0) {
			return 10;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x8a56f(%rip), %rsi     # 0x1a3076
callq 0x15d180
cmpl $0x0, %eax
je 0x118b38
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movl $0x23c, %ecx            # imm = 0x23C
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x118b36
movl $0xa, -0x4(%rbp)
jmp 0x118b3f
jmp 0x118b38
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xac1ca(%rip), %rcx     # 0x1c4d31
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xac1c9(%rip), %rcx     # 0x1c4d3e
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x118ba0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0x118c00
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
movq -0x8(%rbp), %rdi
leaq 0xac278(%rip), %rsi     # 0x1c4e4f
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x118ef0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printshop.c
// Function: de_identify_newprintshop
static int de_identify_newprintshop(deark *c)
{
	if(de_input_file_has_ext(c, "pog")) {
		if((c->infile->len % 572)==10) {
			return 90;
		}
		else {
			return 10;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xac255(%rip), %rsi     # 0x1c4e6c
callq 0x15d180
cmpl $0x0, %eax
je 0x118c4f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movl $0x23c, %ecx            # imm = 0x23C
cqto
idivq %rcx
cmpq $0xa, %rdx
jne 0x118c46
movl $0x5a, -0x4(%rbp)
jmp 0x118c56
movl $0xa, -0x4(%rbp)
jmp 0x118c56
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xac0e4(%rip), %rcx     # 0x1c4d5b
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xac0e2(%rip), %rcx     # 0x1c4d67
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x118cb0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0x118d10
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x8(%rbp), %rdi
leaq 0xac189(%rip), %rsi     # 0x1c4e70
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x118ef0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xac15f(%rip), %rsi     # 0x1c4e86
callq 0x15d180
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x14(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x164d10
leaq -0x14(%rbp), %rdi
leaq 0xac136(%rip), %rsi     # 0x1c4e8a
movl $0x3, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x118d7b
movl -0x18(%rbp), %edx
movl $0xa, %eax
movl $0x5a, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x118da3
cmpl $0x0, -0x18(%rbp)
jne 0x118d8a
movl $0x0, -0x4(%rbp)
jmp 0x118da3
movzbl -0x14(%rbp), %eax
cmpl $0xb, %eax
jne 0x118d9c
movl $0x1e, -0x4(%rbp)
jmp 0x118da3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xabfb6(%rip), %rcx     # 0x1c4d7d
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xabfb5(%rip), %rcx     # 0x1c4d8a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x118e00
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x58, %esi
movl $0x34, %edx
movl $0x3, %ecx
callq 0x16b750
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x78(%rax)
movq -0x20(%rbp), %rax
movsd 0xabeb0(%rip), %xmm0    # 0x1c4d10
movsd %xmm0, 0x80(%rax)
movq -0x20(%rbp), %rax
movsd 0xabe94(%rip), %xmm0    # 0x1c4d08
movsd %xmm0, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl $0x3, %edx
movl $0xb, %ecx
movl $0x23c, %r8d            # imm = 0x23C
leaq 0xabfed(%rip), %r9      # 0x1c4e90
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x16c690
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x2, %edx
callq 0x16afa0
movq -0x18(%rbp), %rdi
callq 0x16af60
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15d260
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xabb29(%rip), %rcx     # 0x1c4eb0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xabb1f(%rip), %rcx     # 0x1c4eb4
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x1193d0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x21d(%rip), %rcx       # 0x1195d0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x28e(%rip), %rcx       # 0x119650
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psf.c
// Function: de_identify_psf
static int de_identify_psf(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "\x72\xb5\x4a\x86", 4))
		return 100;
	if(!dbuf_memcmp(c->infile, 0, "\x36\x04", 2)) {
		// TODO: Better PSFv1 detection.
		return 65;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xaba55(%rip), %rdx     # 0x1c5044
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x119607
movl $0x64, -0x4(%rbp)
jmp 0x119639
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xaba2f(%rip), %rdx     # 0x1c5049
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x119632
movl $0x41, -0x4(%rbp)
jmp 0x119639
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psf.c
// Function: do_psf1_header
static void do_psf1_header(deark *c, lctx *d)
{
	i64 pos = 0;

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

	d->headersize = 4;

	d->mode = de_getbyte(2);
	de_dbg(c, "mode: 0x%02x", (unsigned int)d->mode);
	de_dbg_indent(c, 1);
	d->num_glyphs = (d->mode & 0x01) ? 512 : 256;
	de_dbg(c, "number of glyphs: %d", (int)d->num_glyphs);
	d->has_unicode_table = (d->mode & 0x02) ? 1 : 0;
	de_dbg(c, "has Unicode table: %s", d->has_unicode_table?"yes":"no");
	de_dbg_indent(c, -1);

	d->bytes_per_glyph = (i64)de_getbyte(3);
	d->glyph_height = d->bytes_per_glyph;
	d->glyph_width = 8;
	de_dbg(c, "glyph dimensions: %d"DE_CHAR_TIMES"%d", (int)d->glyph_width, (int)d->glyph_height);

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0xab66f(%rip), %rsi     # 0x1c4f88
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rax
movq $0x4, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165060
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %edx
leaq 0xbdd8d(%rip), %rsi     # 0x1d76f5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %edx
andl $0x1, %edx
movl $0x100, %eax            # imm = 0x100
movl $0x200, %ecx            # imm = 0x200
cmpl $0x0, %edx
cmovnel %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %edx
leaq 0x92498(%rip), %rsi     # 0x1abe50
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %edx
andl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
leaq 0x9a00e(%rip), %rdx     # 0x1b39fe
leaq 0xa9043(%rip), %rax     # 0x1c2a3a
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0xab540(%rip), %rsi     # 0x1c4f45
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3, %esi
callq 0x165060
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x8, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, %ecx
leaq 0xab4fb(%rip), %rsi     # 0x1c4f6f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jne 0x11a1db
jmp 0x11a29e
movq -0x10(%rbp), %rax
cmpq $0x7d0, 0x68(%rax)      # imm = 0x7D0
jl 0x11a1ee
jmp 0x11a29e
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x68(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movl %eax, %ecx
movl -0x24(%rbp), %r8d
leaq 0xaadef(%rip), %rsi     # 0x1c500c
movb $0x0, %al
callq 0x15b350
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
imulq $0x28, -0x20(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x11a250
movq -0x8(%rbp), %rdi
leaq 0xaade2(%rip), %rsi     # 0x1c5029
movb $0x0, %al
callq 0x15b350
jmp 0x11a29e
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop