LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_psd
void de_module_psd(deark *c, struct deark_module_info *mi)
{
	mi->id = "psd";
	mi->desc = "Photoshop PSD";
	mi->run_fn = de_run_psd;
	mi->identify_fn = de_identify_psd;
}

// Assembly:
leaq 0x87dc9(%rip), %rax     # 0x125b40
movq %rax, (%rsi)
leaq 0x87dc3(%rip), %rax     # 0x125b44
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9dd9c
movq %rax, 0x18(%rsi)
leaq 0x930(%rip), %rax       # 0x9e6c7
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_identify_psd
static int de_identify_psd(deark *c)
{
	u8 buf[4];

	de_read(buf, 0, 4);
	if(!de_memcmp(buf, "8BPS", 4)) return 100;
	if(!de_memcmp(buf, "8BIM", 4)) {
		// We sometimes write .8bim files, so we want to identify them.
		// This is not necessarily a standard file format.
		if(de_input_file_has_ext(c, "8bim")) return 100;
		return 75;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
leaq 0xc(%rsp), %r15
pushq $0x4
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpl $0x53504238, (%r15)     # imm = 0x53504238
je 0x9e71a
cmpl $0x4d494238, 0xc(%rsp)  # imm = 0x4D494238
jne 0x9e71d
leaq 0x8755c(%rip), %rsi     # 0x125c61
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
pushq $0x4b
popq %rax
pushq $0x64
popq %rbx
cmovel %eax, %ebx
jmp 0x9e71d
pushq $0x64
popq %rbx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_action
void de_module_ps_action(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_action";
	mi->desc = "Photoshop Action";
	mi->run_fn = de_run_ps_action;
	mi->identify_fn = de_identify_ps_action;
}

// Assembly:
leaq 0x87422(%rip), %rax     # 0x125b52
movq %rax, (%rsi)
leaq 0x87422(%rip), %rax     # 0x125b5c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9e755
movq %rax, 0x18(%rsi)
leaq 0x588(%rip), %rax       # 0x9ecd8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_action
static int de_identify_ps_action(deark *c)
{
	int ver=0;

	if(!dbuf_memcmp(c->infile, 0, "\x00\x00\x00\x10\x00\x00", 6)) {
		ver = 16;
	}
	else if(!dbuf_memcmp(c->infile, 0, "\x00\x00\x00\x0c", 4)) {
		ver = 12;
	}
	if(ver==0) return 0;
	if(!de_input_file_has_ext(c, "atn")) return 0;
	if(ver==16) return 100;
	return 5; // A version we don't support
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x86e11(%rip), %rdx     # 0x125afb
xorl %ebx, %ebx
pushq $0x6
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
je 0x9ed17
movq 0x18(%r14), %rdi
leaq 0x86dfd(%rip), %rdx     # 0x125b02
pushq $0x4
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x9ed2e
pushq $0x5
jmp 0x9ed19
pushq $0x64
popq %rbx
leaq 0x88b1c(%rip), %rsi     # 0x12783d
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_gradient
void de_module_ps_gradient(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_gradient";
	mi->desc = "Photoshop Gradient";
	mi->run_fn = de_run_ps_gradient;
	mi->identify_fn = de_identify_ps_gradient;
}

// Assembly:
leaq 0x86e2e(%rip), %rax     # 0x125b6d
movq %rax, (%rsi)
leaq 0x86e30(%rip), %rax     # 0x125b79
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9ed64
movq %rax, 0x18(%rsi)
leaq 0xd9(%rip), %rax        # 0x9ee38
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_run_ps_gradient
static void de_run_ps_gradient(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	zztype *zz = NULL;
	i64 grd_ver;

	de_declare_fmt(c, "Photoshop Gradient");

	d = de_malloc(c, sizeof(lctx));
	d->version = 1;
	init_version_specific_info(c, d);

	zz = de_malloc(c, sizeof(zztype));
	zz_init_absolute(zz, 0, c->infile->len);

	zz->pos += 4; // 8BGR signature
	grd_ver = psd_getu16zz(zz);
	de_dbg(c, "file version: %d", (int)grd_ver);

	if(grd_ver==5) {
		read_descriptor(c, d, zz, 1, "");
	}
	else {
		de_err(c, "Unsupported Photoshop Gradient file version: %d", (int)grd_ver);
	}

	de_free(c, zz);
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x86e03(%rip), %rsi     # 0x125b79
callq 0xe07f7
pushq $0x58
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
movl $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9f9fe
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rax
andq $0x0, 0x8(%r15)
movq %rax, 0x10(%r15)
movq $0x4, (%r15)
movl 0x4(%r14), %edx
movq %r15, %rsi
callq 0x9feb0
movq %rax, %r12
leaq 0x88ac1(%rip), %rsi     # 0x127897
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x5, %r12
jne 0x9ee03
leaq 0x98e70(%rip), %r8      # 0x137c60
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa147d
jmp 0x9ee17
leaq 0x88a37(%rip), %rsi     # 0x127841
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_styles
void de_module_ps_styles(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_styles";
	mi->desc = "Photoshop Styles";
	mi->run_fn = de_run_ps_styles;
	mi->identify_fn = de_identify_ps_styles;
}

// Assembly:
leaq 0x86d03(%rip), %rax     # 0x125b8c
movq %rax, (%rsi)
leaq 0x86d03(%rip), %rax     # 0x125b96
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9eeae
movq %rax, 0x18(%rsi)
leaq 0x30e(%rip), %rax       # 0x9f1b7
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_brush
void de_module_ps_brush(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_brush";
	mi->desc = "Photoshop Brush";
	mi->run_fn = de_run_ps_brush;
	mi->identify_fn = de_identify_ps_brush;
}

// Assembly:
leaq 0x869ab(%rip), %rax     # 0x125ba7
movq %rax, (%rsi)
leaq 0x869aa(%rip), %rax     # 0x125bb0
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9f221
movq %rax, 0x18(%rsi)
leaq 0x231(%rip), %rax       # 0x9f44d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_csh
void de_module_ps_csh(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_csh";
	mi->desc = "Photoshop Custom Shape";
	mi->run_fn = de_run_ps_csh;
	mi->identify_fn = de_identify_ps_csh;
}

// Assembly:
leaq 0x86727(%rip), %rax     # 0x125bc0
movq %rax, (%rsi)
leaq 0x86724(%rip), %rax     # 0x125bc7
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9f4be
movq %rax, 0x18(%rsi)
leaq 0x2fd(%rip), %rax       # 0x9f7b6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_module_ps_pattern
void de_module_ps_pattern(deark *c, struct deark_module_info *mi)
{
	mi->id = "ps_pattern";
	mi->desc = "Photoshop Pattern";
	mi->run_fn = de_run_ps_pattern;
	mi->identify_fn = de_identify_ps_pattern;
}

// Assembly:
leaq 0x863d7(%rip), %rax     # 0x125bde
movq %rax, (%rsi)
leaq 0x863d8(%rip), %rax     # 0x125be9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x9f82c
movq %rax, 0x18(%rsi)
leaq 0x18d(%rip), %rax       # 0x9f9b4
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: de_run_ps_pattern
static void de_run_ps_pattern(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	zztype *zz = NULL;
	i64 pat_ver;
	i64 num_patterns;
	i64 i;
	zztype czz;

	d = de_malloc(c, sizeof(lctx));
	d->version = 1;
	init_version_specific_info(c, d);

	zz = de_malloc(c, sizeof(zztype));
	zz_init_absolute(zz, 0, c->infile->len);

	zz->pos += 4; // Skip over '8BPT' signature

	pat_ver = psd_getu16zz(zz);
	de_dbg(c, "file version: %d", (int)pat_ver);

	if(pat_ver!=1) {
		de_warn(c, "PAT v%d format might not be supported correctly", (int)pat_ver);
	}

	num_patterns = psd_getu32zz(zz);
	de_dbg(c, "number of patterns: %d", (int)num_patterns);

	for(i=0; i<num_patterns; i++) {
		if(zz_avail(zz)<4) break;
		de_dbg(c, "pattern[%d] at %d", (int)i, (int)zz->pos);
		zz_init(&czz, zz);
		de_dbg_indent(c, 1);
		if(!do_pattern_internal(c, d, &czz)) break;
		de_dbg_indent(c, -1);
		zz->pos += zz_used(&czz);
	}

	de_free(c, zz);
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x58
popq %rsi
callq 0xdecaf
movq %rax, %r14
movl $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9f9fe
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rax
andq $0x0, 0x8(%r15)
movq %rax, 0x10(%r15)
movq $0x4, (%r15)
movl 0x4(%r14), %edx
movq %r15, %rsi
callq 0x9feb0
movq %rax, %r12
leaq 0x88002(%rip), %rsi     # 0x127897
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x1, %r12
je 0x9f8bc
leaq 0x8823a(%rip), %rsi     # 0x127ae9
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xdf05a
movq 0x18(%rbx), %rdi
movl 0x4(%r14), %edx
movq %r15, %rsi
callq 0x9fe70
movq %rax, %r12
leaq 0x88243(%rip), %rsi     # 0x127b19
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
testq %r12, %r12
cmovleq %r13, %r12
movq %rsp, %r13
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x9f990
movq %r15, %rdi
callq 0x9ff2f
cmpq $0x4, %rax
jl 0x9f990
movl (%r15), %ecx
movq %rbx, %rdi
leaq 0x87799(%rip), %rsi     # 0x1270b3
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq (%r15), %rax
movq 0x10(%r15), %rcx
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq %rcx, 0x10(%rsp)
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xa4b61
testl %eax, %eax
je 0x9f990
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
movq %rsi, %rax
subq %rcx, %rax
jle 0x9f983
movq (%rsp), %rdx
cmpq %rsi, %rdx
jg 0x9f985
subq %rcx, %rdx
movq %rdx, %rax
jmp 0x9f985
xorl %eax, %eax
addq %rax, (%r15)
incq %rbp
jmp 0x9f8f2
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: do_external_tagged_blocks
static void do_external_tagged_blocks(deark *c, lctx *d, zztype *zz)
{
	u32 code;

	d->tagged_blocks_only = 1;
	if(zz_avail(zz)<4) return;

	// Evidently, it is possible for this to use little-endian byte order. Weird.

	// Peek at the first 4 bytes
	code = (u32)de_getu32le(0);
	if(code==CODE_8BIM || code==CODE_8B64) {
		d->is_le = 1;
	}

	do_tagged_blocks(c, d, zz, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, 0xc(%rsi)
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x4, %rax
jge 0x9fe3a
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
xorl %esi, %esi
callq 0xe409f
cmpl $0x3842494d, %eax       # imm = 0x3842494D
je 0x9fe53
cmpl $0x38423634, %eax       # imm = 0x38423634
jne 0x9fe5b
movl $0x1, 0x4(%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xa2803
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: read_pascal_string_to_ucstring
static void read_pascal_string_to_ucstring(deark *c, lctx *d, de_ucstring *s, zztype *zz)
{
	i64 dlen;

	if(zz_avail(zz)<1) return;

	// First byte is the string length
	dlen = (i64)psd_getbytezz(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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdi
callq 0x9ff2f
testq %rax, %rax
jle 0x9ff25
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0x9ff51
movzbl %al, %r13d
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
leaq (%rsi,%r13), %rcx
cmpq %rax, %rcx
jg 0x9ff22
movq 0x18(%r12), %rdi
movl 0x8(%r15), %r9d
movq %r13, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
addq (%rbx), %r13
movq %r13, %rax
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_resolutioninfo
static void hrsrc_resolutioninfo(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 xres_int, yres_int;
	double xres, yres;
	i64 xres_unit, yres_unit;

	if(zz_avail(zz)!=16) return;
	xres_int = psd_getu32(zz->pos);
	xres = ((double)xres_int)/65536.0;
	de_dbg(c, "xres=%.2f dpi", xres);
	xres_unit = psd_getu16(zz->pos+4);
	de_dbg(c, "xres display unit: %d (%s)", (int)xres_unit, units_name(xres_unit));
	//width_unit = psd_getu16(pos+6);

	yres_int = psd_getu32(zz->pos+8);
	yres = ((double)yres_int)/65536.0;
	de_dbg(c, "yres=%.2f dpi", yres);
	yres_unit = psd_getu16(zz->pos+12);
	de_dbg(c, "yres display unit: %d (%s)", (int)yres_unit, units_name(yres_unit));
	//height_unit = psd_getu16(pos+14);

	d->density.code = DE_DENSITY_DPI;
	d->density.xdens = xres;
	d->density.ydens = yres;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x10, %rax
jne 0xa04a6
movq 0x18(%r14), %rdi
movq (%r15), %rsi
movl 0x4(%rbx), %edx
callq 0xe41cb
cvtsi2sd %rax, %xmm0
mulsd 0x791d4(%rip), %xmm0    # 0x119588
movsd %xmm0, 0x10(%rsp)
leaq 0x86087(%rip), %rsi     # 0x126448
movq %r14, %rdi
movb $0x1, %al
callq 0xde896
movq 0x18(%r14), %rdi
movq (%r15), %rsi
addq $0x4, %rsi
movl 0x4(%rbx), %edx
callq 0xe41b1
cmpq $0x2, %rax
leaq 0x860bd(%rip), %r13     # 0x1264a6
leaq 0x7eaf1(%rip), %r12     # 0x11eee1
movq %r12, %rcx
cmoveq %r13, %rcx
cmpq $0x1, %rax
leaq 0x86098(%rip), %rbp     # 0x12649a
cmoveq %rbp, %rcx
leaq 0x86049(%rip), %rsi     # 0x126456
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq (%r15), %rsi
addq $0x8, %rsi
movl 0x4(%rbx), %edx
callq 0xe41cb
cvtsi2sd %rax, %xmm0
mulsd 0x7914f(%rip), %xmm0    # 0x119588
movsd %xmm0, 0x8(%rsp)
leaq 0x8602b(%rip), %rsi     # 0x126471
movq %r14, %rdi
movb $0x1, %al
callq 0xde896
movq 0x18(%r14), %rdi
movq (%r15), %rsi
addq $0xc, %rsi
movl 0x4(%rbx), %edx
callq 0xe41b1
cmpq $0x2, %rax
cmoveq %r13, %r12
cmpq $0x1, %rax
cmoveq %rbp, %r12
leaq 0x86005(%rip), %rsi     # 0x12647f
movq %r14, %rdi
movl %eax, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
movl $0x2, 0x38(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x40(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x48(%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/psd.c
// Function: hrsrc_namesofalphachannels
static void hrsrc_namesofalphachannels(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;
	int idx = 0;

	// This is a "series of Pascal strings", whatever that is.

	s = ucstring_create(c);
	while(zz->pos < (zz->endpos-1)) {
		ucstring_empty(s);
		read_pascal_string_to_ucstring(c, d, s, zz);
		de_dbg(c, "%s[%d]: \"%s\"", ri->idname, idx, ucstring_getpsz_d(s));
		idx++;
	}
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xeac74
movq %rax, %r13
xorl %ebp, %ebp
movq 0x10(%r14), %rax
decq %rax
cmpq %rax, (%r14)
jge 0xa0529
movq %r13, %rdi
callq 0xeac85
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x9fec2
movq (%rsp), %rax
movq 0x8(%rax), %rbx
movq %r13, %rdi
callq 0xeb877
movq %r12, %rdi
leaq 0x85f9a(%rip), %rsi     # 0x1264b0
movq %rbx, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xde896
incl %ebp
jmp 0xa04d7
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_printflags
static void hrsrc_printflags(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	u8 fl[9];
	if(zz_avail(zz)!=9) return;
	de_read(fl, zz->pos, 9);
	de_dbg(c, "%s: labels=%d, crop marks=%d, color bars=%d, registration marks=%d, "
		"negative=%d, flip=%d, interpolate=%d, caption=%d, print flags=%d",
		ri->idname, (int)fl[0], (int)fl[1], (int)fl[2], (int)fl[3],
		(int)fl[4], (int)fl[5], (int)fl[6], (int)fl[7], (int)fl[8]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x9, %rax
jne 0xa05cb
movq 0x18(%rbx), %rdi
movq (%r15), %rdx
leaq 0x7(%rsp), %r15
pushq $0x9
popq %rcx
movq %r15, %rsi
callq 0xe3cb7
movq 0x8(%r14), %rdx
movzbl (%r15), %ecx
movzbl 0x1(%r15), %r8d
movzbl 0x2(%r15), %r9d
movzbl 0x3(%r15), %r10d
movzbl 0x4(%r15), %r11d
movzbl 0x5(%r15), %r14d
movzbl 0x6(%r15), %r12d
movzbl 0x7(%r15), %r13d
movzbl 0x8(%r15), %r15d
leaq 0x85f0c(%rip), %rsi     # 0x1264bd
movq %rbx, %rdi
xorl %eax, %eax
pushq %r15
pushq %r13
pushq %r12
pushq %r14
pushq %r11
pushq %r10
callq 0xde896
addq $0x30, %rsp
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/psd.c
// Function: hrsrc_thumbnail
static void hrsrc_thumbnail(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 fmt;
	const char *ext;
	dbuf *outf = NULL;
	i64 dpos;
	i64 dlen;

	if(zz_avail(zz)<=28) goto done;

	fmt = psd_getu32(zz->pos);
	if(fmt != 1) {
		// fmt != kJpegRGB
		de_dbg(c, "thumbnail in unsupported format (%d) found", (int)fmt);
		goto done;
	}

	zz->pos += 28;
	dpos = zz->pos;
	dlen = zz_avail(zz);

	if(ri->id==0x0409) {
		ext = "psdthumb_rbswap.jpg";
		if(c->extract_policy!=DE_EXTRACTPOLICY_MAINONLY) {
			de_info(c, "Note: This Photoshop thumbnail uses nonstandard colors, "
				"and may not look right.");
		}
	}
	else {
		ext = "psdthumb.jpg";
	}

	outf = dbuf_create_output_file(c, ext, NULL, DE_CREATEFLAG_IS_AUX);

	if(ri->id==0x0409 && d->jpeg_rbswap_mode && dlen>=11 &&
		!dbuf_memcmp(c->infile, dpos, "\xff\xd8\xff\xe0\x00\x10" "JFIF" "\x00", 11))
	{
		// If we were to extract this image as-is, there will be no way to tell
		// later that the red/blue channels are swapped. So, we have this feature
		// to mark it by inserting a custom segment (after the JFIF segment).
		dbuf_copy(c->infile, dpos, 20, outf);
		dbuf_write(outf, (const u8*)"\xff\xe1\x00\x10" "Deark_RB_swap\0", 18);
		dbuf_copy(c->infile, dpos+20, dlen-20, outf);
	}
	else {
		dbuf_copy(c->infile, dpos, dlen, outf);
	}

done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x1d, %rax
jge 0xa069b
xorl %r12d, %r12d
jmp 0xa076f
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%rbp), %edx
callq 0xe41cb
cmpq $0x1, %rax
jne 0xa06f4
movq (%r14), %rax
movq %rax, (%rsp)
leaq 0x1c(%rax), %r13
movq %r13, (%r14)
movq %r14, %rdi
callq 0x9ff2f
movq %rax, %r14
cmpw $0x409, (%r15)          # imm = 0x409
jne 0xa070c
leaq 0x85e95(%rip), %r12     # 0x12656d
cmpl $0x1, 0x8c(%rbx)
je 0xa0713
leaq 0x85e99(%rip), %rsi     # 0x126581
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf37f
jmp 0xa0713
leaq 0x85e47(%rip), %rsi     # 0x126542
xorl %r12d, %r12d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
jmp 0xa076f
leaq 0x85ebe(%rip), %r12     # 0x1265d1
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xe4e62
movq %rax, %r12
cmpw $0x409, (%r15)          # imm = 0x409
jne 0xa075d
cmpb $0x0, 0x14(%rbp)
setne %al
cmpq $0xb, %r14
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xa075d
movq 0x18(%rbx), %rdi
leaq 0x8538e(%rip), %rdx     # 0x125adc
pushq $0xb
popq %rcx
movq %r13, %rsi
callq 0xe4d48
testl %eax, %eax
je 0xa0785
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xe45f4
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe5591
movq 0x18(%rbx), %rdi
pushq $0x14
popq %rdx
movq %r13, %rsi
movq %r12, %rcx
callq 0xe45f4
leaq 0x8534a(%rip), %rsi     # 0x125ae8
pushq $0x12
popq %rdx
movq %r12, %rdi
callq 0xe46ba
movq 0x18(%rbx), %rdi
movq (%rsp), %rsi
addq $0x30, %rsi
addq $-0x14, %r14
jmp 0xa0764
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_plaintext
static void hrsrc_plaintext(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, zz->pos, zz_avail(zz), DE_DBG_MAX_STRLEN,
		s, 0, d->input_encoding);
	de_dbg(c, "%s: \"%s\"", ri->idname, ucstring_getpsz(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
callq 0xeac74
movq %rax, %rbx
movq 0x18(%r14), %rbp
movq (%r12), %r15
movq %r12, %rdi
callq 0x9ff2f
movl 0x8(%r13), %ecx
movl %ecx, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %rbp, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r15
movq %rbx, %rdi
callq 0xeb7e4
leaq 0x7e648(%rip), %rsi     # 0x11eeba
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_unicodestring_multi
static void hrsrc_unicodestring_multi(deark *c, lctx *d, zztype *zz,
	const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;
	int idx = 0;

	s = ucstring_create(c);
	while(zz_avail(zz)>=4) {
		ucstring_empty(s);
		read_unicode_string(c, d, s, zz);
		de_dbg(c, "%s[%d]: \"%s\"", ri->idname, idx, ucstring_getpsz_d(s));
		idx++;
	}
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xeac74
movq %rax, %r13
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x9ff2f
cmpq $0x4, %rax
jl 0xa09a5
movq %r13, %rdi
callq 0xeac85
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xa1369
movq (%rsp), %rax
movq 0x8(%rax), %rbx
movq %r13, %rdi
callq 0xeb877
movq %r12, %rdi
leaq 0x85b1e(%rip), %rsi     # 0x1264b0
movq %rbx, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xde896
incl %ebp
jmp 0xa0951
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_unicodestring
static void hrsrc_unicodestring(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	read_unicode_string(c, d, s, zz);
	de_dbg(c, "%s: \"%s\"", ri->idname, ucstring_getpsz_d(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 0xeac74
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0xa1369
movq 0x8(%rbx), %rbx
movq %r13, %rdi
callq 0xeb877
leaq 0x7e08c(%rip), %rsi     # 0x11eeba
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_urllist
static void hrsrc_urllist(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	de_ucstring *s = NULL;
	i64 count;
	i64 i;

	count = psd_getu32zz(zz);
	de_dbg(c, "URL count: %d", (int)count);

	s = ucstring_create(c);

	for(i=0; i<count; i++) {
		struct de_fourcc url4cc;
		i64 id;

		// undocumented field, seems to be a fourcc
		psd_read_fourcc_zz(c, d, zz, &url4cc);

		id = psd_getu32zz(zz);

		read_unicode_string(c, d, s, zz);
		de_dbg(c, "URL[%d]: '%s', id=%d, value=\"%s\"", (int)i,
			url4cc.id_dbgstr, (int)id, ucstring_getpsz(s));
		ucstring_empty(s);
	}

	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movl 0x4(%rsi), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %rbp
leaq 0x85b10(%rip), %rsi     # 0x12698f
xorl %r12d, %r12d
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
callq 0xeac74
movq %rax, %r13
testq %rbp, %rbp
cmovleq %r12, %rbp
movq %rbp, (%rsp)
xorl %ebp, %ebp
cmpq %rbp, (%rsp)
je 0xa0f16
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
leaq 0x8(%rsp), %rcx
callq 0x9fe82
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xa1369
movq %r13, %rdi
callq 0xeb7e4
movq %r15, %rdi
leaq 0x85aa8(%rip), %rsi     # 0x12699d
movl %ebp, %edx
leaq 0x18(%rsp), %rcx
movl %r12d, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
callq 0xeac85
incq %rbp
jmp 0xa0ea6
movq %r13, %rdi
callq 0xeaf3c
addq $0x38, %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/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 0x9fe70
leaq 0x8659d(%rip), %rsi     # 0x1274f1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x9ff51
movzbl %al, %edx
leaq 0x85a48(%rip), %rsi     # 0x1269be
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeb7e4
leaq 0x85a29(%rip), %rsi     # 0x1269d4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
callq 0xeac85
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeb7e4
leaq 0x85a06(%rip), %rsi     # 0x1269e6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
movq %r14, %rsi
callq 0x9fe70
leaq 0x86893(%rip), %rsi     # 0x127897
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0xe, %rax
jne 0xa1140
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
movq %r14, %rsi
callq 0x9feb0
leaq 0x8593d(%rip), %rsi     # 0x1269f8
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xe4470
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rsi
addq $0x4, %rsi
movq %rsi, (%r14)
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
callq 0xe4470
movaps %xmm0, %xmm1
addq $0x4, (%r14)
leaq 0x85900(%rip), %rsi     # 0x126a02
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xe4470
addq $0x4, (%r14)
leaq 0x858e7(%rip), %rsi     # 0x126a14
movq %rbx, %rdi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xde896
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0xc, %rax
jne 0xa11b3
movq 0x18(%rbx), %rdi
movl 0x4(%r15), %edx
movq %r14, %rsi
callq 0x9fe70
leaq 0x86374(%rip), %rsi     # 0x1274f1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
movl 0x4(%r15), %edx
callq 0xe451a
addq $0x8, (%r14)
leaq 0x8587a(%rip), %rsi     # 0x126a1e
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
jmp 0xde896
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x2, %rax
jl 0xa1217
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9feb0
movq %rax, %r12
leaq 0x649bb(%rip), %rsi     # 0x105bb0
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0x9ff2f
leaq (,%r12,4), %rcx
cmpq %rcx, %rax
jge 0xa1226
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testq %r12, %r12
cmovleq %rax, %r12
leaq 0x857f0(%rip), %r13     # 0x126a26
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0xa1217
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
incq %rbp
jmp 0xa1238
// File: /workspace/github_c_makefile_star2_O2/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 0xeac74
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x9fec2
movq 0x8(%rbx), %rbx
movq %r13, %rdi
callq 0xeb7e4
leaq 0x7dc16(%rip), %rsi     # 0x11eeba
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/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 %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0xa, %rax
jne 0xa135a
movq 0x18(%rbx), %rdi
movl 0x4(%r13), %edx
movq %r15, %rsi
callq 0x9feb0
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x9ff51
incq (%r15)
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl 0x4(%r13), %edx
movq %r15, %rsi
callq 0x9fe70
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl 0x4(%r13), %edx
movq %r15, %rsi
callq 0x9feb0
movq 0x8(%r14), %rdx
movzbl %bpl, %r8d
movl %eax, (%rsp)
leaq 0x856ef(%rip), %rsi     # 0x126a37
movq %rbx, %rdi
movq 0x10(%rsp), %rcx
movl %r12d, %r9d
xorl %eax, %eax
callq 0xde896
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/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq %rcx, %rdi
callq 0x9ff2f
cmpq $0x3, %rax
jg 0xa1396
movq 0x10(%rbx), %rax
jmp 0xa13b9
movq 0x18(%r13), %rdi
movl 0x4(%r15), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %r12
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
leaq (%rsi,%r12,2), %rcx
cmpq %rax, %rcx
jle 0xa13ca
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq %r12, %r12
movq 0x18(%r13), %rdi
xorl %eax, %eax
cmpl $0x1, 0x4(%r15)
adcl $0x3, %eax
movl %eax, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r12, %rdx
movq %r14, %r8
xorl %r9d, %r9d
callq 0xe4ced
addq %r12, (%rbx)
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeace6
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0xa1446
movq 0x18(%r14), %rdi
movl 0x4(%r12), %edx
movq %r15, %rsi
callq 0xa17af
movq %rax, 0x10(%rsp,%r13,8)
incq %r13
jmp 0xa1425
movl 0x10(%rsp), %r8d
movl 0x18(%rsp), %ecx
movl 0x28(%rsp), %r9d
movl 0x20(%rsp), %eax
movl %eax, (%rsp)
leaq 0x85227(%rip), %rsi     # 0x126689
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa1914
callq 0xeaf3c
andq $0x0, 0x40(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0xa192a
movq %r14, %rdi
callq 0xded32
andq $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: do_item_type_descriptor
static int do_item_type_descriptor(deark *c, lctx *d, zztype *zz, int has_version)
{
	int retval = 0;

	d->nesting_level++;
	if(d->nesting_level>MAX_NESTING_LEVEL) goto done;

	// This descriptor contains a descriptor. We have to go deeper.
	retval = read_descriptor(c, d, zz, has_version, "");

done:
	d->nesting_level--;
	return retval;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl 0x10(%rsi), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x10(%rbx)
xorl %eax, %eax
cmpl $0x31, %esi
jg 0xa2556
leaq 0x95717(%rip), %r8      # 0x137c60
movq %rbx, %rsi
callq 0xa147d
movl 0x10(%rbx), %esi
decl %esi
movl %esi, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xeac74
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0xa1369
movq %r14, %rdi
callq 0xeb877
leaq 0x8418e(%rip), %rsi     # 0x126727
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %rsp, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0xa17c1
leaq 0x8417e(%rip), %rdx     # 0x12673f
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa18ab
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa18f7
movq %r14, %rdi
callq 0xeaf3c
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa261d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8434d(%rip), %rsi     # 0x126954
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0xde896
cmpl $0x2, 0x90(%r15)
jge 0xa2623
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
leaq 0x84345(%rip), %rcx     # 0x126973
pushq $0x1
popq %r9
movq %r14, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0xe4e0b
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x9ff2f
addq $-0x5, %rax
cmpq $-0x4, %rax
jae 0xa436f
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x9ff51
movzbl %al, %ecx
leaq 0x8da2e(%rip), %rsi     # 0x131db3
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/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 0xa43c4
leaq 0x82e37(%rip), %rdx     # 0x1271ec
movq %rsp, %rdi
pushq $0x64
popq %rsi
xorl %eax, %eax
callq 0xde40c
jmp 0xa43d6
leaq 0x93895(%rip), %rsi     # 0x137c60
movq %rsp, %rdi
pushq $0x64
popq %rdx
callq 0xde492
pushq $0x1
popq %rcx
movq %rsp, %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xa147d
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rdx, %rbx
movq %rsi, 0x28(%rsp)
movq %rdi, %r15
xorl %ebp, %ebp
movq 0x28(%rsp), %r12
movq %rbx, %rdi
callq 0x9ff2f
cmpq $0x10, %rax
jl 0xa4b52
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
movq %rcx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rax, 0x20(%rsp)
subq %rcx, %rax
jle 0xa4b52
cmpq $0xf, %rax
jle 0xa4b52
movq %r15, %rdi
leaq 0x8262f(%rip), %rsi     # 0x1270b3
movl %ebp, 0xc(%rsp)
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r15), %rdi
movl 0x4(%r12), %edx
leaq 0x10(%rsp), %rsi
callq 0x9fe70
movq %rax, %rbp
movq %r15, %rdi
leaq 0x79759(%rip), %rsi     # 0x11e215
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
testq %rbp, %rbp
movl $0x0, %eax
cmovgq %rbp, %rax
movq 0x10(%rsp), %r14
movq 0x20(%rsp), %r13
addq %r14, %rax
cmpq %r13, %rax
cmovgeq %r13, %rax
movq %r14, 0x38(%rsp)
movq %r14, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x30(%rsp), %rdx
callq 0xa4b61
movq %rbp, %rdi
callq 0xdfb90
movq %rax, %rbp
addq %r14, %rbp
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rsp), %rax
movq %r13, %rcx
movl $0x0, %edx
subq %rax, %rcx
jle 0xa4b44
cmpq %r13, %rbp
jle 0xa4b3e
movq %rcx, %rdx
jmp 0xa4b44
subq %rax, %rbp
movq %rbp, %rdx
addq %rdx, (%rbx)
movl 0xc(%rsp), %ebp
incl %ebp
jmp 0xa4a3f
addq $0x48, %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/psd.c
// Function: do_pattern_internal
static int do_pattern_internal(deark *c, lctx *d, zztype *zz)
{
	i64 pat_color_mode;
	i64 ver;
	i64 w, h;
	de_ucstring *s = NULL;
	zztype vmalzz; // for virtual memory array list
	int retval = 0;

	ver = psd_getu32zz(zz);
	de_dbg(c, "version: %d", (int)ver);
	if(ver!=1) goto done;

	pat_color_mode = psd_getu32zz(zz);
	de_dbg(c, "color mode: %d (%s)", (int)pat_color_mode, get_colormode_name(pat_color_mode));

	h = psd_getu16zz(zz);
	w = psd_getu16zz(zz);
	de_dbg_dimensions(c, w, h);

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

	ucstring_empty(s);
	read_pascal_string_to_ucstring(c, d, s, zz);
	de_dbg(c, "id: \"%s\"", ucstring_getpsz_d(s));

	if(pat_color_mode==PSD_CM_PALETTE) {
		de_dbg(c, "palette at %d", (int)zz->pos);
		zz->pos += 3*256;
	}

	zz_init(&vmalzz, zz);
	do_vm_array_list(c, d, &vmalzz);
	zz->pos += zz_used(&vmalzz);
	retval = 1;
done:
	ucstring_destroy(s);
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movl 0x4(%rsi), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %r12
leaq 0x82961(%rip), %rsi     # 0x1274f1
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x1, %r12
jne 0xa4ce4
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %r13
movq %rax, %rdi
callq 0xa4d0b
leaq 0x824f9(%rip), %rsi     # 0x1270c5
movq %r15, %rdi
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9feb0
movq %rax, %r12
movq 0x18(%r15), %rdi
movl 0x4(%r14), %edx
movq %rbx, %rsi
callq 0x9feb0
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xdf038
movq %r15, %rdi
callq 0xeac74
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeb877
leaq 0x70983(%rip), %rsi     # 0x1155bb
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
callq 0xeac85
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x9fec2
movq %r12, %rdi
callq 0xeb877
leaq 0x7bd54(%rip), %rsi     # 0x1209c1
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%rbx), %rdx
cmpq $0x2, %r13
jne 0xa4c9f
leaq 0x7e53e(%rip), %rsi     # 0x1231c8
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
movl $0x300, %edx            # imm = 0x300
addq (%rbx), %rdx
movq %rdx, (%rbx)
movq 0x10(%rbx), %rax
leaq 0x8(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rdx, (%r13)
movq %rax, 0x10(%r13)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xa4d28
movq 0x8(%r13), %rcx
movq 0x10(%r13), %rsi
movq %rsi, %rax
subq %rcx, %rax
jle 0xa4ce9
movq 0x8(%rsp), %rdx
cmpq %rsi, %rdx
jg 0xa4ceb
subq %rcx, %rdx
movq %rdx, %rax
jmp 0xa4ceb
xorl %r12d, %r12d
jmp 0xa4cf2
xorl %eax, %eax
addq %rax, (%rbx)
pushq $0x1
popq %r13
movq %r12, %rdi
callq 0xeaf3c
movl %r13d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdi
callq 0x9ff2f
cmpq $0x3, %rax
jg 0xa5322
movq 0x10(%rbx), %rax
jmp 0xa5363
movq 0x18(%r12), %rdi
movl 0x4(%r15), %edx
movq %rbx, %rsi
callq 0x9fe70
movq %rax, %r13
movq (%rbx), %rsi
movq 0x10(%rbx), %rax
leaq (%rsi,%r13), %rcx
cmpq %rax, %rcx
jg 0xa5363
movq 0x18(%r12), %rdi
movl 0x8(%r15), %r9d
movq %r13, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
addq (%rbx), %r13
movq %r13, %rax
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x82815(%rip), %rax     # 0x127b8c
movq %rax, (%rsi)
leaq 0x82816(%rip), %rax     # 0x127b97
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xa53a7
movq %rax, 0x18(%rsi)
leaq 0x1363(%rip), %rax      # 0xa66fa
movq %rax, 0x20(%rsi)
leaq 0x1422(%rip), %rax      # 0xa67c4
movq %rax, 0x28(%rsi)
retq