LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_identify_lha
static int de_identify_lha(deark *c)
{
	int has_ext = 0;
	u8 b[22];
	struct cmpr_meth_info cmi;

	de_read(b, 0, sizeof(b));
	if(b[20]>3) return 0; // header level

	if(!is_possible_cmpr_meth(&b[2])) return 0;
	if(is_swg_sig(&b[2])) return 0; // Handled by the swg module

	if(b[20]==0) {
		if(b[0]<22) return 0;
		if(22 + (int)b[21] + 2 > 2 + (int)b[0]) return 0;
	}
	else if(b[20]==1) {
		if(b[0]<25) return 0;
		if(22 + (int)b[21] + 5 > 2 + (int)b[0]) return 0;
	}
	else if(b[20]==2) {
		i64 hsize = de_getu16le_direct(&b[0]);
		if(hsize < 26) return 0;
	}
	else if(b[20]==3) {
		if((b[0]!=4 && b[0]!=8) || b[1]!=0) return 0;
	}

	de_zeromem(&cmi, sizeof(struct cmpr_meth_info));
	get_cmpr_meth_info(&b[2], BASEFMT_LHA, &cmi);
	if(!cmi.is_recognized) {
		return 0;
	}

	if(de_input_file_has_ext(c, "lzh") ||
		de_input_file_has_ext(c, "lha") ||
		((b[4]=='z') && de_input_file_has_ext(c, "lzs")))
	{
		has_ext = 1;
	}

	if(has_ext) return 100;
	return 80; // Must be less than car_lha
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
movq %rsp, %r15
movl $0x16, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0xee8d4
movzbl 0x14(%r15), %ebp
cmpl $0x3, %ebp
ja 0x8450c
leaq 0x2(%rsp), %r15
movq %r15, %rdi
callq 0x8738b
testl %eax, %eax
je 0x8450c
cmpb $0x2d, 0x2(%rsp)
jne 0x84406
cmpb $0x73, 0x3(%rsp)
jne 0x84406
cmpb $0x77, 0x4(%rsp)
jne 0x84406
movb 0x5(%rsp), %al
andb $-0x2, %al
cmpb $0x30, %al
jne 0x84406
cmpb $0x2d, 0x6(%rsp)
je 0x8450c
movl %ebp, %eax
leaq 0xa7701(%rip), %rcx     # 0x12bb10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl (%rsp), %eax
cmpl $0x16, %eax
jb 0x8450c
movzbl 0x15(%rsp), %ecx
addl $0x18, %ecx
jmp 0x84470
movq %rsp, %rdi
callq 0xeebc4
cmpq $0x19, %rax
jg 0x8447b
jmp 0x8450c
movb (%rsp), %al
addb $-0x4, %al
testb $-0x5, %al
jne 0x8450c
cmpb $0x0, 0x1(%rsp)
je 0x8447b
jmp 0x8450c
movzbl (%rsp), %eax
cmpl $0x19, %eax
jb 0x8450c
movzbl 0x15(%rsp), %ecx
addl $0x1b, %ecx
addl $0x2, %eax
cmpl %eax, %ecx
ja 0x8450c
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r12
movaps %xmm0, 0x60(%r12)
movaps %xmm0, 0x50(%r12)
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x8698f
cmpb $0x0, (%r12)
je 0x8450c
leaq 0xc0bb9(%rip), %rsi     # 0x145082
movq %r14, %rdi
callq 0xea491
movl $0x64, %ebx
testl %eax, %eax
jne 0x8450c
leaq 0xa778d(%rip), %rsi     # 0x12bc6e
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x8450c
cmpb $0x7a, 0x4(%rsp)
jne 0x84507
leaq 0xa8025(%rip), %rsi     # 0x12c520
movq %r14, %rdi
callq 0xea491
testl %eax, %eax
jne 0x8450c
movl $0x50, %ebx
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_swg
void de_module_swg(deark *c, struct deark_module_info *mi)
{
	mi->id = "swg";
	mi->desc = "SWAG packet";
	mi->run_fn = de_run_swg;
	mi->identify_fn = de_identify_swg;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
leaq 0xa7701(%rip), %rax     # 0x12bc34
movq %rax, (%rsi)
leaq 0xa76fb(%rip), %rax     # 0x12bc38
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x8455c
movq %rax, 0x18(%rsi)
leaq 0x5b(%rip), %rax        # 0x845ae
movq %rax, 0x20(%rsi)
orb $0x20, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_run_swg
static void de_run_swg(deark *c, de_module_params *mparams)
{
	lctx *d;

	d = lha_create_lctx(c);
	d->basefmt = BASEFMT_SWG;
	d->basefmt_name = "SWG";
	de_declare_fmt(c, "SWAG packet");
	do_run_lha_internal(c, d, mparams);
	lha_destroy_lctx(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x1, 0xc(%rax)
leaq 0xa7fe0(%rip), %rax     # 0x12c55e
movq %rax, 0x10(%r14)
leaq 0xa76af(%rip), %rsi     # 0x12bc38
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0x857db
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x868ce
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_identify_swg
static int de_identify_swg(deark *c)
{
	u8 b[5];

	de_read(b, 2, sizeof(b));
	if(is_swg_sig(b)) {
		if(de_input_file_has_ext(c, "swg")) return 100;
		return 90;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x3(%rsp), %r14
movl $0x2, %edx
movl $0x5, %ecx
movq %r14, %rsi
callq 0xee8d4
xorl %eax, %eax
cmpb $0x2d, (%r14)
jne 0x84617
cmpb $0x73, 0x4(%rsp)
jne 0x84617
cmpb $0x77, 0x5(%rsp)
jne 0x84617
movb 0x6(%rsp), %cl
andb $-0x2, %cl
cmpb $0x30, %cl
jne 0x84617
cmpb $0x2d, 0x7(%rsp)
jne 0x84617
leaq 0xa7634(%rip), %rsi     # 0x12bc34
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x5a, %ecx
movl $0x64, %eax
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_tpk
void de_module_tpk(deark *c, struct deark_module_info *mi)
{
	mi->id = "tpk";
	mi->desc = "TPK archive";
	mi->run_fn = de_run_tpk;
	mi->identify_fn = de_identify_tpk;
}

// Assembly:
leaq 0xa761e(%rip), %rax     # 0x12bc44
movq %rax, (%rsi)
leaq 0xa7618(%rip), %rax     # 0x12bc48
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x8464b
movq %rax, 0x18(%rsi)
leaq 0x50(%rip), %rax        # 0x84696
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_run_tpk
static void de_run_tpk(deark *c, de_module_params *mparams)
{
	lctx *d;

	d = lha_create_lctx(c);
	d->basefmt = BASEFMT_TPK;
	d->basefmt_name = "TPK";
	de_declare_fmt(c, "TPK");
	do_run_lha_internal(c, d, mparams);
	lha_destroy_lctx(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x2, 0xc(%rax)
leaq 0xa7ef5(%rip), %rsi     # 0x12c562
movq %rsi, 0x10(%rax)
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0x857db
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x868ce
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_identify_tpk
static int de_identify_tpk(deark *c)
{
	u8 b[5];

	de_read(b, 2, sizeof(b));
	if(is_tpk_sig(b)) {
		if(de_input_file_has_ext(c, "tpk")) return 100;
		return 75;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x3(%rsp), %r14
movl $0x2, %edx
movl $0x5, %ecx
movq %r14, %rsi
callq 0xee8d4
xorl %eax, %eax
cmpb $0x2d, (%r14)
jne 0x846ff
cmpb $0x54, 0x4(%rsp)
jne 0x846ff
cmpb $0x4b, 0x5(%rsp)
jne 0x846ff
movb 0x6(%rsp), %cl
andb $-0x2, %cl
cmpb $0x30, %cl
jne 0x846ff
cmpb $0x2d, 0x7(%rsp)
jne 0x846ff
leaq 0xa755c(%rip), %rsi     # 0x12bc44
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x4b, %ecx
movl $0x64, %eax
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_pakleo
void de_module_pakleo(deark *c, struct deark_module_info *mi)
{
	mi->id = "pakleo";
	mi->desc = "PAKLEO archive";
	mi->run_fn = de_run_pakleo;
	mi->identify_fn = de_identify_pakleo;
}

// Assembly:
leaq 0xa7546(%rip), %rax     # 0x12bc54
movq %rax, (%rsi)
leaq 0xa7543(%rip), %rax     # 0x12bc5b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x84733
movq %rax, 0x18(%rsi)
leaq 0x50(%rip), %rax        # 0x8477e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_run_pakleo
static void de_run_pakleo(deark *c, de_module_params *mparams)
{
	lctx *d;

	d = lha_create_lctx(c);
	d->basefmt = BASEFMT_PAKLEO;
	d->basefmt_name = "PAKLEO";
	de_declare_fmt(c, "PAKLEO");
	do_run_lha_internal(c, d, mparams);
	lha_destroy_lctx(c, d);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x38, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x3, 0xc(%rax)
leaq 0xa7e11(%rip), %rsi     # 0x12c566
movq %rsi, 0x10(%rax)
movq %rbx, %rdi
callq 0xeb125
movq %rbx, %rdi
movq %r14, %rsi
callq 0x857db
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x868ce
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_car_lha
void de_module_car_lha(deark *c, struct deark_module_info *mi)
{
	mi->id = "car_lha";
	mi->desc = "CAR (MylesHi!) LHA-like archive";
	mi->run_fn = de_run_car_lha;
	mi->identify_fn = de_identify_car_lha;
}

// Assembly:
leaq 0xa7491(%rip), %rax     # 0x12bc6a
movq %rax, (%rsi)
leaq 0xa748f(%rip), %rax     # 0x12bc72
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x847fe
movq %rax, 0x18(%rsi)
leaq 0x3a9(%rip), %rax       # 0x84ba2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_arx
void de_module_arx(deark *c, struct deark_module_info *mi)
{
	mi->id = "arx";
	mi->desc = "ARX LHA-like archive";
	mi->run_fn = de_run_arx;
	mi->identify_fn = de_identify_arx;
}

// Assembly:
leaq 0xa70b9(%rip), %rax     # 0x12bc92
movq %rax, (%rsi)
leaq 0xa70b3(%rip), %rax     # 0x12bc96
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x84bfe
movq %rax, 0x18(%rsi)
leaq 0x4df(%rip), %rax       # 0x850d8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_identify_arx
static int de_identify_arx(deark *c)
{
	if(dbuf_memcmp(c->infile, 2, "-lh1-", 5)) return 0;
	if(de_getbyte(20)!=0x20 || de_getbyte(21)!=0x00) return 0;
	if(de_input_file_has_ext(c, "arx")) return 100;
	return 70;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0xa7546(%rip), %rdx     # 0x12c62f
movl $0x2, %esi
movl $0x5, %ecx
callq 0xefc85
xorl %ebp, %ebp
testl %eax, %eax
jne 0x85140
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xeead3
cmpb $0x20, %al
jne 0x85140
movq 0x18(%rbx), %rdi
movl $0x15, %esi
callq 0xeead3
testb %al, %al
jne 0x85140
leaq 0xa6b69(%rip), %rsi     # 0x12bc92
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0x46, %eax
movl $0x64, %ebp
cmovel %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_ar001
void de_module_ar001(deark *c, struct deark_module_info *mi)
{
	mi->id = "ar001";
	mi->desc = "ar001 archive (Okumura)";
	mi->run_fn = de_run_ar001;
	mi->identify_fn = de_identify_ar001;
}

// Assembly:
leaq 0xa6b5b(%rip), %rax     # 0x12bcab
movq %rax, (%rsi)
leaq 0xa6b57(%rip), %rax     # 0x12bcb1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x85175
movq %rax, 0x18(%rsi)
leaq 0x3c8(%rip), %rax       # 0x85538
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_identify_ar001
static int de_identify_ar001(deark *c)
{
	i64 n;
	i64 bhlen;
	i64 nlen;
	u32 bhcrc_r, bhcrc_c;
	u8 b;
	int conf = 0;
	struct de_crcobj *crco = NULL;

	bhlen = de_getu16le(0); // basic header size
	if(bhlen<(18+1) || bhlen>(18+1024)) goto done;
	if(c->infile->len < bhlen+8) goto done;
	nlen = bhlen-18;
	n = de_getu16le(2); // cmpr method
	if(n>1) goto done;
	b = de_getbyte(4); // file type
	if(b!=0) goto done; // 1 (text) is also defined, but not used by ar001
	n = de_getu16le(2+bhlen+2); // first ext hdr len
	if(n!=0) goto done;
	if(!slice_is_printable_ascii(c->infile, 20, nlen)) goto done;
	bhcrc_r = (u32)de_getu16le(2+bhlen);
	crco = de_crcobj_create(c, DE_CRCOBJ_CRC16_IBMSDLC);
	de_crcobj_addslice(crco, c->infile, 2, bhlen);
	bhcrc_c = de_crcobj_getval(crco);
	if(bhcrc_c == bhcrc_r) conf = 91;

done:
	if(crco) de_crcobj_destroy(crco);
	return conf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xeebc8
movq %rax, %r15
addq $-0x413, %rax           # imm = 0xFBED
cmpq $-0x400, %rax           # imm = 0xFC00
jb 0x855a6
movq 0x18(%r14), %rdi
leaq 0x8(%r15), %rax
cmpq %rax, 0x18(%rdi)
jl 0x855a6
movl $0x2, %esi
callq 0xeebc8
cmpq $0x1, %rax
jg 0x855a6
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xeead3
testb %al, %al
jne 0x855a6
movq 0x18(%r14), %rdi
leaq 0x4(%r15), %rsi
callq 0xeebc8
testq %rax, %rax
je 0x855b7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %r13
movl $0x12, %r12d
subq %r15, %r12
movq %r15, %rax
addq $0x2, %rax
movq %rax, (%rsp)
movl $0x14, %ebp
movq %r13, %rdi
movq %rbp, %rsi
callq 0xeead3
addb $-0x20, %al
cmpb $0x5f, %al
jae 0x855a6
leaq (%r12,%rbp), %rax
incq %rax
incq %rbp
cmpq $0x14, %rax
jne 0x855d4
movq 0x18(%r14), %rdi
movq (%rsp), %rsi
callq 0xeebc8
movq %rax, %rbx
movq %r14, %rdi
movl $0x22, %esi
callq 0xeb499
movq %rax, %r12
movq 0x18(%r14), %rsi
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rcx
callq 0xeb944
movq %r12, %rdi
callq 0xeb865
xorl %ecx, %ecx
cmpl %ebx, %eax
movl $0x5b, %ebx
cmovnel %ecx, %ebx
testq %r12, %r12
je 0x855a6
movq %r12, %rdi
callq 0xeb858
jmp 0x855a6
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_module_lharc_sfx_com
void de_module_lharc_sfx_com(deark *c, struct deark_module_info *mi)
{
	mi->id = "lharc_sfx_com";
	mi->desc = "LHarc/LArc self-extracting archive (COM)";
	mi->run_fn = de_run_lharc_sfx_com;
	mi->identify_fn = de_identify_lharc_sfx_com;
}

// Assembly:
leaq 0xa666f(%rip), %rax     # 0x12bcc9
movq %rax, (%rsi)
leaq 0xa6673(%rip), %rax     # 0x12bcd7
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x8567f
movq %rax, 0x18(%rsi)
leaq 0x135(%rip), %rax       # 0x857af
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: de_run_lharc_sfx_com
static void de_run_lharc_sfx_com(deark *c, de_module_params *mparams)
{
	struct lhasfx_context *d = NULL;
	int ret;

	d = de_malloc(c, sizeof(struct lhasfx_context));

	ret = looks_like_lharc_sfx_com(c, &d->sfx_container_is_larc);
	if(!ret) {
		d->errflag = 1;
		d->need_errmsg = 1;
		goto done;
	}

	de_declare_fmtf(c, "%s self-extracting archive (COM)",
		(d->sfx_container_is_larc ? "LArc":"LHarc"));

	lhasfx_find_payload(c, d);
	if(d->errflag) goto done;

	de_dbg(c, "payload found at: %"I64_FMT, d->payload_offs);

	// Note: Our practice is to use the .lzh extension if we think the file
	// is for the DOS platform, as it was near universal there.
	// If we were to support certain other platforms, e.g. Amiga, we might
	// use .lha instead.
	dbuf_create_file_from_slice(c->infile, d->payload_offs,
		c->infile->len-d->payload_offs,
		(d->sfx_container_is_larc ? "lzs" : "lzh"), NULL, 0);

done:
	if(d->errflag && d->need_errmsg) {
		de_err(c, "Not a known LHarc/LArc SFX format");
	}
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r15
movq %rax, %r14
leaq 0x4(%rax), %rsi
movq %rbx, %rdi
callq 0x87ec4
testl %eax, %eax
je 0x85773
cmpl $0x0, 0x4(%r14)
leaq 0xa7059(%rip), %rax     # 0x12c710
leaq 0xa704d(%rip), %rdx     # 0x12c70b
cmoveq %rax, %rdx
leaq 0xa7021(%rip), %rsi     # 0x12c6ea
movq %rbx, %rdi
xorl %eax, %eax
callq 0xeb152
addq $0x8, %r15
cmpl $0x0, 0x4(%r14)
movq 0x18(%rbx), %rdi
je 0x856f1
movl $0x252, %esi            # imm = 0x252
movq %r15, %rdx
callq 0x87f6f
jmp 0x8571b
movl $0x4ec, %esi            # imm = 0x4EC
movq %r15, %rdx
callq 0x87f6f
testl %eax, %eax
jne 0x8571b
movq 0x18(%rbx), %rdi
movl $0x4ef, %esi            # imm = 0x4EF
movq %r15, %rdx
callq 0x87f6f
testl %eax, %eax
je 0x857a1
movq (%r15), %rdx
testq %rdx, %rdx
je 0x85773
cmpb $0x0, (%r14)
jne 0x85779
leaq 0xa6fe6(%rip), %rsi     # 0x12c716
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
movq 0x18(%rdi), %rdx
subq %rsi, %rdx
cmpl $0x0, 0x4(%r14)
leaq 0xbf92d(%rip), %rax     # 0x145082
leaq 0xa6dc4(%rip), %rcx     # 0x12c520
cmoveq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xefd48
cmpb $0x0, (%r14)
jne 0x85779
jmp 0x85791
movw $0x101, (%r14)          # imm = 0x101
cmpb $0x0, 0x1(%r14)
je 0x85791
leaq 0xa6fa5(%rip), %rsi     # 0x12c72c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2
movq 0x18(%rbx), %rdi
movl $0x50a, %esi            # imm = 0x50A
jmp 0x856e7
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: lha_destroy_lctx
static void lha_destroy_lctx(deark *c, lctx *d)
{
	if(!d) return;
	de_crcobj_destroy(d->crco);
	de_crcobj_destroy(d->crco_cksum);
	de_free(c, d);
}

// Assembly:
testq %rsi, %rsi
je 0x86901
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rdi
callq 0xeb858
movq 0x30(%rbx), %rdi
callq 0xeb858
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/lha.c
// Function: destroy_member_data
static void destroy_member_data(deark *c, struct member_data *md)
{
	if(!md) return;
	ucstring_destroy(md->dirname);
	ucstring_destroy(md->filename);
	ucstring_destroy(md->fullfilename);
	de_free(c, md->cmi);
	de_free(c, md);
}

// Assembly:
testq %rsi, %rsi
je 0x8694a
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rsi), %rdi
callq 0xf6753
movq 0x70(%rbx), %rdi
callq 0xf6753
movq 0x78(%rbx), %rdi
callq 0xf6753
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeb7fe
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xeb944
movq %rbx, %rdi
callq 0xeb865
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeed08
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)
movl $0x18, %ecx
leaq 0xfd203(%rip), %rdx     # 0x183bd0
cmpl %ebp, -0x18(%rcx,%rdx)
jne 0x869d9
cmpl %eax, -0x10(%rcx,%rdx)
je 0x86a04
addq $0x20, %rcx
cmpq $0x2d8, %rcx            # imm = 0x2D8
jne 0x869cd
testl %ebp, %ebp
jne 0x86a19
xorl %ecx, %ecx
leaq 0xa51bd(%rip), %rdx     # 0x12bbb0
cmpl %eax, (%rcx,%rdx)
je 0x86a43
addq $0x4, %rcx
cmpq $0x4c, %rcx
jne 0x869f3
jmp 0x86a19
movb $0x1, (%rbx)
movq -0x8(%rcx,%rdx), %rsi
movq (%rcx,%rdx), %rax
movq %rax, 0x8(%rbx)
testq %rsi, %rsi
jne 0x86a2e
cmpb $0x0, (%rbx)
leaq 0xa572e(%rip), %rax     # 0x12c151
leaq 0xa5528(%rip), %rsi     # 0x12bf52
cmoveq %rax, %rsi
addq $0x1b, %rbx
movl $0x50, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xe8219
movb $0x1, (%rbx)
leaq 0xa5505(%rip), %rsi     # 0x12bf52
jmp 0x86a2e
// File: /workspace/github_c_makefile_star2_O3/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 0xeedfa
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xea7f5
leaq 0x20(%rsp), %rbx
movl $0x40, %edx
movq %r13, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xa5610(%rip), %rsi     # 0x12c0cd
movq %r15, %rdi
movq %r14, %rdx
movl %r12d, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xe8617
testl %ebp, %ebp
js 0x86b0e
cmpb $0x0, 0x10(%rsp)
je 0x86b0e
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
movq 0x8(%rsp), %rcx
cmpl $0x32, 0x90(%rcx,%rax,8)
jg 0x86b0e
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_O3/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 0x86b46
callq 0xf6423
jmp 0x86b52
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x70(%r14)
movl $0x22, %esi
movq %rbx, %rdi
callq 0xf7205
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 0x8781f
movq 0x70(%r14), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0xf730d
movq 0x70(%r14), %rdi
callq 0xf70f6
leaq 0xa5591(%rip), %rsi     # 0x12c133
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf7228
// File: /workspace/github_c_makefile_star2_O3/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 0x86bec
callq 0xf6423
movq 0x70(%rbx), %rcx
jmp 0x86bfb
movq %r14, %rdi
callq 0xf6410
movq %rax, %rcx
movq %rax, 0x70(%rbx)
movq 0x18(%r14), %rdi
movl 0x4(%rbx), %r9d
movq %r12, %rsi
movq %r15, %rdx
movl $0x1, %r8d
callq 0xefbd7
movq 0x70(%rbx), %rdi
callq 0xf70f6
leaq 0xb512a(%rip), %rsi     # 0x13bd4e
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x70(%rbx), %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
jle 0x86c59
movq 0x8(%rcx), %rcx
xorl %edx, %edx
cmpl $0x2f, (%rcx,%rdx,4)
jne 0x86c51
movl $0x5f, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x86c44
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa54e5(%rip), %rax     # 0x12c151
cmpl $0x40, %edi
jle 0x86c9a
cmpl $0x60, %edi
jg 0x86cb9
addl $-0x41, %edi
cmpl $0x16, %edi
ja 0x86d5d
leaq 0xa4eb7(%rip), %rcx     # 0x12bb40
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0x91816(%rip), %rax     # 0x1184af
retq
cmpl $0x32, %edi
jg 0x86cdc
cmpl $0x20, %edi
je 0x86d3e
cmpl $0x32, %edi
jne 0x86d5d
leaq 0x91803(%rip), %rax     # 0x1184bb
retq
cmpl $0x61, %edi
je 0x86d4e
cmpl $0x6d, %edi
je 0x86d56
cmpl $0x77, %edi
jne 0x86d5d
leaq 0xc5464(%rip), %rax     # 0x14c13f
retq
cmpl $0x33, %edi
je 0x86d46
cmpl $0x39, %edi
jne 0x86d5d
leaq 0xa5466(%rip), %rax     # 0x12c153
retq
leaq 0xa548d(%rip), %rax     # 0x12c182
retq
leaq 0xbcd0e(%rip), %rax     # 0x143a0b
retq
leaq 0xa5465(%rip), %rax     # 0x12c16a
retq
leaq 0xbd256(%rip), %rax     # 0x143f63
retq
leaq 0xa5465(%rip), %rax     # 0x12c17a
retq
leaq 0xa5440(%rip), %rax     # 0x12c15d
retq
leaq 0xa5433(%rip), %rax     # 0x12c158
retq
leaq 0xa5439(%rip), %rax     # 0x12c166
retq
leaq 0x99b1e(%rip), %rax     # 0x120853
retq
leaq 0xa5436(%rip), %rax     # 0x12c173
retq
leaq 0xa12b0(%rip), %rax     # 0x127ff5
retq
leaq 0xa53fe(%rip), %rax     # 0x12c14b
retq
leaq 0xa5438(%rip), %rax     # 0x12c18d
retq
leaq 0xbd089(%rip), %rax     # 0x143de6
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x86fe5
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x70(%rdx)
jne 0x87001
movq %r15, %rdi
callq 0xf6410
movq %rax, 0x70(%rbx)
movq %r15, %rdi
callq 0xf6410
movq %rax, 0x78(%rbx)
cmpb $0x0, (%rbx)
jne 0x87019
cmpl $0x2, 0xc(%r14)
jne 0x87068
cmpb $0x0, 0x20(%rbx)
movq 0x68(%rbx), %rsi
jne 0x8706c
movq %rsi, %rdi
callq 0xf67a3
testl %eax, %eax
je 0x87051
movq 0x68(%rbx), %rsi
movq 0x78(%rbx), %rdi
callq 0xf6509
movq 0x78(%rbx), %rdi
leaq 0x8b037(%rip), %rsi     # 0x11207e
movl $0x5, %edx
callq 0xf65e3
movq 0x70(%rbx), %rdi
callq 0xf67a3
movq 0x78(%rbx), %rdi
testl %eax, %eax
je 0x87079
movq 0x70(%rbx), %rsi
jmp 0x8706f
movq 0x70(%rbx), %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf6509
movl $0x5f, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xf6542
// File: /workspace/github_c_makefile_star2_O3/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
xorl %eax, %eax
cmpb 0x4(%rdi), %cl
jne 0x873e2
cmpl $0x2d, %ecx
je 0x873be
cmpl $0x20, %ecx
jne 0x873e2
cmpb $0x4c, 0x1(%rdi)
jne 0x873bb
cmpb $0x48, 0x2(%rdi)
jne 0x873bb
movb 0x3(%rdi), %cl
addb $-0x3a, %cl
movl $0x1, %eax
cmpb $-0xb, %cl
ja 0x873e2
xorl %eax, %eax
retq
movb 0x1(%rdi), %cl
andb $-0x21, %cl
addb $-0x5b, %cl
cmpb $-0x1a, %cl
jb 0x873e2
movb 0x2(%rdi), %cl
leal -0x3a(%rcx), %edx
cmpb $-0xb, %dl
ja 0x873e3
andb $-0x21, %cl
addb $-0x5b, %cl
cmpb $-0x1a, %cl
jae 0x873e3
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_O3/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 0x8757c
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 0xa4758(%rip), %rcx     # 0x12bb9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x5, %eax
jmp 0x87544
movl $0x7, %eax
jmp 0x87544
movl $0x6, %eax
jmp 0x87544
movq %rsi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
jns 0x87535
movl 0x8(%r13), %eax
testl %eax, %eax
js 0x8748d
leaq 0xa4c00(%rip), %rdx     # 0x12c088
jmp 0x8750f
movq %rdx, %rbp
leaq 0xa4bd4(%rip), %rsi     # 0x12c06b
movq %r12, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
movl $0x1, %esi
callq 0xe8a15
leaq 0xa4be5(%rip), %rdx     # 0x12c09a
cmpb $0x1, (%rbp)
jne 0x8750d
cmpb $0x20, 0x50(%rbp)
jne 0x8750d
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl $0x7, %ecx
callq 0x8766a
leaq 0xa4bbf(%rip), %rdx     # 0x12c09a
testl %eax, %eax
movl $0x0, %eax
jne 0x8750f
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movl $0x64, %ecx
callq 0x8766a
testl %eax, %eax
leaq 0xa4b88(%rip), %rcx     # 0x12c088
leaq 0xa4b7b(%rip), %rdx     # 0x12c082
cmoveq %rcx, %rdx
jmp 0x8750f
xorl %eax, %eax
movl %eax, 0x4(%r13)
leaq 0xa4b8d(%rip), %rsi     # 0x12c0a7
movq %r12, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movl 0x4(%r13), %eax
testl %eax, %eax
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 0xfec18
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x87629
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
callq 0xeed61
cmpq 0x28(%r13), %rax
jne 0x87629
movdqu 0x8(%r12), %xmm0
paddq 0xa460b(%rip), %xmm0    # 0x12bc10
movdqu %xmm0, 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 0x106c60
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfa311
// File: /workspace/github_c_makefile_star2_O3/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 0xf13d3
movq %rax, %r14
movq %rax, %rdi
callq 0xf0855
movq %r13, %rdi
movl $0x21, %esi
callq 0xeb499
movq %rax, %r12
leaq 0x69d9c(%rip), %rsi     # 0xf1451
movq %r14, %rdi
movq %rax, %rdx
callq 0xf1412
leaq 0x30(%rsp), %rbp
leaq 0x48(%rsp), %r15
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
callq 0xfa1dc
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 0xfec18
movl %ebx, (%r13)
movq %r14, %rdi
callq 0xf08ba
cmpl $0x0, (%r15)
je 0x87743
xorl %ebx, %ebx
jmp 0x87768
movq 0x18(%r14), %rax
movq 0x10(%rsp), %r15
cmpq 0x28(%r15), %rax
movl $0x0, %ebx
jne 0x87768
movq %r12, %rdi
callq 0xeb865
xorl %ebx, %ebx
cmpl 0x4c(%r15), %eax
sete %bl
movq %r14, %rdi
callq 0xf052b
movq %r12, %rdi
callq 0xeb858
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_O3/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 0xeead3
movzbl %al, %eax
leaq -0x1(%r12), %rbx
cmpq %r12, %rax
cmovlq %rax, %rbx
movq %r15, %rdi
callq 0xf6423
movq 0x18(%r14), %rdi
incq %r13
movl (%rbp), %r9d
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xefbd7
movq %r15, %rdi
callq 0xf64a0
movq %r15, %rdi
callq 0xf70f6
leaq 0xa4926(%rip), %rsi     # 0x12c126
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 0xe8617
// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, (%rsp)
movq %rdi, %r12
movl 0x50(%rsp), %r14d
callq 0xf6410
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xf09c5
movq %rax, %r12
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0xef481
testq %r13, %r13
jle 0x878e8
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r12, %rdi
movq %rbp, %rsi
callq 0xeead3
testb %al, %al
je 0x878eb
testl %r14d, %r14d
setne %cl
cmpb $-0x1, %al
sete %dl
testb %dl, %cl
je 0x878c8
movq %rbp, %rcx
subq %rbx, %rcx
movq (%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
callq 0x87928
incq %rbp
movq %rbp, %rbx
xorl %r15d, %r15d
jmp 0x878d3
testl %r14d, %r14d
je 0x878da
incq %r15
incq %rbp
cmpq %r13, %rbp
jne 0x87880
jmp 0x878eb
cmpb $0x5c, %al
je 0x8789e
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x8789e
jmp 0x878cd
xorl %r15d, %r15d
movq (%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %rbx
movq %rbx, %r9
callq 0x87928
movq %r12, %rdi
callq 0xf052b
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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 0x87983
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 0xf6423
movl 0x4(%rbp), %r9d
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xefbd7
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf72a4
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x87997
popq %rbx
popq %r14
popq %r15
retq
movq %r9, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xeebc8
movl %eax, 0x38(%r15)
movb $0x1, 0x34(%r15)
movq %r14, 0x40(%r15)
leaq 0xa4c9d(%rip), %rsi     # 0x12c65d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
// File: /workspace/github_c_makefile_star2_O3/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 0x87a0d
callq 0xf6423
jmp 0x87a19
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x68(%r14)
movl $0x22, %esi
movq %rbx, %rdi
callq 0xf7205
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 0x8781f
movq 0x68(%r14), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0xf730d
movq 0x8(%r15), %r15
movq 0x68(%r14), %rdi
callq 0xf70f6
leaq 0xa48fd(%rip), %rsi     # 0x12c36a
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf7228
// File: /workspace/github_c_makefile_star2_O3/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 0x87aa8
xorl %r14d, %r14d
jmp 0x87afe
movq %r8, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xeebc8
movq %rax, %r12
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
movq %rbx, %rdi
movl %r12d, %esi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xeaae1
movq 0x8(%r15), %r15
movq %r14, %rdi
callq 0xf70f6
leaq 0xa4891(%rip), %rsi     # 0x12c37c
movq %rbx, %rdi
movq %r15, %rdx
movl %r12d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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 0x87b24
popq %rbx
popq %r14
popq %r15
retq
movq %r9, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0xa78ec(%rip), %r8      # 0x12f420
movq %rdx, %rsi
movq %r9, %rdx
movl $0x1, %ecx
callq 0x87d3c
leaq 0x8(%rbx), %rdx
leaq 0xa483d(%rip), %r8      # 0x12c38c
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x87d3c
addq $0x10, %rbx
leaq 0xa4831(%rip), %r8      # 0x12c398
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x87d3c
// File: /workspace/github_c_makefile_star2_O3/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 0x87bf2
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xeedfa
movq %rax, %r15
movq %rsp, %r12
movl $0x64, %ecx
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xecb53
movl %eax, %ebp
leaq 0xa483e(%rip), %rsi     # 0x12c419
movq %r14, %rdi
movl %r15d, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8617
testl %ebp, %ebp
je 0x87bf2
movl %ebp, 0x4(%rbx)
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x87c5f
movq %rdx, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %r9, %rsi
callq 0xeebc8
movq %rax, %r14
leaq 0x8a3fc(%rip), %rsi     # 0x112024
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
testw %r14w, %r14w
jns 0x87c4b
testb $0x49, %r14b
je 0x87c47
movb $0x1, 0x23(%rbx)
jmp 0x87c4b
movb $0x1, 0x22(%rbx)
andl $0xf000, %r14d          # imm = 0xF000
cmpl $0xa000, %r14d          # imm = 0xA000
jne 0x87c5f
movb $0x1, 0x21(%rbx)
popq %rbx
popq %r14
popq %r15
retq