LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/deark-ucstring.c
// Function: de_strarray_make_path
void de_strarray_make_path(struct de_strarray *sa, de_ucstring *path, unsigned int flags)
{
	size_t i;

	for(i=0; i<sa->count; i++) {
		i64 oldlen = path->len;

		if(ucstring_isnonempty(sa->ss[i])) {
			ucstring_append_ucstring(path, sa->ss[i]);
		}
		else {
			ucstring_append_char(path, '_');
		}

		mp_squash_slashes(path, oldlen);
		if((i+1 < sa->count) || !(flags & DE_MPFLAG_NOTRAILINGSLASH)) {
			ucstring_append_char(path, '/');
		}
	}
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0xf780a
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq 0x10(%r14), %r13
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rsi
testq %rsi, %rsi
je 0xf77af
cmpq $0x0, 0x10(%rsi)
jle 0xf77af
movq %r14, %rdi
callq 0xf6969
jmp 0xf77bc
movq %r14, %rdi
movl $0x5f, %esi
callq 0xf69a2
movq 0x10(%r14), %rax
cmpq %r13, %rax
jle 0xf77e0
movq 0x8(%r14), %rcx
cmpl $0x2f, (%rcx,%r13,4)
jne 0xf77d8
movl $0x5f, (%rcx,%r13,4)
incq %r13
cmpq %r13, %rax
jne 0xf77c9
incq %r12
testb $0x1, %bl
je 0xf77ee
cmpq 0x10(%r15), %r12
jae 0xf77fb
movq %r14, %rdi
movl $0x2f, %esi
callq 0xf69a2
cmpq 0x10(%r15), %r12
jb 0xf778d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_get_bmp_compression_name
void fmtutil_get_bmp_compression_name(u32 code, char *s, size_t s_len,
	int is_os2v2)
{
	const char *name1 = "?";
	switch(code) {
	case 0: name1 = "BI_RGB, uncompressed"; break;
	case 1: name1 = "BI_RLE8"; break;
	case 2: name1 = "BI_RLE4"; break;
	case 3:
		if(is_os2v2)
			name1 = "Huffman 1D";
		else
			name1 = "BI_BITFIELDS, uncompressed";
		break;
	case 4:
		if(is_os2v2)
			name1 = "RLE24";
		else
			name1 = "BI_JPEG";
		break;
	case 5: name1 = "BI_PNG"; break;
	}
	de_strlcpy(s, name1, s_len);
}

// Assembly:
movq %rsi, %rax
cmpl $0x5, %edi
ja 0xf7872
movl %edi, %esi
leaq 0x52253(%rip), %rdi     # 0x149a70
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
leaq 0x525a3(%rip), %rsi     # 0x149dd0
jmp 0xf7879
testl %ecx, %ecx
leaq 0x525e3(%rip), %rcx     # 0x149e1b
leaq 0x24aa9(%rip), %rsi     # 0x11c2e8
jmp 0xf785a
leaq 0x525a5(%rip), %rsi     # 0x149ded
jmp 0xf7879
testl %ecx, %ecx
leaq 0x525ad(%rip), %rcx     # 0x149e00
leaq 0x5259b(%rip), %rsi     # 0x149df5
cmoveq %rcx, %rsi
jmp 0xf7879
leaq 0x5257e(%rip), %rsi     # 0x149de5
jmp 0xf7879
leaq 0x525b3(%rip), %rsi     # 0x149e23
jmp 0xf7879
leaq 0x345f0(%rip), %rsi     # 0x12be69
movq %rax, %rdi
jmp 0xe8ded
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_generate_bmpfileheader
void fmtutil_generate_bmpfileheader(deark *c, dbuf *outf, const struct de_bmpinfo *bi,
	i64 file_size_override)
{
	i64 file_size_to_write;

	dbuf_write(outf, (const u8*)"BM", 2);

	if(file_size_override)
		file_size_to_write = file_size_override;
	else
		file_size_to_write = 14 + bi->total_size;
	dbuf_writeu32le(outf, file_size_to_write);

	dbuf_write_zeroes(outf, 4);
	dbuf_writeu32le(outf, 14 + bi->size_of_headers_and_pal);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x242a8(%rip), %rsi     # 0x11bffe
movl $0x2, %edx
movq %rbx, %rdi
callq 0xefb82
testq %r15, %r15
jne 0xf7d73
movq 0x90(%r14), %r15
addq $0xe, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf1645
movl $0x4, %esi
movq %rbx, %rdi
callq 0xf1346
movq 0x88(%r14), %rsi
addq $0xe, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf1645
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_exif2
void fmtutil_handle_exif2(deark *c, i64 pos, i64 len,
	u32 *returned_flags, u32 *orientation, u32 *exifversion)
{
	int user_opt;
	de_module_params *mparams = NULL;

	if(returned_flags) {
		*returned_flags = 0;
	}

	user_opt = de_get_ext_option_bool(c, "extractexif", -1);
	if(user_opt==1 || (c->extract_level>=2 && user_opt!=0)) {
		// Writing raw Exif data isn't very useful, but do so if requested.
		dbuf_create_file_from_slice(c->infile, pos, len, "exif.tif", NULL, DE_CREATEFLAG_IS_AUX);

		// Caller will have to reprocess the Exif file to extract anything from it.
		return;
	}

	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.codes = "E";

	de_run_module_by_id_on_slice(c, "tiff", mparams, c->infile, pos, len);
	if(returned_flags) {
		// FIXME: It's an unfortunate bug that returned_flags does not work if
		// extract_level>=2, but for now there's no reasonable way to fix it.
		// We have to process -- not extract -- the Exif chunk if we want to
		// know what's in it.
		*returned_flags = mparams->out_params.flags;
		if((mparams->out_params.flags & 0x20) && orientation) {
			*orientation = mparams->out_params.uint1;
		}

		if((mparams->out_params.flags & 0x40) && exifversion) {
			*exifversion = mparams->out_params.uint2;
		}
	}

	de_free(c, mparams);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
testq %rcx, %rcx
je 0xf7dcd
movl $0x0, (%r12)
leaq 0x520d2(%rip), %rsi     # 0x149ea6
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xea727
cmpl $0x1, %eax
je 0xf7df4
testl %eax, %eax
je 0xf7e21
cmpl $0x2, 0x90(%r14)
jl 0xf7e21
movq 0x18(%r14), %rdi
leaq 0x520b3(%rip), %rcx     # 0x149eb2
movq %rbp, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf0321
movq %rbx, (%rsp)
movl $0x70, %esi
movq %r14, %rdi
callq 0xe969b
movq %rax, %rbx
leaq 0x315f8(%rip), %rax     # 0x129434
movq %rax, (%rbx)
movq 0x18(%r14), %rcx
leaq 0x52096(%rip), %rsi     # 0x149ee0
movq %r14, %rdi
movq %rbx, %rdx
movq %rbp, %r8
movq %r13, %r9
callq 0xea5fa
testq %r12, %r12
je 0xf7e92
movl 0x40(%rbx), %eax
movl %eax, (%r12)
testq %r15, %r15
je 0xf7e7a
movl 0x40(%rbx), %eax
andl $0x20, %eax
je 0xf7e7a
movl 0x44(%rbx), %eax
movl %eax, (%r15)
cmpq $0x0, (%rsp)
je 0xf7e92
movl 0x40(%rbx), %eax
andl $0x40, %eax
je 0xf7e92
movl 0x48(%rbx), %eax
movq (%rsp), %rcx
movl %eax, (%rcx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_iptc
void fmtutil_handle_iptc(deark *c, dbuf *f, i64 pos, i64 len,
	unsigned int flags)
{
	int should_decode;
	int should_extract;
	int user_opt;
	int extract_fmt = 1; // 0=raw, 1=TIFF-wrapped

	if(len<1) return;

	user_opt = de_get_ext_option_bool(c, "extractiptc", -1);

	if(user_opt==1 || (c->extract_level>=2 && user_opt!=0)) {
		should_decode = 0;
		should_extract = 1;
		if(flags&0x2) {
			// Avoid "extracting" in a way that would just recreate the exact same file.
			extract_fmt = 0;
		}
	}
	else {
		should_decode = 1;
		should_extract = 0;
	}

	if(should_decode) {
		de_run_module_by_id_on_slice(c, "iptc", NULL, f, pos, len);
	}

	if(should_extract && extract_fmt==0) {
		dbuf_create_file_from_slice(f, pos, len, "iptc", NULL, DE_CREATEFLAG_IS_AUX);
	}
	else if(should_extract && extract_fmt==1) {
		wrap_in_tiff(c, f, pos, len, "Deark extracted IPTC", 33723, "iptctiff",
			DE_CREATEFLAG_IS_AUX);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
testq %rcx, %rcx
jle 0xf7fb2
movl %r8d, %ebp
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x51fd4(%rip), %rsi     # 0x149ebb
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xea727
cmpl $0x1, %eax
je 0xf7f14
xorl %r13d, %r13d
movb $0x1, %cl
testl %eax, %eax
je 0xf7fc1
cmpl $0x2, 0x90(%r12)
movl $0x0, %r14d
jl 0xf7f22
andl $0x2, %ebp
sete %cl
shrl %ebp
movb $0x1, %r13b
movl %ebp, %r14d
testb %r13b, %r13b
jne 0xf7f47
leaq 0x51f94(%rip), %rsi     # 0x149ec2
movq %r12, %rdi
xorl %edx, %edx
movl %ecx, %ebp
movq %r15, %rcx
movq 0x10(%rsp), %r8
movq %rbx, %r9
callq 0xea5fa
movl %ebp, %ecx
andb %r13b, %r14b
cmpb $0x1, %r14b
jne 0xf7f7e
leaq 0x51f6b(%rip), %rcx     # 0x149ec2
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf0321
andb %cl, %r13b
cmpb $0x1, %r13b
jne 0xf7fb2
leaq 0x51f4e(%rip), %rax     # 0x149edc
movq %rax, (%rsp)
leaq 0x51f2e(%rip), %r8      # 0x149ec7
movq %r12, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movl $0x83bb, %r9d           # imm = 0x83BB
callq 0xf7fc9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0xf7f22
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_handle_plist
void fmtutil_handle_plist(deark *c, dbuf *f, i64 pos, i64 len,
	de_finfo *fi, unsigned int flags)
{
	if(de_get_ext_option_bool(c, "extractplist", 0)) {
		dbuf_create_file_from_slice(f, pos, len,
			fi?NULL:"plist", fi, DE_CREATEFLAG_IS_AUX);
		return;
	}

	de_run_module_by_id_on_slice(c, "plist", NULL, f, pos, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x51b54(%rip), %rsi     # 0x149f03
xorl %edx, %edx
callq 0xea727
testl %eax, %eax
je 0xf83ea
xorl %ecx, %ecx
testq %r12, %r12
leaq 0x1e846(%rip), %rax     # 0x116c0c
cmoveq %rax, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
movl $0x1, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf0321
leaq 0x1e81b(%rip), %rsi     # 0x116c0c
movq %r13, %rdi
xorl %edx, %edx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xea5fa
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_detect_SAUCE
int fmtutil_detect_SAUCE(deark *c, dbuf *f, struct de_SAUCE_detection_data *sdd,
	unsigned int flags)
{
	de_zeromem(sdd, sizeof(struct de_SAUCE_detection_data));
	if(f->len<128) return 0;
	if(dbuf_memcmp(f, f->len-128, "SAUCE00", 7)) return 0;
	if(flags & 0x1) {
		de_dbg(c, "SAUCE metadata, signature at %"I64_FMT, f->len-128);
	}
	sdd->has_SAUCE = 1;
	sdd->data_type = dbuf_getbyte(f, f->len-128+94);
	sdd->file_type = dbuf_getbyte(f, f->len-128+95);
	return (int)sdd->has_SAUCE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movb $0x0, 0x2(%rdx)
movw $0x0, (%rdx)
movq 0x18(%rsi), %rsi
xorl %r12d, %r12d
cmpq $0x80, %rsi
jl 0xf84a1
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r15
addq $-0x80, %rsi
leaq 0x4a465(%rip), %rdx     # 0x1428a9
movl $0x7, %ecx
movq %r14, %rdi
callq 0xf025e
testl %eax, %eax
jne 0xf84a1
testb $0x1, %bpl
je 0xf8474
movq 0x18(%r14), %rdx
addq $-0x80, %rdx
leaq 0x51aa6(%rip), %rsi     # 0x149f10
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movb $0x1, (%rbx)
movq 0x18(%r14), %rsi
addq $-0x22, %rsi
movq %r14, %rdi
callq 0xef0d5
movb %al, 0x1(%rbx)
movq 0x18(%r14), %rsi
addq $-0x21, %rsi
movq %r14, %rdi
callq 0xef0d5
movb %al, 0x2(%rbx)
movzbl (%rbx), %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_free_SAUCE
void fmtutil_free_SAUCE(deark *c, struct de_SAUCE_info *si)
{
	if(!si) return;
	ucstring_destroy(si->title);
	ucstring_destroy(si->artist);
	ucstring_destroy(si->organization);
	ucstring_destroy(si->comment);
	de_free(c, si);
}

// Assembly:
testq %rsi, %rsi
je 0xf8543
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
callq 0xf6bb0
movq 0x10(%rbx), %rdi
callq 0xf6bb0
movq 0x18(%rbx), %rdi
callq 0xf6bb0
movq 0x60(%rbx), %rdi
callq 0xf6bb0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_guid_to_uuid
void fmtutil_guid_to_uuid(u8 *id)
{
	u8 tmp[16];
	de_memcpy(tmp, id, 16);
	id[0] = tmp[3]; id[1] = tmp[2]; id[2] = tmp[1]; id[3] = tmp[0];
	id[4] = tmp[5]; id[5] = tmp[4];
	id[6] = tmp[7]; id[7] = tmp[6];
}

// Assembly:
movb (%rdi), %al
movb 0x1(%rdi), %cl
movb 0x2(%rdi), %dl
movb 0x3(%rdi), %sil
movb 0x4(%rdi), %r8b
movb 0x5(%rdi), %r9b
movb 0x6(%rdi), %r10b
movb 0x7(%rdi), %r11b
movb %sil, (%rdi)
movb %dl, 0x1(%rdi)
movb %cl, 0x2(%rdi)
movb %al, 0x3(%rdi)
movb %r9b, 0x4(%rdi)
movb %r8b, 0x5(%rdi)
movb %r11b, 0x6(%rdi)
movb %r10b, 0x7(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_read_boxes_format
void fmtutil_read_boxes_format(deark *c, struct de_boxesctx *bctx)
{
	struct boxes_parser_data *pctx = NULL;

	if(!bctx->f || !bctx->handle_box_fn) return; // Internal error
	if(bctx->curbox) return; // Internal error

	pctx = de_malloc(c, sizeof(struct boxes_parser_data));
	bctx->private_data = (void*)pctx;
	do_box_sequence(c, bctx, 0, bctx->f->len, -1, 0);
	bctx->private_data = NULL;
	de_free(c, pctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x10(%rsi)
je 0xf8819
movq %rsi, %r14
cmpq $0x0, 0x20(%rsi)
je 0xf8819
cmpq $0x0, 0x28(%r14)
je 0xf881f
popq %rbx
popq %r14
popq %r15
retq
movq %rdi, %rbx
movl $0x82, %esi
callq 0xe969b
movq %rax, %r15
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rax
movq 0x18(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %r8
xorl %r9d, %r9d
callq 0xf886a
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_find_zip_eocd
int fmtutil_find_zip_eocd(deark *c, dbuf *f, UI flags, i64 *foundpos)
{
	u32 bof_sig;
	u32 sig;
	int skip_sanity_check = 0;
	u8 *buf = NULL;
	int retval = 0;
	i64 buf_offset;
	i64 buf_size;
	i64 pos;
	i64 i;

	*foundpos = 0;
	if(f->len < 22) goto done;

	bof_sig = (u32)dbuf_getu32be(f, 0);
	if(bof_sig==CODE_PK36) {
		skip_sanity_check = 1;
	}

	// End-of-central-dir record usually starts 22 bytes from EOF. Try that first.
	pos = f->len - 22;
	sig = (u32)dbuf_getu32be(f, pos);
	if(sig==CODE_PK56 && (skip_sanity_check || is_sane_zip_eocd(f, pos))) {
		*foundpos = pos;
		retval = 1;
		goto done;
	}

	if(flags & 0x1) goto done;

	// Search for the signature.
	// The end-of-central-directory record could theoretically appear anywhere
	// in the file. We'll follow Info-Zip/UnZip's lead and search the last 66000
	// bytes.
#define MAX_ZIP_EOCD_SEARCH 66000
	buf_size = f->len;
	if(buf_size > MAX_ZIP_EOCD_SEARCH) buf_size = MAX_ZIP_EOCD_SEARCH;

	buf = de_malloc(c, buf_size);
	buf_offset = f->len - buf_size;
	dbuf_read(f, buf, buf_offset, buf_size);

	for(i=buf_size-22; i>=0; i--) {
		if(buf[i]=='P' && buf[i+1]=='K' && buf[i+2]==5 && buf[i+3]==6 &&
			(skip_sanity_check || is_sane_zip_eocd(f, buf_offset+i)))
		{
			*foundpos = buf_offset + i;
			retval = 1;
			goto done;
		}
	}

done:
	de_free(c, buf);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $0x0, (%rcx)
cmpq $0x16, 0x18(%rsi)
jge 0xf9415
xorl %r15d, %r15d
xorl %ebp, %ebp
jmp 0xf9522
movq %rcx, %r14
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, (%rsp)
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
callq 0xef32a
movl %eax, %ebp
movq 0x18(%r12), %r13
addq $-0x16, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xef32a
cmpl $0x504b0506, %eax       # imm = 0x504B0506
jne 0xf9472
cmpl $0x504b0306, %ebp       # imm = 0x504B0306
je 0xf9462
movq %r12, %rdi
movq %r13, %rsi
callq 0xf953c
testl %eax, %eax
je 0xf9472
xorl %ebp, %ebp
movq %r13, (%r14)
movl $0x1, %r15d
jmp 0xf951e
testb $0x1, %bl
jne 0xf951c
movq %rbp, 0x8(%rsp)
movq 0x18(%r12), %rax
movq %rax, 0x10(%rsp)
movl $0x101d0, %ebx          # imm = 0x101D0
cmpq %rbx, %rax
cmovlq %rax, %rbx
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xe969b
movq %rax, %rbp
movq 0x18(%r12), %r13
movq %r13, %rdx
subq %rbx, %rdx
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0xeeee8
cmpq $0x16, 0x10(%rsp)
jl 0xf951e
addq $-0x16, %rbx
addq $-0x16, %r13
cmpb $0x50, (%rbp,%rbx)
jne 0xf950b
cmpb $0x4b, 0x1(%rbp,%rbx)
jne 0xf950b
cmpb $0x5, 0x2(%rbp,%rbx)
jne 0xf950b
cmpb $0x6, 0x3(%rbp,%rbx)
jne 0xf950b
cmpl $0x504b0306, 0x8(%rsp)  # imm = 0x504B0306
je 0xf9464
movq %r12, %rdi
movq %r13, %rsi
callq 0xf953c
testl %eax, %eax
jne 0xf9464
leaq -0x1(%rbx), %rax
decq %r13
testq %rbx, %rbx
movq %rax, %rbx
jg 0xf94ce
jmp 0xf951e
xorl %ebp, %ebp
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0xe9752
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: is_sane_zip_eocd
static int is_sane_zip_eocd(dbuf *f, i64 pos)
{
	i64 this_disk_num;
	i64 disk_num_with_central_dir_start;
	i64 central_dir_num_entries;
	i64 central_dir_byte_size;
	i64 central_dir_offset;

	// Validating Zip64 would take more work.
	if(dbuf_getu32be(f, pos-20) == CODE_PK67) return 1;

	this_disk_num = dbuf_getu16le(f, pos+4);
	disk_num_with_central_dir_start = dbuf_getu16le(f, pos+6);

	if(this_disk_num > 100) return 0;
	if(disk_num_with_central_dir_start > this_disk_num) return 0;
	if(disk_num_with_central_dir_start < this_disk_num-1) return 0;

	central_dir_num_entries = dbuf_getu16le(f, pos+10);
	central_dir_byte_size = dbuf_getu32le(f, pos+12);

	if(central_dir_byte_size < 46*central_dir_num_entries) return 0;

	if(this_disk_num==disk_num_with_central_dir_start) {
		if(central_dir_byte_size > f->len) return 0;
		central_dir_offset = dbuf_getu32le(f, pos+16);
		if(central_dir_offset > f->len) return 0;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $-0x14, %rsi
callq 0xef32a
movl $0x1, %ebp
cmpq $0x504b0607, %rax       # imm = 0x504B0607
je 0xf95ed
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
callq 0xef1ca
movq %rax, %r15
leaq 0x6(%r14), %rsi
movq %rbx, %rdi
callq 0xef1ca
movq %rax, %r12
cmpq $0x65, %r15
setge %al
cmpq %r15, %r12
setg %cl
orb %al, %cl
leaq -0x1(%r15), %rax
cmpq %rax, %r12
setl %al
xorl %ebp, %ebp
orb %cl, %al
jne 0xf95ed
leaq 0xa(%r14), %rsi
movq %rbx, %rdi
callq 0xef1ca
movq %rax, %r13
leaq 0xc(%r14), %rsi
movq %rbx, %rdi
callq 0xef37e
imulq $0x2e, %r13, %rcx
cmpq %rcx, %rax
jl 0xf95ed
cmpq %r12, %r15
jne 0xf95e8
cmpq 0x18(%rbx), %rax
jg 0xf95ed
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xef37e
cmpq 0x18(%rbx), %rax
jg 0xf95ed
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_riscos_read_load_exec
void fmtutil_riscos_read_load_exec(deark *c, dbuf *f, struct de_riscos_file_attrs *rfa, i64 pos1)
{
	i64 pos = pos1;

	rfa->load_addr = (u32)dbuf_getu32le_p(f, &pos);
	rfa->exec_addr = (u32)dbuf_getu32le_p(f, &pos);
	de_dbg(c, "load/exec addrs: 0x%08x, 0x%08x", (unsigned int)rfa->load_addr,
		(unsigned int)rfa->exec_addr);
	de_dbg_indent(c, 1);
	if((rfa->load_addr&0xfff00000U)==0xfff00000U) {
		rfa->file_type = (unsigned int)((rfa->load_addr&0xfff00)>>8);
		rfa->file_type_known = 1;
		de_dbg(c, "file type: %03X", rfa->file_type);

		de_riscos_loadexec_to_timestamp(rfa->load_addr, rfa->exec_addr, &rfa->mod_time);
		dbg_timestamp(c, &rfa->mod_time, "timestamp");
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %rcx, (%r12)
movq %rsi, %rdi
movq %r12, %rsi
callq 0xef3a0
movl %eax, 0x4(%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0xef3a0
movl %eax, 0x8(%r14)
movl 0x4(%r14), %edx
leaq 0x50a31(%rip), %rsi     # 0x14a203
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl 0x4(%r14), %edx
cmpl $0xfff00000, %edx       # imm = 0xFFF00000
jb 0xf985f
shrl $0x8, %edx
andl $0xfff, %edx            # imm = 0xFFF
movl %edx, 0x10(%r14)
movb $0x1, (%r14)
leaq 0x50a14(%rip), %rsi     # 0x14a223
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl 0x4(%r14), %edi
movl 0x8(%r14), %esi
addq $0x20, %r14
movq %r14, %rdx
callq 0xeb186
leaq 0x10(%rsp), %r15
movl $0x40, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0x4f59f(%rip), %rsi     # 0x148dea
leaq 0x4a1b1(%rip), %rdx     # 0x143a03
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_riscos_read_attribs_field
void fmtutil_riscos_read_attribs_field(deark *c, dbuf *f, struct de_riscos_file_attrs *rfa,
	i64 pos, unsigned int flags)
{
	rfa->attribs = (u32)dbuf_getu32le(f, pos);
	de_dbg(c, "attribs: 0x%08x", (unsigned int)rfa->attribs);
	de_dbg_indent(c, 1);
	rfa->crc_from_attribs = rfa->attribs>>16;
	if(flags & DE_RISCOS_FLAG_HAS_CRC) {
		de_dbg(c, "crc (reported): 0x%04x", (unsigned int)rfa->crc_from_attribs);
	}
	if(flags & DE_RISCOS_FLAG_HAS_LZWMAXBITS) {
		rfa->lzwmaxbits = (unsigned int)((rfa->attribs&0xff00)>>8);
		de_dbg(c, "lzw maxbits: %u", rfa->lzwmaxbits);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rcx, %rsi
callq 0xef37e
movl %eax, 0xc(%r14)
leaq 0x4b75e(%rip), %rsi     # 0x144ff9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl 0xc(%r14), %edx
shrl $0x10, %edx
movl %edx, 0x18(%r14)
testb $0x1, %bpl
je 0xf98d6
leaq 0x4b080(%rip), %rsi     # 0x14494c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
testb $0x2, %bpl
je 0xf98f6
movzbl 0xd(%r14), %edx
movl %edx, 0x14(%r14)
leaq 0x50947(%rip), %rsi     # 0x14a233
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_riscos_append_type_to_filename
void fmtutil_riscos_append_type_to_filename(deark *c, de_finfo *fi, de_ucstring *fn,
	struct de_riscos_file_attrs *rfa, int is_dir, int enabled_by_default)
{
	if(is_dir || !rfa->file_type_known) return;
	if(ucstring_isempty(fn)) return;

	// 0xff = Haven't looked for this opt
	// 0xfe = We looked, it's not there
	// 0 = Requested to be off
	// 1 = Requested to be on
	if(c->append_riscos_type==0xff) {
		c->append_riscos_type = (u8)de_get_ext_option_bool(c, "riscos:appendtype", 0xfe);
	}
	if(c->append_riscos_type==0) return;
	if(c->append_riscos_type==0xfe) {
		if(!enabled_by_default) return;
		if(!c->filenames_from_file) return;

		// By default, with ZIP output, we'll use extended fields instead of
		// mangling the filename.
		if(c->output_style==DE_OUTPUTSTYLE_ARCHIVE && c->archive_fmt==DE_ARCHIVEFMT_ZIP)
			return;
	}

	ucstring_printf(fn, DE_ENCODING_LATIN1, ",%03X", rfa->file_type);
	fi->riscos_appended_type = 1;
}

// Assembly:
testl %r8d, %r8d
je 0xf990d
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
cmpb $0x0, (%rcx)
je 0xf99b4
movl %r9d, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq %rdx, %rdi
callq 0xf6bea
testl %eax, %eax
jne 0xf99b4
cmpb $-0x1, 0xd4(%r12)
jne 0xf9960
leaq 0x508f8(%rip), %rsi     # 0x14a243
movq %r12, %rdi
movl $0xfe, %edx
callq 0xea727
movb %al, 0xd4(%r12)
movzbl 0xd4(%r12), %eax
testl %eax, %eax
je 0xf99b4
cmpl $0xfe, %eax
jne 0xf9996
testl %ebp, %ebp
je 0xf99b4
cmpb $0x0, 0xd0(%r12)
je 0xf99b4
cmpl $0x1, 0x7c(%r12)
jne 0xf9996
cmpl $0x1, 0x80(%r12)
je 0xf99b4
movl 0x10(%r15), %ecx
leaq 0x508b4(%rip), %rdx     # 0x14a255
movq %r14, %rdi
movl $0x5, %esi
xorl %eax, %eax
callq 0xf6ab0
movb $0x1, 0x11(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_macbitmap_read_baseaddr
void fmtutil_macbitmap_read_baseaddr(deark *c, dbuf *f, struct fmtutil_macbitmap_info *bi, i64 pos)
{
	i64 n;
	de_dbg(c, "baseAddr part of PixMap, at %d", (int)pos);
	de_dbg_indent(c, 1);
	n = dbuf_getu32be(f, pos);
	de_dbg(c, "baseAddr: 0x%08x", (unsigned int)n);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x50889(%rip), %rsi     # 0x14a25b
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq %r15, %rdi
movq %r14, %rsi
callq 0xef32a
leaq 0x5087f(%rip), %rsi     # 0x14a27a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_macbitmap_read_rowbytes_and_bounds
void fmtutil_macbitmap_read_rowbytes_and_bounds(deark *c, dbuf *f,
	struct fmtutil_macbitmap_info *bi, i64 pos)
{
	struct pict_rect tmprect;
	i64 rowbytes_code;

	de_dbg(c, "rowBytes/bounds part of bitmap/PixMap header, at %d", (int)pos);
	de_dbg_indent(c, 1);
	rowbytes_code = dbuf_getu16be(f, pos);
	bi->rowbytes = rowbytes_code & 0x7fff;
	bi->pixmap_flag = (rowbytes_code & 0x8000)?1:0;
	de_dbg(c, "rowBytes: %d", (int)bi->rowbytes);
	de_dbg(c, "pixmap flag: %d", bi->pixmap_flag);

	pict_read_rect(f, pos+2, &tmprect, "rect");
	bi->npwidth = tmprect.r - tmprect.l;
	bi->pdwidth = bi->npwidth; // default
	bi->height = tmprect.b - tmprect.t;

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x50851(%rip), %rsi     # 0x14a28b
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq %r15, %rdi
movq %r12, %rsi
callq 0xef169
movl %eax, %edx
andl $0x7fff, %edx           # imm = 0x7FFF
movq %rdx, (%rbx)
shrl $0xf, %eax
andl $0x1, %eax
movl %eax, 0x6c(%rbx)
leaq 0x3b10e(%rip), %rsi     # 0x134b85
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
movl 0x6c(%rbx), %edx
leaq 0x50834(%rip), %rsi     # 0x14a2bf
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
leaq 0x2(%r12), %rsi
movq %r15, %rdi
callq 0xef219
movq %rax, 0x10(%rsp)
leaq 0x4(%r12), %rsi
movq %r15, %rdi
callq 0xef219
movq %rax, %rbp
leaq 0x6(%r12), %rsi
movq %r15, %rdi
callq 0xef219
movq %rax, %r13
addq $0x8, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xef219
movq %rax, %r12
movq 0x8(%r15), %rdi
movl %r13d, (%rsp)
leaq 0x39a81(%rip), %rsi     # 0x133569
leaq 0x2f001(%rip), %rdx     # 0x128af0
movl %ebp, %ecx
movq 0x10(%rsp), %r15
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0xe9226
subq %rbp, %r12
movq %r12, 0x10(%rbx)
movq %r12, 0x18(%rbx)
subq %r15, %r13
movq %r13, 0x20(%rbx)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_cus_p
i64 fmtutil_hlp_get_cus_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = (i64)dbuf_getbyte_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two.
		return x1>>1;
	}
	// If it's odd, divide by two, and add 128 times the value of
	// the next byte.
	x2 = (i64)dbuf_getbyte_p(f, ppos);
	return (x1>>1) | (x2<<7);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xef14d
movzbl %al, %ebx
testb $0x1, %bl
jne 0xf9ee5
shrl %ebx
jmp 0xf9efa
movq %r15, %rdi
movq %r14, %rsi
callq 0xef14d
shrl %ebx
movzbl %al, %eax
shll $0x7, %eax
orl %eax, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_css_p
i64 fmtutil_hlp_get_css_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = (i64)dbuf_getbyte_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two, and subtract 64
		return (x1>>1) - 64;
	}
	// If it's odd, divide by two, add 128 times the value of
	// the next byte, and subtract 16384.
	x1 >>= 1;
	x2 = (i64)dbuf_getbyte_p(f, ppos);
	x1 += x2 * 128;
	x1 -= 16384;
	return x1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xef14d
movzbl %al, %eax
movl %eax, %ebx
shrl %ebx
testb $0x1, %al
jne 0xf9f24
addq $-0x40, %rbx
jmp 0xf9f3f
movq %r15, %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %eax
shll $0x7, %eax
addq %rax, %rbx
addq $-0x4000, %rbx          # imm = 0xC000
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_cul_p
i64 fmtutil_hlp_get_cul_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;
	x1 = dbuf_getu16le_p(f, ppos);
	if(x1%2 == 0) {
		// If it's even, divide by two.
		return x1>>1;
	}
	// If it's odd, divide by two, and add 32768 times the value of
	// the next two bytes.
	x2 = dbuf_getu16le_p(f, ppos);
	return (x1>>1) | (x2<<15);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xef1ed
movq %rax, %rbx
testb $0x1, %bl
jne 0xf9f65
sarq %rbx
jmp 0xf9f7a
movq %r15, %rdi
movq %r14, %rsi
callq 0xef1ed
sarq %rbx
shlq $0xf, %rax
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_hlp_get_csl_p
i64 fmtutil_hlp_get_csl_p(dbuf *f, i64 *ppos)
{
	i64 x1, x2;

	x1 = dbuf_getu16le_p(f, ppos);

	if(x1%2 == 0) {
		// If it's even, divide by two, and subtract 16384
		return (x1>>1) - 16384;
	}
	// If it's odd, divide by two, add 32768 times the value of
	// the next two bytes, and subtract 67108864.
	x1 >>= 1;
	x2 = dbuf_getu16le_p(f, ppos);
	x1 += x2*32768;
	x1 -= 67108864;
	return x1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xef1ed
movq %rax, %rbx
sarq %rbx
testb $0x1, %al
jne 0xf9fa6
addq $-0x4000, %rbx          # imm = 0xC000
jmp 0xf9fbf
movq %r15, %rdi
movq %r14, %rsi
callq 0xef1ed
shlq $0xf, %rax
addq %rax, %rbx
addq $-0x4000000, %rbx       # imm = 0xFC000000
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtutil_scan_for_arj_data
int fmtutil_scan_for_arj_data(dbuf *f, i64 startpos, i64 max_skip,
	UI flags, i64 *pfoundpos)
{
	struct de_crcobj *crco = NULL;
	i64 curpos, endpos;
	int retval = 0;

	curpos = startpos;
	endpos = startpos + max_skip + 2; // Search space includes the 2-byte signature
	if(endpos-2 > f->len-ARJ_MIN_FILE_SIZE) endpos = (f->len-ARJ_MIN_FILE_SIZE)+2;

	while(curpos<=(endpos-2)) {
		int ret;

		ret = dbuf_search(f, (const u8*)"\x60\xea", 2, curpos, endpos-curpos,
			pfoundpos);
		if(!ret) goto done;

		if(crco) {
			de_crcobj_reset(crco);
		}
		else {
			crco = de_crcobj_create(f->c, DE_CRCOBJ_CRC32_IEEE);
		}
		if(is_arj_data_at1(f, *pfoundpos, crco)) {
			retval = 1;
			goto done;
		}
		curpos = *pfoundpos+2; // Continue the search here
	}

done:
	de_crcobj_destroy(crco);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq (%rdx,%rsi), %rax
addq $0x2, %rax
addq %rsi, %rdx
movq 0x18(%rdi), %rsi
leaq -0x54(%rsi), %rcx
addq $-0x52, %rsi
cmpq %rcx, %rdx
cmovleq %rax, %rsi
movq %rsi, 0x8(%rsp)
leaq -0x2(%rsi), %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
movl $0x0, (%rsp)
cmpq 0x10(%rsp), %r15
jg 0xfa0ed
movq 0x8(%rsp), %r8
subq %r15, %r8
movl $0x2, %edx
movq %r14, %rdi
leaq 0x1de55(%rip), %rsi     # 0x117e8c
movq %r15, %rcx
movq %rbx, %r9
callq 0xf1a9c
testl %eax, %eax
je 0xfa0d8
testq %r12, %r12
je 0xfa059
movq %r12, %rdi
callq 0xebdc3
jmp 0xfa06a
movq 0x8(%r14), %rdi
movl $0x10, %esi
callq 0xeba56
movq %rax, %r12
movq (%rbx), %r13
leaq 0x2(%r13), %rsi
movq %r14, %rdi
callq 0xef1ca
movq %rax, %rbp
addq $-0xa29, %rax           # imm = 0xF5D7
cmpq $-0xa0b, %rax           # imm = 0xF5F5
jb 0xfa0dc
leaq 0xa(%r13), %rsi
movq %r14, %rdi
callq 0xef0d5
cmpb $0x2, %al
jne 0xfa0dc
leaq 0x4(%r13), %rdx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rcx
callq 0xebf09
movq %r12, %rdi
callq 0xebe2a
movl %eax, 0x4(%rsp)
leaq 0x4(,%r13), %rsi
addq %rbp, %rsi
movq %r14, %rdi
callq 0xef37e
cmpl %eax, 0x4(%rsp)
jne 0xfa0dc
movl $0x1, (%rsp)
xorl %eax, %eax
jmp 0xfa0e5
movq (%rbx), %r15
addq $0x2, %r15
movb $0x1, %al
testb %al, %al
jne 0xfa015
movq %r12, %rdi
callq 0xebe1d
movl (%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil.c
// Function: fmtid_is_dll
static int fmtid_is_dll(deark *c, struct fmtutil_fmtid_ctx *idctx)
{
	int retval = 0;
	dbuf *tmpf = NULL;
	struct fmtutil_exe_info *ei = NULL;

	if(!idctx->inf) goto done;
	if(de_getu32le_direct(&idctx->bof64bytes[60]) == 0) goto done;

	tmpf = dbuf_open_input_subfile(idctx->inf, idctx->inf_pos, idctx->inf_len);
	ei = de_malloc(c, sizeof(struct fmtutil_exe_info));
	fmtutil_collect_exe_info(c, tmpf, ei);
	if(ei->is_dll) {
		retval = 1;
	}

done:
	de_free(c, ei);
	dbuf_close(tmpf);
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0xfa67a
movq %rsi, %r14
leaq 0x64(%rsi), %rdi
callq 0xef37b
testq %rax, %rax
je 0xfa67a
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
callq 0xf1988
movq %rax, %r14
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1053ee
xorl %r15d, %r15d
cmpb $0x0, 0x63(%r12)
setne %r15b
jmp 0xfa683
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe9752
movq %r14, %rdi
callq 0xf0b13
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_results_clear
void de_dfilter_results_clear(deark *c, struct de_dfilter_results *dres)
{
	dres->errcode = 0;
	dres->bytes_consumed_valid = 0;
	dres->bytes_consumed = 0;
	dres->errmsg[0] = '\0';
}

// Assembly:
movl $0x0, (%rsi)
xorl %eax, %eax
movb %al, 0x4(%rsi)
movq $0x0, 0x8(%rsi)
movb %al, 0x10(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_init_objects
void de_dfilter_init_objects(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	if(dcmpri)
		de_zeromem(dcmpri, sizeof(struct de_dfilter_in_params));
	if(dcmpro)
		de_zeromem(dcmpro, sizeof(struct de_dfilter_out_params));
	if(dres)
		de_dfilter_results_clear(c, dres);
}

// Assembly:
testq %rsi, %rsi
je 0xfa6ef
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
testq %rdx, %rdx
je 0xfa702
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
testq %rcx, %rcx
je 0xfa71d
movl $0x0, (%rcx)
xorl %eax, %eax
movb %al, 0x4(%rcx)
movq $0x0, 0x8(%rcx)
movb %al, 0x10(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_set_errorf
void de_dfilter_set_errorf(deark *c, struct de_dfilter_results *dres, const char *modname,
	const char *fmt, ...)
{
	va_list ap;

	if(dres->errcode != 0) return; // Only record the first error
	dres->errcode = 1;

	va_start(ap, fmt);
	if(modname) {
		char tmpbuf[80];

		de_vsnprintf(tmpbuf, sizeof(tmpbuf), fmt, ap);
		de_snprintf(dres->errmsg, sizeof(dres->errmsg), "[%s] %s", modname, tmpbuf);
	}
	else {
		de_vsnprintf(dres->errmsg, sizeof(dres->errmsg), fmt, ap);
	}
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xfa76f
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x0, (%rsi)
jne 0xfa808
movq %rdx, %r14
movq %rsi, %rbx
movl $0x1, (%rsi)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rsp)
testq %rdx, %rdx
je 0xfa7ee
leaq 0xd0(%rsp), %r15
movq %rsp, %rax
movl $0x50, %esi
movq %r15, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109878
addq $0x10, %rbx
leaq 0x41f3b(%rip), %rdx     # 0x13c712
movl $0x50, %esi
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0xe8d67
jmp 0xfa808
addq $0x10, %rbx
movq %rsp, %rax
movl $0x50, %esi
movq %rbx, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x109878
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_create
struct de_dfilter_ctx *de_dfilter_create(deark *c,
	dfilter_codec_type codec_init_fn, void *codec_private_params,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dfilter_ctx *dfctx = NULL;

	dfctx = de_malloc(c, sizeof(struct de_dfilter_ctx));
	dfctx->c = c;
	dfctx->dres = dres;
	dfctx->dcmpro = dcmpro;

	if(codec_init_fn) {
		codec_init_fn(dfctx, codec_private_params);
	}
	// TODO: How should we handle failure to initialize a codec?

	return dfctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rbp
movl $0x50, %esi
callq 0xe969b
movq %rax, %r15
movq %rbp, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
testq %rbx, %rbx
je 0xfa868
movq %r15, %rdi
movq %r14, %rsi
callq *%rbx
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_addbuf
void de_dfilter_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	if(dfctx->finished_flag) return;

	if(dfctx->codec_addbuf_fn && (buf_len>0)) {
		dfctx->codec_addbuf_fn(dfctx, buf, buf_len);

		if(dfctx->dres->errcode) {
			dfctx->finished_flag = 1;
		}
	}
}

// Assembly:
cmpb $0x0, 0x20(%rdi)
je 0xfa881
retq
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
sete %cl
testq %rdx, %rdx
setle %dil
orb %cl, %dil
jne 0xfa8ad
movq %rbx, %rdi
callq *%rax
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
je 0xfa8ad
movb $0x1, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_destroy
void de_dfilter_destroy(struct de_dfilter_ctx *dfctx)
{
	deark *c;

	if(!dfctx) return;
	c = dfctx->c;
	if(dfctx->codec_destroy_fn) {
		dfctx->codec_destroy_fn(dfctx);
	}

	de_free(c, dfctx);
}

// Assembly:
testq %rdi, %rdi
je 0xfa907
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0xfa8f5
movq %rbx, %rdi
callq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_dfilter_addslice_buffered_read_cbfn
static int my_dfilter_addslice_buffered_read_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct de_dfilter_ctx *dfctx = (struct de_dfilter_ctx *)brctx->userdata;

	de_dfilter_addbuf(dfctx, buf, buf_len);
	if(dfctx->finished_flag) return 0;
	return 1;
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
cmpb $0x0, 0x20(%rbx)
jne 0xfa95c
movq 0x30(%rbx), %rax
testq %rax, %rax
sete %cl
testq %rdx, %rdx
setle %dil
orb %cl, %dil
jne 0xfa95c
movq %rbx, %rdi
callq *%rax
movq 0x8(%rbx), %rax
cmpl $0x0, (%rax)
je 0xfa95c
movb $0x1, 0x20(%rbx)
xorl %eax, %eax
cmpb $0x0, 0x20(%rbx)
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_dfilter_decompress_oneshot
void de_dfilter_decompress_oneshot(deark *c,
	dfilter_codec_type codec_init_fn, void *codec_private_params,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	struct de_dfilter_ctx *dfctx = NULL;

	dfctx = de_dfilter_create(c, codec_init_fn, codec_private_params,
		dcmpro, dres);
	dfctx->input_file_offset = dcmpri->pos;
	de_dfilter_addslice(dfctx, dcmpri->f, dcmpri->pos, dcmpri->len);
	de_dfilter_finish(dfctx);
	de_dfilter_destroy(dfctx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %r12
movl $0x50, %esi
callq 0xe969b
movq %rax, %rbx
movq %r12, (%rax)
movq %r13, 0x8(%rax)
movq %rbp, 0x10(%rax)
testq %r15, %r15
je 0xfa9ac
movq %rbx, %rdi
movq (%rsp), %rsi
callq *%r15
movq 0x8(%r14), %rsi
movq %rsi, 0x18(%rbx)
cmpb $0x0, 0x20(%rbx)
jne 0xfa9d0
movq (%r14), %rdi
movq 0x10(%r14), %rdx
leaq -0x9e(%rip), %rcx       # 0xfa92a
movq %rbx, %r8
callq 0xefc28
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0xfa9de
movq %rbx, %rdi
callq *%rax
movq (%rbx), %r14
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0xfa9ef
movq %rbx, %rdi
callq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: fmtutil_decompress_uncompressed
void fmtutil_decompress_uncompressed(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres, UI flags)
{
	i64 len;
	i64 nbytes_avail;

	nbytes_avail = de_min_int(dcmpri->len, dcmpri->f->len - dcmpri->pos);

	if(dcmpro->len_known) {
		len = dcmpro->expected_len;
	}
	else {
		len = dcmpri->len;
	}

	if(len>nbytes_avail) len = nbytes_avail;
	if(len<0) len = 0;

	dbuf_copy(dcmpri->f, dcmpri->pos, len, dcmpro->f);
	dres->bytes_consumed = len;
	dres->bytes_consumed_valid = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rsi), %rax
movq 0x10(%rsi), %rdi
movq 0x18(%rax), %rsi
subq 0x8(%r15), %rsi
callq 0xea792
cmpb $0x0, 0x8(%r14)
movq %r14, %rcx
cmoveq %r15, %rcx
movq 0x10(%rcx), %rcx
cmpq %rax, %rcx
cmovlq %rcx, %rax
xorl %r12d, %r12d
testq %rax, %rax
cmovgq %rax, %r12
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq (%r14), %rcx
movq %r12, %rdx
callq 0xefabc
movq %r12, 0x8(%rbx)
movb $0x1, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: dfilter_packbits_codec
void dfilter_packbits_codec(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct packbitsctx *rctx = NULL;
	struct de_packbits_params *pbparams = (struct de_packbits_params*)codec_private_params;

	rctx = de_malloc(dfctx->c, sizeof(struct packbitsctx));
	rctx->modname = "packbits";

	dfctx->codec_private = (void*)rctx;
	dfctx->codec_addbuf_fn = my_packbits_codec_addbuf;
	dfctx->codec_finish_fn = my_packbits_codec_finish;
	dfctx->codec_command_fn = my_packbits_codec_command;
	dfctx->codec_destroy_fn = my_packbits_codec_destroy;

	rctx->nbytes_per_unit = 1;
	if(pbparams) {
		if(pbparams->nbytes_per_unit>DE_PACKBITS_MAX_NBYTES_PER_UNIT) {
			de_dfilter_set_generic_error(dfctx->c, dfctx->dres, rctx->modname);
		}
		else if(pbparams->nbytes_per_unit>1) {
			rctx->nbytes_per_unit = pbparams->nbytes_per_unit;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x48, %esi
callq 0xe969b
leaq 0x4faa9(%rip), %rcx     # 0x14a53b
movq %rcx, 0x40(%rax)
movq %rax, 0x28(%rbx)
leaq 0x6f(%rip), %rcx        # 0xfab10
movq %rcx, 0x30(%rbx)
leaq 0x1eb(%rip), %rcx       # 0xfac97
movq %rcx, 0x40(%rbx)
leaq 0x1fa(%rip), %rcx       # 0xfacb1
movq %rcx, 0x38(%rbx)
leaq 0x21e(%rip), %rcx       # 0xface0
movq %rcx, 0x48(%rbx)
movq $0x1, (%rax)
testq %r14, %r14
je 0xfab08
movl (%r14), %ecx
cmpq $0x9, %rcx
jb 0xfab00
movq 0x8(%rbx), %rsi
cmpl $0x0, (%rsi)
jne 0xfab08
leaq 0x4fa50(%rip), %rdx     # 0x14a53b
leaq 0x4fa37(%rip), %rcx     # 0x14a529
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfa71e
cmpl $0x2, %ecx
jb 0xfab08
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_packbits_codec_finish
static void my_packbits_codec_finish(struct de_dfilter_ctx *dfctx)
{
	struct packbitsctx *rctx = (struct packbitsctx*)dfctx->codec_private;

	if(!rctx) return;
	dfctx->dres->bytes_consumed = rctx->total_nbytes_processed;
	dfctx->dres->bytes_consumed_valid = 1;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xfacb0
movq 0x18(%rax), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x8(%rcx)
movb $0x1, 0x4(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_packbits_codec_destroy
static void my_packbits_codec_destroy(struct de_dfilter_ctx *dfctx)
{
	struct packbitsctx *rctx = (struct packbitsctx*)dfctx->codec_private;

	if(rctx) {
		de_free(dfctx->c, rctx);
	}
	dfctx->codec_private = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0xfacf5
movq (%rbx), %rdi
callq 0xe9752
movq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: fmtutil_decompress_packbits
int fmtutil_decompress_packbits(dbuf *f, i64 pos1, i64 len,
	dbuf *unc_pixels, i64 *cmpr_bytes_consumed)
{
	struct de_dfilter_results dres;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;

	if(cmpr_bytes_consumed) *cmpr_bytes_consumed = 0;
	de_dfilter_init_objects(f->c, &dcmpri, &dcmpro, &dres);

	dcmpri.f = f;
	dcmpri.pos = pos1;
	dcmpri.len = len;
	dcmpro.f = unc_pixels;
	if(unc_pixels->has_len_limit) {
		dcmpro.len_known = 1;
		dbuf_flush(unc_pixels);
		dcmpro.expected_len = unc_pixels->len_limit - unc_pixels->len;
	}

	de_dfilter_decompress_oneshot(f->c, dfilter_packbits_codec, NULL,
		&dcmpri, &dcmpro, &dres);

	if(cmpr_bytes_consumed && dres.bytes_consumed_valid) {
		*cmpr_bytes_consumed = dres.bytes_consumed;
	}
	if(dres.errcode != 0) return 0;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
testq %r8, %r8
je 0xfad3b
movq $0x0, (%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, (%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movl $0x0, 0x40(%rsp)
movb %al, 0x44(%rsp)
movq %rax, 0x48(%rsp)
movb %al, 0x50(%rsp)
movq %r14, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %r15, (%rsp)
cmpl $0x0, 0x30(%r15)
je 0xfad9c
movb $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0xf0ea4
movq 0x28(%r15), %rax
subq 0x18(%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rdi
leaq -0x333(%rip), %rsi      # 0xfaa74
leaq 0x20(%rsp), %rcx
movq %rsp, %r8
leaq 0x40(%rsp), %r9
xorl %edx, %edx
callq 0xfa967
testq %rbx, %rbx
je 0xfadcf
cmpb $0x0, 0x44(%rsp)
je 0xfadcf
movq 0x48(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
cmpl $0x0, 0x40(%rsp)
sete %al
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: dfilter_rle90_codec
void dfilter_rle90_codec(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct rle90ctx *rctx = NULL;

	rctx = de_malloc(dfctx->c, sizeof(struct rle90ctx));
	dfctx->codec_private = (void*)rctx;
	dfctx->codec_addbuf_fn = my_rle90_codec_addbuf;
	dfctx->codec_finish_fn = my_rle90_codec_finish;
	dfctx->codec_destroy_fn = my_rle90_codec_destroy;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x18, %esi
callq 0xe969b
movq %rax, 0x28(%rbx)
leaq 0x1c(%rip), %rax        # 0xfae35
movq %rax, 0x30(%rbx)
leaq 0x11a(%rip), %rax       # 0xfaf3e
movq %rax, 0x40(%rbx)
leaq 0x128(%rip), %rax       # 0xfaf57
movq %rax, 0x48(%rbx)
popq %rbx
retq