LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_run_arc
static void de_run_arc(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *s;

	d = de_malloc(c, sizeof(lctx));
	d->fmt = FMT_ARC;
	d->fmtname = "ARC";
	// TODO: Make 'recurse' configurable. Would require us to make the embedded
	// archives end with the correct marker.
	d->recurse_subdirs = 1;
	d->input_encoding_for_filenames = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);
	d->input_encoding_for_comments = DE_EXTENC_MAKE(d->input_encoding_for_filenames,
		DE_ENCSUBTYPE_HYBRID);

	// TODO: It would probably be worth it to have a separate module for PAK, so we
	// can take the .PAK file extension into account when guessing what method #10
	// is. It's complicated, though, and not very useful until we support Crushed
	// decompression.

	s = de_get_ext_option(c, "arc:method10");
	if(s) {
		if(!de_strcmp(s, "trimmed")) {
			d->method10 = 1;
		}
		else if(!de_strcmp(s, "crushed")) {
			d->method10 = 2;
		}
	}

	if(de_havemodcode(c, mparams, '6')) {
		do_convert_pak16sfx(c, d);
		goto done;
	}

	do_run_arc_spark_internal(c, d);

done:
	destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x68, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
leaq 0x180c2b(%rip), %rcx    # 0x1b003a
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xd, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0xff, %ecx
orl $0x300, %ecx            # imm = 0x300
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
leaq 0x170fd6(%rip), %rsi    # 0x1a0434
callq 0x15cb30
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2f4ae
movq -0x20(%rbp), %rdi
leaq 0x170fc8(%rip), %rsi    # 0x1a0441
callq 0x191a0
cmpl $0x0, %eax
jne 0x2f48d
movq -0x18(%rbp), %rax
movb $0x1, 0x1c(%rax)
jmp 0x2f4ac
movq -0x20(%rbp), %rdi
leaq 0x171384(%rip), %rsi    # 0x1a081c
callq 0x191a0
cmpl $0x0, %eax
jne 0x2f4aa
movq -0x18(%rbp), %rax
movb $0x2, 0x1c(%rax)
jmp 0x2f4ac
jmp 0x2f4ae
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x36, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0x2f4d4
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fca0
jmp 0x2f4e1
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fd20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fef0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_module_spark
void de_module_spark(deark *c, struct deark_module_info *mi)
{
	mi->id = "spark";
	mi->desc = "Spark archive";
	mi->run_fn = de_run_spark;
	mi->identify_fn = de_identify_spark;
	mi->help_fn = de_help_spark;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x170bb8(%rip), %rcx    # 0x1a03ff
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x170bb0(%rip), %rcx    # 0x1a0405
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x2f890
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xdd(%rip), %rcx        # 0x2f950
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x23e(%rip), %rcx       # 0x2fac0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_run_spark
static void de_run_spark(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->fmt = FMT_SPARK;
	d->fmtname = "Spark";
	d->input_encoding_for_filenames = de_get_input_encoding(c, NULL, DE_ENCODING_RISCOS);
	d->input_encoding_for_comments = DE_EXTENC_MAKE(d->input_encoding_for_filenames,
		DE_ENCSUBTYPE_HYBRID);
	d->recurse_subdirs = de_get_ext_option_bool(c, "spark:recurse", 1);

	do_run_arc_spark_internal(c, d);
	destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x68, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
movq -0x18(%rbp), %rax
leaq 0x1711b4(%rip), %rcx    # 0x1a0a83
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x14, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0xff, %ecx
orl $0x300, %ecx            # imm = 0x300
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
leaq 0x171176(%rip), %rsi    # 0x1a0a89
movl $0x1, %edx
callq 0x15cbc0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fd20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fef0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_identify_spark
static int de_identify_spark(deark *c)
{
	u8 b;
	u32 load_addr;
	int ldaddrcheck = 0;
	int has_trailer = 0;

	if(de_getbyte(0) != 0x1a) return 0;
	b = de_getbyte(1); // compression method
	if(b==0x82 || b==0x83 || b==0x88 || b==0x89 || b==0xff) {
		;
	}
	else if(b==0x81 || b==0x84 || b==0x85 || b==0x86) {
		; // TODO: Verify that these are possible in Spark.
	}
	else {
		return 0;
	}

	load_addr = (u32)de_getu32le(29);
	if((load_addr & 0xfff00000) == 0xfff00000) {
		ldaddrcheck = 1;
	}

	if(de_getu16be(c->infile->len-2) == 0x1a80) {
		has_trailer = 1;
	}

	if(has_trailer && ldaddrcheck) return 85;
	if(ldaddrcheck) return 30;
	if(has_trailer) return 10;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x1a, %eax
je 0x2f98f
movl $0x0, -0x4(%rbp)
jmp 0x2faaa
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x82, %eax
je 0x2f9db
movzbl -0x11(%rbp), %eax
cmpl $0x83, %eax
je 0x2f9db
movzbl -0x11(%rbp), %eax
cmpl $0x88, %eax
je 0x2f9db
movzbl -0x11(%rbp), %eax
cmpl $0x89, %eax
je 0x2f9db
movzbl -0x11(%rbp), %eax
cmpl $0xff, %eax
jne 0x2f9dd
jmp 0x2fa19
movzbl -0x11(%rbp), %eax
cmpl $0x81, %eax
je 0x2fa09
movzbl -0x11(%rbp), %eax
cmpl $0x84, %eax
je 0x2fa09
movzbl -0x11(%rbp), %eax
cmpl $0x85, %eax
je 0x2fa09
movzbl -0x11(%rbp), %eax
cmpl $0x86, %eax
jne 0x2fa0b
jmp 0x2fa17
movl $0x0, -0x4(%rbp)
jmp 0x2faaa
jmp 0x2fa19
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1d, %esi
callq 0x165540
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xfff00000, %eax       # imm = 0xFFF00000
cmpl $0xfff00000, %eax       # imm = 0xFFF00000
jne 0x2fa44
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x2, %rsi
callq 0x1651d0
cmpq $0x1a80, %rax           # imm = 0x1A80
jne 0x2fa70
movl $0x1, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x2fa85
cmpl $0x0, -0x1c(%rbp)
je 0x2fa85
movl $0x55, -0x4(%rbp)
jmp 0x2faaa
cmpl $0x0, -0x1c(%rbp)
je 0x2fa94
movl $0x1e, -0x4(%rbp)
jmp 0x2faaa
cmpl $0x0, -0x20(%rbp)
je 0x2faa3
movl $0xa, -0x4(%rbp)
jmp 0x2faaa
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/arc.c
// Function: de_module_arcmac
void de_module_arcmac(deark *c, struct deark_module_info *mi)
{
	mi->id = "arcmac";
	mi->desc = "ArcMac compressed archive";
	mi->run_fn = de_run_arcmac;
	mi->identify_fn = de_identify_arcmac;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x17090c(%rip), %rcx    # 0x1a0413
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x170905(%rip), %rcx    # 0x1a041a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x2fb40
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xbd(%rip), %rcx        # 0x2fbf0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_run_arcmac
static void de_run_arcmac(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->fmt = FMT_ARCMAC;
	d->fmtname = "ArcMac";
	d->recurse_subdirs = 1;
	d->input_encoding_for_arcmac_fn = de_get_input_encoding(c, NULL, DE_ENCODING_MACROMAN);
	d->input_encoding_for_filenames = DE_ENCODING_CP437;
	d->input_encoding_for_comments = DE_EXTENC_MAKE(d->input_encoding_for_filenames,
		DE_ENCSUBTYPE_HYBRID);

	do_run_arc_spark_internal(c, d);
	destroy_lctx(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x68, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
leaq 0x170f4e(%rip), %rcx    # 0x1a0acd
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x11, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0xd, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0xff, %ecx
orl $0x300, %ecx            # imm = 0x300
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fd20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2fef0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: de_identify_arcmac
static int de_identify_arcmac(deark *c)
{
	u8 buf1[2];
	u8 buf2[2];

	de_read(buf1, 0, 2);
	if(buf1[0]!=0x1b) return 0;
	if(!(buf1[1]>=1 && buf1[1]<=9)) return 0;
	de_read(buf2, 59, 2);
	if(buf2[0]!=0x1a) return 0;
	if(buf2[1]!=buf1[1]) return 0;
	return 80;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x12(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x12(%rbp), %eax
cmpl $0x1b, %eax
je 0x2fc28
movl $0x0, -0x4(%rbp)
jmp 0x2fc8c
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
jl 0x2fc3a
movzbl -0x11(%rbp), %eax
cmpl $0x9, %eax
jle 0x2fc43
movl $0x0, -0x4(%rbp)
jmp 0x2fc8c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x14(%rbp), %rsi
movl $0x3b, %edx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x14(%rbp), %eax
cmpl $0x1a, %eax
je 0x2fc70
movl $0x0, -0x4(%rbp)
jmp 0x2fc8c
movzbl -0x13(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0x2fc85
movl $0x0, -0x4(%rbp)
jmp 0x2fc8c
movl $0x50, -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/arc.c
// Function: do_convert_pak16sfx
static void do_convert_pak16sfx(deark *c, lctx *d)
{
	d->fmt = FMT_PAK16SFX;
	d->recurse_subdirs = 0;
	d->sig_byte = 0x1a;
	parse_member_sequence(c, d, 0, c->infile->len, 0,member_cb_for_pak16sfx);
	if(d->pak16sfx_outf) {
		dbuf_writeu16be(d->pak16sfx_outf, 0xfe00);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x4, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movb $0x1a, 0x24(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
xorl %r8d, %r8d
leaq 0x621(%rip), %r9        # 0x30310
callq 0x2ffd0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2fd11
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
callq 0x168a50
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: destroy_lctx
static void destroy_lctx(deark *c, lctx *d)
{
	if(!d) return;
	de_crcobj_destroy(d->crco);
	de_strarray_destroy(d->curpath);
	if(d->pak16sfx_outf) {
		dbuf_close(d->pak16sfx_outf);
	}
	if(d->persistent_md) {
		i64 i;

		for(i=0; i<d->num_top_level_members; i++) {
			ucstring_destroy(d->persistent_md[i].comment);
			ucstring_destroy(d->persistent_md[i].path);
		}
		de_free(c, d->persistent_md);
	}
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2ff0c
jmp 0x2ffc2
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x15f2e0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x1727f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2ff3e
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x2ffb5
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jge 0x2ffa4
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x171750
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2ff51
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: member_cb_for_pak16sfx
static void member_cb_for_pak16sfx(deark *c, lctx *d, struct member_parser_data *mpd)
{
	de_dbg2(c, "pak16sfx member at %"I64_FMT", type=0x%02x", mpd->member_pos,
		(UI)mpd->magic);
	de_dbg_indent(c, 1);

	// This is not perfect. We throw away the extended info, instead of converting
	// it to extended records.
	if(mpd->magic==0x1a) {
		if(!d->pak16sfx_outf) {
			d->pak16sfx_outf = dbuf_create_output_file(c, "pak", NULL, 0);
		}
		dbuf_copy(c->infile, mpd->member_pos, mpd->member_len, d->pak16sfx_outf);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %ecx
leaq 0x17010a(%rip), %rsi    # 0x1a0449
movb $0x0, %al
callq 0x15b350
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x1a, %eax
jne 0x303b2
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x3038d
movq -0x8(%rbp), %rdi
leaq 0x1700f6(%rip), %rsi    # 0x1a046d
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
callq 0x166070
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: is_btspk
static int is_btspk(deark *c, lctx *d)
{
	if(d->fmt!=FMT_ARC && d->fmt!=FMT_ARCMAC) return 0;

	if(dbuf_memcmp(c->infile, c->infile->len-31,
		(const void*)"\x1b\x03" "MASTR\xff" "END!", 12))
	{
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
je 0x303fb
movq -0x18(%rbp), %rax
cmpl $0x3, (%rax)
je 0x303fb
movl $0x0, -0x4(%rbp)
jmp 0x30439
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
subq $0x1f, %rsi
leaq 0x1700d4(%rip), %rdx    # 0x1a04ee
movl $0xc, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x30432
movl $0x0, -0x4(%rbp)
jmp 0x30439
movl $0x1, -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/arc.c
// Function: find_arc_marker
static int find_arc_marker(deark *c, const u8 *buf, size_t buflen, i64 *ppos)
{
	size_t i;

	for(i=0; i<buflen; i++) {
		if(buf[i]==0x1a) {
			*ppos = (i64)i;
			return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x304ab
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x1a, %eax
jne 0x3049b
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x304b2
jmp 0x3049d
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3046c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_prescan_file
static void do_prescan_file(deark *c, lctx *d, i64 startpos)
{
	de_dbg2(c, "prescan");
	d->num_top_level_members = 0;
	de_dbg_indent(c, 1);
	parse_member_sequence(c, d, startpos, c->infile->len-startpos, 0, member_cb_for_prescan);
	de_dbg2(c, "number of members: %"I64_FMT, d->num_top_level_members);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x17001c(%rip), %rsi    # 0x1a04fb
movb $0x0, %al
callq 0x15b350
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
subq -0x18(%rbp), %rcx
xorl %r8d, %r8d
leaq 0x61a(%rip), %r9        # 0x30b40
callq 0x2ffd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdx
leaq 0x16ffc5(%rip), %rsi    # 0x1a0503
movb $0x0, %al
callq 0x15b350
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_pak_trailer
static void do_pak_trailer(deark *c, lctx *d)
{
	u8 b;
	i64 pos;

	if(!d->prescan_found_eoa) return;
	if(c->infile->len - d->prescan_pos_after_eoa < 2) return;
	if(de_getbyte(d->prescan_pos_after_eoa) != 0xfe) return;
	b = de_getbyte(d->prescan_pos_after_eoa+1);
	if(b>4) return;

	pos = d->prescan_pos_after_eoa;
	de_dbg(c, "PAK extended records at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	d->has_pak_trailer = 1;
	init_trailer_data(c, d);

	while(1) {
		int ret;
		i64 bytes_consumed = 0;

		if(pos > c->infile->len-2) break;
		ret = do_pak_ext_record(c, d, pos, &bytes_consumed);
		pos += bytes_consumed;
		mark_end_of_known_data(d, pos);
		if(!ret || bytes_consumed<8) break;
	}

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x25(%rax)
jne 0x3097f
jmp 0x30aa4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
cmpq $0x2, %rax
jge 0x3099e
jmp 0x30aa4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0xfe, %eax
je 0x309c2
jmp 0x30aa4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
addq $0x1, %rsi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
jle 0x309ec
jmp 0x30aa4
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x16fbce(%rip), %rsi    # 0x1a05d5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rax
movb $0x1, 0x27(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x30d00
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x2, %rcx
cmpq %rcx, %rax
jle 0x30a54
jmp 0x30a96
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x30da0
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30560
cmpl $0x0, -0x24(%rbp)
je 0x30a92
cmpq $0x8, -0x30(%rbp)
jge 0x30a94
jmp 0x30a96
jmp 0x30a31
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_sequence_of_members
static void do_sequence_of_members(deark *c, lctx *d, i64 pos1, i64 len, int nesting_level)
{
	if(nesting_level >= MAX_NESTING_LEVEL) {
		de_err(c, "Max subdir nesting level exceeded");
		return;
	}

	de_dbg(c, "archive at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);
	parse_member_sequence(c, d, pos1, len, nesting_level, member_cb_main);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpl $0x18, -0x24(%rbp)
jl 0x30ae6
movq -0x8(%rbp), %rdi
leaq 0x16fb39(%rip), %rsi    # 0x1a0616
movb $0x0, %al
callq 0x15bfb0
jmp 0x30b38
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x16fb43(%rip), %rsi    # 0x1a0638
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
leaq 0x60b(%rip), %r9        # 0x31130
callq 0x2ffd0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: member_cb_for_prescan
static void member_cb_for_prescan(deark *c, lctx *d, struct member_parser_data *mpd)
{
	if(mpd->magic!=d->sig_byte) return;
	if(mpd->cmpr_meth_masked==0x00) { // end of archive
		d->prescan_found_eoa = 1;
		d->prescan_pos_after_eoa = mpd->member_pos + mpd->member_len;
		de_dbg2(c, "end of member sequence at %"I64_FMT, d->prescan_pos_after_eoa);
		return;
	}
	if(mpd->cmpr_meth==20 || mpd->cmpr_meth==21 || mpd->cmpr_meth==30) {
		// Features we're pretty sure aren't used by PAK.
		d->has_arc_extensions = 1;
	}
	d->num_top_level_members++;
	de_dbg2(c, "member at %"I64_FMT, mpd->member_pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x24(%rcx), %ecx
cmpl %ecx, %eax
je 0x30b6d
jmp 0x30c0f
movq -0x18(%rbp), %rax
movzbl 0xa(%rax), %eax
cmpl $0x0, %eax
jne 0x30bb6
movq -0x10(%rbp), %rax
movb $0x1, 0x25(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
addq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x16f96d(%rip), %rsi    # 0x1a051a
movb $0x0, %al
callq 0x15b350
jmp 0x30c0f
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x14, %eax
je 0x30bdd
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x15, %eax
je 0x30bdd
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x1e, %eax
jne 0x30be5
movq -0x10(%rbp), %rax
movb $0x1, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x19678a(%rip), %rsi    # 0x1c7392
movb $0x0, %al
callq 0x15b350
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: is_pkcomment_sig_at
static int is_pkcomment_sig_at(deark *c, lctx *d, i64 pos)
{
	i64 comments_descr_pos;

	if(!d->prescan_found_eoa) return 0;
	if(pos < d->prescan_pos_after_eoa) return 0;
	if(pos > c->infile->len-8) return 0;
	if((UI)de_getu32be(pos) != 0x504baa55U) {
		return 0;
	}
	comments_descr_pos = de_getu32le(pos+4);
	if((comments_descr_pos < d->prescan_pos_after_eoa) ||
		(comments_descr_pos > pos-4))
	{
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x25(%rax)
jne 0x30c4a
movl $0x0, -0x4(%rbp)
jmp 0x30cef
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jge 0x30c64
movl $0x0, -0x4(%rbp)
jmp 0x30cef
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x8, %rcx
cmpq %rcx, %rax
jle 0x30c86
movl $0x0, -0x4(%rbp)
jmp 0x30cef
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165470
cmpl $0x504baa55, %eax       # imm = 0x504BAA55
je 0x30ca7
movl $0x0, -0x4(%rbp)
jmp 0x30cef
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x165540
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jl 0x30cdf
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x4, %rcx
cmpq %rcx, %rax
jle 0x30ce8
movl $0x0, -0x4(%rbp)
jmp 0x30cef
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: get_cmpr_meth_info
static const struct cmpr_meth_info *get_cmpr_meth_info(lctx *d, u8 cmpr_meth)
{
	size_t k;
	const struct cmpr_meth_info *p;

	for(k=0; k<DE_ARRAYCOUNT(cmpr_meth_info_arr); k++) {
		u8 meth_adjusted;

		p = &cmpr_meth_info_arr[k];
		if(d->fmt==FMT_ARC && !(p->flags & 0x1)) continue;
		if(d->fmt==FMT_SPARK && !(p->flags & 0x2)) continue;
		meth_adjusted = p->cmpr_meth;
		if(d->fmt==FMT_SPARK && (p->flags & 0x80)) {
			meth_adjusted |= 0x80;
		}
		if(meth_adjusted != cmpr_meth) continue;

		if(p->cmpr_meth==10) {
			// Method 10 has a conflict -- it could be either Trimmed (ARC7)
			// or Crushed (PAK).
			if(p->flags&0x100) { // Skip this unless we're sure it's Trimmed
				if(d->method10!=1) {
					if(d->has_pak_trailer || !d->has_arc_extensions) continue;
				}
			}
			else if(p->flags&0x200) { // Skip this unless we're sure it's Crushed
				if(d->method10!=2) {
					if(!d->has_pak_trailer || d->has_arc_extensions) continue;
				}
			}
		}
		return p;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x15, -0x20(%rbp)
jae 0x31e7f
leaq 0x1e26b8(%rip), %rax    # 0x214410
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x31d81
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x31d81
jmp 0x31e6e
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x31d9e
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x31d9e
jmp 0x31e6e
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x31dcd
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x31dcd
movzbl -0x29(%rbp), %eax
orl $0x80, %eax
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0x31dde
jmp 0x31e6e
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x31e64
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x31e25
movq -0x10(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl $0x1, %eax
je 0x31e23
movq -0x10(%rbp), %rax
movzbl 0x27(%rax), %eax
cmpl $0x0, %eax
jne 0x31e1f
movq -0x10(%rbp), %rax
cmpb $0x0, 0x28(%rax)
jne 0x31e21
jmp 0x31e6e
jmp 0x31e23
jmp 0x31e62
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x31e60
movq -0x10(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl $0x2, %eax
je 0x31e5e
movq -0x10(%rbp), %rax
cmpb $0x0, 0x27(%rax)
je 0x31e5a
movq -0x10(%rbp), %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x31e5c
jmp 0x31e6e
jmp 0x31e5e
jmp 0x31e60
jmp 0x31e62
jmp 0x31e64
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x31e87
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x31d46
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_squeezed
static void decompressor_squeezed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_type1 = fmtutil_huff_squeeze_codectype1;
	tlp.codec2 = dfilter_rle90_codec;
	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;
	de_dfilter_decompress_two_layer(c, &tlp);
}

// 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)
movq %r9, -0x30(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x19140
leaq 0x146706(%rip), %rax    # 0x178f60
movq %rax, -0x80(%rbp)
leaq 0x14577b(%rip), %rax    # 0x177fe0
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x178cf0
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_crunched6
static void decompressor_crunched6(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_ARC5;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_pushable = dfilter_lzw_codec;
	tlp.codec1_private_params = (void*)&delzwp;

	tlp.codec2 = dfilter_rle90_codec;

	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;

	de_dfilter_decompress_two_layer(c, &tlp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %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)
leaq -0x94(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x7, -0x94(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x19140
leaq 0x151aa9(%rip), %rax    # 0x184400
movq %rax, -0x78(%rbp)
leaq -0x94(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x145673(%rip), %rax    # 0x177fe0
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x178cf0
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_crunched8
static void decompressor_crunched8(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;
	struct de_lzw_params delzwp;

	// "Crunched" means "packed", then "compressed".
	// So we have to "uncompress" (LZW), then "unpack" (RLE90).

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_UNIXCOMPRESS;
	delzwp.flags |= DE_LZWFLAG_HAS1BYTEHEADER;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_pushable = dfilter_lzw_codec;
	tlp.codec1_private_params = (void*)&delzwp;

	tlp.codec2 = dfilter_rle90_codec;

	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;

	de_dfilter_decompress_two_layer(c, &tlp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %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)
leaq -0x94(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x1, -0x94(%rbp)
movl -0x90(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x90(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x19140
leaq 0x1519fa(%rip), %rax    # 0x184400
movq %rax, -0x78(%rbp)
leaq -0x94(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x1455c4(%rip), %rax    # 0x177fe0
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x178cf0
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_squashed
static void decompressor_squashed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	struct de_lzw_params delzwp;

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

// 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 %r9, -0x30(%rbp)
leaq -0x44(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x1, -0x44(%rbp)
movl $0xd, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x44(%rbp), %r8
callq 0x1843b0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_trimmed
static void decompressor_trimmed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;
	struct de_lh1_params lh1p;

	de_zeromem(&lh1p, sizeof(struct de_lh1_params));
	lh1p.is_arc_trimmed = 1;
	lh1p.history_fill_val = 0x00;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_pushable = dfilter_lh1_codec;
	tlp.codec1_private_params = (void*)&lh1p;

	tlp.codec2 = dfilter_rle90_codec;

	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;

	de_dfilter_decompress_two_layer(c, &tlp);
}

// 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 %r9, -0x30(%rbp)
leaq -0x85(%rbp), %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x19140
movb $0x1, -0x83(%rbp)
movb $0x0, -0x81(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x19140
leaq 0x1588b5(%rip), %rax    # 0x18b3c0
movq %rax, -0x78(%rbp)
leaq -0x85(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x1454bf(%rip), %rax    # 0x177fe0
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x178cf0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: decompressor_spark_compressed
static void decompressor_spark_compressed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_UNIXCOMPRESS;
	delzwp.flags |= DE_LZWFLAG_HAS1BYTEHEADER;
	fmtutil_decompress_lzw(c, dcmpri, dcmpro, dres, &delzwp);
}

// 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 %r9, -0x30(%rbp)
leaq -0x44(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x1, -0x44(%rbp)
movl -0x40(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x44(%rbp), %r8
callq 0x1843b0
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: find_extinfo_item
static const struct extinfo_item_info *find_extinfo_item(u8 cmprmeth, u8 rectype)
{
	size_t k;

	for(k=0; k<DE_ARRAYCOUNT(extinfo_arr); k++) {
		if(extinfo_arr[k].cmprmeth==cmprmeth && extinfo_arr[k].rectype==rectype) {
			return &extinfo_arr[k];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x9, -0x18(%rbp)
jae 0x32c79
leaq 0x1e19ea(%rip), %rax    # 0x214610
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0x32c69
leaq 0x1e19d0(%rip), %rax    # 0x214610
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzbl 0x1(%rax), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0x32c69
leaq 0x1e19b5(%rip), %rax    # 0x214610
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x32c81
jmp 0x32c6b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x32c18
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: do_info_record_string
static void do_info_record_string(deark *c, lctx *d, i64 pos, i64 len, const char *name)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, len, 2048, s, DE_CONVFLAG_STOP_AT_NUL,
		d->input_encoding_for_comments);
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl $0x800, %ecx            # imm = 0x800
movl $0x1, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x172650
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq %rax, %rcx
leaq 0x184eec(%rip), %rsi    # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: my_advfile_cbfn
static int my_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	struct member_data *md = (struct member_data*)advf->userdata;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		do_decompress_fork_arcmac(md, afp->outf, "data");
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		do_decompress_fork_arcmac(md, afp->outf, "rsrc");
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x32d73
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x192e0d(%rip), %rdx    # 0x1c5b79
callq 0x32db0
jmp 0x32d96
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x32d94
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x175fe2(%rip), %rdx    # 0x1a8d71
callq 0x32db0
jmp 0x32d96
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: fixup_path
static void fixup_path(deark *c, lctx *d, de_ucstring *s)
{
	i64 i;

	if(s->len<1) return;

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

	if(s->str[s->len-1]!='/') {
		ucstring_append_char(s, '/');
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x33041
jmp 0x330b4
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x3308c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpl $0x5c, (%rax,%rcx,4)
jne 0x3307c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movl $0x2f, (%rax,%rcx,4)
jmp 0x3307e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x33049
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
cmpl $0x2f, (%rax,%rcx,4)
je 0x330b4
movq -0x18(%rbp), %rdi
movl $0x2f, %esi
callq 0x1714c0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arc.c
// Function: is_valid_file_at
static int is_valid_file_at(dbuf *f, i64 pos1, i64 endpos, UI strictness)
{
	u8 marker;
	u8 cmpr_meth;
	i64 cmpr_len;
	i64 pos = pos1;

	pos++;

	cmpr_meth = dbuf_getbyte_p(f, &pos);
	if(!is_known_first_cmpr_meth(cmpr_meth)) {
		return 0;
	}
	if(cmpr_meth==0) return 1; // End marker

	if(cmpr_meth<20 && strictness>=2) {
		u8 f1;

		// test 1st char of filename
		f1 = dbuf_getbyte(f, pos);
		if(f1<0x20) return 0;
	}
	pos += 13;

	if(strictness==0) return 1;

	cmpr_len = dbuf_getu32le_p(f, &pos);
	pos += 6;
	if(cmpr_meth!=1) pos += 4;
	pos += cmpr_len;
	if(pos==endpos) return 1;
	if(pos>endpos-2) return 0;

	marker = dbuf_getbyte_p(f, &pos);
	if(marker!=0x1a) return 0;
	cmpr_meth = dbuf_getbyte_p(f, &pos);
	if(!is_known_cmpr_meth(cmpr_meth)) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165170
movb %al, -0x26(%rbp)
movzbl -0x26(%rbp), %edi
callq 0x33250
cmpl $0x0, %eax
jne 0x33115
movl $0x0, -0x4(%rbp)
jmp 0x33239
movzbl -0x26(%rbp), %eax
cmpl $0x0, %eax
jne 0x3312a
movl $0x1, -0x4(%rbp)
jmp 0x33239
movzbl -0x26(%rbp), %eax
cmpl $0x14, %eax
jge 0x33160
cmpl $0x2, -0x24(%rbp)
jb 0x33160
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x39(%rbp)
movzbl -0x39(%rbp), %eax
cmpl $0x20, %eax
jge 0x3315e
movl $0x0, -0x4(%rbp)
jmp 0x33239
jmp 0x33160
movq -0x38(%rbp), %rax
addq $0xd, %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x3317e
movl $0x1, -0x4(%rbp)
jmp 0x33239
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165580
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x38(%rbp)
movzbl -0x26(%rbp), %eax
cmpl $0x1, %eax
je 0x331b0
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x331cf
movl $0x1, -0x4(%rbp)
jmp 0x33239
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x2, %rcx
cmpq %rcx, %rax
jle 0x331e9
movl $0x0, -0x4(%rbp)
jmp 0x33239
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165170
movb %al, -0x25(%rbp)
movzbl -0x25(%rbp), %eax
cmpl $0x1a, %eax
je 0x3320b
movl $0x0, -0x4(%rbp)
jmp 0x33239
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165170
movb %al, -0x26(%rbp)
movzbl -0x26(%rbp), %edi
callq 0x33290
cmpl $0x0, %eax
jne 0x33232
movl $0x0, -0x4(%rbp)
jmp 0x33239
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: de_module_amiga_adf
void de_module_amiga_adf(deark *c, struct deark_module_info *mi)
{
	mi->id = "amiga_adf";
	mi->desc = "Amiga disk image";
	mi->run_fn = de_run_amiga_adf;
	mi->identify_fn = de_identify_amiga_adf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16d7e9(%rip), %rcx    # 0x1a0ae0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x16d7e5(%rip), %rcx    # 0x1a0aea
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x33330
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x30d(%rip), %rcx       # 0x33630
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: de_identify_amiga_adf
static int de_identify_amiga_adf(deark *c)
{
	int has_size;
	int has_ext;

	if(dbuf_memcmp(c->infile, 0, "DOS", 3)) return 0;
	if(de_getbyte(3)>0x05) return 0;
	has_ext = de_input_file_has_ext(c, "adf");
	has_size = (c->infile->len==901120 || c->infile->len==1802240);
	if(has_ext && has_size) return 100;
	if(has_size) return 90;
	if(has_ext) return 60;
	return 20;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x19beef(%rip), %rdx    # 0x1cf53e
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x3366a
movl $0x0, -0x4(%rbp)
jmp 0x33715
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x5, %eax
jle 0x33690
movl $0x0, -0x4(%rbp)
jmp 0x33715
movq -0x10(%rbp), %rdi
leaq 0x1a3233(%rip), %rsi    # 0x1d68ce
callq 0x15d180
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movb $0x1, %al
cmpq $0xdc000, 0x18(%rcx)    # imm = 0xDC000
movb %al, -0x19(%rbp)
je 0x336d0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x1b8000, 0x18(%rax)   # imm = 0x1B8000
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x336f0
cmpl $0x0, -0x14(%rbp)
je 0x336f0
movl $0x64, -0x4(%rbp)
jmp 0x33715
cmpl $0x0, -0x14(%rbp)
je 0x336ff
movl $0x5a, -0x4(%rbp)
jmp 0x33715
cmpl $0x0, -0x18(%rbp)
je 0x3370e
movl $0x3c, -0x4(%rbp)
jmp 0x33715
movl $0x14, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: find_root_block
static int find_root_block(deark *c, lctx *d, i64 root_block_reported)
{
	if(c->infile->len >= 1802240) {
		if(test_root_block(c, d, 880*2)) return 1;
	}
	else {
		if(test_root_block(c, d, 880)) return 1;
	}

	if(test_root_block(c, d, root_block_reported)) return 1;

	if((c->infile->len >= (901120+d->bsize)) && (c->infile->len < 1802240)) {
		if(test_root_block(c, d, 880*2)) return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x1b8000, 0x18(%rax)   # imm = 0x1B8000
jl 0x3376b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x6e0, %edx            # imm = 0x6E0
callq 0x33a80
cmpl $0x0, %eax
je 0x33769
movl $0x1, -0x4(%rbp)
jmp 0x33807
jmp 0x3378d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x370, %edx            # imm = 0x370
callq 0x33a80
cmpl $0x0, %eax
je 0x3378b
movl $0x1, -0x4(%rbp)
jmp 0x33807
jmp 0x3378d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x33a80
cmpl $0x0, %eax
je 0x337ac
movl $0x1, -0x4(%rbp)
jmp 0x33807
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0xdc000, %rcx          # imm = 0xDC000
cmpq %rcx, %rax
jl 0x33800
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x1b8000, 0x18(%rax)   # imm = 0x1B8000
jge 0x33800
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x6e0, %edx            # imm = 0x6E0
callq 0x33a80
cmpl $0x0, %eax
je 0x337fe
movl $0x1, -0x4(%rbp)
jmp 0x33807
jmp 0x33800
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq