LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_specialexe_readamatic
static void detect_specialexe_readamatic(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	if(ei->overlay_len < 12) goto done;
	if(ei->regCS!=(-16)) goto done;
	if(ei->num_relocs!=1) goto done;

	if(dbuf_memcmp(ei->f, ei->start_of_dos_code+(594-128),
		(const void*)"blTVNEW3 ", 9))
	{
		goto done;
	}

	edd->detected_fmt = DE_SPECIALEXEFMT_READAMATIC;
	de_strlcpy(edd->detected_fmt_name, "Read-A-Matic", sizeof(edd->detected_fmt_name));
	edd->modname = "readamatic";
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0xc, 0x50(%rax)
jge 0x189c81
jmp 0x189cf9
movq -0x10(%rbp), %rax
cmpq $-0x10, 0x20(%rax)
je 0x189c8e
jmp 0x189cf9
movq -0x10(%rbp), %rax
cmpq $0x1, 0x8(%rax)
je 0x189c9b
jmp 0x189cf9
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x1d2, %rsi            # imm = 0x1D2
leaq 0x4de3c(%rip), %rdx     # 0x1d7af4
movl $0x9, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x189cc9
jmp 0x189cf9
movq -0x18(%rbp), %rax
movb $-0x34, 0x1(%rax)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x4de1e(%rip), %rsi     # 0x1d7afe
movl $0x28, %edx
callq 0x15aa30
movq -0x18(%rbp), %rax
leaq 0x2558a(%rip), %rcx     # 0x1af27f
movq %rcx, 0x48(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_specialexe_textlife
static void detect_specialexe_textlife(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	int ret;
	i64 foundpos;

	if(ei->regSP!=65520) goto done;
	if(ei->regIP<7000 || ei->regIP>12000) goto done;
	if(ei->num_relocs<230 || ei->num_relocs>310) goto done;

	if(dbuf_memcmp(ei->f, ei->start_of_dos_code,
		(const void*)"\x55\x89\xe5\x83\xec\x02\x9a", 7))
	{
		goto done;
	}

	// Earliest known sig = Code+14596 for Breeze 3.2
	// Latest known sig = Code+17034 for TextLife 2.7variant3
	// We'll set the "haystack" to 14000 to 18000.
	ret = dbuf_search(ei->f, (const u8*)"\x05ZZZZZ", 6,
		ei->start_of_dos_code+14000, 4000, &foundpos);
	if(!ret) goto done;
	edd->special_pos_1 = foundpos;

	edd->detected_fmt = DE_SPECIALEXEFMT_TEXTLIFE;
	de_strlcpy(edd->detected_fmt_name, "TextLife", sizeof(edd->detected_fmt_name));
	edd->modname = "textlife";
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0xfff0, 0x18(%rax)     # imm = 0xFFF0
je 0x189d27
jmp 0x189e08
movq -0x10(%rbp), %rax
cmpq $0x1b58, 0x28(%rax)     # imm = 0x1B58
jl 0x189d43
movq -0x10(%rbp), %rax
cmpq $0x2ee0, 0x28(%rax)     # imm = 0x2EE0
jle 0x189d48
jmp 0x189e08
movq -0x10(%rbp), %rax
cmpq $0xe6, 0x8(%rax)
jl 0x189d64
movq -0x10(%rbp), %rax
cmpq $0x136, 0x8(%rax)       # imm = 0x136
jle 0x189d69
jmp 0x189e08
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
leaq 0x4dd8c(%rip), %rdx     # 0x1d7b0b
movl $0x7, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x189d90
jmp 0x189e08
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
addq $0x36b0, %rcx           # imm = 0x36B0
leaq 0x4dd66(%rip), %rsi     # 0x1d7b13
movl $0x6, %edx
movl $0xfa0, %r8d            # imm = 0xFA0
leaq -0x28(%rbp), %r9
callq 0x169370
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x189dcc
jmp 0x189e08
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movb $-0x33, 0x1(%rax)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x4dd2b(%rip), %rsi     # 0x1d7b1a
movl $0x28, %edx
callq 0x15aa30
movq -0x18(%rbp), %rax
leaq 0x254af(%rip), %rcx     # 0x1af2b3
movq %rcx, 0x48(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: fmtutil_detect_exesfx
void fmtutil_detect_exesfx(deark *c, struct fmtutil_exe_info *ei,
	struct fmtutil_specialexe_detection_data *edd)
{
	size_t i;

	for(i=0; i<DE_ARRAYCOUNT(exesfx_detector_arr); i++) {
		if(ei->overlay_len < (i64)exesfx_detector_arr[i].min_overlay_len) continue;
		exesfx_detector_arr[i].fn(c, ei, edd);
		if(edd->detected_fmt) goto done;
	}

done:
	if(!edd->detected_fmt_name[0]) {
		de_strlcpy(edd->detected_fmt_name, "unknown", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0xb, -0x20(%rbp)
jae 0x189e97
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rdx
leaq 0x9aeea(%rip), %rcx     # 0x224d30
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jge 0x189e57
jmp 0x189e89
movq -0x20(%rbp), %rcx
leaq 0x9aece(%rip), %rax     # 0x224d30
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movq -0x18(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0x189e87
jmp 0x189e99
jmp 0x189e89
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x189e2c
jmp 0x189e99
movq -0x18(%rbp), %rax
cmpb $0x0, 0x50(%rax)
jne 0x189ebc
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x146aa(%rip), %rsi     # 0x19e55c
movl $0x28, %edx
callq 0x15aa30
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: read_exe_testbytes
static void read_exe_testbytes(struct fmtutil_exe_info *ei)
{
	if(ei->have_testbytes) return;
	ei->have_testbytes = 1;
	dbuf_read(ei->f, ei->ep64b, ei->entry_point, sizeof(ei->ep64b));
	dbuf_read(ei->f, ei->ovl64b, ei->end_of_dos_code, sizeof(ei->ovl64b));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x65(%rax)
je 0x189f88
jmp 0x189fd5
movq -0x8(%rbp), %rax
movb $0x1, 0x65(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x70, %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdx
movl $0x40, %ecx
callq 0x164d10
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0xb0, %rsi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
movl $0x40, %ecx
callq 0x164d10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: execomp_diet_check_fingerprint
static int execomp_diet_check_fingerprint(dbuf *f, i64 pos)
{
	u8 x;

	if(dbuf_memcmp(f, pos,
		(const u8*)"\x8e\xdb\x8e\xc0\x33\xf6\x33\xff\xb9\x08\x00\xf3\xa5\x4b\x48\x4a", 16))
	{
		return 0;
	}

	// Attempt to screen out LGLZ-compressed files (x==0x95).
	x = dbuf_getbyte(f, pos+26);
	if(x==0x8b) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x4dbd5(%rip), %rdx     # 0x1d7bd4
movl $0x10, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x18a017
movl $0x0, -0x4(%rbp)
jmp 0x18a046
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1a, %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x8b, %eax
jne 0x18a03f
movl $0x1, -0x4(%rbp)
jmp 0x18a046
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_lhark_sfx
static int detect_lhark_sfx(deark *c, struct fmtutil_exe_info *ei,
	struct fmtutil_specialexe_detection_data *edd)
{
	int found;
	i64 foundpos = 0;
	i64 cs, ip;

	if(ei->num_relocs != 0) return 0;
	if(ei->regSP != 128) return 0;
	if(ei->start_of_dos_code != 32) return 0;

	// LHARK SFX uses a modified LZEXE 0.91 decompressor.
	// Try to find the original entry point, and record it in regCS_2/regIP_2.
	ip = dbuf_getu16le(ei->f, ei->entry_point+0x0f);
	cs = dbuf_getu16le(ei->f, ei->entry_point+0x11);
	if(!is_lzexe091_entry_point(ei, cs, ip)) {
		return 0;
	}

	found = is_lhalike_data_at(ei, ei->end_of_dos_code, 'h', &foundpos);
	if(!found) return 0;

	edd->regCS_2 = cs;
	edd->regIP_2 = ip;

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x18a083
movl $0x0, -0x4(%rbp)
jmp 0x18a156
movq -0x18(%rbp), %rax
cmpq $0x80, 0x18(%rax)
je 0x18a09d
movl $0x0, -0x4(%rbp)
jmp 0x18a156
movq -0x18(%rbp), %rax
cmpq $0x20, 0x38(%rax)
je 0x18a0b4
movl $0x0, -0x4(%rbp)
jmp 0x18a156
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0xf, %rsi
callq 0x165280
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0x11, %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x18a230
cmpl $0x0, %eax
jne 0x18a10b
movl $0x0, -0x4(%rbp)
jmp 0x18a156
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
movl $0x68, %edx
leaq -0x30(%rbp), %rcx
callq 0x18a2d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x18a137
movl $0x0, -0x4(%rbp)
jmp 0x18a156
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: look_for_pcx2exe
static int look_for_pcx2exe(deark *c, struct fmtutil_exe_info *ei,
	struct fmtutil_specialexe_detection_data *edd)
{
	i64 cs, ip;

	if((ei->entrypoint_crcs>>32)!=0xf537be26U) return 0;
	ip = dbuf_getu16le(ei->f, ei->entry_point+53);
	if(ip!=0x000e) return 0;
	cs = dbuf_geti16le(ei->f, ei->entry_point+55);
	if(!is_lzexe091_entry_point(ei, cs, ip)) {
		return 0;
	}

	edd->regCS_2 = cs;
	edd->regIP_2 = ip;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
shrq $0x20, %rax
movl $0xf537be26, %ecx       # imm = 0xF537BE26
cmpq %rcx, %rax
je 0x18a196
movl $0x0, -0x4(%rbp)
jmp 0x18a21c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0x35, %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
cmpq $0xe, -0x30(%rbp)
je 0x18a1c2
movl $0x0, -0x4(%rbp)
jmp 0x18a21c
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0x37, %rsi
callq 0x165360
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x18a230
cmpl $0x0, %eax
jne 0x18a1fd
movl $0x0, -0x4(%rbp)
jmp 0x18a21c
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: is_lzexe091_entry_point
static int is_lzexe091_entry_point(struct fmtutil_exe_info *ei, i64 cs, i64 ip)
{
	i64 n;
	i64 ep;

	ep = ei->start_of_dos_code + cs*16 + ip;

	n = (UI)dbuf_getu32be(ei->f, ep);
	if(n!=0x060e1f8bU) return 0;

	// If this is the right place, the *FAB* signature should be at offset 233.
	if(dbuf_memcmp(ei->f, ep+233, (const void*)"*FAB*", 5)) {
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x165470
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x60e1f8b, -0x28(%rbp) # imm = 0x60E1F8B
je 0x18a288
movl $0x0, -0x4(%rbp)
jmp 0x18a2c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
addq $0xe9, %rsi
leaq 0x4d7f2(%rip), %rdx     # 0x1d7a93
movl $0x5, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x18a2b9
movl $0x0, -0x4(%rbp)
jmp 0x18a2c0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: is_lhalike_data_at
static int is_lhalike_data_at(struct fmtutil_exe_info *ei, i64 pos, u8 h_or_z, i64 *pfoundpos)
{
	u8 b2[8];

	if(pos+21 > ei->f->len) return 0;
	dbuf_read(ei->f, b2, pos, sizeof(b2));
	if(b2[2]!='-' || b2[6]!='-') return 0;
	if(b2[3]=='l' && b2[4]==h_or_z) {
		*pfoundpos = pos;
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x15, %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x18a307
movl $0x0, -0x4(%rbp)
jmp 0x18a36b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0x164d10
movzbl -0x2e(%rbp), %eax
cmpl $0x2d, %eax
jne 0x18a332
movzbl -0x2a(%rbp), %eax
cmpl $0x2d, %eax
je 0x18a33b
movl $0x0, -0x4(%rbp)
jmp 0x18a36b
movzbl -0x2d(%rbp), %eax
cmpl $0x6c, %eax
jne 0x18a364
movzbl -0x2c(%rbp), %eax
movzbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x18a364
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x18a36b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_zip
static void detect_exesfx_zip(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	int ret;
	i64 foundpos = 0;

	if(!edd->zip_eocd_looked_for) {
		if(c->infile==ei->f && c->detection_data && c->detection_data->zip_eocd_looked_for) {
			edd->zip_eocd_looked_for = 1;
			edd->zip_eocd_found = c->detection_data->zip_eocd_found;
			edd->zip_eocd_pos = c->detection_data->zip_eocd_pos;
		}
		else {
			edd->zip_eocd_found = (u8)fmtutil_find_zip_eocd(c, c->infile, 0, &edd->zip_eocd_pos);
			edd->zip_eocd_looked_for = 1;
		}
	}

	if(!edd->zip_eocd_found) goto done;

	// Look for a ZIP file in the overlay (approximately)
	if(ei->overlay_len < 10) goto done; // Overlay too small

	ret = dbuf_search(ei->f, (const u8*)"PK\x03\x04", 4, ei->end_of_dos_code-10, 20,
		&foundpos);
	if(!ret) goto done;
	edd->detected_fmt = DE_SPECIALEXEFMT_ZIPSFX;

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_ZIPSFX) {
		de_strlcpy(edd->detected_fmt_name, "ZIP", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4(%rax)
jne 0x18a435
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x18a407
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x18a407
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movzbl 0x6(%rax), %eax
cmpl $0x0, %eax
je 0x18a407
movq -0x18(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movb 0x7(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x18a433
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rcx
addq $0x28, %rcx
xorl %edx, %edx
callq 0x1750a0
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x18a435
movq -0x18(%rbp), %rax
cmpb $0x0, 0x5(%rax)
jne 0x18a441
jmp 0x18a48f
movq -0x10(%rbp), %rax
cmpq $0xa, 0x50(%rax)
jge 0x18a44e
jmp 0x18a48f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
subq $0xa, %rcx
leaq 0x4d6bb(%rip), %rsi     # 0x1d7b23
movl $0x4, %edx
movl $0x14, %r8d
leaq -0x28(%rbp), %r9
callq 0x169370
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x18a487
jmp 0x18a48f
movq -0x18(%rbp), %rax
movb $0x65, 0x1(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x65, %eax
jne 0x18a4b5
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x27621(%rip), %rsi     # 0x1b1acc
movl $0x28, %edx
callq 0x15aa30
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_car
static void detect_exesfx_car(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	i64 foundpos = 0;

	if(ei->overlay_len<27) goto done;
	if(ei->entry_point!=11566 || ei->regSS!=978) {
		goto done;
	}

	if(dbuf_memcmp(ei->f, 11256,
		(const void*)"\x43\x41\x52\x20\x53\x65\x6c\xd8\xf0\x6e\x23\xf8\x0a\x41\xdd\xfd", 16))
	{
		goto done;
	}

	if(!is_lhalike_data_at(ei, ei->end_of_dos_code, 'h', &foundpos)) {
		goto done;
	}

	edd->payload_pos = foundpos;
	edd->payload_len = ei->f->len - edd->payload_pos;

	edd->detected_fmt = DE_SPECIALEXEFMT_SFX;
	edd->payload_valid = 1;
	edd->payload_file_ext = "car";

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_SFX) {
		de_strlcpy(edd->detected_fmt_name, "CAR (MylesHi!)", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1b, 0x50(%rax)
jge 0x18a4ec
jmp 0x18a598
movq -0x10(%rbp), %rax
cmpq $0x2d2e, 0x40(%rax)     # imm = 0x2D2E
jne 0x18a508
movq -0x10(%rbp), %rax
cmpq $0x3d2, 0x10(%rax)      # imm = 0x3D2
je 0x18a50d
jmp 0x18a598
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2bf8, %esi           # imm = 0x2BF8
leaq 0x4d608(%rip), %rdx     # 0x1d7b28
movl $0x10, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x18a531
jmp 0x18a598
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movl $0x68, %edx
leaq -0x20(%rbp), %rcx
callq 0x18a2d0
cmpl $0x0, %eax
jne 0x18a552
jmp 0x18a598
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movb $0x64, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
leaq 0x2db07(%rip), %rcx     # 0x1b809b
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
jne 0x18a5be
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x4d585(%rip), %rsi     # 0x1d7b39
movl $0x28, %edx
callq 0x15aa30
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_lhark
static void detect_exesfx_lhark(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	if(!detect_lhark_sfx(c, ei, edd)) {
		goto done;
	}

	edd->payload_pos = ei->end_of_dos_code;
	edd->payload_len = ei->f->len - edd->payload_pos;
	if(edd->payload_len<28) goto done;

	edd->detected_fmt = DE_SPECIALEXEFMT_SFX;
	edd->payload_valid = 1;
	edd->payload_file_ext = "lzh";

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_SFX) {
		de_strlcpy(edd->detected_fmt_name, "LHARK", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x18a050
cmpl $0x0, %eax
jne 0x18a5fc
jmp 0x18a653
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x1c, 0x18(%rax)
jge 0x18a634
jmp 0x18a653
movq -0x18(%rbp), %rax
movb $0x64, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
leaq 0x46553(%rip), %rcx     # 0x1d0ba2
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
jne 0x18a679
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x2d4ef(%rip), %rsi     # 0x1b7b5e
movl $0x28, %edx
callq 0x15aa30
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_larc
static void detect_exesfx_larc(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	int found;
	i64 foundpos = 0;

	calc_entrypoint_crc(c, ei);
	if(ei->entrypoint_crcs!=0x81681852d3882b18ULL) {
		goto done;
	}

	found = is_lhalike_data_at(ei, ei->entry_point+525, 'z', &foundpos);
	if(!found) goto done;

	edd->payload_pos = foundpos;
	edd->payload_len = ei->f->len - edd->payload_pos;
	if(edd->payload_len<21) goto done;

	edd->detected_fmt = DE_SPECIALEXEFMT_SFX;
	edd->payload_valid = 1;
	edd->payload_file_ext = "lzs";

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_SFX) {
		de_strlcpy(edd->detected_fmt_name, "LArc", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x189540
movq -0x10(%rbp), %rax
movabsq $-0x7e97e7ad2c77d4e8, %rcx # imm = 0x81681852D3882B18
cmpq %rcx, 0x68(%rax)
je 0x18a9af
jmp 0x18aa2e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0x20d, %rsi            # imm = 0x20D
movl $0x7a, %edx
leaq -0x28(%rbp), %rcx
callq 0x18a2d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x18a9db
jmp 0x18aa2e
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x15, 0x18(%rax)
jge 0x18aa0f
jmp 0x18aa2e
movq -0x18(%rbp), %rax
movb $0x64, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
leaq 0x2d5d2(%rip), %rcx     # 0x1b7ffc
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
jne 0x18aa54
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x2d79d(%rip), %rsi     # 0x1b81e7
movl $0x28, %edx
callq 0x15aa30
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_rar
static void detect_exesfx_rar(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	// TODO: Lots more work to do here. Maybe better to delete the RSFX test.
	if(ei->overlay_len < 8) goto done;

	read_exe_testbytes(ei);

	if(de_memcmp(ei->ovl64b, "Rar!\x1a\x07", 6) &&
		de_memcmp(ei->ovl64b, "RE\x7e\x5e", 4))
	{
		goto done;
	}

	if(dbuf_memcmp(ei->f, 28, (const u8*)"RSFX", 4)) {
		goto done;
	}

	edd->payload_pos = ei->end_of_dos_code;
	edd->payload_len = ei->overlay_len;
	edd->payload_valid = 1;
	edd->detected_fmt = DE_SPECIALEXEFMT_SFX;
	edd->payload_file_ext = "rar";

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_SFX) {
		de_strlcpy(edd->detected_fmt_name, "RAR", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x8, 0x50(%rax)
jge 0x18ae04
jmp 0x18aeaf
movq -0x10(%rbp), %rdi
callq 0x189f70
movq -0x10(%rbp), %rdi
addq $0xb0, %rdi
leaq 0x4cd46(%rip), %rsi     # 0x1d7b65
movl $0x6, %edx
callq 0x19170
cmpl $0x0, %eax
je 0x18ae4c
movq -0x10(%rbp), %rax
addq $0xb0, %rax
movl (%rax), %eax
subl $0x5e7e4552, %eax       # imm = 0x5E7E4552
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x18ae4c
jmp 0x18aeaf
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x1c, %esi
leaq 0x4cd0d(%rip), %rdx     # 0x1d7b6c
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x18ae70
jmp 0x18aeaf
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
movb $0x64, 0x1(%rax)
movq -0x18(%rbp), %rax
leaq 0x45e5d(%rip), %rcx     # 0x1d0d08
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
jne 0x18aed5
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x4cca6(%rip), %rsi     # 0x1d7b71
movl $0x28, %edx
callq 0x15aa30
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_zoo
static void detect_exesfx_zoo(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	if(ei->overlay_len < 24) goto done;
	read_exe_testbytes(ei);
	if((UI)de_getu32le_direct(&ei->ovl64b[20]) != 0xfdc4a7dcU) goto done;

	calc_entrypoint_crc(c, ei);
	switch((UI)(ei->entrypoint_crcs>>32)) {
	case 0x6d384fa1U: // SEZ 2.00
	case 0xec5138deU: // SEZ 2.30
		// TODO: More Zoo SFX variants
		break;
	default:
		goto done;
	}

	edd->payload_pos = ei->end_of_dos_code;
	edd->payload_len = ei->overlay_len;
	edd->payload_valid = 1;
	edd->detected_fmt = DE_SPECIALEXEFMT_SFX;
	edd->payload_file_ext = "zoo";

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_SFX) {
		de_strlcpy(edd->detected_fmt_name, "Zoo", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x18, 0x50(%rax)
jge 0x18af04
jmp 0x18af99
movq -0x10(%rbp), %rdi
callq 0x189f70
movq -0x10(%rbp), %rdi
addq $0xb0, %rdi
addq $0x14, %rdi
callq 0x165500
cmpl $0xfdc4a7dc, %eax       # imm = 0xFDC4A7DC
je 0x18af2a
jmp 0x18af99
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x189540
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0xec5138de, %eax       # imm = 0xEC5138DE
je 0x18af56
jmp 0x18af4a
movl -0x1c(%rbp), %eax
subl $0x6d384fa1, %eax       # imm = 0x6D384FA1
jne 0x18af58
jmp 0x18af56
jmp 0x18af5a
jmp 0x18af99
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
movb $0x64, 0x1(%rax)
movq -0x18(%rbp), %rax
leaq 0x45673(%rip), %rcx     # 0x1d0608
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
jne 0x18afbf
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x4cbc0(%rip), %rsi     # 0x1d7b75
movl $0x28, %edx
callq 0x15aa30
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: detect_exesfx_arj
static void detect_exesfx_arj(deark *c,
	struct fmtutil_exe_info *ei, struct fmtutil_specialexe_detection_data *edd)
{
	int ret;
	i64 foundpos = 0;

	if(ei->overlay_len < ARJ_MIN_FILE_SIZE) goto done;

	// Aribrarily allow up to 16 extra bytes before the ARJ data starts.
	// Maybe 2 is sufficient. Dunno.
	ret = fmtutil_scan_for_arj_data(ei->f, ei->end_of_dos_code, 16, 0, &foundpos);

	if(ret) {
		edd->detected_fmt = DE_SPECIALEXEFMT_ARJSFX;
		edd->payload_pos = foundpos;
		edd->payload_len = ei->f->len - foundpos;
		edd->payload_valid = 1;
		goto done;
	}

done:
	if(edd->detected_fmt==DE_SPECIALEXEFMT_ARJSFX) {
		de_strlcpy(edd->detected_fmt_name, "ARJ", sizeof(edd->detected_fmt_name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x54, 0x50(%rax)
jge 0x18aff9
jmp 0x18b058
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movl $0x10, %edx
xorl %ecx, %ecx
leaq -0x28(%rbp), %r8
callq 0x176310
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x18b056
movq -0x18(%rbp), %rax
movb $0x66, 0x1(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rcx
subq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x3(%rax)
jmp 0x18b058
jmp 0x18b058
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x66, %eax
jne 0x18b07e
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
leaq 0x18bf4(%rip), %rsi     # 0x1a3c68
movl $0x28, %edx
callq 0x15aa30
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-exe.c
// Function: is_arc_data_at
static int is_arc_data_at(struct fmtutil_exe_info *ei, i64 pos)
{
	u8 b[2];

	dbuf_read(ei->f, b, pos, 2);
	if(b[0]!=0x1a) return 0;
	if(b[1]>30) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x1a(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x1a(%rbp), %eax
cmpl $0x1a, %eax
je 0x18b2ab
movl $0x0, -0x4(%rbp)
jmp 0x18b2c4
movzbl -0x19(%rbp), %eax
cmpl $0x1e, %eax
jle 0x18b2bd
movl $0x0, -0x4(%rbp)
jmp 0x18b2c4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: fmtutil_get_lzhuf_d_code_and_len
void fmtutil_get_lzhuf_d_code_and_len(UI n, UI *pd_code, UI *pd_len)
{
	if(n<32 || n>=256) { *pd_code = 0; *pd_len = 3; }
	else if(n<80) { *pd_code = (n-16)>>4; *pd_len = 4; }
	else if(n<144) { *pd_code = (n-48)>>3; *pd_len = 5; }
	else if(n<192) { *pd_code = (n-96)>>2; *pd_len = 6; }
	else if(n<240) { *pd_code = (n-144)>>1; *pd_len = 7; }
	else { *pd_code = n-192; *pd_len = 8; };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x20, -0x4(%rbp)
jb 0x18b2ee
cmpl $0x100, -0x4(%rbp)      # imm = 0x100
jb 0x18b307
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
jmp 0x18b3ba
cmpl $0x50, -0x4(%rbp)
jae 0x18b32b
movl -0x4(%rbp), %ecx
subl $0x10, %ecx
shrl $0x4, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
jmp 0x18b3b8
cmpl $0x90, -0x4(%rbp)
jae 0x18b34f
movl -0x4(%rbp), %ecx
subl $0x30, %ecx
shrl $0x3, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x5, (%rax)
jmp 0x18b3b6
cmpl $0xc0, -0x4(%rbp)
jae 0x18b373
movl -0x4(%rbp), %ecx
subl $0x60, %ecx
shrl $0x2, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x6, (%rax)
jmp 0x18b3b4
cmpl $0xf0, -0x4(%rbp)
jae 0x18b399
movl -0x4(%rbp), %ecx
subl $0x90, %ecx
shrl %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x7, (%rax)
jmp 0x18b3b2
movl -0x4(%rbp), %ecx
subl $0xc0, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x8, (%rax)
jmp 0x18b3b4
jmp 0x18b3b6
jmp 0x18b3b8
jmp 0x18b3ba
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: dfilter_lh1_codec
void dfilter_lh1_codec(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct lzahuf_ctx *cctx = NULL;

	cctx = de_malloc(dfctx->c, sizeof(struct lzahuf_ctx));
	cctx->c = dfctx->c;
	cctx->modname = "lzhuf";
	cctx->dfctx = dfctx;
	cctx->dcmpro = dfctx->dcmpro;
	cctx->dres = dfctx->dres;

	dfctx->codec_private = (void*)cctx;
	dfctx->codec_addbuf_fn = my_lh1_codec_addbuf;
	dfctx->codec_finish_fn = my_lh1_codec_finish;
	dfctx->codec_command_fn = my_lh1_codec_command;
	dfctx->codec_destroy_fn = my_lh1_codec_destroy;

	if(codec_private_params) {
		// Use params from caller, if present.
		de_memcpy(&cctx->lh1p, codec_private_params, sizeof(struct de_lh1_params));
	}
	else {
		// Set default params.
		cctx->lh1p.history_fill_val = 0x20;
	}

	lzhuf_Decode_init(cctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x11c8, %esi           # imm = 0x11C8
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
leaq 0x249cc(%rip), %rcx     # 0x1afdd2
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x73(%rip), %rcx        # 0x18b4c0
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
leaq 0xd4(%rip), %rcx        # 0x18b530
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq 0x175(%rip), %rcx       # 0x18b5e0
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
leaq 0x236(%rip), %rcx       # 0x18b6b0
movq %rcx, 0x48(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x18b49a
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %edx
movl %edx, 0x11(%rax)
movb 0x4(%rcx), %cl
movb %cl, 0x15(%rax)
jmp 0x18b4a2
movq -0x18(%rbp), %rax
movb $0x20, 0x15(%rax)
movq -0x18(%rbp), %rdi
callq 0x18b720
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: my_lh1_codec_addbuf
static void my_lh1_codec_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	struct lzahuf_ctx *cctx = (struct lzahuf_ctx*)dfctx->codec_private;

	if(dfctx->finished_flag || cctx->errflag) {
		goto done;
	}

	lzhuf_Decode_continue(cctx, buf, buf_len, 0);

done:
	if(cctx->errflag) {
		dfctx->finished_flag = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x18b4f7
movq -0x20(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18b4f9
jmp 0x18b50c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x18b990
movq -0x20(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18b51e
movq -0x8(%rbp), %rax
movb $0x1, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: my_lh1_codec_finish
static void my_lh1_codec_finish(struct de_dfilter_ctx *dfctx)
{
	struct lzahuf_ctx *cctx = (struct lzahuf_ctx*)dfctx->codec_private;

	lzhuf_Decode_continue(cctx, NULL, 0, 1);

	cctx->total_nbytes_processed -= (i64)(cctx->bbll.nbits_in_bitbuf/8);
	de_bitbuf_lowlevel_empty(&cctx->bbll);
	dfctx->dres->bytes_consumed = cctx->total_nbytes_processed;
	dfctx->dres->bytes_consumed_valid = 1;

	if(cctx->errflag) {
		de_dfilter_set_generic_error(cctx->c, dfctx->dres, cctx->modname);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0x18b990
movq -0x10(%rbp), %rax
movl 0x74(%rax), %eax
shrl $0x3, %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x16a360
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18b5cd
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x177560
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: my_lh1_codec_command
static void my_lh1_codec_command(struct de_dfilter_ctx *dfctx, int cmd, UI flags)
{
	struct lzahuf_ctx *cctx = (struct lzahuf_ctx*)dfctx->codec_private;

	if(cmd==DE_DFILTER_COMMAND_FINISH_BLOCK) {
		lzhuf_Decode_continue(cctx, NULL, 0, 1);
		cctx->total_nbytes_processed -= (i64)(cctx->bbll.nbits_in_bitbuf/8);
		de_bitbuf_lowlevel_empty(&cctx->bbll);
		if(cctx->lh1p.is_dms_deep) {
			de_lz77buffer_set_curpos(cctx->ringbuf, cctx->ringbuf->curpos + 60);
		}
	}
	else if(cmd==DE_DFILTER_COMMAND_RESET_COUNTERS) {
		cctx->nbytes_written = 0;
		cctx->total_nbytes_processed = 0;
		cctx->errflag = 0;
		dfctx->finished_flag = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x3, -0xc(%rbp)
jne 0x18b66a
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0x18b990
movq -0x18(%rbp), %rax
movl 0x74(%rax), %eax
shrl $0x3, %eax
movl %eax, %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rdi
addq $0x70, %rdi
callq 0x16a360
movq -0x18(%rbp), %rax
cmpb $0x0, 0x14(%rax)
je 0x18b668
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movl 0x10(%rax), %esi
addl $0x3c, %esi
callq 0x178f40
jmp 0x18b69d
cmpl $0x4, -0xc(%rbp)
jne 0x18b69b
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x20(%rax)
jmp 0x18b69d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-lzah.c
// Function: my_lh1_codec_destroy
static void my_lh1_codec_destroy(struct de_dfilter_ctx *dfctx)
{
	struct lzahuf_ctx *cctx = (struct lzahuf_ctx*)dfctx->codec_private;

	if(cctx) {
		de_lz77buffer_destroy(cctx->c, cctx->ringbuf);
		cctx->ringbuf = NULL;
		de_free(dfctx->c, cctx);
	}
	dfctx->codec_private = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18b6ff
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x178950
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzah_have_enough_output
static int lzah_have_enough_output(struct lzahuf_ctx *cctx)
{
	if(cctx->dcmpro->len_known) {
		if(cctx->nbytes_written >= cctx->dcmpro->expected_len) {
			cctx->dfctx->finished_flag = 1;
			return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpb $0x0, 0x8(%rax)
je 0x18bc53
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jl 0x18bc51
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, 0x20(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x18bc5a
jmp 0x18bc53
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzhuf_DecodeChar
static UI lzhuf_DecodeChar(struct lzahuf_ctx *cctx)
{
	UI c;

	c = get_son(cctx, cctx->lzhuf_R);

	/* travel from root to leaf, */
	/* choosing the smaller child node (son[]) if the read bit is 0, */
	/* the bigger (son[]+1) if 1 */
	while (c < cctx->lzhuf_T) {
		c += lzhuf_getbits(cctx, 1);
		// There will never be more than 64 bits available, so a hypothetical
		// infinite loop would be caught here.
		if(cctx->errflag) return 0;
		c = get_son(cctx, c);
	}
	c -= cctx->lzhuf_T;
	lzhuf_update(cctx, c);
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %esi
callq 0x18bdb0
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x3c(%rcx), %eax
jae 0x18bcc9
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x18bdf0
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18bcb5
movl $0x0, -0x4(%rbp)
jmp 0x18bcea
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x18bdb0
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
jmp 0x18bc82
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x18be40
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzhuf_DecodePosition
static UI lzhuf_DecodePosition(struct lzahuf_ctx *cctx)
{
	UI i, j, c;
	UI d_code, d_len;

	/* recover upper bits from table */
	i = lzhuf_getbits(cctx, 8);
	if(cctx->errflag) return 0;
	fmtutil_get_lzhuf_d_code_and_len(i, &d_code, &d_len);
	c = d_code << cctx->dpparam_dcode_shift;

	/* read lower bits verbatim */
	j = d_len - cctx->dpparam_dlen_bias;
	i = (i<<j) | lzhuf_getbits(cctx, j);
	if(cctx->errflag) return 0;
	i &= cctx->dpparam_mask;
	return c | i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x18bdf0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18bd30
movl $0x0, -0x4(%rbp)
jmp 0x18bda6
movl -0x14(%rbp), %edi
leaq -0x20(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x18b2d0
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x48(%rcx), %ecx
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0x4c(%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x18bdf0
movl %eax, %ecx
movl -0x28(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x18bd90
movl $0x0, -0x4(%rbp)
jmp 0x18bda6
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
orl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzhuf_getbits
static UI lzhuf_getbits(struct lzahuf_ctx *cctx, UI nbits)
{
	if(cctx->bbll.nbits_in_bitbuf < nbits) {
		cctx->errflag = 1;
		return 0;
	}
	return (UI)de_bitbuf_lowlevel_get_bits(&cctx->bbll, nbits);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x74(%rax), %eax
cmpl -0x14(%rbp), %eax
jae 0x18be1f
movq -0x10(%rbp), %rax
movl $0x1, 0x54(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x18be32
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
movl -0x14(%rbp), %esi
callq 0x16a2a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzah_lz77buf_writebytecb
static void lzah_lz77buf_writebytecb(struct de_lz77buffer *rb, u8 n)
{
	struct lzahuf_ctx *cctx = (struct lzahuf_ctx*)rb->userdata;

	if(lzah_have_enough_output(cctx)) {
		return;
	}
	dbuf_writebyte(cctx->dcmpro->f, n);
	cctx->nbytes_written++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x18bc10
cmpl $0x0, %eax
je 0x18c52d
jmp 0x18c551
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %esi
callq 0x168380
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzhuf_StartHuff
static void lzhuf_StartHuff(struct lzahuf_ctx *cctx)
{
	UI i, j;

	for (i = 0; i < cctx->lzhuf_N_CHAR; i++) {
		set_freq(cctx, i, 1);
		set_son(cctx, i, i + cctx->lzhuf_T);
		set_prnt(cctx, i + cctx->lzhuf_T, i);
	}
	i = 0;
	j = cctx->lzhuf_N_CHAR;
	while (j <= cctx->lzhuf_R) {
		set_freq(cctx, j, get_freq(cctx, i) + get_freq(cctx, i + 1));
		set_son(cctx, j, i);
		set_prnt(cctx, i, j);
		set_prnt(cctx, i + 1, j);
		i += 2;
		j++;
	}
	set_freq(cctx, cctx->lzhuf_T, 0xffff);
	set_prnt(cctx, cctx->lzhuf_R, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jae 0x18c5cd
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x1, %edx
callq 0x18c440
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x3c(%rcx), %eax
movzwl %ax, %edx
callq 0x18c4c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
addl 0x3c(%rax), %esi
movl -0xc(%rbp), %eax
movzwl %ax, %edx
callq 0x18c480
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x18c573
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
ja 0x18c687
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x18c0a0
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x18c0a0
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
movw %ax, %cx
movl -0x14(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movzwl %ax, %edx
callq 0x18c440
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0xc(%rbp), %eax
movzwl %ax, %edx
callq 0x18c4c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
movzwl %ax, %edx
callq 0x18c480
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %eax
movzwl %ax, %edx
callq 0x18c480
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x18c5de
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %esi
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x18c440
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x40(%rax), %esi
xorl %edx, %edx
callq 0x18c480
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/lzhuf.h
// Function: lzhuf_dumptree
static void lzhuf_dumptree(struct lzahuf_ctx *cctx)
{
	UI i;
	char b2buf[72];

	de_dbg(cctx->c, "R: %u", (UI)cctx->lzhuf_R);
	de_dbg(cctx->c, "T: %u", (UI)cctx->lzhuf_T);
	lzhuf_decodesubtree_node(cctx, cctx->lzhuf_R, 0, 0, b2buf, sizeof(b2buf));
	for(i=0; i<DE_ARRAYCOUNT(cctx->son); i++) {
		de_dbg(cctx->c, "son[%u]: %u", i, (UI)cctx->son[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x40(%rax), %edx
leaq 0x4b552(%rip), %rsi     # 0x1d7c33
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %edx
leaq 0x4a856(%rip), %rsi     # 0x1d6f53
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x40(%rax), %esi
leaq -0x60(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movl $0x48, %r9d
callq 0x18c770
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x277, %rax            # imm = 0x277
jae 0x18c768
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movzwl 0xcd6(%rax,%rcx,2), %ecx
leaq 0x4b4e3(%rip), %rsi     # 0x1d7c39
movb $0x0, %al
callq 0x15b0d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x18c72b
addq $0x60, %rsp
popq %rbp
retq
nop