LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grob.c
// Function: de_run_grob_text
static void de_run_grob_text(deark *c, lctx *d)
{
	i64 pos;
	i64 img_pos = 0;
	int ret;
	i64 img_count = 0;

	de_declare_fmt(c, "HP GROB, text encoded");

	// Though some text GROB files begin with "GROB", we also want to support files
	// that have "%%HP" headers, and other files that have one or more GROB data objects
	// embedded in them.

	pos = 0;

	while(pos < c->infile->len) {
		// TODO: Ideally, we should be more careful about what we search for.
		// Maybe we should make sure "GROB" is the first nonwhitespace on the line,
		// but even that isn't enough.

		ret = dbuf_search(c->infile, (const u8*)"GROB", 4, pos, c->infile->len-pos, &img_pos);
		if(!ret) {
			// No more images in this file.
			break;
		}

		de_dbg(c, "GROB format found at %d", (int)img_pos);

		img_count++;
		if(!de_good_image_count(c, img_count)) break;
		grob_text_1_image(c, d, img_pos);

		if(d->bytes_consumed<1) break;
		pos = img_pos + d->bytes_consumed;
	}

	if(img_count==0) {
		de_err(c, "Unknown or unsupported GROB format");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x135493(%rip), %rsi    # 0x1ac0ee
callq 0x15e380
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x76d25
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r8
subq -0x18(%rbp), %r8
leaq 0x135463(%rip), %rsi    # 0x1ac104
movl $0x4, %edx
leaq -0x20(%rbp), %r9
callq 0x169370
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x76cba
jmp 0x76d25
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x13543e(%rip), %rsi    # 0x1ac109
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x16a9a0
cmpl $0x0, %eax
jne 0x76cf2
jmp 0x76d25
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x76f60
movq -0x10(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x76d10
jmp 0x76d25
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x18(%rbp)
jmp 0x76c68
cmpq $0x0, -0x30(%rbp)
jne 0x76d3e
movq -0x8(%rbp), %rdi
leaq 0x1353ea(%rip), %rsi    # 0x1ac121
movb $0x0, %al
callq 0x15bfb0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gzip.c
// Function: de_module_gzip
void de_module_gzip(deark *c, struct deark_module_info *mi)
{
	mi->id = "gzip";
	mi->desc = "gzip compressed file";
	mi->run_fn = de_run_gzip;
	mi->identify_fn = de_identify_gzip;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x134f5a(%rip), %rcx    # 0x1ac1b1
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x134f51(%rip), %rcx    # 0x1ac1b6
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x77290
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xdd(%rip), %rcx        # 0x77360
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gzip.c
// Function: de_run_gzip
static void de_run_gzip(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 member_size;

	d = de_malloc(c, sizeof(lctx));
	d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);

	pos = 0;
	while(1) {
		if(pos >= c->infile->len) break;
		if(!do_gzip_read_member(c, d, pos, &member_size)) {
			break;
		}
		if(member_size<=0) break;

		pos += member_size;
	}
	dbuf_close(d->output_file);

	if(d) {
		de_crcobj_destroy(d->crco);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15eac0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x772ef
jmp 0x77322
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x773d0
cmpl $0x0, %eax
jne 0x7730b
jmp 0x77322
cmpq $0x0, -0x28(%rbp)
jg 0x77314
jmp 0x77322
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x772db
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x1676a0
cmpq $0x0, -0x18(%rbp)
je 0x7734f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x15f2e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gzip.c
// Function: de_identify_gzip
static int de_identify_gzip(deark *c)
{
	u8 buf[3];

	de_read(buf, 0, 3);
	if(buf[0]==0x1f && buf[1]==0x8b) {
		if(buf[2]==0x08) return 100;
		return 10;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x13(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %ecx
callq 0x164d10
movzbl -0x13(%rbp), %eax
cmpl $0x1f, %eax
jne 0x773b5
movzbl -0x12(%rbp), %eax
cmpl $0x8b, %eax
jne 0x773b5
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
jne 0x773ac
movl $0x64, -0x4(%rbp)
jmp 0x773bc
movl $0xa, -0x4(%rbp)
jmp 0x773bc
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/gzip.c
// Function: get_os_name
static const char *get_os_name(u8 n)
{
	const char *names[14] = { "FAT", "Amiga", "VMS", "Unix",
		"VM/CMS", "Atari", "HPFS", "Mac", "Z-System", "CP/M",
		"TOPS-20", "NTFS", "QDOS", "RISCOS" };
	const char *name = "?";

	if((unsigned int)n<=13) {
		name = names[(unsigned int)n];
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
leaq -0x80(%rbp), %rdi
leaq 0x1a0224(%rip), %rsi    # 0x217d40
movl $0x70, %edx
callq 0x191e0
leaq 0x140100(%rip), %rax    # 0x1b7c2d
movq %rax, -0x88(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0xd, %eax
ja 0x77b4f
movzbl -0x1(%rbp), %eax
movl %eax, %eax
movq -0x80(%rbp,%rax,8), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_module_cdr_wl
void de_module_cdr_wl(deark *c, struct deark_module_info *mi)
{
	mi->id = "cdr_wl";
	mi->desc = "CorelDRAW (old WL format)";
	mi->desc2 = "extract preview image";
	mi->run_fn = de_run_cdr_wl;
	mi->identify_fn = de_identify_cdr_wl;
	mi->help_fn = de_help_cdr_wl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13480a(%rip), %rcx    # 0x1ac381
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x134803(%rip), %rcx    # 0x1ac388
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x13054a(%rip), %rcx    # 0x1a80de
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x2d(%rip), %rcx        # 0x77bd0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ce(%rip), %rcx       # 0x77d80
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x22f(%rip), %rcx       # 0x77df0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_identify_cdr_wl
static int de_identify_cdr_wl(deark *c)
{
	if(!dbuf_memcmp(c->infile, 0, "WL", 2)) {
		if(de_input_file_has_ext(c, "cdr")) return 100;
		return 6;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x1346ba(%rip), %rdx    # 0x1ac459
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x77dd5
movq -0x10(%rbp), %rdi
leaq 0x1346a3(%rip), %rsi    # 0x1ac45c
callq 0x15d180
cmpl $0x0, %eax
je 0x77dcc
movl $0x64, -0x4(%rbp)
jmp 0x77ddc
movl $0x6, -0x4(%rbp)
jmp 0x77ddc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_module_corel_clb
void de_module_corel_clb(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_clb";
	mi->desc = "CorelMOSAIC .CLB library";
	mi->run_fn = de_run_corel_clb;
	mi->identify_fn = de_identify_corel_clb;
	mi->help_fn = de_help_corel_clb;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13457b(%rip), %rcx    # 0x1ac3a2
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x134577(%rip), %rcx    # 0x1ac3ac
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x77e70
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xfd(%rip), %rcx        # 0x77f50
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fe(%rip), %rcx       # 0x78060
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_run_corel_clb
static void de_run_corel_clb(deark *c, de_module_params *mparams)
{
	struct clb_ctx *d = NULL;
	i64 pos = 0;

	d = de_malloc(c, sizeof(struct clb_ctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_ASCII);

	// Refer to the comments in the cdr_wl module.
	d->adjdim_flag = de_get_ext_option_bool(c, "cdr:adjdim", 1);

	while(1) {
		if(pos+18 > c->infile->len) goto done;
		d->bytes_consumed = 0;
		if(!do_clb_item(c, d, pos)) goto done;
		if(d->bytes_consumed<=0) goto done;
		pos += d->bytes_consumed;
	}
done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x134556(%rip), %rsi    # 0x1ac41d
movl $0x1, %edx
callq 0x15cbc0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
addq $0x12, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x77ef2
jmp 0x77f35
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x78480
cmpl $0x0, %eax
jne 0x77f16
jmp 0x77f35
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0x77f23
jmp 0x77f35
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x77eda
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_identify_corel_clb
static int de_identify_corel_clb(deark *c)
{
	i64 nlen, n;

	// This might be too strict. Need more samples.
	if(!de_input_file_has_ext(c, "clb")) return 0;
	nlen = de_getu16le(0);
	if(nlen<1 || nlen>63) return 0;
	if(de_getbyte(2+nlen-1)!=0x00) return 0;
	n = de_getu32le(2+nlen+4);
	if(n!=0x00000001) return 0;
	n = de_getu32le(2+nlen+16);
	if(n!=2+nlen+20 && n!=0) return 0;
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x134441(%rip), %rsi    # 0x1ac3a8
callq 0x15d180
cmpl $0x0, %eax
jne 0x77f7d
movl $0x0, -0x4(%rbp)
jmp 0x7804c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jl 0x77fa0
cmpq $0x3f, -0x18(%rbp)
jle 0x77fac
movl $0x0, -0x4(%rbp)
jmp 0x7804c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
subq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
je 0x77fd6
movl $0x0, -0x4(%rbp)
jmp 0x7804c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
addq $0x4, %rsi
callq 0x165540
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
je 0x78003
movl $0x0, -0x4(%rbp)
jmp 0x7804c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
addq $0x10, %rsi
callq 0x165540
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x2, %rcx
addq $0x14, %rcx
cmpq %rcx, %rax
je 0x78045
cmpq $0x0, -0x20(%rbp)
je 0x78045
movl $0x0, -0x4(%rbp)
jmp 0x7804c
movl $0x64, -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/corel.c
// Function: de_module_corel_bmf
void de_module_corel_bmf(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_bmf";
	mi->desc = "Corel Gallery BMF";
	mi->run_fn = de_run_corel_bmf;
	mi->identify_fn = de_identify_corel_bmf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13432e(%rip), %rcx    # 0x1ac3c5
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x13432a(%rip), %rcx    # 0x1ac3cf
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x780d0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x78210
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_run_corel_bmf
static void de_run_corel_bmf(deark *c, de_module_params *mparams1)
{
	de_module_params *mparams2 = NULL;
	int saved_indent_level;
	i64 pos;
	i64 n;
	i64 seg_size;

	de_dbg_indent_save(c, &saved_indent_level);
	pos = 65;
	seg_size = de_getu32le_p(&pos);
	de_dbg(c, "preview image segment at %"I64_FMT", len=%"I64_FMT, pos, seg_size);
	de_dbg_indent(c, 1);

	if(pos + seg_size > c->infile->len) {
		seg_size = c->infile->len - pos;
	}

	n = de_getu32le(pos);
	if(n!=40) {
		de_err(c, "Unsupported Corel BMF version");
		goto done;
	}

	mparams2 = de_malloc(c, sizeof(de_module_params));
	mparams2->in_params.codes = "X";
	mparams2->in_params.flags = 0x81;
	de_run_module_by_id_on_slice(c, "dib", mparams2, c->infile, pos, seg_size);

done:
	de_free(c, mparams2);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x15b580
movq $0x41, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq 0x134408(%rip), %rsi    # 0x1ac52d
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x78164
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165540
movq %rax, -0x30(%rbp)
cmpq $0x28, -0x30(%rbp)
je 0x78194
movq -0x8(%rbp), %rdi
leaq 0x1343c8(%rip), %rsi    # 0x1ac553
movb $0x0, %al
callq 0x15bfb0
jmp 0x781e3
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x1573be(%rip), %rcx    # 0x1cf56f
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x81, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x28(%rbp), %r8
movq -0x38(%rbp), %r9
leaq 0x136c15(%rip), %rsi    # 0x1aedf3
callq 0x15c9f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x15b5a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_module_corel_ccx
void de_module_corel_ccx(deark *c, struct deark_module_info *mi)
{
	mi->id = "corel_ccx";
	mi->desc = "Corel CCX";
	mi->desc2 = "Decompress to CMX";
	mi->run_fn = de_run_corel_ccx;
	mi->identify_fn = de_identify_corel_ccx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13416a(%rip), %rcx    # 0x1ac3e1
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x134166(%rip), %rcx    # 0x1ac3eb
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x134161(%rip), %rcx    # 0x1ac3f5
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x1d(%rip), %rcx        # 0x782c0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x13e(%rip), %rcx       # 0x783f0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_run_corel_ccx
static void de_run_corel_ccx(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;

	d = de_malloc(c, sizeof(lctx));

	ictx = fmtutil_create_iff_decoder(c);
	ictx->is_le = 1;
	ictx->reversed_4cc = 0;
	ictx->userdata = (void*)d;
	ictx->handle_chunk_fn = my_ccx_chunk_handler;
	ictx->f = c->infile;

	fmtutil_read_iff_format(ictx, 0, c->infile->len);
	if(d->pack_pos) {
		de_dbg(c, "pack chunk found at %"I64_FMT, d->pack_pos);
		de_dbg_indent(c, 1);
		do_decompress(c, d);
		de_dbg_indent(c, -1);
	}

	fmtutil_destroy_iff_decoder(ictx);
	if(d) {
		if(!d->wrote_cmx_file) {
			de_err(c, "Cannot convert this CCX file. Try \"-m riff\" to decode.");
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18c8b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x58(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x5c(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
leaq 0x537(%rip), %rcx       # 0x78860
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x18c920
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x783a2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq 0x13420b(%rip), %rsi    # 0x1ac57d
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78920
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x20(%rbp), %rdi
callq 0x18c8f0
cmpq $0x0, -0x18(%rbp)
je 0x783db
movq -0x18(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x783ce
movq -0x8(%rbp), %rdi
leaq 0x1341ce(%rip), %rsi    # 0x1ac595
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: de_identify_corel_ccx
static int de_identify_corel_ccx(deark *c)
{
	if((de_getu32be(0)==CODE_RIFF) &&
		(de_getu32be(8)==CODE_CDRX))
	{
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
cmpq $0x52494646, %rax       # imm = 0x52494646
jne 0x78438
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x165470
cmpq $0x43445258, %rax       # imm = 0x43445258
jne 0x78438
movl $0x64, -0x4(%rbp)
jmp 0x7843f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/corel.c
// Function: my_ccx_chunk_handler
static int my_ccx_chunk_handler(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_RIFF:
		ictx->is_std_container = 1;
		return 1;
	case CODE_pack:
		d->pack_pos = ictx->chunkctx->pos;
		d->pack_dpos = ictx->chunkctx->dpos;
		d->pack_dlen = ictx->chunkctx->dlen;
		// We have what we need; tell the RIFF parser to stop.
		return 0;
	}

	ictx->handled = 1; // We're just scanning the file, so suppress default chunk handling
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x52494646, %eax       # imm = 0x52494646
je 0x7889a
jmp 0x7888e
movl -0x1c(%rbp), %eax
subl $0x7061636b, %eax       # imm = 0x7061636B
je 0x788b1
jmp 0x788fe
movq -0x10(%rbp), %rax
movl $0x1, 0x134(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x78913
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x78913
movq -0x10(%rbp), %rax
movl $0x1, 0x130(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: de_module_hfs
void de_module_hfs(deark *c, struct deark_module_info *mi)
{
	mi->id = "hfs";
	mi->desc = "HFS filesystem image";
	mi->run_fn = de_run_hfs;
	mi->identify_fn = de_identify_hfs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1275c1(%rip), %rcx    # 0x1a0228
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1339f7(%rip), %rcx    # 0x1ac66c
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x78ca0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xfd(%rip), %rcx        # 0x78d90
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: de_run_hfs
static void de_run_hfs(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));

	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_MACROMAN);

	d->blocksize = 512;
	d->nodes_seen = de_inthashtable_create(c);
	d->dirid_hash = de_inthashtable_create(c);

	if(!do_master_directory_blocks(c, d, 2)) goto done;

	if(!do_catalog(c, d)) goto done;

done:
	if(d) {
		de_inthashtable_destroy(c, d->nodes_seen);
		destroy_dirid_hash(c, d);
		de_free(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
movl $0xb8, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x11, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq $0x200, 0x8(%rax)       # imm = 0x200
movq -0x8(%rbp), %rdi
callq 0x15e600
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rdi
callq 0x15e600
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x2, %edx
callq 0x78e40
cmpl $0x0, %eax
jne 0x78d37
jmp 0x78d4d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x792b0
cmpl $0x0, %eax
jne 0x78d4b
jmp 0x78d4d
jmp 0x78d4d
cmpq $0x0, -0x18(%rbp)
je 0x78d82
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rsi
callq 0x15e630
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x793f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: de_identify_hfs
static int de_identify_hfs(deark *c)
{
	i64 drAlBlkSiz;
	int has_ext;

	if(dbuf_memcmp(c->infile, 1024, "BD", 2)) return 0;

	// Allocation block size must be a nonzero multiple of 512.
	drAlBlkSiz = de_getu32be(1024+20);
	if(drAlBlkSiz==0 || (drAlBlkSiz%512)!=0) return 0;

	has_ext = de_input_file_has_ext(c, "hfs");
	return has_ext?90:15;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x400, %esi            # imm = 0x400
leaq 0x133d98(%rip), %rdx    # 0x1acb48
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x78dc8
movl $0x0, -0x4(%rbp)
jmp 0x78e2b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x414, %esi            # imm = 0x414
callq 0x165470
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x78df9
movq -0x18(%rbp), %rax
movl $0x200, %ecx            # imm = 0x200
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x78e02
movl $0x0, -0x4(%rbp)
jmp 0x78e2b
movq -0x10(%rbp), %rdi
leaq 0x12741b(%rip), %rsi    # 0x1a0228
callq 0x15d180
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movl $0xf, %eax
movl $0x5a, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %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/modules/hfs.c
// Function: do_catalog
static int do_catalog(deark *c, lctx *d)
{
	i64 pos;
	struct nodedata *hdr_node = NULL;
	int saved_indent_level;
	int retval = 0;

	de_dbg_indent_save(c, &saved_indent_level);
	pos = allocation_blk_dpos(d, d->drCTExtRec[0].first_alloc_blk);
	de_dbg(c, "catalog (first extent at %"I64_FMT")", pos);

	hdr_node = de_malloc(c, sizeof(struct nodedata));
	hdr_node->expecting_header = 1;
	hdr_node->nodenum = 0;
	de_dbg_indent(c, 1);
	if(!do_node(c, d, hdr_node, 0)) goto done;
	de_dbg_indent(c, -1);

	if(hdr_node->node_type != 1) {
		de_err(c, "Expected header node not found");
		goto done;
	}

	// TODO: In the leaf list, is it possible/legal for a parent-dir-ID number to
	// appear before the record for that dir-ID? I haven't seen it happen, but
	// for all I know it is possible. If it doesn't happen, that would be good,
	// because we wouldn't have to make an extra pass to collect directory info.
	// But for now, we'll make two passes.

	// Pass 1 to figure out the directory tree structure, and detect node loops
	if(!do_all_leaf_nodes(c, d, hdr_node, 1)) goto done;
	// Pass 2 to extract files
	if(!do_all_leaf_nodes(c, d, hdr_node, 2)) goto done;

	retval = 1;
done:
	destroy_nodedata(c, hdr_node);
	de_dbg_indent_restore(c, saved_indent_level);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x79660
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1334be(%rip), %rsi    # 0x1ac7be
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x50, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x79690
cmpl $0x0, %eax
jne 0x79357
jmp 0x793c4
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x20(%rbp), %rax
cmpl $0x1, 0x2c(%rax)
je 0x79383
movq -0x8(%rbp), %rdi
leaq 0x133462(%rip), %rsi    # 0x1ac7dc
movb $0x0, %al
callq 0x15bfb0
jmp 0x793c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x1, %ecx
callq 0x79a70
cmpl $0x0, %eax
jne 0x793a0
jmp 0x793c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x2, %ecx
callq 0x79a70
cmpl $0x0, %eax
jne 0x793bd
jmp 0x793c4
movl $0x1, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x79b60
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: destroy_dirid_hash
static void destroy_dirid_hash(deark *c, lctx *d)
{
	if(!d->dirid_hash) return;

	while(1) {
		i64 key;
		void *removed_item = NULL;
		struct dirid_item_struct *dirid_item;
		if(!de_inthashtable_remove_any_item(c, d->dirid_hash, &key, &removed_item)) {
			break;
		}
		dirid_item = (struct dirid_item_struct *)removed_item;
		ucstring_destroy(dirid_item->name);
		de_free(c, dirid_item);
	}

	de_inthashtable_destroy(c, d->dirid_hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x79410
jmp 0x79475
jmp 0x79412
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x15e9b0
cmpl $0x0, %eax
jne 0x7943d
jmp 0x79461
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
jmp 0x79412
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
callq 0x15e630
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: read_one_timestamp
static void read_one_timestamp(deark *c, lctx *d, i64 pos, struct de_timestamp *returned_ts,
	const char *name)
{
	i64 ts_raw;
	struct de_timestamp ts;
	char timestamp_buf[64];

	de_zeromem(&ts, sizeof(struct de_timestamp));
	ts.is_valid = 0;
	ts_raw = de_getu32be(pos);
	if(ts_raw!=0) {
		de_mac_time_to_timestamp(ts_raw, &ts);
	}

	if(returned_ts) {
		*returned_ts = ts;
	}

	if(ts.is_valid) {
		de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	}
	else {
		de_strlcpy(timestamp_buf, "unknown", sizeof(timestamp_buf));
	}
	de_dbg(c, "%s: %"I64_FMT" (%s)", name, ts_raw, timestamp_buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movb $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165470
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x794fc
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x15d720
cmpq $0x0, -0x20(%rbp)
je 0x79516
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
cmpb $0x0, -0x40(%rbp)
je 0x79532
leaq -0x80(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
jmp 0x79547
leaq -0x80(%rbp), %rdi
leaq 0x12501f(%rip), %rsi    # 0x19e55c
movl $0x40, %edx
callq 0x15aa30
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x80(%rbp), %r8
leaq 0x1294ef(%rip), %rsi    # 0x1a2a4d
movb $0x0, %al
callq 0x15b0d0
addq $0x80, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: read_ExtDataRecs
static void read_ExtDataRecs(deark *c, lctx *d, i64 pos1,
	struct ExtDescriptor *eds, size_t num_eds, const char *name)
{
	size_t i;
	i64 pos = pos1;

	for(i=0; i<num_eds; i++) {
		eds[i].first_alloc_blk = de_getu16be_p(&pos);
		eds[i].num_alloc_blks = de_getu16be_p(&pos);
		de_dbg(c, "%s[%u]: first_blk=%u, num_blks=%u", name, (unsigned int)i,
			(unsigned int)eds[i].first_alloc_blk, (unsigned int)eds[i].num_alloc_blks);
	}
}

// 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)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x79653
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %rax
movl %eax, %r8d
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq 0x8(%rax), %rax
movl %eax, %r9d
leaq 0x133161(%rip), %rsi    # 0x1ac79c
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x795a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: do_all_leaf_nodes
static int do_all_leaf_nodes(deark *c, lctx *d, struct nodedata *hdr_node, int pass)
{
	i64 curr_nodenum;
	struct nodedata *nd = NULL;
	int retval = 0;

	de_dbg(c, "reading leaf nodes, pass %d", pass);
	de_dbg_indent(c, 1);

	// Read all leaf nodes, using the leaf-to-leaf links
	curr_nodenum = hdr_node->bthFNode;

	while(curr_nodenum!=0) {
		nd = de_malloc(c, sizeof(struct nodedata));
		nd->nodenum = curr_nodenum;

		if(!do_node(c, d, nd, pass)) goto done;

		curr_nodenum = nd->f_link;
		destroy_nodedata(c, nd);
		nd = NULL;
	}
	retval = 1;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x133088(%rip), %rsi    # 0x1acb2c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x79b28
movq -0x8(%rbp), %rdi
movl $0x50, %esi
callq 0x15b780
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x79690
cmpl $0x0, %eax
jne 0x79b05
jmp 0x79b2f
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x79b60
movq $0x0, -0x30(%rbp)
jmp 0x79ac5
movl $0x1, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x79b60
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: node_dpos
static i64 node_dpos(lctx *d, i64 nodenum)
{
	i64 n;

	// If the catalog were contiguous, this would be the offset we want, from the
	// start of the catalog.
	n = 512 * nodenum;

	if(n < d->drCTExtRec[0].num_alloc_blks * d->drAlBlkSiz) {
		// It's in the first extent.
		return allocation_blk_dpos(d, d->drCTExtRec[0].first_alloc_blk) + n;
	}
	// Not in first extent. Account for its size, and try the second extent.
	n -= d->drCTExtRec[0].num_alloc_blks * d->drAlBlkSiz;
	if(n < d->drCTExtRec[1].num_alloc_blks * d->drAlBlkSiz) {
		// It's in the second extent.
		return allocation_blk_dpos(d, d->drCTExtRec[1].first_alloc_blk) + n;
	}
	// Not in second extent. Account for its size, and assume it's in the third extent.
	n -= d->drCTExtRec[1].num_alloc_blks * d->drAlBlkSiz;
	return allocation_blk_dpos(d, d->drCTExtRec[2].first_alloc_blk) + n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x9, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jge 0x79bf7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x79660
addq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x79c8c
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x10(%rbp), %rax
imulq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x90(%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jge 0x79c51
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x79660
addq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x79c8c
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
imulq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
callq 0x79660
addq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: get_node_type_name
static const char *get_node_type_name(int t)
{
	const char *name = NULL;
	switch(t) {
	case 0: name="index"; break;
	case 1: name="header"; break;
	case 2: name="map"; break;
	case -1: name="leaf"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0x79d05
movq -0x18(%rbp), %rax
leaq 0x132982(%rip), %rcx    # 0x1ac64c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x13f43f(%rip), %rax    # 0x1b9119
movq %rax, -0x10(%rbp)
jmp 0x79d05
leaq 0x127a69(%rip), %rax    # 0x1a1750
movq %rax, -0x10(%rbp)
jmp 0x79d05
leaq 0x128972(%rip), %rax    # 0x1a2666
movq %rax, -0x10(%rbp)
jmp 0x79d05
leaq 0x132b89(%rip), %rax    # 0x1ac88a
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x79d16
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x79d23
leaq 0x13df10(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x79d23
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: get_cdrType_name
static const char *get_cdrType_name(int n)
{
	const char *name = NULL;
	switch(n) {
	case 1: name="directory"; break;
	case 2: name="file"; break;
	case 3: name="directory thread"; break;
	case 4: name="file thread"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0x7a385
movq -0x18(%rbp), %rax
leaq 0x132312(%rip), %rcx    # 0x1ac65c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1257fd(%rip), %rax    # 0x19fb57
movq %rax, -0x10(%rbp)
jmp 0x7a385
leaq 0x15aaa0(%rip), %rax    # 0x1d4e07
movq %rax, -0x10(%rbp)
jmp 0x7a385
leaq 0x132581(%rip), %rax    # 0x1ac8f5
movq %rax, -0x10(%rbp)
jmp 0x7a385
leaq 0x132585(%rip), %rax    # 0x1ac906
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7a396
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x7a3a3
leaq 0x13d890(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x7a3a3
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: do_leaf_node_record_directory_pass1
static void do_leaf_node_record_directory_pass1(deark *c, lctx *d, struct nodedata *nd,
	struct recorddata *rd)
{
	i64 pos = rd->datapos;
	u32 dirID;
	struct dirid_item_struct *dirid_item = NULL;

	dirid_item = de_malloc(c, sizeof(struct dirid_item_struct));

	pos += 2; // common fields, already read
	pos += 2; // dirFlags
	pos += 2; // valence
	dirID = (u32)de_getu32be_p(&pos);
	de_dbg(c, "dirDirID: %u", (unsigned int)dirID);

	dirid_item->name = ucstring_clone(rd->name_srd->str);
	squash_slashes(dirid_item->name, 0);
	dirid_item->ParID = rd->ParID;

	de_inthashtable_add_item(c, d->dirid_hash, (i64)dirID, (void*)dirid_item);
	dirid_item = NULL;
}

// 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 -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0x1324de(%rip), %rsi    # 0x1ac912
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x171700
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7a600
movq -0x20(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x38(%rbp), %rcx
callq 0x15e810
movq $0x0, -0x38(%rbp)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: do_leaf_node_record_extract_item
static void do_leaf_node_record_extract_item(deark *c, lctx *d, struct nodedata *nd,
	struct recorddata *rd)
{
	struct de_advfile *advf = NULL;
	i64 oldlen;

	advf = de_advfile_create(c);
	advf->original_filename_flag = 1;

	// TODO: This is not very efficient. Maybe we should at least cache the
	// previous file's path, since it's usually the same.
	get_full_path_from_dirid(c, d, rd->ParID, advf->filename, 0);

	de_dbg(c, "path: \"%s\"", ucstring_getpsz_d(advf->filename));
	oldlen = advf->filename->len;
	if(rd->name_srd && ucstring_isnonempty(rd->name_srd->str)) {
		ucstring_append_ucstring(advf->filename, rd->name_srd->str);
	}
	else {
		ucstring_append_sz(advf->filename, "_", DE_ENCODING_LATIN1);
	}

	squash_slashes(advf->filename, oldlen);

	advf->snflags = DE_SNFLAG_FULLPATH;

	if(rd->cdrType==CDRTYPE_DIR) {
		do_extract_dir(c, d, nd, rd, advf);
	}
	else if(rd->cdrType==CDRTYPE_FILE) {
		do_extract_file(c, d, nd, rd, advf);
	}

	de_advfile_destroy(advf);
}

// 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 $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17aa20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x1, 0x79(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movl 0x14(%rax), %edx
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rcx
xorl %r8d, %r8d
callq 0x7a660
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x155945(%rip), %rsi    # 0x1cfe5c
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x7a56a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0x7a56a
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x171460
jmp 0x7a583
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rdi
leaq 0x13c48d(%rip), %rsi    # 0x1b6a06
movl $0x5, %edx
callq 0x1715e0
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x7a600
movq -0x28(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x20(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x7a5c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x7a760
jmp 0x7a5e9
movq -0x20(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x7a5e7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x7a800
jmp 0x7a5e9
movq -0x28(%rbp), %rdi
callq 0x17aaa0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: squash_slashes
static void squash_slashes(de_ucstring *s, i64 pos1)
{
	i64 i;

	for(i=pos1; i<s->len; i++) {
		if(s->str[i]=='/') {
			s->str[i] = '_';
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x7a657
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x2f, (%rax,%rcx,4)
jne 0x7a647
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl $0x5f, (%rax,%rcx,4)
jmp 0x7a649
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x7a614
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: get_full_path_from_dirid
static void get_full_path_from_dirid(deark *c, lctx *d, u32 dirid, de_ucstring *s,
	int depth)
{
	void *item;
	int ret;
	struct dirid_item_struct *dirid_item;

	if(depth>20) goto done;
	if(dirid==0) goto done;
	ret = de_inthashtable_get_item(c, d->dirid_hash, (i64)dirid, &item);
	if(!ret && dirid>1) {
		de_warn(c, "Unknown parent directory (ID %u)", (unsigned int)dirid);
	}
	if(!ret) goto done;
	dirid_item = (struct dirid_item_struct*)item;

	if(dirid_item->ParID!=0 && dirid_item->ParID!=dirid) {
		get_full_path_from_dirid(c, d, dirid_item->ParID, s, depth+1);
	}

	if(!ucstring_isnonempty(dirid_item->name)) goto done;
	ucstring_append_ucstring(s, dirid_item->name);
	ucstring_append_sz(s, "/", DE_ENCODING_LATIN1);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpl $0x14, -0x24(%rbp)
jle 0x7a686
jmp 0x7a74f
cmpl $0x0, -0x14(%rbp)
jne 0x7a691
jmp 0x7a74f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
leaq -0x30(%rbp), %rcx
callq 0x15e700
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x7a6d2
cmpl $0x1, -0x14(%rbp)
jbe 0x7a6d2
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x132254(%rip), %rsi    # 0x1ac91f
movb $0x0, %al
callq 0x15bc10
cmpl $0x0, -0x34(%rbp)
jne 0x7a6da
jmp 0x7a74f
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7a715
movq -0x40(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x7a715
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
addl $0x1, %r8d
callq 0x7a660
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
jne 0x7a729
jmp 0x7a74f
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x171460
movq -0x20(%rbp), %rdi
leaq 0x1239f9(%rip), %rsi    # 0x19e13e
movl $0x5, %edx
callq 0x1715e0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/hfs.c
// Function: do_extract_dir
static void do_extract_dir(deark *c, lctx *d, struct nodedata *nd,
	struct recorddata *rd,  struct de_advfile *advf)
{
	i64 pos = rd->datapos;

	pos += 2; // common fields, already read
	pos += 2; // dirFlags
	pos += 2; // dirVal
	pos += 4; // dirDirID

	read_timestamp_fields(c, d, pos, advf->mainfork.fi);
	//pos += 12;

	advf->mainfork.fi->is_directory = 1;
	advf->mainfork.fork_exists = 1;
	advf->mainfork.fork_len = 0;

	// Note that we don't have to set a callback function for 0-length "files".
	de_advfile_run(advf);
}

// 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 %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
callq 0x7ad10
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movb $0x1, 0x9(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x10(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x28(%rbp), %rdi
callq 0x17ac20
addq $0x30, %rsp
popq %rbp
retq