LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: squeeze_process_nodetable
static int squeeze_process_nodetable(deark *c, struct squeeze_ctx *sqctx)
{
	int retval = 0;

	// It feels a little wrong to go to the trouble of decoding this node table into
	// the form required by our Huffman library's API, when we know it's going to
	// just convert it back into a table much like it was originally. Maybe there
	// should be a better way to do this.
	de_dbg3(c, "interpreted huffman codebook:");
	de_dbg_indent(c, 1);
	squeeze_interpret_node(sqctx, 0, 0, 0);
	de_dbg_indent(c, -1);

	if(c->debug_level>=4) {
		fmtutil_huffman_dump(c, sqctx->ht);
	}

	retval = 1;
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x5bf60(%rip), %rsi     # 0x1d65f2
movb $0x0, %al
callq 0x15b400
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rsi
callq 0x17a700
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rax
cmpl $0x4, (%rax)
jl 0x17a6e1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x187cc0
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: squeeze_interpret_node
static void squeeze_interpret_node(struct squeeze_ctx *sqctx,
	i64 nodenum, u64 currcode, UI currcode_nbits)
{
	// TODO: Report errors?
	if(nodenum<0 || nodenum>=sqctx->nodecount) return;
	if(sqctx->tmpnodes[nodenum].in_use) return; // Loops are bad
	if(currcode_nbits>=FMTUTIL_HUFFMAN_MAX_CODE_LENGTH) return;

	sqctx->tmpnodes[nodenum].in_use = 1;
	squeeze_interpret_dval(sqctx, sqctx->tmpnodes[nodenum].child[0].dval, currcode<<1, currcode_nbits+1);
	squeeze_interpret_dval(sqctx, sqctx->tmpnodes[nodenum].child[1].dval, ((currcode<<1) | 1), currcode_nbits+1);
	sqctx->tmpnodes[nodenum].in_use = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
jl 0x17a72c
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jl 0x17a731
jmp 0x17a7da
movq -0x8(%rbp), %rax
addq $0x70, %rax
imulq $0x6, -0x10(%rbp), %rcx
addq %rcx, %rax
cmpb $0x0, (%rax)
je 0x17a74b
jmp 0x17a7da
cmpl $0x30, -0x1c(%rbp)
jb 0x17a756
jmp 0x17a7da
movq -0x8(%rbp), %rax
addq $0x70, %rax
imulq $0x6, -0x10(%rbp), %rcx
addq %rcx, %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
addq $0x70, %rax
imulq $0x6, -0x10(%rbp), %rcx
addq %rcx, %rax
movw 0x2(%rax), %ax
movq -0x18(%rbp), %rdx
shlq %rdx
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movswl %ax, %esi
callq 0x17a7e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
addq $0x70, %rax
imulq $0x6, -0x10(%rbp), %rcx
addq %rcx, %rax
movw 0x4(%rax), %ax
movq -0x18(%rbp), %rdx
shlq %rdx
orq $0x1, %rdx
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movswl %ax, %esi
callq 0x17a7e0
movq -0x8(%rbp), %rax
addq $0x70, %rax
imulq $0x6, -0x10(%rbp), %rcx
addq %rcx, %rax
movb $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: squeeze_interpret_dval
static void squeeze_interpret_dval(struct squeeze_ctx *sqctx,
	i16 dval, u64 currcode, UI currcode_nbits)
{
	char b2buf[72];

	if(dval>=0) { // a pointer to a node
		if((i64)dval < sqctx->nodecount) {
			squeeze_interpret_node(sqctx, (i64)dval, currcode, currcode_nbits);
		}
	}
	else if(dval>=(-257) && dval<=(-1)) {
		fmtutil_huffman_valtype adj_value;

		//  -257 => 256 (stop code)
		//  -256 => 255 (byte value)
		//  -255 => 254 (byte value)
		//  ...
		//  -1   => 0   (byte value)
		adj_value = -(((fmtutil_huffman_valtype)dval)+1);
		if(sqctx->c->debug_level>=3) {
			de_dbg3(sqctx->c, "code: \"%s\" = %d",
				de_print_base2_fixed(b2buf, sizeof(b2buf), currcode, currcode_nbits),
				(int)adj_value);
		}
		fmtutil_huffman_add_code(sqctx->c, sqctx->ht->bk, currcode, currcode_nbits, adj_value);
	}
	// TODO: Report errors?
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movswl -0xa(%rbp), %eax
cmpl $0x0, %eax
jl 0x17a82f
movswq -0xa(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jge 0x17a82a
movq -0x8(%rbp), %rdi
movswq -0xa(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x17a700
jmp 0x17a8ba
movswl -0xa(%rbp), %eax
cmpl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
jl 0x17a8b8
movswl -0xa(%rbp), %eax
cmpl $-0x1, %eax
jg 0x17a8b8
movswl -0xa(%rbp), %ecx
addl $0x1, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x74(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x3, (%rax)
jl 0x17a895
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl $0x48, %esi
callq 0x15cf60
movq -0x80(%rbp), %rdi
movq %rax, %rdx
movl -0x74(%rbp), %ecx
leaq 0x2f786(%rip), %rsi     # 0x1aa014
movb $0x0, %al
callq 0x15b400
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x74(%rbp), %r8d
callq 0x187720
jmp 0x17a8ba
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: xpk_xor1_cbfn
static int xpk_xor1_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	u8 *pn = (u8*)brctx->userdata;
	i64 i;

	for(i=0; i<buf_len; i++) {
		*pn ^= buf[i];
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x17a922
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %edx
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
xorl %edx, %ecx
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x17a8f3
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: xpk_checksumc
static UI xpk_checksumc(dbuf *f, i64 pos, i64 len)
{
	UI n = 0;

	len = de_pad_to_4(len);
	dbuf_buffered_read(f, pos, len, xpk_xor2_cbfn, (void*)&n);
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x15ce30
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x15(%rip), %rcx        # 0x17a980
leaq -0x1c(%rbp), %r8
callq 0x166260
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: xpk_xor2_cbfn
static int xpk_xor2_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	UI *pn = (UI*)brctx->userdata;
	UI align;
	i64 i;

	align = brctx->offset & 0x1;

	for(i=0; i<buf_len; i++) {
		if(align) {
			*pn ^= buf[i];
		}
		else {
			*pn ^= ((UI)buf[i])<<8;
		}
		align = !align;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andq $0x1, %rax
movl %eax, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x17aa0e
cmpl $0x0, -0x24(%rbp)
je 0x17a9d8
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x20(%rbp), %rax
xorl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x17a9ef
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
shll $0x8, %ecx
movq -0x20(%rbp), %rax
xorl (%rax), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x17a9b2
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-advfile.c
// Function: de_advfile_create
struct de_advfile *de_advfile_create(deark *c)
{
	struct de_advfile *advf = NULL;

	advf = de_malloc(c, sizeof(struct de_advfile));
	advf->c = c;
	advf->filename = ucstring_create(c);
	advf->mainfork.fi = de_finfo_create(c);
	advf->rsrcfork.fi = de_finfo_create(c);
	return advf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x98, %esi
callq 0x15b780
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-advfile.c
// Function: de_advfile_destroy
void de_advfile_destroy(struct de_advfile *advf)
{
	deark *c;

	if(!advf) return;
	c = advf->c;
	ucstring_destroy(advf->filename);
	de_finfo_destroy(c, advf->mainfork.fi);
	de_finfo_destroy(c, advf->rsrcfork.fi);
	de_free(c, advf->orig_filename);
	de_free(c, advf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x17aab5
jmp 0x17ab10
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x15d260
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x15d260
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x15b820
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-advfile.c
// Function: de_advfile_set_orig_filename
void de_advfile_set_orig_filename(struct de_advfile *advf, const char *fn, size_t fnlen)
{
	deark *c = advf->c;

	if(advf->orig_filename) {
		de_free(c, advf->orig_filename);
		advf->orig_filename = NULL;
	}

	if(fnlen<1) return;
	advf->orig_filename_len = fnlen;
	if(advf->orig_filename_len>1024)
		advf->orig_filename_len = 1024;
	advf->orig_filename = de_malloc(c, advf->orig_filename_len);
	de_memcpy(advf->orig_filename, fn, advf->orig_filename_len);

	if(advf->orig_filename[0]<32) {
		// This is to ensure that our applesd module won't incorrectly guess that
		// this is a Pascal string.
		advf->orig_filename[0] = '_';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x17ab70
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rax
movq $0x0, 0x88(%rax)
cmpq $0x1, -0x18(%rbp)
jae 0x17ab7c
jmp 0x17ac0d
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
cmpq $0x400, 0x80(%rax) # imm = 0x400
jbe 0x17abab
movq -0x8(%rbp), %rax
movq $0x400, 0x80(%rax) # imm = 0x400
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdx
callq 0x191e0
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jge 0x17ac0d
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movb $0x5f, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-advfile.c
// Function: timestamp_to_applesd_date
static i64 timestamp_to_applesd_date(deark *c, struct de_timestamp *ts)
{
	i64 t;

	if(!ts->is_valid) return INVALID_APPLESD_DATE;
	t = de_timestamp_to_unix_time(ts);
	t -= (365*30 + 7)*86400;
	if(t>0x7fffffffLL || t<-0x7fffffffLL) return INVALID_APPLESD_DATE;
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x17bf73
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x17bfb4
movq -0x18(%rbp), %rdi
callq 0x15dd00
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
subq $0x386d4380, %rax       # imm = 0x386D4380
movq %rax, -0x20(%rbp)
cmpq $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
jg 0x17bfa2
cmpq $-0x7fffffff, -0x20(%rbp) # imm = 0x80000001
jge 0x17bfac
movq $-0x80000000, -0x8(%rbp) # imm = 0x80000000
jmp 0x17bfb4
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-advfile.c
// Function: setup_rsrc_finfo
static void setup_rsrc_finfo(struct de_advfile *advf)
{
	i64 i;
	deark *c = advf->c;
	de_ucstring *fname_rsrc = NULL;

	// Only the .mainfork timestamps are used.
	for(i=0; i<DE_TIMESTAMPIDX_COUNT; i++) {
		advf->rsrcfork.fi->timestamp[i] = advf->mainfork.fi->timestamp[i];
	}

	fname_rsrc = ucstring_create(c);
	ucstring_append_ucstring(fname_rsrc, advf->filename);
	if(fname_rsrc->len<1) {
		ucstring_append_sz(fname_rsrc, "_", DE_ENCODING_LATIN1);
	}
	ucstring_append_sz(fname_rsrc, ".rsrc", DE_ENCODING_LATIN1);
	de_finfo_set_name_from_ucstring(c, advf->rsrcfork.fi, fname_rsrc, advf->snflags);
	advf->rsrcfork.fi->original_filename_flag = advf->original_filename_flag;

	ucstring_destroy(fname_rsrc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x5, -0x10(%rbp)
jge 0x17c038
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x18, %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
addq $0x18, %rcx
movq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x17bfe7
movq -0x18(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x171460
movq -0x20(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x17c076
movq -0x20(%rbp), %rdi
leaq 0x3a99a(%rip), %rsi     # 0x1b6a06
movl $0x5, %edx
callq 0x1715e0
movq -0x20(%rbp), %rdi
leaq 0x2ccef(%rip), %rsi     # 0x1a8d70
movl $0x5, %edx
callq 0x1715e0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
callq 0x15d2c0
movq -0x8(%rbp), %rax
movb 0x79(%rax), %cl
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_create_md
struct de_arch_member_data *de_arch_create_md(deark *c, de_arch_lctx *d)
{
	struct de_arch_member_data *md;

	md = de_malloc(c, sizeof(struct de_arch_member_data));
	md->c = c;
	md->d = d;
	md->filename = ucstring_create(c);
	md->name_for_msgs = ucstring_create(c);
	md->fi = de_finfo_create(c);
	return md;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc8, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_destroy_md
void de_arch_destroy_md(deark *c, struct de_arch_member_data *md)
{
	if(!md) return;
	ucstring_destroy(md->filename);
	ucstring_destroy(md->name_for_msgs);
	ucstring_destroy(md->tmpfn_base);
	ucstring_destroy(md->tmpfn_path);
	de_finfo_destroy(c, md->fi);
	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 0x17c1b9
jmp 0x17c20b
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x171750
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x15d260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_create_lctx
de_arch_lctx *de_arch_create_lctx(deark *c)
{
	de_arch_lctx *d;

	d = de_malloc(c, sizeof(de_arch_lctx));
	d->c = c;
	d->inf = c->infile;
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_fixup_path
void de_arch_fixup_path(de_ucstring *s, UI flags)
{
	i64 i;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x17c30a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x5c, (%rax,%rcx,4)
jne 0x17c2fa
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl $0x2f, (%rax,%rcx,4)
jmp 0x17c2fc
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x17c2c7
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jle 0x17c34a
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x17c34a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
cmpl $0x2f, (%rax,%rcx,4)
je 0x17c348
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x1714c0
jmp 0x17c34a
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_handle_field_dos_attr
void de_arch_handle_field_dos_attr(struct de_arch_member_data *md, UI attr)
{
	de_ucstring *descr = NULL;

	md->dos_attribs = attr;
	md->has_dos_attribs = 1;
	descr = ucstring_create(md->c);
	de_describe_dos_attribs(md->c, md->dos_attribs, descr, 0);
	de_dbg(md->c, "DOS attribs: 0x%02x (%s)", md->dos_attribs, ucstring_getpsz_d(descr));
	ucstring_destroy(descr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x7c(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x81(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x7c(%rax), %esi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x15d9f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x172650
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq %rax, %rcx
leaq 0x52ed7(%rip), %rsi     # 0x1cf3fb
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_good_cmpr_data_pos
int de_arch_good_cmpr_data_pos(struct de_arch_member_data *md)
{
	if(md->cmpr_pos<0 || md->cmpr_len<0 ||
		md->cmpr_pos+md->cmpr_len > md->d->inf->len)
	{
		ensure_name_for_msgs_is_set(md);
		de_err(md->c, "%s: Data goes beyond end of file",
			ucstring_getpsz_d(md->name_for_msgs));
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jl 0x17c834
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jl 0x17c834
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x30(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x17c873
movq -0x10(%rbp), %rdi
callq 0x17c890
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x172650
movq -0x18(%rbp), %rdi
movq %rax, %rdx
leaq 0x24161(%rip), %rsi     # 0x1a09c4
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x17c87a
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/src/fmtutil-arch.c
// Function: ensure_name_for_msgs_is_set
static void ensure_name_for_msgs_is_set(struct de_arch_member_data *md)
{
	if(md->name_for_msgs_flag) return;

	if(ucstring_isnonempty(md->filename)) {
		ucstring_empty(md->name_for_msgs);
		ucstring_append_ucstring(md->name_for_msgs, md->filename);
	}
	else {
		if(ucstring_isempty(md->name_for_msgs)) {
			ucstring_append_sz(md->name_for_msgs, "(unknown filename)", DE_ENCODING_LATIN1);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x4d(%rax)
je 0x17c8a8
jmp 0x17c90b
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0x17c8de
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x171210
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
callq 0x171460
jmp 0x17c90b
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x1717b0
cmpl $0x0, %eax
je 0x17c909
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x5a0ac(%rip), %rsi     # 0x1d69ab
movl $0x5, %edx
callq 0x1715e0
jmp 0x17c90b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_run
ozur_run(ozur_ctx *ozur)
{
	if(ozur->cmpr_factor<1 || ozur->cmpr_factor>4 ||
		!ozur->cb_read || !ozur->cb_write)
	{
		ozur_set_error(ozur, OZUR_ERRCODE_GENERIC_ERROR);
		goto done;
	}

	// Part 1 is undoing the "probabilistic" compression.
	// It starts with a header, then we'll repeatedly get 1 byte of output from
	// Part 1, and use it as input to Part 2.
	ozur_part1_readfollowersets(ozur);
	if(ozur->error_code) goto done;

	if(ozur->cb_post_follower_sets) {
		ozur->cb_post_follower_sets(ozur);
	}

	while(1) {
		OZUR_UINT8 outbyte;

		if(ozur->error_code) goto done;
		if(ozur->uncmpr_nbytes_emitted >= ozur->uncmpr_size) break; // Have enough output data

		outbyte = ozur_part1_getnextbyte(ozur);
		if(ozur->error_code) goto done;

		// Part 2 is undoing "compress repeated byte sequences" --
		// apparently a kind of LZ77.
		ozur_part2(ozur, outbyte);
	}

done:
	ozur_flush(ozur);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jb 0x17d006
movq -0x8(%rbp), %rax
cmpl $0x4, 0x8(%rax)
ja 0x17d006
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x17d006
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x17d016
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x17d130
jmp 0x17d08f
movq -0x8(%rbp), %rdi
callq 0x17d160
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d02b
jmp 0x17d08f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x17d044
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x17d046
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d052
jmp 0x17d08f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x17d066
jmp 0x17d08d
movq -0x8(%rbp), %rdi
callq 0x17d260
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d07e
jmp 0x17d08f
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x17d310
jmp 0x17d046
jmp 0x17d08f
movq -0x8(%rbp), %rdi
callq 0x17d470
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_part1_readfollowersets
static void ozur_part1_readfollowersets(ozur_ctx *ozur)
{
	int k;

	for(k=255; k>=0; k--) {
		unsigned int z;
		struct ozur_follower_item *f_i;

		f_i = &ozur->followers[k];

		f_i->count = ozur_bitreader_getbits(ozur, 6);
		if(ozur->error_code) goto done;
		if(f_i->count > 32) {
			ozur_set_error(ozur, OZUR_ERRCODE_BAD_CDATA);
			goto done;
		}

		if(f_i->count > 0) {
			f_i->nbits = ozur_func_B(ozur, f_i->count);
		}

		for(z=0; z<(unsigned int)f_i->count; z++) {
			f_i->values[z] = ozur_bitreader_getbits(ozur, 8);
			if(ozur->error_code) goto done;
		}
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0xff, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x17d256
movq -0x8(%rbp), %rax
addq $0x72, %rax
movslq -0xc(%rbp), %rcx
imulq $0x22, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x6, %esi
callq 0x17d500
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d1b9
jmp 0x17d258
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jle 0x17d1d8
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x17d130
jmp 0x17d258
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x17d1fd
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl (%rax), %esi
callq 0x17d5c0
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jae 0x17d246
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x17d500
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, 0x2(%rax,%rcx)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d239
jmp 0x17d258
jmp 0x17d23b
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x17d204
jmp 0x17d248
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17d173
jmp 0x17d258
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_part1_getnextbyte
static OZUR_UINT8 ozur_part1_getnextbyte(ozur_ctx *ozur)
{
	OZUR_UINT8 outbyte = 0;
	struct ozur_follower_item *f_i;

	f_i = &ozur->followers[(unsigned int)ozur->last_char];

	if(f_i->count==0) { // Follower set is empty
		outbyte = ozur_bitreader_getbits(ozur, 8);
	}
	else { // Follower set not empty
		OZUR_UINT8 bitval;

		bitval = ozur_bitreader_getbits(ozur, 1);
		if(bitval) {
			outbyte = ozur_bitreader_getbits(ozur, 8);
		}
		else {
			unsigned int var_I;

			var_I = (unsigned int)ozur_bitreader_getbits(ozur, (unsigned int)f_i->nbits);
			outbyte = f_i->values[var_I];
		}
	}

	ozur->last_char = outbyte;
	return outbyte;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rax
addq $0x72, %rax
movq -0x8(%rbp), %rcx
movzbl 0x70(%rcx), %ecx
movl %ecx, %ecx
imulq $0x22, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x17d2ac
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x17d500
movb %al, -0x9(%rbp)
jmp 0x17d2fd
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x17d500
movb %al, -0x19(%rbp)
cmpb $0x0, -0x19(%rbp)
je 0x17d2d6
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x17d500
movb %al, -0x9(%rbp)
jmp 0x17d2fb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %esi
callq 0x17d500
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movb 0x2(%rax,%rcx), %al
movb %al, -0x9(%rbp)
jmp 0x17d2fd
movb -0x9(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x70(%rax)
movb -0x9(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_part2
static void ozur_part2(ozur_ctx *ozur, OZUR_UINT8 var_C)
{
	size_t nbytes_to_look_back;
	size_t nbytes_to_copy;

	switch(ozur->state) {
	case 0:
		if(var_C==144) {
			ozur->state = 1;
		}
		else {
			ozur_emit_byte(ozur, var_C);
		}
		break;

	case 1:
		if(var_C) {
			ozur->var_V = var_C;
			ozur->var_Len = (unsigned int)(ozur->var_V & (0xff>>ozur->cmpr_factor));
			ozur->state = (ozur->var_Len==(unsigned int)(0xff>>ozur->cmpr_factor)) ? 2 : 3; // F()
		}
		else {
			ozur_emit_byte(ozur, 144);
			ozur->state = 0;
		}
		break;

	case 2:
		ozur->var_Len += (unsigned int)var_C;
		ozur->state = 3;
		break;

	case 3:
		nbytes_to_look_back = (size_t)(ozur->var_V>>(8-ozur->cmpr_factor)) * 256 +
			(size_t)var_C + 1; // D()
		nbytes_to_copy = (size_t)ozur->var_Len + 3;
		ozur_emit_copy_of_prev_bytes(ozur, nbytes_to_look_back, nbytes_to_copy);
		ozur->state = 0;
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
movq %rax, -0x28(%rbp)
subq $0x3, %rax
ja 0x17d463
movq -0x28(%rbp), %rax
leaq 0x5967e(%rip), %rcx     # 0x1d69c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x9(%rbp), %eax
cmpl $0x90, %eax
jne 0x17d363
movq -0x8(%rbp), %rax
movl $0x1, 0x68(%rax)
jmp 0x17d370
movq -0x8(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x17d7d0
jmp 0x17d463
cmpb $0x0, -0x9(%rbp)
je 0x17d3d7
movb -0x9(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x71(%rax)
movq -0x8(%rbp), %rax
movzbl 0x71(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movl $0xff, %eax
sarl %cl, %eax
movl -0x2c(%rbp), %ecx
andl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movl $0xff, %esi
sarl %cl, %esi
movl $0x3, %ecx
movl $0x2, %eax
cmpl %esi, %edx
cmovel %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x68(%rax)
jmp 0x17d3f0
movq -0x8(%rbp), %rdi
movl $0x90, %esi
callq 0x17d7d0
movq -0x8(%rbp), %rax
movl $0x0, 0x68(%rax)
jmp 0x17d463
movzbl -0x9(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x6c(%rax), %ecx
movl %ecx, 0x6c(%rax)
movq -0x8(%rbp), %rax
movl $0x3, 0x68(%rax)
jmp 0x17d463
movq -0x8(%rbp), %rax
movzbl 0x71(%rax), %eax
movq -0x8(%rbp), %rdx
movl $0x8, %ecx
subl 0x8(%rdx), %ecx
sarl %cl, %eax
cltq
shlq $0x8, %rax
movzbl -0x9(%rbp), %ecx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %eax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x17d850
movq -0x8(%rbp), %rax
movl $0x0, 0x68(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_flush
static void ozur_flush(ozur_ctx *ozur)
{
	size_t ret;
	size_t n;

	if(ozur->error_code) return;
	n = ozur->circbuf_pos;
	if(n<1 || n>OZUR_CIRCBUF_SIZE) return;
	ret = ozur->cb_write(ozur, ozur->circbuf, n);
	if(ret != n) {
		ozur_set_error(ozur, OZUR_ERRCODE_WRITE_FAILED);
		return;
	}
	ozur->uncmpr_nbytes_written += (OZUR_OFF_T)ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d488
jmp 0x17d4f5
movq -0x8(%rbp), %rax
movq 0x2278(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jb 0x17d4a8
cmpq $0x1000, -0x18(%rbp)    # imm = 0x1000
jbe 0x17d4aa
jmp 0x17d4f5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x2280, %rsi           # imm = 0x2280
movq -0x18(%rbp), %rdx
callq *%rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x17d4e5
movq -0x8(%rbp), %rdi
movl $0x7, %esi
callq 0x17d130
jmp 0x17d4f5
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_bitreader_getbits
static OZUR_UINT8 ozur_bitreader_getbits(ozur_ctx *ozur, unsigned int nbits)
{
	OZUR_UINT8 n;

	if(nbits<1 || nbits>8) return 0;

	if(ozur->bitreader_nbits_in_buf < nbits) {
		OZUR_UINT8 b;

		b = ozur_nextbyte(ozur);
		if(ozur->error_code) return 0;
		ozur->bitreader_buf |= ((unsigned int)b)<<ozur->bitreader_nbits_in_buf;
		ozur->bitreader_nbits_in_buf += 8;
	}

	n = (OZUR_UINT8)(ozur->bitreader_buf & (0xff >> (8-nbits)));
	ozur->bitreader_buf >>= nbits;
	ozur->bitreader_nbits_in_buf -= nbits;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jb 0x17d51b
cmpl $0x8, -0x14(%rbp)
jbe 0x17d524
movb $0x0, -0x1(%rbp)
jmp 0x17d5b5
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
cmpl -0x14(%rbp), %eax
jae 0x17d572
movq -0x10(%rbp), %rdi
callq 0x17d620
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d54c
movb $0x0, -0x1(%rbp)
jmp 0x17d5b5
movzbl -0x16(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x64(%rcx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0x60(%rax), %ecx
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
movl $0x8, %ecx
subl -0x14(%rbp), %ecx
movl $0xff, %edx
sarl %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movb %al, -0x15(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, 0x60(%rax)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x64(%rax)
movb -0x15(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_func_B
static OZUR_UINT8 ozur_func_B(ozur_ctx *ozur, OZUR_UINT8 x)
{
	if(x<=2) return 1;
	if(x<=4) return 2;
	if(x<=8) return 3;
	if(x<=16) return 4;
	return 5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jg 0x17d5dd
movb $0x1, -0x1(%rbp)
jmp 0x17d60e
movzbl -0x11(%rbp), %eax
cmpl $0x4, %eax
jg 0x17d5ec
movb $0x2, -0x1(%rbp)
jmp 0x17d60e
movzbl -0x11(%rbp), %eax
cmpl $0x8, %eax
jg 0x17d5fb
movb $0x3, -0x1(%rbp)
jmp 0x17d60e
movzbl -0x11(%rbp), %eax
cmpl $0x10, %eax
jg 0x17d60a
movb $0x4, -0x1(%rbp)
jmp 0x17d60e
movb $0x5, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_nextbyte
static OZUR_UINT8 ozur_nextbyte(ozur_ctx *ozur)
{
	OZUR_UINT8 x;

	if(ozur->error_code) return 0;

	if(ozur->cmpr_nbytes_consumed >= ozur->cmpr_size) {
		ozur_set_error(ozur, OZUR_ERRCODE_INSUFFICIENT_CDATA);
		return 0;
	}
	// Another byte should be available, somewhere.
	if(ozur->inbuf_nbytes_consumed >= ozur->inbuf_nbytes_total) {
		// No bytes left in inbuf. Refill it.
		ozur_refill_inbuf(ozur);
		if(ozur->inbuf_nbytes_total<1) return 0;
	}

	x = ozur->inbuf[ozur->inbuf_nbytes_consumed++];
	ozur->cmpr_nbytes_consumed++;
	return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x17d63f
movb $0x0, -0x1(%rbp)
jmp 0x17d6d9
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x17d665
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x17d130
movb $0x0, -0x1(%rbp)
jmp 0x17d6d9
movq -0x10(%rbp), %rax
movq 0x3280(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3288(%rcx), %rax
jb 0x17d69c
movq -0x10(%rbp), %rdi
callq 0x17d6f0
movq -0x10(%rbp), %rax
cmpq $0x1, 0x3288(%rax)
jae 0x17d69a
movb $0x0, -0x1(%rbp)
jmp 0x17d6d9
jmp 0x17d69c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
movq 0x3280(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x3280(%rdx)
movb 0x3290(%rax,%rcx), %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movb -0x11(%rbp), %al
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/src/../foreign/ozunreduce.h
// Function: ozur_refill_inbuf
static void ozur_refill_inbuf(ozur_ctx *ozur)
{
	size_t ret;
	size_t nbytes_to_read;

	ozur->inbuf_nbytes_total = 0;
	ozur->inbuf_nbytes_consumed = 0;

	if((ozur->cmpr_size - ozur->cmpr_nbytes_read) > OZUR_INBUF_SIZE) {
		nbytes_to_read = OZUR_INBUF_SIZE;
	}
	else {
		nbytes_to_read = (size_t)(ozur->cmpr_size - ozur->cmpr_nbytes_read);
	}
	if(nbytes_to_read<1 || nbytes_to_read>OZUR_INBUF_SIZE) return;

	ret = ozur->cb_read(ozur, ozur->inbuf, nbytes_to_read);
	if(ret != nbytes_to_read) {
		ozur_set_error(ozur, OZUR_ERRCODE_READ_FAILED);
		return;
	}
	ozur->cmpr_nbytes_read += (OZUR_OFF_T)nbytes_to_read;
	ozur->inbuf_nbytes_total = nbytes_to_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x3288(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x3280(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x50(%rcx), %rax
cmpq $0x400, %rax            # imm = 0x400
jle 0x17d73c
movq $0x400, -0x18(%rbp)     # imm = 0x400
jmp 0x17d750
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x50(%rcx), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jb 0x17d761
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jbe 0x17d763
jmp 0x17d7bd
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x3290, %rsi           # imm = 0x3290
movq -0x18(%rbp), %rdx
callq *%rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x17d79e
movq -0x8(%rbp), %rdi
movl $0x6, %esi
callq 0x17d130
jmp 0x17d7bd
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x3288(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_emit_byte
static void ozur_emit_byte(ozur_ctx *ozur, OZUR_UINT8 x)
{
	ozur->circbuf[ozur->circbuf_pos++] = x;
	if(ozur->circbuf_pos >= OZUR_CIRCBUF_SIZE) {
		ozur_flush(ozur);
		ozur->circbuf_pos = 0;
	}
	ozur->uncmpr_nbytes_emitted++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rsi
movq 0x2278(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x2278(%rsi)
movb %dl, 0x2280(%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x1000, 0x2278(%rax) # imm = 0x1000
jb 0x17d832
movq -0x8(%rbp), %rdi
callq 0x17d470
movq -0x8(%rbp), %rax
movq $0x0, 0x2278(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/ozunreduce.h
// Function: ozur_emit_copy_of_prev_bytes
static void ozur_emit_copy_of_prev_bytes(ozur_ctx *ozur,
	size_t nbytes_to_look_back, size_t nbytes)
{
	size_t i;
	size_t src_pos;

	// Maximum possible is (255>>4)*255 + 255 + 1 = 4096
	if(nbytes_to_look_back>4096) {
		ozur_set_error(ozur, OZUR_ERRCODE_GENERIC_ERROR);
		return;
	}
	// Maximum possible is 255 + 127 + 3 = 385
	if(nbytes>nbytes_to_look_back) {
		ozur_set_error(ozur, OZUR_ERRCODE_BAD_CDATA);
		return;
	}

	src_pos = (ozur->circbuf_pos + OZUR_CIRCBUF_SIZE - nbytes_to_look_back) %
		OZUR_CIRCBUF_SIZE;

	for(i=0; i<nbytes; i++) {
		ozur_emit_byte(ozur, ozur->circbuf[src_pos++]);
		if(src_pos >= OZUR_CIRCBUF_SIZE) {
			src_pos = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x1000, -0x10(%rbp)    # imm = 0x1000
jbe 0x17d881
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x17d130
jmp 0x17d912
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x17d89b
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x17d130
jmp 0x17d912
movq -0x8(%rbp), %rax
movq 0x2278(%rax), %rax
addq $0x1000, %rax           # imm = 0x1000
subq -0x10(%rbp), %rax
andq $0xfff, %rax            # imm = 0xFFF
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x17d912
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl 0x2280(%rax,%rcx), %esi
callq 0x17d7d0
cmpq $0x1000, -0x28(%rbp)    # imm = 0x1000
jb 0x17d902
movq $0x0, -0x28(%rbp)
jmp 0x17d904
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x17d8c2
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-fax.c
// Function: create_fax34_huffman_tree
static struct fax34_huffman_tree *create_fax34_huffman_tree(deark *c, int need_2d)
{
	struct fax34_huffman_tree *f34ht;
	size_t i;
	static const size_t num_white_codes = DE_ARRAYCOUNT(fax34whitecodes);
	static const size_t num_black_codes = DE_ARRAYCOUNT(fax34blackcodes);

	f34ht = de_malloc(c, sizeof(struct fax34_huffman_tree));
	f34ht->htwb[0] = fmtutil_huffman_create_decoder(c, (i64)num_white_codes+10, 0);
	f34ht->htwb[1] = fmtutil_huffman_create_decoder(c, (i64)num_black_codes+10, 0);

	if(need_2d) {
		create_fax34_huffman_tree2d(c, f34ht);
	}

	for(i=0; i<num_white_codes; i++) {
		fmtutil_huffman_add_code(c, f34ht->htwb[0]->bk, (u64)fax34whitecodes[i],
			getfax34codelength(0, i), getfax34val(i));
	}
	for(i=0; i<num_black_codes; i++) {
		fmtutil_huffman_add_code(c, f34ht->htwb[1]->bk, (u64)fax34blackcodes[i],
			getfax34codelength(1, i), getfax34val(i));
	}

	return f34ht;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x73, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x188560
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x73, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x188560
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpl $0x0, -0xc(%rbp)
je 0x17dbfd
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x17e500
movq $0x0, -0x20(%rbp)
cmpq $0x69, -0x20(%rbp)
jae 0x17dc72
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x58eb2(%rip), %rax     # 0x1d6ae0
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rsi
xorl %edi, %edi
callq 0x17e5a0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17e600
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl %eax, %r8d
callq 0x187720
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x17dc05
movq $0x0, -0x20(%rbp)
cmpq $0x69, -0x20(%rbp)
jae 0x17dceb
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x58eac(%rip), %rax     # 0x1d6b50
movzbl (%rax,%rcx), %eax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0x17e5a0
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17e600
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x44(%rbp), %ecx
movl %eax, %r8d
callq 0x187720
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x17dc7a
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-fax.c
// Function: destroy_fax34_huffman_tree
static void destroy_fax34_huffman_tree(deark *c, struct fax34_huffman_tree *f34ht)
{
	if(!f34ht) return;
	fmtutil_huffman_destroy_decoder(c, f34ht->htwb[0]);
	fmtutil_huffman_destroy_decoder(c, f34ht->htwb[1]);
	if(f34ht->_2d_codes) fmtutil_huffman_destroy_decoder(c, f34ht->_2d_codes);
	de_free(c, f34ht);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x17e4a9
jmp 0x17e4f3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x1886d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1886d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x17e4e6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x1886d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-fax.c
// Function: create_fax34_huffman_tree2d
static void create_fax34_huffman_tree2d(deark *c, struct fax34_huffman_tree *f34ht)
{
	size_t i;

	f34ht->_2d_codes = fmtutil_huffman_create_decoder(c, 11, 11);

	// Note that this tree could be constructed using
	//  fmtutil_huffman_make_canonical_tree(..., FMTUTIL_MCTFLAG_LEFT_ALIGN_BRANCHES),
	// so we don't actually need the fax34_2dcodes table. But it's not worth it, to
	// get rid of an 11-byte table.

	for(i=0; i<DE_ARRAYCOUNT(fax34_2dcodes); i++) {
		fmtutil_huffman_add_code(c, f34ht->_2d_codes->bk, (u64)fax34_2dcodes[i],
			(UI)fax34_2dcodelengths[i], (fmtutil_huffman_valtype)fax34_2dvals[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0xb, %edx
movq %rdx, %rsi
callq 0x188560
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq $0x0, -0x18(%rbp)
cmpq $0xb, -0x18(%rbp)
jae 0x17e58e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rcx
leaq 0x58663(%rip), %rax     # 0x1d6bb9
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movq -0x18(%rbp), %rcx
leaq 0x5865d(%rip), %rax     # 0x1d6bc4
movzbl (%rax,%rcx), %ecx
movq -0x18(%rbp), %r8
leaq 0x58659(%rip), %rax     # 0x1d6bcf
movzbl (%rax,%r8), %r8d
callq 0x187720
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x17e534
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/fmtutil-fax.c
// Function: getfax34codelength
static UI getfax34codelength(UI isblack, size_t i)
{
	if(i<105) {
		if(isblack)
			return (UI)(fax34codelengths[i] & 0x0f);
		return (UI)(fax34codelengths[i] >> 4);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x69, -0x10(%rbp)
jae 0x17e5e6
cmpl $0x0, -0x8(%rbp)
je 0x17e5cf
movq -0x10(%rbp), %rcx
leaq 0x5861d(%rip), %rax     # 0x1d6be0
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movl %eax, -0x4(%rbp)
jmp 0x17e5ed
movq -0x10(%rbp), %rcx
leaq 0x58606(%rip), %rax     # 0x1d6be0
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movl %eax, -0x4(%rbp)
jmp 0x17e5ed
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/src/fmtutil-fax.c
// Function: getfax34val
static fmtutil_huffman_valtype getfax34val(size_t i)
{
	if(i<=64) {
		return (fmtutil_huffman_valtype)i;
	}
	else if(i<=103) {
		return (fmtutil_huffman_valtype)((i-63)*64);
	}
	return FAX1D_8ZEROES; // i==104, presumably
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x40, -0x10(%rbp)
ja 0x17e618
movq -0x10(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x17e639
cmpq $0x67, -0x10(%rbp)
ja 0x17e630
movq -0x10(%rbp), %rax
subq $0x3f, %rax
shlq $0x6, %rax
movl %eax, -0x4(%rbp)
jmp 0x17e639
jmp 0x17e632
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop