LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_image_data
static void do_image_data(deark *c, lctx *d, zztype *zz)
{
	i64 cmpr;
	i64 len;
	i64 image_data_size;
	zztype czz;

	len = zz_avail(zz);
	if(len<2) return;
	de_dbg(c, "image data section at %d, expected len=%d", (int)zz->pos, (int)len);
	de_dbg_indent(c, 1);
	cmpr = psd_getu16zz(zz);
	dbg_print_compression_method(c, d, cmpr);

	image_data_size = zz_avail(zz);

	if(c->extract_policy == DE_EXTRACTPOLICY_AUXONLY) goto done;

	// Copy the global density info (from Resources section, presumably) to the image info
	d->main_iinfo->density = d->density;

	if(cmpr==0) { // Uncompressed
		do_bitmap(c, d, d->main_iinfo, c->infile, zz->pos, image_data_size);
	}
	else if(cmpr==1) { // PackBits
		zz_init(&czz, zz);
		do_bitmap_packbits(c, d, &czz, d->main_iinfo);
		zz->pos += zz_used(&czz);
	}
	else {
		de_err(c, "Compression method not supported: %d", (int)cmpr);
	}

done:
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
movq %rax, -0x28(%rbp)
cmpq $0x2, -0x28(%rbp)
jge 0xf38bd
jmp 0xf39fc
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0xcca98(%rip), %rsi     # 0x1c036f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfadb0
movq -0x18(%rbp), %rdi
callq 0xf40b0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x8c(%rax)
jne 0xf3938
jmp 0xf39ee
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x40(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x48(%rcx), %rcx
movq %rcx, 0x38(%rax)
cmpq $0x0, -0x20(%rbp)
jne 0xf398d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
movq -0x30(%rbp), %r9
callq 0xfb430
jmp 0xf39ec
cmpq $0x1, -0x20(%rbp)
jne 0xf39d2
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xf3580
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
leaq -0x48(%rbp), %rdx
callq 0xfb860
leaq -0x48(%rbp), %rdi
callq 0xf3820
movq %rax, %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0xf39ea
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xcc9b6(%rip), %rsi     # 0x1c0399
movb $0x0, %al
callq 0x15bfb0
jmp 0xf39ec
jmp 0xf39ee
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf40b0
cmpq $0x1, %rax
jge 0xf3e59
jmp 0xf3ecc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0xf4120
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0xf3e97
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf3ecc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: lookup_rsrc
static int lookup_rsrc(u32 sig_id, u16 n, struct rsrc_info *ri_dst)
{
	i64 i;
	int found = 0;

	de_zeromem(ri_dst, sizeof(struct rsrc_info));

	if(sig_id==CODE_PHUT) { // PhotoDeluxe resources seem to use incompatible formats.
		ri_dst->id = n;
		ri_dst->idname = "?";
		return 0;
	}

	for(i=0; i<(i64)DE_ARRAYCOUNT(rsrc_info_arr); i++) {
		if(rsrc_info_arr[i].id == n) {
			*ri_dst = rsrc_info_arr[i]; // struct copy
			if(!ri_dst->idname) ri_dst->idname = "?";
			return 1;
		}
	}

	ri_dst->id = n;
	ri_dst->idname = "?";

	// Handle pattern-based resources that don't fit nicely in our table.

	if(n>=0x07d0 && n<=0x0bb6) {
		found = 1;
		ri_dst->idname = "Path Information";
		ri_dst->hfn = hrsrc_pathinfo;
	}
	else if(n>=0x0fa0 && n<=0x1387) {
		found = 1;
		ri_dst->idname = "Plug-In resource";
		ri_dst->hfn = hrsrc_pluginresource;
	}

	return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x19140
cmpl $0x50485554, -0x8(%rbp) # imm = 0x50485554
jne 0xf3f3c
movw -0xa(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x18(%rbp), %rax
leaq 0xc3d01(%rip), %rcx     # 0x1b7c2d
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xf405e
movq $0x0, -0x20(%rbp)
cmpq $0x58, -0x20(%rbp)
jge 0xf3fc4
leaq 0x12791e(%rip), %rax    # 0x21b870
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movzwl (%rax), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0xf3fb4
movq -0x18(%rbp), %rax
leaq 0x127900(%rip), %rcx    # 0x21b870
imulq $0x18, -0x20(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf3fa8
movq -0x18(%rbp), %rax
leaq 0xc3c89(%rip), %rcx     # 0x1b7c2d
movq %rcx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xf405e
jmp 0xf3fb6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xf3f44
movw -0xa(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x18(%rbp), %rax
leaq 0xc3c53(%rip), %rcx     # 0x1b7c2d
movq %rcx, 0x8(%rax)
movzwl -0xa(%rbp), %eax
cmpl $0x7d0, %eax            # imm = 0x7D0
jl 0xf401b
movzwl -0xa(%rbp), %eax
cmpl $0xbb6, %eax            # imm = 0xBB6
jg 0xf401b
movl $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
leaq 0xcaa4e(%rip), %rcx     # 0x1bea54
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
leaq 0x14b(%rip), %rcx       # 0xf4160
movq %rcx, 0x10(%rax)
jmp 0xf4058
movzwl -0xa(%rbp), %eax
cmpl $0xfa0, %eax            # imm = 0xFA0
jl 0xf4056
movzwl -0xa(%rbp), %eax
cmpl $0x1387, %eax           # imm = 0x1387
jg 0xf4056
movl $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
leaq 0xcaa22(%rip), %rcx     # 0x1bea65
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
leaq 0x13e(%rip), %rcx       # 0xf4190
movq %rcx, 0x10(%rax)
jmp 0xf4058
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: hrsrc_pluginresource
static void hrsrc_pluginresource(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	struct de_fourcc fourcc;
	zztype czz;

	// Plug-in resources seem to start with a fourcc.
	if(zz_avail(zz)<4) return;
	psd_read_fourcc_zz(c, d, zz, &fourcc);
	de_dbg(c, "id: '%s'", fourcc.id_dbgstr);
	zz_init(&czz, zz);
	switch(fourcc.id) {
	case CODE_mani:
		do_pluginrsrc_mani(c, d, &czz);
		break;
	case CODE_mopt:
		do_pluginrsrc_mopt(c, d, &czz);
		break;
	case CODE_mset:
		do_pluginrsrc_descriptor(c, d, &czz);
		break;
	default:
		if(zz_avail(&czz)>0) {
			de_dbg(c, "[%d more bytes of plug-in resource data at %d]",
				(int)zz_avail(&czz), (int)czz.startpos);
			if(c->debug_level>=2) {
				de_dbg_indent(c, 1);
				de_dbg_hexdump(c, c->infile, czz.startpos, zz_avail(&czz), 256, NULL, 0x1);
				de_dbg_indent(c, -1);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x4, %rax
jge 0xf41bf
jmp 0xf431e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0xf3d80
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0xac154(%rip), %rsi     # 0x1a0337
xorl %eax, %eax
callq 0x15b0d0
movq -0x18(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0xf3580
movl -0x4c(%rbp), %eax
movl %eax, -0x6c(%rbp)
subl $0x6d616e69, %eax       # imm = 0x6D616E69
je 0xf421e
jmp 0xf4206
movl -0x6c(%rbp), %eax
subl $0x6d6f7074, %eax       # imm = 0x6D6F7074
je 0xf4234
jmp 0xf4212
movl -0x6c(%rbp), %eax
subl $0x6d736574, %eax       # imm = 0x6D736574
je 0xf424a
jmp 0xf4260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xf7960
jmp 0xf431e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xf7a50
jmp 0xf431e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xf7c90
jmp 0xf431e
leaq -0x68(%rbp), %rdi
callq 0xf40b0
cmpq $0x0, %rax
jle 0xf431c
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xf40b0
movq -0x78(%rbp), %rdi
movl %eax, %edx
movq -0x60(%rbp), %rax
movl %eax, %ecx
leaq 0xcb658(%rip), %rsi     # 0x1bf8ef
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0xf431a
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xf40b0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rax, %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0xf431c
jmp 0xf431e
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x10, %rax
je 0xf435c
jmp 0xf44c7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x1658c0
movq %rax, -0x28(%rbp)
cvtsi2sdq -0x28(%rbp), %xmm0
movsd 0xbdc4f(%rip), %xmm1    # 0x1b1fd8
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
leaq 0xcadc5(%rip), %rsi     # 0x1bf167
movb $0x1, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165820
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rdi
callq 0xf5480
movq -0x70(%rbp), %rdi
movl -0x64(%rbp), %edx
movq %rax, %rcx
leaq 0xcad80(%rip), %rsi     # 0x1bf175
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x1658c0
movq %rax, -0x30(%rbp)
cvtsi2sdq -0x30(%rbp), %xmm0
movsd 0xbdbab(%rip), %xmm1    # 0x1b1fd8
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
leaq 0xcad4a(%rip), %rsi     # 0x1bf190
movb $0x1, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0xc, %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165820
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rdi
callq 0xf5480
movq -0x60(%rbp), %rdi
movl -0x54(%rbp), %edx
movq %rax, %rcx
leaq 0xcad05(%rip), %rsi     # 0x1bf19e
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movl $0x2, 0x38(%rax)
movsd -0x38(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x40(%rax)
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x48(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0xf4584
movq -0x28(%rbp), %rdi
callq 0x171210
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf3e30
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl -0x30(%rbp), %ecx
movq %rax, %r8
leaq 0xcac5d(%rip), %rsi     # 0x1bf1cf
movb $0x0, %al
callq 0x15b0d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf4504
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xf40b0
cmpq $0x9, %rax
je 0xf45ce
jmp 0xf464a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x41(%rbp), %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movl $0x9, %ecx
callq 0x164d10
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
movzbl -0x41(%rbp), %ecx
movzbl -0x40(%rbp), %r8d
movzbl -0x3f(%rbp), %r9d
movzbl -0x3e(%rbp), %r15d
movzbl -0x3d(%rbp), %r14d
movzbl -0x3c(%rbp), %ebx
movzbl -0x3b(%rbp), %r11d
movzbl -0x3a(%rbp), %r10d
movzbl -0x39(%rbp), %eax
leaq 0xcabb4(%rip), %rsi     # 0x1bf1dc
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
movq -0x28(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172500
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq %rax, %rcx
leaq 0xc31f4(%rip), %rsi     # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x4, %rax
jl 0xf4bab
movq -0x28(%rbp), %rdi
callq 0x171210
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl -0x30(%rbp), %ecx
movq %rax, %r8
leaq 0xca636(%rip), %rsi     # 0x1bf1cf
movb $0x0, %al
callq 0x15b0d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf4b34
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: hrsrc_slices
static void hrsrc_slices(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 sver;

	if(zz_avail(zz)<4) return;
	sver = psd_getu32(zz->pos);
	de_dbg(c, "slices resource format version: %d", (int)sver);

	if(sver==6) {
		do_slices_v6(c, d, zz);
	}
	else if(sver==7 || sver==8) {
		do_slices_v7_8(c, d, zz);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x4, %rax
jge 0xf4be9
jmp 0xf4c5b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x1658c0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xca6e4(%rip), %rsi     # 0x1bf2fd
movb $0x0, %al
callq 0x15b0d0
cmpq $0x6, -0x28(%rbp)
jne 0xf4c3a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf55c0
jmp 0xf4c5b
cmpq $0x7, -0x28(%rbp)
je 0xf4c48
cmpq $0x8, -0x28(%rbp)
jne 0xf4c59
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf57d0
jmp 0xf4c5b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq %rax, %rcx
leaq 0xc2f25(%rip), %rsi     # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0xca95e(%rip), %rsi     # 0x1bf6ae
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0xf4e31
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xf3d80
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x84(%rbp)
leaq -0x68(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rax
movl %eax, -0x74(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172500
movq -0x90(%rbp), %rdi
movl -0x84(%rbp), %edx
movq -0x80(%rbp), %rcx
movl -0x74(%rbp), %r8d
movq %rax, %r9
leaq 0xca8ac(%rip), %rsi     # 0x1bf6bc
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171210
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xf4d6c
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xcb373(%rip), %rsi     # 0x1c0210
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf4120
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x31(%rbp), %edx
leaq 0xca816(%rip), %rsi     # 0x1bf6dd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172500
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0xca7e4(%rip), %rsi     # 0x1bf6f3
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rdi
callq 0x171210
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172500
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0xca7b2(%rip), %rsi     # 0x1bf705
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0xcb62f(%rip), %rsi     # 0x1c05b6
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0xe, %rax
je 0xf507c
jmp 0xf516d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xca66e(%rip), %rsi     # 0x1bf717
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165e00
movsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165e00
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq 0xca600(%rip), %rsi     # 0x1bf721
movb $0x2, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165e00
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
leaq 0xca5cd(%rip), %rsi     # 0x1bf733
movb $0x1, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0xc, %rax
je 0xf51a9
jmp 0xf5222
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xcb03a(%rip), %rsi     # 0x1c0210
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165f20
movsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
leaq 0xca522(%rip), %rsi     # 0x1bf73d
movb $0x1, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x2, %rax
jge 0xf525c
jmp 0xf52fb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xa99f2(%rip), %rsi     # 0x19ec7b
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rdi
callq 0xf40b0
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
cmpq %rcx, %rax
jge 0xf52a8
jmp 0xf52fb
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0xf52fb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
leaq 0xca45c(%rip), %rsi     # 0x1bf745
movb $0x0, %al
callq 0x15b0d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf52af
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf3e30
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172500
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq %rax, %rcx
leaq 0xc2885(%rip), %rsi     # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0xa, %rax
je 0xf53cc
jmp 0xf5475
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf4120
movb %al, -0x39(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rax
movl %eax, %ecx
movzbl -0x39(%rbp), %r8d
movq -0x30(%rbp), %rax
movl %eax, %r9d
movq -0x38(%rbp), %rax
leaq 0xca2eb(%rip), %rsi     # 0x1bf756
movl %eax, (%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: units_name
static const char* units_name(i64 u)
{
	switch(u) {
	case 1: return "pixels/inch";
	case 2: return "pixels/cm";
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
subq $0x1, %rax
je 0xf54a4
jmp 0xf5498
movq -0x18(%rbp), %rax
subq $0x2, %rax
je 0xf54b1
jmp 0xf54be
leaq 0xc9d0e(%rip), %rax     # 0x1bf1b9
movq %rax, -0x8(%rbp)
jmp 0xf54c9
leaq 0xc9d0d(%rip), %rax     # 0x1bf1c5
movq %rax, -0x8(%rbp)
jmp 0xf54c9
leaq 0xc2768(%rip), %rax     # 0x1b7c2d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf40b0
cmpq $0x4, %rax
jge 0xf550b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf55b0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0xf5553
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf55b0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%rbp), %rdx
shlq %rdx
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x4, %eax
movl $0x3, %ecx
cmpl $0x0, %r9d
cmovnel %ecx, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x28(%rbp), %rcx
shlq %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
callq 0x171310
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x4, -0x48(%rbp)
jge 0xf5879
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf5e90
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp,%rax,8)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xf5840
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %eax, %r8d
movq -0x28(%rbp), %rax
movl %eax, %r9d
movq -0x30(%rbp), %rax
leaq 0xc9b08(%rip), %rsi     # 0x1bf3a8
movl %eax, (%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xf6084
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xf60ac
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x15b820
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_descriptor_item
static int do_descriptor_item(deark *c, lctx *d, zztype *zz)
{
	struct flexible_id key;
	zztype czz;
	i64 itempos;
	int ret;

	itempos = zz->pos;

	read_flexible_id_zz(c, d, zz, &key);
	dbg_print_flexible_id(c, d, &key, "key");

	zz_init(&czz, zz);
	ret = do_descriptor_item_ostype_and_data(c, d, &key, &czz, itempos);
	flexible_id_free_contents(c, &key);
	if(!ret) return 0;
	zz->pos += zz_used(&czz);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0xf5f70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x70(%rbp), %rdx
leaq 0xb9eae(%rip), %rcx     # 0x1affbb
callq 0xf5fc0
movq -0x20(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0xf3580
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x90(%rbp), %r8
leaq -0x70(%rbp), %rdx
leaq -0x88(%rbp), %rcx
callq 0xf62f0
movl %eax, -0x94(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xf6050
cmpl $0x0, -0x94(%rbp)
jne 0xf6166
movl $0x0, -0x4(%rbp)
jmp 0xf6186
leaq -0x88(%rbp), %rdi
callq 0xf3820
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: read_flexible_id
static void read_flexible_id(deark *c, lctx *d, i64 pos,
	struct flexible_id *flid)
{
	i64 length;

	de_zeromem(flid, sizeof(struct flexible_id));

	length = psd_getu32(pos);
	if(length==0) {
		flid->is_fourcc = 1;
		dbuf_read_fourcc(c->infile, pos+4, &flid->fourcc, 4, d->is_le ? DE_4CCFLAG_REVERSED : 0);
		flid->bytes_consumed = 4 + 4;
	}
	else {
		i64 adjusted_length;

		// I don't know what the maximum length of an identifier is.
		// I'll pretend it's 100 bytes.
		adjusted_length = length;
		if(adjusted_length>100) adjusted_length=100;
		flid->sz = de_malloc(c, adjusted_length+1);
		dbuf_read(c->infile, (unsigned char*)flid->sz, pos+4, adjusted_length);
		flid->sz[adjusted_length] = '\0';

		flid->s = ucstring_create(c);
		ucstring_append_bytes(flid->s, (unsigned char*)flid->sz, adjusted_length, 0, DE_ENCODING_ASCII);

		flid->bytes_consumed = 4 + length;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x19140
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x1658c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xf623e
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x20(%rbp), %rdx
addq $0x4, %rdx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
xorl %r8d, %r8d
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %r8d
movl $0x4, %ecx
callq 0x169860
movq -0x20(%rbp), %rax
movq $0x8, 0x48(%rax)
jmp 0xf62e7
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x64, -0x30(%rbp)
jle 0xf6255
movq $0x64, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x4, %rdx
movq -0x30(%rbp), %rcx
callq 0x164d10
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x30(%rbp), %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x171fa0
movq -0x28(%rbp), %rcx
addq $0x4, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_item_type_UntF
static void do_item_type_UntF(deark *c, lctx *d, zztype *zz)
{
	double v;
	struct de_fourcc unit4cc;

	psd_read_fourcc_zz(c, d, zz, &unit4cc);
	de_dbg(c, "units code: '%s'", unit4cc.id_dbgstr);

	v = dbuf_getfloat64x(c->infile, zz->pos, d->is_le);
	de_dbg(c, "value: %f", v);
	zz->pos += 8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0xf3d80
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
addq $0x10, %rdx
leaq 0xc8cac(%rip), %rsi     # 0x1bf538
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165f20
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
leaq 0xb0493(%rip), %rsi     # 0x1a6d56
movb $0x1, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_item_type_UnFl
static void do_item_type_UnFl(deark *c, lctx *d, zztype *zz)
{
	i64 count;
	struct de_fourcc unit4cc;

	psd_read_fourcc_zz(c, d, zz, &unit4cc);
	de_dbg(c, "units code: '%s'", unit4cc.id_dbgstr);

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

	zz->pos += count*8; // TODO: [what we assume is a] float array
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0xf3d80
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
addq $0x10, %rdx
leaq 0xc8c1c(%rip), %rsi     # 0x1bf538
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xa832b(%rip), %rsi     # 0x19ec7b
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rcx
shlq $0x3, %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_item_type_TEXT
static void do_item_type_TEXT(deark *c, lctx *d, zztype *zz)
{
	de_ucstring *s = NULL;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172650
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0xa7e5e(%rip), %rsi     # 0x19e82b
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_item_type_enum
static void do_item_type_enum(deark *c, lctx *d, zztype *zz)
{
	struct flexible_id flid;

	read_flexible_id_zz(c, d, zz, &flid); // "type"
	dbg_print_flexible_id(c, d, &flid, "enum type");
	flexible_id_free_contents(c, &flid);

	read_flexible_id_zz(c, d, zz, &flid); // "enum"
	dbg_print_flexible_id(c, d, &flid, "enum value");
	flexible_id_free_contents(c, &flid);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xf5f70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq 0xc8b1d(%rip), %rcx     # 0x1bf549
callq 0xf5fc0
movq -0x8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xf6050
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xf5f70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq 0xc8aed(%rip), %rcx     # 0x1bf553
callq 0xf5fc0
movq -0x8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xf6050
addq $0x70, %rsp
popq %rbp
retq
nop