LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2ea.c
// Function: eadata_do_attribute_lowlevel
static int eadata_do_attribute_lowlevel(deark *c, struct eadata_ctx *d,
	UI attr_dtype, i64 pos1, i64 nbytes_avail, i64 *pbytes_consumed, int nesting_level)
{
	int retval = 0;

	*pbytes_consumed = 0;

	// I don't know if multi-val attributes are allowed to contain other multi-val attributes.
	if(nesting_level>5) goto done;

	switch(attr_dtype) {
	case 0xffdf:
		if(!eadata_do_MVMT(c, d, pos1, nbytes_avail, pbytes_consumed, nesting_level)) goto done;
		break;
	case 0xffde: // MVST (TODO)
	case 0xffdd: // ASN1
		goto done;
	default:
		if(!eadata_do_attribute_lowlevel_singleval(c, d, attr_dtype, pos1, nbytes_avail,
			pbytes_consumed))
		{
			goto done;
		}
		break;
	}

	retval = 1;

done:
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x5, 0x10(%rbp)
jle 0xf0a8c
jmp 0xf0afe
movl -0x14(%rbp), %eax
movl %eax, -0x38(%rbp)
addl $0xffff0023, %eax       # imm = 0xFFFF0023
subl $0x2, %eax
jb 0xf0ad0
jmp 0xf0a9e
movl -0x38(%rbp), %eax
subl $0xffdf, %eax           # imm = 0xFFDF
jne 0xf0ad2
jmp 0xf0aaa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl 0x10(%rbp), %r9d
callq 0xf0b10
cmpl $0x0, %eax
jne 0xf0ace
jmp 0xf0afe
jmp 0xf0af7
jmp 0xf0afe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0xf0ce0
cmpl $0x0, %eax
jne 0xf0af5
jmp 0xf0afe
jmp 0xf0af7
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2ea.c
// Function: eadata_do_attribute_lowlevel_singleval
static int eadata_do_attribute_lowlevel_singleval(deark *c, struct eadata_ctx *d,
	UI attr_dtype, i64 pos1, i64 maxlen, i64 *pbytes_consumed)
{
	i64 attr_dlen;
	i64 dpos;
	int retval = 0;

	attr_dlen = de_getu16le(pos1);
	de_dbg(c, "inner data len: %"I64_FMT, attr_dlen);
	if(attr_dlen<2 || attr_dlen>maxlen) goto done;
	*pbytes_consumed = 2 + attr_dlen;
	retval = 1;
	dpos = pos1+2;

	switch(attr_dtype) {
	case 0xfff9:
		eadata_extract_icon(c, d, dpos, attr_dlen);
		break;
	case 0xfffd:
		eadata_do_text_attrib(c, d, dpos, attr_dlen);
		break;
	default:
		de_dbg_hexdump(c, c->infile, dpos, attr_dlen, 256, NULL, 0x1);
	}

done:
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xcd8df(%rip), %rsi     # 0x1be609
movb $0x0, %al
callq 0x15b0d0
cmpq $0x2, -0x38(%rbp)
jl 0xf0d42
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0xf0d47
jmp 0xf0ddf
movq -0x38(%rbp), %rcx
addq $0x2, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x44(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x48(%rbp)
subl $0xfff9, %eax           # imm = 0xFFF9
je 0xf0d84
jmp 0xf0d78
movl -0x48(%rbp), %eax
subl $0xfffd, %eax           # imm = 0xFFFD
je 0xf0d9b
jmp 0xf0db2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0xf0df0
jmp 0xf0ddd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0xf0ec0
jmp 0xf0ddd
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
jmp 0xf0ddf
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2ea.c
// Function: eadata_extract_icon
static void eadata_extract_icon(deark *c, struct eadata_ctx *d, i64 pos, i64 len)
{
	de_finfo *fi = NULL;

	fi = de_finfo_create(c);

	if(d->base_filename_ref) {
		de_finfo_set_name_from_ucstring(c, fi, d->base_filename_ref, 0);
	}
	else if(d->cur_md && ucstring_isnonempty(d->cur_md->fn)) {
		de_finfo_set_name_from_ucstring(c, fi, d->cur_md->fn, 0);
	}

	dbuf_create_file_from_slice(c->infile, pos, len, "os2.ico", fi, d->createflags_for_icons);
	de_finfo_destroy(c, fi);
}

// 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 $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xf0e41
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
jmp 0xf0e7f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xf0e7d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0xf0e7d
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
jmp 0xf0e7f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r9d
leaq 0xb842f(%rip), %rcx     # 0x1a92d1
callq 0x166be0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15d260
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2ea.c
// Function: eadata_do_text_attrib
static void eadata_do_text_attrib(deark *c, struct eadata_ctx *d, i64 pos, i64 len)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	// Documented as "ASCII text" -- but I wonder if the actual encoding might
	// depend on the attribute name.
	dbuf_read_to_ucstring_n(c->infile, pos, len, 2048, s, 0, DE_ENCODING_ASCII);
	de_dbg(c, "text: \"%s\"", 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), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
movl $0x800, %ecx            # imm = 0x800
xorl %r9d, %r9d
movl $0x1, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xd5b1e(%rip), %rsi     # 0x1c6a52
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/os2ea.c
// Function: eadata_is_ea_sector_at_offset
static int eadata_is_ea_sector_at_offset(deark *c, struct eadata_ctx *d, i64 pos, int strictmode)
{
	u8 b;

	if((UI)de_getu16be(pos)!=0x4541) return 0;
	if(strictmode) {
		if((UI)de_getu32be(pos+4)!=0) return 0;
		b = de_getbyte(pos+8);
		if(b<32) return 0;
		if((UI)de_getu32be(pos+22)!=0) return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1651d0
cmpl $0x4541, %eax           # imm = 0x4541
je 0xf0f88
movl $0x0, -0x4(%rbp)
jmp 0xf1007
cmpl $0x0, -0x24(%rbp)
je 0xf1000
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x165470
cmpl $0x0, %eax
je 0xf0fb1
movl $0x0, -0x4(%rbp)
jmp 0xf1007
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
callq 0x165060
movb %al, -0x25(%rbp)
movzbl -0x25(%rbp), %eax
cmpl $0x20, %eax
jge 0xf0fdb
movl $0x0, -0x4(%rbp)
jmp 0xf1007
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x16, %rsi
callq 0x165470
cmpl $0x0, %eax
je 0xf0ffe
movl $0x0, -0x4(%rbp)
jmp 0xf1007
jmp 0xf1000
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2ea.c
// Function: eadata_do_ea_data
static void eadata_do_ea_data(deark *c, struct eadata_ctx *d, struct easector_ctx *md,
	i64 pos1)
{
	i64 pos = pos1;
	i64 endpos;
	int saved_indent_level;
	de_ucstring *s = NULL;

	de_dbg_indent_save(c, &saved_indent_level);
	de_dbg(c, "EA data at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	md->ea_data_len = de_getu16le_p(&pos); // TODO: Is this actually a 4-byte field?
	de_dbg(c, "data len: %"I64_FMT, md->ea_data_len);

	pos += 2; // ?
	endpos = pos1 + md->ea_data_len;
	s = ucstring_create(c);

	d->cur_md = md;
	while(pos < endpos-4) {
		int ret;
		i64 bytes_consumed = 0;

		de_dbg(c, "attribute at %"I64_FMT, pos);
		de_dbg_indent(c, 1);
		ret = eadata_do_attribute(c, d, pos, endpos-pos, s, &bytes_consumed);
		de_dbg_indent(c, -1);
		if(!ret || bytes_consumed<1) goto done;
		pos += bytes_consumed;
	}

done:
	ucstring_destroy(s);
	d->cur_md = NULL;
	de_dbg_indent_restore(c, saved_indent_level);
}

// 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 -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xcd61b(%rip), %rsi     # 0x1be66f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq 0xcd579(%rip), %rsi     # 0x1be60f
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq $0x4, %rcx
cmpq %rcx, %rax
jge 0xf1160
movq $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0xcd489(%rip), %rsi     # 0x1be582
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
subq -0x28(%rbp), %rcx
movq -0x40(%rbp), %r8
leaq -0x50(%rbp), %r9
callq 0xf0800
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
cmpl $0x0, -0x44(%rbp)
je 0xf114d
cmpq $0x1, -0x50(%rbp)
jge 0xf114f
jmp 0xf1162
movq -0x50(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xf10d1
jmp 0xf1162
movq -0x40(%rbp), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x15b5a0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2bootlogo.c
// Function: de_module_os2bootlogo
void de_module_os2bootlogo(deark *c, struct deark_module_info *mi)
{
	mi->id = "os2bootlogo";
	mi->desc = "OS/2 boot logo";
	mi->run_fn = de_run_os2bootlogo;
	mi->identify_fn = de_identify_os2bootlogo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcd517(%rip), %rcx     # 0x1be6be
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcd515(%rip), %rcx     # 0x1be6ca
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf11e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x12d(%rip), %rcx       # 0xf1300
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2bootlogo.c
// Function: de_run_os2bootlogo
static void de_run_os2bootlogo(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	int k;

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

	d->max_bytes_per_plane = IMG_WIDTH*IMG_MAX_HEIGHT/8;
	do_read_header(c, d, 0);

	d->unc_pixels = dbuf_create_membuf(c, d->max_bytes_per_plane*NUM_PLANES, 0x1);
	dbuf_enable_wbuffer(d->unc_pixels);
	for(k=0; k<NUM_PLANES; k++) {
		do_decompress_plane(c, d, k);
		if(d->fatal_errflag) goto done;
	}

	// There's a program that makes files that only use RLE compression.
	// Out of curiosity, I want to identify such files.
	de_dbg(c, "cmpr uses lzss: %u", (UI)d->uses_lzss);

	do_write_image(c, d);

done:
	if(d) {
		if(d->need_dcmpr_errmsg) {
			de_err(c, "Decompression failed. This is probably not "
				"an OS/2 Boot Logo.");
		}
		dbuf_close(d->unc_pixels);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x78, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x9600, 0x60(%rax)     # imm = 0x9600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf13b0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rsi
shlq $0x2, %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x167b90
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0xf128f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xf14b0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x69(%rax)
je 0xf1282
jmp 0xf12b6
jmp 0xf1284
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf1260
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x68(%rax), %edx
leaq 0xcd437(%rip), %rsi     # 0x1be6d9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf16d0
cmpq $0x0, -0x18(%rbp)
je 0xf12f3
movq -0x18(%rbp), %rax
cmpb $0x0, 0x6a(%rax)
je 0xf12d9
movq -0x8(%rbp), %rdi
leaq 0xcd41a(%rip), %rsi     # 0x1be6ec
movb $0x0, %al
callq 0x15bfb0
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2bootlogo.c
// Function: de_identify_os2bootlogo
static int de_identify_os2bootlogo(deark *c)
{
	UI offs;
	UI len;
	UI i;
	UI next_expected_offs = 32;
	i64 pos = 0;

	for(i=0; i<4; i++) {
		offs = (UI)de_getu32le_p(&pos);
		if(offs!=next_expected_offs) return 0;
		len = (UI)de_getu32le_p(&pos);
		if(len<2) return 0;
		next_expected_offs = offs+len;
	}
	if(next_expected_offs!=c->infile->len) return 0;
	return 55;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x20, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jae 0xf1384
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0xf134d
movl $0x0, -0x4(%rbp)
jmp 0xf13a5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movl %eax, -0x18(%rbp)
cmpl $0x2, -0x18(%rbp)
jae 0xf1370
movl $0x0, -0x4(%rbp)
jmp 0xf13a5
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf1322
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0xf139e
movl $0x0, -0x4(%rbp)
jmp 0xf13a5
movl $0x37, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2bootlogo.c
// Function: do_read_header
static void do_read_header(deark *c, lctx *d, i64 pos)
{
	int k;

	de_dbg(c, "header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	for(k=0; k<NUM_PLANES; k++) {
		d->pl[k].offset = de_getu32le_p(&pos);
		d->pl[k].len = de_getu32le_p(&pos);
		de_dbg(c, "plane %d: pos=%"I64_FMT", len=%"I64_FMT, k, d->pl[k].offset,
			d->pl[k].len);
	}

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xbd990(%rip), %rsi     # 0x1aed63
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0xf148e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x165580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x165580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq 0x8(%rax), %r8
leaq 0xcd2b1(%rip), %rsi     # 0x1be72a
movb $0x0, %al
callq 0x15b0d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf13ef
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/os2bootlogo.c
// Function: do_write_image
static void do_write_image(deark *c, lctx *d)
{
	i64 rowspan;
	i64 height;
	UI pn;
	de_bitmap *img = NULL;
	de_color pal[16];

	rowspan = IMG_WIDTH/8;
	height = 400;
	for(pn=0; pn<NUM_PLANES; pn++) {
		if(d->pl[pn].dcmpr_nbytes > rowspan*400) {
			height = 480;
			break;
		}
	}

	de_dbg_dimensions(c, IMG_WIDTH, height);
	img = de_bitmap_create(c, IMG_WIDTH, height, 3);

	de_copy_std_palette(DE_PALID_WIN16, 2, 0, pal, 16, 0);
	de_convert_image_paletted_planar(d->unc_pixels, 0, NUM_PLANES, rowspan,
		d->max_bytes_per_plane, pal, img, 0x02);

	de_bitmap_write_to_file(img, NULL, 0);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x50, -0x18(%rbp)
movq $0x190, -0x20(%rbp)     # imm = 0x190
movl $0x0, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jae 0xf173e
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x190, -0x18(%rbp), %rcx # imm = 0x190
cmpq %rcx, %rax
jle 0xf1731
movq $0x1e0, -0x20(%rbp)     # imm = 0x1E0
jmp 0xf173e
jmp 0xf1733
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xf1702
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x280, %esi            # imm = 0x280
callq 0x15bba0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x280, %esi            # imm = 0x280
movl $0x3, %ecx
callq 0x16b750
movq %rax, -0x30(%rbp)
leaq -0x70(%rbp), %rcx
movl $0x32, %edi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x10, %r8d
xorl %r9d, %r9d
callq 0x161320
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x60(%rax), %r8
leaq -0x70(%rbp), %r9
movq -0x30(%rbp), %rax
xorl %edx, %edx
movl %edx, %esi
movl $0x4, %edx
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x16c690
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x16afd0
movq -0x30(%rbp), %rdi
callq 0x16af60
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xccb98(%rip), %rcx     # 0x1be85f
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xccb8e(%rip), %rcx     # 0x1be863
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf1d00
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x43d(%rip), %rcx       # 0xf2130
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x14(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x164d10
leaq -0x14(%rbp), %rax
movl (%rax), %eax
subl $0x53504238, %eax       # imm = 0x53504238
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xf2175
movl $0x64, -0x4(%rbp)
jmp 0xf21b9
leaq -0x14(%rbp), %rax
movl (%rax), %eax
subl $0x4d494238, %eax       # imm = 0x4D494238
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xf21b2
movq -0x10(%rbp), %rdi
leaq 0xcc7ea(%rip), %rsi     # 0x1be980
callq 0x15d180
cmpl $0x0, %eax
je 0xf21a9
movl $0x64, -0x4(%rbp)
jmp 0xf21b9
movl $0x4b, -0x4(%rbp)
jmp 0xf21b9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcc68a(%rip), %rcx     # 0x1be871
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcc686(%rip), %rcx     # 0x1be87b
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf2220
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xcd(%rip), %rcx        # 0xf22e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_run_ps_action
static void de_run_ps_action(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	zztype *zz = NULL;

	de_declare_fmt(c, "Photoshop Action");

	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);

	do_action_set(c, d, zz);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xcc630(%rip), %rsi     # 0x1be87b
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf2f40
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xf2f00
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfbab0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xcc54d(%rip), %rdx     # 0x1be853
movl $0x6, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf231e
movl $0x10, -0x14(%rbp)
jmp 0xf2349
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xcc529(%rip), %rdx     # 0x1be85a
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf2347
movl $0xc, -0x14(%rbp)
jmp 0xf2349
cmpl $0x0, -0x14(%rbp)
jne 0xf2358
movl $0x0, -0x4(%rbp)
jmp 0xf238c
movq -0x10(%rbp), %rdi
leaq 0xce1f9(%rip), %rsi     # 0x1c055c
callq 0x15d180
cmpl $0x0, %eax
jne 0xf2376
movl $0x0, -0x4(%rbp)
jmp 0xf238c
cmpl $0x10, -0x14(%rbp)
jne 0xf2385
movl $0x64, -0x4(%rbp)
jmp 0xf238c
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcc4d5(%rip), %rcx     # 0x1be88c
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcc4d3(%rip), %rcx     # 0x1be898
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf23f0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x13d(%rip), %rcx       # 0xf2520
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xcc47d(%rip), %rsi     # 0x1be898
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf2f40
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xf2f00
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xce107(%rip), %rsi     # 0x1c05b6
movb $0x0, %al
callq 0x15b0d0
cmpq $0x5, -0x28(%rbp)
jne 0xf24dc
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x1, %ecx
leaq 0xde6fb(%rip), %r8      # 0x1d0bd0
callq 0xf5b50
jmp 0xf24f4
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xce073(%rip), %rsi     # 0x1c0560
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_gradient
static int de_identify_ps_gradient(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "8BGR", 4)) {
		if(de_input_file_has_ext(c, "grd")) return 100;
		return 90;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xce051(%rip), %rdx     # 0x1c0590
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf2575
movq -0x10(%rbp), %rdi
leaq 0xce03c(%rip), %rsi     # 0x1c0595
callq 0x15d180
cmpl $0x0, %eax
je 0xf256c
movl $0x64, -0x4(%rbp)
jmp 0xf257c
movl $0x5a, -0x4(%rbp)
jmp 0xf257c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcc304(%rip), %rcx     # 0x1be8ab
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcc300(%rip), %rcx     # 0x1be8b5
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf25e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x11d(%rip), %rcx       # 0xf26f0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_run_ps_styles
static void de_run_ps_styles(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	zztype *zz = NULL;
	i64 asl_ver;

	de_declare_fmt(c, "Photoshop Styles");

	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);

	asl_ver = psd_getu16zz(zz);
	de_dbg(c, "file version: %d", (int)asl_ver);
	if(asl_ver!=2) {
		de_err(c, "Unsupported Photoshop Styles file version: %d", (int)asl_ver);
		goto done;
	}

	do_asl_patterns_and_styles(c, d, zz);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xcc2aa(%rip), %rsi     # 0x1be8b5
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf2f40
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xf2f00
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3de0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xcdf25(%rip), %rsi     # 0x1c05b6
movb $0x0, %al
callq 0x15b0d0
cmpq $0x2, -0x28(%rbp)
je 0xf26b9
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xcdee9(%rip), %rsi     # 0x1c0599
movb $0x0, %al
callq 0x15bfb0
jmp 0xf26ca
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfc1b0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_styles
static int de_identify_ps_styles(deark *c)
{
	if(!dbuf_memcmp(c->infile, 2, "8BSL", 4)) {
		if(de_input_file_has_ext(c, "asl")) return 100;
		return 90;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
leaq 0xcdf6d(%rip), %rdx     # 0x1c067d
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf2746
movq -0x10(%rbp), %rdi
leaq 0xcdf58(%rip), %rsi     # 0x1c0682
callq 0x15d180
cmpl $0x0, %eax
je 0xf273d
movl $0x64, -0x4(%rbp)
jmp 0xf274d
movl $0x5a, -0x4(%rbp)
jmp 0xf274d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcc14f(%rip), %rcx     # 0x1be8c6
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcc14a(%rip), %rcx     # 0x1be8cf
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf27b0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ad(%rip), %rcx       # 0xf2950
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_run_ps_brush
static void de_run_ps_brush(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	zztype *zz = NULL;
	int has_8bim_sig;

	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);

	d->abr_major_ver = (int)psd_getu16(0);
	de_dbg(c, "file version: %d", (int)d->abr_major_ver);

	has_8bim_sig = (psd_getu32(4) == CODE_8BIM);

	if(has_8bim_sig && d->abr_major_ver>=3) {
		d->abr_minor_ver = (int)psd_getu16(2);
		de_declare_fmt(c, "Photoshop Brush (new format)");
		do_abr_v6(c, d, zz);
	}
	else if(d->abr_major_ver<=5) {
		de_declare_fmt(c, "Photoshop Brush (old format)");
		do_abr_v1(c, d, zz);
	}
	else {
		de_err(c, "Unsupported Photoshop Brush format (version=%d)", (int)d->abr_major_ver);
		goto done;
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x58, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf2f40
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xf2f00
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x165820
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0xcdd5f(%rip), %rsi     # 0x1c05b6
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x4, %esi
callq 0x1658c0
cmpq $0x3842494d, %rax       # imm = 0x3842494D
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf28dd
movq -0x18(%rbp), %rax
cmpl $0x3, 0x28(%rax)
jl 0xf28dd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x2, %esi
callq 0x165820
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rdi
leaq 0xcddc1(%rip), %rsi     # 0x1c0686
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfc470
jmp 0xf2927
movq -0x18(%rbp), %rax
cmpl $0x5, 0x28(%rax)
jg 0xf290a
movq -0x8(%rbp), %rdi
leaq 0xcddb1(%rip), %rsi     # 0x1c06a3
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xfc500
jmp 0xf2925
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0xcdda4(%rip), %rsi     # 0x1c06c0
movb $0x0, %al
callq 0x15bfb0
jmp 0xf2929
jmp 0xf2927
jmp 0xf2929
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_brush
static int de_identify_ps_brush(deark *c)
{
	i64 ver;

	ver = de_getu16be(0);
	if(ver==1 || ver==2 || ver==6 || ver==7) {
		if(de_input_file_has_ext(c, "abr")) return 80;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1651d0
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
je 0xf298d
cmpq $0x2, -0x18(%rbp)
je 0xf298d
cmpq $0x6, -0x18(%rbp)
je 0xf298d
cmpq $0x7, -0x18(%rbp)
jne 0xf29ad
movq -0x10(%rbp), %rdi
leaq 0xcdde9(%rip), %rsi     # 0x1c0781
callq 0x15d180
cmpl $0x0, %eax
je 0xf29ab
movl $0x50, -0x4(%rbp)
jmp 0xf29b4
jmp 0xf29ad
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcbf08(%rip), %rcx     # 0x1be8df
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcbf01(%rip), %rcx     # 0x1be8e6
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf2a10
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ed(%rip), %rcx       # 0xf2bf0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_csh
static int de_identify_ps_csh(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "cush", 4)) {
		if(de_input_file_has_ext(c, "csh")) return 100;
		return 80;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xcdbf4(%rip), %rdx     # 0x1c0803
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf2c45
movq -0x10(%rbp), %rdi
leaq 0xcbcb9(%rip), %rsi     # 0x1be8e2
callq 0x15d180
cmpl $0x0, %eax
je 0xf2c3c
movl $0x64, -0x4(%rbp)
jmp 0xf2c4c
movl $0x50, -0x4(%rbp)
jmp 0xf2c4c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xcbc86(%rip), %rcx     # 0x1be8fd
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xcbc83(%rip), %rcx     # 0x1be908
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xf2cb0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ed(%rip), %rcx       # 0xf2e90
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: de_identify_ps_pattern
static int de_identify_ps_pattern(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "8BPT", 4)) {
		if(de_input_file_has_ext(c, "pat")) return 100;
		return 90;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xcd9a0(%rip), %rdx     # 0x1c084f
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0xf2ee5
movq -0x10(%rbp), %rdi
leaq 0xcafe1(%rip), %rsi     # 0x1bdeaa
callq 0x15d180
cmpl $0x0, %eax
je 0xf2edc
movl $0x64, -0x4(%rbp)
jmp 0xf2eec
movl $0x5a, -0x4(%rbp)
jmp 0xf2eec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: init_version_specific_info
static void init_version_specific_info(deark *c, lctx *d)
{
	if(d->version==2) { // PSB format
		d->intsize_2or4 = 4;
		d->intsize_4or8 = 8;
	}
	else { // Regular PSD format
		d->intsize_2or4 = 2;
		d->intsize_4or8 = 4;
	}

	// The PSD spec does not say what encoding these strings use.
	// Some sources say they use MacRoman, and *some* PSD files do use MacRoman.
	// But other PSD files use other encodings, and I don't know how to know what
	// encoding they use.
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_MACROMAN);

	d->jpeg_rbswap_mode = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xf2f73
movq -0x10(%rbp), %rax
movq $0x4, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x8, 0x20(%rax)
jmp 0xf2f8b
movq -0x10(%rbp), %rax
movq $0x2, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x4, 0x20(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x11, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x14(%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_image_resource_blocks
static void do_image_resource_blocks(deark *c, lctx *d, zztype *zz)
{
	zztype czz;

	while(1) {
		if(zz->pos>=zz->endpos) break;
		zz_init(&czz, zz);
		if(!do_image_resource(c, d, &czz)) break;
		zz->pos += zz_used(&czz);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0xf2fe7
jmp 0xf3024
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0xf3580
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xf3a10
cmpl $0x0, %eax
jne 0xf300c
jmp 0xf3024
leaq -0x30(%rbp), %rdi
callq 0xf3820
movq %rax, %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0xf2fd4
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x4, %rax
jge 0xf3060
jmp 0xf30a4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165540
movl %eax, -0x1c(%rbp)
cmpl $0x3842494d, -0x1c(%rbp) # imm = 0x3842494D
je 0xf3086
cmpl $0x38423634, -0x1c(%rbp) # imm = 0x38423634
jne 0xf3091
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xf7ce0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: zz_init_with_len
static void zz_init_with_len(zztype *zz, const zztype *parentzz, i64 len)
{
	i64 startpos, endpos;

	if(len<0) len=0;
	startpos = parentzz->pos;
	endpos = startpos + len;
	if(endpos > parentzz->endpos) endpos = parentzz->endpos;

	zz_init_absolute(zz, startpos, endpos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0xf33a3
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0xf33d4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf2f00
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_psd_color_mode_data
static void do_psd_color_mode_data(deark *c, lctx *d, zztype *zz)
{
	i64 len;
	i64 k;
	u8 r, g, b;
	struct image_info *iinfo = d->main_iinfo;

	len = zz_avail(zz);
	de_dbg(c, "color data at %d, len=%d", (int)zz->pos, (int)len);
	iinfo->pal_entries = len/3;
	if(iinfo->pal_entries<1) return;
	if(iinfo->pal_entries>256) iinfo->pal_entries=256;

	de_dbg_indent(c, 1);
	for(k=0; k<iinfo->pal_entries; k++) {
		r = de_getbyte(zz->pos + k);
		g = de_getbyte(zz->pos + iinfo->pal_entries + k);
		b = de_getbyte(zz->pos + 2*iinfo->pal_entries + k);
		iinfo->pal[k] = DE_MAKE_RGB(r, g, b);
		de_dbg_pal_entry(c, k, iinfo->pal[k]);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf40b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movl %eax, %ecx
leaq 0xccde5(%rip), %rsi     # 0x1c021c
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
movl $0x3, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x38(%rbp), %rax
cmpq $0x1, 0x40(%rax)
jge 0xf3467
jmp 0xf3570
movq -0x38(%rbp), %rax
cmpq $0x100, 0x40(%rax)      # imm = 0x100
jle 0xf3481
movq -0x38(%rbp), %rax
movq $0x100, 0x40(%rax)      # imm = 0x100
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jge 0xf3562
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq -0x28(%rbp), %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x38(%rbp), %rax
addq 0x40(%rax), %rsi
addq -0x28(%rbp), %rsi
callq 0x165060
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
shlq %rax
addq %rax, %rsi
addq -0x28(%rbp), %rsi
callq 0x165060
movb %al, -0x2b(%rbp)
movzbl -0x29(%rbp), %edx
shll $0x10, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movzbl -0x2a(%rbp), %eax
shll $0x8, %eax
orl %eax, %edx
movzbl -0x2b(%rbp), %eax
orl %eax, %edx
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movl %edx, 0x48(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
callq 0x15bf00
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xf3497
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)