LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcf.c
// Function: process_table_by_type
static int process_table_by_type(deark *c, lctx *d, u32 tbltype)
{
	i64 k;
	struct table_entry *te;

	for(k=0; k<d->table_count; k++) {
		te = &d->tables[k];
		if(te->type == tbltype) {
			if(te->handler_fn) {
				te->handler_fn(c, d, te);
			}
			return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbx
movq (%rsi), %rcx
xorl %ebx, %ebx
testq %rcx, %rcx
cmovleq %rbx, %rcx
incq %rcx
pushq $-0x48
popq %r8
decq %rcx
je 0xb83ec
leaq 0x48(%r8), %r9
movq 0x8(%rsi), %rax
cmpl %edx, 0x68(%rax,%r8)
movq %r9, %r8
jne 0xb83c0
movq 0x40(%rax,%r9), %rcx
pushq $0x1
popq %rbx
testq %rcx, %rcx
je 0xb83ec
addq %r9, %rax
movq %rax, %rdx
callq *%rcx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pcf.c
// Function: read_and_check_format_field
static int read_and_check_format_field(deark *c, lctx *d, struct table_entry *te, i64 pos)
{
	u32 format;

	format = (u32)de_getu32le_p(&pos);
	de_dbg(c, "format: 0x%08x", (unsigned int)format);
	if(format != te->fmt.raw_format) {
		de_err(c, "Can't handle conflicting \"format\" fields");
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movq %rdx, (%rsi)
movq 0x18(%rdi), %rdi
callq 0xe40bf
movq %rax, %r15
leaq 0x7397b(%rip), %rsi     # 0x12c902
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpl %r15d, (%r14)
jne 0xb8fa0
pushq $0x1
popq %rbp
jmp 0xb8fb1
leaq 0x7396a(%rip), %rsi     # 0x12c911
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/plist.c
// Function: de_module_plist
void de_module_plist(deark *c, struct deark_module_info *mi)
{
	mi->id = "plist";
	mi->desc = ".plist property list, binary format";
	mi->run_fn = de_run_plist;
	mi->identify_fn = de_identify_plist;
}

// Assembly:
leaq 0x50c09(%rip), %rax     # 0x109c2c
movq %rax, (%rsi)
leaq 0x73d13(%rip), %rax     # 0x12cd40
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb9048
movq %rax, 0x18(%rsi)
leaq 0x30d(%rip), %rax       # 0xb9350
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/plist.c
// Function: do_object_array_or_set
static void do_object_array_or_set(deark *c, lctx *d, const char *tn,
	i64 objpos, i64 pos1, i64 numitems)
{
	i64 k;
	i64 pos = pos1;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	d->nesting_level++;
	if(d->nesting_level>MAX_PLIST_NESTING_LEVEL) {
		report_nesting_level_exceeded(c, d);
		goto done;
	}

	for(k=0; k<numitems; k++) {
		i64 refnum;

		if(d->exceeded_max_objects) goto done;
		de_dbg(c, "item[%d] (for %s@%"I64_FMT")", (int)k, tn, objpos);
		de_dbg_indent(c, 1);

		refnum = dbuf_getint_ext(c->infile, pos, d->nbytes_per_object_refnum, 0, 0);
		pos += (i64)d->nbytes_per_object_refnum;

		de_dbg(c, "refnum: %u", (unsigned int)refnum);
		if(!do_one_object_by_refnum(c, d, refnum)) goto done;

		de_dbg_indent(c, -1);
	}

done:
	d->nesting_level--;
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbp
movq %r8, %r12
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
callq 0xdebae
movl (%r14), %eax
leal 0x1(%rax), %ecx
movq %r14, (%rsp)
movl %ecx, (%r14)
cmpl $0x9, %eax
jle 0xb9a27
leaq 0x735aa(%rip), %rsi     # 0x12cfa6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq (%rsp), %rax
decl (%rax)
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testq %rbp, %rbp
cmovleq %rax, %rbp
xorl %r14d, %r14d
movq (%rsp), %r13
cmpq %r14, %rbp
je 0xb9a06
movq (%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xb9a06
movq %rbx, %rdi
leaq 0x73540(%rip), %rsi     # 0x12cf90
movl %r14d, %edx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rbx), %rdi
movl 0x14(%r13), %edx
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xe424b
movq %r14, 0x20(%rsp)
movq %r12, %r14
movq %rbp, %r12
movq %rax, %rbp
movl 0x14(%r13), %r15d
movq %rbx, %rdi
leaq 0x7335d(%rip), %rsi     # 0x12cdfd
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rbp
movq %r14, %r12
movq 0x20(%rsp), %r14
callq 0xb9372
testl %eax, %eax
je 0xb9a06
addq %r15, %r12
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %r14
jmp 0xb9a37
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/qtif.c
// Function: de_module_qtif
void de_module_qtif(deark *c, struct deark_module_info *mi)
{
	mi->id = "qtif";
	mi->desc = "QTIF (QuickTime Image Format)";
	mi->run_fn = de_run_qtif;
	mi->identify_fn = de_identify_qtif;
}

// Assembly:
leaq 0x703ed(%rip), %rax     # 0x129ed4
movq %rax, (%rsi)
leaq 0x73511(%rip), %rax     # 0x12d002
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb9b0c
movq %rax, 0x18(%rsi)
leaq 0x11a(%rip), %rax       # 0xb9c21
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/qtif.c
// Function: de_run_qtif
static void de_run_qtif(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

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

	if(mparams) {
		if(mparams->in_params.flags & 0x1) {
			d->fail_gracefully_mode = 1;
		}
	}

	if(de_havemodcode(c, mparams, 'I')) {
		// Raw data from a PICT file
		do_raw_idsc_data(c, d);
	}
	else {
		do_qtif_file_format(c, d);
	}

	if(mparams && d->decoded_ok) {
		mparams->out_params.flags |= 0x1;
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x90, %esi
callq 0xdecaf
movq %rax, %r15
testq %r14, %r14
je 0xb9b37
testb $0x1, 0x8(%r14)
je 0xb9b37
movb $0x1, (%r15)
pushq $0x49
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdfcf4
testl %eax, %eax
je 0xb9baf
leaq 0x734d0(%rip), %rsi     # 0x12d020
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xb9c6c
movl %eax, %ebp
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
testl %ebp, %ebp
je 0xb9bfd
movq 0x20(%r15), %rax
movq %rax, 0x8(%r15)
movq 0x18(%rbx), %rcx
movq 0x18(%rcx), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb9dea
jmp 0xb9bfd
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r12
movq %r15, (%rax)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r12)
leaq 0x4cc(%rip), %rax       # 0xba09c
movq %rax, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xeca38
cmpl $0x0, 0x4(%r15)
je 0xb9bf2
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb9dea
movq %rbx, %rdi
movq %r12, %rsi
callq 0xded32
testq %r14, %r14
je 0xb9c0e
cmpb $0x0, 0x1(%r15)
je 0xb9c0e
orb $0x1, 0x40(%r14)
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/qtif.c
// Function: do_read_idsc
static int do_read_idsc(deark *c, lctx *d, i64 pos, i64 len)
{
	int retval = 0;

	if(len<8) goto done;

	d->idsc_found = 1;

	d->idsc_size = de_getu32be(pos);
	de_dbg(c, "idsc size: %d", (int)d->idsc_size);

	dbuf_read_fourcc(c->infile, pos+4, &d->cmpr4cc, 4, 0x0);
	de_dbg(c, "compression type: \"%s\"", d->cmpr4cc.id_dbgstr);

	if(len<86) goto done;
	if(d->idsc_size<86) goto done;

	d->width = de_getu16be(pos+32);
	d->height = de_getu16be(pos+34);
	d->hres = dbuf_fmtutil_read_fixed_16_16(c->infile, pos+36);
	d->vres = dbuf_fmtutil_read_fixed_16_16(c->infile, pos+40);
	de_dbg(c, "dpi: %.2f"DE_CHAR_TIMES"%.2f", d->hres, d->vres);
	d->idat_data_size = de_getu32be(pos+44);
	de_dbg(c, "reported data size: %d", (int)d->idat_data_size);
	if(d->idat_data_size>c->infile->len) d->idat_data_size=0;
	d->bitdepth = de_getu16be(pos+82);
	d->palette_id = de_getu16be(pos+84);
	de_dbg(c, "dimensions: %d"DE_CHAR_TIMES"%d, bitdepth: %d, palette: %d", (int)d->width,
		(int)d->height, (int)d->bitdepth, (int)d->palette_id);
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
cmpq $0x8, %rcx
jl 0xb9ddf
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, 0x18(%rsi)
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xe404f
movq %rax, 0x20(%r14)
leaq 0x7338c(%rip), %rsi     # 0x12d036
xorl %ebp, %ebp
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x4(%r15), %rsi
leaq 0x30(%r14), %rdx
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
leaq 0x40(%r14), %rdx
leaq 0x733e1(%rip), %rsi     # 0x12d0bb
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpq $0x56, %r12
jb 0xb9ddf
cmpq $0x56, 0x20(%r14)
jl 0xb9ddf
movq 0x18(%rbx), %rdi
leaq 0x20(%r15), %rsi
callq 0xe3f46
movq %rax, 0x60(%r14)
movq 0x18(%rbx), %rdi
leaq 0x22(%r15), %rsi
callq 0xe3f46
movq %rax, 0x68(%r14)
movq 0x18(%rbx), %rdi
leaq 0x24(%r15), %rsi
callq 0xec7b0
movsd %xmm0, 0x80(%r14)
movq 0x18(%rbx), %rdi
leaq 0x28(%r15), %rsi
callq 0xec7b0
movaps %xmm0, %xmm1
movsd %xmm0, 0x88(%r14)
movsd 0x80(%r14), %xmm0
leaq 0x700e2(%rip), %rsi     # 0x129e3c
movq %rbx, %rdi
movb $0x2, %al
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x2c(%r15), %rsi
callq 0xe404f
movq %rax, 0x28(%r14)
leaq 0x732c8(%rip), %rsi     # 0x12d044
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x28(%r14), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jle 0xb9d9b
andq $0x0, 0x28(%r14)
leaq 0x52(%r15), %rsi
callq 0xe3f46
movq %rax, 0x70(%r14)
movq 0x18(%rbx), %rdi
addq $0x54, %r15
movq %r15, %rsi
callq 0xe3f46
movq %rax, 0x78(%r14)
movl 0x60(%r14), %edx
movl 0x68(%r14), %ecx
movl 0x70(%r14), %r8d
leaq 0x7328c(%rip), %rsi     # 0x12d05b
movq %rbx, %rdi
movl %eax, %r9d
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/qtif.c
// Function: quicktime_box_handler
static int quicktime_box_handler(deark *c, struct de_boxesctx *bctx)
{
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->boxtype==BOX_idat) {
		d->idat_found = 1;
		d->idat_pos = curbox->payload_pos;
		d->idat_size = curbox->payload_len;
	}
	else if(curbox->boxtype==BOX_idsc) {
		do_read_idsc(c, d, curbox->payload_pos, curbox->payload_len);
	}
	else if(curbox->is_uuid) {
		return fmtutil_default_box_handler(c, bctx);
	}

	return 1;
}

// Assembly:
movq %rsi, %rax
movq (%rsi), %rsi
movq 0x28(%rax), %rcx
movl 0xc(%rcx), %edx
cmpl $0x69647363, %edx       # imm = 0x69647363
je 0xba0ca
cmpl $0x69646174, %edx       # imm = 0x69646174
jne 0xba0de
movl $0x1, 0x4(%rsi)
movups 0x38(%rcx), %xmm0
movups %xmm0, 0x8(%rsi)
jmp 0xba0ec
pushq %rax
movq 0x38(%rcx), %rdx
movq 0x40(%rcx), %rcx
callq 0xb9c6c
addq $0x8, %rsp
jmp 0xba0ec
cmpl $0x0, 0x10(%rcx)
je 0xba0ec
movq %rax, %rsi
jmp 0xec8a2
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: de_module_riff
void de_module_riff(deark *c, struct deark_module_info *mi)
{
	mi->id = "riff";
	mi->desc = "RIFF-based formats";
	mi->run_fn = de_run_riff;
	mi->identify_fn = de_identify_riff;
}

// Assembly:
leaq 0x7300c(%rip), %rax     # 0x12d103
movq %rax, (%rsi)
leaq 0x73007(%rip), %rax     # 0x12d108
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xba11c
movq %rax, 0x18(%rsi)
leaq 0x10f(%rip), %rax       # 0xba226
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: de_run_riff
static void de_run_riff(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;
	u8 buf[4];

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

	ictx = fmtutil_create_iff_decoder(c);
	ictx->userdata = (void*)d;
	ictx->preprocess_chunk_fn = my_preprocess_riff_chunk_fn;
	ictx->handle_chunk_fn = my_riff_chunk_handler;
	ictx->on_std_container_start_fn = my_on_std_container_start_fn;
	ictx->on_container_end_fn = my_on_container_end_fn;
	ictx->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);
	ictx->f = c->infile;

	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "RIFF", 4)) {
		ictx->is_le = 1;
		ictx->reversed_4cc = 0;
	}
	else if(!de_memcmp(buf, "RIFX", 4)) {
		ictx->is_le = 0;
		ictx->reversed_4cc = 0;
	}
	else if(!de_memcmp(buf, "XFIR", 4)) {
		ictx->is_le = 1;
		ictx->reversed_4cc = 1;
	}
	else {
		de_warn(c, "This is probably not a RIFF file.");
		ictx->is_le = 1;
		ictx->reversed_4cc = 0;
	}

	fmtutil_read_iff_format(ictx, 0, ictx->f->len);

	fmtutil_destroy_iff_decoder(ictx);
	if(d) {
		ucstring_destroy(d->INAM_data);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movq %r14, 0x10(%rax)
leaq 0x140(%rip), %rax       # 0xba28b
movq %rax, 0x28(%r15)
leaq 0x1cd(%rip), %rax       # 0xba323
movq %rax, 0x20(%r15)
leaq 0xa0b(%rip), %rax       # 0xbab6c
movq %rax, 0x30(%r15)
leaq 0xbe4(%rip), %rax       # 0xbad50
movq %rax, 0x38(%r15)
xorl %r13d, %r13d
pushq $0x9
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, 0x60(%r15)
movq 0x18(%rbx), %rdi
movq %rdi, 0x18(%r15)
leaq 0x4(%rsp), %r12
pushq $0x4
popq %rcx
movq %r12, %rsi
xorl %edx, %edx
callq 0xe3cb7
pushq $0x1
popq %rbp
cmpl $0x46464952, (%r12)     # imm = 0x46464952
je 0xba1dc
cmpl $0x58464952, 0x4(%rsp)  # imm = 0x58464952
je 0xba1d5
cmpl $0x52494658, 0x4(%rsp)  # imm = 0x52494658
je 0xba1d9
leaq 0x72f5f(%rip), %rsi     # 0x12d125
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf05a
jmp 0xba1dc
xorl %ebp, %ebp
jmp 0xba1dc
movb $0x1, %r13b
movl %ebp, 0x58(%r15)
movb %r13b, 0x5c(%r15)
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xface4
movq %r15, %rdi
callq 0xfacd3
testq %r14, %r14
je 0xba217
movq 0x18(%r14), %rdi
callq 0xeaf3c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: de_identify_riff
static int de_identify_riff(deark *c)
{
	u8 buf[4];
	int has_sig;
	i64 dlen;

	de_read(buf, 0, 4);
	has_sig = (!de_memcmp(buf, "RIFF", 4)) ||
		(!de_memcmp(buf, "XFIR", 4)) ||
		(!de_memcmp(buf, "RIFX", 4));
	if(!has_sig) return 0;

	dlen = de_getu32le(4);
	// This check screens out .AMV format, for example.
	if(dlen==0 && c->infile->len!=8) return 0;

	return 50;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
cmpl $0x46464952, (%r14)     # imm = 0x46464952
je 0xba260
cmpl $0x52494658, 0x4(%rsp)  # imm = 0x52494658
je 0xba260
cmpl $0x58464952, 0x4(%rsp)  # imm = 0x58464952
jne 0xba281
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe409f
testq %rax, %rax
jne 0xba27c
movq 0x18(%rbx), %rax
cmpq $0x8, 0x18(%rax)
jne 0xba281
pushq $0x32
popq %rax
jmp 0xba283
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: my_on_container_end_fn
static int my_on_container_end_fn(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;

	if(ictx->curr_container_contentstype4cc.id==CODE_movi &&
		d->in_movi && ictx->level==d->in_movi_level)
	{
		d->in_movi = 0;
	}

	return 1;
}

// Assembly:
cmpl $0x6d6f7669, 0xfc(%rdi) # imm = 0x6D6F7669
jne 0xbad72
movq 0x10(%rdi), %rax
cmpb $0x0, 0xe(%rax)
je 0xbad72
movl 0x64(%rdi), %ecx
cmpl 0x10(%rax), %ecx
jne 0xbad72
movb $0x0, 0xe(%rax)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: decode_WAVEFORMATEX
static void decode_WAVEFORMATEX(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos1, i64 len)
{
	unsigned int formattag;
	i64 n;
	i64 pos = pos1;

	if(!ictx->is_le) goto done;
	if(len<14) goto done;

	formattag = (unsigned int)dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "FormatTag: 0x%04x (%s)", formattag, get_wav_fmt_name(formattag));
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "Channels: %u", (unsigned int)n);
	n = dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "SamplesPerSec: %u", (unsigned int)n);
	n = dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "AvgBytesPerSec: %u", (unsigned int)n);
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "BlockAlign: %u", (unsigned int)n);
	if(len<16) goto done;
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "BitsPerSample: %u", (unsigned int)n);
	if(len<18) goto done;
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "cbSize: %u", (unsigned int)n);

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
cmpq $0xe, %rcx
jl 0xbaed6
movq %rsi, %r14
cmpl $0x0, 0x58(%rsi)
je 0xbaed6
movq %rcx, %r15
movq %rdi, %rbx
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xe3fc4
cmpl $0xfffe, %eax           # imm = 0xFFFE
je 0xbadf3
cmpl $0x2, %eax
je 0xbadcf
cmpl $0x50, %eax
je 0xbade1
cmpl $0x55, %eax
je 0xbadd8
cmpl $0x1, %eax
jne 0xbadea
leaq 0x7244b(%rip), %rcx     # 0x12d218
jmp 0xbadfa
leaq 0x72440(%rip), %rcx     # 0x12d216
jmp 0xbadfa
leaq 0x7243d(%rip), %rcx     # 0x12d21c
jmp 0xbadfa
leaq 0x64c7b(%rip), %rcx     # 0x11fa63
jmp 0xbadfa
leaq 0x640f0(%rip), %rcx     # 0x11eee1
jmp 0xbadfa
leaq 0x7242d(%rip), %rcx     # 0x12d227
leaq 0x723a0(%rip), %rsi     # 0x12d1a1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xe3fc4
leaq 0x72395(%rip), %rsi     # 0x12d1b8
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe40bf
leaq 0x72383(%rip), %rsi     # 0x12d1c5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe40bf
leaq 0x72376(%rip), %rsi     # 0x12d1d7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3fc4
leaq 0x7236a(%rip), %rsi     # 0x12d1ea
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x10, %r15
jb 0xbaed6
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xe3fc4
leaq 0x72354(%rip), %rsi     # 0x12d1f9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x12, %r15
jb 0xbaed6
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xe3fc4
leaq 0x72341(%rip), %rsi     # 0x12d20b
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/riff.c
// Function: my_handle_nonchunk_riff_data_fn
static int my_handle_nonchunk_riff_data_fn(struct de_iffctx *ictx,
	i64 pos, i64 *plen)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;

	if(d->cmx_parse_hack) {
		return do_cmx_parse_hack(c, d, ictx, pos, plen);
	}
	else if(d->cmv_parse_hack) {
		return do_cmv_parse_hack(c, d, ictx, pos, plen);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %r15
movq 0x10(%rdi), %rax
cmpb $0x0, 0xc(%rax)
je 0xbaf65
movq 0x18(%r12), %rdi
movq %r14, %rsi
callq 0xe3fa3
cmpq $0x101, %rax            # imm = 0x101
setge %cl
testq %rax, %rax
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0xbafda
movq %rax, %rdi
callq 0xdfb87
movq %rax, %r13
leaq (%rax,%r14), %rdx
movq 0x18(%r12), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rcx
callq 0xe3cb7
xorl %eax, %eax
cmpq $0x4, %rax
je 0xbafbd
movb 0x4(%rsp,%rax), %cl
addb $-0x7f, %cl
incq %rax
cmpb $-0x60, %cl
ja 0xbaf4c
xorl %ebp, %ebp
jmp 0xbafda
xorl %ebp, %ebp
cmpb $0x0, 0xd(%rax)
je 0xbafda
cmpl $0x0, 0x64(%r12)
jne 0xbafda
movq 0x18(%r12), %rdi
movq %r14, %rsi
callq 0xe404f
testq %rax, %rax
jne 0xbafda
movq 0x18(%r12), %rdi
leaq 0x4(%r14), %rsi
callq 0xe404f
cmpq $0x52494646, %rax       # imm = 0x52494646
jne 0xbafda
leaq 0x72388(%rip), %rsi     # 0x12d32c
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
movq $0x4, (%rbx)
jmp 0xbafd7
leaq 0x72368(%rip), %rsi     # 0x12d32c
movq %r15, %rdi
movl %r13d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
movq %r13, (%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rosprite.c
// Function: de_module_rosprite
void de_module_rosprite(deark *c, struct deark_module_info *mi)
{
	mi->id = "rosprite";
	mi->desc = "RISC OS Sprite, a.k.a. Acorn Sprite";
	mi->run_fn = de_run_rosprite;
	mi->identify_fn = de_identify_rosprite;
}

// Assembly:
leaq 0x7237d(%rip), %rax     # 0x12d370
movq %rax, (%rsi)
leaq 0x7237c(%rip), %rax     # 0x12d379
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbb018
movq %rax, 0x18(%rsi)
leaq 0xce1(%rip), %rax       # 0xbbcf4
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rosprite.c
// Function: de_identify_rosprite
static int de_identify_rosprite(deark *c)
{
	i64 num_images, first_sprite_offset, implied_file_size;
	i64 offset2;

	num_images = de_getu32le(0);
	if(num_images<1 || num_images>1000) return 0;

	first_sprite_offset = de_getu32le(4) - 4;
	// I've only ever seen this be 12 or (rarely) 28, though it's legal
	// for it to have other values
	if(first_sprite_offset!=12 && first_sprite_offset!=28) return 0;
	if(first_sprite_offset+48 > c->infile->len) return 0;

	implied_file_size = de_getu32le(8) - 4;
	if(implied_file_size > c->infile->len) return 0;

	if(num_images!=1) {
		// TODO?: A multi-sprite file with extra junk at EOF will not be detected.
		// To better detect multi-sprite files, we'd probably have to walk through
		// the file.
		if(implied_file_size != c->infile->len) return 0;
		return 55;
	}

	offset2 = de_getu32le(first_sprite_offset);
	if(offset2==implied_file_size && implied_file_size==c->infile->len) {
		// Found some bad files where this pointer is absolute when it should be
		// relative.
		return 15;
	}
	offset2 += first_sprite_offset;
	if(offset2 != implied_file_size) return 0;
	if(implied_file_size == c->infile->len) return 80;
	return 30;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe409f
movq %rax, %r12
addq $-0x3e9, %rax           # imm = 0xFC17
cmpq $-0x3e8, %rax           # imm = 0xFC18
jb 0xbbdb1
movq 0x18(%r14), %rdi
pushq $0x4
popq %rsi
callq 0xe409f
leaq -0x4(%rax), %r15
movq %r15, %rcx
andq $-0x11, %rcx
cmpq $0xc, %rcx
jne 0xbbdb1
addq $0x2c, %rax
movq 0x18(%r14), %rdi
cmpq 0x18(%rdi), %rax
jg 0xbbdb1
pushq $0x8
popq %rsi
callq 0xe409f
movq %rax, %r13
addq $-0x4, %r13
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rax
cmpq %rax, %r13
jg 0xbbdb1
cmpq $0x1, %r12
jne 0xbbd8b
movq %r15, %rsi
callq 0xe409f
cmpq %r13, %rax
jne 0xbbd98
movq 0x18(%r14), %rcx
cmpq 0x18(%rcx), %r13
jne 0xbbd98
pushq $0xf
popq %rbx
jmp 0xbbdb1
xorl %ecx, %ecx
cmpq %rax, %r13
pushq $0x37
popq %rbx
cmovnel %ecx, %ebx
jmp 0xbbdb1
addq %r15, %rax
cmpq %r13, %rax
jne 0xbbdb1
movq 0x18(%r14), %rax
cmpq 0x18(%rax), %r13
pushq $0x50
popq %rax
pushq $0x1e
popq %rbx
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rosprite.c
// Function: getpal256
static de_color getpal256(int k)
{
	u8 r, g, b;
	if(k<0 || k>255) return 0;
	r = k%8 + ((k%32)/16)*8;
	g = k%4 + ((k%128)/32)*4;
	b = (u8)(k%4 + ((k%16)/8)*4 + (k/128)*8);
	r = (r<<4)|r;
	g = (g<<4)|g;
	b = (b<<4)|b;
	return DE_MAKE_RGB(r,g,b);
}

// Assembly:
xorl %eax, %eax
cmpl $0xff, %edi
ja 0xbbe0b
movl %edi, %eax
andl $0x7, %eax
movl %edi, %ecx
shrl %ecx
movl %ecx, %edx
andl $0x8, %edx
orl %eax, %edx
movl %edi, %eax
andl $0x3, %eax
movl %edi, %esi
shrl $0x3, %esi
andl $0xc, %esi
orl %eax, %esi
andl $0x4, %ecx
shrl $0x4, %edi
andl $0x8, %edi
orl %ecx, %edi
orl %eax, %edi
imull $0x11, %edi, %eax
imull $0x110000, %edx, %ecx   # imm = 0x110000
imull $0x1100, %esi, %edx     # imm = 0x1100
orl %ecx, %edx
addl %edx, %eax
addl $0xff000000, %eax       # imm = 0xFF000000
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rpm.c
// Function: de_module_rpm
void de_module_rpm(deark *c, struct deark_module_info *mi)
{
	mi->id = "rpm";
	mi->desc = "RPM Package Manager";
	mi->run_fn = de_run_rpm;
	mi->identify_fn = de_identify_rpm;
}

// Assembly:
leaq 0x719a5(%rip), %rax     # 0x12d7b8
movq %rax, (%rsi)
leaq 0x7199f(%rip), %rax     # 0x12d7bc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbbe38
movq %rax, 0x18(%rsi)
leaq 0x2d6(%rip), %rax       # 0xbc109
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: de_module_rsc
void de_module_rsc(deark *c, struct deark_module_info *mi)
{
	mi->id = "rsc";
	mi->desc = "GEM resource file";
	mi->run_fn = de_run_rsc;
	mi->identify_fn = de_identify_rsc;
	mi->help_fn = de_help_rsc;
}

// Assembly:
leaq 0x71423(%rip), %rax     # 0x12d96a
movq %rax, (%rsi)
leaq 0x7141d(%rip), %rax     # 0x12d96e
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbc577
movq %rax, 0x18(%rsi)
leaq 0xf67(%rip), %rax       # 0xbd4ce
movq %rax, 0x20(%rsi)
leaq 0xf95(%rip), %rax       # 0xbd507
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: is_valid_segment_pos
static int is_valid_segment_pos(deark *c, lctx *d, i64 pos, i64 len, const char *name)
{
	int ok_start = 1;
	int ok_end = 1;

	if(pos<36 && len>0) ok_start = 0;
	if(pos>d->avail_file_size) ok_start = 0;
	if(!d->allow_unaligned_offsets && (pos%2)) ok_start = 0;
	if(pos+len > d->avail_file_size) ok_end = 0;

	if(ok_start && ok_end) return 1;
	if(ok_start && !ok_end && len>=2) {
		de_err(c, "Invalid %s location: %"I64_FMT"-%"I64_FMT, name, pos, pos+len-1);
	}
	else {
		de_err(c, "Invalid %s location: %"I64_FMT, name, pos);
	}
	return 0;
}

// Assembly:
pushq %rbx
movq %rdx, %rax
cmpq $0x24, %rdx
setge %dl
testq %rcx, %rcx
setle %r9b
orb %dl, %r9b
movq 0x80(%rsi), %rdx
cmpq %rax, %rdx
setge %r10b
andb %r9b, %r10b
cmpb $0x0, 0x15(%rsi)
setne %r9b
testb $0x1, %al
sete %sil
orb %r9b, %sil
andb %r10b, %sil
leaq (%rcx,%rax), %r9
cmpq %rdx, %r9
jg 0xbd574
testb %sil, %sil
je 0xbd574
pushq $0x1
popq %rbx
jmp 0xbd5b9
cmpq %rdx, %r9
jle 0xbd5a3
cmpq $0x2, %rcx
jl 0xbd5a3
xorb $0x1, %sil
jne 0xbd5a3
decq %r9
leaq 0x70508(%rip), %rsi     # 0x12da97
xorl %ebx, %ebx
movq %r8, %rdx
movq %rax, %rcx
movq %r9, %r8
xorl %eax, %eax
callq 0xdf2a5
jmp 0xbd5b9
leaq 0x7050a(%rip), %rsi     # 0x12dab4
xorl %ebx, %ebx
movq %r8, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xdf2a5
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: do_decode_bilevel_image
static void do_decode_bilevel_image(deark *c, lctx *d, de_bitmap *img, i64 bits_pos,
	i64 rowspan)
{
	i64 i, j;
	i64 rowspan_in_16bit_chunks;
	UI k;
	UI n;

	rowspan_in_16bit_chunks = (rowspan+1)/2;

	for(j=0; j<img->height; j++) {
		for(i=0; i<rowspan_in_16bit_chunks; i++) {
			n = (UI)gem_getu16(d, bits_pos + j*rowspan + i*2);
			for(k=0; k<16; k++) {
				u8 clr;

				clr = (n & (1U<<(15-k))) ? 0 : 0xff;
				de_bitmap_setpixel_gray(img, i*16+(i64)k, j, clr);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
leaq 0x1(%rcx), %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
xorl %ebp, %ebp
testq %rax, %rax
cmovleq %rbp, %rax
movq %rax, 0x28(%rsp)
cmpq 0x10(%r15), %rbp
jge 0xbd6b5
movq %rbp, %rax
imulq 0x10(%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq 0x28(%rsp), %r12
je 0xbd6b0
movq 0x20(%rsp), %rax
leaq (%rax,%r12,2), %rsi
movq 0x18(%rsp), %rdi
callq 0xbd515
movq %rax, %r14
movq %rbx, 0x30(%rsp)
pushq $0x10
popq %r13
testq %r13, %r13
je 0xbd6a2
decq %r13
btl %r13d, %r14d
movl $0x0, %eax
adcb $-0x1, %al
movzbl %al, %ecx
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0xe71da
incq %rbx
jmp 0xbd679
incq %r12
movq 0x30(%rsp), %rbx
addq $0x10, %rbx
jmp 0xbd653
incq %rbp
jmp 0xbd635
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: do_scan_iconblk
static int do_scan_iconblk(deark *c, lctx *d, i64 pos1, struct iconinfo *ii)
{
	i64 pos;

	// TODO: Refactor this code to better share it with old- and new-style RSC.

	pos = pos1;
	ii->width = gem_getu16(d, pos+22);
	ii->height = gem_getu16(d, pos+24);
	de_dbg_dimensions(c, ii->width, ii->height);
	if(ii->width<1 || ii->width>MAX_RSC_ICON_WIDTH ||
		ii->height<1 || ii->height>MAX_RSC_ICON_HEIGHT)
	{
		de_dbg(c, "bad or unexpected icon dimensions");
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x16(%rdx), %rsi
movq %r12, %rdi
callq 0xbd515
movq %rax, (%r14)
addq $0x18, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0xbd515
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdf038
movq $-0x401, %rax           # imm = 0xFBFF
movq (%r14), %rcx
addq %rax, %rcx
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0xbd72a
movq 0x8(%r14), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0xbd73f
leaq 0x70570(%rip), %rsi     # 0x12dca1
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0xbd742
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: do_bilevel_icon
static void do_bilevel_icon(deark *c, lctx *d, struct iconinfo *ii, i64 fg_pos,
	i64 mask_pos, const char *token)
{
	de_bitmap *img = NULL;
	de_bitmap *mask = NULL;
	de_finfo *fi = NULL;

	if(!is_valid_segment_pos(c, d, fg_pos, ii->height*ii->mono_rowspan, "bitmap")) {
		goto done;
	}
	if(!is_valid_segment_pos(c, d, mask_pos, ii->height*ii->mono_rowspan, "mask")) {
		goto done;
	}
	if(!de_good_image_dimensions(c, ii->width, ii->height)) {
		goto done;
	}

	img = de_bitmap_create(c, ii->width, ii->height, 2);
	mask = de_bitmap_create(c, ii->width, ii->height, 1);
	do_decode_bilevel_image(c, d, img, fg_pos, ii->mono_rowspan);
	do_decode_bilevel_image(c, d, mask, mask_pos, ii->mono_rowspan);
	de_bitmap_apply_mask(img, mask, DE_BITMAPFLAG_WHITEISTRNS);
	fi = de_finfo_create(c);
	set_icon_finfo(c, d, fi, ii, token);
	de_bitmap_write_to_file_finfo(img, fi, DE_CREATEFLAG_OPT_IMAGE);

done:
	de_bitmap_destroy(img);
	de_bitmap_destroy(mask);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq 0x10(%rdx), %rcx
imulq 0x8(%rdx), %rcx
leaq 0x4d14d(%rip), %r8      # 0x10a8c4
movq %rbp, %rdx
callq 0xbd527
testl %eax, %eax
je 0xbd855
movq 0x10(%r14), %rcx
imulq 0x8(%r14), %rcx
leaq 0x7b496(%rip), %r8      # 0x138c2d
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xbd527
testl %eax, %eax
je 0xbd855
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xe6be1
testl %eax, %eax
je 0xbd855
movq (%r14), %rsi
movq 0x8(%r14), %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %rax, %r12
movq (%r14), %rsi
movq 0x8(%r14), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %r15, (%rsp)
movq %rax, %r15
movq 0x10(%r14), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xbd5fb
movq 0x10(%r14), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0xbd5fb
movq %r12, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0xe83f8
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r13
leaq 0x68926(%rip), %rcx     # 0x12615d
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xbd8b7
movq %r12, %rdi
movq %r13, %rsi
pushq $0x2
popq %rdx
callq 0xe70ab
jmp 0xbd85e
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %r12, %rdi
callq 0xe7084
movq %r15, %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdfd24
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: destroy_iconinfo
static void destroy_iconinfo(deark *c, struct iconinfo *ii)
{
	if(!ii) return;
	if(ii->icon_text) {
		ucstring_destroy(ii->icon_text);
	}
	de_free(c, ii);
}

// Assembly:
testq %rsi, %rsi
je 0xbd8b6
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0xbd8a4
callq 0xeaf3c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/rsc.c
// Function: set_icon_finfo
static void set_icon_finfo(deark *c, lctx *d, de_finfo *fi, struct iconinfo *ii,
	const char *token)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);

	if(ucstring_isnonempty(ii->icon_text)) {
		ucstring_append_ucstring(s, ii->icon_text);
	}

	if(token) {
		if(ucstring_isnonempty(s)) {
			ucstring_append_char(s, '.');
		}
		ucstring_append_sz(s, token, DE_ENCODING_UTF8);
	}

	de_finfo_set_name_from_ucstring(c, fi, s, 0x0);
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
callq 0xeac74
movq %rax, %r14
movq 0x20(%r13), %rdi
callq 0xeaf8a
testl %eax, %eax
je 0xbd8ed
movq 0x20(%r13), %rsi
movq %r14, %rdi
callq 0xead71
testq %r12, %r12
je 0xbd917
movq %r14, %rdi
callq 0xeaf8a
testl %eax, %eax
je 0xbd909
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0xeada5
pushq $0x2
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0xeae42
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xdfd55
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/shg.c
// Function: de_module_shg
void de_module_shg(deark *c, struct deark_module_info *mi)
{
	mi->id = "shg";
	mi->desc = "SHG (Segmented Hypergraphics), MRB (Multiple Resolution Bitmap)";
	mi->run_fn = de_run_shg;
	mi->identify_fn = de_identify_shg;
}

// Assembly:
leaq 0x564b1(%rip), %rax     # 0x114060
movq %rax, (%rsi)
leaq 0x70437(%rip), %rax     # 0x12dff0
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbdbd4
movq %rax, 0x18(%rsi)
leaq 0xa6d(%rip), %rax       # 0xbe63c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/shg.c
// Function: dfilter_shgrle_codec
static void dfilter_shgrle_codec(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct rlectx *rctx = NULL;

	rctx = de_malloc(dfctx->c, sizeof(struct rlectx));
	rctx->outf = dfctx->dcmpro->f;

	dfctx->codec_private = (void*)rctx;
	dfctx->codec_finish_fn = my_shgrle_codec_finish;
	dfctx->codec_destroy_fn = my_shgrle_codec_destroy;
	dfctx->codec_addbuf_fn = my_shgrle_codec_addbuf;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
pushq $0x28
popq %rsi
callq 0xdecaf
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq %rax, 0x28(%rbx)
leaq 0x1c(%rip), %rax        # 0xbe8a3
movq %rax, 0x40(%rbx)
leaq 0x26(%rip), %rax        # 0xbe8b8
movq %rax, 0x48(%rbx)
leaq 0x2a(%rip), %rax        # 0xbe8c7
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/shg.c
// Function: my_shgrle_codec_addbuf
static void  my_shgrle_codec_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	i64 k;
	struct rlectx *rctx = (struct rlectx*)dfctx->codec_private;

	for(k=0; k<buf_len; k++) {
		if(rctx->uncompressed_run_bytes_left>0) {
			dbuf_writebyte(rctx->outf, buf[k]);
			rctx->uncompressed_run_bytes_left--;
			rctx->nbytes_consumed++;
			continue;
		}

		if(rctx->compressed_run_pending) {
			dbuf_write_run(rctx->outf, buf[k], rctx->compressed_run_count);
			rctx->compressed_run_pending = 0;
			rctx->nbytes_consumed += 2;
			continue;
		}

		if(buf[k] & 0x80) { // beginning of uncompressed run
			rctx->uncompressed_run_bytes_left = (i64)(buf[k] & 0x7f);
			rctx->nbytes_consumed++;
			continue;
		}

		rctx->compressed_run_count = (i64)buf[k];
		rctx->compressed_run_pending = 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x28(%rdi), %r15
xorl %r12d, %r12d
testq %rdx, %rdx
cmovleq %r12, %rbx
cmpq %r12, %rbx
je 0xbe95d
cmpq $0x0, 0x18(%r15)
jle 0xbe912
movq (%r15), %rdi
movzbl (%r14,%r12), %esi
callq 0xe5bc5
movdqu 0x18(%r15), %xmm0
paddq 0x6f6d6(%rip), %xmm0    # 0x12dfe0
movdqu %xmm0, 0x18(%r15)
jmp 0xbe958
cmpl $0x0, 0x8(%r15)
je 0xbe936
movzbl (%r14,%r12), %esi
movq (%r15), %rdi
movq 0x10(%r15), %rdx
callq 0xe5e40
andl $0x0, 0x8(%r15)
addq $0x2, 0x20(%r15)
jmp 0xbe958
movzbl (%r14,%r12), %eax
testb %al, %al
js 0xbe94d
movq %rax, 0x10(%r15)
movl $0x1, 0x8(%r15)
jmp 0xbe958
andl $0x7f, %eax
movq %rax, 0x18(%r15)
incq 0x20(%r15)
incq %r12
jmp 0xbe8e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512u
void de_module_spectrum512u(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512u";
	mi->desc = "Spectrum 512 Uncompressed";
	mi->run_fn = de_run_spectrum512u;
	mi->identify_fn = de_identify_spectrum512u;
	mi->help_fn = de_help_spectrum512u;
}

// Assembly:
leaq 0x6f9d5(%rip), %rax     # 0x12e348
movq %rax, (%rsi)
leaq 0x6f9d8(%rip), %rax     # 0x12e355
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbe9a3
movq %rax, 0x18(%rsi)
leaq 0x6a(%rip), %rax        # 0xbe9fd
movq %rax, 0x20(%rsi)
leaq 0xb2(%rip), %rax        # 0xbea50
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512c
void de_module_spectrum512c(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512c";
	mi->desc = "Spectrum 512 Compressed";
	mi->run_fn = de_run_spectrum512c;
	mi->identify_fn = de_identify_spectrum512c;
	mi->help_fn = de_help_spectrum512cs;
}

// Assembly:
leaq 0x6f913(%rip), %rax     # 0x12e36f
movq %rax, (%rsi)
leaq 0x6f916(%rip), %rax     # 0x12e37c
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbea8c
movq %rax, 0x18(%rsi)
leaq 0x17(%rip), %rax        # 0xbea93
movq %rax, 0x20(%rsi)
leaq 0x6e(%rip), %rax        # 0xbeaf5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: de_identify_spectrum512c
static int de_identify_spectrum512c(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, "\x53\x50\x00\x00", 4))
		return 0;

	if(de_input_file_has_ext(c, "spc")) {
		return 100;
	}

	if(de_input_file_has_ext(c, "sps")) {
		return 0;
	}

	return 10;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x6fa0f(%rip), %rdx     # 0x12e4b4
xorl %r14d, %r14d
pushq $0x4
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0xbeaea
leaq 0x6f9bf(%rip), %rsi     # 0x12e47c
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0xbeacf
pushq $0x64
popq %r14
jmp 0xbeaea
leaq 0x6f9aa(%rip), %rsi     # 0x12e480
movq %rbx, %rdi
callq 0xdfcd5
xorl %ecx, %ecx
testl %eax, %eax
pushq $0xa
popq %r14
cmovnel %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512s
void de_module_spectrum512s(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512s";
	mi->desc = "Spectrum 512 Smooshed";
	mi->run_fn = de_run_spectrum512s;
	mi->identify_fn = de_identify_spectrum512s;
	mi->help_fn = de_help_spectrum512cs;
}

// Assembly:
leaq 0x6f87d(%rip), %rax     # 0x12e394
movq %rax, (%rsi)
leaq 0x6f880(%rip), %rax     # 0x12e3a1
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbeb47
movq %rax, 0x18(%rsi)
leaq 0x18(%rip), %rax        # 0xbeb4f
movq %rax, 0x20(%rsi)
leaq -0x4d(%rip), %rax       # 0xbeaf5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: do_spu_internal
static void do_spu_internal(deark *c, dbuf *inf, int is_enhanced)
{
	struct atari_img_decode_data *adata = NULL;
	de_finfo *fi = NULL;
	static const i64 num_colors = 199*48;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->is_spectrum512 = 1;
	adata->pal = de_mallocarray(c, num_colors, sizeof(u32));
	adata->bpp = 4;
	adata->w = 320;
	adata->h = 199;
	adata->ncolors = num_colors;

	fmtutil_read_atari_palette(c, inf, 32000, adata->pal, num_colors, num_colors,
		is_enhanced?DE_FLAG_ATARI_15BIT_PAL:0);

	adata->unc_pixels = dbuf_open_input_subfile(inf, 160, inf->len-160);
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fi = de_finfo_create(c);
	fmtutil_atari_set_standard_density(c, adata, fi);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file_finfo(adata->img, fi, 0);

	if(adata) {
		de_bitmap_destroy(adata->img);
		de_free(c, adata->pal);
		dbuf_close(adata->unc_pixels);
		de_free(c, adata);
	}
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
xorl %ebp, %ebp
testl %edx, %edx
setne %bpl
pushq $0x40
popq %rsi
callq 0xdecaf
movq %rax, %r14
movl $0x1, 0x2c(%rax)
pushq $0x4
popq %rdx
movl $0x2550, %esi           # imm = 0x2550
movq %rbx, %rdi
callq 0xdf66f
movq %rax, 0x30(%r14)
movq $0x4, (%r14)
movq $0x140, 0x10(%r14)      # imm = 0x140
movq $0xc7, 0x18(%r14)
movq $0x2550, 0x8(%r14)      # imm = 0x2550
addl %ebp, %ebp
movl %ebp, (%rsp)
movl $0x7d00, %edx           # imm = 0x7D00
movl $0x2550, %r8d           # imm = 0x2550
movl $0x2550, %r9d           # imm = 0x2550
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xecea5
movq $-0xa0, %rdx
addq 0x18(%r15), %rdx
movl $0xa0, %esi
movq %r15, %rdi
callq 0xe6248
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x38(%r14)
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xed4e6
movq %rbx, %rdi
movq %r14, %rsi
callq 0xed22a
movq 0x38(%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe70ab
movq 0x38(%r14), %rdi
callq 0xe7084
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
movq 0x20(%r14), %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xdfd24
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/spectrum512.c
// Function: reorder_img_bytes
static void reorder_img_bytes(deark *c, dbuf *src, dbuf *dst, reorder_fn rfn)
{
	i64 i;
	u8 b;

	for(i=0; i<src->len; i++) {
		b = dbuf_getbyte(src, i);
		dbuf_writebyte_at(dst, rfn(i), b);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
cmpq 0x18(%r15), %r12
jge 0xbf2e7
movq %r15, %rdi
movq %r12, %rsi
callq 0xe3eb4
movl %eax, %ebp
movq %r12, %rdi
callq *%rbx
movzbl %bpl, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xe5e13
incq %r12
jmp 0xbf2bb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sunras.c
// Function: de_module_sunras
void de_module_sunras(deark *c, struct deark_module_info *mi)
{
	mi->id = "sunras";
	mi->desc = "Sun Raster";
	mi->run_fn = de_run_sunras;
	mi->identify_fn = de_identify_sunras;
	mi->help_fn = de_help_sunras;
}

// Assembly:
leaq 0x6f139(%rip), %rax     # 0x12e4e0
movq %rax, (%rsi)
leaq 0x6f136(%rip), %rax     # 0x12e4e7
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xbf3d7
movq %rax, 0x18(%rsi)
leaq 0x7d6(%rip), %rax       # 0xbfb9d
movq %rax, 0x20(%rsi)
leaq 0x7ed(%rip), %rax       # 0xbfbbf
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/t64.c
// Function: de_module_t64
void de_module_t64(deark *c, struct deark_module_info *mi)
{
	mi->id = "t64";
	mi->desc = "T64 (C64 tape format)";
	mi->run_fn = de_run_t64;
	mi->identify_fn = de_identify_t64;
}

// Assembly:
leaq 0x48855(%rip), %rax     # 0x10842c
movq %rax, (%rsi)
leaq 0x6eb2d(%rip), %rax     # 0x12e70e
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbfbfc
movq %rax, 0x18(%rsi)
leaq 0x329(%rip), %rax       # 0xbff20
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tar.c
// Function: de_module_tar
void de_module_tar(deark *c, struct deark_module_info *mi)
{
	mi->id = "tar";
	mi->desc = "tar archive";
	mi->run_fn = de_run_tar;
	mi->identify_fn = de_identify_tar;
}

// Assembly:
leaq 0x7bce6(%rip), %rax     # 0x13bc31
movq %rax, (%rsi)
leaq 0x6e8d5(%rip), %rax     # 0x12e82a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xbff70
movq %rax, 0x18(%rsi)
leaq 0xb98(%rip), %rax       # 0xc0b03
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tar.c
// Function: de_identify_tar
static int de_identify_tar(deark *c)
{
	int has_ext;
	u8 buf[8];
	i64 k;
	i64 digit_count;

	has_ext = de_input_file_has_ext(c, "tar");;
	if(!dbuf_memcmp(c->infile, 257, "ustar", 5)) {
		return has_ext ? 100 : 90;
	}

	if(has_ext) {
		if(!dbuf_memcmp(c->infile, 508, "tar\0", 4)) {
			return 90;
		}
	}

	// Try to detect tar formats that don't have the "ustar" identifier.
	if(!has_ext) return 0;

	// The 'checksum' field has a fairly distinctive format.
	// "This field should be stored as six octal digits followed by a null and
	// a space character."

	de_read(buf, 148, 8);
	digit_count = 0;
	for(k=0; k<6; k++) {
		if(buf[k]>='0' && buf[k]<='7') {
			digit_count++;
		}
		else if(buf[k]!=' ') {
			return 0;
		}
	}
	if(digit_count<1) return 0;
	if(buf[6]==0x00 && buf[7]==' ') return 60;
	if(buf[6]==' ' && buf[7]==0x00) return 15;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7b121(%rip), %rsi     # 0x13bc31
callq 0xdfcd5
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq 0x6e01b(%rip), %rdx     # 0x12eb3d
pushq $0x5
popq %rcx
movl $0x101, %esi            # imm = 0x101
callq 0xe4d48
testl %eax, %eax
je 0xc0b8f
testl %ebp, %ebp
je 0xc0bb6
movq 0x18(%rbx), %rdi
leaq 0x6e012(%rip), %rdx     # 0x12eb54
pushq $0x4
popq %rcx
movl $0x1fc, %esi            # imm = 0x1FC
callq 0xe4d48
testl %eax, %eax
je 0xc0bba
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
pushq $0x8
popq %rcx
movl $0x94, %edx
callq 0xe3cb7
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x6, %rax
je 0xc0b9c
movb (%rsp,%rax), %dl
movl %edx, %esi
andb $-0x8, %sil
cmpb $0x30, %sil
jne 0xc0b85
incq %rcx
jmp 0xc0b8a
cmpb $0x20, %dl
jne 0xc0bb6
incq %rax
jmp 0xc0b6b
testl %ebp, %ebp
pushq $0x5a
popq %rcx
pushq $0x64
popq %rax
cmovel %ecx, %eax
jmp 0xc0bcb
testq %rcx, %rcx
jle 0xc0bb6
movb 0x6(%rsp), %al
movb 0x7(%rsp), %cl
movl %ecx, %edx
xorb $0x20, %dl
orb %al, %dl
jne 0xc0bbf
pushq $0x3c
jmp 0xc0bbc
xorl %eax, %eax
jmp 0xc0bcb
pushq $0x5a
popq %rax
jmp 0xc0bcb
xorb $0x20, %al
xorl %edx, %edx
orb %cl, %al
pushq $0xf
popq %rax
cmovnel %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/tar.c
// Function: destroy_pmd
static void destroy_pmd(deark *c, struct phys_member_data *pmd)
{
	if(!pmd) return;
	ucstring_destroy(pmd->name);
	de_destroy_stringreaderdata(c, pmd->linkname);
	ucstring_destroy(pmd->prefix);
	de_free(c, pmd);
}

// Assembly:
testq %rsi, %rsi
je 0xc0c2d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
callq 0xeaf3c
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0xe4b94
movq 0x40(%rbx), %rdi
callq 0xeaf3c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq