LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/palmbitmap.c
// Function: de_identify_palmbitmap
static int de_identify_palmbitmap(deark *c)
{
	if(de_input_file_has_ext(c, "palm")) {
		int x;
		x = de_identify_palmbitmap_internal(c, c->infile, 0, c->infile->len);
		if(x) return 90;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x81f76(%rip), %rsi     # 0x128682
callq 0xdfcd5
testl %eax, %eax
je 0xa6742
movq 0x18(%rbx), %r15
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0xe3eb4
xorl %r14d, %r14d
cmpb $-0x1, %al
sete %r14b
shll $0x4, %r14d
movq 0x18(%rbx), %rdi
leaq 0x9(%r14), %rsi
callq 0xe3eb4
cmpb $0x3, %al
jbe 0xa674d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0xe3f46
movq %rax, %r12
movq %r14, %rsi
orq $0x2, %rsi
movq %r15, %rdi
callq 0xe3f46
testq %r12, %r12
je 0xa6742
testq %rax, %rax
je 0xa6742
movq %r14, %rsi
orq $0x4, %rsi
movq %r15, %rdi
callq 0xe3f46
movq %rax, %r15
movq 0x18(%rbx), %rdi
orq $0x8, %r14
movq %r14, %rsi
callq 0xe3eb4
orb %al, %bpl
je 0xa67ae
cmpb $0x10, %al
ja 0xa6742
movzbl %al, %eax
movl $0x10116, %ecx          # imm = 0x10116
btl %eax, %ecx
jae 0xa6742
testq %r15, %r15
setne %al
testb $0x1, %r15b
sete %cl
testb %cl, %al
je 0xa6742
pushq $0x5a
popq %rax
jmp 0xa6744
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/palmpdb.c
// Function: de_module_palmdb
void de_module_palmdb(deark *c, struct deark_module_info *mi)
{
	mi->id = "palmdb";
	mi->id_alias[0] = "palmrc";
	mi->desc = "Palm OS PDB or PRC";
	mi->run_fn = de_run_pdb_or_prc;
	mi->identify_fn = de_identify_pdb_prc;
	mi->help_fn = de_help_pdb_prc;
}

// Assembly:
leaq 0x818e4(%rip), %rax     # 0x1280d3
movq %rax, (%rsi)
leaq 0x818e1(%rip), %rax     # 0x1280da
movq %rax, 0x38(%rsi)
leaq 0x818dd(%rip), %rax     # 0x1280e1
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xa682a
movq %rax, 0x18(%rsi)
leaq 0x14ec(%rip), %rax      # 0xa7d06
movq %rax, 0x20(%rsi)
leaq 0x16c8(%rip), %rax      # 0xa7eed
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/palmpdb.c
// Function: calc_rec_len
static i64 calc_rec_len(deark *c, lctx *d, i64 rec_idx)
{
	i64 len;
	if(rec_idx+1 < d->rec_list.num_recs) {
		len = (i64)(d->rec_list.rec_data[rec_idx+1].offset - d->rec_list.rec_data[rec_idx].offset);
	}
	else {
		len = c->infile->len - (i64)d->rec_list.rec_data[rec_idx].offset;
	}
	return len;
}

// Assembly:
leaq 0x1(%rdx), %rax
cmpq 0xa0(%rsi), %rax
jge 0xa80ef
movq 0xa8(%rsi), %rcx
movl 0x4(%rcx,%rdx,4), %eax
subl (%rcx,%rdx,4), %eax
retq
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
movq 0xa8(%rsi), %rcx
movl (%rcx,%rdx,4), %ecx
subq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/palmpdb.c
// Function: extract_item
static void extract_item(deark *c, lctx *d, i64 data_offs, i64 data_len,
	const char *ext_sz, de_ucstring *ext_ucstring,
	unsigned int createflags, int always_extract)
{
	de_finfo *fi = NULL;

	if(c->extract_level<2 && !always_extract) goto done;
	if(data_offs<0 || data_len<0) goto done;
	if(data_offs+data_len > c->infile->len) goto done;
	fi = de_finfo_create(c);
	if(ext_sz) {
		de_finfo_set_name_from_sz(c, fi, ext_sz, 0, DE_ENCODING_ASCII);
	}
	else if(ext_ucstring) {
		de_finfo_set_name_from_ucstring(c, fi, ext_ucstring, 0);
	}
	dbuf_create_file_from_slice(c->infile, data_offs, data_len, NULL, fi, createflags);
done:
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x2, 0x90(%rdi)
setge %al
cmpl $0x0, 0x40(%rsp)
setne %cl
xorl %r15d, %r15d
orq %rsi, %rdx
js 0xa81a9
orb %al, %cl
je 0xa81a9
movq %rsi, %r12
leaq (%r14,%rsi), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0xa814d
xorl %r15d, %r15d
jmp 0xa81a9
movq %r8, %r13
movl %r9d, 0x4(%rsp)
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r15
testq %rbp, %rbp
je 0xa817b
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0xdffbd
jmp 0xa8190
testq %r13, %r13
je 0xa8190
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0xdfd55
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl 0x4(%rsp), %r9d
callq 0xe4e0b
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdfd24
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/palmpdb.c
// Function: looks_like_a_4cc_b
static int looks_like_a_4cc_b(const u8 *buf)
{
	i64 i;

	for(i=0; i<4; i++) {
		if(buf[i]<32 || buf[i]>126) return 0;
	}
	return 1;
}

// Assembly:
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpq $0x4, %rcx
je 0xa81dd
movb (%rdi,%rcx), %dl
addb $-0x7f, %dl
incq %rcx
cmpb $-0x60, %dl
ja 0xa81c7
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: de_module_pcpaint
void de_module_pcpaint(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcpaint";
	mi->desc = "PCPaint PIC or CLP image";
	mi->run_fn = de_run_pcpaint;
	mi->identify_fn = de_identify_pcpaint;
	mi->help_fn = de_help_pcpaint;
}

// Assembly:
leaq 0x806d1(%rip), %rax     # 0x1288b8
movq %rax, (%rsi)
leaq 0x806cf(%rip), %rax     # 0x1288c0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xa8217
movq %rax, 0x18(%rsi)
leaq 0x768(%rip), %rax       # 0xa896f
movq %rax, 0x20(%rsi)
leaq 0x7f9(%rip), %rax       # 0xa8a0b
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: de_identify_pcpaint
static int de_identify_pcpaint(deark *c)
{
	u8 buf[12];
	int pic_ext, clp_ext;
	i64 x;

	pic_ext = de_input_file_has_ext(c, "pic");

	de_read(buf, 0, 12);
	if(buf[0]==0x34 && buf[1]==0x12) {
		if(buf[11]==0xff) {
			return pic_ext ? 100 : 50;
		}
		if(buf[11]==0x00 && buf[10]==0x01) {
			return pic_ext ? 60 : 10;
		}
	}

	clp_ext = de_input_file_has_ext(c, "clp");
	if(clp_ext) {
		x = de_getu16le_direct(&buf[0]);
		if(x==c->infile->len) {
			return 50;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x80504(%rip), %rsi     # 0x128e85
callq 0xdfcd5
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq 0x4(%rsp), %r14
pushq $0xc
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpb $0x34, (%r14)
jne 0xa89c7
cmpb $0x12, 0x5(%rsp)
jne 0xa89c7
movb 0xf(%rsp), %al
cmpb $-0x1, %al
je 0xa89f7
testb %al, %al
jne 0xa89c7
cmpb $0x1, 0xe(%rsp)
jne 0xa89c7
testl %ebp, %ebp
pushq $0xa
popq %rcx
pushq $0x3c
jmp 0xa89fe
leaq 0x6d75e(%rip), %rsi     # 0x11612c
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0xa89f3
leaq 0x4(%rsp), %rdi
callq 0xe3f9f
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jne 0xa89f3
pushq $0x32
popq %rax
jmp 0xa8a02
xorl %eax, %eax
jmp 0xa8a02
testl %ebp, %ebp
pushq $0x32
popq %rcx
pushq $0x64
popq %rax
cmovel %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: de_module_bsave_cmpr
void de_module_bsave_cmpr(deark *c, struct deark_module_info *mi)
{
	mi->id = "bsave_cmpr";
	mi->desc = "PCPaint compressed BSAVE";
	mi->run_fn = de_run_bsave_cmpr;
	mi->identify_fn = de_identify_bsave_cmpr;
}

// Assembly:
leaq 0x7fe92(%rip), %rax     # 0x1288d9
movq %rax, (%rsi)
leaq 0x7fe93(%rip), %rax     # 0x1288e4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xa8a6c
movq %rax, 0x18(%rsi)
leaq 0x13c(%rip), %rax       # 0xa8ba3
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: de_run_bsave_cmpr
static void de_run_bsave_cmpr(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	int ret;
	i64 pos;
	i64 udata_size;
	dbuf *outf = NULL;

	de_declare_fmt(c, "PCPaint compressed BSAVE");
	d = de_malloc(c, sizeof(lctx));
	d->file_fmt = FMT_CMPR_BSAVE;

	udata_size = de_getu16le(7);
	d->unc_pixels = dbuf_create_membuf(c, BSAVE_HDRSIZE+udata_size, 0x1);

	// Construct the 7-byte BSAVE header
	dbuf_copy(c->infile, 0, 5, d->unc_pixels);
	dbuf_copy(c->infile, 7, 2, d->unc_pixels);

	pos = 9;
	d->num_rle_blocks = de_getu16le_p(&pos);
	de_dbg(c, "num rle blocks: %d", (int)d->num_rle_blocks);

	de_dbg(c, "decompressing");
	de_dbg_indent(c, 1);
	ret = decompress_blocks(c, d, 11);
	de_dbg_indent(c, -1);
	if(!ret) goto done;

	outf = dbuf_create_output_file(c, "unc.pic", NULL, 0);
	dbuf_copy(d->unc_pixels, 0, d->unc_pixels->len, outf);

done:
	dbuf_close(outf);
	destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x7fe62(%rip), %rsi     # 0x1288e4
callq 0xe07f7
movl $0x4a0, %esi            # imm = 0x4A0
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
movl $0x3, (%rax)
movq 0x18(%rbx), %rdi
pushq $0x7
popq %r12
movq %r12, %rsi
callq 0xe3fa3
leaq 0x7(%rax), %rsi
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0xe59cd
movq %rax, 0x88(%r14)
movq 0x18(%rbx), %rdi
xorl %r15d, %r15d
pushq $0x5
popq %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0xe45f4
movq 0x18(%rbx), %rdi
movq 0x88(%r14), %rcx
pushq $0x2
popq %rdx
movq %r12, %rsi
callq 0xe45f4
leaq 0x8(%rsp), %rsi
movq $0x9, (%rsi)
movq 0x18(%rbx), %rdi
callq 0xe3fc4
movq %rax, 0x80(%r14)
leaq 0x802b0(%rip), %rsi     # 0x128dc2
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
leaq 0x61927(%rip), %rsi     # 0x10a44c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %ebp, %esi
callq 0xdeba7
pushq $0xb
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa9991
movl %eax, %ebp
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
testl %ebp, %ebp
je 0xa8b83
leaq 0x80322(%rip), %rsi     # 0x128e81
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r15
movq 0x88(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0xe45f4
movq %r15, %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa8bc5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: destroy_lctx
static void destroy_lctx(deark *c, lctx *d)
{
	if(!d) return;
	if(d->unc_pixels) dbuf_close(d->unc_pixels);
	de_finfo_destroy(c, d->fi);
	de_free(c, d->pal_info_mainfile.data);
	de_free(c, d->pal_info_palfile.data);
	de_free(c, d);
}

// Assembly:
testq %rsi, %rsi
je 0xa8c1b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x88(%rsi), %rdi
testq %rdi, %rdi
je 0xa8be5
callq 0xe5591
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xdfd24
movq 0x58(%rbx), %rsi
movq %r14, %rdi
callq 0xded32
movq 0x70(%rbx), %rsi
movq %r14, %rdi
callq 0xded32
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: do_read_alt_palette_file
static int do_read_alt_palette_file(deark *c, lctx *d)
{
	const char *palfn;
	dbuf *palfile = NULL;
	int retval = 0;
	i64 magic;

	palfn = de_get_ext_option(c, "palfile");
	if(!palfn) palfn = de_get_ext_option(c, "file2");
	if(!palfn) {
		retval = 1;
		goto done;
	}

	de_dbg(c, "[reading palette from alternate file]");

	palfile = dbuf_open_input_file(c, palfn);
	if(!palfile) {
		goto done;
	}

	magic = dbuf_getu16le(palfile, 0);
	if(magic!=0x1234) {
		de_err(c, "Palette file is not in PIC format.");
		goto done;
	}

	do_read_palette_data(c, d, palfile, &d->pal_info_palfile);

	if(d->pal_info_palfile.edesc==0) {
		de_warn(c, "Palette file does not contain palette information.");
		retval = 1;
		goto done;
	}

	d->pal_info_to_use = &d->pal_info_palfile;
	retval = 1;

done:
	dbuf_close(palfile);
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x62ea6(%rip), %rsi     # 0x10bad8
callq 0xdfa87
pushq $0x1
popq %rbx
testq %rax, %rax
jne 0xa8c57
leaq 0x5a936(%rip), %rsi     # 0x10357c
movq %r14, %rdi
callq 0xdfa87
testq %rax, %rax
je 0xa8cdb
movq %rax, %r12
leaq 0x7fddd(%rip), %rsi     # 0x128a3e
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
movq %r12, %rsi
callq 0xe600b
testq %rax, %rax
je 0xa8caf
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0xe3fa3
cmpq $0x1234, %rax           # imm = 0x1234
jne 0xa8cb4
leaq 0x60(%r15), %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xa8efe
cmpl $0x0, 0x60(%r15)
je 0xa8ce0
movq %r13, 0x78(%r15)
jmp 0xa8cc7
xorl %r12d, %r12d
jmp 0xa8cc5
leaq 0x7fda9(%rip), %rsi     # 0x128a64
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
xorl %ebx, %ebx
movq %r12, %rdi
callq 0xe5591
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r12d, %r12d
jmp 0xa8cc7
leaq 0x7fda0(%rip), %rsi     # 0x128a87
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf05a
jmp 0xa8cc7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decompress_block
static int decompress_block(deark *c, lctx *d,
	i64 pos1, i64 packed_data_size, u8 run_marker)
{
	i64 pos = pos1;
	i64 end_of_this_block;
	u8 x;
	i64 run_length;

	end_of_this_block = pos1 + packed_data_size;
	if(end_of_this_block > c->infile->len) {
		end_of_this_block = c->infile->len;
	}

	while(pos<end_of_this_block) {
		x = de_getbyte_p(&pos);
		if(x!=run_marker) {
			// An non-compressed part of the image
			dbuf_writebyte(d->unc_pixels, x);
			continue;
		}

		// A compressed run.
		x = de_getbyte_p(&pos);
		if(x!=0) {
			// If nonzero, this byte is the run length.
			run_length = (i64)x;
		}
		else {
			// If zero, it is followed by a 16-bit run length
			run_length = de_getu16le_p(&pos);
		}

		// Read the byte value to repeat (run_length) times.
		x = de_getbyte_p(&pos);
		dbuf_write_run(d->unc_pixels, x, run_length);
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movq %rdx, (%r13)
addq %rdx, %r14
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
cmpq %rax, %r14
cmovgeq %rax, %r14
cmpq %r14, %rdx
jge 0xa8eef
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xe3f2a
cmpb %bl, %al
jne 0xa8ea9
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xe3f2a
testb %al, %al
je 0xa8eba
movzbl %al, %ebp
jmp 0xa8eca
movq 0x88(%r15), %rdi
movzbl %al, %esi
callq 0xe5bc5
jmp 0xa8ee9
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xe3fc4
movq %rax, %rbp
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xe3f2a
movq 0x88(%r15), %rdi
movzbl %al, %esi
movq %rbp, %rdx
callq 0xe5e40
movq (%rsp), %rdx
jmp 0xa8e7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: do_read_palette_data
static int do_read_palette_data(deark *c, lctx *d, dbuf *f, struct pal_info *palinfo)
{
	palinfo->edesc = (UI)dbuf_getu16le(f, 13);
	palinfo->esize = dbuf_getu16le(f, 15);
	palinfo->data = de_malloc(c, palinfo->esize);
	dbuf_read(f, palinfo->data, 17, palinfo->esize);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0xd
popq %rsi
movq %r14, %rdi
callq 0xe3fa3
movl %eax, (%rbx)
pushq $0xf
popq %rsi
movq %r14, %rdi
callq 0xe3fa3
movq %rax, 0x8(%rbx)
movq %r15, %rdi
movq %rax, %rsi
callq 0xdecaf
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
pushq $0x11
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe3cb7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_bilevel
static void decode_bilevel(deark *c, lctx *d)
{
	i64 src_rowspan;
	int is_grayscale;
	UI edesc = d->pal_info_to_use->edesc;
	de_bitmap *img = NULL;

	if(!d->unc_pixels) goto done;

	acquire_palette(c, d, 2);

	// PCPaint's CGA and EGA 2-color modes used gray shade 170 instead of
	// white (255). Maybe they should be interpreted as white, but for
	// historical accuracy I'll go with gray170.
	if(edesc==0 && (d->video_mode==0x43 || d->video_mode==0x45)) {
		d->pal[1] = DE_MAKE_GRAY(170);
	}

	d->pdwidth = de_pad_to_n(d->npwidth, 8);
	src_rowspan = d->pdwidth/8;
	is_grayscale = de_is_grayscale_palette(d->pal, 2);
	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, is_grayscale?1:3);

	de_convert_image_paletted(d->unc_pixels, 0,
		1, src_rowspan, d->pal, img, 0);

	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE|
		DE_CREATEFLAG_OPT_IMAGE);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x88(%rsi)
je 0xa9236
movq %rsi, %rbx
movq %rdi, %r14
movq 0x78(%rsi), %rax
movl (%rax), %ebp
pushq $0x2
popq %rdx
callq 0xa9517
testl %ebp, %ebp
jne 0xa91b2
movzbl 0x3a(%rbx), %eax
cmpl $0x45, %eax
je 0xa91a8
cmpl $0x43, %eax
jne 0xa91b2
movl $0xffaaaaaa, 0xa0(%rbx) # imm = 0xFFAAAAAA
movq 0x20(%rbx), %rdi
pushq $0x8
popq %r15
movq %r15, %rsi
callq 0xdfbb6
movq %rax, 0x30(%rbx)
cqto
idivq %r15
movq %rax, %r15
leaq 0x9c(%rbx), %r12
pushq $0x2
popq %rsi
movq %r12, %rdi
callq 0xe6d06
movq 0x30(%rbx), %rdx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
xorl %edi, %edi
testl %eax, %eax
sete %dil
leal 0x1(,%rdi,2), %r8d
movq %r14, %rdi
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
andl $0x0, (%rsp)
pushq $0x1
popq %rdx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
callq 0xe7cbc
movq 0x10(%rbx), %rsi
pushq $0x6
popq %rdx
movq %r14, %rdi
callq 0xe70ab
jmp 0xa9239
xorl %r14d, %r14d
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_cga4
static void decode_cga4(deark *c, lctx *d)
{
	i64 src_rowspan;
	de_bitmap *img = NULL;

	if(!d->unc_pixels) goto done;

	acquire_palette(c, d, 4);

	d->pdwidth = de_pad_to_4(d->npwidth);
	src_rowspan = d->pdwidth/4;
	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, 3);

	de_convert_image_paletted(d->unc_pixels, 0,
		2, src_rowspan, d->pal, img, 0);

	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x88(%rsi)
je 0xa92d7
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
movq %r15, %rdx
callq 0xa9517
movq 0x20(%rbx), %rdi
callq 0xdfb90
movq %rax, %r9
movq %rax, 0x30(%rbx)
cqto
idivq %r15
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
pushq $0x3
popq %r8
movq %r14, %rdi
movq %r9, %rdx
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r8
andl $0x0, (%rsp)
pushq $0x2
popq %rdx
xorl %esi, %esi
movq %r15, %rcx
movq %rax, %r9
callq 0xe7cbc
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0xe70ab
jmp 0xa92da
xorl %r14d, %r14d
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_egavga16
static void decode_egavga16(deark *c, lctx *d)
{
	i64 src_rowspan;
	de_bitmap *img = NULL;

	acquire_palette(c, d, 16);

	d->pdwidth = de_pad_to_2(d->npwidth);
	src_rowspan = d->pdwidth/2;

	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, 3);
	de_convert_image_paletted(d->unc_pixels, 0, 4, src_rowspan, d->pal, img, 0);
	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x10
popq %rdx
callq 0xa9517
movq 0x20(%rbx), %rdi
callq 0xdfb87
movq %rax, %r9
movq %rax, 0x30(%rbx)
pushq $0x2
popq %rcx
cqto
idivq %rcx
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
pushq $0x3
popq %r8
movq %r14, %rdi
movq %r9, %rdx
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r8
andl $0x0, (%rsp)
pushq $0x4
popq %rdx
xorl %esi, %esi
movq %r15, %rcx
movq %rax, %r9
callq 0xe7cbc
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0xe70ab
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_vga256
static void decode_vga256(deark *c, lctx *d)
{
	de_bitmap *img = NULL;

	acquire_palette(c, d, 256);

	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, 3);

	de_convert_image_paletted(d->unc_pixels, 0,
		8, img->width, d->pal, img, 0);

	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE);

	de_bitmap_destroy(img);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x100, %edx            # imm = 0x100
callq 0xa9517
movq 0x30(%rbx), %rdx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
pushq $0x3
popq %r8
movq %r14, %rdi
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
movq 0x8(%rax), %rcx
leaq 0x9c(%rbx), %r8
andl $0x0, (%rsp)
pushq $0x8
popq %rdx
xorl %esi, %esi
movq %rax, %r9
callq 0xe7cbc
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0xe70ab
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_4color_planar
static void decode_4color_planar(deark *c, lctx *d)
{
	de_bitmap *img = NULL;
	i64 src_rowspan;
	i64 src_planespan;

	acquire_palette(c, d, 4);

	d->pdwidth = de_pad_to_n(d->npwidth, 8);
	src_rowspan = d->pdwidth/8;
	src_planespan = src_rowspan*d->height;

	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, 3);
	de_convert_image_paletted_planar(d->unc_pixels, 0, 2, src_rowspan, src_planespan,
		d->pal, img, 0x02);
	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %rdx
callq 0xa9517
movq 0x20(%rbx), %rdi
pushq $0x8
popq %r15
movq %r15, %rsi
callq 0xdfbb6
movq %rax, %r9
movq %rax, 0x30(%rbx)
cqto
idivq %r15
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %rcx, %r12
imulq %rax, %r12
pushq $0x3
popq %r8
movq %r14, %rdi
movq %r9, %rdx
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r9
pushq $0x2
popq %rdx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
pushq $0x2
pushq %rax
callq 0xe7de1
popq %rax
popq %rcx
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe70ab
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decode_egavga16_planar
static void decode_egavga16_planar(deark *c, lctx *d)
{
	i64 src_rowspan;
	i64 src_planespan;
	de_bitmap *img = NULL;

	acquire_palette(c, d, 16);

	d->pdwidth = de_pad_to_n(d->npwidth, 8);
	src_rowspan = d->pdwidth/8;
	src_planespan = src_rowspan*d->height;

	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->height, 3);
	de_convert_image_paletted_planar(d->unc_pixels, 0, 4, src_rowspan,
		src_planespan, d->pal, img, 0x2);
	de_bitmap_write_to_file_finfo(img, d->fi, DE_CREATEFLAG_FLIP_IMAGE);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x10
popq %rdx
callq 0xa9517
movq 0x20(%rbx), %rdi
pushq $0x8
popq %r15
movq %r15, %rsi
callq 0xdfbb6
movq %rax, %r9
movq %rax, 0x30(%rbx)
cqto
idivq %r15
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %rcx, %r12
imulq %rax, %r12
pushq $0x3
popq %r8
movq %r14, %rdi
movq %r9, %rdx
callq 0xe746f
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r9
pushq $0x4
popq %rdx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
pushq $0x2
pushq %rax
callq 0xe7de1
popq %rax
popq %rcx
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0xe70ab
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcpaint.c
// Function: decompress_blocks
static int decompress_blocks(deark *c, lctx *d, i64 pos1)
{
	i64 i;
	i64 packed_block_size;
	i64 unpacked_block_size;
	i64 end_of_this_block;
	i64 pos = pos1;
	u8 run_marker;
	int retval = 0;

	for(i=0; i<d->num_rle_blocks; i++) {
		de_dbg3(c, "block #%d at %"I64_FMT, (int)i, pos);
		de_dbg_indent(c, 1);
		// start_of_this_block = pos;
		packed_block_size = de_getu16le(pos);
		// block size includes the 5-byte header, so it can't be < 5.
		if(packed_block_size<5) packed_block_size=5;
		end_of_this_block = pos + packed_block_size; // Remember where this block ends
		if(end_of_this_block > c->infile->len) goto done;
		unpacked_block_size = de_getu16le(pos+2);
		run_marker = de_getbyte(pos+4);
		pos+=5;

		de_dbg3(c, "packed size: %"I64_FMT, packed_block_size);
		de_dbg3(c, "unpacked size: %"I64_FMT, unpacked_block_size);
		de_dbg3(c, "run marker: 0x%02x", (UI)run_marker);

		if(!decompress_block(c, d, pos, packed_block_size-5, run_marker)) {
			goto done;
		}
		de_dbg_indent(c, -1);

		pos = end_of_this_block;
	}
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r14
xorl %ebx, %ebx
movq %rsi, 0x8(%rsp)
cmpq 0x80(%rbp), %rbx
jge 0xa9aa5
xorl %ebp, %ebp
movq %r14, %rdi
leaq 0x7f40d(%rip), %rsi     # 0x128dd5
movl %ebx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0xdea83
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fa3
movq %rax, %r13
cmpq $0x6, %rax
pushq $0x5
popq %rax
cmovlq %rax, %r13
leaq (%r15,%r13), %r12
movq 0x18(%r14), %rdi
cmpq 0x18(%rdi), %r12
jg 0xa9aa8
leaq 0x2(%r15), %rsi
callq 0xe3fa3
movq %rax, %rbp
movq 0x18(%r14), %rdi
leaq 0x4(%r15), %rsi
callq 0xe3eb4
movq %rbx, 0x10(%rsp)
movl %eax, %ebx
addq $0x5, %r15
movq %r14, %rdi
leaq 0x7f3af(%rip), %rsi     # 0x128de8
movq %r13, %rdx
xorl %eax, %eax
callq 0xdea83
movq %r14, %rdi
leaq 0x7f399(%rip), %rsi     # 0x128de6
movq %rbp, %rdx
xorl %eax, %eax
callq 0xdea83
movzbl %bl, %ebx
movq %r14, %rdi
leaq 0x7efb3(%rip), %rsi     # 0x128a17
movl %ebx, %edx
xorl %eax, %eax
callq 0xdea83
addq $-0x5, %r13
movq %r14, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl %ebx, %r8d
movq 0x10(%rsp), %rbx
callq 0xa8e4d
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %rbx
movq %r12, %r15
jmp 0xa99af
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_module_pcx
void de_module_pcx(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcx";
	mi->desc = "PCX image";
	mi->run_fn = de_run_pcx;
	mi->identify_fn = de_identify_pcx;
	mi->help_fn = de_help_pcx;
}

// Assembly:
leaq 0x7f461(%rip), %rax     # 0x128f24
movq %rax, (%rsi)
leaq 0x7f45b(%rip), %rax     # 0x128f28
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xa9af3
movq %rax, 0x18(%rsi)
leaq 0x41(%rip), %rax        # 0xa9b24
movq %rax, 0x20(%rsi)
leaq 0xdd(%rip), %rax        # 0xa9bcb
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_identify_pcx
static int de_identify_pcx(deark *c)
{
	u8 buf[8];

	de_read(buf, 0, 8);
	if(buf[0]==0x0a && (buf[1]==0 || buf[1]==2 || buf[1]==3
		|| buf[1]==4 || buf[1]==5) &&
		(buf[2]==0 || buf[2]==1) )
	{
		if(de_input_file_has_ext(c, "pcx"))
			return 100;
		return 16;
	}

	// VGAPaint 386 PCX SFX
	if(buf[0]==0xeb && buf[1]==0x0e && buf[2]==1 && buf[3]==8 &&
		(de_getbyte(16)==0xe8))
	{
		if(de_input_file_has_ext(c, "pcx"))
			return 80;
		return 8;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
pushq $0x8
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0xe3cb7
movb (%r15), %cl
movzbl 0x1(%r15), %eax
cmpb $0xa, %cl
jne 0xa9b7e
cmpl $0x5, %eax
ja 0xa9b7e
cmpl $0x1, %eax
je 0xa9b7e
cmpb $0x1, 0xa(%rsp)
ja 0xa9b7e
leaq 0x7f3b7(%rip), %rsi     # 0x128f24
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
pushq $0x10
popq %rax
pushq $0x64
jmp 0xa9bbb
cmpb $-0x15, %cl
jne 0xa9bbf
cmpb $0xe, %al
jne 0xa9bbf
cmpb $0x1, 0xa(%rsp)
jne 0xa9bbf
cmpb $0x8, 0xb(%rsp)
jne 0xa9bbf
movq 0x18(%r14), %rdi
pushq $0x10
popq %rsi
callq 0xe3eb4
cmpb $-0x18, %al
jne 0xa9bbf
leaq 0x7f378(%rip), %rsi     # 0x128f24
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
pushq $0x8
popq %rax
pushq $0x50
popq %rbx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_module_mswordscr
void de_module_mswordscr(deark *c, struct deark_module_info *mi)
{
	mi->id = "mswordscr";
	mi->desc = "MS Word for DOS Screen Capture";
	mi->run_fn = de_run_mswordscr;
	mi->identify_fn = de_identify_mswordscr;
}

// Assembly:
leaq 0x7f32b(%rip), %rax     # 0x128f32
movq %rax, (%rsi)
leaq 0x7f32b(%rip), %rax     # 0x128f3c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xa9c2c
movq %rax, 0x18(%rsi)
leaq 0x3d(%rip), %rax        # 0xa9c64
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_run_mswordscr
static void de_run_mswordscr(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->is_mswordscr = 1;
	de_run_pcx_internal(c, d, mparams);
	de_free(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x4b8, %esi            # imm = 0x4B8
callq 0xdecaf
movq %rax, %r14
movb $0x1, 0x90(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa9f84
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_identify_mswordscr
static int de_identify_mswordscr(deark *c)
{
	u8 buf[8];

	de_read(buf, 0, 8);
	if(buf[0]==0xcd && (buf[1]==0 || buf[1]==2 || buf[1]==3
		|| buf[1]==4 || buf[1]==5) &&
		buf[2]==1 )
	{
		if(de_input_file_has_ext(c, "scr") || de_input_file_has_ext(c, "mwg"))
			return 100;

		return 10;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
pushq $0x8
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpb $-0x33, (%r15)
jne 0xa9cdf
movb 0x9(%rsp), %al
testb $-0x3, %al
setne %cl
addb $-0x3, %al
cmpb $0x3, %al
setae %al
testb %al, %cl
jne 0xa9cdf
cmpb $0x1, 0xa(%rsp)
jne 0xa9cdf
leaq 0x7f287(%rip), %rsi     # 0x128f38
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0xa9cc3
pushq $0x64
popq %r14
jmp 0xa9cdf
leaq 0x7f766(%rip), %rsi     # 0x129430
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
pushq $0xa
popq %rax
pushq $0x64
popq %r14
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_module_dcx
void de_module_dcx(deark *c, struct deark_module_info *mi)
{
	mi->id = "dcx";
	mi->desc = "DCX (multi-image PCX)";
	mi->run_fn = de_run_dcx;
	mi->identify_fn = de_identify_dcx;
}

// Assembly:
leaq 0x7f268(%rip), %rax     # 0x128f5b
movq %rax, (%rsi)
leaq 0x7f262(%rip), %rax     # 0x128f5f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xa9d18
movq %rax, 0x18(%rsi)
leaq 0xe5(%rip), %rax        # 0xa9df8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_run_dcx
static void de_run_dcx(deark *c, de_module_params *mparams)
{
	u32 *page_offset;
	i64 num_pages;
	i64 page;
	i64 page_size;

	page_offset = de_mallocarray(c, 1023, sizeof(u32));
	num_pages = 0;
	while(num_pages < 1023) {
		page_offset[num_pages] = (u32)de_getu32le(4 + 4*num_pages);
		if(page_offset[num_pages]==0)
			break;
		num_pages++;
	}

	de_dbg(c, "number of pages: %d", (int)num_pages);

	for(page=0; page<num_pages; page++) {
		if(page == num_pages-1) {
			// Last page. Assume it goes to the end of file.
			page_size = c->infile->len - page_offset[page];
		}
		else {
			page_size = page_offset[page+1] - page_offset[page];
		}
		if(page_size<0) page_size=0;
		de_dbg(c, "page %d at %u, size=%"I64_FMT, (int)page, (UI)page_offset[page],
			page_size);

		dbuf_create_file_from_slice(c->infile, page_offset[page], page_size, "pcx", NULL, 0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x4
popq %r12
movl $0x3ff, %esi            # imm = 0x3FF
movq %r12, %rdx
callq 0xdf66f
movq %rax, %r14
xorl %r15d, %r15d
cmpq $0x3ff, %r15            # imm = 0x3FF
je 0xa9d63
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe409f
movl %eax, (%r14,%r15,4)
testl %eax, %eax
je 0xa9d63
incq %r15
addq $0x4, %r12
jmp 0xa9d3d
leaq 0x7f6ca(%rip), %rsi     # 0x129434
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
leaq -0x1(%r15), %r13
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0xa9de9
cmpq %rbp, %r13
jne 0xa9d99
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r12
movl -0x4(%r14,%r15,4), %ecx
subq %rcx, %r12
jmp 0xa9da5
movl (%r14,%rbp,4), %ecx
movl 0x4(%r14,%rbp,4), %r12d
subl %ecx, %r12d
testq %r12, %r12
movl $0x0, %eax
cmovleq %rax, %r12
movq %rbx, %rdi
leaq 0x7f68d(%rip), %rsi     # 0x129448
movl %ebp, %edx
movq %r12, %r8
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movl (%r14,%rbp,4), %esi
movq %r12, %rdx
leaq 0x7f14b(%rip), %rcx     # 0x128f24
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe4e0b
incq %rbp
jmp 0xa9d7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_module_pcx2com
void de_module_pcx2com(deark *c, struct deark_module_info *mi)
{
	mi->id = "pcx2com";
	mi->desc = "PCX2COM self-displaying image";
	mi->run_fn = de_run_pcx2com;
	mi->identify_fn = de_identify_pcx2com;
}

// Assembly:
leaq 0x7f154(%rip), %rax     # 0x128f75
movq %rax, (%rsi)
leaq 0x7f152(%rip), %rax     # 0x128f7d
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xa9e46
movq %rax, 0x18(%rsi)
leaq 0xd5(%rip), %rax        # 0xa9f16
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_run_pcx2com
static void de_run_pcx2com(deark *c, de_module_params *mparams)
{
	i64 pos;
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "pcx", NULL, 0);

	// header
	dbuf_enable_wbuffer(outf);
	dbuf_write(outf, (const u8*)"\x0a\x05\x01\x08\x00\x00\x00\x00\x3f\x01\xc7", 11);
	dbuf_truncate(outf, 64);
	dbuf_write(outf, (const u8*)"\x00\x01\x40\x01\x01\x00\x40\x01\xc8", 9);
	dbuf_truncate(outf, 128);

	// image data, and 0x0c palette marker
	dbuf_copy(c->infile, 920, c->infile->len-920, outf);

	// VGA palette
	pos = 152;
	while(pos < 152+768) {
		u8 x;

		x = de_getbyte_p(&pos);
		dbuf_writebyte(outf, de_scale_63_to_255(x));
	}

	dbuf_close(outf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x7f0cb(%rip), %rsi     # 0x128f24
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r14
movq %rax, %rdi
callq 0xe589c
leaq 0x7f07c(%rip), %rsi     # 0x128ef0
pushq $0xb
popq %rdx
movq %r14, %rdi
callq 0xe46ba
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0xe5eb2
leaq 0x7f06b(%rip), %rsi     # 0x128efc
pushq $0x9
popq %rdx
movq %r14, %rdi
callq 0xe46ba
movl $0x80, %esi
movq %r14, %rdi
callq 0xe5eb2
movq 0x18(%rbx), %rdi
movq $-0x398, %rdx           # imm = 0xFC68
addq 0x18(%rdi), %rdx
movl $0x398, %esi            # imm = 0x398
movq %r14, %rcx
callq 0xe45f4
leaq 0x8(%rsp), %r15
movq $0x98, (%r15)
movl $0x98, %eax
cmpq $0x397, %rax            # imm = 0x397
jg 0xa9f04
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edi
callq 0xe1cec
movzbl %al, %esi
movq %r14, %rdi
callq 0xe5bc5
movq 0x8(%rsp), %rax
jmp 0xa9ed6
movq %r14, %rdi
callq 0xe5591
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: de_identify_pcx2com
static int de_identify_pcx2com(deark *c)
{
	if(c->infile->len<922 || c->infile->len>65280) return 0;

	if((UI)de_getu32be(0)!=0xb81300cdU) return 0;
	if(de_getbyte(c->infile->len-1) != 0x0c) return 0;

	// The is the substring "Self PCX", xor 0x80.
	if(dbuf_memcmp(c->infile, 104,
		(const u8*)"\xd3\xe5\xec\xe6\xa0\xd0\xc3\xd8", 8))
	{
		return 0;
	}

	return 100;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq $-0xff01, %rax          # imm = 0xFFFF00FF
addq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $-0xfb67, %rax          # imm = 0xFFFF0499
jb 0xa9f7a
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe404f
cmpl $0xb81300cd, %eax       # imm = 0xB81300CD
jne 0xa9f7a
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rsi
decq %rsi
callq 0xe3eb4
cmpb $0xc, %al
jne 0xa9f7a
movq 0x18(%r14), %rdi
leaq 0x7f500(%rip), %rdx     # 0x129465
pushq $0x68
popq %rsi
pushq $0x8
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcx.c
// Function: simplify_dens
static void simplify_dens(i64 *pxdens, i64 *pydens, i64 factor)
{
	while(*pxdens>factor && *pydens>factor &&
		(*pxdens%factor==0) && (*pydens%factor==0))
	{
		*pxdens /= factor;
		*pydens /= factor;
	}
}

// Assembly:
movq %rdx, %rcx
movq (%rdi), %rax
cmpq %rcx, %rax
jle 0xaae94
movq (%rsi), %r9
cmpq %rcx, %r9
jle 0xaae94
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0xaae94
movq %rax, %r8
movq %r9, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0xaae94
movq %r8, (%rdi)
movq (%rsi), %rax
cqto
idivq %rcx
movq %rax, (%rsi)
jmp 0xaae5a
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pff2.c
// Function: de_module_pff2
void de_module_pff2(deark *c, struct deark_module_info *mi)
{
	mi->id = "pff2";
	mi->desc = "PFF2 font";
	mi->run_fn = de_run_pff2;
	mi->identify_fn = de_identify_pff2;
}

// Assembly:
leaq 0x7e5cf(%rip), %rax     # 0x12946e
movq %rax, (%rsi)
leaq 0x7e5ca(%rip), %rax     # 0x129473
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xaaec4
movq %rax, 0x18(%rsi)
leaq 0xe2(%rip), %rax        # 0xaafa1
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pff2.c
// Function: de_run_pff2
static void de_run_pff2(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;
	i64 i;

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

	ictx->userdata = (void*)d;
	ictx->alignment = 1;
	ictx->preprocess_chunk_fn = my_preprocess_pff2_chunk_fn;
	ictx->handle_chunk_fn = my_pff2_chunk_handler;
	ictx->f = c->infile;

	d->font = de_create_bitmap_font(c);
	d->font->has_nonunicode_codepoints = 0;
	d->font->has_unicode_codepoints = 1;
	d->font->prefer_unicode = 1;

	fmtutil_read_iff_format(ictx, 0, c->infile->len);

	if(d->font) {
		if(d->font->char_array) {
			for(i=0; i<d->font->num_chars; i++) {
				de_free(c, d->font->char_array[i].bitmap);
			}
			de_free(c, d->font->char_array);
		}
		de_destroy_bitmap_font(c, d->font);
	}

	fmtutil_destroy_iff_decoder(ictx);
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x10
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movq %r14, 0x10(%rax)
movq $0x1, 0x48(%rax)
leaq 0xca(%rip), %rax        # 0xaafc3
movq %rax, 0x28(%r15)
leaq 0x109(%rip), %rax       # 0xab00d
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq %rbx, %rdi
callq 0xe9d18
movq %rax, (%r14)
movw $0x100, 0x10(%rax)      # imm = 0x100
movb $0x1, 0x12(%rax)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xface4
movq (%r14), %rsi
testq %rsi, %rsi
je 0xaaf85
cmpq $0x0, 0x20(%rsi)
je 0xaaf7d
pushq $0x20
popq %r12
xorl %r13d, %r13d
movq 0x20(%rsi), %rax
cmpq 0x18(%rsi), %r13
jge 0xaaf6f
movq (%rax,%r12), %rsi
movq %rbx, %rdi
callq 0xded32
incq %r13
movq (%r14), %rsi
addq $0x28, %r12
jmp 0xaaf4d
movq %rbx, %rdi
movq %rax, %rsi
callq 0xded32
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xe9d28
movq %r15, %rdi
callq 0xfacd3
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pff2.c
// Function: my_preprocess_pff2_chunk_fn
static int my_preprocess_pff2_chunk_fn(struct de_iffctx *ictx)
{
	const struct pff2_sectiontype_info *si;

	si = find_pffs_sectiontype_info(ictx->chunkctx->chunk4cc.id);
	if(si) {
		ictx->chunkctx->chunk_name = si->name;
	}

	if(ictx->chunkctx->dlen==0xffffffffU) {
		// The 'DATA' chunk's length is usually set to the special value 0xffffffff.
		// We are allowed to adjust ictx->chunkctx->dlen here.
		ictx->chunkctx->dlen = ictx->f->len - ictx->chunkctx->dpos;
	}
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x128(%rdi), %r14
movl 0x4(%r14), %edi
callq 0xab106
testq %rax, %rax
je 0xaafe7
movq 0x8(%rax), %rax
movq %rax, 0x58(%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, 0x48(%r14)
jne 0xab002
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
subq 0x40(%r14), %rax
movq %rax, 0x48(%r14)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pff2.c
// Function: my_pff2_chunk_handler
static int my_pff2_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;
	const struct pff2_sectiontype_info *si;

	si = find_pffs_sectiontype_info(ictx->chunkctx->chunk4cc.id);
	if(!si) goto done;
	ictx->handled = 1;

	// Default value decoders:
	if(si->flags&0x1) {
		de_ucstring *str;
		str = ucstring_create(c);
		dbuf_read_to_ucstring_n(ictx->f,
			ictx->chunkctx->dpos, ictx->chunkctx->dlen,
			DE_DBG_MAX_STRLEN, str, 0, DE_ENCODING_ASCII);
		de_dbg(c, "value: \"%s\"", ucstring_getpsz_d(str));
		ucstring_destroy(str);
	}
	else if(si->flags&0x2) {
		i64 n;
		n = dbuf_getu16be(ictx->f, ictx->chunkctx->dpos);
		de_dbg(c, "value: %d", (int)n);
	}

	if(si->hfn) {
		si->hfn(c, d, si, ictx->chunkctx->dpos, ictx->chunkctx->dlen);
	}

done:
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
movq (%rdi), %rbx
movq 0x10(%rdi), %r14
movq 0x128(%rdi), %r13
movl 0x4(%r13), %edi
callq 0xab106
testq %rax, %rax
je 0xab0f5
movq %rax, %r12
movl $0x1, 0x130(%r15)
movl 0x4(%rax), %eax
testb $0x1, %al
jne 0xab078
testb $0x2, %al
je 0xab0d1
movq 0x18(%r15), %rdi
movq 0x40(%r13), %rsi
callq 0xe3f46
leaq 0x72a4a(%rip), %rsi     # 0x11dab4
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
jmp 0xab0d1
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r13
movq 0x18(%r15), %rdi
movq 0x128(%r15), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movl $0x1, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r13, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, %rdi
callq 0xeb877
leaq 0x5a68f(%rip), %rsi     # 0x10574b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
callq 0xeaf3c
movq 0x10(%r12), %rax
testq %rax, %rax
je 0xab0f5
movq 0x128(%r15), %rdx
movq 0x40(%rdx), %rcx
movq 0x48(%rdx), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *%rax
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: de_module_pict
void de_module_pict(deark *c, struct deark_module_info *mi)
{
	mi->id = "pict";
	mi->desc = "Macintosh PICT";
	mi->run_fn = de_run_pict;
	mi->identify_fn = de_identify_pict;
	mi->help_fn = de_help_pict;
}

// Assembly:
leaq 0x5daad(%rip), %rax     # 0x108e50
movq %rax, (%rsi)
leaq 0x7e213(%rip), %rax     # 0x1295c0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xab3d3
movq %rax, 0x18(%rsi)
leaq 0x376(%rip), %rax       # 0xab739
movq %rax, 0x20(%rsi)
leaq 0x3a8(%rip), %rax       # 0xab776
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: de_identify_pict
static int de_identify_pict(deark *c)
{
	struct detection_info dti;

	do_detect_version(c, &dti, 0);
	if(dti.file_version==2) {
		return 85;
	}
	else if(dti.file_version==1) {
		if(dti.has_fileheader) return 25;
		return 15;
	}
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xab784
movl (%rbx), %eax
cmpl $0x2, %eax
je 0xab769
cmpl $0x1, %eax
jne 0xab76e
cmpl $0x0, 0xc(%rsp)
pushq $0xf
popq %rcx
pushq $0x19
popq %rax
cmovel %ecx, %eax
jmp 0xab770
pushq $0x55
popq %rax
jmp 0xab770
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: do_detect_version
static void do_detect_version(deark *c, struct detection_info *dti, int mode)
{
	static const u8 v1pattern[2] = { 0x11, 0x01 };
	static const u8 v2pattern[6] = { 0x00, 0x11, 0x02, 0xff, 0x0c, 0x00 };
	u8 buf[6];
	int v1_nohdr = 0;
	int v2_nohdr = 0;
	int v1_hdr = 0;
	int v2_hdr = 0;

	dti->file_version = 0;
	dti->has_fileheader = 0;

	de_read(buf, 522, sizeof(buf));
	if(!de_memcmp(buf, v2pattern, 6)) {
		v2_hdr = 1;
	}
	else if(!de_memcmp(buf, v1pattern, 2)) {
		v1_hdr = 1;
	}
	else {
		de_read(buf, 10, sizeof(buf));
		if(!de_memcmp(buf, v2pattern, 6)) {
			v2_nohdr = 1;
		}
		else if(!de_memcmp(buf, v1pattern, 2)) {
			v1_nohdr = 1;
		}
	}

	if(!v1_hdr && !v2_hdr && !v1_nohdr && !v2_nohdr) {
		return;
	}

	if(v2_hdr) {
		dti->file_version = 2;
		dti->has_fileheader = 1;
		return;
	}
	else if(v2_nohdr) {
		dti->file_version = 2;
		return;
	}

	if(mode==0) {
		// For v1, check that the file ends as expected
		de_read(buf, c->infile->len-2, 2);
		if(buf[1]==0xff) {
			; // v1 files should end with 0xff
		}
		else if(buf[0]==0xff && buf[1]==0x00) {
			; // But a few have an extra NUL byte at the end
		}
	}

	if(v1_hdr) {
		dti->file_version = 1;
		dti->has_fileheader = 1;
		return;
	}
	else if(v1_nohdr) {
		dti->file_version = 1;
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, (%rsi)
movq 0x18(%rdi), %rdi
leaq 0xe(%rsp), %r15
pushq $0x6
popq %r12
movl $0x20a, %edx            # imm = 0x20A
movq %r15, %rsi
movq %r12, %rcx
callq 0xe3cb7
leaq 0x7e756(%rip), %rsi     # 0x129f18
movq %r15, %rdi
movq %r12, %rdx
callq 0x18230
testl %eax, %eax
je 0xab85a
movl %ebp, 0x14(%rsp)
xorl %r13d, %r13d
cmpw $0x111, 0xe(%rsp)       # imm = 0x111
setne %bpl
je 0xab823
movq 0x18(%r14), %rdi
leaq 0xe(%rsp), %r15
pushq $0xa
popq %rdx
pushq $0x6
popq %r12
movq %r15, %rsi
movq %r12, %rcx
callq 0xe3cb7
leaq 0x7e70d(%rip), %rsi     # 0x129f18
movq %r15, %rdi
movq %r12, %rdx
callq 0x18230
testl %eax, %eax
je 0xab869
cmpw $0x111, 0xe(%rsp)       # imm = 0x111
jne 0xab86f
movb %bpl, %r13b
cmpl $0x0, 0x14(%rsp)
jne 0xab846
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rdx
addq $-0x2, %rdx
leaq 0xe(%rsp), %rsi
pushq $0x2
popq %rcx
callq 0xe3cb7
movl $0x1, (%rbx)
testl %r13d, %r13d
jne 0xab86f
movl $0x1, 0x4(%rbx)
jmp 0xab86f
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, (%rbx)
jmp 0xab86f
movl $0x2, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: pict_read_rect
static void pict_read_rect(dbuf *f, i64 pos,
	struct pict_rect *rect, const char *dbgname)
{
	rect->t = dbuf_geti16be(f, pos);
	rect->l = dbuf_geti16be(f, pos+2);
	rect->b = dbuf_geti16be(f, pos+4);
	rect->r = dbuf_geti16be(f, pos+6);

	if(dbgname) {
		de_dbg(f->c, "%s: (%d,%d)-(%d,%d)", dbgname, (int)rect->l, (int)rect->t,
			(int)rect->r, (int)rect->b);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0xe3fee
movq %rax, (%r14)
leaq 0x2(%r12), %rsi
movq %r15, %rdi
callq 0xe3fee
movq %rax, 0x8(%r14)
leaq 0x4(%r12), %rsi
movq %r15, %rdi
callq 0xe3fee
movq %rax, 0x10(%r14)
addq $0x6, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xe3fee
movq %rax, 0x18(%r14)
testq %rbx, %rbx
je 0xab8fa
movq 0x8(%r15), %rdi
movl (%r14), %r8d
movl 0x8(%r14), %ecx
movl 0x10(%r14), %edx
movl %edx, (%rsp)
leaq 0x7ad9c(%rip), %rsi     # 0x126689
movq %rbx, %rdx
movl %eax, %r9d
xorl %eax, %eax
callq 0xde896
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq