LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xface.c
// Function: de_run_compfacei
static void de_run_compfacei(deark *c, de_module_params *mparams)
{
	i64 image_bytes_processed = 0;
	struct compfacei_ctx *cfictx = NULL;

	cfictx = de_malloc(c, sizeof(struct compfacei_ctx));
	cfictx->img = de_bitmap_create(c, XFACE_WIDTH, XFACE_HEIGHT, 1);

	while(1) {
		if(image_bytes_processed>=(XFACE_WIDTH*XFACE_HEIGHT)/8) break;
		if(!cfi_get_next_token(c, cfictx)) {
			goto done;
		}
		if(cfictx->token_numdigits==2) {
			cfi_set_image_byte(c, cfictx, (u8)cfictx->token_val);
		}
		else { // Assume numdigits==4
			cfi_set_image_byte(c, cfictx, (u8)(cfictx->token_val>>8));
			cfi_set_image_byte(c, cfictx, (u8)(cfictx->token_val&0xff));
		}
		image_bytes_processed += cfictx->token_numdigits/2;
	}

	de_bitmap_write_to_file_finfo(cfictx->img, NULL, DE_CREATEFLAG_IS_BWIMG);
done:
	de_bitmap_destroy(cfictx->img);
	de_free(c, cfictx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x50
popq %rsi
callq 0xdecaf
movq %rax, %r14
pushq $0x30
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xe7437
movq %rax, (%r14)
movq %r14, %r15
addq $0x30, %r15
xorl %r12d, %r12d
movabsq $0x100002600, %r13      # imm = 0x100002600
pushq $0x2
popq %rbp
cmpq $0x11f, %r12            # imm = 0x11F
jg 0xccd1c
andq $0x0, 0x20(%r14)
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
leaq 0x1(%rsi), %rax
movq %rax, 0x18(%r14)
callq 0xe3eb4
cmpb $0x20, %al
ja 0xccc3f
movzbl %al, %ecx
btq %rcx, %r13
jb 0xccbef
jmp 0xccc3f
cmpq $0x1e, %rcx
ja 0xcccea
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r14)
movb %al, 0x30(%r14,%rcx)
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
leaq 0x1(%rsi), %rax
movq %rax, 0x18(%r14)
callq 0xe3eb4
leal -0x3a(%rax), %edx
movq 0x20(%r14), %rcx
cmpb $-0xb, %dl
ja 0xccc13
movl %eax, %edx
andb $-0x21, %dl
addb $-0x5b, %dl
cmpb $-0x1a, %dl
jae 0xccc13
movb $0x0, 0x30(%r14,%rcx)
cmpq $0x4, 0x20(%r14)
jb 0xcccea
cmpb $0x2c, %al
ja 0xcccea
movzbl %al, %eax
btq %rax, %r13
jae 0xccc8d
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
leaq 0x1(%rsi), %rax
movq %rax, 0x18(%r14)
callq 0xe3eb4
jmp 0xccc69
cmpq $0x2c, %rax
jne 0xcccea
xorl %eax, %eax
cmpq $0x5, 0x20(%r14)
setae %al
leal 0x2(,%rax,2), %eax
movl %eax, 0x28(%r14)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xfc8f5
movl %eax, 0x2c(%r14)
cmpl $0x2, 0x28(%r14)
je 0xcccce
movzbl %ah, %esi
movq %r14, %rdi
callq 0xcd118
movb 0x2c(%r14), %al
movzbl %al, %esi
movq %r14, %rdi
callq 0xcd118
movl 0x28(%r14), %eax
cltd
idivl %ebp
cltq
addq %rax, %r12
jmp 0xccbdd
leaq 0x67c47(%rip), %rsi     # 0x134938
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq (%r14), %rdi
callq 0xe7084
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32
movq (%r14), %rdi
pushq $0x8
popq %rdx
xorl %esi, %esi
callq 0xe70ab
jmp 0xcccfb
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xface.c
// Function: has_x_header
static int has_x_header(dbuf *f)
{
	char b[8];

	dbuf_read(f, (u8*)b, 0, 8);
	if((b[0]=='X' || b[0]=='x') &&
		(b[1]=='-') &&
		(b[2]=='F' || b[2]=='f') &&
		(b[3]=='A' || b[3]=='a') &&
		(b[4]=='C' || b[4]=='c') &&
		(b[5]=='E' || b[5]=='e') &&
		(b[6]==':') &&
		(b[7]==' ' || b[7]=='\t'))
	{
		return 1;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movq %rsp, %r14
pushq $0x8
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
movb (%r14), %al
andb $-0x21, %al
cmpb $0x58, %al
jne 0xccd93
cmpb $0x2d, 0x1(%rsp)
jne 0xccd93
movb 0x2(%rsp), %al
andb $-0x21, %al
cmpb $0x46, %al
jne 0xccd93
movb 0x3(%rsp), %al
andb $-0x21, %al
cmpb $0x41, %al
jne 0xccd93
movb 0x4(%rsp), %al
andb $-0x21, %al
cmpb $0x43, %al
jne 0xccd93
movb 0x5(%rsp), %al
andb $-0x21, %al
cmpb $0x45, %al
jne 0xccd93
cmpb $0x3a, 0x6(%rsp)
jne 0xccd93
movb 0x7(%rsp), %al
cmpb $0x20, %al
sete %cl
cmpb $0x9, %al
sete %al
orb %cl, %al
movzbl %al, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: UnCompress
static void
UnCompress(struct xfacectx *ctx, char *f, int wid, int hei, int lev)
{
	int ret;

	ret = BigPop(ctx, &gg_levels[lev][0]);
	if(ctx->errflag) return;

	switch (ret)
	{
		case WHITE :
			return;
		case BLACK :
			PopGreys(ctx, f, wid, hei);
			return;
		default :
			wid /= 2;
			hei /= 2;
			lev++;
			UnCompress(ctx, f, wid, hei, lev);
			if(ctx->errflag) return;
			UnCompress(ctx, &f[wid], wid, hei, lev);
			if(ctx->errflag) return;
			UnCompress(ctx, &f[hei * XFACE_WIDTH], wid, hei, lev);
			if(ctx->errflag) return;
			UnCompress(ctx, &f[wid + hei * XFACE_WIDTH], wid, hei, lev);
			return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, (%rsp)
movq %rdi, %r15
movslq %r8d, %r12
imulq $0x6, %r12, %rax
leaq 0x67b9f(%rip), %rsi     # 0x134960
addq %rax, %rsi
incl %r12d
movq %r15, %rdi
movq %rsi, %r14
callq 0xccf94
cmpl $0x0, 0x8(%r15)
jne 0xcce51
cmpl $0x2, %eax
je 0xcce51
testl %eax, %eax
je 0xcce60
shrl %ebp
shrl %ebx
movq %r15, %rdi
movq (%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movl %r12d, %r8d
callq 0xccd9d
cmpl $0x0, 0x8(%r15)
jne 0xcce51
movl %ebp, %esi
addq (%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
movl %ebx, %ecx
movl %r12d, %r8d
callq 0xccd9d
cmpl $0x0, 0x8(%r15)
jne 0xcce51
imull $0x30, %ebx, %r13d
movq (%rsp), %rax
leaq (%rax,%r13), %rsi
movq %r15, %rdi
movl %ebp, %edx
movl %ebx, %ecx
movl %r12d, %r8d
callq 0xccd9d
cmpl $0x0, 0x8(%r15)
jne 0xcce51
addl %ebp, %r13d
addq %r13, (%rsp)
movq %r14, %rsi
addq $0x6, %rsi
jmp 0xccdc4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq (%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcd037
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: BigMul
static void
BigMul(struct xfacectx *ctx, XFACE_WORD a)
{
	int i;
	XFACE_WORD *w;
	XFACE_COMP c;

	a &= WORDMASK;
	if ((a == 1) || (ctx->gg_B.b_words == 0))
		return;
	if (a == 0)	/* treat this as a == WORDCARRY */
	{			/* and just shift everything left a XFACE_WORD */
		if ((i = ctx->gg_B.b_words++) >= MAXWORDS - 1) {
			de_err(ctx->c, "xface: Internal error (1)");
			ctx->errflag = 1;
			return;
		}
		w = ctx->gg_B.b_word + i;
		while (i--)
		{
			*w = *(w - 1);
			w--;
		}
		*w = 0;
		return;
	}
	i = ctx->gg_B.b_words;
	w = ctx->gg_B.b_word;
	c = 0;
	while (i--)
	{
		c += (XFACE_COMP)*w * (XFACE_COMP)a;
		*(w++) = (XFACE_WORD)(c & WORDMASK);
		c >>= BITSPERWORD;
	}
	if (c)
	{
		if (ctx->gg_B.b_words++ >= MAXWORDS) {
			de_err(ctx->c, "Invalid or oversized X-Face image");
			ctx->errflag = 1;
			return;
		}
		*w = (XFACE_COMP)(c & WORDMASK);
	}
}

// Assembly:
cmpl $0x1, %esi
je 0xccf31
pushq %rbx
movq %rdi, %rbx
movslq 0x20(%rdi), %rax
testq %rax, %rax
je 0xccf30
testb %sil, %sil
je 0xccee1
movl %eax, %edx
xorl %eax, %eax
xorl %ecx, %ecx
cmpl %eax, %edx
je 0xccec0
movzbl 0x24(%rbx,%rax), %edi
imull %esi, %edi
addl %ecx, %edi
movb %dil, 0x24(%rbx,%rax)
shrl $0x8, %edi
incq %rax
movl %edi, %ecx
jmp 0xccea3
testl %ecx, %ecx
je 0xccf30
movl 0x20(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x20(%rbx)
cmpl $0x240, %edx            # imm = 0x240
jl 0xccf08
movq (%rbx), %rdi
leaq 0x67a03(%rip), %rsi     # 0x1348e2
jmp 0xccef8
leal 0x1(%rax), %ecx
movl %ecx, 0x20(%rbx)
cmpl $0x23f, %eax            # imm = 0x23F
jl 0xccf0e
movq (%rbx), %rdi
leaq 0x679d0(%rip), %rsi     # 0x1348c8
xorl %eax, %eax
callq 0xdf2a5
movl $0x1, 0x8(%rbx)
jmp 0xccf30
movb %cl, 0x24(%rbx,%rax)
jmp 0xccf30
leaq (%rbx,%rax), %rcx
addq $0x24, %rcx
negl %eax
xorl %edx, %edx
cmpl %edx, %eax
je 0xccf2c
movb -0x1(%rcx,%rdx), %sil
movb %sil, (%rcx,%rdx)
decq %rdx
jmp 0xccf1a
movb $0x0, (%rcx,%rdx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: BigAdd
static void
BigAdd(struct xfacectx *ctx, XFACE_WORD a)
{
	int i;
	XFACE_WORD *w;
	XFACE_COMP c;

	a &= WORDMASK;
	if (a == 0)
		return;
	i = 0;
	w = ctx->gg_B.b_word;
	c = a;
	while ((i < ctx->gg_B.b_words) && c)
	{
		c += (XFACE_COMP)*w;
		*w++ = (XFACE_WORD)(c & WORDMASK);
		c >>= BITSPERWORD;
		i++;
	}
	if ((i == ctx->gg_B.b_words) && c)
	{
		if (ctx->gg_B.b_words++ >= MAXWORDS) {
			de_err(ctx->c, "xface: Internal error (3)");
			ctx->errflag = 1;
			return;
		}
		*w = (XFACE_COMP)(c & WORDMASK);
	}
}

// Assembly:
testl %esi, %esi
je 0xccf93
pushq %rbx
movq %rdi, %rbx
movzbl %sil, %eax
xorl %ecx, %ecx
movl 0x20(%rbx), %edx
cmpl %edx, %ecx
jge 0xccf5e
testl %eax, %eax
je 0xccf5e
movzbl 0x24(%rbx,%rcx), %edx
addl %edx, %eax
movb %al, 0x24(%rbx,%rcx)
shrl $0x8, %eax
incq %rcx
jmp 0xccf40
cmpl %edx, %ecx
jne 0xccf92
testl %eax, %eax
je 0xccf92
leal 0x1(%rcx), %edx
movl %edx, 0x20(%rbx)
cmpl $0x240, %ecx            # imm = 0x240
jb 0xccf8e
movq (%rbx), %rdi
leaq 0x67986(%rip), %rsi     # 0x134904
xorl %eax, %eax
callq 0xdf2a5
movl $0x1, 0x8(%rbx)
jmp 0xccf92
movb %al, 0x24(%rbx,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: BigPop
static int
BigPop(struct xfacectx *ctx, const Prob *p)
{
	XFACE_WORD tmp = 0;
	int i;

	BigRSH(ctx, &tmp);
	i = 0;
	while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset))
	{
		p++;
		i++;
	}
	BigMul(ctx, p->p_range);
	if(ctx->errflag) return 0;
	BigAdd(ctx, tmp - p->p_offset);
	if(ctx->errflag) return 0;
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, 0x7(%rsp)
movl 0x20(%rdi), %eax
testl %eax, %eax
je 0xccfd0
decl %eax
movl %eax, 0x20(%rbx)
leaq 0x24(%rbx), %rdx
leaq 0x7(%rsp), %rcx
movq %rcx, %rsi
movq %rdx, %rcx
movb (%rdx), %dl
movb %dl, (%rsi)
subl $0x1, %eax
jb 0xccfd5
leaq 0x1(%rcx), %rdx
jmp 0xccfbb
leaq 0x7(%rsp), %rcx
movb $0x0, (%rcx)
movzbl 0x7(%rsp), %ebp
xorl %r15d, %r15d
movzbl 0x1(%r14,%r15,2), %ecx
cmpb %cl, %bpl
jb 0xccff6
movzbl (%r14,%r15,2), %eax
addl %eax, %ecx
cmpl %ebp, %ecx
ja 0xccffb
incq %r15
jmp 0xccfe0
movzbl %al, %esi
movq %rbx, %rdi
callq 0xcce7e
xorl %eax, %eax
cmpl $0x0, 0x8(%rbx)
jne 0xcd02c
subb 0x1(%r14,%r15,2), %bpl
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0xccf32
xorl %eax, %eax
cmpl $0x0, 0x8(%rbx)
cmovnel %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: PopGreys
static void
PopGreys(struct xfacectx *ctx, char *f, int wid, int hei)
{
	if (wid > 3)
	{
		wid /= 2;
		hei /= 2;
		PopGreys(ctx, f, wid, hei);
		if(ctx->errflag) return;
		PopGreys(ctx, &f[wid], wid, hei);
		if(ctx->errflag) return;
		PopGreys(ctx, &f[XFACE_WIDTH * hei], wid, hei);
		if(ctx->errflag) return;
		PopGreys(ctx, &f[XFACE_WIDTH * hei + wid], wid, hei);
		if(ctx->errflag) return;
	}
	else
	{
		wid = BigPop(ctx, gg_freqs);
		if(ctx->errflag) return;
		if (wid & 1)
			f[0] = 1;
		if (wid & 2)
			f[1] = 1;
		if (wid & 4)
			f[XFACE_WIDTH] = 1;
		if (wid & 8)
			f[XFACE_WIDTH + 1] = 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x4, %r15d
jl 0xcd0aa
shrl %r15d
shrl %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xcd037
cmpl $0x0, 0x8(%r14)
jne 0xcd0df
movl %r15d, %esi
addq %rbx, %rsi
movq %r14, %rdi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xcd037
cmpl $0x0, 0x8(%r14)
jne 0xcd0df
imull $0x30, %ebp, %r12d
leaq (%rbx,%r12), %rsi
movq %r14, %rdi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xcd037
cmpl $0x0, 0x8(%r14)
jne 0xcd0df
addl %r15d, %r12d
addq %r12, %rbx
jmp 0xcd04a
leaq 0x678cf(%rip), %rsi     # 0x134980
movq %r14, %rdi
callq 0xccf94
cmpl $0x0, 0x8(%r14)
jne 0xcd0df
testb $0x1, %al
je 0xcd0c7
movb $0x1, (%rbx)
testb $0x2, %al
je 0xcd0cf
movb $0x1, 0x1(%rbx)
testb $0x4, %al
je 0xcd0d7
movb $0x1, 0x30(%rbx)
testb $0x8, %al
je 0xcd0df
movb $0x1, 0x31(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/../foreign/uncompface.h
// Function: gen_helper
static void gen_helper(struct xfacectx *ctx, const u8 *arr, size_t arr_len,
	int h, int k)
{
	size_t arr_idx = 0;

	if(k<0 || h<0 || h>=(int)sizeof(ctx->gg_F)) {
		return;
	}
	arr_idx = (size_t)(k/8);
	if(arr_idx>=arr_len) {
		return;
	}
	if((arr[arr_idx]>>(7-(k%8)))&0x1) {
		ctx->gg_F[h] ^= 1;
	}
}

// Assembly:
movl %r8d, %eax
orl %ecx, %eax
js 0xcd117
movl %r8d, %eax
shrl $0x3, %eax
cmpq %rdx, %rax
jae 0xcd117
movzbl (%rsi,%rax), %eax
notb %r8b
movzbl %r8b, %edx
andl $0x7, %edx
btl %edx, %eax
jae 0xcd117
movl %ecx, %eax
xorb $0x1, 0x264(%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xface.c
// Function: cfi_set_image_byte
static void cfi_set_image_byte(deark *c, struct compfacei_ctx *cfictx, u8 ch)
{
	de_unpack_pixels_bilevel_from_byte(cfictx->img, cfictx->imgpos_x, cfictx->imgpos_y,
		ch, 8, DE_CVTF_WHITEISZERO);
	cfictx->imgpos_x += 8;
	if(cfictx->imgpos_x>=XFACE_WIDTH) {
		cfictx->imgpos_x=0;
		cfictx->imgpos_y++;
	}
}

// Assembly:
pushq %rbx
movl %esi, %ecx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
pushq $0x8
popq %r8
pushq $0x1
popq %r9
callq 0xe76a6
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
cmpq $0x28, %rax
jl 0xcd151
andq $0x0, 0x8(%rbx)
incq 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: de_module_stuffit
void de_module_stuffit(deark *c, struct deark_module_info *mi)
{
	mi->id = "stuffit";
	mi->desc = "StuffIt archive";
	mi->run_fn = de_run_stuffit;
	mi->identify_fn = de_identify_stuffit;
}

// Assembly:
leaq 0x67b2e(%rip), %rax     # 0x134c89
movq %rax, (%rsi)
leaq 0x67b2c(%rip), %rax     # 0x134c91
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xcd180
movq %rax, 0x18(%rsi)
leaq 0xa69(%rip), %rax       # 0xcdbe4
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: de_identify_stuffit
static int de_identify_stuffit(deark *c)
{
	u8 buf[9];

	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, "SIT!", 4)) {
		return 100;
	}
	if(!de_memcmp(buf, "StuffIt (", 9)) {
		if(de_getbyte(82)==0x05) return 100;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x7(%rsp), %r15
pushq $0x9
popq %rcx
movq %r15, %rsi
xorl %edx, %edx
callq 0xe3cb7
pushq $0x64
popq %rbx
cmpl $0x21544953, (%r15)     # imm = 0x21544953
je 0xcdc3c
leaq 0x676ea(%rip), %rsi     # 0x135303
leaq 0x7(%rsp), %rdi
pushq $0x9
popq %rdx
callq 0x18230
testl %eax, %eax
jne 0xcdc3a
movq 0x18(%r14), %rdi
pushq $0x52
popq %rsi
callq 0xe3eb4
cmpb $0x5, %al
je 0xcdc3c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: do_extract_folder
static void do_extract_folder(deark *c, lctx *d, struct member_data *md)
{
	dbuf *outf = NULL;
	de_finfo *fi = NULL;

	if(!md->is_folder) goto done;
	fi = de_finfo_create(c);
	fi->is_directory = 1;
	de_finfo_set_name_from_ucstring(c, fi, md->full_fname, DE_SNFLAG_FULLPATH);
	fi->original_filename_flag = 1;
	fi->timestamp[DE_TIMESTAMPIDX_MODIFY] = md->mod_time;
	fi->timestamp[DE_TIMESTAMPIDX_CREATE] = md->create_time;
	outf = dbuf_create_output_file(c, NULL, fi, 0x0);
done:
	dbuf_close(outf);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rsi)
je 0xcdcb0
movq %rsi, %r15
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r14
movb $0x1, %bpl
movb %bpl, 0x9(%rax)
movq 0x18(%r15), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xdfd55
movb %bpl, 0x8(%r14)
movups 0x80(%r15), %xmm0
movups %xmm0, 0x18(%r14)
movups 0x90(%r15), %xmm0
movups %xmm0, 0x28(%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %rdi
jmp 0xcdcb5
xorl %edi, %edi
xorl %r14d, %r14d
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xdfd24
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: do_extract_member_file
static void do_extract_member_file(deark *c, lctx *d, struct member_data *md)
{
	struct advfudata u;

	ucstring_append_ucstring(md->advf->filename, md->full_fname);
	md->advf->original_filename_flag = 1;
	md->advf->snflags = DE_SNFLAG_FULLPATH;
	de_advfile_set_orig_filename(md->advf, md->fname->sz, md->fname->sz_strlen);

	// resource fork
	if(md->rfork.cmpr_len>0) {
		de_dbg(c, "rsrc fork data at %"I64_FMT", len=%"I64_FMT,
			md->rfork.cmpr_pos, md->rfork.cmpr_len);
		md->advf->rsrcfork.fork_len = md->rfork.unc_len;
		de_dbg_indent(c, 1);
		do_pre_decompress_fork(c, d, md, &md->rfork);
		de_dbg_indent(c, -1);
	}

	// data fork
	if(md->dfork.cmpr_len>0) {
		de_dbg(c, "data fork data at %"I64_FMT", len=%"I64_FMT,
			md->dfork.cmpr_pos, md->dfork.cmpr_len);
		md->advf->mainfork.fork_len = md->dfork.unc_len;
		de_dbg_indent(c, 1);
		do_pre_decompress_fork(c, d, md, &md->dfork);
		de_dbg_indent(c, -1);
	}

	u.d = d;
	u.md = md;
	md->advf->userdata = (void*)&u;
	md->advf->writefork_cbfn = my_advfile_cbfn;
	de_advfile_run(md->advf);

	if(md->advf->rsrcfork.fork_exists) {
		do_post_decompress_fork(c, d, md, &md->rfork);
	}
	if(md->advf->mainfork.fork_exists) {
		do_post_decompress_fork(c, d, md, &md->dfork);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdx), %rax
movq 0x18(%rdx), %rsi
movq 0x68(%rax), %rdi
callq 0xead71
movq 0x8(%rbx), %rdi
movb $0x1, 0x79(%rdi)
movl $0x1, 0x70(%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
callq 0xf0864
leaq 0xa0(%rbx), %r12
movq 0xc0(%rbx), %rcx
testq %rcx, %rcx
jle 0xcdd77
movq 0xb8(%rbx), %rdx
leaq 0x6729b(%rip), %rsi     # 0x134fd2
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x8(%rbx), %rax
movq 0xb0(%rbx), %rcx
movq %rcx, 0x40(%rax)
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xce583
pushq $-0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
leaq 0xe0(%rbx), %r13
movq 0x100(%rbx), %rcx
testq %rcx, %rcx
jle 0xcddd8
movq 0xf8(%rbx), %rdx
leaq 0x67259(%rip), %rsi     # 0x134ff1
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x8(%rbx), %rax
movq 0xf0(%rbx), %rcx
movq %rcx, 0x18(%rax)
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xce583
pushq $-0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
movq %rsp, %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rdi)
leaq 0x8d4(%rip), %rax       # 0xce6c5
movq %rax, 0x60(%rdi)
callq 0xf08e8
movq 0x8(%rbx), %rax
cmpb $0x0, 0x38(%rax)
je 0xcde19
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0xce6fd
movq 0x8(%rbx), %rax
cmpb $0x0, 0x10(%rax)
je 0xcde30
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xce6fd
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: decode_cmpr_meth
static void decode_cmpr_meth(deark *c, lctx *d, struct fork_data *fk,
	de_ucstring *s)
{
	const char *name = NULL;
	u8 cmpr = fk->cmpr_meth_etc;

	if(d->file_fmt==1 && cmpr<32 && (cmpr & 16)) {
		fk->is_encrypted = 1;
		cmpr -= 16;
	}

	if(d->file_fmt==2 || cmpr<16) {
		fk->is_a_file = 1;
		fk->cmpr_meth = cmpr;
	}

	if(fk->is_a_file) {
		fk->cmi = find_cmpr_meth_info(c, fk->cmpr_meth);
	}

	if(fk->cmi) {
		name = fk->cmi->name;
	}
	else if(d->file_fmt==1 && fk->cmpr_meth_etc==32) {
		name = "folder";
	}
	else if(d->file_fmt==1 && fk->cmpr_meth_etc==33) {
		name = "end of folder marker";
	}

	if(!name) name="?";
	ucstring_append_flags_item(s, name);
	if(d->file_fmt==1 && fk->is_encrypted) {
		ucstring_append_flags_item(s, "encrypted");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb 0x1(%rsi), %al
movl (%rdi), %ecx
cmpl $0x1, %ecx
setne %dl
movl %eax, %esi
andb $-0x10, %sil
cmpb $0x10, %sil
setne %sil
orb %dl, %sil
je 0xcde8e
cmpl $0x2, %ecx
sete %dl
cmpb $0x10, %al
setb %sil
orb %dl, %sil
movl %eax, %edx
cmpb $0x1, %sil
je 0xcde96
cmpb $0x0, 0x2(%r14)
jne 0xcde9f
movq 0x30(%r14), %rdx
jmp 0xcded1
movb $0x1, 0x4(%r14)
leal -0x10(%rax), %edx
movb $0x1, 0x2(%r14)
movb %dl, 0x3(%r14)
movb 0x3(%r14), %sil
xorl %edx, %edx
leaq 0xc2f54(%rip), %rdi     # 0x190e00
xorl %r8d, %r8d
leaq 0x18(%r8), %r9
cmpq $0x108, %r9             # imm = 0x108
je 0xcdecd
cmpb %sil, (%r8,%rdi)
movq %r9, %r8
jne 0xcdeaf
leaq (%r9,%rdi), %rdx
addq $-0x18, %rdx
movq %rdx, 0x30(%r14)
testq %rdx, %rdx
je 0xcdedc
movq 0x8(%rdx), %rcx
jmp 0xcdf01
cmpl $0x1, %ecx
je 0xcdee5
xorl %ecx, %ecx
jmp 0xcdf01
cmpb $0x20, %al
jne 0xcdef2
leaq 0x3eff9(%rip), %rcx     # 0x10cee9
jmp 0xcdf01
xorl %ecx, %ecx
cmpb $0x21, %al
leaq 0x66f65(%rip), %rax     # 0x134e62
cmoveq %rax, %rcx
testq %rcx, %rcx
leaq 0x50fd6(%rip), %rsi     # 0x11eee1
cmovneq %rcx, %rsi
movq %rbx, %rdi
callq 0xeb884
cmpl $0x1, (%r15)
jne 0xcdf38
cmpb $0x0, 0x4(%r14)
je 0xcdf38
leaq 0x66f4c(%rip), %rsi     # 0x134e77
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xeb884
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: do_post_decompress_fork
static void do_post_decompress_fork(deark *c, lctx *d, struct member_data *md,
	struct fork_data *frk)
{
	u32 crc_calc;

	if(!frk->decompress_succeeded) goto done;

	if(frk->is_rsrc_fork) {
		crc_calc = de_crcobj_getval(d->crco_rfork);
	}
	else {
		crc_calc = de_crcobj_getval(d->crco_dfork);
	}
	de_dbg(c, "%s crc (calculated): 0x%04x", frk->forkname, (unsigned int)crc_calc);
	if(crc_calc != frk->crc_reported) {
		de_err(c, "CRC check failed for file %s[%s fork]", ucstring_getpsz_d(md->full_fname),
			frk->forkname);
	}
done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x38(%rcx)
je 0xce744
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
xorl %eax, %eax
cmpb $0x0, (%rcx)
sete %al
movq 0x28(%rsi,%rax,8), %rdi
callq 0xe0e95
movl %eax, %ebp
movq 0x28(%r14), %rdx
leaq 0x53f32(%rip), %rsi     # 0x122664
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
cmpl 0x8(%r14), %ebp
jne 0xce74f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r15), %rdi
callq 0xeb877
movq 0x28(%r14), %rcx
leaq 0x66901(%rip), %rsi     # 0x135064
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xdf2a5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/stuffit.c
// Function: do_main_decompress_fork
static void do_main_decompress_fork(deark *c, lctx *d, struct member_data *md,
	struct fork_data *frk, dbuf *outf)
{
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	if(!frk || !frk->cmi || !frk->cmi->decompressor) {
		goto done;
	}

	de_dbg(c, "decompressing %s fork", frk->forkname);
	de_dbg_indent(c, 1);

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = frk->cmpr_pos;
	dcmpri.len = frk->cmpr_len;
	dcmpro.f = outf;
	dcmpro.len_known = 1;
	dcmpro.expected_len = frk->unc_len;
	frk->cmi->decompressor(c, &dcmpri, &dcmpro, &dres);
	dbuf_flush(dcmpro.f);
	if(dres.errcode) {
		de_err(c, "Decompression failed for file %s[%s fork]: %s", ucstring_getpsz_d(md->full_fname),
			frk->forkname, de_dfilter_get_errmsg(c, &dres));
		goto done;
	}
	frk->decompress_succeeded = 1;

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
callq 0xdebae
testq %r14, %r14
je 0xce88a
movq 0x30(%r14), %rax
testq %rax, %rax
je 0xce88a
cmpq $0x0, 0x10(%rax)
je 0xce88a
movq 0x28(%r14), %rdx
leaq 0x3938a(%rip), %rsi     # 0x107b57
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
leaq 0x88(%rsp), %r13
leaq 0x70(%rsp), %rbp
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xee7ee
movq 0x18(%rbx), %rax
movq %rax, (%r13)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x8(%r13)
movq %r12, (%rbp)
movb $0x1, 0x8(%rbp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbp)
movq 0x30(%r14), %rax
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x10(%rsp), %rcx
callq *0x10(%rax)
movq (%rbp), %rdi
callq 0xe58e8
leaq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
je 0xce885
movq 0x18(%r15), %rdi
callq 0xeb877
movq %rax, %r15
movq 0x28(%r14), %r14
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xee7bc
leaq 0x3931e(%rip), %rsi     # 0x107b8e
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xdf2a5
jmp 0xce88a
movb $0x1, 0x38(%r14)
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sis.c
// Function: de_module_sis
void de_module_sis(deark *c, struct deark_module_info *mi)
{
	mi->id = "sis";
	mi->desc = "SIS (EPOC/Symbian installation archive)";
	mi->run_fn = de_run_sis;
	mi->identify_fn = de_identify_sis;
}

// Assembly:
leaq 0x47d9d(%rip), %rax     # 0x117190
movq %rax, (%rsi)
leaq 0x65f2a(%rip), %rax     # 0x135327
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xcf418
movq %rax, 0x18(%rsi)
leaq 0xf76(%rip), %rax       # 0xd0389
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sis.c
// Function: de_identify_sis
static int de_identify_sis(deark *c)
{
	if(!dbuf_memcmp(c->infile, 8, "\x19\x04\x00\x10", 4)) {
		if(!dbuf_memcmp(c->infile, 4, "\x6d\x00\x00\x10", 4))
			return 100;
		if(!dbuf_memcmp(c->infile, 4, "\x12\x3a\x00\x10", 4))
			return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x654fe(%rip), %rdx     # 0x135898
pushq $0x8
popq %rsi
pushq $0x4
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0xd03b4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x18(%rbx), %rdi
leaq 0x654de(%rip), %rdx     # 0x13589d
pushq $0x4
popq %rcx
movq %rcx, %rsi
callq 0xe4d48
pushq $0x64
popq %rbp
testl %eax, %eax
je 0xd03ab
movq 0x18(%rbx), %rdi
leaq 0x654c6(%rip), %rdx     # 0x1358a2
pushq $0x4
popq %rcx
movq %rcx, %rsi
callq 0xe4d48
testl %eax, %eax
jne 0xd03a9
jmp 0xd03ab
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sis.c
// Function: read_sis_string
static void read_sis_string(deark *c, lctx *d, de_ucstring *s,
	i64 pos, i64 len)
{
	if(d->options & 0x0001) {
		dbuf_read_to_ucstring_n(c->infile, pos, len, 512*2, s, 0, DE_ENCODING_UTF16LE);
	}
	else {
		dbuf_read_to_ucstring_n(c->infile, pos, len, 512, s, 0, DE_ENCODING_WINDOWS1252);
	}
}

// Assembly:
pushq %rax
movq %r8, %rax
movq %rcx, %r9
movq %rdx, %r8
testb $0x1, 0x8(%rsi)
movq 0x18(%rdi), %rdi
jne 0xd040f
movl $0x9, (%rsp)
movl $0x200, %ecx            # imm = 0x200
jmp 0xd041b
movl $0x3, (%rsp)
movl $0x400, %ecx            # imm = 0x400
movq %r9, %rsi
movq %rax, %rdx
xorl %r9d, %r9d
callq 0xe4ced
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sauce.c
// Function: de_module_sauce
void de_module_sauce(deark *c, struct deark_module_info *mi)
{
	mi->id = "sauce";
	mi->desc = "SAUCE metadata";
	mi->run_fn = de_run_sauce;
	mi->identify_fn = de_identify_sauce;
	mi->flags |= DE_MODFLAG_HIDDEN | DE_MODFLAG_SHAREDDETECTION;
}

// Assembly:
leaq 0x654f1(%rip), %rax     # 0x135924
movq %rax, (%rsi)
leaq 0x654ed(%rip), %rax     # 0x13592a
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0xd045c
movq %rax, 0x18(%rsi)
leaq 0x112(%rip), %rax       # 0xd0565
movq %rax, 0x20(%rsi)
orb $0x11, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sauce.c
// Function: de_run_sauce
static void de_run_sauce(deark *c, de_module_params *mparams)
{
	if(c->module_disposition==DE_MODDISP_INTERNAL) {
		run_sauce_as_submodule(c, mparams);
	}
	else {
		run_sauce_direct(c, mparams);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x3, 0x24(%rdi)
jne 0xd048b
testq %rsi, %rsi
je 0xd0505
movq 0x68(%rsi), %rdx
testq %rdx, %rdx
je 0xd0505
xorl %r14d, %r14d
jmp 0xd0513
movq 0x18(%rbx), %rsi
leaq 0xd(%rsp), %r14
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xec67d
cmpb $0x0, (%r14)
je 0xd0532
movq %rbx, %rdi
callq 0xec762
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xd058a
movl %eax, %ebp
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
testl %ebp, %ebp
je 0xd0551
cmpl $0x1, 0x24(%rbx)
jne 0xd0551
movzbl 0x38(%r14), %edx
movzbl 0x39(%r14), %ecx
leaq 0x65643(%rip), %rsi     # 0x135b3c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0xd0551
movq %rbx, %rdi
callq 0xec762
movq %rax, %r14
movq %rax, %rdx
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
callq 0xd058a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xec76a
cmpl $0x2, 0x24(%rbx)
jne 0xd054e
leaq 0x655e7(%rip), %rsi     # 0x135b26
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0xd0551
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xec76a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/sauce.c
// Function: sauce_get_string_length
static i64 sauce_get_string_length(const u8 *buf, i64 len, int respect_trailing_spaces)
{
	i64 i;
	i64 last_nonpadding_char_pos = -1;

	for(i=len-1; i>=0; i--) {
		// Spec says to use spaces for padding, and for nonexistent data.
		// But some files use NUL bytes.
		if((buf[i]==0x20 && !respect_trailing_spaces) || buf[i]==0x00) {
			;
		}
		else {
			last_nonpadding_char_pos = i;
			break;
		}
	}
	return last_nonpadding_char_pos+1;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
jle 0xd0f6d
testl %edx, %edx
sete %cl
movb -0x1(%rdi,%rsi), %r9b
decq %rsi
cmpb $0x20, %r9b
sete %r8b
testb %r9b, %r9b
je 0xd0f43
andb %r8b, %cl
jne 0xd0f43
incq %rsi
movq %rsi, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_module_base16
void de_module_base16(deark *c, struct deark_module_info *mi)
{
	mi->id = "base16";
	mi->id_alias[0] = "hex";
	mi->desc = "Base16";
	mi->run_fn = de_run_base16;
}

// Assembly:
leaq 0x64c3d(%rip), %rax     # 0x135bb4
movq %rax, (%rsi)
leaq 0x67453(%rip), %rax     # 0x1383d4
movq %rax, 0x38(%rsi)
leaq 0x64c2f(%rip), %rax     # 0x135bbb
movq %rax, 0x8(%rsi)
leaq 0x5(%rip), %rax         # 0xd0f9c
movq %rax, 0x18(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_run_base64
static void de_run_base64(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	dbuf *f = NULL;

	d = de_malloc(c, sizeof(lctx));

	f = dbuf_create_output_file(c, "bin", NULL, 0);
	do_base64_internal(c, d, 0, f);

	dbuf_close(f);
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x38
popq %rsi
callq 0xdecaf
movq %rax, %r14
leaq 0x574c5(%rip), %rsi     # 0x1284dd
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xd16fb
movq %r15, %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_module_uuencode
void de_module_uuencode(deark *c, struct deark_module_info *mi)
{
	mi->id = "uuencode";
	mi->desc = "UUEncode";
	mi->run_fn = de_run_uuencode;
	mi->identify_fn = de_identify_uuencode;
}

// Assembly:
leaq 0x64b7a(%rip), %rax     # 0x135bd0
movq %rax, (%rsi)
leaq 0x64b79(%rip), %rax     # 0x135bd9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd107b
movq %rax, 0x18(%rsi)
leaq 0x105(%rip), %rax       # 0xd117b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_run_uuencode
static void de_run_uuencode(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	dbuf *f = NULL;
	struct uu_hdr_parser *uuhp = NULL;
	int ret;

	uuhp = de_malloc(c, sizeof(struct uu_hdr_parser));
	d = de_malloc(c, sizeof(lctx));

	d->fi = de_finfo_create(c);
	ret = uuencode_read_header(c, uuhp, d->fi, 0);
	if(!ret) goto done;

	if(uuhp->hdr_line_type==HDR_UUENCODE_BASE64) {
		de_declare_fmt(c, "Base64 with uuencode wrapper");
		d->data_fmt = FMT_BASE64;
		f = dbuf_create_output_file(c, NULL, d->fi, 0);
		do_base64_internal(c, d, uuhp->data_startpos, f);
	}
	else {
		de_declare_fmt(c, "Uuencoded");
		d->data_fmt = FMT_UUENCODE;
		f = dbuf_create_output_file(c, NULL, d->fi, 0);
		do_uudecode_internal(c, d, uuhp, f);
	}

done:
	dbuf_close(f);
	if(uuhp) {
		de_free(c, uuhp);
	}
	if(d) {
		de_finfo_destroy(c, d->fi);
		de_free(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rsi
callq 0xdecaf
movq %rax, %r15
pushq $0x38
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, 0x30(%r14)
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xd1909
testl %eax, %eax
je 0xd1141
cmpl $0xc, (%r15)
jne 0xd1106
leaq 0x64b7d(%rip), %rsi     # 0x135c4c
movq %rbx, %rdi
callq 0xe07f7
movl $0x1, 0xc(%r14)
movq 0x30(%r14), %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r12
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0xd16fb
jmp 0xd1141
leaq 0x64b5c(%rip), %rsi     # 0x135c69
movq %rbx, %rdi
callq 0xe07f7
movl $0x2, 0xc(%r14)
movq 0x30(%r14), %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xd1a70
movq %r12, %rdi
callq 0xe5591
testq %r15, %r15
je 0xd1159
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xdfd24
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_identify_uuencode
static int de_identify_uuencode(deark *c)
{
	u8 b[17];
	i64 pos;
	int retval = 0;
	struct uu_hdr_parser *uuhp;

	pos = bom_length(c);
	de_read(b, pos, sizeof(b));

	if(!de_memcmp(b, "begin-base64 ", 13)) {
		return 100;
	}
	if(!de_memcmp(b, "begin ", 6)) {
		if(b[9]==' ' && de_is_digit_string(&b[6], 3)) {
			// This needs to be lower than XXEncode.
			return 85;
		}
	}

	if(!de_input_file_has_ext(c, "uue") &&
		!de_input_file_has_ext(c, "uu"))
	{
		return 0;
	}

	// For some extensions, do detection the slow way.
	uuhp = de_malloc(c, sizeof(struct uu_hdr_parser));
	uuencode_read_header(c, uuhp, NULL, 1);
	if(uuhp->hdr_line_type==HDR_UUENCODE_OR_XXENCODE) {
		retval = 19;
	}
	else if(uuhp->hdr_line_type==HDR_UUENCODE_BASE64) {
		retval = 19;
	}
	de_free(c, uuhp);

	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0xd1c35
movq 0x18(%rbx), %rdi
movq %rsp, %r14
pushq $0x11
popq %rcx
movq %r14, %rsi
movq %rax, %rdx
callq 0xe3cb7
leaq 0x64ad1(%rip), %rsi     # 0x135c7a
pushq $0xd
popq %rdx
movq %r14, %rdi
callq 0x18230
testl %eax, %eax
je 0xd1257
leaq 0x64ab0(%rip), %rsi     # 0x135c73
movq %rsp, %rdi
pushq $0x6
popq %rdx
callq 0x18230
testl %eax, %eax
jne 0xd11f3
cmpb $0x20, 0x9(%rsp)
jne 0xd11f3
xorl %eax, %eax
pushq $0x55
popq %rbp
cmpq $0x3, %rax
je 0xd125a
movb 0x6(%rsp,%rax), %cl
addb $-0x3a, %cl
incq %rax
cmpb $-0xb, %cl
ja 0xd11de
leaq 0x64b16(%rip), %rsi     # 0x135d10
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
jne 0xd1219
leaq 0x64b07(%rip), %rsi     # 0x135d14
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0xd1267
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xd1909
movl (%r14), %eax
addl $-0xb, %eax
cmpl $0x2, %eax
pushq $0x13
popq %rbp
cmovael %r15d, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
jmp 0xd125a
pushq $0x64
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0xd125a
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_module_xxencode
void de_module_xxencode(deark *c, struct deark_module_info *mi)
{
	mi->id = "xxencode";
	mi->desc = "XXEncode";
	mi->run_fn = de_run_xxencode;
	mi->identify_fn = de_identify_xxencode;
}

// Assembly:
leaq 0x64970(%rip), %rax     # 0x135be2
movq %rax, (%rsi)
leaq 0x6496f(%rip), %rax     # 0x135beb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd1297
movq %rax, 0x18(%rsi)
leaq 0xcc(%rip), %rax        # 0xd135e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_run_xxencode
static void de_run_xxencode(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	dbuf *f = NULL;
	struct uu_hdr_parser *uuhp = NULL;
	int ret;

	uuhp = de_malloc(c, sizeof(struct uu_hdr_parser));
	d = de_malloc(c, sizeof(lctx));

	d->fi = de_finfo_create(c);
	ret = uuencode_read_header(c, uuhp, d->fi, 0);
	if(!ret) goto done;
	if(uuhp->hdr_line_type!=HDR_UUENCODE_OR_XXENCODE) goto done;

	de_declare_fmt(c, "XXEncoded");
	f = dbuf_create_output_file(c, NULL, d->fi, 0);
	d->data_fmt = FMT_XXENCODE;
	do_uudecode_internal(c, d, uuhp, f);

done:
	dbuf_close(f);
	if(uuhp) {
		de_free(c, uuhp);
	}
	if(d) {
		de_finfo_destroy(c, d->fi);
		de_free(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rsi
callq 0xdecaf
movq %rax, %r15
pushq $0x38
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, 0x30(%r14)
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xd1909
testl %eax, %eax
je 0xd1324
cmpl $0xb, (%r15)
jne 0xd1321
leaq 0x64a2c(%rip), %rsi     # 0x135d17
movq %rbx, %rdi
callq 0xe07f7
movq 0x30(%r14), %rdx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r12
movl $0x3, 0xc(%r14)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xd1a70
jmp 0xd1324
xorl %r12d, %r12d
movq %r12, %rdi
callq 0xe5591
testq %r15, %r15
je 0xd133c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xdfd24
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_identify_xxencode
static int de_identify_xxencode(deark *c)
{
	int retval = 0;
	struct uu_hdr_parser *uuhp;

	// XXEncode is hard to distinguish from UUEncode, so we rely on the
	// filename.
	if(!de_input_file_has_ext(c, "xxe") &&
		!de_input_file_has_ext(c, "xx"))
	{
		return 0;
	}

	uuhp = de_malloc(c, sizeof(struct uu_hdr_parser));
	uuencode_read_header(c, uuhp, NULL, 1);
	if(uuhp->hdr_line_type==HDR_UUENCODE_OR_XXENCODE) {
		retval = (uuhp->hdr_line_startpos<=3) ? 90 : 20;
	}
	de_free(c, uuhp);

	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x649b4(%rip), %rsi     # 0x135d21
callq 0xdfcd5
testl %eax, %eax
jne 0xd1389
leaq 0x649a8(%rip), %rsi     # 0x135d25
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0xd13d4
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
xorl %r14d, %r14d
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xd1909
cmpl $0xb, (%r15)
jne 0xd13c0
cmpq $0x4, 0x8(%r15)
pushq $0x5a
popq %rax
pushq $0x14
popq %r14
cmovll %eax, %r14d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %r14d, %r14d
jmp 0xd13cb
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: de_module_ascii85
void de_module_ascii85(deark *c, struct deark_module_info *mi)
{
	mi->id = "ascii85";
	mi->desc = "Ascii85";
	mi->run_fn = de_run_ascii85;
	mi->identify_fn = de_identify_ascii85;
}

// Assembly:
leaq 0x64814(%rip), %rax     # 0x135bf4
movq %rax, (%rsi)
leaq 0x64812(%rip), %rax     # 0x135bfc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xd1405
movq %rax, 0x18(%rsi)
leaq 0x2db(%rip), %rax       # 0xd16db
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: do_base64_internal
static void do_base64_internal(deark *c, lctx *d, i64 pos, dbuf *outf)
{
	u8 b;
	int found_terminator = 0;
	int bad_warned = 0;

	d->cbuf_count = 0;
	while(pos<c->infile->len) {
		b = de_getbyte(pos++);
		if(b>='A' && b<='Z') {
			d->cbuf[d->cbuf_count++] = b-65;
		}
		else if(b>='a' && b<='z') {
			d->cbuf[d->cbuf_count++] = b-71;
		}
		else if(b>='0' && b<='9') {
			d->cbuf[d->cbuf_count++] = b+4;
		}
		else if(b=='+') {
			d->cbuf[d->cbuf_count++] = 62;
		}
		else if(b=='/') {
			d->cbuf[d->cbuf_count++] = 63;
		}
		else if(b=='=') {
			found_terminator = 1;
			break;
		}
		else if(b==9 || b==10 || b==13 || b==32) {
			; // ignore whitespace
		}
		else {
			if(!bad_warned) {
				de_warn(c, "Bad Base64 character(s) found (offset %d)", (int)pos);
				bad_warned = 1;
			}
		}

		if(d->cbuf_count>=4) {
			do_base64_flush(c, d, outf, 3);
		}
	}

	if(d->cbuf_count>0) {
		if(!found_terminator || d->cbuf_count==1) {
			de_warn(c, "Unexpected end of Base64 data");
		}
		do_base64_flush(c, d, outf, 3);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
andl $0x0, (%rsi)
pushq $0x3
popq %r13
movl $0x0, 0x4(%rsp)
movq 0x18(%r15), %rdi
movq 0x18(%rdi), %rbp
cmpq %rbp, %r12
jge 0xd1808
movq %r12, %rsi
callq 0xe3eb4
leal -0x41(%rax), %edx
cmpb $0x19, %dl
ja 0xd1752
movl (%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movb %dl, 0x4(%r14,%rax)
jmp 0xd1776
leal -0x61(%rax), %ecx
cmpb $0x19, %cl
ja 0xd175e
addb $-0x47, %al
jmp 0xd1768
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0xd178e
addb $0x4, %al
movl (%r14), %edx
leal 0x1(%rdx), %ecx
movl %ecx, (%r14)
movb %al, 0x4(%r14,%rdx)
cmpl $0x4, %ecx
jb 0xd1789
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xd1858
incq %r12
jmp 0xd1721
cmpb $0x2b, %al
je 0xd17d8
movzbl %al, %ecx
cmpl $0x2f, %ecx
je 0xd17c7
cmpl $0x3d, %ecx
je 0xd1808
cmpl $0x0, 0x4(%rsp)
jne 0xd17c2
cmpb $0x20, %al
ja 0xd17e9
movl $0x0, 0x4(%rsp)
movabsq $0x100002600, %rax      # imm = 0x100002600
btq %rcx, %rax
jae 0xd17e9
movl (%r14), %ecx
jmp 0xd1776
movl (%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movb $0x3f, 0x4(%r14,%rax)
jmp 0xd1776
movl (%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movb $0x3e, 0x4(%r14,%rax)
jmp 0xd1776
leal 0x1(%r12), %edx
movq %r15, %rdi
leaq 0x6440c(%rip), %rsi     # 0x135c04
xorl %eax, %eax
callq 0xdf05a
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
jmp 0xd17c2
movl (%r14), %eax
testl %eax, %eax
je 0xd1849
cmpq %rbp, %r12
setl %cl
cmpl $0x1, %eax
setne %al
testb %al, %cl
jne 0xd1830
leaq 0x64408(%rip), %rsi     # 0x135c2e
movq %r15, %rdi
xorl %eax, %eax
callq 0xdf05a
pushq $0x3
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd1858
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: do_base64_flush
static i64 do_base64_flush(deark *c, lctx *d, dbuf *f, i64 max_to_write)
{
	i64 bytes_written = 0;

	if(d->cbuf_count>=2 && bytes_written<max_to_write) {
		dbuf_writebyte(f, (u8)((d->cbuf[0]<<2)|(d->cbuf[1]>>4)));
		bytes_written++;
	}
	if(d->cbuf_count>=3 && bytes_written<max_to_write) {
		dbuf_writebyte(f, (u8)((d->cbuf[1]<<4)|(d->cbuf[2]>>2)));
		bytes_written++;
	}
	if(d->cbuf_count>=4 && bytes_written<max_to_write) {
		dbuf_writebyte(f, (u8)((d->cbuf[2]<<6)|d->cbuf[3]));
		bytes_written++;
	}
	d->cbuf_count=0;
	return bytes_written;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
setb %cl
testq %rdx, %rdx
setle %dl
orb %cl, %dl
jne 0xd189c
movb 0x4(%rbx), %al
movb 0x5(%rbx), %cl
shlb $0x2, %al
shrb $0x4, %cl
orb %al, %cl
movzbl %cl, %esi
movq %r14, %rdi
callq 0xe5bc5
movl (%rbx), %eax
pushq $0x1
popq %r12
jmp 0xd189f
xorl %r12d, %r12d
cmpl $0x3, %eax
setb %cl
cmpq %r15, %r12
setge %dl
orb %cl, %dl
jne 0xd18cd
movb 0x5(%rbx), %al
movb 0x6(%rbx), %cl
shlb $0x4, %al
shrb $0x2, %cl
orb %al, %cl
movzbl %cl, %esi
movq %r14, %rdi
callq 0xe5bc5
incq %r12
movl (%rbx), %eax
cmpl $0x4, %eax
setae %al
cmpq %r15, %r12
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd18f7
movb 0x6(%rbx), %al
shlb $0x6, %al
orb 0x7(%rbx), %al
movzbl %al, %esi
movq %r14, %rdi
callq 0xe5bc5
incq %r12
andl $0x0, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/xfer.c
// Function: uuencode_read_header
static int uuencode_read_header(deark *c, struct uu_hdr_parser *uuhp, de_finfo *fi,
	int id_mode)
{
	int ret;
	i64 total_len;
	i64 line_count;
	u8 linebuf[500];
	i64 nbytes_in_linebuf;

	uuhp->hdr_line_startpos = bom_length(c);
	line_count=0;
	while(line_count<100) {
		ret = dbuf_find_line(c->infile, uuhp->hdr_line_startpos,
			&uuhp->hdr_line_len, &total_len);
		if(!ret) return 0;
		if(uuhp->hdr_line_len > 1000) return 0;

		nbytes_in_linebuf = (i64)sizeof(linebuf);
		if(uuhp->hdr_line_len < nbytes_in_linebuf)
			nbytes_in_linebuf = uuhp->hdr_line_len;
		de_read(linebuf, uuhp->hdr_line_startpos, nbytes_in_linebuf);

		uuhp->data_startpos = uuhp->hdr_line_startpos + total_len;

		if(nbytes_in_linebuf>=9 && !de_memcmp(linebuf, "begin ", 6)) {
			uuhp->hdr_line_type = HDR_UUENCODE_OR_XXENCODE;
			if(fi && !id_mode) {
				parse_begin_line(c, uuhp, fi, linebuf, nbytes_in_linebuf);
			}
			return 1;
		}

		if(nbytes_in_linebuf>=16 && !de_memcmp(linebuf, "begin-base64 ", 13)) {
			uuhp->hdr_line_type = HDR_UUENCODE_BASE64;
			if(fi && !id_mode) {
				parse_begin_line(c, uuhp, fi, linebuf, nbytes_in_linebuf);
			}
			return 1;
		}

		uuhp->hdr_line_startpos += total_len;
		line_count++;
	}

	if(!id_mode) de_err(c, "Unrecognized file format");
	uuhp->hdr_line_type = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %ecx, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
callq 0xd1c35
movq %rax, %r13
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %r12
pushq $0x64
popq %r15
subq $0x1, %r15
jb 0xd19fb
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq %r13, %rsi
movq %r12, %rdx
leaq 0x18(%rsp), %rcx
callq 0xe6482
xorl %r13d, %r13d
testl %eax, %eax
je 0xd1a5b
movq (%r12), %r14
cmpq $0x3e8, %r14            # imm = 0x3E8
jg 0xd1a5b
movl $0x1f4, %eax            # imm = 0x1F4
cmpq %rax, %r14
movl $0x1f4, %ebp            # imm = 0x1F4
cmovlq %r14, %rbp
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x20(%rsp), %rsi
movq %rbp, %rcx
callq 0xe3cb7
movq 0x18(%rsp), %r13
addq 0x8(%rbx), %r13
movq %r13, 0x18(%rbx)
cmpq $0x9, %r14
jl 0xd19f2
leaq 0x20(%rsp), %rdi
leaq 0x642ab(%rip), %rsi     # 0x135c73
pushq $0x6
popq %rdx
callq 0x18230
testl %eax, %eax
je 0xd1a1d
cmpq $0x10, %r14
jb 0xd19f2
leaq 0x20(%rsp), %rdi
leaq 0x64294(%rip), %rsi     # 0x135c7a
pushq $0xd
popq %rdx
callq 0x18230
testl %eax, %eax
je 0xd1a25
movq %r13, 0x8(%rbx)
jmp 0xd193f
cmpl $0x0, 0x4(%rsp)
jne 0xd1a15
leaq 0x6427f(%rip), %rsi     # 0x135c88
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0xdf2a5
andl $0x0, (%rbx)
xorl %r13d, %r13d
jmp 0xd1a5b
movl $0xb, (%rbx)
jmp 0xd1a2b
movl $0xc, (%rbx)
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
sete %al
cmpl $0x0, 0x4(%rsp)
setne %cl
orb %al, %cl
pushq $0x1
popq %r13
jne 0xd1a5b
leaq 0x20(%rsp), %rcx
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %r8
callq 0xd1c4e
movl %r13d, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq