LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: process_ext_attr
static void process_ext_attr(deark *c, lctx *d, struct member_data *md)
{
	if(d->using_scanmode) {
		// In this mode, there is no 'external attribs' field.
		return;
	}

	if(md->ver_made_by_hi==3) { // Unix
		UI unix_filetype;
		unix_filetype = (md->attr_e>>16)&0170000;
		if(unix_filetype == 0040000) {
			md->is_dir = 1;
		}
		else if(unix_filetype == 0120000) {
			md->is_symlink = 1;
		}

		if((md->attr_e>>16)&0111) {
			md->is_executable = 1;
		}
		else {
			md->is_nonexecutable = 1;
		}
	}

	// MS-DOS-style attributes.
	// Technically, we should only do this if
	// md->central_dir_entry_data.ver_made_by_hi==0.
	// However, most(?) zip programs set the low byte of the external attribs
	// to the equivalent MS-DOS attribs, at least in cases where it matters.
	if(md->attr_e & 0x10) {
		md->is_dir = 1;
	}
	else if(md->attr_e & 0x08) {
		// A volume label should have min-version-needed set to 1.1 or higher,
		// but we don't check that because even PKZIP (e.g. v2.04g) sets it
		// to 1.0.
		md->is_volume_label = 1;
	}

	// TODO: Support more platforms.
	// TODO: The 0x756e (ASi Unix) extra field might be important, as it contains
	// file permissions.

	if(md->is_dir && md->uncmpr_size!=0) {
		// I'd expect a subdirectory entry to have zero size. If it doesn't,
		// let's just assume we misidentified it as a subdirectory, and
		// extract its data.
		md->is_dir = 0;
	}

	if(md->is_volume_label && md->uncmpr_size!=0) {
		// Though we theoretically allow volume labels to have data, this is
		// probably a normal file that was misidentified.
		md->is_volume_label = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x14ca42
jmp 0x14cb31
movq -0x18(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x14cab6
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x10, %eax
andl $0xf000, %eax           # imm = 0xF000
movl %eax, -0x1c(%rbp)
cmpl $0x4000, -0x1c(%rbp)    # imm = 0x4000
jne 0x14ca74
movq -0x18(%rbp), %rax
movl $0x1, 0x38(%rax)
jmp 0x14ca8a
cmpl $0xa000, -0x1c(%rbp)    # imm = 0xA000
jne 0x14ca88
movq -0x18(%rbp), %rax
movl $0x1, 0x40(%rax)
jmp 0x14ca8a
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x10, %eax
andl $0x49, %eax
cmpl $0x0, %eax
je 0x14caa9
movq -0x18(%rbp), %rax
movl $0x1, 0x34(%rax)
jmp 0x14cab4
movq -0x18(%rbp), %rax
movl $0x1, 0x30(%rax)
jmp 0x14cab6
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x14cad2
movq -0x18(%rbp), %rax
movl $0x1, 0x38(%rax)
jmp 0x14caeb
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x14cae9
movq -0x18(%rbp), %rax
movb $0x1, 0x3c(%rax)
jmp 0x14caeb
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x14cb0e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x1a0(%rax)
je 0x14cb0e
movq -0x18(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
movzbl 0x3c(%rax), %eax
cmpl $0x0, %eax
je 0x14cb31
movq -0x18(%rbp), %rax
cmpq $0x0, 0x1a0(%rax)
je 0x14cb31
movq -0x18(%rbp), %rax
movb $0x0, 0x3c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: do_zip64_eocd_locator
static void do_zip64_eocd_locator(deark *c, lctx *d)
{
	i64 n;
	i64 pos = d->eocd_pos - 20;

	if(dbuf_memcmp(c->infile, pos, g_zipsig67, 4)) {
		return;
	}
	de_dbg(c, "zip64 eocd locator found at %"I64_FMT, pos);
	pos += 4;
	d->is_zip64 = 1;
	de_dbg_indent(c, 1);
	d->zip64_eocd_segnum = de_getu32le_p(&pos);
	d->zip64_eocd_pos = de_geti64le(pos); pos += 8;
	de_dbg(c, "offset of zip64 eocd: %"I64_FMT", segment: %u",
		d->zip64_eocd_pos, (UI)d->zip64_eocd_segnum);
	de_sanitize_offset(&d->zip64_eocd_pos);
	n = de_getu32le_p(&pos);
	de_dbg(c, "total number of segments: %u", (UI)n);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
subq $0x14, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0x83374(%rip), %rdx     # 0x1d05ea
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x14d28a
jmp 0x14d384
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x82e52(%rip), %rsi     # 0x1d00eb
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0xac(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1657e0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movl %eax, %ecx
leaq 0x82dd9(%rip), %rsi     # 0x1d010b
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rdi
addq $0x90, %rdi
callq 0x15f830
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0x82dc3(%rip), %rsi     # 0x1d0132
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: check_for_resof_fmt
static void check_for_resof_fmt(deark *c, lctx *d)
{
	if(d->is_zip64) return;
	if(c->module_disposition==DE_MODDISP_INTERNAL) return;
	if(d->eocd_pos != c->infile->len-22) return;
	// Test the high byte of the central-dir-size field. For RESOF, the sign bit
	// should be set.
	if(de_getbyte(d->eocd_pos+15) < 0x80) return;
	if(de_getu32be(0) != CODE_PK36) return;
	d->is_resof = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0xac(%rax)
je 0x14d77f
jmp 0x14d7fb
movq -0x8(%rbp), %rax
cmpl $0x3, 0x24(%rax)
jne 0x14d78b
jmp 0x14d7fb
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x16, %rcx
cmpq %rcx, %rax
je 0x14d7ad
jmp 0x14d7fb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
addq $0xf, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x80, %eax
jge 0x14d7d5
jmp 0x14d7fb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
cmpq $0x504b0306, %rax       # imm = 0x504B0306
je 0x14d7f0
jmp 0x14d7fb
movq -0x10(%rbp), %rax
movb $0x1, 0xad(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: do_central_dir
static int do_central_dir(deark *c, lctx *d)
{
	i64 i;
	i64 pos;
	i64 entry_size;
	int retval = 0;

	pos = d->eocd.cdir_offset;
	de_dbg(c, "central dir at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	for(i=0; i<d->eocd.cdir_num_entries_total; i++) {
		if(!do_central_dir_entry(c, d, i, pos, &entry_size)) {
			// TODO: Decide exactly what to do if something fails.
			goto done;
		}
		pos += entry_size;
	}
	retval = 1;

done:
	de_dbg_indent(c, -1);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x826f0(%rip), %rsi     # 0x1d04b2
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x14de27
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x28(%rbp), %r8
callq 0x14de90
cmpl $0x0, %eax
jne 0x14de0d
jmp 0x14de2e
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x14dddf
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: do_central_dir_entry
static int do_central_dir_entry(deark *c, lctx *d,
	i64 central_index, i64 pos, i64 *entry_size)
{
	struct member_data *md = NULL;
	int ret;

	md = create_member_data(c, d);
	ret = do_member_from_central_dir_entry(c, d, md, central_index, pos, entry_size);
	destroy_member_data(c, md);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1493d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
callq 0x14df00
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x14a190
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zip.c
// Function: do_member_from_central_dir_entry
static int do_member_from_central_dir_entry(deark *c, lctx *d,
	struct member_data *md, i64 central_index, i64 pos, i64 *entry_size)
{
	i64 tmp_entry_size;
	int retval = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	*entry_size = 0;

	if(pos >= d->eocd.cdir_offset+d->eocd.cdir_byte_size) {
		goto done;
	}

	de_dbg(c, "central dir entry #%d", (int)central_index);
	de_dbg_indent(c, 1);

	// Read the central dir file header
	if(!do_file_header(c, d, md, 1, pos, entry_size)) {
		goto done;
	}

	// If we were able to read the central dir file header, we might be able
	// to continue and read more files, even if the local file header fails.
	retval = 1;

	// Read the local file header
	if(!do_file_header(c, d, md, 0, md->offset_of_local_header, &tmp_entry_size)) {
		goto done;
	}

	do_process_member(c, d, md);

done:
	de_dbg_indent_restore(c, saved_indent_level);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x15b580
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x10(%rbp), %rdx
addq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jl 0x14df5d
jmp 0x14dfe6
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x82557(%rip), %rsi     # 0x1d04c5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl $0x1, %ecx
callq 0x149430
cmpl $0x0, %eax
jne 0x14dfa8
jmp 0x14dfe6
movl $0x1, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %r8
xorl %ecx, %ecx
leaq -0x38(%rbp), %r9
callq 0x149430
cmpl $0x0, %eax
jne 0x14dfd5
jmp 0x14dfe6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x149fe0
movq -0x8(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x15b5a0
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: de_module_zoo
void de_module_zoo(deark *c, struct deark_module_info *mi)
{
	mi->id = "zoo";
	mi->desc = "Zoo compressed archive format";
	mi->run_fn = de_run_zoo;
	mi->identify_fn = de_identify_zoo;
	mi->help_fn = de_help_zoo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x825f1(%rip), %rcx     # 0x1d0608
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x825e7(%rip), %rcx     # 0x1d060c
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x14e060
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ad(%rip), %rcx       # 0x14e2f0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ee(%rip), %rcx       # 0x14e340
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: de_module_zoo_filter
void de_module_zoo_filter(deark *c, struct deark_module_info *mi)
{
	mi->id = "zoo_filter";
	mi->desc = "Zoo filter format";
	mi->run_fn = de_run_zoo_filter;
	mi->identify_fn = de_identify_zoo_filter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x822a3(%rip), %rcx     # 0x1d062a
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x822a0(%rip), %rcx     # 0x1d0635
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x14e3c0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x27d(%rip), %rcx       # 0x14e630
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: de_identify_zoo_filter
static int de_identify_zoo_filter(deark *c)
{
	u8 b[2];

	if(c->infile->len<6) return 0;
	if(de_getu16le(0) != 0x5a32) return 0;

	// LZH ends with 16 0 bits, followed by 0 to 7 bits of padding that we
	// will hope are 0. So it must end with two 0x00 bytes.
	// LZD ends with the EOF code: 257. By my calculation, one of the 1 bits
	// from that code must occur in the second-to-last byte. And the last byte
	// can have at most one '1' bit.
	de_read(b, c->infile->len-4, 2);
	if(b[0]==0) {
		if(b[1]==0) return 45; // Possible LZH
	}
	else {
		if(b[1]<=0x02 || b[1]==0x04 || b[1]==0x08 || b[1]==0x10 ||
			b[1]==0x20 || b[1]==0x40 || b[1]==0x80)
		{
			return 45; // Possible LZD
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x6, 0x18(%rax)
jge 0x14e657
movl $0x0, -0x4(%rbp)
jmp 0x14e712
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
cmpq $0x5a32, %rax           # imm = 0x5A32
je 0x14e67c
movl $0x0, -0x4(%rbp)
jmp 0x14e712
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x12(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
subq $0x4, %rdx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x12(%rbp), %eax
cmpl $0x0, %eax
jne 0x14e6bf
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x14e6bd
movl $0x2d, -0x4(%rbp)
jmp 0x14e712
jmp 0x14e70b
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jle 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
je 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
je 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x10, %eax
je 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x20, %eax
je 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x40, %eax
je 0x14e700
movzbl -0x11(%rbp), %eax
cmpl $0x80, %eax
jne 0x14e709
movl $0x2d, -0x4(%rbp)
jmp 0x14e712
jmp 0x14e70b
movl $0x0, -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/modules/zoo.c
// Function: de_module_zoo_z
void de_module_zoo_z(deark *c, struct deark_module_info *mi)
{
	mi->id = "zoo_z";
	mi->desc = "Zoo Z format";
	mi->run_fn = de_run_zoo_z;
	mi->identify_fn = de_identify_zoo_z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x81f10(%rip), %rcx     # 0x1d0647
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x81f08(%rip), %rcx     # 0x1d064d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x14e770
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3bd(%rip), %rcx       # 0x14eb20
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: check_for_orphaned_comment
static void check_for_orphaned_comment(deark *c, lctx *d)
{
	i64 ocpos, oclen;
	i64 foundpos = 0;

	if(d->type != 1) return;
	if(d->archive_comment_pos==0 || d->archive_comment_len==0) return;
	ocpos = 42;
	if(d->min_offset_found <= ocpos) return;
	oclen = d->min_offset_found - ocpos;
	if(oclen<5 || oclen>1000) return;
	if(de_getbyte(ocpos+oclen-1) != 0x0a) return;
	if(dbuf_search_byte(c->infile, 0x00, ocpos, oclen, &foundpos)) return;
	de_dbg(c, "possible orphaned archive comment found at %"I64_FMT", len=%"I64_FMT,
		ocpos, oclen);
	do_comment(c, d, ocpos, oclen, "orphaned archive comment", 1, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x22(%rax), %eax
cmpl $0x1, %eax
je 0x14f17a
jmp 0x14f260
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x14f190
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x14f195
jmp 0x14f260
movq $0x2a, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq -0x18(%rbp), %rax
jg 0x14f1b0
jmp 0x14f260
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x5, -0x20(%rbp)
jl 0x14f1d1
cmpq $0x3e8, -0x20(%rbp)     # imm = 0x3E8
jle 0x14f1d6
jmp 0x14f260
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq -0x20(%rbp), %rsi
subq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0xa, %eax
je 0x14f1f9
jmp 0x14f260
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %esi, %esi
leaq -0x28(%rbp), %r8
callq 0x1667a0
cmpl $0x0, %eax
je 0x14f21b
jmp 0x14f260
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x818e4(%rip), %rsi     # 0x1d0b12
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x818fe(%rip), %r8      # 0x1d0b4a
movl $0x1, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x14f270
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: do_comment
static void do_comment(deark *c, lctx *d, i64 pos, i64 len, const char *name,
	int is_main, int extract_to_file)
{
	on_offset_found(c, d, pos, len);
	if(len<1) return;
	if(pos<0 || pos+len>c->infile->len) return;
	if(extract_to_file) {
		do_extract_comment(c, d, pos, len, is_main);
	}
	else {
		do_dbg_comment(c, d, pos, len, name, is_main);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x14f320
cmpq $0x1, -0x20(%rbp)
jge 0x14f2b1
jmp 0x14f30e
cmpq $0x0, -0x18(%rbp)
jl 0x14f2ce
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x14f2d0
jmp 0x14f30e
cmpl $0x0, 0x10(%rbp)
je 0x14f2f1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x14f360
jmp 0x14f30e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x14f3f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: do_extract_comment
static void do_extract_comment(deark *c, lctx *d, i64 pos, i64 len, int is_main)
{
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "comment.txt", NULL, DE_CREATEFLAG_IS_AUX);
	dbuf_copy_slice_convert_to_utf8(c->infile, pos, len,
		DE_EXTENC_MAKE(d->da->input_encoding, DE_ENCSUBTYPE_HYBRID),
		outf, 0x2|0x4);
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x54ec1(%rip), %rsi     # 0x1a4250
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %ecx
andl $0xff, %ecx
orl $0x300, %ecx            # imm = 0x300
movq -0x30(%rbp), %r8
movl $0x6, %r9d
callq 0x169da0
movq -0x30(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: do_dbg_comment
static void do_dbg_comment(deark *c, lctx *d, i64 pos, i64 len, const char *name,
	int is_main)
{
	de_ucstring *s = NULL;

	if(c->debug_level<1) return;
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, len, DE_DBG_MAX_STRLEN, s,
		0, DE_EXTENC_MAKE(d->da->input_encoding, DE_ENCSUBTYPE_HYBRID));
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jge 0x14f426
jmp 0x14f4a6
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %eax
andl $0xff, %eax
orl $0x300, %eax            # imm = 0x300
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0x68770(%rip), %rsi     # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: zoo_decompressor_fn
static void zoo_decompressor_fn(struct de_arch_member_data *md)
{
	struct zoo_member_data *mdz = (struct zoo_member_data*)md->userdata;

	switch(mdz->method) {
	case ZOOCMPR_STORED:
		fmtutil_decompress_uncompressed(md->c, md->dcmpri, md->dcmpro, md->dres, 0);
		break;
	case ZOOCMPR_LZD:
		decompress_lzd(md->c, md->dcmpri, md->dcmpro, md->dres);
		break;
	case ZOOCMPR_LZH:
		decompress_lzh(md->c, md->dcmpri, md->dcmpro, md->dres);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x150013
jmp 0x14fffc
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x150045
jmp 0x150006
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x150074
jmp 0x1500a1
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
xorl %r8d, %r8d
callq 0x1778b0
jmp 0x1500a1
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
callq 0x150430
jmp 0x1500a1
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
callq 0x150490
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: get_cmpr_meth_name
static const char *get_cmpr_meth_name(u8 t)
{
	const char *name = NULL;
	switch(t) {
	case 0: name="stored"; break;
	case 1: name="lzd"; break;
	case 2: name="lzh"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x1500e3
jmp 0x1500cf
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x1500f0
jmp 0x1500d9
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x1500fd
jmp 0x150108
leaq 0x4fee9(%rip), %rax     # 0x19ffd3
movq %rax, -0x10(%rbp)
jmp 0x150108
leaq 0x80a04(%rip), %rax     # 0x1d0afb
movq %rax, -0x10(%rbp)
jmp 0x150108
leaq 0x80a9e(%rip), %rax     # 0x1d0ba2
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x150119
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x150126
leaq 0x67b0d(%rip), %rax     # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x150126
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: do_member_eof
static void do_member_eof(deark *c, lctx *d, struct de_arch_member_data *md)
{
	struct zoo_member_data *mdz = (struct zoo_member_data*)md->userdata;
	i64 pos1 = md->member_hdr_pos;
	i64 lvar;

	if(!mdz->has_ext_header) goto done;
	lvar = de_getu16le(pos1+51);
	de_dbg(c, "length of variable part: %d", (int)lvar);

	mdz->crc_hdr_reported = (u32)de_getu16le(pos1+54);
	de_dbg(c, "entry crc (reported): 0x%04x", (UI)mdz->crc_hdr_reported);
	calc_hdr_crc(c, d, md, lvar);
	de_dbg(c, "entry crc (calculated): 0x%04x", (UI)mdz->crc_hdr_calculated);
	if(mdz->crc_hdr_calculated != mdz->crc_hdr_reported) {
		de_warn(c, "Header CRC check failed");
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x2(%rax)
jne 0x15016e
jmp 0x150228
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x33, %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x8080c(%rip), %rsi     # 0x1d09a4
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x36, %rsi
callq 0x165280
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x2c(%rax), %edx
leaq 0x80832(%rip), %rsi     # 0x1d0a01
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x150370
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x30(%rax), %edx
leaq 0x80821(%rip), %rsi     # 0x1d0a1e
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
je 0x150226
movq -0x8(%rbp), %rdi
leaq 0x53ea1(%rip), %rsi     # 0x1a40c0
movb $0x0, %al
callq 0x15bc10
jmp 0x150228
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: finish_modtime_decoding
static void finish_modtime_decoding(deark *c, lctx *d, struct de_arch_member_data *md)
{
	struct zoo_member_data *mdz = (struct zoo_member_data*)md->userdata;
	i64 timestamp_offset;
	char timestamp_buf[64];

	timestamp_offset = 0;
	if      ( mdz->timzon < 127 )  timestamp_offset = 15*60*((i64)mdz->timzon      );
	else if ( 127 < mdz->timzon )  timestamp_offset = 15*60*((i64)mdz->timzon - 256);

	de_dos_datetime_to_timestamp(&md->fi->timestamp[DE_TIMESTAMPIDX_MODIFY], (i64)mdz->datdos, (i64)mdz->timdos);
	de_timestamp_to_string(&md->fi->timestamp[DE_TIMESTAMPIDX_MODIFY], timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "mod time: %s", timestamp_buf);
	if(mdz->timzon == 127) {
		md->fi->timestamp[DE_TIMESTAMPIDX_MODIFY].tzcode = DE_TZCODE_LOCAL;
	}
	else {
		de_timestamp_cvt_to_utc(&md->fi->timestamp[DE_TIMESTAMPIDX_MODIFY], timestamp_offset);
		de_timestamp_to_string(&md->fi->timestamp[DE_TIMESTAMPIDX_MODIFY], timestamp_buf, sizeof(timestamp_buf), 0);
		de_dbg(c, "mod time (UTC): %s", timestamp_buf);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x37(%rax), %eax
cmpl $0x7f, %eax
jge 0x15027d
movq -0x20(%rbp), %rax
movzbl 0x37(%rax), %eax
imulq $0x384, %rax, %rax      # imm = 0x384
movq %rax, -0x28(%rbp)
jmp 0x1502a9
movq -0x20(%rbp), %rax
movzbl 0x37(%rax), %ecx
movl $0x7f, %eax
cmpl %ecx, %eax
jge 0x1502a7
movq -0x20(%rbp), %rax
movzbl 0x37(%rax), %eax
subq $0x100, %rax            # imm = 0x100
imulq $0x384, %rax, %rax      # imm = 0x384
movq %rax, -0x28(%rbp)
jmp 0x1502a9
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %esi
movq -0x20(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, %edx
callq 0x15d750
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x18, %rdi
leaq -0x70(%rbp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq 0x5a414(%rip), %rsi     # 0x1aa70b
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
movzbl 0x37(%rax), %eax
cmpl $0x7f, %eax
jne 0x150319
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movb $0x2, 0x19(%rax)
jmp 0x150360
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rsi
callq 0x15de10
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x18, %rdi
leaq -0x70(%rbp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq 0x807a6(%rip), %rsi     # 0x1d0aff
movb $0x0, %al
callq 0x15b0d0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: calc_hdr_crc
static void calc_hdr_crc(deark *c, lctx *d, struct de_arch_member_data *md, i64 lvar)
{
	struct zoo_member_data *mdz = (struct zoo_member_data*)md->userdata;

	de_crcobj_reset(d->da->crco);
	de_crcobj_addslice(d->da->crco, c->infile, md->member_hdr_pos, 54);
	de_crcobj_addzeroes(d->da->crco, 2);
	de_crcobj_addslice(d->da->crco, c->infile, md->member_hdr_pos+56, lvar);
	mdz->crc_hdr_calculated = de_crcobj_getval(d->da->crco);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
callq 0x15f250
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x36, %ecx
callq 0x15f500
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
movl $0x2, %esi
callq 0x15f4d0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x38, %rdx
movq -0x20(%rbp), %rcx
callq 0x15f500
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
callq 0x15f340
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x30(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: decompress_lzd
static void decompress_lzd(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_ZOOLZD;
	delzwp.max_code_size = 13;
	fmtutil_decompress_lzw(c, dcmpri, dcmpro, dres, &delzwp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x34(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x4, -0x34(%rbp)
movl $0xd, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x1843b0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/zoo.c
// Function: decompress_lzh
static void decompress_lzh(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_lh5x_params lzhparams;

	de_zeromem(&lzhparams, sizeof(struct de_lh5x_params));
	lzhparams.fmt = DE_LH5X_FMT_LH5;
	lzhparams.zero_codes_block_behavior = DE_LH5X_ZCB_STOP;
	lzhparams.warn_about_zero_codes_block = 0;

	// Zoo does not appear to allow LZ77 offsets that point to data before
	// the beginning of the file, so it doesn't matter what we initialize the
	// history buffer to.
	lzhparams.history_fill_val = 0x00;

	fmtutil_decompress_lh5x(c, dcmpri, dcmpro, dres, &lzhparams);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movl $0x5, -0x30(%rbp)
movb $0x1, -0x2c(%rbp)
movb $0x0, -0x2b(%rbp)
movb $0x0, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0x17ecb0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: de_module_rar
void de_module_rar(deark *c, struct deark_module_info *mi)
{
	mi->id = "rar";
	mi->desc = "RAR archive";
	mi->run_fn = de_run_rar;
	mi->identify_fn = de_identify_rar;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x80801(%rip), %rcx     # 0x1d0d08
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x807f7(%rip), %rcx     # 0x1d0d0c
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x150550
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x17d(%rip), %rcx       # 0x1506b0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: de_run_rar
static void de_run_rar(deark *c, de_module_params *mparams)
{
	de_arch_lctx *d = NULL;

	d = de_arch_create_lctx(c);
	d->is_le = 1;
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);
	d->data_startpos = 0;

	d->fmtver = rar_get_fmtver(c->infile, d->data_startpos);
	if(d->fmtver==0 && c->module_disposition==DE_MODDISP_EXPLICIT) {
		if(rar_search_for_archive(c, d, &d->data_startpos)) {
			de_dbg(c, "likely RAR data found at %"I64_FMT, d->data_startpos);
			d->fmtver = rar_get_fmtver(c->infile, d->data_startpos);
		}
	}

	if(d->fmtver==0) {
		de_err(c, "Not a RAR file");
		goto done;
	}

	if(d->fmtver==1) {
		do_rar_old(c, d);
	}
	else if(d->fmtver==4) {
		do_rar_v4(c, d);
	}
	else {
		do_rar_v5(c, d);
	}

done:
	de_arch_destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17c220
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xd, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1506f0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x15062d
movq -0x8(%rbp), %rax
cmpl $0x2, 0x24(%rax)
jne 0x15062d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x48, %rdx
callq 0x1507a0
cmpl $0x0, %eax
je 0x15062b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x80712(%rip), %rsi     # 0x1d0d18
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x1506f0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x58(%rax)
jmp 0x15062d
movq -0x18(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x15064b
movq -0x8(%rbp), %rdi
leaq 0x806f3(%rip), %rsi     # 0x1d0d35
movb $0x0, %al
callq 0x15bfb0
jmp 0x15068e
movq -0x18(%rbp), %rax
cmpl $0x1, 0x58(%rax)
jne 0x150664
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x150850
jmp 0x15068c
movq -0x18(%rbp), %rax
cmpl $0x4, 0x58(%rax)
jne 0x15067d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x150ae0
jmp 0x15068a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x150c00
jmp 0x15068c
jmp 0x15068e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x17c270
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: rar_get_fmtver
static int rar_get_fmtver(dbuf *f, i64 pos)
{
	u8 buf[8];

	dbuf_read(f, buf, pos, sizeof(buf));
	if(!de_memcmp(buf, g_rar4_sig, 7)) {
		return 4; // ver 1.5x-4.xx
	}
	if(!de_memcmp(buf, g_rar5_sig, 8)) {
		return 5;
	}
	if(!de_memcmp(buf, g_rar_oldsig, 4)) {
		return 1; // ver < 1.50
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0x164d10
leaq -0x20(%rbp), %rdi
movq 0xd52c7(%rip), %rsi     # 0x2259e8
movl $0x7, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x150739
movl $0x4, -0x4(%rbp)
jmp 0x15078d
leaq -0x20(%rbp), %rax
movq 0xd52ac(%rip), %rcx     # 0x2259f0
movq (%rcx), %rcx
movq (%rax), %rax
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x150761
movl $0x5, -0x4(%rbp)
jmp 0x15078d
leaq -0x20(%rbp), %rax
movq 0xd528c(%rip), %rcx     # 0x2259f8
movl (%rcx), %ecx
movl (%rax), %eax
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x150786
movl $0x1, -0x4(%rbp)
jmp 0x15078d
movl $0x0, -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/modules/rar.c
// Function: rar_search_for_archive
static int rar_search_for_archive(deark *c, de_arch_lctx *d, i64 *pfoundpos)
{
	int ret;

	// Search for the common prefix of g_rar4_sig & g_rar5_sig
	ret = dbuf_search(c->infile, g_rar4_sig, 6, 0, c->infile->len, pfoundpos);
	if(ret) return 1;

	ret = dbuf_search(c->infile, g_rar_oldsig, 4, 0, c->infile->len, pfoundpos);
	if(ret) return 1;
	return 0;
}

// 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 0x18(%rax), %rdi
movq 0xd5225(%rip), %rsi     # 0x2259e8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r8
movq -0x20(%rbp), %r9
movl $0x6, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x169370
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x1507f3
movl $0x1, -0x4(%rbp)
jmp 0x150839
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0xd51f6(%rip), %rsi     # 0x2259f8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r8
movq -0x20(%rbp), %r9
movl $0x4, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x169370
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x150832
movl $0x1, -0x4(%rbp)
jmp 0x150839
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/modules/rar.c
// Function: do_rar_v4
static void do_rar_v4(deark *c, de_arch_lctx *d)
{
	struct rar4_block *rb = NULL;
	i64 pos = d->data_startpos;

	de_declare_fmt(c, "RAR (v1.50-4.20)");
	d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);

	while(1) {
		if(pos >= c->infile->len) break;

		if(rb) {
			rar4_free_block(c, rb);
			rb = NULL;
		}
		rb = de_malloc(c, sizeof(struct rar4_block));
		rb->block_pos = pos;
		rb->block_max_endpos = c->infile->len;
		rb->parent_type = 0;
		rar_read_v4_block(c, d, rb);
		if(!rb->parsed_ok) goto done;
		if(rb->last_block) goto done;
		if(rb->block_size_full <= 0) goto done;
		pos += rb->block_size_full;
	}

done:
	rar4_free_block(c, rb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x80330(%rip), %rsi     # 0x1d0e3f
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15eac0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x150b44
jmp 0x150be4
cmpq $0x0, -0x18(%rbp)
je 0x150b60
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1511a0
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x50, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x19(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1511d0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x1a(%rax)
jne 0x150bb6
jmp 0x150be6
movq -0x18(%rbp), %rax
cmpb $0x0, 0x1b(%rax)
je 0x150bc2
jmp 0x150be6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jg 0x150bcf
jmp 0x150be6
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x150b2d
jmp 0x150be6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1511a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: do_rar_v5
static void do_rar_v5(deark *c, de_arch_lctx *d)
{
	struct rar5_block *rb = NULL;
	i64 pos = d->data_startpos;

	de_declare_fmt(c, "RAR 5.0");
	d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);
	pos += 8;

	while(1) {
		if(pos >= c->infile->len) break;

		if(rb) {
			rar5_free_block(c, rb);
			rb = NULL;
		}
		rb = de_malloc(c, sizeof(struct rar5_block));
		rar_read_v5_block(c, d, rb, pos);
		if(d->fatalerrflag || d->stop_flag) goto done;
		if(rb->block_size_full <= 0) goto done;
		pos += rb->block_size_full;
	}

done:
	on_rar5_file_end(c, d);
	rar5_free_block(c, rb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x80457(%rip), %rsi     # 0x1d1086
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15eac0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x150c6d
jmp 0x150ce8
cmpq $0x0, -0x18(%rbp)
je 0x150c89
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1521d0
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x48, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x152200
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x150cc4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x150cc6
jmp 0x150cea
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0x150cd3
jmp 0x150cea
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x150c59
jmp 0x150cea
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x152600
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1521d0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: rar_handle_noncmpr_comment
static void rar_handle_noncmpr_comment(deark *c, de_arch_lctx *d, i64 pos, i64 len,
	de_encoding enc, int is_file_comment)
{
	de_ucstring *comment = NULL;
	const char *ext;

	if(len<1) goto done;

	ext = is_file_comment?"fcomment.txt":"comment.txt";

	if(c->extract_level>=2) {
		dbuf_create_file_from_slice(c->infile, pos, len, ext,
			NULL, DE_CREATEFLAG_IS_AUX);
	}
	else {
		comment = ucstring_create(c);
		dbuf_read_to_ucstring_n(c->infile, pos, len, DE_DBG_MAX_STRLEN,
			comment, 0, DE_EXTENC_MAKE(enc, DE_ENCSUBTYPE_HYBRID));
		de_dbg(c, "%scomment: \"%s\"", (is_file_comment?"file ":""),
			ucstring_getpsz_d(comment));
	}

done:
	ucstring_destroy(comment);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x1, -0x20(%rbp)
jge 0x150d44
jmp 0x150e1c
movl -0x28(%rbp), %edx
leaq 0x53502(%rip), %rax     # 0x1a4250
leaq 0x534fa(%rip), %rcx     # 0x1a424f
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jl 0x150d96
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
jmp 0x150e1a
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
movl -0x24(%rbp), %eax
andl $0xff, %eax
orl $0x300, %eax            # imm = 0x300
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x28(%rbp), %edx
leaq 0x7fdea(%rip), %rax     # 0x1d0bd0
leaq 0x7ffc3(%rip), %rcx     # 0x1d0db0
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0x7ff8d(%rip), %rsi     # 0x1d0da0
movb $0x0, %al
callq 0x15b0d0
jmp 0x150e1c
movq -0x30(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: get_generic_rar_cmpr_name
static const char *get_generic_rar_cmpr_name(UI n)
{
	const char *names[6] = { "stored", "fastest", "fast",
		"normal", "good", "best" };

	if(n<=5) {
		return names[n];
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0xd36da(%rip), %rsi     # 0x224840
movl $0x30, %edx
callq 0x191e0
cmpl $0x5, -0xc(%rbp)
ja 0x151184
movl -0xc(%rbp), %eax
movq -0x40(%rbp,%rax,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x15118f
leaq 0x66aa2(%rip), %rax     # 0x1b7c2d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: rar_get_v4_blktype_name
static const char *rar_get_v4_blktype_name(u8 n)
{
	const char *name = NULL;

	switch(n) {
	case 0x72: name = "marker"; break;
	case 0x73: name = "archive header"; break;
	case 0x74: name = "file header"; break;
	case 0x75: name = "comment"; break;
	case 0x76: name = "extra info"; break;
	case 0x77: name = "subblock (old)"; break;
	case 0x78: name = "recovery record"; break;
	case 0x79: name = "auth info"; break;
	case 0x7a: name = "subblock (new)"; break;
	case 0x7b: name = "end of archive"; break;
	}

	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
addl $-0x72, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x9, %eax
ja 0x1516ac
movq -0x18(%rbp), %rax
leaq 0x7f665(%rip), %rcx     # 0x1d0c88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4f12d(%rip), %rax     # 0x1a0760
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x52e9c(%rip), %rax     # 0x1a44dc
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x70ba7(%rip), %rax     # 0x1c21f4
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7eceb(%rip), %rax     # 0x1d0345
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7f864(%rip), %rax     # 0x1d0ecb
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7f862(%rip), %rax     # 0x1d0ed6
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7f8a7(%rip), %rax     # 0x1d0f28
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7f857(%rip), %rax     # 0x1d0ee5
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x7f854(%rip), %rax     # 0x1d0eef
movq %rax, -0x10(%rbp)
jmp 0x1516ac
leaq 0x52a70(%rip), %rax     # 0x1a4118
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1516bd
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1516ca
leaq 0x66569(%rip), %rax     # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x1516ca
movq -0x20(%rbp), %rax
popq %rbp
retq