LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: find_mp3_frame_header
static int find_mp3_frame_header(deark *c, mp3ctx *d, i64 pos1, i64 nbytes_avail,
	i64 *skip_this_many_bytes)
{
	u8 *buf = NULL;
	i64 nbytes_in_buf;
	i64 bpos = 0;
	int retval = 0;

	*skip_this_many_bytes = 0;
	nbytes_in_buf = 65536;
	if(nbytes_avail < nbytes_in_buf) nbytes_in_buf = nbytes_avail;
	buf = de_malloc(c, nbytes_in_buf);
	de_read(buf, pos1, nbytes_in_buf);
	for(bpos=0; bpos<nbytes_in_buf-1; bpos++) {
		if(buf[bpos]==0xff) {
			if((buf[bpos+1]&0xe0) == 0xe0) {
				*skip_this_many_bytes = bpos;
				retval = 1;
				goto done;
			}
		}
	}

done:
	de_free(c, buf);
	return retval;
}

// 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 $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq $0x10000, -0x38(%rbp)   # imm = 0x10000
movq -0x20(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0xe1068
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x15b780
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x164d10
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0xe10fd
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
jne 0xe10ed
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %eax
andl $0xe0, %eax
cmpl $0xe0, %eax
jne 0xe10eb
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x44(%rbp)
jmp 0xe10ff
jmp 0xe10ed
jmp 0xe10ef
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xe109a
jmp 0xe10ff
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15b820
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: get_mp3_ver_id_name
static const char *get_mp3_ver_id_name(unsigned int n)
{
	const char *name;
	switch(n) {
	case 0: name = "MPEG v2.5"; break;
	case 2: name = "MPEG v2"; break;
	case 3: name = "MPEG v1"; break;
	default: name = "?";
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0xe1147
jmp 0xe1133
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xe1154
jmp 0xe113d
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0xe1161
jmp 0xe116e
leaq 0xdb91a(%rip), %rax     # 0x1bca68
movq %rax, -0x10(%rbp)
jmp 0xe1179
leaq 0xdb917(%rip), %rax     # 0x1bca72
movq %rax, -0x10(%rbp)
jmp 0xe1179
leaq 0xdb912(%rip), %rax     # 0x1bca7a
movq %rax, -0x10(%rbp)
jmp 0xe1179
leaq 0xd6ab8(%rip), %rax     # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: get_mp3_layer_desc_name
static const char *get_mp3_layer_desc_name(unsigned int n)
{
	const char *name;
	switch(n) {
	case 1: name = "Layer III"; break;
	case 2: name = "Layer II"; break;
	case 3: name = "Layer I"; break;
	default: name = "?";
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xe11a8
jmp 0xe1194
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xe11b5
jmp 0xe119e
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0xe11c2
jmp 0xe11cf
leaq 0xdb8d3(%rip), %rax     # 0x1bca82
movq %rax, -0x10(%rbp)
jmp 0xe11da
leaq 0xdb8d0(%rip), %rax     # 0x1bca8c
movq %rax, -0x10(%rbp)
jmp 0xe11da
leaq 0xdb8cc(%rip), %rax     # 0x1bca95
movq %rax, -0x10(%rbp)
jmp 0xe11da
leaq 0xd6a57(%rip), %rax     # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: get_bitrate_name
static char *get_bitrate_name(char *buf, size_t buflen,
	unsigned int bitrate_idx, unsigned int version_id, unsigned int layer_desc)
{
	static const u16 tbl[5][16] = {
		{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0},
		{0, 32, 48, 56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 384, 0},
		{0, 32, 40, 48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 0},
		{0, 32, 48, 56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, 0},
		{0,  8, 16, 24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, 0}};
	unsigned int tbl_to_use = 0;
	unsigned int br = 0;

	if(version_id==0x03) { // v1
		if(layer_desc==0x03) tbl_to_use=0; // Layer 1
		else if(layer_desc==0x02) tbl_to_use=1; // Layer 2
		else if(layer_desc==0x01) tbl_to_use=2; // Layer 3
		else goto done;
	}
	else if(version_id==0x02 || version_id==0x00) { // v2, v2.5
		if(layer_desc==0x03) tbl_to_use=3; // Layer 1
		else if(layer_desc==0x02 || layer_desc==0x01) tbl_to_use=4; // Layer 2,3
		else goto done;
	}
	else {
		goto done;
	}

	if(bitrate_idx>15) goto done;
	br = (unsigned int)tbl[tbl_to_use][bitrate_idx];

done:
	if(br>0)
		de_snprintf(buf, buflen, "%u kbps", br);
	else
		de_strlcpy(buf, "?", buflen);
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x3, -0x18(%rbp)
jne 0xe1243
cmpl $0x3, -0x1c(%rbp)
jne 0xe121d
movl $0x0, -0x20(%rbp)
jmp 0xe1241
cmpl $0x2, -0x1c(%rbp)
jne 0xe122c
movl $0x1, -0x20(%rbp)
jmp 0xe123f
cmpl $0x1, -0x1c(%rbp)
jne 0xe123b
movl $0x2, -0x20(%rbp)
jmp 0xe123d
jmp 0xe12a2
jmp 0xe123f
jmp 0xe1241
jmp 0xe127d
cmpl $0x2, -0x18(%rbp)
je 0xe124f
cmpl $0x0, -0x18(%rbp)
jne 0xe1279
cmpl $0x3, -0x1c(%rbp)
jne 0xe125e
movl $0x3, -0x20(%rbp)
jmp 0xe1277
cmpl $0x2, -0x1c(%rbp)
je 0xe126a
cmpl $0x1, -0x1c(%rbp)
jne 0xe1273
movl $0x4, -0x20(%rbp)
jmp 0xe1275
jmp 0xe12a2
jmp 0xe1277
jmp 0xe127b
jmp 0xe12a2
jmp 0xe127d
cmpl $0xf, -0x14(%rbp)
jbe 0xe1285
jmp 0xe12a2
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xdb30f(%rip), %rax     # 0x1bc5a0
shlq $0x5, %rcx
addq %rcx, %rax
movl -0x14(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jbe 0xe12c3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %ecx
leaq 0xdb7e3(%rip), %rdx     # 0x1bca9d
movb $0x0, %al
callq 0x15a980
jmp 0xe12d7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xd695b(%rip), %rsi     # 0x1b7c2d
callq 0x15aa30
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: get_sampling_rate_name
static char *get_sampling_rate_name(char *buf, size_t buflen,
	unsigned int sr_idx, unsigned int version_id, unsigned int layer_desc)
{
	static const u32 tbl[3][4] = {
		{44100, 48000, 32000, 0},
		{22050, 24000, 16000, 0},
		{11025, 12000,  8000, 0}};
	unsigned int tbl_to_use = 0;
	unsigned int sr = 0;

	if(layer_desc<1 || layer_desc>3) goto done;

	if(version_id==0x03) { // v1
		tbl_to_use = 0;
	}
	else if(version_id==0x02) { // v2
		tbl_to_use = 1;
	}
	else if(version_id==0x00) { // v2.5
		tbl_to_use = 2;
	}
	else {
		goto done;
	}

	if(sr_idx>3) goto done;
	sr = (unsigned int)tbl[tbl_to_use][sr_idx];

done:
	if(sr>0)
		de_snprintf(buf, buflen, "%u Hz", sr);
	else
		de_strlcpy(buf, "?", buflen);
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x1, -0x1c(%rbp)
jb 0xe1324
cmpl $0x3, -0x1c(%rbp)
jbe 0xe1326
jmp 0xe137d
cmpl $0x3, -0x18(%rbp)
jne 0xe1335
movl $0x0, -0x20(%rbp)
jmp 0xe1359
cmpl $0x2, -0x18(%rbp)
jne 0xe1344
movl $0x1, -0x20(%rbp)
jmp 0xe1357
cmpl $0x0, -0x18(%rbp)
jne 0xe1353
movl $0x2, -0x20(%rbp)
jmp 0xe1355
jmp 0xe137d
jmp 0xe1357
jmp 0xe1359
cmpl $0x3, -0x14(%rbp)
jbe 0xe1361
jmp 0xe137d
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xdb2d3(%rip), %rax     # 0x1bc640
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jbe 0xe139e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %ecx
leaq 0xdb710(%rip), %rdx     # 0x1bcaa5
movb $0x0, %al
callq 0x15a980
jmp 0xe13b2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xd6880(%rip), %rsi     # 0x1b7c2d
callq 0x15aa30
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mp3.c
// Function: get_mp3_channel_mode_name
static const char *get_mp3_channel_mode_name(unsigned int n)
{
	const char *name;
	switch(n) {
	case 0: name = "Stereo"; break;
	case 1: name = "Joint stereo"; break;
	case 2: name = "Dual channel"; break;
	case 3: name = "Single channel"; break;
	default: name = "?";
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0xe141c
movq -0x18(%rbp), %rax
leaq 0xdb1b1(%rip), %rcx     # 0x1bc590
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xdb6bc(%rip), %rax     # 0x1bcaab
movq %rax, -0x10(%rbp)
jmp 0xe1427
leaq 0xdb6b6(%rip), %rax     # 0x1bcab2
movq %rax, -0x10(%rbp)
jmp 0xe1427
leaq 0xdb6b6(%rip), %rax     # 0x1bcabf
movq %rax, -0x10(%rbp)
jmp 0xe1427
leaq 0xdb6b6(%rip), %rax     # 0x1bcacc
movq %rax, -0x10(%rbp)
jmp 0xe1427
leaq 0xd680a(%rip), %rax     # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: de_module_mscompress
void de_module_mscompress(deark *c, struct deark_module_info *mi)
{
	mi->id = "mscompress";
	mi->desc = "MS-DOS Installation Compression";
	mi->run_fn = de_run_mscompress;
	mi->identify_fn = de_identify_mscompress;
	mi->flags |= DE_MODFLAG_MULTIPART;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xdb69e(%rip), %rcx     # 0x1bcb35
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xdb69b(%rip), %rcx     # 0x1bcb40
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xe14e0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1dd(%rip), %rcx       # 0xe16a0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: de_module_is_ibt
void de_module_is_ibt(deark *c, struct deark_module_info *mi)
{
	mi->id = "is_ibt";
	mi->desc = "InstallShield IBT archive";
	mi->run_fn = de_run_is_ibt;
	mi->identify_fn = de_identify_is_ibt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xdb469(%rip), %rcx     # 0x1bcb60
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xdb462(%rip), %rcx     # 0x1bcb67
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xe1730
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x10d(%rip), %rcx       # 0xe1830
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: de_run_is_ibt
static void de_run_is_ibt(deark *c, de_module_params *mparams)
{
	struct ibt_ctx *d = NULL;
	i64 pos = 0;

	d = de_malloc(c, sizeof(struct ibt_ctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);

	while(1) {
		if(pos+16 > c->infile->len) break;
		de_dbg(c, "member at %"I64_FMT, pos);
		de_dbg_indent(c, 1);
		do_ibt_member(c, d, pos);
		de_dbg_indent(c, -1);
		if(d->last_member_size<=0) goto done;
		pos += d->last_member_size;
	}

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported IBT file");
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x9, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0xe1794
jmp 0xe17f6
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xe5bef(%rip), %rsi     # 0x1c7392
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe3640
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0xe17e4
jmp 0xe17f8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xe177c
jmp 0xe17f8
cmpq $0x0, -0x18(%rbp)
je 0xe1828
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0xe181b
movq -0x8(%rbp), %rdi
leaq 0xdb621(%rip), %rsi     # 0x1bce35
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: de_module_mrnz
void de_module_mrnz(deark *c, struct deark_module_info *mi)
{
	mi->id = "mrnz";
	mi->desc = "MRNZ obfuscated file";
	mi->run_fn = de_run_mrnz;
	mi->identify_fn = de_identify_mrnz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xdb2ea(%rip), %rcx     # 0x1bcb81
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xdb2e1(%rip), %rcx     # 0x1bcb86
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xe18d0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x11d(%rip), %rcx       # 0xe19e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: de_run_mrnz
static void de_run_mrnz(deark *c, de_module_params *mparams)
{
	dbuf *outf = NULL;
	i64 ipos;
	i64 i;
	i64 ocount;
	u8 errflag = 0;

	ipos = 8;
	// Guessing that this is the number of obfuscated bytes
	ocount = de_getu32le_p(&ipos);
	if(ocount>0xff) {
		errflag = 1;
		goto done;
	}

	outf = dbuf_create_output_file(c, "bin", NULL, 0);
	for(i=0; i<ocount; i++) {
		u8 b;

		if(ipos >= c->infile->len) goto done;
		b = de_getbyte_p(&ipos);
		dbuf_writebyte(outf, b^0xae);
	}

	dbuf_copy(c->infile, ipos, c->infile->len-ipos, outf);

done:
	dbuf_close(outf);
	if(errflag) {
		de_err(c, "Failed to decode MRNZ file");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movb $0x0, -0x31(%rbp)
movq $0x8, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, -0x30(%rbp)
cmpq $0xff, -0x30(%rbp)
jle 0xe191c
movb $0x1, -0x31(%rbp)
jmp 0xe19b8
movq -0x8(%rbp), %rdi
leaq 0xdf8e0(%rip), %rsi     # 0x1c1207
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0xe1993
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0xe195c
jmp 0xe19b8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movb %al, -0x32(%rbp)
movq -0x18(%rbp), %rdi
movzbl -0x32(%rbp), %eax
xorl $0xae, %eax
movzbl %al, %esi
callq 0x168380
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xe193e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
subq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x166070
movq -0x18(%rbp), %rdi
callq 0x1676a0
cmpb $0x0, -0x31(%rbp)
je 0xe19d9
movq -0x8(%rbp), %rdi
leaq 0xdb4bd(%rip), %rsi     # 0x1bce8f
movb $0x0, %al
callq 0x15bfb0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: detect_fmt_internal
static int detect_fmt_internal(deark *c)
{
	u8 buf[8];

	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, "\x53\x5a\x44\x44\x88\xf0\x27\x33", 8))
		return FMT_SZDD;
	if(!de_memcmp(buf, "\x4b\x57\x41\x4a\x88\xf0\x27\xd1", 8))
		return FMT_KWAJ;
	if(!de_memcmp(buf, "SZ \x88\xf0\x27\x33", 7))
		return FMT_SZ;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %ecx
callq 0x164d10
leaq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0x3327f08844445a53, %rcx # imm = 0x3327F08844445A53
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xe1a7e
movl $0x1, -0x4(%rbp)
jmp 0xe1ad0
leaq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $-0x2ed80f77b5bea8b5, %rcx # imm = 0xD127F0884A41574B
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xe1aa6
movl $0x2, -0x4(%rbp)
jmp 0xe1ad0
leaq -0x18(%rbp), %rdi
leaq 0xdb131(%rip), %rsi     # 0x1bcbe2
movl $0x7, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0xe1ac9
movl $0x3, -0x4(%rbp)
jmp 0xe1ad0
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/mscompress.c
// Function: mscompress_handle_multipart
static void mscompress_handle_multipart(deark *c, lctx *d)
{
	int k;

	if(!c->mp_data) goto done;

	if(d->fmt!=FMT_SZ) {
		de_err(c, "Multi-part archives not supported for this format");
		d->errflag = 1;
		goto done;
	}

	d->combined_inf = dbuf_create_membuf(c, c->infile->len, 0);
	d->inf = d->combined_inf;
	dbuf_copy(c->infile, 0, c->infile->len, d->inf);
	for(k=0; k<c->mp_data->count; k++) {
		u8 v;
		dbuf *inf_part;

		inf_part = de_mp_acquire_dbuf(c, k+1);
		if(!inf_part) {
			d->errflag = 1;
			goto done;
		}

		v = dbuf_getbyte(inf_part, 7);
		if((int)v != k+2) {
			de_err(c, "(part %d) Bad file or wrong order", k+2);
			d->errflag = 1;
			goto done;
		}

		dbuf_copy(inf_part, 8, inf_part->len-8, d->inf);
		de_mp_release_dbuf(c, k+1, &inf_part);
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0xe1b00
jmp 0xe1c46
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
je 0xe1b28
movq -0x8(%rbp), %rdi
leaq 0xdb0d6(%rip), %rsi     # 0x1bcbea
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xe1c46
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x168020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x166070
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
cmpl (%rcx), %eax
jge 0xe1c44
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
callq 0x15f890
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe1bc0
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xe1c46
movq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x165060
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
je 0xe1c01
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
addl $0x2, %edx
leaq 0xdb02c(%rip), %rsi     # 0x1bcc1c
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xe1c46
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdx
subq $0x8, %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movl $0x8, %esi
callq 0x166070
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq -0x20(%rbp), %rdx
callq 0x15f970
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe1b86
jmp 0xe1c46
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: do_header_SZ
static int do_header_SZ(deark *c, lctx *d, i64 pos1)
{
	u8 fragment_id;
	i64 pos = pos1;
	int retval = 0;

	de_dbg(c, "header at %d", (int)pos);
	de_dbg_indent(c, 1);

	pos += 7; // signature
	fragment_id = dbuf_getbyte_p(d->inf, &pos);
	if(fragment_id!=0xd1) {
		de_err(c, "First file is not volume 1");
		goto done;
	}

	d->cmpr_meth = CMPR_LZSS18;
	d->uncmpr_len = dbuf_getu32le_p(d->inf, &pos);
	d->uncmpr_len_known = 1;
	de_dbg(c, "uncompressed len: %"I64_FMT, d->uncmpr_len);
	d->cmpr_data_pos = pos;
	d->cmpr_data_len = d->inf->len - d->cmpr_data_pos;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xe2f7a(%rip), %rsi     # 0x1c4f8e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x28(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0xd1, %eax
je 0xe2068
movq -0x8(%rbp), %rdi
leaq 0xdac25(%rip), %rsi     # 0x1bcc84
movb $0x0, %al
callq 0x15bfb0
jmp 0xe20e0
movq -0x10(%rbp), %rax
movl $0x2, 0xc(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0xc7778(%rip), %rsi     # 0x1a9822
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
subq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: do_extract_file
static void do_extract_file(deark *c, lctx *d)
{
	dbuf *outf = NULL;
	de_finfo *fi = NULL;

	de_dbg(c, "compressed data at %"I64_FMT, d->cmpr_data_pos);
	if(!cmpr_meth_is_supported(d, d->cmpr_meth)) {
		de_err(c, "Compression method %u (%s) is not supported", d->cmpr_meth,
			get_cmpr_meth_name(d->cmpr_meth));
		goto done;
	}
	if(d->cmpr_data_len<0) goto done;

	de_dbg_indent(c, 1);
	fi = de_finfo_create(c);
	if(ucstring_isnonempty(d->filename)) {
		de_finfo_set_name_from_ucstring(c, fi, d->filename, 0);
		fi->original_filename_flag = 1;
	}
	else {
		de_finfo_set_name_from_sz(c, fi, "bin", 0, DE_ENCODING_LATIN1);
	}
	outf = dbuf_create_output_file(c, NULL, (d->fi_override ? d->fi_override : fi), 0);
	dbuf_enable_wbuffer(outf);
	do_decompress(c, d, outf);
	de_dbg_indent(c, -1);

done:
	dbuf_close(outf);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0xdb8b0(%rip), %rsi     # 0x1bdbe3
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xe2550
cmpl $0x0, %eax
jne 0xe238a
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edi
callq 0xe2490
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %edx
movq %rax, %rcx
leaq 0xda97e(%rip), %rsi     # 0x1bccfc
movb $0x0, %al
callq 0x15bfb0
jmp 0xe246c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jge 0xe239a
jmp 0xe246c
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0xe23e8
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x20(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xe2404
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0xdee10(%rip), %rdx     # 0x1c1207
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0x15d4c0
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xe2425
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0xe242d
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x167b90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xe2590
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15d260
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: get_cmpr_meth_name
static const char *get_cmpr_meth_name(UI n)
{
	char *name = NULL;

	switch(n) {
	case CMPR_NONE: name="uncompressed"; break;
	case CMPR_XOR: name="XOR"; break;
	case CMPR_LZSS16: case CMPR_LZSS18: name="LZSS"; break;
	case CMPR_LZHUFF: name="LZ+Huffman"; break;
	case CMPR_MSZIP: name="MSZIP"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0xe24df
jmp 0xe24ab
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0xe24ec
jmp 0xe24b5
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xe24f9
jmp 0xe24bf
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0xe2506
jmp 0xe24c9
movl -0x14(%rbp), %eax
subl $0x4, %eax
je 0xe2513
jmp 0xe24d3
movl -0x14(%rbp), %eax
subl $0x10000, %eax          # imm = 0x10000
je 0xe24f9
jmp 0xe251e
leaq 0xf3952(%rip), %rax     # 0x1d5e38
movq %rax, -0x10(%rbp)
jmp 0xe251e
leaq 0xd2160(%rip), %rax     # 0x1b4653
movq %rax, -0x10(%rbp)
jmp 0xe251e
leaq 0xcf4a5(%rip), %rax     # 0x1b19a5
movq %rax, -0x10(%rbp)
jmp 0xe251e
leaq 0xda76c(%rip), %rax     # 0x1bcc79
movq %rax, -0x10(%rbp)
jmp 0xe251e
leaq 0xc2b5b(%rip), %rax     # 0x1a5075
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xe252f
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xe253c
leaq 0xd56f7(%rip), %rax     # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0xe253c
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: cmpr_meth_is_supported
static int cmpr_meth_is_supported(lctx *d, UI n)
{
	switch(n) {
	case CMPR_NONE:
	case CMPR_XOR:
	case CMPR_LZSS16:
	case CMPR_LZSS18:
	case CMPR_LZHUFF:
	case CMPR_MSZIP:
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x5, %eax
jb 0xe2574
jmp 0xe2568
movl -0x18(%rbp), %eax
subl $0x10000, %eax          # imm = 0x10000
jne 0xe257d
jmp 0xe2574
movl $0x1, -0x4(%rbp)
jmp 0xe2584
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: XOR_cbfn
static int XOR_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	i64 k;
	dbuf *f = (dbuf*)brctx->userdata;

	for(k=0; k<buf_len; k++) {
		dbuf_writebyte(f, buf[k] ^ (u8)0xff);
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0xe2e1c
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl $0xff, %eax
movzbl %al, %esi
callq 0x168380
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xe2de7
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_lz77buf_writebytecb
static void mslzh_lz77buf_writebytecb(struct de_lz77buffer *rb, u8 n)
{
	struct mslzh_context *lzhctx = (struct mslzh_context*)rb->userdata;

	if(mslzh_have_enough_output(lzhctx)) return;
	dbuf_writebyte(lzhctx->dcmpro->f, n);
	lzhctx->nbytes_written++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe3580
cmpl $0x0, %eax
je 0xe30ed
jmp 0xe3111
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %esi
callq 0x168380
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_read_huffman_tree_enctype_0
static void mslzh_read_huffman_tree_enctype_0(struct mslzh_context *lzhctx, struct mslzh_tree *htr)
{
	MSLZH_SYMLEN_TYPE n;
	UI sym_idx;

	n = (MSLZH_SYMLEN_TYPE)de_log2_rounded_up((i64)htr->num_symbols);
	for(sym_idx=0; sym_idx<htr->num_symbols; sym_idx++) {
		htr->symlengths[sym_idx] = n;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
callq 0x15cef0
movb %al, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xe3330
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe3308
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_read_huffman_tree_enctype_1
static void mslzh_read_huffman_tree_enctype_1(struct mslzh_context *lzhctx, struct mslzh_tree *htr)
{
	MSLZH_SYMLEN_TYPE prev_sym_len;
	UI sym_idx;
	UI n;

	htr->symlengths[0] = (MSLZH_SYMLEN_TYPE)mslzh_getbits(lzhctx, 4);
	prev_sym_len = htr->symlengths[0];

	for(sym_idx=1; sym_idx<htr->num_symbols; sym_idx++) {
		if(lzhctx->bitrd.eof_flag) goto done;

		n = mslzh_getbits(lzhctx, 1);
		if(n==0) { // 0
			htr->symlengths[sym_idx] = prev_sym_len;
		}
		else { // 1...
			n = mslzh_getbits(lzhctx, 1);
			if(n==0) { // 10
				htr->symlengths[sym_idx] = prev_sym_len + 1;
			}
			else { // 11...
				htr->symlengths[sym_idx] = (MSLZH_SYMLEN_TYPE)mslzh_getbits(lzhctx, 4);
			}
		}

		prev_sym_len = htr->symlengths[sym_idx];
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0xe2e30
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xe3436
movq -0x8(%rbp), %rax
cmpb $0x0, 0x38(%rax)
je 0xe339d
jmp 0xe3438
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xe2e30
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xe33c7
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0xe3417
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xe2e30
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xe33f7
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0xe3415
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0xe2e30
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0xe3417
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe337e
jmp 0xe3438
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_read_huffman_tree_enctype_2
static void mslzh_read_huffman_tree_enctype_2(struct mslzh_context *lzhctx, struct mslzh_tree *htr)
{
	MSLZH_SYMLEN_TYPE prev_sym_len;
	UI sym_idx;
	UI n;

	htr->symlengths[0] = (MSLZH_SYMLEN_TYPE)mslzh_getbits(lzhctx, 4);
	prev_sym_len = htr->symlengths[0];

	for(sym_idx=1; sym_idx<htr->num_symbols; sym_idx++) {
		if(lzhctx->bitrd.eof_flag) goto done;

		n = mslzh_getbits(lzhctx, 2);
		if(n==3) {
			htr->symlengths[sym_idx] = (MSLZH_SYMLEN_TYPE)mslzh_getbits(lzhctx, 4);
		}
		else {
			htr->symlengths[sym_idx] = prev_sym_len + (MSLZH_SYMLEN_TYPE)n - 1;
		}

		prev_sym_len = htr->symlengths[sym_idx];
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0xe2e30
movb %al, %cl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xe350f
movq -0x8(%rbp), %rax
cmpb $0x0, 0x38(%rax)
je 0xe349a
jmp 0xe3511
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0xe2e30
movl %eax, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jne 0xe34d1
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0xe2e30
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0xe34f0
movzbl -0x11(%rbp), %eax
movl -0x1c(%rbp), %ecx
movzbl %cl, %ecx
addl %ecx, %eax
subl $0x1, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe347e
jmp 0xe3511
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_read_huffman_tree_enctype_3
static void mslzh_read_huffman_tree_enctype_3(struct mslzh_context *lzhctx, struct mslzh_tree *htr)
{
	UI sym_idx;

	for(sym_idx=0; sym_idx<htr->num_symbols; sym_idx++) {
		if(lzhctx->bitrd.eof_flag) goto done;
		htr->symlengths[sym_idx] = (MSLZH_SYMLEN_TYPE)mslzh_getbits(lzhctx, 4);
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xe3578
movq -0x8(%rbp), %rax
cmpb $0x0, 0x38(%rax)
je 0xe354f
jmp 0xe357a
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0xe2e30
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe3537
jmp 0xe357a
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_have_enough_output
static int mslzh_have_enough_output(struct mslzh_context *lzhctx)
{
	if(lzhctx->dcmpro->len_known &&
		(lzhctx->nbytes_written>=lzhctx->dcmpro->expected_len))
	{
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
je 0xe35b8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jl 0xe35b8
movl $0x1, -0x4(%rbp)
jmp 0xe35bf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: mslzh_getnextcode
static MSLZH_VALUE_TYPE mslzh_getnextcode(struct mslzh_context *lzhctx,
	struct mslzh_tree *htr)
{
	fmtutil_huffman_valtype val = 0;
	int ret;

	fmtutil_huffman_reset_cursor(htr->fmtuht->cursor); // Should be unnecessary

	ret = fmtutil_huffman_read_next_value(htr->fmtuht->bk, &lzhctx->bitrd, &val, NULL);
	if(!ret) return 0;
	return (MSLZH_VALUE_TYPE)val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x187700
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
leaq -0x1c(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x187bc0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xe3627
movb $0x0, -0x1(%rbp)
jmp 0xe362d
movl -0x1c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: read_sz_p
static int read_sz_p(dbuf *f, i64 maxlen, de_ucstring *s, de_encoding enc, i64 *ppos)
{
	i64 startpos = *ppos;
	i64 foundpos;
	i64 len;
	int ret;

	ret = dbuf_search_byte(f, 0x00, startpos, maxlen, &foundpos);
	if(!ret) return 0;
	len = foundpos - startpos; // length w/o NUL
	dbuf_read_to_ucstring(f, startpos, len, s, 0, enc);
	*ppos = foundpos+1;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %esi, %esi
leaq -0x40(%rbp), %r8
callq 0x1667a0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0xe395f
movl $0x0, -0x4(%rbp)
jmp 0xe399d
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mscompress.c
// Function: ibt_decompress_and_extract
static void ibt_decompress_and_extract(deark *c, struct ibt_ctx *d,
	struct ibt_member_ctx *md)
{
	de_module_params *mparams = NULL;
	de_finfo *fi = NULL;

	de_dbg(c, "SZDD data at %"I64_FMT", size=%"I64_FMT, md->cmpr_pos, md->cmpr_len);
	de_dbg_indent(c, 1);

	fi = de_finfo_create(c);
	de_finfo_set_name_from_ucstring(c, fi, md->orig_fn, 0);
	fi->original_filename_flag = 1;

	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.fi = fi;

	de_run_module_by_id_on_slice(c, "mscompress", mparams, c->infile,
		md->cmpr_pos, md->cmpr_len);

	de_free(c, mparams);
	de_finfo_destroy(c, fi);
	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 $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xd9486(%rip), %rsi     # 0x1bce74
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x28(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r9
leaq 0xd90c2(%rip), %rsi     # 0x1bcb35
callq 0x15c9f0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15d260
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: de_module_tome
void de_module_tome(deark *c, struct deark_module_info *mi)
{
	mi->id = "tome";
	mi->desc = "Tome";
	mi->run_fn = de_run_tome;
	mi->identify_fn = de_identify_tome;
	mi->flags |= DE_MODFLAG_NONWORKING;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xd93ec(%rip), %rcx     # 0x1bceb3
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xd93e3(%rip), %rcx     # 0x1bceb8
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xe3b10
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ad(%rip), %rcx       # 0xe3da0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: destroy_tome_md
static void destroy_tome_md(deark *c, struct tome_md *md)
{
	if(!md) return;
	de_advfile_destroy(md->advf);
	de_destroy_stringreaderdata(c, md->fname);
	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 0xe3e09
jmp 0xe3e34
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x17aaa0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x166830
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: tome_read_timestamp
static void tome_read_timestamp(deark *c, struct tome_ctx *d, struct tome_md *md,
	i64 pos, UI tzi, const char *name)
{
	i64 n;
	struct de_timestamp ts;
	char timestamp_buf[64];

	n = dbuf_getu32be(c->infile, pos);
	de_mac_time_to_timestamp(n, &ts);
	de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "%s time: %"U64_FMT" (%s)", name, n, timestamp_buf);
	md->advf->mainfork.fi->timestamp[tzi] = ts;
}

// 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 0x165470
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x15d720
leaq -0x90(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %r8
leaq 0xd8827(%rip), %rsi     # 0x1bcfad
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rax
addq $0x18, %rax
movl -0x24(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: tome_writelistener
static void tome_writelistener(dbuf *f, void *userdata, const u8 *buf, i64 buf_len)
{
	struct tome_fork_data *fdata = (struct tome_fork_data*)userdata;
	struct tome_md *md = fdata->md;
	i64 i;

	for(i=0; i<buf_len; i++) {
		md->frk[fdata->forknum].checksum_calc = (u32)buf[i] ^
			((u32)(md->frk[fdata->forknum].checksum_calc >> 0x18) +
				(u32)(md->frk[fdata->forknum].checksum_calc <<8));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0xe486f
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x30(%rbp), %rax
addq $0xc0, %rax
movq -0x28(%rbp), %rdx
movl 0x8(%rdx), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl 0x14(%rax), %eax
shrl $0x18, %eax
movq -0x30(%rbp), %rdx
addq $0xc0, %rdx
movq -0x28(%rbp), %rsi
movl 0x8(%rsi), %esi
imulq $0x38, %rsi, %rsi
addq %rsi, %rdx
movl 0x14(%rdx), %edx
shll $0x8, %edx
addl %edx, %eax
xorl %eax, %ecx
movq -0x30(%rbp), %rax
addq $0xc0, %rax
movq -0x28(%rbp), %rdx
movl 0x8(%rdx), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe47ef
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: tome_advfile_cbfn
static int tome_advfile_cbfn(deark *c, struct de_advfile *advf,
	struct de_advfile_cbparams *afp)
{
	UI forknum;
	struct tome_md *md = (struct tome_md*)advf->userdata;

	if(afp->whattodo == DE_ADVFILE_WRITEMAIN) {
		forknum = 0;
	}
	else if(afp->whattodo == DE_ADVFILE_WRITERSRC) {
		forknum = 1;
	}
	else {
		return 0;
	}

	if(md->frk[forknum].is_compressed) {
		tome_decompress_fork(md, forknum, afp->outf);
	}
	else {
		tome_copy_fork(md, forknum, afp->outf);
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xe48b2
movl $0x0, -0x24(%rbp)
jmp 0xe48cf
movq -0x20(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xe48c4
movl $0x1, -0x24(%rbp)
jmp 0xe48cd
movl $0x0, -0x4(%rbp)
jmp 0xe491a
jmp 0xe48cf
movq -0x30(%rbp), %rax
addq $0xc0, %rax
movl -0x24(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0xc(%rax)
je 0xe48ff
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xe49a0
jmp 0xe4913
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xe4b40
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/mac-arch.c
// Function: tome_test_checksum
static int tome_test_checksum(u32 ckr, u32 ckc)
{
	u32 ck;
	UI i;

	ck = ckr ^ ckc;
	for(i=0; i<4; i++) {
		if((ck&0xff)!=0x00 && (ck&0xff)!=0xff) return 0;
		ck >>= 8;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
xorl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jae 0xe4989
movl -0x10(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0xe4975
movl -0x10(%rbp), %eax
andl $0xff, %eax
cmpl $0xff, %eax
je 0xe4975
movl $0x0, -0x4(%rbp)
jmp 0xe4990
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe494a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)