LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: lha_calc_checksum
static u32 lha_calc_checksum(dbuf *f, i64 pos, i64 len, struct de_crcobj *crco_cksum)
{
	u32 v;

	de_crcobj_reset(crco_cksum);
	de_crcobj_addslice(crco_cksum, f, pos, len);
	v = de_crcobj_getval(crco_cksum);
	return v & 0xff;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdi
callq 0xebdc3
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xebf09
movq %rbx, %rdi
callq 0xebe2a
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: get_cmpr_meth_info
static void get_cmpr_meth_info(const u8 idbuf[5], enum lha_basefmt_enum basefmt,
	struct cmpr_meth_info *cmi)
{
	size_t k;
	const struct cmpr_meth_array_item *cmai = NULL;

	// The first 4 bytes are unique for all known methods.
	cmi->uniq_id = (u32)de_getu32be_direct(idbuf);

	de_memcpy(cmi->id_raw, idbuf, 5);

	// All "possible" methods only use printable characters.
	de_memcpy(cmi->id_printable_sz, idbuf, 5);
	cmi->id_printable_sz[5] = '\0';

	for(k=0; k<DE_ARRAYCOUNT(cmpr_meth_arr); k++) {
		if(cmpr_meth_arr[k].basefmt != basefmt) continue;
		if(cmpr_meth_arr[k].uniq_id == cmi->uniq_id) {
			cmai = &cmpr_meth_arr[k];
			break;
		}
	}

	if(cmai) {
		cmi->is_recognized = 1;
		cmi->decompressor = cmai->decompressor;
	}
	else if(basefmt==BASEFMT_LHA) {
		for(k=0; k<DE_ARRAYCOUNT(other_known_cmpr_methods); k++) {
			if(other_known_cmpr_methods[k] == cmi->uniq_id) {
				cmi->is_recognized = 1;
				break;
			}
		}
	}

	if(cmai && cmai->descr) {
		de_strlcpy(cmi->descr, cmai->descr, sizeof(cmi->descr));
	}
	else if(cmi->is_recognized) {
		de_strlcpy(cmi->descr, "recognized, but no info avail.", sizeof(cmi->descr));
	}
	else {
		de_strlcpy(cmi->descr, "?", sizeof(cmi->descr));
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0xef325
movl %eax, 0x4(%rbx)
movl (%r14), %ecx
movl %ecx, 0x10(%rbx)
movb 0x4(%r14), %cl
movb %cl, 0x14(%rbx)
movl (%r14), %ecx
movl %ecx, 0x15(%rbx)
movb 0x4(%r14), %cl
movb %cl, 0x19(%rbx)
movb $0x0, 0x1a(%rbx)
xorl %ecx, %ecx
leaq 0xfcaac(%rip), %rdx     # 0x183b30
xorl %esi, %esi
cmpl %ebp, (%rsi,%rdx)
jne 0x87091
cmpl %eax, 0x8(%rsi,%rdx)
je 0x870a0
addq $0x20, %rsi
cmpq $0x2c0, %rsi            # imm = 0x2C0
jne 0x87086
jmp 0x870a6
addq %rsi, %rdx
movq %rdx, %rcx
testq %rcx, %rcx
je 0x870b8
movb $0x1, (%rbx)
movq 0x18(%rcx), %rax
movq %rax, 0x8(%rbx)
jmp 0x870d9
testl %ebp, %ebp
jne 0x870d9
xorl %edx, %edx
leaq 0xa481b(%rip), %rsi     # 0x12b8e0
cmpl %eax, (%rdx,%rsi)
je 0x870d6
addq $0x4, %rdx
cmpq $0x4c, %rdx
jne 0x870c5
jmp 0x870d9
movb $0x1, (%rbx)
testq %rcx, %rcx
je 0x870f5
movq 0x10(%rcx), %rsi
testq %rsi, %rsi
je 0x870f5
addq $0x1b, %rbx
movl $0x50, %edx
movq %rbx, %rdi
jmp 0x87113
leaq 0x1b(%rbx), %rdi
cmpb $0x0, (%rbx)
je 0x87107
leaq 0xa4b65(%rip), %rsi     # 0x12bc6a
jmp 0x8710e
leaq 0xa4d5b(%rip), %rsi     # 0x12be69
movl $0x50, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0xe8ded
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: read_unix_timestamp
static void read_unix_timestamp(deark *c, lctx *d, struct member_data *md,
	i64 pos, int tsidx, const char *name)
{
	i64 t;
	char timestamp_buf[64];
	struct de_timestamp tmp_timestamp;

	t = de_geti32le(pos);
	de_unix_time_to_timestamp(t, &tmp_timestamp, 0x1);
	de_timestamp_to_string(&tmp_timestamp, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s: %d (%s)", name, (int)t, timestamp_buf);
	apply_timestamp(c, d, md, tsidx, &tmp_timestamp, 50);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r14
movl %ecx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef417
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xeace2
leaq 0x20(%rsp), %rbx
movl $0x40, %edx
movq %r13, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0xa4c5b(%rip), %rsi     # 0x12bde5
movq %r15, %rdi
movq %r14, %rdx
movl %r12d, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xe9226
testl %ebp, %ebp
js 0x871db
cmpb $0x0, 0x10(%rsp)
je 0x871db
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsp), %rcx
cmpl $0x32, 0x90(%rcx,%rax,8)
jg 0x871db
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
addq $0x80, %rax
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rax)
movl $0x32, 0x10(%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: read_filename_hlev0
static void read_filename_hlev0(deark *c, lctx *d, struct member_data *md,
	i64 pos, i64 len)
{
	struct de_strarray *sa = NULL;

	if(md->filename) {
		ucstring_empty(md->filename);
	}
	else {
		md->filename = ucstring_create(c);
	}

	sa = de_strarray_create(c, MAX_SUBDIR_LEVEL+2);
	read_path_to_strarray(c, d, md, c->infile, pos, len, sa, 0);

	de_strarray_make_path(sa, md->filename, DE_MPFLAG_NOTRAILINGSLASH);
	de_dbg(c, "filename (parsed): \"%s\"", ucstring_getpsz_d(md->filename));

	de_strarray_destroy(sa);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq 0x70(%rsi), %rdi
testq %rdi, %rdi
je 0x87213
callq 0xf6883
jmp 0x8721f
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x70(%r14)
movl $0x22, %esi
movq %rbx, %rdi
callq 0xf7666
movq %rax, %r12
movq 0x18(%rbx), %rdx
movl $0x0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rcx
movq %r15, %r8
movq %rax, %r9
callq 0x87f04
movq 0x70(%r14), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0xf776e
movq 0x70(%r14), %rdi
callq 0xf7557
leaq 0xa4bdc(%rip), %rsi     # 0x12be4b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf7689
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: read_filename_hlev1_or_exthdr
static void read_filename_hlev1_or_exthdr(deark *c, lctx *d, struct member_data *md,
	i64 pos, i64 len)
{
	i64 i;

	if(md->filename) {
		ucstring_empty(md->filename);
	}
	else {
		md->filename = ucstring_create(c);
	}

	// Some files seem to assume NUL termination is allowed.
	dbuf_read_to_ucstring(c->infile, pos, len,
		md->filename, DE_CONVFLAG_STOP_AT_NUL, md->encoding);
	de_dbg(c, "filename: \"%s\"", ucstring_getpsz_d(md->filename));

	// I don't think slashes are allowed
	for(i=0; i<md->filename->len; i++) {
		if(md->filename->str[i]=='/') {
			md->filename->str[i]='_';
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x70(%rsi), %rdi
testq %rdi, %rdi
je 0x872b5
callq 0xf6883
jmp 0x872c1
movq %r14, %rdi
callq 0xf6870
movq %rax, 0x70(%rbx)
movq 0x18(%r14), %rdi
movq 0x70(%rbx), %rcx
movl 0x4(%rbx), %r9d
movq %r12, %rsi
movq %r15, %rdx
movl $0x1, %r8d
callq 0xf01b0
movq 0x70(%rbx), %rdi
callq 0xf7557
leaq 0xb46e6(%rip), %rsi     # 0x13b9d4
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x70(%rbx), %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
jle 0x87323
movq 0x8(%rcx), %rcx
xorl %edx, %edx
cmpl $0x2f, (%rcx,%rdx,4)
jne 0x8731b
movl $0x5f, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x8730e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: get_os_name
static const char *get_os_name(u8 id)
{
	const char *name = NULL;
	switch(id) {
	case ' ': name="unspecified"; break;
	case '2': name="OS/2"; break;
	case '3': name="OS/386?"; break;
	case '9': name="OS-9"; break;
	case 'A': name="Amiga"; break;
	case 'C': name="CP/M"; break;
	case 'F': name="FLEX"; break;
	case 'H': name="Human68K"; break;
	case 'J': name="JVM"; break;
	case 'K': name="OS-9/68K"; break;
	case 'M': name="DOS"; break;
	case 'R': name="RUNser"; break;
	case 'T': name="TownsOS"; break;
	case 'U': name="Unix"; break;
	case 'W': name="Windows NT"; break;
	case 'a': name="Atari ST?"; break;
	case 'm': name="Macintosh"; break;
	case 'w': name="Windows"; break;
	}
	return name?name:"?";
}

// Assembly:
leaq 0xa4b33(%rip), %rax     # 0x12be69
cmpl $0x40, %edi
jle 0x87364
cmpl $0x60, %edi
jg 0x87383
addl $-0x41, %edi
cmpl $0x16, %edi
ja 0x87427
leaq 0xa451d(%rip), %rcx     # 0x12b870
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0x91014(%rip), %rax     # 0x118377
retq
cmpl $0x32, %edi
jg 0x873a6
cmpl $0x20, %edi
je 0x87408
cmpl $0x32, %edi
jne 0x87427
leaq 0x91001(%rip), %rax     # 0x118383
retq
cmpl $0x61, %edi
je 0x87418
cmpl $0x6d, %edi
je 0x87420
cmpl $0x77, %edi
jne 0x87427
leaq 0xc477a(%rip), %rax     # 0x14bb1f
retq
cmpl $0x33, %edi
je 0x87410
cmpl $0x39, %edi
jne 0x87427
leaq 0xa4ab4(%rip), %rax     # 0x12be6b
retq
leaq 0xa4adb(%rip), %rax     # 0x12be9a
retq
leaq 0xbc164(%rip), %rax     # 0x14352b
retq
leaq 0xa4ab3(%rip), %rax     # 0x12be82
retq
leaq 0xbc6ac(%rip), %rax     # 0x143a83
retq
leaq 0xa4ab3(%rip), %rax     # 0x12be92
retq
leaq 0xa4a8e(%rip), %rax     # 0x12be75
retq
leaq 0xa4a81(%rip), %rax     # 0x12be70
retq
leaq 0xa4a87(%rip), %rax     # 0x12be7e
retq
leaq 0x9932c(%rip), %rax     # 0x12072b
retq
leaq 0xa4a84(%rip), %rax     # 0x12be8b
retq
leaq 0xa09b6(%rip), %rax     # 0x127dc5
retq
leaq 0xa4a4c(%rip), %rax     # 0x12be63
retq
leaq 0xa4a86(%rip), %rax     # 0x12bea5
retq
leaq 0xbc4df(%rip), %rax     # 0x143906
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: make_fullfilename
static void make_fullfilename(deark *c, lctx *d, struct member_data *md)
{
	if(md->fullfilename) return;

	if(!md->filename) {
		md->filename = ucstring_create(c);
	}
	md->fullfilename = ucstring_create(c);

	if(md->hlev==0 && d->basefmt!=BASEFMT_TPK) {
		ucstring_append_ucstring(md->fullfilename, md->filename);
	}
	else {
		if(md->is_dir) {
			ucstring_append_ucstring(md->fullfilename, md->dirname);
		}
		else {
			if(ucstring_isnonempty(md->dirname)) {
				ucstring_append_ucstring(md->fullfilename, md->dirname);
				ucstring_append_sz(md->fullfilename, "/", DE_ENCODING_LATIN1);
			}
			if(ucstring_isnonempty(md->filename)) {
				ucstring_append_ucstring(md->fullfilename, md->filename);
			}
			else {
				ucstring_append_char(md->fullfilename, '_');
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x78(%rdx)
je 0x876b0
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x70(%rdx)
jne 0x876cc
movq %r15, %rdi
callq 0xf6870
movq %rax, 0x70(%rbx)
movq %r15, %rdi
callq 0xf6870
movq %rax, 0x78(%rbx)
cmpb $0x0, (%rbx)
jne 0x876e4
cmpl $0x2, 0xc(%r14)
jne 0x87733
cmpb $0x0, 0x20(%rbx)
movq 0x68(%rbx), %rsi
jne 0x87737
movq %rsi, %rdi
callq 0xf6c00
testl %eax, %eax
je 0x8771c
movq 0x68(%rbx), %rsi
movq 0x78(%rbx), %rdi
callq 0xf6969
movq 0x78(%rbx), %rdi
leaq 0x8a95c(%rip), %rsi     # 0x11206e
movl $0x5, %edx
callq 0xf6a40
movq 0x70(%rbx), %rdi
callq 0xf6c00
movq 0x78(%rbx), %rdi
testl %eax, %eax
je 0x87744
movq 0x70(%rbx), %rsi
jmp 0x8773a
movq 0x70(%rbx), %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf6969
movl $0x5f, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xf69a2
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: is_possible_cmpr_meth
static int is_possible_cmpr_meth(const u8 m[5])
{
	if(m[0]!=m[4]) return 0;
	if(m[0]==' ' && m[1]=='L' && m[2]=='H' && lha_isdigit(m[3])) return 1;
	if(m[0]!='-') return 0;
	if(!lha_isalpha(m[1]) ||
		!lha_isalnum(m[2]) ||
		!lha_isalnum(m[3]))
	{
		return 0;
	}
	return 1;
}

// Assembly:
movzbl (%rdi), %ecx
cmpb 0x4(%rdi), %cl
jne 0x87aa4
cmpl $0x2d, %ecx
je 0x87a99
cmpl $0x20, %ecx
jne 0x87aa4
cmpb $0x4c, 0x1(%rdi)
jne 0x87a94
cmpb $0x48, 0x2(%rdi)
jne 0x87a94
movb 0x3(%rdi), %dl
addb $-0x3a, %dl
movl $0x1, %eax
cmpb $-0xb, %dl
ja 0x87ac1
cmpl $0x2d, %ecx
jne 0x87aa4
movb 0x1(%rdi), %al
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1a, %al
jae 0x87aa7
xorl %eax, %eax
retq
movb 0x2(%rdi), %cl
leal -0x3a(%rcx), %eax
cmpb $-0xb, %al
ja 0x87ac2
andb $-0x21, %cl
addb $-0x5b, %cl
movl $0x0, %eax
cmpb $-0x1a, %cl
jae 0x87ac2
retq
movb 0x3(%rdi), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x1a, %al
setb %al
orb %cl, %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: decompress_lh5x_auto
static void decompress_lh5x_auto(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	int fmt;

	switch(md->cmi->id_raw[3]) {
	case '4': case '5':
		fmt = DE_LH5X_FMT_LH5;
		break;
	case '6':
		fmt = DE_LH5X_FMT_LH6;
		break;
	case '7':
		if(d->lhark_policy<0) {
			detect_lhark(c, d, md, dcmpri);
		}
		if(d->lhark_policy>0) {
			fmt = DE_LH5X_FMT_LHARK;
		}
		else {
			fmt = DE_LH5X_FMT_LH7;
		}
		break;
	case '8':
		fmt = DE_LH5X_FMT_LH7;
		break;
	default:
		return;
	}

	decompress_lh5x_internal(c, d, dcmpri, dcmpro, dres, fmt);
}

// Assembly:
movq 0x18(%rdx), %rax
movzbl 0x13(%rax), %eax
addl $-0x34, %eax
cmpl $0x4, %eax
ja 0x87c59
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %r12
leaq 0xa3da9(%rip), %rcx     # 0x12b8cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x5, %eax
jmp 0x87c21
movl $0x7, %eax
jmp 0x87c21
movl $0x6, %eax
jmp 0x87c21
movq %rsi, %r13
cmpl $0x0, 0x4(%rsi)
jns 0x87c0f
movl 0x8(%r13), %eax
testl %eax, %eax
js 0x87b6f
movl %eax, 0x4(%r13)
leaq 0xa4236(%rip), %rdx     # 0x12bda0
jmp 0x87bf1
movq %rdx, %rbp
leaq 0xa420a(%rip), %rsi     # 0x12bd83
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
movl $0x1, %esi
callq 0xe9585
leaq 0xa421b(%rip), %rdx     # 0x12bdb2
cmpb $0x1, (%rbp)
jne 0x87beb
cmpb $0x20, 0x50(%rbp)
jne 0x87beb
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl $0x7, %ecx
callq 0x87d4f
leaq 0xa41f5(%rip), %rdx     # 0x12bdb2
testl %eax, %eax
movl $0x0, %eax
jne 0x87bed
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl $0x64, %ecx
callq 0x87d4f
testl %eax, %eax
je 0x87c5a
movl $0x1, %eax
leaq 0xa41b1(%rip), %rdx     # 0x12bd9a
jmp 0x87bed
xorl %eax, %eax
movl %eax, 0x4(%r13)
leaq 0xa41c7(%rip), %rsi     # 0x12bdbf
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
cmpl $0x0, 0x4(%r13)
movl $0x64, %ecx
movl $0x7, %eax
cmovgl %ecx, %eax
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
movl %eax, (%r8)
movw $0x103, 0x4(%r8)        # imm = 0x103
movb $0x20, 0x6(%r8)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xff330
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x4(%r13)
jmp 0x87b63
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: decompress_tk1
static void decompress_tk1(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	u8 need_errmsg = 0;
	i64 lzhuf_orig_len;

	if(dcmpri->len < 4) {
		need_errmsg = 1;
		goto done;
	}


	lzhuf_orig_len = dbuf_getu32le(dcmpri->f, dcmpri->pos);
	if(lzhuf_orig_len != md->orig_size) {
		need_errmsg = 1;
		goto done;
	}

	dcmpri->len -= 4;
	dcmpri->pos += 4;

	fmtutil_lh1_codectype1(c, dcmpri, dcmpro, dres, NULL);

done:
	if(need_errmsg) {
		de_dfilter_set_generic_error(c, dres, NULL);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %rdi, %r15
cmpq $0x4, 0x10(%rcx)
jl 0x87d09
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
callq 0xef37e
cmpq 0x28(%r13), %rax
jne 0x87d09
addq $-0x4, 0x10(%r12)
addq $0x4, 0x8(%r12)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x107127
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfa815
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: decompress_lh5x_dry_run
static int decompress_lh5x_dry_run(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, int fmt)
{
	int retval = 0;
	dbuf *outf = NULL;
	struct de_crcobj *crco = NULL;
	u32 crc_calc;
	int old_debug_level;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	// Make a "dummy" dbuf to write to, which doesn't store the data, but
	// tracks the size and CRC.
	outf = dbuf_create_custom_dbuf(c, 0, 0);
	dbuf_enable_wbuffer(outf);
	crco = de_crcobj_create(c, DE_CRCOBJ_CRC16_ARC);
	dbuf_set_writelistener(outf, de_writelistener_for_crc, crco);

	de_dfilter_init_objects(c, NULL, &dcmpro, &dres);
	dcmpro.f = outf;
	dcmpro.len_known = 1;
	dcmpro.expected_len = md->orig_size;

	old_debug_level = c->debug_level;
	c->debug_level = 0; // hack
	decompress_lh5x_internal(c, d, dcmpri, &dcmpro, &dres, fmt);
	c->debug_level = old_debug_level;
	dbuf_flush(outf);

	if(dres.errcode) goto done;
	if(outf->len != md->orig_size) goto done;
	// Note: Another possible test would be if
	//  (dres.bytes_consumed == md->compressed_data_len).
	crc_calc = de_crcobj_getval(crco);
	if(crc_calc != md->crc_reported) goto done;
	retval = 1;

done:
	dbuf_close(outf);
	de_crcobj_destroy(crco);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, %r13
xorl %esi, %esi
xorl %edx, %edx
callq 0xf19d3
movq %rax, %r14
movq %rax, %rdi
callq 0xf0e3f
movq %r13, %rdi
movl $0x21, %esi
callq 0xeba56
movq %rax, %r12
leaq 0x69cb7(%rip), %rsi     # 0xf1a51
movq %r14, %rdi
movq %rax, %rdx
callq 0xf1a12
leaq 0x30(%rsp), %rbp
leaq 0x48(%rsp), %r15
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
callq 0xfa6e0
movq %r14, (%rbp)
movb $0x1, 0x8(%rbp)
movq %rbx, 0x10(%rsp)
movq 0x28(%rbx), %rax
movq %rax, 0x10(%rbp)
movl (%r13), %ebx
movl $0x0, (%r13)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
movl 0xc(%rsp), %eax
movl %eax, (%r8)
movw $0x103, 0x4(%r8)        # imm = 0x103
movb $0x20, 0x6(%r8)
movq %r13, %rdi
movq 0x18(%rsp), %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0xff330
movl %ebx, (%r13)
movq %r14, %rdi
callq 0xf0ea4
cmpl $0x0, (%r15)
je 0x87e28
xorl %ebx, %ebx
jmp 0x87e4d
movq 0x18(%r14), %rax
movq 0x10(%rsp), %r15
cmpq 0x28(%r15), %rax
movl $0x0, %ebx
jne 0x87e4d
movq %r12, %rdi
callq 0xebe2a
xorl %ebx, %ebx
cmpl 0x4c(%r15), %eax
sete %bl
movq %r14, %rdi
callq 0xf0b13
movq %r12, %rdi
callq 0xebe1d
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: do_swg_string_field
static void do_swg_string_field(deark *c, lctx *d,
	de_ucstring *s, i64 pos, i64 fldlen, const char *name)
{
	i64 dlen = (i64)de_getbyte(pos);
	if(dlen>fldlen-1) dlen = fldlen-1;
	ucstring_empty(s);
	dbuf_read_to_ucstring(c->infile, pos+1, dlen, s, 0, d->input_encoding);
	ucstring_strip_trailing_spaces(s);
	de_dbg(c, "SWG %s: \"%s\"", name, ucstring_getpsz_d(s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rcx, %rsi
callq 0xef0d5
movzbl %al, %eax
leaq -0x1(%r12), %rbx
cmpq %r12, %rax
cmovlq %rax, %rbx
movq %r15, %rdi
callq 0xf6883
movq 0x18(%r14), %rdi
incq %r13
movl (%rbp), %r9d
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xf01b0
movq %r15, %rdi
callq 0xf6900
movq %r15, %rdi
callq 0xf7557
leaq 0xa3f59(%rip), %rsi     # 0x12be3e
movq %r14, %rdi
movq (%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: read_path_to_strarray
static void read_path_to_strarray(deark *c, lctx *d, struct member_data *md,
	dbuf *inf, i64 pos, i64 len, struct de_strarray *sa, int is_exthdr_dirname)
{
	dbuf *tmpdbuf = NULL;
	de_ucstring *tmpstr = NULL;
	i64 component_startpos;
	i64 component_len;
	i64 i;

	tmpstr = ucstring_create(c);

	tmpdbuf = dbuf_create_membuf(c, len, 0);
	dbuf_copy(inf, pos, len, tmpdbuf);

	component_startpos = 0;
	component_len = 0;

	for(i=0; i<len; i++) {
		u8 ch;

		ch = dbuf_getbyte(tmpdbuf, i);
		if(ch==0x00) break; // Tolerate NUL termination
		if((is_exthdr_dirname && ch==0xff) ||
			(!is_exthdr_dirname && (ch=='\\' || ch=='/')))
		{
			component_len = i - component_startpos;
			rp_add_component(c, d, md, tmpdbuf, component_startpos, component_len, sa, tmpstr);
			component_startpos = i+1;
			component_len = 0;
		}
		else {
			component_len++;
		}
	}
	rp_add_component(c, d, md, tmpdbuf, component_startpos, component_len, sa, tmpstr);

	dbuf_close(tmpdbuf);
	ucstring_destroy(tmpstr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0xf6870
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xf0faf
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0xefabc
testq %r13, %r13
jle 0x87fec
decq %r13
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %r12, %rdi
movq %rbx, %rsi
callq 0xef0d5
movl %eax, %r14d
testb %al, %al
je 0x87fc8
cmpl $0x0, 0xc(%rsp)
setne %al
cmpb $-0x1, %r14b
sete %cl
testb %cl, %al
je 0x87fbe
movq %rbx, %rcx
subq %rbp, %rcx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x8802d
leaq 0x1(%rbx), %rbp
xorl %r15d, %r15d
jmp 0x87fc8
cmpl $0x0, 0xc(%rsp)
je 0x87fdb
incq %r15
testb %r14b, %r14b
je 0x87fef
leaq 0x1(%rbx), %rax
cmpq %rbx, %r13
movq %rax, %rbx
jne 0x87f70
jmp 0x87fef
cmpb $0x5c, %r14b
je 0x87f95
movzbl %r14b, %eax
cmpl $0x2f, %eax
je 0x87f95
jmp 0x87fc5
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq 0x20(%rsp), %r8
movq 0x18(%rsp), %rbx
movq %rbx, %r9
callq 0x8802d
movq %r12, %rdi
callq 0xf0b13
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: rp_add_component
static void rp_add_component(deark *c, lctx *d, struct member_data *md,
	dbuf *f, i64 pos, i64 len, struct de_strarray *sa, de_ucstring *tmpstr)
{
	if(len<1) return;
	ucstring_empty(tmpstr);
	dbuf_read_to_ucstring(f, pos, len, tmpstr, 0, md->encoding);
	de_strarray_push(sa, tmpstr);
}

// Assembly:
testq %rcx, %rcx
jle 0x88088
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %r9, %rdi
callq 0xf6883
movl 0x4(%rbp), %r9d
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xf01b0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf7705
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_common
static void exthdr_common(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	if(dlen<2) return;
	md->hdr_crc_reported = (u32)de_getu16le(pos);
	md->have_hdr_crc_reported = 1;
	md->hdr_crc_field_pos = pos;
	de_dbg(c, "header crc (reported): 0x%04x", (UI)md->hdr_crc_reported);
	// TODO: Additional information
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x2, 0x20(%rsp)
jge 0x8809c
popq %rbx
popq %r14
popq %r15
retq
movq %r9, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xef1ca
movl %eax, 0x38(%r15)
movb $0x1, 0x34(%r15)
movq %r14, 0x40(%r15)
leaq 0xa42b0(%rip), %rsi     # 0x12c375
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_dirname
static void exthdr_dirname(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	struct de_strarray *dirname_sa = NULL;

	if(md->dirname) {
		ucstring_empty(md->dirname);
	}
	else {
		md->dirname = ucstring_create(c);
	}

	dirname_sa = de_strarray_create(c, MAX_SUBDIR_LEVEL+2);
	// 0xff is used as the path separator. Don't know what happens if a directory
	// name contains an actual 0xff byte.
	read_path_to_strarray(c, d, md, c->infile, pos, dlen, dirname_sa, 1);
	de_strarray_make_path(dirname_sa, md->dirname, DE_MPFLAG_NOTRAILINGSLASH);
	de_dbg(c, "%s (parsed): \"%s\"", e->name, ucstring_getpsz_d(md->dirname));

	de_strarray_destroy(dirname_sa);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %r15
movq %rdx, %r14
movq %rdi, %rbx
movq 0x40(%rsp), %rbp
movq 0x68(%rdx), %rdi
testq %rdi, %rdi
je 0x88112
callq 0xf6883
jmp 0x8811e
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x68(%r14)
movl $0x22, %esi
movq %rbx, %rdi
callq 0xf7666
movq %rax, %r12
movq 0x18(%rbx), %rdx
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rcx
movq %rbp, %r8
movq %rax, %r9
callq 0x87f04
movq 0x68(%r14), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0xf776e
movq 0x8(%r15), %r15
movq 0x68(%r14), %rdi
callq 0xf7557
leaq 0xa3f10(%rip), %rsi     # 0x12c082
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf7689
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_msdosattribs
static void exthdr_msdosattribs(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	u32 attribs;
	de_ucstring *descr = NULL;

	if(dlen<2) goto done;
	attribs = (u32)de_getu16le(pos);
	descr = ucstring_create(c);
	de_describe_dos_attribs(c, (UI)attribs, descr, 0);
	de_dbg(c, "%s: 0x%04x (%s)", e->name, (UI)attribs, ucstring_getpsz_d(descr));
done:
	ucstring_destroy(descr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x2, 0x30(%rsp)
jge 0x881ad
xorl %r14d, %r14d
jmp 0x88203
movq %r8, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xef1ca
movq %rax, %r12
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
movq %rbx, %rdi
movl %r12d, %esi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xeb03c
movq 0x8(%r15), %r15
movq %r14, %rdi
callq 0xf7557
leaq 0xa3ea4(%rip), %rsi     # 0x12c094
movq %rbx, %rdi
movq %r15, %rdx
movl %r12d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_windowstimestamp
static void exthdr_windowstimestamp(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	if(dlen<24) return;
	read_windows_FILETIME(c, d, md, pos,    DE_TIMESTAMPIDX_CREATE, "create time");
	read_windows_FILETIME(c, d, md, pos+8,  DE_TIMESTAMPIDX_MODIFY, "mod time   ");
	read_windows_FILETIME(c, d, md, pos+16, DE_TIMESTAMPIDX_ACCESS, "access time");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x18, 0x20(%rsp)
jge 0x88229
popq %rbx
popq %r14
popq %r15
retq
movq %r9, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0xa6f04(%rip), %r8      # 0x12f13d
movq %rdx, %rsi
movq %r9, %rdx
movl $0x1, %ecx
callq 0x88441
leaq 0x8(%rbx), %rdx
leaq 0xa3e50(%rip), %r8      # 0x12c0a4
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x88441
addq $0x10, %rbx
leaq 0xa3e44(%rip), %r8      # 0x12c0b0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x88441
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_codepage
static void exthdr_codepage(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	int n_codepage;
	de_encoding n_encoding;
	char descr[100];

	if(dlen!=4) return;
	n_codepage = (int)de_geti32le(pos);
	n_encoding = de_windows_codepage_to_encoding(c, n_codepage, descr, sizeof(descr), 0);
	de_dbg(c, "codepage: %d (%s)", n_codepage, descr);
	if(n_encoding != DE_ENCODING_UNKNOWN) {
		md->encoding = n_encoding;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
cmpq $0x4, 0xa0(%rsp)
jne 0x882f7
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xef417
movq %rax, %r15
movq %rsp, %r12
movl $0x64, %ecx
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xed1c6
movl %eax, %ebp
leaq 0xa3e51(%rip), %rsi     # 0x12c131
movq %r14, %rdi
movl %r15d, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9226
testl %ebp, %ebp
je 0x882f7
movl %ebp, 0x4(%rbx)
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_unixperms
static void exthdr_unixperms(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	UI mode;

	if(dlen<2) return;
	mode = (UI)de_getu16le(pos);
	de_dbg(c, "mode: octal(%06o)", mode);
	interpret_unix_perms(c, d, md, mode);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x2, 0x20(%rsp)
jl 0x88364
movq %rdx, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xef1ca
movq %rax, %r14
leaq 0x89ce7(%rip), %rsi     # 0x112014
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
testw %r14w, %r14w
jns 0x88350
testb $0x49, %r14b
je 0x8834c
movb $0x1, 0x23(%rbx)
jmp 0x88350
movb $0x1, 0x22(%rbx)
andl $0xf000, %r14d          # imm = 0xF000
cmpl $0xa000, %r14d          # imm = 0xA000
jne 0x88364
movb $0x1, 0x21(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: exthdr_unixuidgid
static void exthdr_unixuidgid(deark *c, lctx *d, struct member_data *md,
	u8 id, const struct exthdr_type_info_struct *e,
	i64 pos, i64 dlen)
{
	i64 uid, gid;
	if(dlen<4) return;

	// It's strange that the GID comes first, while the UID comes first in the
	// level-0 "extended area".
	gid = de_getu16le(pos);
	de_dbg(c, "gid: %d", (int)gid);
	uid = de_getu16le(pos+2);
	de_dbg(c, "uid: %d", (int)uid);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x4, 0x20(%rsp)
jge 0x8837e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r9, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xef1ca
leaq 0xa3b36(%rip), %rsi     # 0x12becd
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
addq $0x2, %r14
movq %r14, %rsi
callq 0xef1ca
leaq 0xa3b0b(%rip), %rsi     # 0x12bec5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: read_windows_FILETIME
static void read_windows_FILETIME(deark *c, lctx *d, struct member_data *md,
	i64 pos, int tsidx, const char *name)
{
	i64 t_FILETIME;
	char timestamp_buf[64];
	struct de_timestamp tmp_timestamp;

	t_FILETIME = de_geti64le(pos);
	de_FILETIME_to_timestamp(t_FILETIME, &tmp_timestamp, 0x1);
	if(t_FILETIME<=0) tmp_timestamp.is_valid = 0;
	de_timestamp_to_string(&tmp_timestamp, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s: %"I64_FMT" (%s)", name, t_FILETIME, timestamp_buf);
	apply_timestamp(c, d, md, tsidx, &tmp_timestamp, 90);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r14
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef536
movq %rax, %r12
movq %rsp, %rsi
movq %rax, %rdi
movl $0x1, %edx
callq 0xead1a
testq %r12, %r12
jg 0x88482
movb $0x0, (%rsp)
movq %rsp, %rdi
leaq 0x10(%rsp), %r13
movl $0x40, %edx
movq %r13, %rsi
xorl %ecx, %ecx
callq 0xeb4f8
leaq 0x8e6e1(%rip), %rsi     # 0x116b81
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0xe9226
testl %ebp, %ebp
js 0x884e5
cmpb $0x0, (%rsp)
je 0x884e5
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
cmpl $0x5a, 0x90(%rbx,%rax,8)
jg 0x884e5
leaq (%rbx,%rax,8), %rax
addq $0x80, %rax
movups (%rsp), %xmm0
movups %xmm0, (%rax)
movl $0x5a, 0x10(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: looks_like_car_member
static int looks_like_car_member(deark *c, i64 pos)
{
	u8 b[16];

	de_read(b, pos, 16);
	if(b[2]!='-' || b[3]!='l'|| b[4]!='h' || b[6]!='-') return 0;
	if(b[5]!='0' && b[5]!='5') return 0;
	if((int)b[0] != (int)b[15] + 25) return 0;
	if(dbuf_memcmp(c->infile, pos + (i64)b[15] + 24, (const u8*)"\x20\x00\x00", 3)) return 0;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rsp, %r15
movl $0x10, %ecx
movq %r15, %rsi
movq %rbx, %rdx
callq 0xeeee8
xorl %eax, %eax
cmpb $0x2d, 0x2(%r15)
jne 0x8857d
cmpb $0x6c, 0x3(%rsp)
jne 0x8857d
cmpb $0x68, 0x4(%rsp)
jne 0x8857d
cmpb $0x2d, 0x6(%rsp)
jne 0x8857d
movzbl 0x5(%rsp), %ecx
cmpl $0x35, %ecx
je 0x88547
cmpl $0x30, %ecx
jne 0x8857d
movzbl (%rsp), %edx
movzbl 0xf(%rsp), %ecx
leal 0x19(%rcx), %esi
cmpl %edx, %esi
jne 0x8857d
movq 0x18(%r14), %rdi
leaq (%rbx,%rcx), %rsi
addq $0x18, %rsi
leaq 0xa3efc(%rip), %rdx     # 0x12c466
movl $0x3, %ecx
callq 0xf025e
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: looks_like_lharc_sfx_com
static int looks_like_lharc_sfx_com(deark *c, int *is_larc)
{
	u64 v;
	i64 pos = 0;
	u8 b;

	b = de_getbyte_p(&pos);
	if(b!=0xeb) return 0;
	b = de_getbyte_p(&pos);
	pos += (i64)b;
	// I don't know how good this test is, but I don't trust the text signature.
	// It's not formatted consistently. And because the source code was released,
	// who knows what weirdness is out there?
	if(b==0x60 || b==0x6c) {
		v = dbuf_getu64be(c->infile, pos);
		if(v==0xfcbc0001bb0601e8ULL) {
			return 1;
		}
	}
	else if(b==0x1c) {
		v = dbuf_getu64be(c->infile, pos);
		if(v==0xfc8cc8030602018eULL) {
			*is_larc = 1;
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movq 0x18(%rdi), %rdi
callq 0xef14d
movl %eax, %ecx
xorl %eax, %eax
cmpb $-0x15, %cl
jne 0x8866e
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xef14d
movzbl %al, %eax
movq (%r15), %rsi
addq %rax, %rsi
movq %rsi, (%r15)
cmpb $0x1c, %al
je 0x88647
cmpl $0x6c, %eax
je 0x88625
cmpl $0x60, %eax
jne 0x8866c
movq 0x18(%r14), %rdi
callq 0xef66e
movq %rax, %rcx
movl $0x1, %eax
movabsq $-0x343fffe44f9fe18, %rdx # imm = 0xFCBC0001BB0601E8
cmpq %rdx, %rcx
jne 0x8866c
jmp 0x8866e
movq 0x18(%r14), %rdi
callq 0xef66e
movabsq $-0x37337fcf9fdfe72, %rcx # imm = 0xFC8CC8030602018E
cmpq %rcx, %rax
jne 0x8866c
movl $0x1, (%rbx)
movl $0x1, %eax
jmp 0x8866e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/lha.c
// Function: is_lharc_data_at
static int is_lharc_data_at(deark *c, i64 pos, i64 *pfoundpos)
{
	u8 b[5];

	if(pos+21 > c->infile->len) return 0;
	de_read(b, pos+2, sizeof(b));
	if(b[0]!='-' || b[1]!='l' || b[4]!='-') return 0;
	if(b[2]!='h' && b[2]!='z') return 0;
	*pfoundpos = pos;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x15(%rsi), %rax
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
cmpq 0x18(%rdi), %rax
jg 0x886d8
movq %rdx, %r14
movq %rsi, %r15
leaq 0x2(%rsi), %rdx
leaq 0x3(%rsp), %r12
movl $0x5, %ecx
movq %r12, %rsi
callq 0xeeee8
cmpb $0x2d, (%r12)
jne 0x886d8
cmpb $0x6c, 0x4(%rsp)
jne 0x886d8
cmpb $0x2d, 0x7(%rsp)
jne 0x886d8
movzbl 0x5(%rsp), %eax
cmpl $0x7a, %eax
je 0x886d0
cmpl $0x68, %eax
jne 0x886d8
movq %r15, (%r14)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: de_module_j2c
void de_module_j2c(deark *c, struct deark_module_info *mi)
{
	mi->id = "j2c";
	mi->desc = "JPEG 2000 codestream";
	mi->run_fn = de_run_j2c;
	mi->identify_fn = de_identify_j2c;
}

// Assembly:
leaq 0x8da1f(%rip), %rax     # 0x11610e
movq %rax, (%rsi)
leaq 0xa3d71(%rip), %rax     # 0x12c46a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x88714
movq %rax, 0x18(%rsi)
leaq 0x3e7(%rip), %rax       # 0x88af6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: handler_cod
static void handler_cod(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos1, i64 len)
{
	i64 pos = pos1;
	u8 coding_style;
	de_ucstring *s = NULL;
	u8 b;
	i64 n;

	if(len<5) goto done;
	coding_style = de_getbyte_p(&pos);
	s = ucstring_create(c);

	if((coding_style&0xf8)==0) {
		switch(coding_style&0x01) {
		case 0x0: ucstring_append_flags_item(s, "entropy coder, without partitions"); break;
		case 0x1: ucstring_append_flags_item(s, "entropy coder, with partitions"); break;
		}
		switch((coding_style&0x02)>>1) {
		case 0x0: ucstring_append_flags_item(s, "no SOP segments"); break;
		case 0x1: ucstring_append_flags_item(s, "has SOP segments"); break;
		}
		switch((coding_style&0x04)>>2) {
		case 0x0: ucstring_append_flags_item(s, "no EPH segments"); break;
		case 0x1: ucstring_append_flags_item(s, "has EPH segments"); break;
		}
	}
	else {
		ucstring_append_flags_item(s, "?");
	}
	de_dbg(c, "coding style: 0x%02x (%s)", (unsigned int)coding_style,
		ucstring_getpsz(s));

	b = de_getbyte_p(&pos);
	de_dbg(c, "progression order: %d", (int)b);
	n = de_getu16be_p(&pos);
	de_dbg(c, "number of layers: %d", (int)n);
	(void)de_getbyte_p(&pos);

	if(pos < pos1+len) {
		// TODO
		de_dbg2(c, "[not decoding the rest of this segment]");
	}

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
cmpq $0x5, %r9
jge 0x88d27
xorl %r14d, %r14d
jmp 0x88e3d
movq %r9, %r15
movq %r8, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rsp, %rsi
callq 0xef14d
movl %eax, %r13d
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
movzbl %r13b, %ebp
cmpb $0x7, %bpl
ja 0x88da8
leaq 0xa3a19(%rip), %rax     # 0x12c774
leaq 0xa39f0(%rip), %rsi     # 0x12c752
testb $0x1, %r13b
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0xf7566
testb $0x2, %r13b
leaq 0xa3a16(%rip), %rax     # 0x12c793
leaq 0xa3a1f(%rip), %rsi     # 0x12c7a3
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0xf7566
cmpb $0x4, %r13b
leaq 0xa3a19(%rip), %rax     # 0x12c7b4
leaq 0xa3a22(%rip), %rsi     # 0x12c7c4
cmovbq %rax, %rsi
jmp 0x88daf
leaq 0xa30ba(%rip), %rsi     # 0x12be69
movq %r14, %rdi
callq 0xf7566
movq %r14, %rdi
callq 0xf74bd
leaq 0xa3a0f(%rip), %rsi     # 0x12c7d5
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %rsp, %r13
movq %r13, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0xa3a01(%rip), %rsi     # 0x12c7ef
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef193
leaq 0xa39fa(%rip), %rsi     # 0x12c805
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef14d
addq %r12, %r15
cmpq %r15, (%r13)
jge 0x88e3d
leaq 0xa39e7(%rip), %rsi     # 0x12c81a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe93cf
movq %r14, %rdi
callq 0xf6bb0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: handler_qcd
static void handler_qcd(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos1, i64 len)
{
	i64 pos = pos1;
	u8 q_style;

	if(len<1) goto done;
	q_style = de_getbyte_p(&pos);
	de_dbg(c, "quantization style: 0x%02x", (unsigned int)q_style);

	if(pos < pos1+len) {
		// TODO
		de_dbg2(c, "[not decoding the rest of this segment]");
	}
done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
testq %r9, %r9
jle 0x890a7
movq %r9, %r14
movq %r8, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0xa3853(%rip), %rsi     # 0x12c8d6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq %r15, %r14
cmpq %r14, (%r12)
jge 0x890a7
leaq 0xa377d(%rip), %rsi     # 0x12c81a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe93cf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: handler_qcc
static void handler_qcc(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos1, i64 len)
{
	i64 pos = pos1;
	i64 compnum;

	if(pg->ncomp<257) {
		compnum = de_getbyte_p(&pos);
	}
	else {
		compnum = de_getu16be_p(&pos);
	}
	de_dbg(c, "component number: %d", (int)compnum);

	if(pos < pos1+len) {
		// TODO
		de_dbg2(c, "[not decoding the rest of this segment]");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rdi, %rbx
movq %r8, 0x8(%rsp)
cmpq $0x100, (%rdx)          # imm = 0x100
movq 0x18(%rdi), %rdi
leaq 0x8(%rsp), %rsi
jg 0x890e6
callq 0xef14d
movzbl %al, %edx
jmp 0x890ee
callq 0xef193
movq %rax, %rdx
leaq 0xa37fc(%rip), %rsi     # 0x12c8f1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq %r15, %r14
cmpq %r14, 0x8(%rsp)
jge 0x8911a
leaq 0xa370a(%rip), %rsi     # 0x12c81a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe93cf
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: handler_cme
static void handler_cme(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos, i64 data_size)
{
	i64 reg_val;
	i64 comment_pos;
	i64 comment_size;
	const char *name;

	if(data_size<2) goto done;

	reg_val = de_getu16be(pos);
	switch(reg_val) {
	case 0: name="binary"; break;
	case 1: name="text"; break;
	default: name="?";
	}
	de_dbg(c, "comment/extension type: %d (%s)", (int)reg_val, name);

	comment_pos = pos+2;
	comment_size = data_size-2;

	if(reg_val==1) {
		handle_comment(c, d, comment_pos, comment_size);
	}
	else {
		de_dbg_hexdump(c, c->infile, comment_pos, comment_size, 256, NULL, 0x1);
	}

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x2, %r9
jl 0x891d4
movq %r9, %r12
movq %r8, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r8, %rsi
callq 0xef169
movq %rax, %r13
cmpq $0x1, %rax
leaq 0xa38b5(%rip), %rax     # 0x12ca13
leaq 0xa2d04(%rip), %rdx     # 0x12be69
cmoveq %rax, %rdx
testq %r13, %r13
leaq 0xb6e46(%rip), %rcx     # 0x13ffb9
cmovneq %rdx, %rcx
leaq 0xa3788(%rip), %rsi     # 0x12c906
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x2, %r14
leaq -0x2(%r12), %r15
cmpq $0x1, %r13
jne 0x891b2
movl 0x90(%rbx), %eax
cmpl $0x1, %eax
jg 0x891e2
cmpq $0x2, %r12
je 0x891d4
cmpl $0x0, (%rbx)
jg 0x891e8
jmp 0x891d4
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe975a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpq $0x2, %r12
je 0x891d4
cmpl $0x2, %eax
jl 0x89238
leaq 0x8f207(%rip), %rsi     # 0x1183fb
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x5, %ecx
movq %rax, %r8
movl $0x2, %r9d
callq 0xf1f28
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf0b13
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x5, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r12, %rdi
callq 0xf7557
leaq 0x8b532(%rip), %rsi     # 0x1147a5
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/j2c.c
// Function: handler_sot
static void handler_sot(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos1, i64 len)
{
	i64 x;
	i64 b;
	i64 pos = pos1;

	pg->j2c_sot_pos = 0;
	pg->j2c_sot_length = 0;
	if(len<8) return;

	pg->j2c_sot_pos = pos1 - 4;
	x = de_getu16be_p(&pos);
	de_dbg(c, "tile number: %d", (int)x);
	pg->j2c_sot_length = de_getu32be_p(&pos);
	de_dbg(c, "length: %u", (unsigned int)pg->j2c_sot_length);
	b = de_getbyte_p(&pos);
	de_dbg(c, "tile-part instance: %d", (int)b);
	b = de_getbyte_p(&pos);
	de_dbg(c, "number of tile-parts: %d", (int)b);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdx)
cmpq $0x8, %r9
jl 0x89349
movq %rdx, %r15
movq %rdi, %rbx
addq $-0x4, %r8
movq %r8, 0x8(%rdx)
movq 0x18(%rdi), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xef193
leaq 0xa364c(%rip), %rsi     # 0x12c926
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
movq %rax, 0x10(%r15)
leaq 0xa49c4(%rip), %rsi     # 0x12dcc1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0xa3617(%rip), %rsi     # 0x12c936
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0xa360e(%rip), %rsi     # 0x12c94d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ogg.c
// Function: de_module_ogg
void de_module_ogg(deark *c, struct deark_module_info *mi)
{
	mi->id = "ogg";
	mi->desc = "Ogg multimedia";
	mi->run_fn = de_run_ogg;
	mi->identify_fn = de_identify_ogg;
	mi->help_fn = de_help_ogg;
}

// Assembly:
leaq 0x99441(%rip), %rax     # 0x122bc2
movq %rax, (%rsi)
leaq 0xa32b6(%rip), %rax     # 0x12ca41
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x897b1
movq %rax, 0x18(%rsi)
leaq 0x76c(%rip), %rax       # 0x89f0d
movq %rax, 0x20(%rsi)
leaq 0x7b0(%rip), %rax       # 0x89f5c
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ogg.c
// Function: de_identify_ogg
static int de_identify_ogg(deark *c)
{
	i64 pos = 0;

	if(!c->detection_data->id3.detection_attempted) {
		de_err(c, "ogg detection requires id3 module");
		return 0;
	}

	if(c->detection_data->id3.has_id3v2) {
		pos = (i64)c->detection_data->id3.bytes_at_start;
	}

	if(!dbuf_memcmp(c->infile, pos, "OggS", 4))
		return 100;

	return 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rax
cmpb $0x0, 0x14(%rax)
je 0x89f25
xorl %ebx, %ebx
cmpb $0x0, 0x15(%rax)
je 0x89f37
movl 0x18(%rax), %esi
jmp 0x89f39
leaq 0xa2e02(%rip), %rsi     # 0x12cd2e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe9df7
jmp 0x89f58
xorl %esi, %esi
movq 0x18(%rdi), %rdi
leaq 0xa2e0c(%rip), %rdx     # 0x12cd50
movl $0x4, %ecx
callq 0xf025e
testl %eax, %eax
movl $0x64, %eax
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
retq