LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_versioninfo
static void hrsrc_versioninfo(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 ver, file_ver;
	u8 b;
	de_ucstring *s = NULL;

	ver = psd_getu32zz(zz);
	de_dbg(c, "version: %d", (int)ver);

	b = psd_getbytezz(zz);
	de_dbg(c, "hasRealMergedData: %d", (int)b);

	s = ucstring_create(c);
	read_unicode_string(c, d, s, zz);
	de_dbg(c, "writer name: \"%s\"", ucstring_getpsz(s));

	ucstring_empty(s);
	read_unicode_string(c, d, s, zz);
	de_dbg(c, "reader name: \"%s\"", ucstring_getpsz(s));

	file_ver = psd_getu32zz(zz);
	de_dbg(c, "file version: %d", (int)file_ver);

	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x4(%rsi), %edx
movq (%r14), %rsi
callq 0xeeff3
addq $0x4, (%r14)
leaq 0x8d677(%rip), %rsi     # 0x1347c9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xeead3
incq (%r14)
movzbl %al, %edx
leaq 0x8cb1f(%rip), %rsi     # 0x133c96
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0xa7614
movq %r12, %rdi
callq 0xf705c
leaq 0x8cb00(%rip), %rsi     # 0x133cac
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
callq 0xf6423
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xa7614
movq %r12, %rdi
callq 0xf705c
leaq 0x8cadd(%rip), %rsi     # 0x133cbe
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
movq (%r14), %rsi
callq 0xeeff3
addq $0x4, (%r14)
leaq 0x8d966(%rip), %rsi     # 0x134b6f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_printscale
static void hrsrc_printscale(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 style;
	double xloc, yloc, scale;
	if(zz_avail(zz)!=14) return;
	style = psd_getu16zz(zz);
	de_dbg(c, "style: %d", (int)style);
	xloc = dbuf_getfloat32x(c->infile, zz->pos, d->is_le);
	zz->pos += 4;
	yloc = dbuf_getfloat32x(c->infile, zz->pos, d->is_le);
	zz->pos += 4;
	de_dbg(c, "location: (%f,%f)", xloc, yloc);
	scale = dbuf_getfloat32x(c->infile, zz->pos, d->is_le);
	zz->pos += 4;
	de_dbg(c, "scale: %f", scale);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq (%rdx), %rsi
movq 0x10(%rdx), %rax
cmpq %rax, %rsi
jge 0xa736e
movq %rdx, %r14
movq 0x8(%rdx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
subq %rcx, %rax
cmpq $0xe, %rax
jne 0xa736e
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x4(%r15), %edx
callq 0xeef43
addq $0x2, (%r14)
leaq 0x8c9e7(%rip), %rsi     # 0x133cd0
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xef2fc
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rsi
addq $0x4, %rsi
movq %rsi, (%r14)
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
callq 0xef2fc
movaps %xmm0, %xmm1
addq $0x4, (%r14)
leaq 0x8c9aa(%rip), %rsi     # 0x133cda
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0xe8617
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xef2fc
addq $0x4, (%r14)
leaq 0x8c991(%rip), %rsi     # 0x133cec
movq %rbx, %rdi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_pixelaspectratio
static void hrsrc_pixelaspectratio(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 version;
	double ratio;
	if(zz_avail(zz)!=12) return;
	version = psd_getu32zz(zz);
	de_dbg(c, "version: %d", (int)version);
	ratio = dbuf_getfloat64x(c->infile, zz->pos, d->is_le);
	zz->pos += 8;
	de_dbg(c, "x/y: %f", ratio);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq (%rdx), %rsi
movq 0x10(%rdx), %rax
cmpq %rax, %rsi
jge 0xa73f4
movq %rdx, %r14
movq 0x8(%rdx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
subq %rcx, %rax
cmpq $0xc, %rax
jne 0xa73f4
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x4(%r15), %edx
callq 0xeeff3
addq $0x4, (%r14)
leaq 0x8d40b(%rip), %rsi     # 0x1347c9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xef39e
addq $0x8, (%r14)
leaq 0x8c911(%rip), %rsi     # 0x133cf6
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_layerselectionids
static void hrsrc_layerselectionids(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 count;
	int i;

	if(zz_avail(zz)<2) return;
	count = psd_getu16zz(zz);
	de_dbg(c, "count: %d", (int)count);
	if(zz_avail(zz)<4*count) return;
	for(i=0; i<count; i++) {
		i64 lyid;
		lyid = psd_getu32zz(zz);
		de_dbg(c, "layer id[%d]: %u", (int)i, (unsigned int)lyid);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq (%rdx), %rsi
movq 0x10(%rdx), %rax
cmpq %rax, %rsi
jge 0xa74ce
movq %rdx, %rbx
movq 0x8(%rdx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0xa74ce
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movl 0x4(%r14), %edx
callq 0xeef43
movq %rax, %r12
addq $0x2, (%rbx)
leaq 0x6b77f(%rip), %rsi     # 0x112bd0
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq (%rbx), %rdx
movq 0x10(%rbx), %rcx
movq %rcx, %rax
subq %rdx, %rax
jle 0xa747e
movq 0x8(%rbx), %rsi
cmpq %rsi, %rdx
jge 0xa7480
subq %rsi, %rcx
movq %rcx, %rax
jmp 0xa7480
xorl %eax, %eax
leaq (,%r12,4), %rcx
cmpq %rcx, %rax
setl %al
testq %r12, %r12
setle %cl
orb %al, %cl
jne 0xa74ce
leaq 0x8c85f(%rip), %r13     # 0x133cfe
xorl %ebp, %ebp
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq (%rbx), %rsi
callq 0xeeff3
addq $0x4, (%rbx)
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
incq %rbp
cmpq %rbp, %r12
jne 0xa74a1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_pascalstring
static void hrsrc_pascalstring(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	read_pascal_string_to_ucstring(c, d, s, zz);
	de_dbg(c, "%s: \"%s\"", ri->idname, ucstring_getpsz(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xf6410
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0xa5fe3
movq 0x8(%rbx), %rbx
movq %r13, %rdi
callq 0xf705c
leaq 0x84c0c(%rip), %rsi     # 0x12c12a
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: hrsrc_printflagsinfo
static void hrsrc_printflagsinfo(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 version, bleed_width_value, bleed_width_scale;
	u8 crop_marks;

	if(zz_avail(zz)!=10) return;
	version = psd_getu16zz(zz);
	crop_marks = psd_getbytezz(zz);
	zz->pos++;
	bleed_width_value = psd_getu32zz(zz);
	bleed_width_scale = psd_getu16zz(zz);
	de_dbg(c, "%s: version=%d, crop marks=%d, bleed width value=%d, bleed width scale=%d",
		ri->idname, (int)version, (int)crop_marks,
		(int)bleed_width_value, (int)bleed_width_scale);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq (%rdx), %rsi
movq 0x10(%rdx), %rax
cmpq %rax, %rsi
jge 0xa7605
movq %rcx, %r14
movq %rdx, %r15
movq 0x8(%rdx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
subq %rcx, %rax
cmpq $0xa, %rax
jne 0xa7605
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x4(%r12), %edx
callq 0xeef43
movq %rax, 0x10(%rsp)
movq (%r15), %rsi
addq $0x2, %rsi
movq %rsi, (%r15)
movq 0x18(%rbx), %rdi
callq 0xeead3
movl %eax, %r13d
movq (%r15), %rsi
addq $0x2, %rsi
movq %rsi, (%r15)
movq 0x18(%rbx), %rdi
movl 0x4(%r12), %edx
callq 0xeeff3
movq %rax, %rbp
movq (%r15), %rsi
addq $0x4, %rsi
movq %rsi, (%r15)
movq 0x18(%rbx), %rdi
movl 0x4(%r12), %edx
callq 0xeef43
addq $0x2, (%r15)
movq 0x8(%r14), %rdx
movzbl %r13b, %r8d
movl %eax, (%rsp)
leaq 0x8c71c(%rip), %rsi     # 0x133d0f
movq %rbx, %rdi
movq 0x10(%rsp), %rcx
movl %ebp, %r9d
xorl %eax, %eax
callq 0xe8617
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: read_unicode_string
static void read_unicode_string(deark *c, lctx *d, de_ucstring *s, zztype *zz)
{
	i64 num_code_units;

	if(zz_avail(zz)<4) { // error
		zz->pos = zz->endpos;
		return;
	}

	num_code_units = psd_getu32zz(zz);
	if(zz->pos + num_code_units*2 > zz->endpos) { // error
		zz->pos = zz->endpos;
		return;
	}

	// Use DE_DBG_MAX_STRLEN, because we assume the string is being read for
	// the purposes of printing it in the debug info.
	dbuf_read_to_ucstring_n(c->infile, zz->pos, num_code_units*2, DE_DBG_MAX_STRLEN*2, s, 0,
		d->is_le ? DE_ENCODING_UTF16LE : DE_ENCODING_UTF16BE);
	zz->pos += num_code_units*2;

	// For no apparent reason, a fair number of these strings have been observed
	// to end with an extraneous U+0000 character.
	ucstring_strip_trailing_NUL(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq (%rcx), %rsi
movq 0x10(%rcx), %rax
cmpq %rax, %rsi
jge 0xa767b
movq %rdx, %r14
movq 0x8(%rbx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x3, %rdx
jle 0xa767b
movq %rdi, %r12
movq 0x18(%rdi), %rdi
movl 0x4(%r15), %edx
callq 0xeeff3
movq %rax, %r13
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
leaq 0x4(%rcx), %rsi
movq %rsi, (%rbx)
leaq (%rcx,%r13,2), %rcx
addq $0x4, %rcx
cmpq %rax, %rcx
jle 0xa768c
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq %r13, %r13
movq 0x18(%r12), %rdi
xorl %eax, %eax
cmpl $0x1, 0x4(%r15)
adcl $0x3, %eax
movl %eax, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r13, %rdx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xefc2a
addq %r13, (%rbx)
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6483
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: read_rectangle_tlbr
static void read_rectangle_tlbr(deark *c, lctx *d, zztype *zz, const char *name)
{
	i64 n[4];
	i64 k;
	for(k=0; k<4; k++) {
		n[k] = psd_geti32zz(zz);
	}
	de_dbg(c, "%s: (%d,%d)-(%d,%d)", name, (int)n[1], (int)n[0], (int)n[3], (int)n[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdx), %rsi
xorl %r13d, %r13d
movq 0x18(%r14), %rdi
movl 0x4(%r12), %edx
callq 0xef033
movq (%r15), %rsi
addq $0x4, %rsi
movq %rsi, (%r15)
movq %rax, 0x10(%rsp,%r13,8)
incq %r13
cmpq $0x4, %r13
jne 0xa76eb
movl 0x10(%rsp), %r8d
movl 0x18(%rsp), %ecx
movl 0x28(%rsp), %r9d
movl 0x20(%rsp), %eax
movl %eax, (%rsp)
leaq 0x8c234(%rip), %rsi     # 0x133961
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: flexible_id_free_contents
static void flexible_id_free_contents(deark *c, struct flexible_id *flid)
{
	if(flid->s) {
		ucstring_destroy(flid->s);
		flid->s = NULL;
	}
	if(flid->sz) {
		de_free(c, flid->sz);
		flid->sz = NULL;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rsi), %rdi
testq %rdi, %rdi
je 0xa7bd5
callq 0xf6753
movq $0x0, 0x40(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0xa7bee
movq %r14, %rdi
callq 0xe8be2
movq $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: do_item_type_class
static int do_item_type_class(deark *c, lctx *d, zztype *zz)
{
	de_ucstring *tmps = NULL;
	struct flexible_id flid;

	tmps = ucstring_create(c);
	read_unicode_string(c, d, tmps, zz);
	de_dbg(c, "name from classID: \"%s\"", ucstring_getpsz_d(tmps));

	read_flexible_id_zz(c, d, zz, &flid);
	dbg_print_flexible_id(c, d, &flid, "classID");
	flexible_id_free_contents(c, &flid);

	ucstring_destroy(tmps);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0xf6410
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0xa7614
movq %r14, %rdi
callq 0xf70f6
leaq 0x8af3b(%rip), %rsi     # 0x1339ff
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rsp, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0xa7a77
leaq 0x8af2b(%rip), %rdx     # 0x133a17
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa7b69
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa7bb5
movq %r14, %rdi
callq 0xf6753
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: do_text_engine_data
static void do_text_engine_data(deark *c, lctx *d, i64 pos, i64 len)
{
	if(len<1) return;
	de_dbg(c, "text engine data at %d, len=%d", (int)pos, (int)len);
	if(c->extract_level<2) return;
	dbuf_create_file_from_slice(c->infile, pos, len, "enginedata", NULL, DE_CREATEFLAG_IS_AUX);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
jle 0xa8b48
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8b0fa(%rip), %rsi     # 0x133c2c
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0xe8617
cmpl $0x2, 0x90(%r15)
jge 0xa8b4e
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
leaq 0x8b0f2(%rip), %rcx     # 0x133c4b
movq %r14, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0xefd48
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: do_boolean_block
static void do_boolean_block(deark *c, lctx *d, zztype *zz,
	const struct de_fourcc *blk4cc, const char *name)
{
	u8 value;
	i64 len;

	len = zz_avail(zz);
	if(len<1 || len>4) return;
	value = psd_getbytezz(zz);
	de_dbg(c, "%s: %d", name, (int)value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq (%rsi), %rsi
movq 0x10(%r15), %rax
cmpq %rax, %rsi
jge 0xaaa3e
movq 0x8(%r15), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
subq %rcx, %rax
addq $-0x5, %rax
cmpq $-0x4, %rax
jae 0xaaa44
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
callq 0xeead3
incq (%r15)
movzbl %al, %ecx
leaq 0x94683(%rip), %rsi     # 0x13f0e3
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: do_descriptor_block
static void do_descriptor_block(deark *c, lctx *d, zztype *zz,
	const struct de_fourcc *blk4cc, const char *name)
{
	char dscrname[100];

	if(name[0])
		de_snprintf(dscrname, sizeof(dscrname), " (for %s)", name);
	else
		de_strlcpy(dscrname, "", sizeof(dscrname));

	read_descriptor(c, d, zz, 1, dscrname);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x0, (%rcx)
je 0xaaaa1
leaq 0x89a34(%rip), %rdx     # 0x1344c4
movq %rsp, %rdi
movl $0x64, %esi
xorl %eax, %eax
callq 0xe8193
jmp 0xaaab5
leaq 0x9a608(%rip), %rsi     # 0x1450b0
movq %rsp, %rdi
movl $0x64, %edx
callq 0xe8219
movq %rsp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xa7748
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: do_pattern_sequence
static void do_pattern_sequence(deark *c, lctx *d, zztype *zz)
{
	i64 pattern_idx;
	zztype czz;

	pattern_idx = 0;
	while(1) {
		if(zz_avail(zz)<16) break;
		zz_init(&czz, zz);
		if(!do_pattern(c, d, &czz, pattern_idx)) {
			break;
		}
		zz->pos += zz_used(&czz);
		pattern_idx++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movq (%rdx), %r14
movq 0x10(%rdx), %r12
cmpq %r12, %r14
jge 0xab281
xorl %ebp, %ebp
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %r15
movq 0x8(%rdx), %rax
cmpq %rax, %r14
cmovgq %r14, %rax
movq %r12, %rcx
subq %rax, %rcx
cmpq $0x10, %rcx
jl 0xab281
movq %r12, %rax
subq %r14, %rax
cmpq $0xf, %rax
jle 0xab281
movq %r15, %rdi
leaq 0x891d1(%rip), %rsi     # 0x13438b
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rdi
movq 0x8(%rsp), %rax
movl 0x4(%rax), %edx
movq %r14, %rsi
callq 0xeeff3
movq %rax, %r13
leaq 0x4(%r14), %rbx
movq %r15, %rdi
leaq 0x8028d(%rip), %rsi     # 0x12b485
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
testq %r13, %r13
movl $0x0, %eax
cmovgq %r13, %rax
addq %r14, %rax
addq $0x4, %rax
cmpq %r12, %rax
cmovgeq %r12, %rax
movq %rbx, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
movq %rax, 0x30(%rsp)
movq %r15, %rdi
movq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xab290
movq %r13, %rdi
callq 0xe9c87
leaq (%rax,%r14), %rbx
addq $0x4, %rbx
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x10(%rsp), %rdx
cmpq %r12, %rbx
cmovlq %rbx, %r12
subq %r14, %r12
movq %r12, %r14
addq (%rdx), %r14
movq %r14, (%rdx)
incl %ebp
movq 0x10(%rdx), %r12
cmpq %r12, %r14
jl 0xab185
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/psd.c
// Function: read_prefixed_string_to_ucstring
static void read_prefixed_string_to_ucstring(deark *c, lctx *d, de_ucstring *s, zztype *zz)
{
	i64 dlen;

	if(zz_avail(zz)<4) {
		zz->pos = zz->endpos;
		return;
	}

	dlen = psd_getu32zz(zz);

	if(zz->pos + dlen > zz->endpos) { // error
		zz->pos = zz->endpos;
		return;
	}

	dbuf_read_to_ucstring(c->infile, zz->pos, dlen, s, 0, d->input_encoding);
	zz->pos += dlen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r15
movq (%rcx), %rsi
movq 0x10(%rcx), %rax
cmpq %rax, %rsi
jge 0xabb14
movq %rdx, %r14
movq 0x8(%rbx), %rcx
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x4, %rdx
jl 0xabb14
movq %rdi, %r12
movq 0x18(%rdi), %rdi
movl 0x4(%r15), %edx
callq 0xeeff3
movq %rax, %r13
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
leaq 0x4(%rcx), %rsi
movq %rsi, (%rbx)
addq %r13, %rcx
addq $0x4, %rcx
cmpq %rax, %rcx
jg 0xabb14
movq 0x18(%r12), %rdi
movl 0x8(%r15), %r9d
movq %r13, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xefbd7
addq (%rbx), %r13
movq %r13, %rax
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/palmbitmap.c
// Function: de_module_palmbitmap
void de_module_palmbitmap(deark *c, struct deark_module_info *mi)
{
	mi->id = "palmbitmap";
	mi->desc = "Palm BitmapType";
	mi->run_fn = de_run_palmbitmap;
	mi->identify_fn = de_identify_palmbitmap;
	mi->help_fn = de_help_palmbitmap;
}

// Assembly:
leaq 0x89341(%rip), %rax     # 0x134e6c
movq %rax, (%rsi)
leaq 0x89342(%rip), %rax     # 0x134e77
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xabb5b
movq %rax, 0x18(%rsi)
leaq 0x14a7(%rip), %rax      # 0xacff2
movq %rax, 0x20(%rsi)
leaq 0x1571(%rip), %rax      # 0xad0c7
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8895e(%rip), %rsi     # 0x135962
callq 0xea491
testl %eax, %eax
je 0xad03c
movq 0x18(%rbx), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0xeead3
xorl %r14d, %r14d
cmpb $-0x1, %al
sete %r14b
shll $0x4, %r14d
movq 0x18(%rbx), %rdi
leaq 0x9(%r14), %rsi
callq 0xeead3
cmpb $0x3, %al
jbe 0xad047
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0xeeb67
movq %rax, %r12
movq %r14, %rsi
orq $0x2, %rsi
movq %r15, %rdi
callq 0xeeb67
testq %r12, %r12
je 0xad03c
testq %rax, %rax
je 0xad03c
movq %r14, %rsi
orq $0x4, %rsi
movq %r15, %rdi
callq 0xeeb67
movq %rax, %r15
movq 0x18(%rbx), %rdi
orq $0x8, %r14
movq %r14, %rsi
callq 0xeead3
orb %al, %bpl
je 0xad0a8
cmpb $0x10, %al
ja 0xad03c
movzbl %al, %eax
movl $0x10116, %ecx          # imm = 0x10116
btl %eax, %ecx
jae 0xad03c
testq %r15, %r15
setne %cl
testb $0x1, %r15b
sete %dl
movl $0x5a, %eax
testb %dl, %cl
je 0xad03c
jmp 0xad03e
// File: /workspace/github_c_makefile_star2_O3/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 0x882c0(%rip), %rax     # 0x1353b3
movq %rax, (%rsi)
leaq 0x882bd(%rip), %rax     # 0x1353ba
movq %rax, 0x38(%rsi)
leaq 0x882b9(%rip), %rax     # 0x1353c1
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xad12e
movq %rax, 0x18(%rsi)
leaq 0x1605(%rip), %rax      # 0xae723
movq %rax, 0x20(%rsi)
leaq 0x1822(%rip), %rax      # 0xae94b
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xaebd7
orb %al, %cl
je 0xaebd7
movq %rsi, %r12
leaq (%r14,%rsi), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0xaeb79
xorl %r15d, %r15d
jmp 0xaebd7
movq %r8, %r13
movl %r9d, 0x4(%rsp)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
testq %rbp, %rbp
je 0xaeba9
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xea78f
jmp 0xaebbe
testq %r13, %r13
je 0xaebbe
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0xea53f
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl 0x4(%rsp), %r9d
callq 0xefd48
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea50e
// File: /workspace/github_c_makefile_star2_O3/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 0x86f69(%rip), %rax     # 0x135b98
movq %rax, (%rsi)
leaq 0x86f67(%rip), %rax     # 0x135ba0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xaec5f
movq %rax, 0x18(%rsi)
leaq 0x7a9(%rip), %rax       # 0xaf3f8
movq %rax, 0x20(%rsi)
leaq 0x848(%rip), %rax       # 0xaf4a2
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x86d5b(%rip), %rsi     # 0x136165
callq 0xea491
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq 0x4(%rsp), %r14
movl $0xc, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xee8d4
cmpb $0x34, (%r14)
jne 0xaf457
cmpb $0x12, 0x5(%rsp)
jne 0xaf457
movb 0xf(%rsp), %al
cmpb $-0x1, %al
je 0xaf48a
testb %al, %al
jne 0xaf457
cmpb $0x1, 0xe(%rsp)
jne 0xaf457
testl %ebp, %ebp
movl $0xa, %ecx
movl $0x3c, %eax
jmp 0xaf496
leaq 0x73e8e(%rip), %rsi     # 0x1232ec
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
je 0xaf486
leaq 0x4(%rsp), %rdi
callq 0xeebc4
movq %rax, %rcx
movq 0x18(%rbx), %rdx
movl $0x32, %eax
cmpq 0x18(%rdx), %rcx
je 0xaf499
xorl %eax, %eax
jmp 0xaf499
testl %ebp, %ebp
movl $0x32, %ecx
movl $0x64, %eax
cmovel %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x866db(%rip), %rax     # 0x135bb9
movq %rax, (%rsi)
leaq 0x866dc(%rip), %rax     # 0x135bc4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xaf503
movq %rax, 0x18(%rsi)
leaq 0x13e(%rip), %rax       # 0xaf63c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x866b0(%rip), %rsi     # 0x135bc4
callq 0xeb125
movl $0x4a0, %esi            # imm = 0x4A0
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r14
movl $0x3, (%rax)
movq 0x18(%rbx), %rdi
movl $0x7, %esi
callq 0xeebc8
leaq 0x7(%rax), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0xf09c5
movq %rax, 0x88(%r14)
movq 0x18(%rbx), %rdi
xorl %r15d, %r15d
movl $0x5, %edx
xorl %esi, %esi
movq %rax, %rcx
callq 0xef481
movq 0x18(%rbx), %rdi
movq 0x88(%r14), %rcx
movl $0x7, %esi
movl $0x2, %edx
callq 0xef481
movq %rsp, %rsi
movq $0x9, (%rsi)
movq 0x18(%rbx), %rdi
callq 0xeebeb
movq %rax, 0x80(%r14)
leaq 0x86afc(%rip), %rsi     # 0x1360a2
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
leaq 0x67f23(%rip), %rsi     # 0x1174dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0xb, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb04e7
movl %eax, %ebp
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testl %ebp, %ebp
je 0xaf61e
leaq 0x86b67(%rip), %rsi     # 0x136161
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xefda1
movq %rax, %r15
movq 0x88(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0xef481
movq %r15, %rdi
callq 0xf052b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaf662
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xaf6b8
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x88(%rsi), %rdi
testq %rdi, %rdi
je 0xaf682
callq 0xf052b
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xea50e
movq 0x58(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq 0x70(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x694fa(%rip), %rsi     # 0x118bc8
callq 0xe9b74
testq %rax, %rax
jne 0xaf6ec
leaq 0x60e9d(%rip), %rsi     # 0x11057c
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0xaf75d
movq %rax, %r15
leaq 0x86628(%rip), %rsi     # 0x135d1e
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf1114
testq %rax, %rax
je 0xaf763
movq %rax, %r15
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
callq 0xeebc8
cmpq $0x1234, %rax           # imm = 0x1234
jne 0xaf74a
leaq 0x60(%r14), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xaf9a5
cmpl $0x0, 0x60(%r14)
je 0xaf768
movq %r12, 0x78(%r14)
jmp 0xaf779
leaq 0x865f3(%rip), %rsi     # 0x135d44
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0xaf77f
movl $0x1, %r12d
xorl %r15d, %r15d
jmp 0xaf77f
leaq 0x865f8(%rip), %rsi     # 0x135d67
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8faa
movl $0x1, %r12d
movq %r15, %rdi
callq 0xf052b
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rcx, %r14
movq %rdx, (%rsp)
addq %rdx, %r14
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
cmpq %rax, %r14
cmovgeq %rax, %r14
cmpq %rdx, %r14
jle 0xaf996
movl %r8d, %ebx
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xeeb4b
cmpb %bl, %al
jne 0xaf950
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xeeb4b
testb %al, %al
je 0xaf961
movzbl %al, %ebp
jmp 0xaf971
movq 0x88(%r15), %rdi
movzbl %al, %esi
callq 0xf0bd6
jmp 0xaf990
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, %rbp
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0xeeb4b
movq 0x88(%r15), %rdi
movzbl %al, %esi
movq %rbp, %rdx
callq 0xf0eba
cmpq %r14, (%rsp)
jl 0xaf929
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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
movl $0xd, %esi
movq %r14, %rdi
callq 0xeebc8
movl %eax, (%rbx)
movl $0xf, %esi
movq %r14, %rdi
callq 0xeebc8
movq %rax, 0x8(%rbx)
movq %r15, %rdi
movq %rax, %rsi
callq 0xe8b2b
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movl $0x11, %edx
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xee8d4
// File: /workspace/github_c_makefile_star2_O3/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 0xafd18
movq %rsi, %rbx
movq %rdi, %r14
movq 0x78(%rsi), %rax
movl (%rax), %ebp
movl $0x2, %edx
callq 0xb0033
testl %ebp, %ebp
jne 0xafc86
movzbl 0x3a(%rbx), %eax
cmpl $0x45, %eax
je 0xafc7c
cmpl $0x43, %eax
jne 0xafc86
movl $0xffaaaaaa, 0xa0(%rbx) # imm = 0xFFAAAAAA
movq 0x20(%rbx), %rdi
movl $0x8, %esi
callq 0xe9cb4
movq %rax, 0x30(%rbx)
leaq 0x7(%rax), %r15
testq %rax, %rax
cmovnsq %rax, %r15
sarq $0x3, %r15
leaq 0x9c(%rbx), %r12
movl $0x2, %esi
movq %r12, %rdi
callq 0xf1ed8
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 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
movl $0x0, (%rsp)
movl $0x1, %edx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
callq 0xf2f79
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x6, %edx
callq 0xf22d0
jmp 0xafd1b
xorl %r14d, %r14d
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/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 0xafdc8
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %edx
callq 0xb0033
movq 0x20(%rbx), %rdi
callq 0xe9c87
leaq 0x3(%rax), %r15
testq %rax, %rax
cmovnsq %rax, %r15
movq %rax, 0x30(%rbx)
sarq $0x2, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rdx
movl $0x3, %r8d
callq 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r8
movl $0x0, (%rsp)
movl $0x2, %edx
xorl %esi, %esi
movq %r15, %rcx
movq %rax, %r9
callq 0xf2f79
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0xf22d0
jmp 0xafdcb
xorl %r14d, %r14d
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, %edx
callq 0xb0033
movq 0x20(%rbx), %rdi
callq 0xe9c7e
movq %rax, 0x30(%rbx)
movq %rax, %r15
shrq $0x3f, %r15
addq %rax, %r15
sarq %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rdx
movl $0x3, %r8d
callq 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r8
movl $0x0, (%rsp)
movl $0x4, %edx
xorl %esi, %esi
movq %r15, %rcx
movq %rax, %r9
callq 0xf2f79
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0xf22d0
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/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 0xb0033
movq 0x30(%rbx), %rdx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movl $0x3, %r8d
callq 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
movq 0x8(%rax), %rcx
leaq 0x9c(%rbx), %r8
movl $0x0, (%rsp)
movl $0x8, %edx
xorl %esi, %esi
movq %rax, %r9
callq 0xf2f79
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0xf22d0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x4, %edx
callq 0xb0033
movq 0x20(%rbx), %rdi
movl $0x8, %esi
callq 0xe9cb4
movq %rax, 0x30(%rbx)
leaq 0x7(%rax), %r15
testq %rax, %rax
cmovnsq %rax, %r15
sarq $0x3, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %rcx, %r12
imulq %r15, %r12
movq %r14, %rdi
movq %rax, %rdx
movl $0x3, %r8d
callq 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r9
movl $0x2, %edx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
pushq $0x2
pushq %rax
callq 0xf30b3
addq $0x10, %rsp
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf22d0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, %edx
callq 0xb0033
movq 0x20(%rbx), %rdi
movl $0x8, %esi
callq 0xe9cb4
movq %rax, 0x30(%rbx)
leaq 0x7(%rax), %r15
testq %rax, %rax
cmovnsq %rax, %r15
sarq $0x3, %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
movq %rcx, %r12
imulq %r15, %r12
movq %r14, %rdi
movq %rax, %rdx
movl $0x3, %r8d
callq 0xf26a5
movq %rax, %r14
movq 0x88(%rbx), %rdi
leaq 0x9c(%rbx), %r9
movl $0x4, %edx
xorl %esi, %esi
movq %r15, %rcx
movq %r12, %r8
pushq $0x2
pushq %rax
callq 0xf30b3
addq $0x10, %rsp
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0xf22d0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/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 %rsi, 0x8(%rsp)
cmpq $0x0, 0x80(%rsi)
jle 0xb0606
movq %rdx, %r13
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
leaq 0x85b9a(%rip), %rsi     # 0x1360b5
movl %r12d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0xe889f
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rdi
movq %r13, %rsi
callq 0xeebc8
movq %rax, %rbp
cmpq $0x6, %rax
movl $0x5, %eax
cmovlq %rax, %rbp
movq %rbp, %rax
addq %r13, %rax
movq 0x18(%r15), %rdi
cmpq 0x18(%rdi), %rax
jg 0xb060d
leaq 0x2(%r13), %rsi
movq %rax, 0x10(%rsp)
callq 0xeebc8
movq %rax, %r14
movq 0x18(%r15), %rdi
leaq 0x4(%r13), %rsi
callq 0xeead3
movl %eax, %ebx
addq $0x5, %r13
movq %r15, %rdi
leaq 0x85b35(%rip), %rsi     # 0x1360c8
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe889f
movq %r15, %rdi
leaq 0x85b1f(%rip), %rsi     # 0x1360c6
movq %r14, %rdx
xorl %eax, %eax
callq 0xe889f
movzbl %bl, %ebx
movq %r15, %rdi
leaq 0x85739(%rip), %rsi     # 0x135cf7
movl %ebx, %edx
xorl %eax, %eax
callq 0xe889f
addq $-0x5, %rbp
movq %r15, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movl %ebx, %r8d
callq 0xaf8f4
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %r12
movq 0x10(%rsp), %r13
cmpq 0x80(%r14), %r12
jl 0xb0511
movl $0x1, %eax
jmp 0xb060f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0x85bfd(%rip), %rax     # 0x136224
movq %rax, (%rsi)
leaq 0x85bf7(%rip), %rax     # 0x136228
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xb0657
movq %rax, 0x18(%rsi)
leaq 0x41(%rip), %rax        # 0xb0688
movq %rax, 0x20(%rsi)
leaq 0xec(%rip), %rax        # 0xb073e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x8, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xee8d4
movb (%r15), %cl
movzbl 0x1(%r15), %eax
cmpb $0xa, %cl
jne 0xb06eb
leal -0x2(%rax), %edx
cmpl $0x4, %edx
jb 0xb06c7
testl %eax, %eax
jne 0xb06eb
cmpb $0x1, 0xa(%rsp)
ja 0xb06eb
leaq 0x85b4f(%rip), %rsi     # 0x136224
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
movl $0x10, %eax
movl $0x64, %ebx
jmp 0xb072f
cmpb $-0x15, %cl
jne 0xb0732
cmpb $0xe, %al
jne 0xb0732
cmpb $0x1, 0xa(%rsp)
jne 0xb0732
cmpb $0x8, 0xb(%rsp)
jne 0xb0732
movq 0x18(%r14), %rdi
movl $0x10, %esi
callq 0xeead3
cmpb $-0x18, %al
jne 0xb0732
leaq 0x85b09(%rip), %rsi     # 0x136224
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
movl $0x8, %eax
movl $0x50, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x85ab8(%rip), %rax     # 0x136232
movq %rax, (%rsi)
leaq 0x85ab8(%rip), %rax     # 0x13623c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb079f
movq %rax, 0x18(%rsi)
leaq 0x3d(%rip), %rax        # 0xb07d7
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r14
movb $0x1, 0x90(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb0b2e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2