LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_rle90_codec_addbuf
static void my_rle90_codec_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	int i;
	u8 b;
	struct rle90ctx *rctx = (struct rle90ctx*)dfctx->codec_private;

	if(!rctx) return;

	for(i=0; i<buf_len; i++) {
		if(dfctx->dcmpro->len_known &&
			(rctx->nbytes_written >= dfctx->dcmpro->expected_len))
		{
			dfctx->finished_flag = 1;
			break;
		}

		b = buf[i];
		rctx->total_nbytes_processed++;

		if(rctx->countcode_pending && b==0) {
			// Not RLE, just an escaped 0x90 byte.
			dbuf_writebyte(dfctx->dcmpro->f, 0x90);
			rctx->nbytes_written++;
			rctx->last_output_byte = 0x90;
			rctx->countcode_pending = 0;
		}
		else if(rctx->countcode_pending) {
			i64 count;

			// RLE. We already emitted one byte (because the byte to repeat
			// comes before the repeat count), so write countcode-1 bytes.
			count = (i64)(b-1);
			if(dfctx->dcmpro->len_known &&
				(rctx->nbytes_written+count > dfctx->dcmpro->expected_len))
			{
				count = dfctx->dcmpro->expected_len - rctx->nbytes_written;
			}
			dbuf_write_run(dfctx->dcmpro->f, rctx->last_output_byte, count);
			rctx->nbytes_written += count;

			rctx->countcode_pending = 0;
		}
		else if(b==0x90) {
			rctx->countcode_pending = 1;
		}
		else {
			dbuf_writebyte(dfctx->dcmpro->f, b);
			rctx->nbytes_written++;
			rctx->last_output_byte = b;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdi), %r13
testq %r13, %r13
sete %al
testq %rdx, %rdx
setle %cl
orb %al, %cl
jne 0xfaf2f
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %ebp, %ebp
movq 0x10(%r14), %rax
movb 0x8(%rax), %cl
testb %cl, %cl
je 0xfae7c
movq 0x8(%r13), %rdx
cmpq 0x10(%rax), %rdx
jge 0xfaf2a
movb (%r15,%rbp), %dl
incq (%r13)
movl 0x14(%r13), %esi
testl %esi, %esi
setne %dil
testb %dl, %dl
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0xfaeb5
movq (%rax), %rdi
movl $0x90, %esi
callq 0xf11be
incq 0x8(%r13)
movb $-0x70, 0x10(%r13)
jmp 0xfaef0
movzbl %dl, %r12d
testl %esi, %esi
je 0xfaf06
decq %r12
testb %cl, %cl
je 0xfaedc
movq 0x8(%r13), %rcx
movq 0x10(%rax), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %r12, %rcx
cmpq %rdx, %rcx
cmovgq %rsi, %r12
movq (%rax), %rdi
movzbl 0x10(%r13), %esi
movq %r12, %rdx
callq 0xf14bd
addq %r12, 0x8(%r13)
movl $0x0, 0x14(%r13)
incq %rbp
cmpq %rbp, %rbx
jne 0xfae63
jmp 0xfaf2f
cmpb $-0x70, %dl
jne 0xfaf15
movl $0x1, 0x14(%r13)
jmp 0xfaef8
movq (%rax), %rdi
movl %r12d, %esi
callq 0xf11be
incq 0x8(%r13)
movb %r12b, 0x10(%r13)
jmp 0xfaef8
movb $0x1, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_rle90_codec_finish
static void my_rle90_codec_finish(struct de_dfilter_ctx *dfctx)
{
	struct rle90ctx *rctx = (struct rle90ctx*)dfctx->codec_private;

	if(!rctx) return;
	dfctx->dres->bytes_consumed = rctx->total_nbytes_processed;
	dfctx->dres->bytes_consumed_valid = 1;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xfaf56
movq (%rax), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x8(%rcx)
movb $0x1, 0x4(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: my_rle90_codec_destroy
static void my_rle90_codec_destroy(struct de_dfilter_ctx *dfctx)
{
	struct rle90ctx *rctx = (struct rle90ctx*)dfctx->codec_private;

	if(rctx) {
		de_free(dfctx->c, rctx);
	}
	dfctx->codec_private = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0xfaf6c
movq (%rbx), %rdi
callq 0xe9752
movq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_lz77buffer_create
struct de_lz77buffer *de_lz77buffer_create(deark *c, UI bufsize)
{
	struct de_lz77buffer *rb;

	rb = de_malloc(c, sizeof(struct de_lz77buffer));
	rb->buf = de_malloc(c, (i64)bufsize);
	rb->bufsize = bufsize;
	rb->mask = bufsize - 1;
	return rb;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x28, %esi
callq 0xe969b
movq %rax, %r15
movl %ebx, %esi
movq %r14, %rdi
callq 0xe969b
movq %rax, 0x20(%r15)
movl %ebx, 0x18(%r15)
decl %ebx
movl %ebx, 0x14(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: lzss_lz77buf_writebytecb
static void lzss_lz77buf_writebytecb(struct de_lz77buffer *rb, const u8 n)
{
	struct lzss_ctx *sctx = (struct lzss_ctx*)rb->userdata;

	if(sctx->stop_flag) return;
	if(sctx->dcmpro->len_known) {
		if(sctx->nbytes_written >= sctx->dcmpro->expected_len) {
			sctx->stop_flag = 1;
			return;
		}
	}

	dbuf_writebyte(sctx->dcmpro->f, n);
	sctx->nbytes_written++;
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
cmpl $0x0, 0x8(%rbx)
jne 0xfb330
movq 0x18(%rbx), %rax
cmpb $0x0, 0x8(%rax)
je 0xfb318
movq (%rbx), %rcx
cmpq 0x10(%rax), %rcx
jge 0xfb329
movq (%rax), %rdi
movzbl %sil, %esi
callq 0xf11be
incq (%rbx)
jmp 0xfb330
movl $0x1, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: lzss_fill_bitbuf
static void lzss_fill_bitbuf(deark *c, struct lzss_ctx *sctx)
{
	u8 b;

	if(sctx->cur_ipos+1 > sctx->endpos) {
		sctx->stop_flag = 1;
		return;
	}
	b = dbuf_getbyte_p(sctx->dcmpri->f, &sctx->cur_ipos);
	de_bitbuf_lowlevel_add_byte(&sctx->bbll, b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq 0x30(%rdi), %rax
jge 0xfb379
leaq 0x28(%rbx), %rsi
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0xef14d
addq $0x38, %rbx
movzbl %al, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xf21e9
movl $0x1, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: de_lz77buffer_copy_from_hist
void de_lz77buffer_copy_from_hist(struct de_lz77buffer *rb,
	UI startpos, UI count)
{
	UI frompos;
	UI i;

	frompos = startpos & rb->mask;
	for(i=0; i<count; i++) {
		de_lz77buffer_add_literal_byte(rb, rb->buf[frompos]);
		frompos = (frompos+1) & rb->mask;
	}
}

// Assembly:
testl %edx, %edx
je 0xfb407
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
andl 0x14(%rdi), %ebp
movq 0x20(%r14), %rax
movl %ebp, %ecx
movzbl (%rax,%rcx), %r15d
movq %r14, %rdi
movl %r15d, %esi
callq *0x8(%r14)
movq 0x20(%r14), %rax
movl 0x10(%r14), %ecx
movb %r15b, (%rax,%rcx)
movl 0x10(%r14), %eax
movl 0x14(%r14), %ecx
incl %eax
andl %ecx, %eax
movl %eax, 0x10(%r14)
incl %ebp
andl %ecx, %ebp
decl %ebx
jne 0xfb3c4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-cmpr.c
// Function: sit_huff_read_tree
static void sit_huff_read_tree(struct sit_huffctx *hctx, u64 curr_code, UI curr_code_nbits)
{
	u8 x;

	if(curr_code_nbits>FMTUTIL_HUFFMAN_MAX_CODE_LENGTH) {
		hctx->errflag = 1;
	}
	if(hctx->bitrd.eof_flag || hctx->errflag) return;

	x = (u8)de_bitreader_getbits(&hctx->bitrd, 1);
	if(hctx->bitrd.eof_flag) return;

	if(x==0) {
		sit_huff_read_tree(hctx, curr_code<<1, curr_code_nbits+1);
		if(hctx->bitrd.eof_flag || hctx->errflag) return;
		sit_huff_read_tree(hctx, (curr_code<<1) | 1, curr_code_nbits+1);
	}
	else {
		int ret;
		fmtutil_huffman_valtype val;

		val = (fmtutil_huffman_valtype)de_bitreader_getbits(&hctx->bitrd, 8);
		if(hctx->c->debug_level>=2) {
			char b2buf[72];

			de_dbg(hctx->c, "code: \"%s\" = %d",
				de_print_base2_fixed(b2buf, sizeof(b2buf), curr_code, curr_code_nbits),
				(int)val);
		}
		ret = fmtutil_huffman_add_code(hctx->c, hctx->ht->bk, curr_code, curr_code_nbits, val);
		if(!ret) {
			hctx->errflag = 1;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rdi), %r15
cmpl $0x31, %ebp
jb 0xfbda0
movl $0x1, 0x30(%rbx)
cmpb $0x0, 0x50(%rbx)
jne 0xfbe59
cmpl $0x0, 0x30(%rbx)
jne 0xfbe59
movq %r15, %rdi
movl $0x1, %esi
callq 0xf2271
cmpb $0x0, 0x50(%rbx)
jne 0xfbe59
testb %al, %al
jne 0xfbdf3
addq %r14, %r14
incl %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xfbd7c
cmpb $0x0, 0x50(%rbx)
jne 0xfbe59
cmpl $0x0, 0x30(%rbx)
jne 0xfbe59
orq $0x1, %r14
jmp 0xfbd94
movq %r15, %rdi
movl $0x8, %esi
callq 0xf2271
movq %rax, %r15
movq (%rbx), %r12
cmpl $0x2, (%r12)
jl 0xfbe36
movq %rsp, %rdi
movl $0x48, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0xea85a
leaq 0x2252e(%rip), %rsi     # 0x11e354
movq %r12, %rdi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe9226
movq (%rbx), %rdi
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x104901
testl %eax, %eax
jne 0xfbe59
movl $0x1, 0x30(%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rsi, %rsi
js 0xfc957
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpq %rsi, 0x30(%rdi)
jle 0xfc94c
movl %ecx, %ebx
cmpl $0x2f, %ecx
ja 0xfc94c
leaq (%rsi,%rsi,2), %rax
cmpb $0x0, 0x70(%r14,%rax,2)
jne 0xfc94c
movq %rdx, %r15
leaq (%r14,%rax,2), %r12
addq $0x70, %r12
movb $0x1, (%r12)
movswl 0x2(%r12), %esi
addq %rdx, %rdx
incl %ebx
movq %r14, %rdi
movl %ebx, %ecx
callq 0xfc958
movswl 0x4(%r12), %esi
leaq 0x1(,%r15,2), %rdx
movq %r14, %rdi
movl %ebx, %ecx
callq 0xfc958
movb $0x0, (%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
testw %si, %si
js 0xfc993
movzwl %si, %esi
cmpq %rsi, 0x30(%r15)
jle 0xfc9ec
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xfc8e1
movswl %si, %eax
cmpl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
jl 0xfc9ec
notl %esi
movzwl %si, %ebp
movq (%r15), %r12
cmpl $0x3, (%r12)
jl 0xfc9d4
movq %rsp, %rdi
movl $0x48, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0xea85a
leaq 0x2198f(%rip), %rsi     # 0x11e354
movq %r12, %rdi
movq %rax, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe9461
movq (%r15), %rdi
movq 0x38(%r15), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebp, %r8d
callq 0x104901
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdx, %rdx
jle 0xfca12
movq (%rdi), %rax
movb (%rax), %cl
xorl %edi, %edi
xorb (%rsi,%rdi), %cl
movb %cl, (%rax)
incq %rdi
cmpq %rdi, %rdx
jne 0xfca05
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdx, %rdx
jle 0xfca4d
movq (%rdi), %rax
movl 0x10(%rdi), %ecx
andl $0x1, %ecx
movl (%rax), %edi
xorl %r8d, %r8d
movzbl (%rsi,%r8), %r9d
movl %r9d, %r10d
shll $0x8, %r10d
testl %ecx, %ecx
cmovnel %r9d, %r10d
xorl %r10d, %edi
movl %edi, (%rax)
xorl $0x1, %ecx
incq %r8
cmpq %r8, %rdx
jne 0xfca2b
movl $0x1, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x98, %esi
callq 0xe969b
movq %rax, %r14
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x68(%r14)
movq %rbx, %rdi
callq 0xea9a9
movq %rax, 0x20(%r14)
movq %rbx, %rdi
callq 0xea9a9
movq %rax, 0x48(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0xfcaeb
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x68(%rdi), %rdi
callq 0xf6bb0
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xea9b3
movq 0x48(%rbx), %rsi
movq %r14, %rdi
callq 0xea9b3
movq 0x88(%rbx), %rsi
movq %r14, %rdi
callq 0xe9752
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x88(%rdi), %rsi
testq %rsi, %rsi
je 0xfcb1f
movq %r15, %rdi
callq 0xe9752
movq $0x0, 0x88(%rbx)
testq %r12, %r12
je 0xfcb67
movl $0x400, %esi            # imm = 0x400
cmpq %rsi, %r12
cmovbq %r12, %rsi
movq %rsi, 0x80(%rbx)
movq %r15, %rdi
callq 0xe969b
movq %rax, 0x88(%rbx)
movq 0x80(%rbx), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x181e0
movq 0x88(%rbx), %rax
cmpb $0x1f, (%rax)
ja 0xfcb67
movb $0x5f, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0xc8, %esi
callq 0xe969b
movq %rax, %r15
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %r14, %rdi
callq 0xf6870
movq %rax, 0x58(%r15)
movq %r14, %rdi
callq 0xf6870
movq %rax, 0x60(%r15)
movq %r14, %rdi
callq 0xea9a9
movq %rax, 0x50(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rsi, %rsi
je 0xfdb09
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rsi), %rdi
callq 0xf6bb0
movq 0x60(%rbx), %rdi
callq 0xf6bb0
movq 0x68(%rbx), %rdi
callq 0xf6bb0
movq 0x70(%rbx), %rdi
callq 0xf6bb0
movq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0xea9b3
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x70, %esi
callq 0xe969b
movq %rbx, (%rax)
movq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x10(%rdi), %rax
testq %rax, %rax
jle 0xfdb74
movq 0x8(%rdi), %rcx
xorl %edx, %edx
cmpl $0x5c, (%rcx,%rdx,4)
jne 0xfdb6c
movl $0x2f, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0xfdb5f
testq %rax, %rax
setle %cl
testb $0x1, %sil
sete %dl
orb %cl, %dl
jne 0xfdb90
movq 0x8(%rdi), %rcx
cmpl $0x2f, -0x4(%rcx,%rax,4)
jne 0xfdb91
retq
movl $0x2f, %esi
jmp 0xf69a2
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_read_field_orig_len_p
void de_arch_read_field_orig_len_p(struct de_arch_member_data *md, i64 *ppos)
{
	i64 n;

	n = dbuf_getu32x(md->d->inf, *ppos, md->d->is_le);
	*ppos += 4;
	handle_field_orig_len(md, n);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rdi
movq (%rsi), %rsi
movl 0x10(%rax), %edx
callq 0xef614
addq $0x4, (%rbx)
movq %rax, 0x38(%r14)
movb $0x1, 0x4c(%r14)
movq (%r14), %rdi
leaq 0x1a4e5(%rip), %rsi     # 0x1180b4
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-arch.c
// Function: de_arch_read_field_cmpr_len_p
void de_arch_read_field_cmpr_len_p(struct de_arch_member_data *md, i64 *ppos)
{
	i64 n;

	n = dbuf_getu32x(md->d->inf, *ppos, md->d->is_le);
	*ppos += 4;
	handle_field_cmpr_len(md, n);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rdi
movq (%rsi), %rsi
movl 0x10(%rax), %edx
callq 0xef614
addq $0x4, (%rbx)
movq %rax, 0x30(%r14)
movq (%r14), %rdi
leaq 0x2067c(%rip), %rsi     # 0x11e28b
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x7c(%rdi)
movb $0x1, 0x81(%rdi)
movq (%rdi), %rdi
callq 0xf6870
movq %rax, %r14
movq (%rbx), %rdi
movl 0x7c(%rbx), %esi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xeb03c
movq (%rbx), %r15
movl 0x7c(%rbx), %ebx
movq %r14, %rdi
callq 0xf7557
leaq 0x45786(%rip), %rsi     # 0x1433e8
movq %r15, %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
testq %rax, %rax
js 0xfde41
movq 0x30(%rbx), %rcx
testq %rcx, %rcx
js 0xfde41
addq %rax, %rcx
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movl $0x1, %ebp
cmpq 0x18(%rax), %rcx
jle 0xfde6b
movq %rbx, %rdi
callq 0xfde72
movq (%rbx), %r14
movq 0x60(%rbx), %rdi
callq 0xf7557
leaq 0x16cc1(%rip), %rsi     # 0x114b1d
xorl %ebp, %ebp
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
cmpb $0x0, 0x4d(%rdi)
je 0xfde7b
popq %rbx
retq
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
callq 0xf6c00
movq 0x60(%rbx), %rdi
testl %eax, %eax
je 0xfdea2
callq 0xf6883
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdi
popq %rbx
jmp 0xf6969
callq 0xf6bea
testl %eax, %eax
je 0xfde79
movq 0x60(%rbx), %rdi
leaq 0x4cac9(%rip), %rsi     # 0x14a97f
movl $0x5, %edx
popq %rbx
jmp 0xf6a40
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, 0x38(%rdi)
je 0xfe5b3
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2278(%rdi), %r14
leaq -0x1001(%r14), %rax
cmpq $-0x1000, %rax          # imm = 0xF000
jb 0xfe5f8
leaq 0x2280(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq *0x28(%rbx)
cmpq %r14, %rax
jne 0xfe5eb
addq %rax, 0x40(%rbx)
jmp 0xfe5f8
cmpl $0x0, 0x38(%rbx)
jne 0xfe5f8
movl $0x7, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leal -0x9(%rbx), %eax
cmpl $-0x8, %eax
jb 0xfe6e0
movq %rdi, %r14
cmpl %ebx, 0x64(%rdi)
jae 0xfe6f5
xorl %ebp, %ebp
cmpl $0x0, 0x38(%r14)
jne 0xfe6d9
movq 0x10(%r14), %r15
cmpq %r15, 0x48(%r14)
jge 0xfe697
movq 0x3280(%r14), %rax
cmpq 0x3288(%r14), %rax
jb 0xfe6ba
leaq 0x3280(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
subq 0x50(%r14), %r15
movl $0x400, %eax            # imm = 0x400
cmpq %rax, %r15
cmovgeq %rax, %r15
leaq -0x401(%r15), %rax
cmpq $-0x400, %rax           # imm = 0xFC00
jb 0xfe6b0
leaq 0x3290(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq *0x20(%r14)
cmpq %r15, %rax
jne 0xfe6a1
addq %r15, 0x50(%r14)
movq %r15, 0x3288(%r14)
jmp 0xfe6b0
movl $0x8, 0x38(%r14)
jmp 0xfe6d9
cmpl $0x0, 0x38(%r14)
jne 0xfe6b0
movl $0x6, 0x38(%r14)
cmpq $0x0, 0x3288(%r14)
je 0xfe6d9
movq 0x3280(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x3280(%r14)
movzbl 0x3290(%r14,%rax), %ebp
incq 0x48(%r14)
cmpl $0x0, 0x38(%r14)
je 0xfe6e4
xorl %eax, %eax
jmp 0xfe712
movl 0x64(%r14), %ecx
shll %cl, %ebp
orl %ebp, 0x60(%r14)
addl $0x8, %ecx
movl %ecx, 0x64(%r14)
movl 0x60(%r14), %edx
movb $0x8, %cl
subb %bl, %cl
movl $0xff, %eax
shrl %cl, %eax
andl %edx, %eax
movl %ebx, %ecx
shrl %cl, %edx
movl %edx, 0x60(%r14)
subl %ebx, 0x64(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq 0x2278(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x2278(%rdi)
movb %sil, 0x2280(%rdi,%rax)
cmpq $0x1000, 0x2278(%rdi) # imm = 0x1000
jb 0xfe75b
movq %rbx, %rdi
callq 0xfe5ac
movq $0x0, 0x2278(%rbx)
incq 0x58(%rbx)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-fax.c
// Function: fax34_on_eol
static void fax34_on_eol(deark *c, struct fax_ctx *fc, int is_real)
{
	i64 i;

	de_dbg3(c, "%sEOL", is_real?"":"implicit ");

	if(fc->ypos >= fc->image_height) goto done;

	// [Pack curr_row into bits (tmp_row_packed)]
	de_zeromem(fc->tmp_row_packed, (size_t)fc->rowspan_final);
	for(i=0; i<fc->image_width; i++) {
		if(fc->curr_row[i]) {
			fc->tmp_row_packed[i/8] |= 1U<<(7-i%8);
		}
	}

	// [Write tmp_row_packed to fc->dcmpro]
	dbuf_write(fc->dcmpro->f, fc->tmp_row_packed, fc->rowspan_final);
	fc->nbytes_written += fc->rowspan_final;

	if(fc->is_2d) {
		de_memcpy(fc->prev_row, fc->curr_row, (size_t)fc->image_width);
	}

	// initialize curr_row
	de_zeromem(fc->curr_row, (size_t)fc->image_width);

	fc->ypos++;
done:
	fc->a0 = -1;
	fc->a0_color = 0;
	fc->pending_run_len = 0;
	fc->f2d_h_codes_remaining = 0;
	fc->have_read_tag_bit = 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testl %edx, %edx
leaq 0x4bae4(%rip), %rax     # 0x14abe1
leaq 0x45acc(%rip), %rdx     # 0x144bd0
cmoveq %rax, %rdx
leaq 0x4bacc(%rip), %rsi     # 0x14abdb
xorl %eax, %eax
callq 0xe9461
movq 0xa8(%rbx), %rax
cmpq 0x38(%rbx), %rax
jge 0xff1c9
movq 0x88(%rbx), %rdx
movq 0x90(%rbx), %rdi
xorl %esi, %esi
callq 0x18140
cmpq $0x0, 0x30(%rbx)
jle 0xff174
xorl %eax, %eax
movq 0x78(%rbx), %rcx
cmpb $0x0, (%rcx,%rax)
je 0xff16b
movl %eax, %ecx
notb %cl
andb $0x7, %cl
movb $0x1, %dl
shlb %cl, %dl
movq 0x90(%rbx), %rcx
movq %rax, %rsi
shrq $0x3, %rsi
orb %dl, (%rcx,%rsi)
incq %rax
cmpq 0x30(%rbx), %rax
jl 0xff145
movq 0x8(%rbx), %rax
movq 0x88(%rbx), %rdx
movq (%rax), %rdi
movq 0x90(%rbx), %rsi
callq 0xefb82
movq 0x88(%rbx), %rax
addq %rax, 0x40(%rbx)
cmpb $0x0, 0x2a(%rbx)
je 0xff1b3
movq 0x80(%rbx), %rdi
movq 0x30(%rbx), %rdx
movq 0x78(%rbx), %rsi
callq 0x181e0
movq 0x30(%rbx), %rdx
movq 0x78(%rbx), %rdi
xorl %esi, %esi
callq 0x18140
incq 0xa8(%rbx)
movq $-0x1, 0xb0(%rbx)
movw $0x0, 0xb8(%rbx)
movq $0x0, 0x98(%rbx)
movl $0x0, 0xa0(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-fax.c
// Function: find_b1
static void find_b1(struct fax_ctx *fc)
{
	i64 i;

	for(i=fc->a0+1; i<fc->image_width; i++) {
		if(i<0) continue;

		// first prev_row pixel to the right of a0, of opposite color to a0_color
		if(fc->prev_row[i]==fc->a0_color) continue;

		// Looking for a "changing element". I.e. if both it and the pixel to the left
		// exist, they must have different colors.
		if(i==0) {
			// Leftmost pixel is "changing" if it is black
			if(fc->prev_row[i]==0) continue;
		}
		else {
			if(fc->prev_row[i-1] == fc->prev_row[i]) continue;
		}

		fc->b1 = i;
		return;
	}
	fc->b1 = fc->image_width;
}

// Assembly:
movq 0x30(%rdi), %rax
movq 0xb0(%rdi), %rcx
incq %rcx
cmpq %rax, %rcx
jge 0xff241
leaq -0x1(%rcx), %rdx
cmpq $-0x1, %rdx
jl 0xff234
movq 0x80(%rdi), %rsi
movb (%rsi,%rcx), %dl
cmpb 0xb8(%rdi), %dl
je 0xff234
testq %rcx, %rcx
je 0xff230
cmpb %dl, -0x1(%rsi,%rcx)
je 0xff234
jmp 0xff23e
testb %dl, %dl
jne 0xff23e
incq %rcx
cmpq %rcx, %rax
jne 0xff207
jmp 0xff241
movq %rcx, %rax
movq %rax, 0xc0(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-fax.c
// Function: fax34_record_run
static void fax34_record_run(deark *c, struct fax_ctx *fc, i64 run_len,
	int respect_negative_a0)
{
	i64 i;
	u8 color = fc->a0_color;

	de_dbg3(c, "run c=%u len=%d", (UI)color, (int)run_len);

	if(fc->a0<0) {
		if(respect_negative_a0) {
			run_len += fc->a0;
		}
		fc->a0 = 0;
	}

	if(color==0) { // Pixels are initialized to 0, don't need to set them.
		fc->a0 += run_len;
	}
	else {
		for(i=0; (i<run_len) && (fc->a0 < fc->image_width); i++) {
			fc->curr_row[fc->a0++] = color;
		}
	}

	if(fc->a0 > fc->image_width) {
		fc->a0 = fc->image_width;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movb 0xb8(%rsi), %r15b
movzbl %r15b, %edx
leaq 0x4b981(%rip), %rsi     # 0x14abeb
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe9461
movq 0xb0(%rbx), %rax
testq %rax, %rax
jns 0xff296
xorl %ecx, %ecx
testl %ebp, %ebp
cmoveq %rcx, %rax
addq %rax, %r14
movq $0x0, 0xb0(%rbx)
testb %r15b, %r15b
je 0xff2c7
testq %r14, %r14
jle 0xff2ce
movq 0xb0(%rbx), %rax
cmpq 0x30(%rbx), %rax
jge 0xff2ce
movq 0x78(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0xb0(%rbx)
movb %r15b, (%rcx,%rax)
decq %r14
jne 0xff2a0
jmp 0xff2ce
addq %r14, 0xb0(%rbx)
movq 0x30(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
jle 0xff2e2
movq %rax, 0xb0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: destroy_lzh_ctx
static void destroy_lzh_ctx(struct lzh_ctx *cctx)
{
	deark *c;

	if(!cctx) return;
	c = cctx->c;
	lzh_destroy_trees(cctx);
	if(cctx->ringbuf && !cctx->ringbuf_owned_by_caller) {
		de_lz77buffer_destroy(c, cctx->ringbuf);
		cctx->ringbuf = NULL;
	}
	if(cctx->crco) de_crcobj_destroy(cctx->crco);
	de_free(c, cctx);
}

// Assembly:
testq %rdi, %rdi
je 0xffef5
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
callq 0x10277d
movq 0x70(%rbx), %rsi
testq %rsi, %rsi
je 0xffed2
cmpl $0x0, 0x78(%rbx)
jne 0xffed2
movq %r14, %rdi
callq 0xfb408
movq $0x0, 0x70(%rbx)
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0xffee3
callq 0xebe1d
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9752
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: fmtutil_deflate_codectype1
void fmtutil_deflate_codectype1(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres,
	void *codec_private_params)
{
	struct de_deflate_params *deflparams = (struct de_deflate_params*)codec_private_params;
	int must_use_miniz = 0;
	int must_use_native = 0;

	if(!deflparams) return;

	if(deflparams->ringbuf_to_use || (deflparams->flags & DE_DEFLATEFLAG_DEFLATE64)) {
		must_use_native = 1;
	}

	if(must_use_miniz && must_use_native) return;

	if(must_use_miniz) {
		fmtutil_deflate_codectype1_miniz(c, dcmpri, dcmpro, dres, codec_private_params);
		return;
	}
	if(must_use_native) {
		fmtutil_deflate_codectype1_native(c, dcmpri, dcmpro, dres, codec_private_params);
		return;
	}

	if(c->deflate_decoder_id==0) {
		const char *o;

		o = de_get_ext_option(c, "deflatecodec");
		if(o && !de_strcmp(o, "native")) {
			c->deflate_decoder_id = 2;
		}
		else {
			c->deflate_decoder_id = 1;
		}
	}

	if(c->deflate_decoder_id==2) {
		fmtutil_deflate_codectype1_native(c, dcmpri, dcmpro, dres, codec_private_params);
	}
	else {
		fmtutil_deflate_codectype1_miniz(c, dcmpri, dcmpro, dres, codec_private_params);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %r8, %r8
je 0xfff59
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpq $0x0, 0x8(%r8)
jne 0xfff76
testb $0x4, (%rbx)
jne 0xfff76
cmpb $0x0, 0x128(%r13)
jne 0xfff6c
leaq 0x4adaa(%rip), %rsi     # 0x14acdf
movq %r13, %rdi
callq 0xea6cb
testq %rax, %rax
je 0xfff55
leaq 0x4afa6(%rip), %rsi     # 0x14aeef
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xfff63
movb $0x1, %al
jmp 0xfff65
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x2, %al
movb %al, 0x128(%r13)
cmpb $0x2, 0x128(%r13)
jne 0xfff90
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfffad
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10de48
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: fmtutil_decompress_deflate
int fmtutil_decompress_deflate(dbuf *inf, i64 inputstart, i64 inputsize, dbuf *outf,
	i64 maxuncmprsize, i64 *bytes_consumed, unsigned int flags)
{
	deark *c = inf->c;
	struct de_dfilter_results dres;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_deflate_params deflparams;

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	if(bytes_consumed) *bytes_consumed = 0;

	dcmpri.f = inf;
	dcmpri.pos = inputstart;
	dcmpri.len = inputsize;

	dcmpro.f = outf;
	if(flags & DE_DEFLATEFLAG_USEMAXUNCMPRSIZE) {
		dcmpro.len_known = 1;
		dcmpro.expected_len = maxuncmprsize;
		flags -= DE_DEFLATEFLAG_USEMAXUNCMPRSIZE;
	}

	de_zeromem(&deflparams, sizeof(struct de_deflate_params));
	deflparams.flags = flags;
	fmtutil_deflate_codectype1(c, &dcmpri, &dcmpro, &dres, (void*)&deflparams);

	if(bytes_consumed && dres.bytes_consumed_valid) {
		*bytes_consumed = dres.bytes_consumed;
	}

	if(dres.errcode != 0) {
		de_err(c, "%s", de_dfilter_get_errmsg(c, &dres));
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, %r14
movq %r8, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movl 0x100(%rsp), %r12d
movq 0x8(%rdi), %rbx
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %rbx, %rdi
callq 0xfa6e0
testq %r14, %r14
je 0x100d6e
movq $0x0, (%r14)
movq %r15, 0x30(%rsp)
movq %rbp, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
testb $0x2, %r12b
je 0x100da0
movb $0x1, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
addl $-0x2, %r12d
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movl %r12d, (%r8)
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %rbx, %rdi
callq 0xffefb
testq %r14, %r14
je 0x100dda
cmpb $0x0, 0x6c(%rsp)
je 0x100dda
movq 0x70(%rsp), %rax
movq %rax, (%r14)
cmpl $0x0, 0x68(%rsp)
je 0x100e06
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa6a8
leaq 0x13eba(%rip), %rsi     # 0x114caf
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x100e0b
movl $0x1, %ebp
movl %ebp, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: lzh_lz77buf_writebytecb
static void lzh_lz77buf_writebytecb(struct de_lz77buffer *rb, u8 n)
{
	struct lzh_ctx *cctx = (struct lzh_ctx*)rb->userdata;

	if(lzh_have_enough_output(cctx)) {
		return;
	}
	dbuf_writebyte(cctx->dcmpro->f, n);
	if(cctx->crco) lzh_update_crc(cctx, n);
	cctx->nbytes_written++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq (%rdi), %r14
movq 0x10(%r14), %rax
cmpb $0x0, 0x8(%rax)
je 0x1019d7
movq 0x28(%r14), %rcx
cmpq 0x10(%rax), %rcx
jge 0x101a03
movq (%rax), %rdi
movzbl %bl, %esi
callq 0xf11be
movq 0xc0(%r14), %rdi
testq %rdi, %rdi
je 0x1019ff
leaq 0x7(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
callq 0xebe72
incq 0x28(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: lzh_lz77buf_writebytecb_flagerrors
static void lzh_lz77buf_writebytecb_flagerrors(struct de_lz77buffer *rb, u8 n)
{
	struct lzh_ctx *cctx = (struct lzh_ctx*)rb->userdata;

	if(lzh_have_enough_output(cctx)) {
		cctx->err_flag = 1;
		return;
	}
	dbuf_writebyte(cctx->dcmpro->f, n);
	if(cctx->crco) lzh_update_crc(cctx, n);
	cctx->nbytes_written++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq (%rdi), %r14
movq 0x10(%r14), %rax
cmpb $0x0, 0x8(%rax)
je 0x101db3
movq 0x28(%r14), %rcx
cmpq 0x10(%rax), %rcx
jge 0x101de1
movq (%rax), %rdi
movzbl %bl, %esi
callq 0xf11be
movq 0xc0(%r14), %rdi
testq %rdi, %rdi
je 0x101ddb
leaq 0x7(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
callq 0xebe72
incq 0x28(%r14)
jmp 0x101de9
movl $0x1, 0x30(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: mash_lz77buf_writebytecb
static void mash_lz77buf_writebytecb(struct de_lz77buffer *rb, u8 n)
{
	struct lzh_ctx *cctx = (struct lzh_ctx*)rb->userdata;

	if(lzh_have_enough_output(cctx)) {
		// This ought to be an error, but in practice there's often an extra
		// decompressed byte that we have to ignore.
		return;
	}
	dbuf_writebyte(cctx->dcmpro->f, n);
	cctx->nbytes_written++;
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
movq 0x10(%rbx), %rax
cmpb $0x0, 0x8(%rax)
je 0x10214e
movq 0x28(%rbx), %rcx
cmpq 0x10(%rax), %rcx
jge 0x10215e
movq (%rax), %rdi
movzbl %sil, %esi
callq 0xf11be
incq 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: read_next_code_using_tree
static UI read_next_code_using_tree(struct lzh_ctx *cctx, struct lzh_tree_wrapper *tree)
{
	fmtutil_huffman_valtype val = 0;
	UI bitcount = 0;
	int ret;

	if(!tree->ht) {
		return 0;
	}

	ret = fmtutil_huffman_read_next_value(tree->ht->bk, &cctx->bitrd, &val, &bitcount);
	if(cctx->bitrd.eof_flag) {
		de_dfilter_set_errorf(cctx->c, cctx->dres, cctx->modname,
			"Unexpected end of compressed data");
		lzh_set_err_flag(cctx);
		val = 0;
		goto done;
	}
	else if(!ret) {
		de_dfilter_set_errorf(cctx->c, cctx->dres, cctx->modname,
			"Huffman decoding error");
		lzh_set_err_flag(cctx);
		val = 0;
		goto done;
	}

done:
	return (UI)val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x102763
movq %rdi, %rbx
movq 0x8(%rcx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x104b4d
cmpb $0x0, 0x50(%rbx)
je 0x10275b
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x1b9eb(%rip), %rcx     # 0x11e12a
xorl %eax, %eax
callq 0xfa71e
movb $0x1, 0x50(%rbx)
movl $0x1, 0x30(%rbx)
movl $0x0, 0x8(%rsp)
jmp 0x10275f
testl %eax, %eax
je 0x102769
movl 0x8(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x1b9d1(%rip), %rcx     # 0x11e14c
jmp 0x10273f
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: lzh_destroy_trees
static void lzh_destroy_trees(struct lzh_ctx *cctx)
{
	if(cctx->meta_tree.ht) {
		fmtutil_huffman_destroy_decoder(cctx->c, cctx->meta_tree.ht);
		cctx->meta_tree.ht = NULL;
	}
	if(cctx->literals_tree.ht) {
		fmtutil_huffman_destroy_decoder(cctx->c, cctx->literals_tree.ht);
		cctx->literals_tree.ht = NULL;
	}
	if(cctx->offsets_tree.ht) {
		fmtutil_huffman_destroy_decoder(cctx->c, cctx->offsets_tree.ht);
		cctx->offsets_tree.ht = NULL;
	}
	if(cctx->matchlengths_tree.ht) {
		fmtutil_huffman_destroy_decoder(cctx->c, cctx->matchlengths_tree.ht);
		cctx->matchlengths_tree.ht = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rsi
testq %rsi, %rsi
je 0x1027a0
movq (%rbx), %rdi
callq 0x10521e
movq $0x0, 0x90(%rbx)
movq 0x98(%rbx), %rsi
testq %rsi, %rsi
je 0x1027bf
movq (%rbx), %rdi
callq 0x10521e
movq $0x0, 0x98(%rbx)
movq 0xa0(%rbx), %rsi
testq %rsi, %rsi
je 0x1027de
movq (%rbx), %rdi
callq 0x10521e
movq $0x0, 0xa0(%rbx)
movq 0xa8(%rbx), %rsi
testq %rsi, %rsi
je 0x1027fd
movq (%rbx), %rdi
callq 0x10521e
movq $0x0, 0xa8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: lh5x_read_a_code_length
static UI lh5x_read_a_code_length(struct lzh_ctx *cctx)
{
	UI n;

	n = (UI)lzh_getbits(cctx, 3);
	if(n==7) {
		while(1) {
			UI b;

			b = (UI)lzh_getbits(cctx, 1);
			if(cctx->bitrd.eof_flag) break;
			if(b==0) break;
			n++;
			// TODO: What is the length limit?
			if(n>FMTUTIL_HUFFMAN_MAX_CODE_LENGTH) {
				lzh_set_err_flag(cctx);
				return FMTUTIL_HUFFMAN_MAX_CODE_LENGTH;
			}
		}
	}
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
movl $0x3, %esi
callq 0xf2271
movq %rax, %rbx
cmpl $0x7, %ebx
jne 0x10286e
movl $0x7, %ebx
movq %r15, %rdi
movl $0x1, %esi
callq 0xf2271
cmpb $0x0, 0x50(%r14)
movl $0x3, %ecx
jne 0x102860
movl %eax, %eax
testq %rax, %rax
je 0x102860
incl %ebx
xorl %ecx, %ecx
cmpl $0x31, %ebx
jb 0x102860
movb $0x1, 0x50(%r14)
movl $0x1, 0x30(%r14)
movl $0x1, %ecx
testl %ecx, %ecx
je 0x102825
cmpl $0x3, %ecx
je 0x10286e
movl $0x30, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: make_dclimplode_tree
static void make_dclimplode_tree(deark *c, struct lzh_ctx *cctx, struct lzh_tree_wrapper *tree,
	i64 num_codes, const u8 *codelengths)
{
	i64 i;

	tree->ht = fmtutil_huffman_create_decoder(c, num_codes, num_codes);

	for(i=0; i<num_codes; i++) {
		fmtutil_huffman_record_a_code_length(c, tree->ht->builder, (fmtutil_huffman_valtype)i,
			dclimplode_getcodelenfromarray(codelengths, (UI)i));
	}

	fmtutil_huffman_make_canonical_code(c, tree->ht->bk, tree->ht->builder,
		FMTUTIL_MCTFLAG_LEFT_ALIGN_BRANCHES | FMTUTIL_MCTFLAG_LAST_CODE_FIRST, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x105165
movq %rax, (%r15)
testq %r12, %r12
jle 0x102ac8
xorl %r13d, %r13d
movq (%r15), %rax
movq 0x10(%rax), %rsi
movl %r13d, %eax
shrl %eax
movb (%r14,%rax), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0xf, %al
testb $0x1, %r13b
movzbl %cl, %ecx
movzbl %al, %eax
cmovel %ecx, %eax
movzbl %al, %ecx
movq %rbx, %rdi
movl %r13d, %edx
callq 0x104de7
incq %r13
cmpq %r13, %r12
jne 0x102a8e
movq (%r15), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x104e5d
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: distilled_interpret_node_pair
static void distilled_interpret_node_pair(struct distilled_nodetable_decoder *ntd,
	UI nodenum, u64 currcode, UI currcode_nbits)
{
	if(ntd->err_flag) return;
	if(currcode_nbits >= FMTUTIL_HUFFMAN_MAX_CODE_LENGTH) {
		ntd->err_flag = 1;
		return;
	}
	if(nodenum > ntd->nodecount-2) {
		ntd->err_flag = 1;
		return;
	}

	if(ntd->node[nodenum].in_use || ntd->node[nodenum+1].in_use) {
		ntd->err_flag = 1;
		return;
	}

	ntd->node[nodenum].in_use = 1;
	ntd->node[nodenum+1].in_use = 1;
	distilled_interpret_dval(ntd, ntd->node[nodenum].dval, currcode<<1, currcode_nbits+1);
	distilled_interpret_dval(ntd, ntd->node[nodenum+1].dval, (currcode<<1) | 1, currcode_nbits+1);
	ntd->node[nodenum].in_use = 0;
	ntd->node[nodenum+1].in_use = 0;
}

// Assembly:
cmpb $0x0, 0xc(%rdi)
je 0x102af3
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdi, %rbx
cmpl $0x30, %ecx
jae 0x102b28
movl %esi, %r14d
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl %esi, %eax
jb 0x102b28
movl %r14d, %r12d
cmpb $0x0, 0x18(%rbx,%r12,4)
jne 0x102b28
incl %r14d
cmpb $0x0, 0x18(%rbx,%r14,4)
je 0x102b35
movb $0x1, 0xc(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movb $0x1, %al
movb %al, 0x18(%rbx,%r12,4)
movb %al, 0x18(%rbx,%r14,4)
movzwl 0x1a(%rbx,%r12,4), %esi
addq %rdx, %rdx
incl %ebp
movq %rbx, %rdi
movl %ebp, %ecx
callq 0x102b7f
movzwl 0x1a(%rbx,%r14,4), %esi
leaq 0x1(,%r15,2), %rdx
movq %rbx, %rdi
movl %ebp, %ecx
callq 0x102b7f
xorl %eax, %eax
movb %al, 0x18(%rbx,%r12,4)
movb %al, 0x18(%rbx,%r14,4)
jmp 0x102b2c
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: distilled_interpret_dval
static void distilled_interpret_dval(struct distilled_nodetable_decoder *ntd,
	UI dval, u64 currcode, UI currcode_nbits)
{
	if(ntd->err_flag) return;
	if(currcode_nbits>=FMTUTIL_HUFFMAN_MAX_CODE_LENGTH) {
		ntd->err_flag = 1;
		return;
	}

	if(dval < ntd->nodecount) {
		distilled_interpret_node_pair(ntd, dval, currcode, currcode_nbits);
	}
	else { // a leaf node
		fmtutil_huffman_valtype adj_value;

		adj_value = (fmtutil_huffman_valtype)(dval - ntd->nodecount);
		if(ntd->c->debug_level>=3) {
			de_dbg3(ntd->c, "code: \"%s\" = %d",
				de_print_base2_fixed(ntd->b2buf, sizeof(ntd->b2buf), currcode, currcode_nbits),
				(int)adj_value);
		}
		fmtutil_huffman_add_code(ntd->c, ntd->ht->bk, currcode, currcode_nbits, adj_value);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x0, 0xc(%rdi)
jne 0x102b9c
movl %ecx, %ebx
movq %rdi, %r15
cmpl $0x30, %ecx
jb 0x102ba5
movb $0x1, 0xc(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movl %esi, %ebp
subl 0x8(%r15), %ebp
jae 0x102bc5
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x102aec
movq (%r15), %r12
cmpl $0x3, (%r12)
jl 0x102bfb
leaq 0x9e8(%r15), %rdi
movl $0x48, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0xea85a
leaq 0x1b768(%rip), %rsi     # 0x11e354
movq %r12, %rdi
movq %rax, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe9461
movq (%r15), %rdi
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebp, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x104901
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/src/fmtutil-lzh.c
// Function: mash_getbit
static u8 mash_getbit(struct lzh_ctx *cctx)
{
	u8 v;

	if(cctx->err_flag) return 0;

	if(cctx->bitrd.bbll.nbits_in_bitbuf==0) {
		mash_fill_bitbuf(cctx);
	}

	v = (u8)de_bitbuf_lowlevel_get_bits(&cctx->bitrd.bbll, 1);

	return v;
}

// Assembly:
cmpl $0x0, 0x30(%rdi)
je 0x102c24
xorl %eax, %eax
retq
pushq %rbx
movq %rdi, %rsi
leaq 0x58(%rdi), %rbx
cmpl $0x0, 0x5c(%rdi)
jne 0x102c60
movq 0x40(%rsi), %rax
cmpq 0x48(%rsi), %rax
jge 0x102c59
movq 0x8(%rsi), %rax
addq $0x40, %rsi
movq (%rax), %rdi
callq 0xef14d
movzbl %al, %esi
movq %rbx, %rdi
callq 0xf21e9
jmp 0x102c60
movl $0x1, 0x30(%rsi)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xf221e
popq %rbx
retq