LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/jpeg.c
// Function: exif_version_to_string
static void exif_version_to_string(u32 v, char *s)
{
	s[0] = de_byte_to_printable_char((u8)((v>>24)&0xff));
	s[1] = de_byte_to_printable_char((u8)((v>>16)&0xff));
	s[2] = de_byte_to_printable_char((u8)((v>>8)&0xff));
	s[3] = de_byte_to_printable_char((u8)(v&0xff));
	s[4] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x161a80
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x161a80
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x161a80
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x161a80
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/jpeg.c
// Function: get_pic2_segname
static const char *get_pic2_segname(u8 t)
{
	const char *name = NULL;

	switch(t) {
	case 0: name = "eof"; break;
	case 5: name = "cmpr type?"; break;
	case 6: name = "image data"; break;
	case 22: name = "comment?"; 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
movq %rax, -0x18(%rbp)
subq $0x16, %rax
ja 0xc13c6
movq -0x18(%rbp), %rax
leaq 0xf4fbd(%rip), %rcx     # 0x1b6348
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf6160(%rip), %rax     # 0x1b74fb
movq %rax, -0x10(%rbp)
jmp 0xc13c6
leaq 0xf6157(%rip), %rax     # 0x1b74ff
movq %rax, -0x10(%rbp)
jmp 0xc13c6
leaq 0x101cf8(%rip), %rax    # 0x1c30ad
movq %rax, -0x10(%rbp)
jmp 0xc13c6
leaq 0xf6148(%rip), %rax     # 0x1b750a
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc13d7
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xc13e4
leaq 0xf684f(%rip), %rax     # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0xc13e4
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/jpeg.c
// Function: pic2_image_segment
static void pic2_image_segment(deark *c, struct pic2_ctx *d, i64 pos, i64 len)
{
	if(!d->is_jpg) goto done;
	de_dbg(c, "JPEG-like data at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice2(c, "jpeg", "2", c->infile, pos, len);
	de_dbg_indent(c, -1);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xc1413
jmp 0xc146c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xf60f1(%rip), %rsi     # 0x1b7513
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0xe220e(%rip), %rsi     # 0x1a3660
leaq 0x10bc19(%rip), %rdx    # 0x1cd072
callq 0x15cab0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_lha
void de_module_lha(deark *c, struct deark_module_info *mi)
{
	mi->id = "lha";
	mi->desc = "LHA/LZH/PMA archive";
	mi->run_fn = de_run_lha;
	mi->identify_fn = de_identify_lha;
	mi->help_fn = de_help_lha;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf62b3(%rip), %rcx     # 0x1b774a
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf6257(%rip), %rcx     # 0x1b76fc
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xc14e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0xc1530
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x27e(%rip), %rcx       # 0xc1750
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_run_lha
static void de_run_lha(deark *c, de_module_params *mparams)
{
	lctx *d;

	d = lha_create_lctx(c);
	d->basefmt = BASEFMT_LHA;
	do_run_lha_internal(c, d, mparams);
	lha_destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc2610
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xc2640
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc2830
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_swg
void de_module_swg(deark *c, struct deark_module_info *mi)
{
	mi->id = "swg";
	mi->desc = "SWAG packet";
	mi->run_fn = de_run_swg;
	mi->identify_fn = de_identify_swg;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5f79(%rip), %rcx     # 0x1b7710
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf5f6f(%rip), %rcx     # 0x1b7714
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xc17e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x8d(%rip), %rcx        # 0xc1850
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/lha.c
// Function: de_run_swg
static void de_run_swg(deark *c, de_module_params *mparams)
{
	lctx *d;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc2610
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xf6827(%rip), %rcx     # 0x1b803a
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0xf5ef2(%rip), %rsi     # 0x1b7714
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xc2640
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc2830
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_identify_swg
static int de_identify_swg(deark *c)
{
	u8 b[5];

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x15(%rbp), %rsi
movl $0x2, %edx
movl $0x5, %ecx
callq 0x164d10
leaq -0x15(%rbp), %rdi
callq 0xc6350
cmpl $0x0, %eax
je 0xc18ac
movq -0x10(%rbp), %rdi
leaq 0xf5e80(%rip), %rsi     # 0x1b7710
callq 0x15d180
cmpl $0x0, %eax
je 0xc18a3
movl $0x64, -0x4(%rbp)
jmp 0xc18b3
movl $0x5a, -0x4(%rbp)
jmp 0xc18b3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_tpk
void de_module_tpk(deark *c, struct deark_module_info *mi)
{
	mi->id = "tpk";
	mi->desc = "TPK archive";
	mi->run_fn = de_run_tpk;
	mi->identify_fn = de_identify_tpk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5e49(%rip), %rcx     # 0x1b7720
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf5e3f(%rip), %rcx     # 0x1b7724
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc1910
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x7d(%rip), %rcx        # 0xc1980
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_run_tpk
static void de_run_tpk(deark *c, de_module_params *mparams)
{
	lctx *d;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc2610
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xf66fb(%rip), %rcx     # 0x1b803e
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0xf66ec(%rip), %rsi     # 0x1b803e
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xc2640
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc2830
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_identify_tpk
static int de_identify_tpk(deark *c)
{
	u8 b[5];

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x15(%rbp), %rsi
movl $0x2, %edx
movl $0x5, %ecx
callq 0x164d10
leaq -0x15(%rbp), %rdi
callq 0xc63d0
cmpl $0x0, %eax
je 0xc19dc
movq -0x10(%rbp), %rdi
leaq 0xf5d60(%rip), %rsi     # 0x1b7720
callq 0x15d180
cmpl $0x0, %eax
je 0xc19d3
movl $0x64, -0x4(%rbp)
jmp 0xc19e3
movl $0x4b, -0x4(%rbp)
jmp 0xc19e3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_pakleo
void de_module_pakleo(deark *c, struct deark_module_info *mi)
{
	mi->id = "pakleo";
	mi->desc = "PAKLEO archive";
	mi->run_fn = de_run_pakleo;
	mi->identify_fn = de_identify_pakleo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5d29(%rip), %rcx     # 0x1b7730
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf5d22(%rip), %rcx     # 0x1b7737
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc1a40
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x7d(%rip), %rcx        # 0xc1ab0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_run_pakleo
static void de_run_pakleo(deark *c, de_module_params *mparams)
{
	lctx *d;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc2610
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xf65cf(%rip), %rcx     # 0x1b8042
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0xf65c0(%rip), %rsi     # 0x1b8042
callq 0x15e380
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xc2640
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc2830
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_car_lha
void de_module_car_lha(deark *c, struct deark_module_info *mi)
{
	mi->id = "car_lha";
	mi->desc = "CAR (MylesHi!) LHA-like archive";
	mi->run_fn = de_run_car_lha;
	mi->identify_fn = de_identify_car_lha;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5bff(%rip), %rcx     # 0x1b7746
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf5bf9(%rip), %rcx     # 0x1b774e
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc1b80
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x20d(%rip), %rcx       # 0xc1d80
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_identify_car_lha
static int de_identify_car_lha(deark *c)
{
	if(!de_input_file_has_ext(c, "car")) return 0;
	if(looks_like_car_member(c, 0)) {
		return 95;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xf6304(%rip), %rsi     # 0x1b809b
callq 0x15d180
cmpl $0x0, %eax
jne 0xc1daa
movl $0x0, -0x4(%rbp)
jmp 0xc1dcc
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc6450
cmpl $0x0, %eax
je 0xc1dc5
movl $0x5f, -0x4(%rbp)
jmp 0xc1dcc
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/lha.c
// Function: de_module_arx
void de_module_arx(deark *c, struct deark_module_info *mi)
{
	mi->id = "arx";
	mi->desc = "ARX LHA-like archive";
	mi->run_fn = de_run_arx;
	mi->identify_fn = de_identify_arx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5977(%rip), %rcx     # 0x1b776e
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf596d(%rip), %rcx     # 0x1b7772
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc1e30
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x23d(%rip), %rcx       # 0xc2060
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_identify_arx
static int de_identify_arx(deark *c)
{
	if(dbuf_memcmp(c->infile, 2, "-lh1-", 5)) return 0;
	if(de_getbyte(20)!=0x20 || de_getbyte(21)!=0x00) return 0;
	if(de_input_file_has_ext(c, "arx")) return 100;
	return 70;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
leaq 0xf608b(%rip), %rdx     # 0x1b810b
movl $0x5, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0xc2098
movl $0x0, -0x4(%rbp)
jmp 0xc20fa
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x14, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x20, %eax
jne 0xc20cc
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x15, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
je 0xc20d5
movl $0x0, -0x4(%rbp)
jmp 0xc20fa
movq -0x10(%rbp), %rdi
leaq 0xf568e(%rip), %rsi     # 0x1b776e
callq 0x15d180
cmpl $0x0, %eax
je 0xc20f3
movl $0x64, -0x4(%rbp)
jmp 0xc20fa
movl $0x46, -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/lha.c
// Function: de_module_ar001
void de_module_ar001(deark *c, struct deark_module_info *mi)
{
	mi->id = "ar001";
	mi->desc = "ar001 archive (Okumura)";
	mi->run_fn = de_run_ar001;
	mi->identify_fn = de_identify_ar001;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5660(%rip), %rcx     # 0x1b7787
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf5658(%rip), %rcx     # 0x1b778d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc2160
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x13d(%rip), %rcx       # 0xc2290
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_run_ar001
static void de_run_ar001(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	struct member_data *md = NULL;

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

	d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC16_IBMSDLC);

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

		md = create_member_data(c);
		md->encoding = d->input_encoding;
		md->member_pos = pos;
		if(!do_read_ar001_member(c, d, md)) goto done;
		if(md->total_size<1) goto done;

		d->member_count++;
		pos += md->total_size;

		destroy_member_data(c, md);
		md = NULL;
	}

done:
	destroy_member_data(c, md);
	lha_destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc2610
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
movl $0x22, %esi
callq 0x15eac0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0xc21df
jmp 0xc2261
movq -0x8(%rbp), %rdi
callq 0xc2880
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xc6db0
cmpl $0x0, %eax
jne 0xc221d
jmp 0xc2263
movq -0x28(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0xc222a
jmp 0xc2263
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc3730
movq $0x0, -0x28(%rbp)
jmp 0xc21c8
jmp 0xc2263
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc3730
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc2830
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_identify_ar001
static int de_identify_ar001(deark *c)
{
	i64 n;
	i64 bhlen;
	i64 nlen;
	u32 bhcrc_r, bhcrc_c;
	u8 b;
	int conf = 0;
	struct de_crcobj *crco = NULL;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x13, -0x18(%rbp)
jl 0xc22d1
cmpq $0x412, -0x18(%rbp)     # imm = 0x412
jle 0xc22d6
jmp 0xc23e9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jge 0xc22f4
jmp 0xc23e9
movq -0x18(%rbp), %rax
subq $0x12, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165280
movq %rax, -0x10(%rbp)
cmpq $0x1, -0x10(%rbp)
jle 0xc2322
jmp 0xc23e9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x165060
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0xc2345
jmp 0xc23e9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc236b
jmp 0xc23e9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0x14, %esi
callq 0xc7210
cmpl $0x0, %eax
jne 0xc2388
jmp 0xc23e9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0x22, %esi
callq 0x15eac0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rcx
movl $0x2, %edx
callq 0x15f500
movq -0x38(%rbp), %rdi
callq 0x15f340
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0xc23e7
movl $0x5b, -0x30(%rbp)
jmp 0xc23e9
cmpq $0x0, -0x38(%rbp)
je 0xc23f9
movq -0x38(%rbp), %rdi
callq 0x15f2e0
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_module_lharc_sfx_com
void de_module_lharc_sfx_com(deark *c, struct deark_module_info *mi)
{
	mi->id = "lharc_sfx_com";
	mi->desc = "LHarc/LArc self-extracting archive (COM)";
	mi->run_fn = de_run_lharc_sfx_com;
	mi->identify_fn = de_identify_lharc_sfx_com;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf537e(%rip), %rcx     # 0x1b77a5
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xf537e(%rip), %rcx     # 0x1b77b3
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xc2460
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x15d(%rip), %rcx       # 0xc25b0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: de_run_lharc_sfx_com
static void de_run_lharc_sfx_com(deark *c, de_module_params *mparams)
{
	struct lhasfx_context *d = NULL;
	int ret;

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

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

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

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %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
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0xc7290
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xc24b8
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0xc2567
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0xf5d22(%rip), %rdx     # 0x1b81ec
leaq 0xf5d16(%rip), %rax     # 0x1b81e7
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0xf5ce7(%rip), %rsi     # 0x1b81c6
movb $0x0, %al
callq 0x15e3d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc7390
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0xc24fe
jmp 0xc2567
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xf5ce1(%rip), %rsi     # 0x1b81f2
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
subq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r8d
leaq 0x10e657(%rip), %rcx    # 0x1d0ba2
leaq 0xf5aaa(%rip), %rax     # 0x1b7ffc
cmpl $0x0, %r8d
cmovneq %rax, %rcx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x166be0
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0xc2592
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0xc2592
movq -0x8(%rbp), %rdi
leaq 0xf5c7d(%rip), %rsi     # 0x1b8208
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/lha.c
// Function: de_identify_lharc_sfx_com
static int de_identify_lharc_sfx_com(deark *c)
{
	int is_larc = 0;
	int ret;

	if(c->infile->len>65280) return 0;
	ret = looks_like_lharc_sfx_com(c, &is_larc);
	if(ret) return 70;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0xc25de
movl $0x0, -0x4(%rbp)
jmp 0xc2604
movq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xc7290
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0xc25fd
movl $0x46, -0x4(%rbp)
jmp 0xc2604
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: lha_destroy_lctx
static void lha_destroy_lctx(deark *c, lctx *d)
{
	if(!d) return;
	de_crcobj_destroy(d->crco);
	de_crcobj_destroy(d->crco_cksum);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc2849
jmp 0xc2870
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x15f2e0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x15f2e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: destroy_member_data
static void destroy_member_data(deark *c, struct member_data *md)
{
	if(!md) return;
	ucstring_destroy(md->dirname);
	ucstring_destroy(md->filename);
	ucstring_destroy(md->fullfilename);
	de_free(c, md->cmi);
	de_free(c, md);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc3749
jmp 0xc378e
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: do_lha_footer
static void do_lha_footer(deark *c, lctx *d)
{
	i64 extra_bytes_pos, extra_bytes_len;

	if(!d->trailer_found) goto done;
	extra_bytes_pos = d->trailer_pos+1;
	extra_bytes_len = c->infile->len - extra_bytes_pos;
	if(extra_bytes_len<=1) goto done;

	if(d->basefmt==BASEFMT_SWG && extra_bytes_len==129) {
		do_swg_footer(c, d, extra_bytes_pos);
		goto done;
	}

	de_info(c, "Note: %"I64_FMT" extra bytes at end of file (offset %"I64_FMT")",
		extra_bytes_len, extra_bytes_pos);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1b(%rax)
jne 0xc37bc
jmp 0xc382a
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jg 0xc37e9
jmp 0xc382a
movq -0x10(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0xc3810
cmpq $0x81, -0x20(%rbp)
jne 0xc3810
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc6250
jmp 0xc382a
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0xf477d(%rip), %rsi     # 0x1b7fa0
movb $0x0, %al
callq 0x15c0c0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: lha_classify_whats_next
static enum lha_whats_next_enum lha_classify_whats_next(deark *c, lctx *d, i64 pos, i64 len)
{
	u8 b[21];
	u8 hlev;

	if(d->basefmt==BASEFMT_PAKLEO) {
		return pakleo_classify_whats_next(c, d, pos, len);
	}

	if(len<=0) return LHA_WN_NOTHING;
	b[0] = de_getbyte(pos);
	if(b[0]==0 && len<=2) return LHA_WN_TRAILER;
	if(b[0]==0 && len<21) return LHA_WN_TRAILER_AND_JUNK;
	de_read(&b[1], pos+1, sizeof(b)-1);
	if(d->basefmt==BASEFMT_SWG) hlev = 0;
	else hlev = b[20];
	if(b[0]==0 && b[1]==0) return LHA_WN_TRAILER_AND_JUNK;
	if(b[0]==0 && hlev!=2) return LHA_WN_TRAILER_AND_JUNK;
	if(hlev>3) return LHA_WN_JUNK;
	if(is_possible_cmpr_meth(&b[2])) return LHA_WN_MEMBER;
	return LHA_WN_JUNK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x3, 0xc(%rax)
jne 0xc386f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xc4d10
movl %eax, -0x4(%rbp)
jmp 0xc3970
cmpq $0x0, -0x28(%rbp)
jg 0xc3882
movl $0x4, -0x4(%rbp)
jmp 0xc3970
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165060
movb %al, -0x40(%rbp)
movzbl -0x40(%rbp), %eax
cmpl $0x0, %eax
jne 0xc38b2
cmpq $0x2, -0x28(%rbp)
jg 0xc38b2
movl $0x1, -0x4(%rbp)
jmp 0xc3970
movzbl -0x40(%rbp), %eax
cmpl $0x0, %eax
jne 0xc38ce
cmpq $0x15, -0x28(%rbp)
jge 0xc38ce
movl $0x2, -0x4(%rbp)
jmp 0xc3970
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
movl $0x14, %ecx
callq 0x164d10
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0xc3900
movb $0x0, -0x41(%rbp)
jmp 0xc3906
movb -0x2c(%rbp), %al
movb %al, -0x41(%rbp)
movzbl -0x40(%rbp), %eax
cmpl $0x0, %eax
jne 0xc3921
movzbl -0x3f(%rbp), %eax
cmpl $0x0, %eax
jne 0xc3921
movl $0x2, -0x4(%rbp)
jmp 0xc3970
movzbl -0x40(%rbp), %eax
cmpl $0x0, %eax
jne 0xc393c
movzbl -0x41(%rbp), %eax
cmpl $0x2, %eax
je 0xc393c
movl $0x2, -0x4(%rbp)
jmp 0xc3970
movzbl -0x41(%rbp), %eax
cmpl $0x3, %eax
jle 0xc394e
movl $0x3, -0x4(%rbp)
jmp 0xc3970
leaq -0x40(%rbp), %rdi
addq $0x2, %rdi
callq 0xc4d80
cmpl $0x0, %eax
je 0xc3969
movl $0x0, -0x4(%rbp)
jmp 0xc3970
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: lha_calc_checksum
static u32 lha_calc_checksum(dbuf *f, i64 pos, i64 len, struct de_crcobj *crco_cksum)
{
	u32 v;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15f250
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x15f500
movq -0x20(%rbp), %rdi
callq 0x15f340
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0xff, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: read_msdos_modtime
static void read_msdos_modtime(deark *c, lctx *d, struct member_data *md,
	i64 pos, const char *name)
{
	i64 mod_time_raw, mod_date_raw;
	char timestamp_buf[64];
	struct de_timestamp tmp_timestamp;

	mod_time_raw = de_getu16le(pos);
	mod_date_raw = de_getu16le(pos+2);
	if(mod_time_raw==0 && mod_date_raw==0) {
		de_dbg(c, "%s: (not set)", name);
		return;
	}
	de_dos_datetime_to_timestamp(&tmp_timestamp, mod_date_raw, mod_time_raw);
	tmp_timestamp.tzcode = DE_TZCODE_LOCAL;
	de_timestamp_to_string(&tmp_timestamp, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s: %s", name, timestamp_buf);
	apply_timestamp(c, d, md, DE_TIMESTAMPIDX_MODIFY, &tmp_timestamp, 10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xc3c33
cmpq $0x0, -0x38(%rbp)
jne 0xc3c33
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0xf3f71(%rip), %rsi     # 0x1b7b9b
movb $0x0, %al
callq 0x15b0d0
jmp 0xc3c9f
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x15d750
movb $0x2, -0x8f(%rbp)
leaq -0x80(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq 0x11124e(%rip), %rsi    # 0x1d4ec6
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x90(%rbp), %r8
movl $0xa, %r9d
callq 0xc5530
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: read_unix_timestamp
static void read_unix_timestamp(deark *c, lctx *d, struct member_data *md,
	i64 pos, int tsidx, const char *name)
{
	i64 t;
	char timestamp_buf[64];
	struct de_timestamp tmp_timestamp;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165600
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x1, %edx
callq 0x15d530
leaq -0x80(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rax
movl %eax, %ecx
leaq -0x80(%rbp), %r8
leaq 0xf3e7c(%rip), %rsi     # 0x1b7ba9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %ecx
leaq -0x90(%rbp), %r8
movl $0x32, %r9d
callq 0xc5530
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: do_special_swg_fields
static void do_special_swg_fields(deark *c, lctx *d, struct member_data *md, i64 pos1)
{
	i64 pos = pos1;
	u32 crc32;
	de_ucstring *s = NULL;

	crc32 = (u32)de_getu32le_p(&pos);
	de_dbg(c, "SWG crc32 (reported): 0x%08x", (UI)crc32);
	s = ucstring_create(c);
	do_swg_string_field(c, d, s, pos, 13, "stored filename");
	pos += 13;
	do_swg_string_field(c, d, s, pos, 41, "subject");
	pos += 41;
	do_swg_string_field(c, d, s, pos, 36, "contributor");
	pos += 36;
	do_swg_string_field(c, d, s, pos, 71, "search keys");
	ucstring_destroy(s);
}

// 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 %rax, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0xf3e0b(%rip), %rsi     # 0x1b7bb5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0xd, %r8d
leaq 0xf3df7(%rip), %r9      # 0x1b7bd2
callq 0xc55d0
movq -0x28(%rbp), %rax
addq $0xd, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x29, %r8d
leaq 0xf3dd9(%rip), %r9      # 0x1b7be2
callq 0xc55d0
movq -0x28(%rbp), %rax
addq $0x29, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x24, %r8d
leaq 0xf3db3(%rip), %r9      # 0x1b7bea
callq 0xc55d0
movq -0x28(%rbp), %rax
addq $0x24, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x47, %r8d
leaq 0xf3d91(%rip), %r9      # 0x1b7bf6
callq 0xc55d0
movq -0x38(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: read_filename_tpk
static void read_filename_tpk(deark *c, lctx *d, struct member_data *md,
	i64 pos1, i64 len1)
{
	i64 pos = pos1;
	i64 len = len1;
	struct de_stringreaderdata *fn_srd = NULL;

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

	fn_srd = dbuf_read_string(c->infile, pos, len, 256, DE_CONVFLAG_STOP_AT_NUL,
		md->encoding);
	de_dbg(c, "filename: \"%s\"", ucstring_getpsz_d(fn_srd->str));
	ucstring_append_ucstring(md->filename, fn_srd->str);
	pos += fn_srd->bytes_consumed;
	len -= fn_srd->bytes_consumed;

	dbuf_read_to_ucstring(c->infile, pos, len, md->dirname, DE_CONVFLAG_STOP_AT_NUL,
		md->encoding);
	de_dbg(c, "dir name: \"%s\"", ucstring_getpsz_d(md->dirname));
	fixup_tpk_path(md->dirname);

	de_destroy_stringreaderdata(c, fn_srd);
}

// 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)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0xc3ed3
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0xc3ef2
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x100, %ecx            # imm = 0x100
movl $0x1, %r8d
callq 0x1664c0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x172650
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0x103642(%rip), %rsi    # 0x1c7583
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x171460
movq -0x40(%rbp), %rax
movq (%rax), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x1, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0xe66c0(%rip), %rsi     # 0x1aa68c
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0xc56a0
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x166830
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: read_filename_hlev0
static void read_filename_hlev0(deark *c, lctx *d, struct member_data *md,
	i64 pos, i64 len)
{
	struct de_strarray *sa = NULL;

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

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

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

	de_strarray_destroy(sa);
}

// Assembly:
pushq %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)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xc403e
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x171210
jmp 0xc4052
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rdi
movl $0x22, %esi
callq 0x1727a0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xc5740
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rsi
movl $0x1, %edx
callq 0x1729c0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0xf3b3e(%rip), %rsi     # 0x1b7c0f
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rdi
callq 0x1727f0
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: read_filename_hlev1_or_exthdr
static void read_filename_hlev1_or_exthdr(deark *c, lctx *d, struct member_data *md,
	i64 pos, i64 len)
{
	i64 i;

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

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

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

// Assembly:
pushq %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 -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xc4126
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x171210
jmp 0xc413a
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r9d
movl $0x1, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x172650
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x1033fb(%rip), %rsi    # 0x1c7583
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jge 0xc41e6
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
cmpl $0x2f, (%rax,%rcx,4)
jne 0xc41d6
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movl $0x5f, (%rax,%rcx,4)
jmp 0xc41d8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xc4197
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: get_os_name
static const char *get_os_name(u8 id)
{
	const char *name = NULL;
	switch(id) {
	case ' ': name="unspecified"; break;
	case '2': name="OS/2"; break;
	case '3': name="OS/386?"; break;
	case '9': name="OS-9"; break;
	case 'A': name="Amiga"; break;
	case 'C': name="CP/M"; break;
	case 'F': name="FLEX"; break;
	case 'H': name="Human68K"; break;
	case 'J': name="JVM"; break;
	case 'K': name="OS-9/68K"; break;
	case 'M': name="DOS"; break;
	case 'R': name="RUNser"; break;
	case 'T': name="TownsOS"; break;
	case 'U': name="Unix"; break;
	case 'W': name="Windows NT"; break;
	case 'a': name="Atari ST?"; break;
	case 'm': name="Macintosh"; break;
	case 'w': name="Windows"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x57, %eax
ja 0xc432c
movq -0x18(%rbp), %rax
leaq 0xf330d(%rip), %rcx     # 0x1b7530
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xef56a(%rip), %rax     # 0x1b379d
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xdff95(%rip), %rax     # 0x1a41d8
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf39d4(%rip), %rax     # 0x1b7c27
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf39cc(%rip), %rax     # 0x1b7c2f
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xdff59(%rip), %rax     # 0x1a41cc
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xe80f2(%rip), %rax     # 0x1ac375
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf39a1(%rip), %rax     # 0x1b7c34
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf3996(%rip), %rax     # 0x1b7c39
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf398f(%rip), %rax     # 0x1b7c42
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf3986(%rip), %rax     # 0x1b7c46
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0x10b271(%rip), %rax    # 0x1cf53e
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf3975(%rip), %rax     # 0x1b7c4f
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf396f(%rip), %rax     # 0x1b7c56
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0x10b7a2(%rip), %rax    # 0x1cfa96
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf395d(%rip), %rax     # 0x1b7c5e
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0xf395b(%rip), %rax     # 0x1b7c69
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0x10b5fe(%rip), %rax    # 0x1cf919
movq %rax, -0x10(%rbp)
jmp 0xc432c
leaq 0x1137a4(%rip), %rax    # 0x1d7acc
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc433d
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xc434a
leaq 0xf38e9(%rip), %rax     # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0xc434a
movq -0x20(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/lha.c
// Function: do_lev0_ext_area
static void do_lev0_ext_area(deark *c, lctx *d, struct member_data *md,
	i64 pos1, i64 len)
{
	if(len<1) return;
	md->os_id = de_getbyte(pos1);
	de_dbg(c, "OS id: %d ('%c') (%s)", (int)md->os_id,
		de_byte_to_printable_char(md->os_id), get_os_name(md->os_id));

	// TODO: Finish this
	if(md->os_id=='U') {
		UI mode;
		i64 uid, gid;

		if(len<12) goto done;

		read_unix_timestamp(c, d, md, pos1+2, DE_TIMESTAMPIDX_MODIFY, "last-modified");

		mode = (UI)de_getu16le(pos1+6);
		de_dbg(c, "mode: octal(%06o)", mode);
		interpret_unix_perms(c, d, md, mode);

		uid = de_getu16le(pos1+8);
		de_dbg(c, "uid: %d", (int)uid);
		gid = de_getu16le(pos1+10);
		de_dbg(c, "gid: %d", (int)gid);
	}

done: ;
}

// 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)
cmpq $0x1, -0x28(%rbp)
jge 0xc4378
jmp 0xc44c5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165060
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %edi
callq 0x161a80
movsbl %al, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %edi
callq 0xc41f0
movq -0x50(%rbp), %rdi
movl -0x48(%rbp), %edx
movl -0x44(%rbp), %ecx
movq %rax, %r8
leaq 0xf389a(%rip), %rsi     # 0x1b7c73
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x55, %eax
jne 0xc44c3
cmpq $0xc, -0x28(%rbp)
jge 0xc43fd
jmp 0xc44c5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x2, %rcx
xorl %r8d, %r8d
leaq 0xed417(%rip), %r9      # 0x1b1832
callq 0xc3cb0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x6, %rsi
callq 0x165280
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0xd9c9e(%rip), %rsi     # 0x19e0e4
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0xc5940
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0xf37fe(%rip), %rsi     # 0x1b7c89
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0xa, %rsi
callq 0x165280
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq 0xf37d5(%rip), %rsi     # 0x1b7c91
movb $0x0, %al
callq 0x15b0d0
jmp 0xc44c5
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)