LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_identify_apple2_dsk
static int de_identify_apple2_dsk(deark *c)
{
	int has_sig;

	if(c->infile->len<143358 || c->infile->len>143362) return 0;
	if(!test_VTOC(c, 17*16*256)) return 0;
	has_sig = !dbuf_memcmp(c->infile, 0, (const u8*)"\x01\xa5\x27\xc9\x09\xd0", 6);
	if(has_sig) return 100;
	return 60;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq $-0x23003, %rax         # imm = 0xFFFDCFFD
addq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $-0x5, %rax
jb 0x2d38e
movl $0x11027, %esi          # imm = 0x11027
callq 0xe3eb4
cmpb $0x7a, %al
jne 0x2d38e
movq 0x18(%r14), %rdi
movl $0x11034, %esi          # imm = 0x11034
callq 0xe3eb4
cmpb $0x23, %al
jne 0x2d38e
movq 0x18(%r14), %rdi
movl $0x11035, %esi          # imm = 0x11035
callq 0xe3eb4
cmpb $0x10, %al
jne 0x2d38e
movq 0x18(%r14), %rdi
movl $0x11036, %esi          # imm = 0x11036
callq 0xe3fa3
cmpl $0x100, %eax            # imm = 0x100
jne 0x2d38e
movq 0x18(%r14), %rdi
leaq 0xdc400(%rip), %rdx     # 0x109779
pushq $0x6
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
pushq $0x64
popq %rax
pushq $0x3c
popq %rbx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_module_woz
void de_module_woz(deark *c, struct deark_module_info *mi)
{
	mi->id = "woz";
	mi->desc = "WOZ floppy disk image";
	mi->desc2 = "metadata only";
	mi->run_fn = de_run_woz;
	mi->identify_fn = de_identify_woz;
}

// Assembly:
leaq 0xdc0ef(%rip), %rax     # 0x10948e
movq %rax, (%rsi)
leaq 0xdc0e9(%rip), %rax     # 0x109492
movq %rax, 0x8(%rsi)
leaq 0xdc0f4(%rip), %rax     # 0x1094a8
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x2d3cf
movq %rax, 0x18(%rsi)
leaq 0xc(%rip), %rax         # 0x2d3d6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_module_moof
void de_module_moof(deark *c, struct deark_module_info *mi)
{
	mi->id = "moof";
	mi->desc = "MOOF floppy disk image";
	mi->desc2 = "metadata only";
	mi->run_fn = de_run_moof;
	mi->identify_fn = de_identify_moof;
}

// Assembly:
leaq 0xdc08d(%rip), %rax     # 0x1094b6
movq %rax, (%rsi)
leaq 0xdc088(%rip), %rax     # 0x1094bb
movq %rax, 0x8(%rsi)
leaq 0xdc06a(%rip), %rax     # 0x1094a8
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x2d459
movq %rax, 0x18(%rsi)
leaq 0xa(%rip), %rax         # 0x2d45e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: claim_sector
static int claim_sector(deark *c, lctx *d, UI tr, UI se)
{
	i64 idx;

	if((i64)tr>d->ntracks || (i64)se>d->sectors_per_track) {
		de_err(c, "Bad sector ID: %u,%u", tr, se);
		return 0;
	}
	idx = (i64)tr * d->sectors_per_track + (i64)se;
	if(d->sector_used_flags[idx]) {
		de_err(c, "Attempt to reuse sector: %u,%u", tr, se);
		return 0;
	}
	d->sector_used_flags[idx] = 1;
	return 1;
}

// Assembly:
pushq %rbx
movl %edx, %r8d
cmpq %r8, 0x8(%rsi)
jl 0x2d495
movl %ecx, %eax
movq 0x10(%rsi), %r9
cmpq %rax, %r9
jge 0x2d4a9
leaq 0xdc0f7(%rip), %rsi     # 0x109593
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xdf2a5
movl %ebx, %eax
popq %rbx
retq
imulq %r8, %r9
addq 0x28(%rsi), %r9
cmpb $0x0, (%rax,%r9)
je 0x2d4c1
leaq 0xdc0e9(%rip), %rsi     # 0x1095a8
jmp 0x2d49c
movb $0x1, (%r9,%rax)
pushq $0x1
popq %rbx
jmp 0x2d4a5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_run_wozmoof
static void do_run_wozmoof(deark *c, de_module_params *mparams, u8 fmt)
{
	struct wozmoofctx_struct *d = NULL;
	struct de_iffctx *ictx = NULL;
	u32 crc;
	i64 pos = 0;

	// WOZ/MOOF has a 12-byte header, then sequence of chunks that are basically the
	// same format as RIFF.
	d = de_malloc(c, sizeof(struct wozmoofctx_struct));
	d->fmt = fmt;
	ictx = fmtutil_create_iff_decoder(c);

	ictx->userdata = (void*)d;
	ictx->preprocess_chunk_fn = my_preprocess_wozmoof_chunk_fn;
	if(d->fmt==FMT_MOOF) {
		ictx->handle_chunk_fn = my_moof_chunk_handler;
	}
	else {
		ictx->handle_chunk_fn = my_woz_chunk_handler;
	}
	ictx->f = c->infile;
	ictx->is_le = 1;
	ictx->reversed_4cc = 0;

	if(ictx->f->len<12) goto done;
	de_dbg(c, "header at %d", (int)pos);
	de_dbg_indent(c, 1);
	if(d->fmt==FMT_WOZ) {
		pos += 3; // "WOZ" part of signature
		d->wozver = dbuf_getbyte_p(ictx->f, &pos);
		de_dbg(c, "format version: '%c'", de_byte_to_printable_char(d->wozver));
		if(d->wozver<'1' || d->wozver>'2') {
			de_err(c, "Unsupported WOZ format version");
			goto done;
		}
	}
	else {
		pos += 4;
	}
	pos += 4; // rest of signature
	crc = (u32)dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "crc: 0x%08x", (unsigned int)crc);
	de_dbg_indent(c, -1);

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

done:
	fmtutil_destroy_iff_decoder(ictx);
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
andq $0x0, 0x8(%rsp)
pushq $0x2
popq %rsi
callq 0xdecaf
movq %rax, %r14
movb %bpl, (%rax)
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movq %r14, 0x10(%rax)
leaq 0x12c(%rip), %rax       # 0x2d632
movq %rax, 0x28(%r15)
cmpb $0x1, (%r14)
leaq 0x171(%rip), %rax       # 0x2d686
leaq 0x354(%rip), %rcx       # 0x2d870
cmoveq %rax, %rcx
movq %rcx, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movl $0x1, 0x58(%r15)
movb $0x0, 0x5c(%r15)
cmpq $0xc, 0x18(%rax)
jl 0x2d612
leaq 0xfeea3(%rip), %rsi     # 0x12c3ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
cmpb $0x0, (%r14)
je 0x2d56d
pushq $0x8
popq %rax
jmp 0x2d5c8
leaq 0x8(%rsp), %rsi
movq $0x3, (%rsi)
movq 0x18(%r15), %rdi
callq 0xe3f2a
movb %al, 0x1(%r14)
movzbl %al, %edi
callq 0xe1f0f
movsbl %al, %edx
leaq 0xdc1e8(%rip), %rsi     # 0x109780
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movb 0x1(%r14), %al
addb $-0x33, %al
cmpb $-0x2, %al
jae 0x2d5bf
leaq 0xdc1e2(%rip), %rsi     # 0x109795
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x2d612
movq 0x8(%rsp), %rax
addq $0x4, %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xe40bf
leaq 0x10abea(%rip), %rsi    # 0x1381ce
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq (%r12), %rsi
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
subq %rsi, %rdx
movq %r15, %rdi
callq 0xface4
movq %r15, %rdi
callq 0xfacd3
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: my_moof_chunk_handler
static int my_moof_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_INFO:
		ictx->handled = 1;
		do_moof_INFO(c, ictx, ictx->chunkctx);
		break;
	case CODE_META:
		ictx->handled = 1;
		do_wozmoof_META(c, ictx, ictx->chunkctx);
		break;
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x128(%rdi), %rdx
movl 0x4(%rdx), %eax
cmpl $0x4d455441, %eax       # imm = 0x4D455441
je 0x2d71a
cmpl $0x494e464f, %eax       # imm = 0x494E464F
jne 0x2d861
movl $0x1, 0x130(%r14)
movq 0x40(%rdx), %rax
movq %rax, (%rsp)
cmpq $0x2c, 0x48(%rdx)
jl 0x2d861
movq 0x18(%r14), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdc101(%rip), %rsi     # 0x1097e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leal -0x1(%rdx), %eax
cmpb $0x2, %al
ja 0x2d735
movzbl %al, %eax
leaq 0xdbd4b(%rip), %rsi     # 0x10945c
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x2d73c
movl $0x1, 0x130(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2dada
jmp 0x2d861
leaq 0xf17a5(%rip), %rcx     # 0x11eee1
leaq 0xdc0bc(%rip), %rsi     # 0x1097ff
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdc0ac(%rip), %rsi     # 0x109812
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdc0a0(%rip), %rsi     # 0x109826
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdc091(%rip), %rsi     # 0x109837
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r12
movq 0x18(%r14), %rdi
movq (%r15), %rsi
pushq $0x20
popq %rdx
pushq $0x2
popq %r9
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq %r12, %rdi
callq 0xead03
movq %r12, %rdi
callq 0xeb7e4
leaq 0xdc063(%rip), %rsi     # 0x10984e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x21, (%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
leaq 0xdc04d(%rip), %rsi     # 0x10985c
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
leaq 0xdc047(%rip), %rsi     # 0x109875
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3fc4
leaq 0xdc037(%rip), %rsi     # 0x109884
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
callq 0xeaf3c
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_wozmoof_META
static void do_wozmoof_META(deark *c, struct de_iffctx *ictx,
	const struct de_iffchunkctx *chunkctx)
{
	i64 k;
	int reading_val;
	de_ucstring *s = NULL;
	de_ucstring *name = NULL;
	de_ucstring *val = NULL;

	// Read the entire metadata string.
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(ictx->f, chunkctx->dpos, chunkctx->dlen,
		65536, s, 0, DE_ENCODING_UTF8);

	// Parse out the individual metadata items
	name = ucstring_create(c);
	val = ucstring_create(c);
	reading_val = 0;

	for(k=0; k<s->len; k++) {
		i32 ch = s->str[k];

		if(ch==0x0a) { // End of item
			do_wozmoof_print_metadata_item(c, name, val);
			ucstring_empty(name);
			ucstring_empty(val);
			reading_val = 0;
		}
		else if(ch==0x09 && !reading_val) { // Name/value separator
			reading_val = 1;
		}
		else { // A non-special character
			if(reading_val) {
				ucstring_append_char(val, ch);
			}
			else {
				ucstring_append_char(name, ch);
			}
		}
	}
	do_wozmoof_print_metadata_item(c, name, val);

	ucstring_destroy(s);
	ucstring_destroy(name);
	ucstring_destroy(val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0xeac74
movq %rax, %rbx
movq 0x18(%r12), %rdi
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movl $0x2, (%rsp)
xorl %ebp, %ebp
movl $0x10000, %ecx          # imm = 0x10000
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r14, %rdi
callq 0xeac74
movq %rax, %r15
movq %r14, %rdi
callq 0xeac74
movq %rax, %r12
xorl %r13d, %r13d
cmpq 0x10(%rbx), %r13
jge 0x2db96
movq 0x8(%rbx), %rax
movl (%rax,%r13,4), %esi
cmpl $0xa, %esi
jne 0x2db6a
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2dbca
movq %r15, %rdi
callq 0xeac85
movq %r12, %rdi
callq 0xeac85
xorl %eax, %eax
jmp 0x2db85
testl %ebp, %ebp
jne 0x2db76
pushq $0x1
popq %rax
cmpl $0x9, %esi
je 0x2db85
testl %ebp, %ebp
je 0x2db8c
movq %r12, %rdi
callq 0xeada5
pushq $0x1
popq %rax
incq %r13
movl %eax, %ebp
jmp 0x2db35
movq %r15, %rdi
callq 0xeada5
jmp 0x2db66
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2dbca
movq %rbx, %rdi
callq 0xeaf3c
movq %r15, %rdi
callq 0xeaf3c
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_wozmoof_print_metadata_item
static void do_wozmoof_print_metadata_item(deark *c, de_ucstring *name, de_ucstring *val)
{
	if(name->len==0 && val->len==0) return;
	de_dbg(c, "item: \"%s\" = \"%s\"",
		ucstring_getpsz_d(name),
		ucstring_getpsz_d(val));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
jne 0x2dbe3
cmpq $0x0, 0x10(%r14)
je 0x2dc12
movq %rsi, %rdi
callq 0xeb877
movq %rax, %r15
movq %r14, %rdi
callq 0xeb877
leaq 0xdbcd6(%rip), %rsi     # 0x1098d3
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xde896
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: de_module_applesd
void de_module_applesd(deark *c, struct deark_module_info *mi)
{
	mi->id = "applesd";
	mi->id_alias[0] = "applesingle";
	mi->id_alias[1] = "appledouble";
	mi->desc = "AppleSingle/AppleDouble";
	mi->run_fn = de_run_applesd;
	mi->identify_fn = de_identify_applesd;
	mi->help_fn = de_help_applesd;
}

// Assembly:
leaq 0xdbd4f(%rip), %rax     # 0x10996e
movq %rax, (%rsi)
leaq 0xdbd4d(%rip), %rax     # 0x109976
movq %rax, 0x38(%rsi)
leaq 0xdbd4e(%rip), %rax     # 0x109982
movq %rax, 0x40(%rsi)
leaq 0xdbd4f(%rip), %rax     # 0x10998e
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x2dc65
movq %rax, 0x18(%rsi)
leaq 0x2d3(%rip), %rax       # 0x2df28
movq %rax, 0x20(%rsi)
leaq 0x2ef(%rip), %rax       # 0x2df4f
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: handler_data
static void handler_data(deark *c, lctx *d, struct entry_struct *e)
{
	if(d->is_appledouble) {
		de_warn(c, "AppleDouble header files should not have a data fork.");
	}

	d->advf->mainfork.fork_exists = 1;
	d->data_fork_pos = e->offset;
	d->advf->mainfork.fork_len = e->length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, 0x4(%rsi)
je 0x2dfd3
leaq 0xdbb1e(%rip), %rsi     # 0x109aea
xorl %eax, %eax
callq 0xdf05a
movq 0x10(%r14), %rax
movb $0x1, 0x10(%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x20(%r14)
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: handler_rsrc
static void handler_rsrc(deark *c, lctx *d, struct entry_struct *e)
{
	if(d->extract_rsrc) {
		do_extract_rsrc(c, d, e);
	}
	else {
		do_decode_rsrc(c, d, e);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x0, 0xc(%rsi)
movq 0x10(%rdx), %rax
je 0x2e038
testq %rax, %rax
jle 0x2e020
movq 0x10(%rsi), %rcx
movb $0x1, 0x38(%rcx)
movq 0x8(%r14), %rdx
movq %rdx, 0x18(%rsi)
movq %rax, 0x40(%rcx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xdfd24
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xeaf3c
testq %rax, %rax
jle 0x2e088
leaq 0xdbadc(%rip), %rsi     # 0x109b20
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rcx
movq 0x8(%r14), %r8
movq 0x10(%r14), %r9
leaq 0xdbad0(%rip), %rsi     # 0x109b3c
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdfa28
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xdeba7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: handler_string
static void handler_string(deark *c, lctx *d, struct entry_struct *e)
{
	struct de_stringreaderdata *srd = NULL;
	u8 firstbyte;

	if(e->length<1) goto done;

	firstbyte = de_getbyte(e->offset);

	if(firstbyte==0x00) {
		de_dbg(c, "string is apparently empty");
		goto done;
	}
	else if(is_pascal_string(c, d, e, firstbyte)) {
		i64 slen = (i64)firstbyte;

		de_dbg(c, "guessing this is a Pascal string, len: %u", (unsigned int)slen);
		srd = dbuf_read_string(c->infile, e->offset+1, slen, slen, 0, d->input_encoding);
	}
	else {
		srd = dbuf_read_string(c->infile, e->offset, e->length, 1024,
			DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
	}

	de_dbg(c, "%s: \"%s\"", e->eid->name, ucstring_getpsz_d(srd->str));

	if(e->id==3 && srd->str->len>0) { // id 3 = real name
		ucstring_empty(d->advf->filename);
		ucstring_append_ucstring(d->advf->filename, srd->str);
		d->advf->original_filename_flag = 1;
		de_advfile_set_orig_filename(d->advf, srd->sz, srd->sz_strlen);
	}

done:
	de_destroy_stringreaderdata(c, srd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdx)
jle 0x2e108
movq %rdx, %r15
movq %rsi, %r14
movq 0x18(%rbx), %rdi
movq 0x8(%rdx), %rsi
callq 0xe3eb4
testb %al, %al
je 0x2e110
movq 0x10(%r15), %rdx
cmpb $0x1f, %al
ja 0x2e129
movzbl %al, %r12d
cmpq %r12, %rdx
jle 0x2e129
leaq -0x101(%rdx), %rax
cmpq $-0x100, %rax
jb 0x2e129
leaq 0xdba7e(%rip), %rsi     # 0x109b5f
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x8(%r15), %rsi
incq %rsi
movl 0x8(%r14), %r9d
movq %r12, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
jmp 0x2e13e
xorl %r12d, %r12d
jmp 0x2e1b8
leaq 0xdba2d(%rip), %rsi     # 0x109b44
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0x2e1b8
movq 0x18(%rbx), %rdi
movq 0x8(%r15), %rsi
movl 0x8(%r14), %r9d
pushq $0x1
popq %r8
movl $0x400, %ecx            # imm = 0x400
callq 0xe495c
movq %rax, %r12
movq 0x18(%r15), %rax
movq 0x8(%rax), %r13
movq 0x18(%r12), %rdi
callq 0xeb877
leaq 0xf0d5b(%rip), %rsi     # 0x11eeba
movq %rbx, %rdi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
cmpl $0x3, 0x4(%r15)
jne 0x2e1b8
movq 0x18(%r12), %rax
cmpq $0x0, 0x10(%rax)
jle 0x2e1b8
movq 0x10(%r14), %rax
movq 0x68(%rax), %rdi
callq 0xeac85
movq 0x10(%r14), %rax
movq 0x68(%rax), %rdi
movq 0x18(%r12), %rsi
callq 0xead71
movq 0x10(%r14), %rdi
movb $0x1, 0x79(%rdi)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
callq 0xf0864
movq %rbx, %rdi
movq %r12, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe4b94
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: handler_dates
static void handler_dates(deark *c, lctx *d, struct entry_struct *e)
{
	if(e->length<16) return;
	do_one_date(c, d, e->offset, "creation date", &d->advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_CREATE]);
	do_one_date(c, d, e->offset+4, "mod date", &d->advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_MODIFY]);
	do_one_date(c, d, e->offset+8, "backup date", &d->advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_BACKUP]);
	do_one_date(c, d, e->offset+12, "access date", &d->advf->mainfork.fi->timestamp[DE_TIMESTAMPIDX_ACCESS]);
}

// Assembly:
cmpq $0x10, 0x10(%rdx)
jge 0x2e1d4
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdx), %rsi
movq 0x10(%r14), %rax
movq 0x20(%rax), %rcx
addq $0x28, %rcx
leaq 0xf2273(%rip), %rdx     # 0x12046c
callq 0x2e6c7
movq 0x8(%r15), %rsi
addq $0x4, %rsi
movq 0x10(%r14), %rax
movq 0x20(%rax), %rcx
addq $0x18, %rcx
leaq 0xe58b5(%rip), %rdx     # 0x113ace
movq %rbx, %rdi
callq 0x2e6c7
movq 0x8(%r15), %rsi
addq $0x8, %rsi
movq 0x10(%r14), %rax
movq 0x20(%rax), %rcx
addq $0x58, %rcx
leaq 0xdb94d(%rip), %rdx     # 0x109b89
movq %rbx, %rdi
callq 0x2e6c7
movq 0x8(%r15), %rsi
addq $0xc, %rsi
movq 0x10(%r14), %rax
movq 0x20(%rax), %rcx
addq $0x38, %rcx
leaq 0xdb936(%rip), %rdx     # 0x109b95
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2e6c7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/applesd.c
// Function: do_one_date
static void do_one_date(deark *c, lctx *d, i64 pos, const char *name,
	struct de_timestamp *returned_ts)
{
	i64 dt;
	struct de_timestamp ts;
	char timestamp_buf[64];

	de_zeromem(&ts, sizeof(struct de_timestamp));
	dt = de_geti32be(pos);
	if(dt == -0x80000000LL) {
		de_strlcpy(timestamp_buf, "unknown", sizeof(timestamp_buf));
	}
	else {
		// Epoch is Jan 1, 2001. There are 30 years, with 7 leap days, between
		// that and the Unix time epoch.
		de_unix_time_to_timestamp(dt + ((365*30 + 7)*86400), &ts, 0x1);
		de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	}
	de_dbg(c, "%s: %"I64_FMT" (%s)", name, dt, timestamp_buf);
	if(returned_ts) {
		*returned_ts = ts;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq 0x18(%rdi), %rdi
callq 0xe40e8
movq %rax, %r12
cmpq $-0x80000000, %rax      # imm = 0x80000000
jne 0x2e70e
leaq 0xd6d7d(%rip), %rsi     # 0x10547c
leaq 0x10(%rsp), %rdi
pushq $0x40
popq %rdx
callq 0xde492
jmp 0x2e738
movq %r12, %rdi
addq $0x386d4380, %rdi       # imm = 0x386D4380
movq %rsp, %r13
pushq $0x1
popq %rdx
movq %r13, %rsi
callq 0xe002e
leaq 0x10(%rsp), %rsi
pushq $0x40
popq %rdx
movq %r13, %rdi
xorl %ecx, %ecx
callq 0xe0644
leaq 0xdb462(%rip), %rsi     # 0x109ba1
leaq 0x10(%rsp), %r8
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
testq %rbx, %rbx
je 0x2e760
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binhex.c
// Function: de_module_binhex
void de_module_binhex(deark *c, struct deark_module_info *mi)
{
	mi->id = "binhex";
	mi->desc = "Macintosh BinHex (.hqx) archive";
	mi->run_fn = de_run_binhex;
	mi->identify_fn = de_identify_binhex;
}

// Assembly:
leaq 0xdb57d(%rip), %rax     # 0x109cf4
movq %rax, (%rsi)
leaq 0xdb57a(%rip), %rax     # 0x109cfb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2e79c
movq %rax, 0x18(%rsi)
leaq 0x5e1(%rip), %rax       # 0x2ed78
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binhex.c
// Function: de_identify_binhex
static int de_identify_binhex(deark *c)
{
	u8 b0;
	int ret;
	i64 foundpos;

	b0 = de_getbyte(0);
	if(b0==g_binhex_intro1[0]) {
		if(!dbuf_memcmp(c->infile, 0, g_binhex_intro1, INTRO1_LEN)) {
			return 100;
		}
	}

	if(!de_input_file_has_ext(c, "hqx")) return 0;

	// File has .hqx extension. Try harder to identify it.
	ret = find_start(c, &foundpos);
	if(ret) {
		if(foundpos<=1) {
			// Possible BinHex, but no intro
			if(looks_like_binhex_eof(c)) {
				return 75;
			}
		}
		else {
			return 100;
		}
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xe3eb4
pushq $0x64
popq %rbx
cmpb $0x28, %al
jne 0x2edad
movq 0x18(%r14), %rdi
leaq 0xdafa7(%rip), %rdx     # 0x109d46
pushq $0x28
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
je 0x2ee29
leaq 0xdb10b(%rip), %rsi     # 0x109ebf
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0x2ee27
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2ee33
testl %eax, %eax
je 0x2ee27
cmpq $0x1, 0x10(%rsp)
jg 0x2ee29
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rdx
addq $-0x3, %rdx
leaq 0xd(%rsp), %rbx
pushq $0x3
popq %rcx
movq %rbx, %rsi
callq 0xe3cb7
movzbl 0x2(%rbx), %eax
cmpl $0x3a, %eax
je 0x2ee22
movb 0xe(%rsp), %cl
cmpb $0x3a, %cl
jne 0x2ee11
cmpl $0xd, %eax
je 0x2ee22
cmpl $0xa, %eax
je 0x2ee22
cmpl $0xa, %eax
jne 0x2ee27
cmpb $0xd, %cl
jne 0x2ee27
cmpb $0x3a, 0xd(%rsp)
jne 0x2ee27
pushq $0x4b
popq %rbx
jmp 0x2ee29
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binhex.c
// Function: find_start
static int find_start(deark *c, i64 *foundpos)
{
	i64 pos;
	u8 b;
	int ret;

	*foundpos = 0;

	ret = dbuf_search(c->infile, g_binhex_intro1, INTRO1_LEN, 0, 8192, &pos);
	if(ret) pos += INTRO1_LEN;
	if(!ret) {
		ret = dbuf_search(c->infile, g_binhex_intro2, INTRO2_LEN, 0, 8192, &pos);
		if(ret) pos += INTRO2_LEN;
	}
	if(!ret) {
		ret = dbuf_search(c->infile, g_binhex_intro3, INTRO3_LEN, 0, 8192, &pos);
		if(ret) pos += INTRO3_LEN;
	}
	if(!ret) {
		if(de_getbyte(0)==':') {
			*foundpos = 1;
			return 1;
		}
	}
	if(!ret) {
		return 0;
	}

	// Find the next CR/LF byte
	while(1) {
		if(pos>=c->infile->len) return 0;
		b = de_getbyte(pos);
		pos++;
		if(b=='\x0a' || b=='\x0d') {
			break;
		}
	}

	// Skip any number of additional whitespace
	while(1) {
		b = de_getbyte(pos);
		if(b=='\x0a' || b=='\x0d' || b==' ' || b=='\t') {
			pos++;
		}
		else {
			break;
		}
	}

	// Current byte should be a colon (:)
	b = de_getbyte(pos);
	if(b==':') {
		*foundpos = pos+1;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, (%rsi)
movq 0x18(%rdi), %rdi
leaq 0xdaef6(%rip), %rsi     # 0x109d46
pushq $0x28
popq %rdx
movq %rsp, %r9
movl $0x2000, %r8d           # imm = 0x2000
xorl %ecx, %ecx
callq 0xe62f1
testl %eax, %eax
je 0x2ee71
movq (%rsp), %rsi
addq $0x28, %rsi
jmp 0x2eece
movq 0x18(%r14), %rdi
leaq 0xdaef3(%rip), %rsi     # 0x109d6f
pushq $0x17
popq %rdx
movq %rsp, %r9
movl $0x2000, %r8d           # imm = 0x2000
xorl %ecx, %ecx
callq 0xe62f1
testl %eax, %eax
je 0x2ee9d
movq (%rsp), %rsi
addq $0x17, %rsi
jmp 0x2eece
movq 0x18(%r14), %rdi
leaq 0xdaedf(%rip), %rsi     # 0x109d87
xorl %r15d, %r15d
pushq $0x2a
popq %rdx
movq %rsp, %r9
movl $0x2000, %r8d           # imm = 0x2000
xorl %ecx, %ecx
callq 0xe62f1
testl %eax, %eax
je 0x2ef56
movq (%rsp), %rsi
addq $0x2a, %rsi
movq %rsi, (%rsp)
movq 0x18(%r14), %rdi
xorl %r15d, %r15d
cmpq 0x18(%rdi), %rsi
jge 0x2ef47
callq 0xe3eb4
movq (%rsp), %rsi
incq %rsi
movq %rsi, (%rsp)
cmpb $0xd, %al
je 0x2eefb
movzbl %al, %eax
cmpl $0xa, %eax
jne 0x2eed2
movabsq $0x100002600, %r12      # imm = 0x100002600
movq 0x18(%r14), %rdi
callq 0xe3eb4
cmpb $0x20, %al
ja 0x2ef28
movzbl %al, %eax
btq %rax, %r12
jae 0x2ef28
movq (%rsp), %rsi
incq %rsi
movq %rsi, (%rsp)
jmp 0x2ef05
movq 0x18(%r14), %rdi
movq (%rsp), %rsi
callq 0xe3eb4
cmpb $0x3a, %al
jne 0x2ef47
movq (%rsp), %rax
incq %rax
movq %rax, (%rbx)
pushq $0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r14), %rdi
xorl %esi, %esi
callq 0xe3eb4
cmpb $0x3a, %al
jne 0x2ef47
pushq $0x1
popq %rax
jmp 0x2ef40
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binhex.c
// Function: do_pre_extract_fork
static int do_pre_extract_fork(deark *c, lctx *d, dbuf *inf, struct binhex_forkinfo *fki,
	struct de_advfile_forkinfo *advfki)
{
	fki->crc_reported = (u32)dbuf_getu16be(inf, fki->pos + fki->len);
	de_dbg(c, "%s fork crc (reported): 0x%04x", fki->forkname,
		(unsigned int)fki->crc_reported);

	advfki->writelistener_cb = de_writelistener_for_crc;
	advfki->userdata_for_writelistener = (void*)fki->crco;

	if((fki->pos + fki->len > inf->len) && fki->len!=0) {
		de_err(c, "%s fork goes beyond end of file", fki->forkname);
		fki->len = 0;
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdx), %rsi
addq (%rdx), %rsi
movq %r15, %rdi
callq 0xe3f46
movl %eax, 0x10(%rbx)
movq 0x20(%rbx), %rdx
leaq 0xdaea7(%rip), %rsi     # 0x109e42
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
leaq 0xb7313(%rip), %rax     # 0xe62c1
movq %rax, 0x20(%r12)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r12)
movq 0x8(%rbx), %rax
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x2efed
addq (%rbx), %rax
cmpq 0x18(%r15), %rax
jle 0x2efed
movq 0x20(%rbx), %rdx
leaq 0xdae85(%rip), %rsi     # 0x109e61
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
andq $0x0, 0x8(%rbx)
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/binhex.c
// Function: do_post_extract_fork
static void do_post_extract_fork(deark *c, lctx *d, struct binhex_forkinfo *fki)
{
	u32 crc_calc;

	// Here, the BinHex spec says we should feed two 0x00 bytes to the CRC
	// calculation, to account for the CRC field itself. However, if I do
	// that, none of files I've tested have the correct CRC. If I don't,
	// all of them have the correct CRC.
	//de_crcobj_addbuf(fki->crco, (const u8*)"\0\0", 2);

	crc_calc = de_crcobj_getval(fki->crco);
	de_dbg(c, "%s fork crc (calculated): 0x%04x", fki->forkname,
		(unsigned int)crc_calc);
	if(crc_calc != fki->crc_reported) {
		de_err(c, "CRC check failed for %s fork", fki->forkname);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rdi
callq 0xe0e95
movl %eax, %ebp
movq 0x20(%r14), %rdx
leaq 0xdae27(%rip), %rsi     # 0x109e81
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
cmpl 0x10(%r14), %ebp
jne 0x2f071
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%r14), %rdx
leaq 0xdae26(%rip), %rsi     # 0x109ea2
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0xdf2a5
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_xbin
void de_module_xbin(deark *c, struct deark_module_info *mi)
{
	mi->id = "xbin";
	mi->desc = "XBIN character graphics";
	mi->run_fn = de_run_xbin;
	mi->identify_fn = de_identify_xbin;
	mi->help_fn = de_help_xbin;
}

// Assembly:
leaq 0xdaf3d(%rip), %rax     # 0x109fd0
movq %rax, (%rsi)
leaq 0xdaf38(%rip), %rax     # 0x109fd5
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x2f0c3
movq %rax, 0x18(%rsi)
leaq 0x62c(%rip), %rax       # 0x2f6df
movq %rax, 0x20(%rsi)
leaq 0x643(%rip), %rax       # 0x2f701
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_bintext
void de_module_bintext(deark *c, struct deark_module_info *mi)
{
	mi->id = "bintext";
	mi->desc = "Binary Text character graphics";
	mi->run_fn = de_run_bintext;
	mi->identify_fn = de_identify_bintext;
	mi->help_fn = de_help_bintext;
}

// Assembly:
leaq 0xda8c1(%rip), %rax     # 0x109fed
movq %rax, (%rsi)
leaq 0xda8bf(%rip), %rax     # 0x109ff5
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x2f75c
movq %rax, 0x18(%rsi)
leaq 0x24e(%rip), %rax       # 0x2f99a
movq %rax, 0x20(%rsi)
leaq 0x277(%rip), %rax       # 0x2f9ce
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_bintext
static int de_identify_bintext(deark *c)
{
	if(!c->detection_data->SAUCE_detection_attempted) {
		// FIXME?: This is known to happen if "-disablemods sauce" was used.
		de_err(c, "bintext detection requires sauce module");
		return 0;
	}
	if(c->detection_data->sauce.has_SAUCE) {
		if(c->detection_data->sauce.data_type==5)
		{
			return 100;
		}
	}
	return 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rax
cmpb $0x0, 0x5(%rax)
je 0x2f9ba
cmpb $0x0, 0x10(%rax)
je 0x2f9b6
cmpb $0x5, 0x11(%rax)
jne 0x2f9b6
pushq $0x64
popq %rbx
jmp 0x2f9ca
xorl %ebx, %ebx
jmp 0x2f9ca
leaq 0xda982(%rip), %rsi     # 0x10a343
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xdf2a5
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_artworx_adf
void de_module_artworx_adf(deark *c, struct deark_module_info *mi)
{
	mi->id = "artworx_adf";
	mi->desc = "ArtWorx Data Format (ADF)";
	mi->run_fn = de_run_artworx_adf;
	mi->identify_fn = de_identify_artworx_adf;
	mi->help_fn = de_help_artworx_adf;
}

// Assembly:
leaq 0xda60a(%rip), %rax     # 0x10a014
movq %rax, (%rsi)
leaq 0xda60c(%rip), %rax     # 0x10a020
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x2fa3a
movq %rax, 0x18(%rsi)
leaq 0x1a1(%rip), %rax       # 0x2fbcb
movq %rax, 0x20(%rsi)
leaq 0x1f7(%rip), %rax       # 0x2fc2c
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_artworx_adf
static int de_identify_artworx_adf(deark *c)
{
	u8 ver;

	// TODO: This detection algorithm will fail if there is a SAUCE record.

	if(c->infile->len < 1+192+4096+160) {
		return 0;
	}
	if((c->infile->len - (1+192+4096))%160 != 0) {
		return 0;
	}
	if(!de_input_file_has_ext(c, "adf")) return 0;
	ver = de_getbyte(0);
	// I don't know what version numbers are allowed, but I'll assume the
	// version number should be small.
	if(ver>4) return 0;
	return 75;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rax
xorl %ebx, %ebx
cmpq $0x1161, %rax           # imm = 0x1161
jl 0x2fc22
addq $-0x10c1, %rax          # imm = 0xEF3F
xorl %ebx, %ebx
movl $0xa0, %ecx
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x2fc22
movq %rdi, %r14
leaq 0x10dd80(%rip), %rsi    # 0x13d982
callq 0xdfcd5
testl %eax, %eax
je 0x2fc22
movq 0x18(%r14), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xe3eb4
cmpb $0x5, %al
pushq $0x4b
popq %rbx
cmovael %r14d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_icedraw
void de_module_icedraw(deark *c, struct deark_module_info *mi)
{
	mi->id = "icedraw";
	mi->desc = "iCEDraw character graphics format";
	mi->run_fn = de_run_icedraw;
	mi->identify_fn = de_identify_icedraw;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
leaq 0xda3d2(%rip), %rax     # 0x10a03a
movq %rax, (%rsi)
leaq 0xda3d0(%rip), %rax     # 0x10a042
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x2fc91
movq %rax, 0x18(%rsi)
leaq 0x7e(%rip), %rax        # 0x2fd06
movq %rax, 0x20(%rsi)
orb $0x2, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_thedraw_com
void de_module_thedraw_com(deark *c, struct deark_module_info *mi)
{
	mi->id = "thedraw_com";
	mi->desc = "TheDraw COM file";
	mi->run_fn = de_run_thedraw_com;
	mi->identify_fn = de_identify_thedraw_com;
}

// Assembly:
leaq 0xda335(%rip), %rax     # 0x10a064
movq %rax, (%rsi)
leaq 0xda337(%rip), %rax     # 0x10a070
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2fd54
movq %rax, 0x18(%rsi)
leaq 0x3be(%rip), %rax       # 0x3010d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_thedraw_com
static int de_identify_thedraw_com(deark *c)
{
	u8 n1, n2;

	if(c->infile->len>65280) return 0;
	n1 = de_getbyte(0);
	if(n1!=0xeb) return 0;

	n1 = de_getbyte(1);
	n2 = de_getbyte(6);
	// Check format subtype & viewer start position.
	if((n2==0 && n1==0x3d) ||
		(n2==1 && n1==0x18) ||
		(n2==2 && n1==0x3d))
	{
		;
	}
	else {
		return 0;
	}

	if(!dbuf_memcmp(c->infile, 9, (const void*)"TheDraw COM file", 16)) {
		return 100;
	}

	if(n2==0) {
		if(!dbuf_memcmp(c->infile, 0x3f,
			(const void*)"\xb4\x0f\xcd\x10\x8c\xcb\x8e\xdb\xbb\x00", 10))
		{
			// An extra check to defend against lookalike formats, particularly
			// P-Screen (search for pscrn_55.zip).
			if(de_getbyte(0x3f+76)==0xad) {
				return 40;
			}
		}
	}
	else if(n2==1) {
		if(!dbuf_memcmp(c->infile, 0x1a,
			(const void*)"\xb4\x0f\xcd\x10\x8b\x3e\x07\x01\xbe\x5e", 10))
		{
			return 40;
		}
	}
	else if(n2==2) {
		if(!dbuf_memcmp(c->infile, 0x3f,
			(const void*)"\xb4\x0f\xcd\x10\xbb\x00\xb8\x3c\x02\x74", 10))
		{
			return 40;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x30201
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
cmpb $-0x15, %al
jne 0x30201
movq 0x18(%r14), %rdi
pushq $0x1
popq %rsi
callq 0xe3eb4
movl %eax, %r15d
movq 0x18(%r14), %rdi
pushq $0x6
popq %rsi
callq 0xe3eb4
movl %eax, %ebp
movl %r15d, %eax
xorb $0x3d, %al
movl %ebp, %ecx
orb %al, %cl
jne 0x30198
movq 0x18(%r14), %rdi
leaq 0xd9f01(%rip), %rdx     # 0x10a070
pushq $0x9
popq %rsi
pushq $0x10
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0x301b6
testb %bpl, %bpl
je 0x301ba
movq 0x18(%r14), %rdi
cmpb $0x1, %bpl
jne 0x301e8
leaq 0xda30a(%rip), %rdx     # 0x10a49e
pushq $0x1a
jmp 0x301f1
movl %ebp, %ecx
xorb $0x1, %cl
xorb $0x18, %r15b
movl %ebp, %edx
xorb $0x2, %dl
orb %al, %dl
sete %al
orb %cl, %r15b
je 0x30164
testb %al, %al
je 0x30201
jmp 0x30164
pushq $0x64
jmp 0x30200
movq 0x18(%r14), %rdi
leaq 0xd9d73(%rip), %rdx     # 0x109f38
pushq $0x3f
popq %rsi
pushq $0xa
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x30201
movq 0x18(%r14), %rdi
movl $0x8b, %esi
callq 0xe3eb4
cmpb $-0x53, %al
je 0x301fe
jmp 0x30201
leaq 0xd9d54(%rip), %rdx     # 0x109f43
pushq $0x3f
popq %rsi
pushq $0xa
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x30201
pushq $0x28
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_aciddraw_com
void de_module_aciddraw_com(deark *c, struct deark_module_info *mi)
{
	mi->id = "aciddraw_com";
	mi->desc = "ACiDDraw COM file";
	mi->run_fn = de_run_aciddraw_com;
	mi->identify_fn = de_identify_aciddraw_com;
}

// Assembly:
leaq 0xd9e6c(%rip), %rax     # 0x10a081
movq %rax, (%rsi)
leaq 0xd9e6f(%rip), %rax     # 0x10a08e
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x3023a
movq %rax, 0x18(%rsi)
leaq 0x286(%rip), %rax       # 0x304bb
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_aciddraw_com
static int de_identify_aciddraw_com(deark *c)
{
	u8 n1;
	struct aciddraw_id_data adi;

	if(c->infile->len>65280) return 0;
	n1 = de_getbyte(0);
	if(n1!=0xe9 && n1!=0xeb) return 0;
	aciddraw_id(c, n1, &adi);
	if(adi.is_aciddraw) {
		return 92;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x3050b
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xe3eb4
movl %eax, %ecx
andb $-0x3, %cl
cmpb $-0x17, %cl
jne 0x3050b
movzbl %al, %esi
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x310d8
xorl %eax, %eax
cmpb $0x0, (%r14)
pushq $0x5c
popq %r14
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_ldog_com
void de_module_ldog_com(deark *c, struct deark_module_info *mi)
{
	mi->id = "ldog_com";
	mi->desc = "Laughing Dog COM file";
	mi->run_fn = de_run_ldog_com;
	mi->identify_fn = de_identify_ldog_com;
}

// Assembly:
leaq 0xd9b83(%rip), %rax     # 0x10a0a0
movq %rax, (%rsi)
leaq 0xd9b82(%rip), %rax     # 0x10a0a9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x30542
movq %rax, 0x18(%rsi)
leaq 0x155(%rip), %rax       # 0x30692
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_run_ldog_com
static void de_run_ldog_com(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_char_context *charctx = NULL;
	u8 b;

	d = de_malloc(c, sizeof(lctx));
	d->csctx.input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);

	charctx = de_create_charctx(c, 0);
	charctx->screen_image_flag = 1;

	b = de_getbyte(22);
	if(b != 0xbe) {
		d->need_errmsg = 1;
		goto done;
	}
	b = de_getbyte(65);
	if(b != 0xb6) {
		d->need_errmsg = 1;
		goto done;
	}

	d->csctx.inf_pos = de_getu16le(23);
	d->csctx.inf_pos -= 0x100;
	de_dbg(c, "data pos: %"I64_FMT, d->csctx.inf_pos);

	d->csctx.height_in_chars = (i64)de_getbyte(66);
	d->csctx.width_in_chars = (i64)de_getbyte(68);
	de_dbg_dimensions(c, d->csctx.width_in_chars, d->csctx.height_in_chars);
	d->csctx.inf_len = d->csctx.width_in_chars * d->csctx.height_in_chars * 2;
	if(d->csctx.inf_pos+d->csctx.inf_len > c->infile->len) {
		d->need_errmsg = 1;
		goto done;
	}

	if(d->csctx.width_in_chars>80 || d->csctx.height_in_chars>25) {
		charctx->no_density = 1;
	}

	d->csctx.use_default_pal = 1;
	d->csctx.inf = c->infile;
	fmtutil_char_simple_run(c, &d->csctx, charctx);

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Unsupported LDOG COM format");
		}
		free_lctx(c, d);
	}
	de_free_charctx(c, charctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x70
popq %rsi
callq 0xdecaf
movq %rax, %r12
movq %rax, %r14
pushq $0xd
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, 0x48(%r12)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe88f4
movq %rax, %r15
movb $0x1, 0x2(%rax)
movq 0x18(%rbx), %rdi
pushq $0x16
popq %rsi
callq 0xe3eb4
cmpb $-0x42, %al
jne 0x30620
movq 0x18(%rbx), %rdi
pushq $0x41
popq %rsi
callq 0xe3eb4
cmpb $-0x4a, %al
jne 0x30620
movq 0x18(%rbx), %rdi
pushq $0x17
popq %rsi
callq 0xe3fa3
leaq -0x100(%rax), %rdx
movq %rdx, 0x38(%r14)
leaq 0xe8875(%rip), %rsi     # 0x118e35
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
pushq $0x42
popq %rsi
callq 0xe3eb4
movzbl %al, %eax
movq %rax, 0x58(%r14)
movq 0x18(%rbx), %rdi
pushq $0x44
popq %rsi
callq 0xe3eb4
movzbl %al, %esi
movq %rsi, 0x50(%r14)
movq 0x58(%r14), %rdx
movq %rbx, %rdi
callq 0xdf038
movq 0x50(%r14), %rdx
movq 0x58(%r14), %rcx
movq %rdx, %rsi
imulq %rcx, %rsi
addq %rsi, %rsi
movq %rsi, 0x40(%r14)
addq 0x38(%r14), %rsi
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rsi
jle 0x30657
movb $0x1, 0x1(%r14)
leaq 0xd9ed9(%rip), %rsi     # 0x10a505
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30db6
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe89d2
addq $0x30, %r12
cmpq $0x51, %rdx
setl %dl
cmpq $0x1a, %rcx
setl %cl
testb %cl, %dl
jne 0x30672
movb $0x1, 0x3(%r15)
movb $0x1, 0x4c(%r14)
movq %rax, 0x30(%r14)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xee2e5
cmpb $0x0, 0x1(%r14)
jne 0x30625
jmp 0x30636
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_ldog_com
static int de_identify_ldog_com(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0x06) return 0;

	if(dbuf_memcmp(c->infile, 1,
		(const void*)"\xb4\x0f\xcd\x10\x3c\x07\x74\x06\xb8\x00\xb8\xeb\x04\x90\xb8", 15))
	{
		return 0;
	}
	return 100;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x306d6
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
cmpb $0x6, %al
jne 0x306d6
movq 0x18(%r14), %rdi
leaq 0xd9eb7(%rip), %rdx     # 0x10a578
pushq $0x1
popq %rsi
pushq $0xf
popq %rcx
callq 0xe4d48
xorl %ecx, %ecx
testl %eax, %eax
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_module_grabber
void de_module_grabber(deark *c, struct deark_module_info *mi)
{
	mi->id = "grabber";
	mi->desc = "GRABBER";
	mi->run_fn = de_run_grabber;
	mi->identify_fn = de_identify_grabber;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0xd99d8(%rip), %rax     # 0x10a0bf
movq %rax, (%rsi)
leaq 0xd99d6(%rip), %rax     # 0x10a0c7
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x30710
movq %rax, 0x18(%rsi)
leaq 0x29b(%rip), %rax       # 0x309a2
movq %rax, 0x20(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: de_identify_grabber
static int de_identify_grabber(deark *c)
{
	struct grabber_id_data gi;
	u8 b0;

	if(c->infile->len>65280) return 0;
	b0 = de_getbyte(0);
	if(b0!=0xe9 && b0!=0xfb) return 0;

	grabber_id_com(c, b0, &gi);
	if(gi.is_grabber) return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
cmpq $0xff00, 0x18(%rdi)     # imm = 0xFF00
jg 0x309f6
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xe3eb4
movzbl %al, %esi
cmpb $-0x5, %sil
je 0x309d8
cmpl $0xe9, %esi
jne 0x309f6
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x31146
xorl %eax, %eax
cmpb $0x0, (%r14)
pushq $0x64
popq %r14
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bintext.c
// Function: do_read_palette
static void do_read_palette(deark *c, lctx *d,struct de_char_context *charctx,
	i64 pos, int adf_style)
{
	i64 k;
	u8 cr1, cg1, cb1;
	u8 cr2, cg2, cb2;
	i64 cpos;
	char tmps[64];

	de_dbg(c, "palette at %"I64_FMT, pos);

	for(k=0; k<16; k++) {
		i64 idx = k;

		if(adf_style) {
			if(k>=8) idx = 48+k;
			else if(k==6) idx = 20;
		}
		cpos = pos + idx*3;
		cr1 = de_getbyte(cpos);
		cg1 = de_getbyte(cpos+1);
		cb1 = de_getbyte(cpos+2);
		cr2 = de_scale_63_to_255(cr1);
		cg2 = de_scale_63_to_255(cg1);
		cb2 = de_scale_63_to_255(cb1);
		charctx->pal[k] = DE_MAKE_RGB(cr2, cg2, cb2);
		de_snprintf(tmps, sizeof(tmps), "(%2d,%2d,%2d) "DE_CHAR_RIGHTARROW" ",
			(int)cr1, (int)cg1, (int)cb1);
		de_dbg_pal_entry2(c, k, charctx->pal[k], tmps, NULL, NULL);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, (%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xf88cd(%rip), %rsi     # 0x1292eb
movq %rdi, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
xorl %eax, %eax
callq 0xde896
xorl %r13d, %r13d
movq 0x8(%rsp), %rbx
cmpq $0x10, %r13
je 0x30b38
movq %r13, %rax
cmpl $0x0, (%rsp)
je 0x30a67
cmpq $0x8, %r13
jb 0x30a59
movq %r13, %rax
orq $0x30, %rax
jmp 0x30a67
cmpq $0x6, %r13
movq %r13, %rax
pushq $0x14
popq %rcx
cmoveq %rcx, %rax
leaq (%rax,%rax,2), %r14
movq 0x18(%rsp), %r15
leaq (%r14,%r15), %rsi
movq 0x18(%rbx), %rdi
callq 0xe3eb4
movl %eax, %r12d
movq 0x18(%rbx), %rdi
leaq (%r15,%r14), %rsi
incq %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq (%r15,%r14), %rsi
addq $0x2, %rsi
callq 0xe3eb4
movl %eax, %r15d
movzbl %r12b, %edi
movl %edi, 0x4(%rsp)
callq 0xe1cec
movl %eax, %r14d
movzbl %bpl, %ebp
movl %ebp, %edi
callq 0xe1cec
movl %eax, %r12d
movzbl %r15b, %r15d
movl %r15d, %edi
callq 0xe1cec
movzbl %r14b, %ecx
shll $0x10, %ecx
movzbl %r12b, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl %al, %eax
orl %edx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movq 0x10(%rsp), %r14
movl %eax, 0x20(%r14,%r13,4)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
pushq $0x40
popq %rsi
leaq 0xd346f(%rip), %rdx     # 0x103f75
movl 0x4(%rsp), %ecx
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0xde40c
movl 0x20(%r14,%r13,4), %edx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xdf153
incq %r13
jmp 0x30a37
addq $0x68, %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/bintext.c
// Function: do_read_font_data
static void do_read_font_data(deark *c, lctx *d, i64 pos)
{
	u32 crc;
	struct de_crcobj *crco;

	de_dbg(c, "font at %"I64_FMT", %"I64_FMT" bytes", pos, d->font_data_len);
	de_dbg_indent(c, 1);
	d->font_data = de_malloc(c, d->font_data_len);
	de_read(d->font_data, pos, d->font_data_len);

	crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);
	de_crcobj_addbuf(crco, d->font_data, d->font_data_len);
	crc = de_crcobj_getval(crco);
	de_crcobj_destroy(crco);

	d->is_standard_font = de_font_is_standard_vga_font(c, crc);
	de_dbg(c, "font crc: 0x%08x (%s)", (UI)crc,
		d->is_standard_font?"known CP437 font":"unrecognized");

	// TODO: This feature should probably be moved to the PSF module, or
	// removed.
	if(de_get_ext_option(c, "font:dumpvgafont")) {
		dbuf *df;
		df = dbuf_create_output_file(c, "font.dat", NULL, DE_CREATEFLAG_IS_AUX);
		dbuf_write(df, d->font_data, d->font_data_len);
		dbuf_close(df);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
leaq 0xd967d(%rip), %rsi     # 0x10a1df
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, 0x18(%r14)
movq 0x18(%rbx), %rdi
movq 0x10(%r14), %rcx
movq %rax, %rsi
movq %r15, %rdx
callq 0xe3cb7
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0xe0ae9
movq %rax, %r15
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0xe0ecf
movq %r15, %rdi
callq 0xe0e95
movl %eax, %ebp
movq %r15, %rdi
callq 0xe0e8d
movq %rbx, %rdi
movl %ebp, %esi
callq 0xea0c8
movl %eax, 0x20(%r14)
testl %eax, %eax
leaq 0xd963f(%rip), %rax     # 0x10a21d
leaq 0xd9627(%rip), %rcx     # 0x10a20c
cmoveq %rax, %rcx
leaq 0xd9606(%rip), %rsi     # 0x10a1f6
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
leaq 0xd9627(%rip), %rsi     # 0x10a22a
movq %rbx, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x30c3f
leaq 0xd9624(%rip), %rsi     # 0x10a23b
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe4e62
movq %rax, %r15
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0xe46ba
movq %r15, %rdi
callq 0xe5591
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xdeba7