LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: identify_fmt
static int identify_fmt(deark *c, i64 pos)
{
	u8 buf[3];

	de_read(buf, pos, 3);
	if(buf[0]!='P') return 0;

	if(buf[1]=='7' && buf[2]==0x0a)
		return FMT_PAM;
	if(buf[1]>='1' && buf[1]<='6') {
		if(buf[2]==9 || buf[2]==10 || buf[2]==13 || buf[2]==32) {
			return (int)buf[1] - '0';
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1b(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x3, %ecx
callq 0x164d10
movzbl -0x1b(%rbp), %eax
cmpl $0x50, %eax
je 0x10de3c
movl $0x0, -0x4(%rbp)
jmp 0x10dea2
movzbl -0x1a(%rbp), %eax
cmpl $0x37, %eax
jne 0x10de57
movzbl -0x19(%rbp), %eax
cmpl $0xa, %eax
jne 0x10de57
movl $0x7, -0x4(%rbp)
jmp 0x10dea2
movzbl -0x1a(%rbp), %eax
cmpl $0x31, %eax
jl 0x10de9b
movzbl -0x1a(%rbp), %eax
cmpl $0x36, %eax
jg 0x10de9b
movzbl -0x19(%rbp), %eax
cmpl $0x9, %eax
je 0x10de8d
movzbl -0x19(%rbp), %eax
cmpl $0xa, %eax
je 0x10de8d
movzbl -0x19(%rbp), %eax
cmpl $0xd, %eax
je 0x10de8d
movzbl -0x19(%rbp), %eax
cmpl $0x20, %eax
jne 0x10de99
movzbl -0x1a(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x10dea2
jmp 0x10de9b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: get_fmt_name
static const char *get_fmt_name(int fmt)
{
	const char *name="unknown";
	switch(fmt) {
	case FMT_PBM_ASCII: name="PBM plain"; break;
	case FMT_PGM_ASCII: name="PGM plain"; break;
	case FMT_PPM_ASCII: name="PPM plain"; break;
	case FMT_PBM_BINARY: name="PBM"; break;
	case FMT_PGM_BINARY: name="PGM"; break;
	case FMT_PPM_BINARY: name="PPM"; break;
	case FMT_PAM: name="PAM"; break;
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
leaq 0x9069e(%rip), %rax     # 0x19e55c
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x6, %eax
ja 0x10df3f
movq -0x18(%rbp), %rax
leaq 0xb56db(%rip), %rcx     # 0x1c35b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb5753(%rip), %rax     # 0x1c3640
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xb5750(%rip), %rax     # 0x1c364a
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xb574d(%rip), %rax     # 0x1c3654
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xb574a(%rip), %rax     # 0x1c365e
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xb5741(%rip), %rax     # 0x1c3662
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xaa444(%rip), %rax     # 0x1b8372
movq %rax, -0x10(%rbp)
jmp 0x10df3f
leaq 0xb572b(%rip), %rax     # 0x1c3666
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: read_pnm_header
static int read_pnm_header(deark *c, lctx *d, struct page_ctx *pg, i64 pos1)
{
	char tokenbuf[100];
	int retval = 0;

	de_dbg(c, "header at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	de_dbg(c, "format: %s", pg->fmt_name);
	pg->hdr_parse_pos = pos1+2; // Skip "P?"

	if(!read_next_token(c, d, pg, tokenbuf, sizeof(tokenbuf))) goto done;
	pg->width = de_atoi64(tokenbuf);
	if(!read_next_token(c, d, pg, tokenbuf, sizeof(tokenbuf))) goto done;
	pg->height = de_atoi64(tokenbuf);
	de_dbg_dimensions(c, pg->width, pg->height);

	if(fmt_is_pbm(pg->fmt)) {
		pg->maxval = 1;
	}
	else {
		if(!read_next_token(c, d, pg, tokenbuf, sizeof(tokenbuf))) goto done;
		pg->maxval = de_atoi(tokenbuf);
		de_dbg(c, "maxval: %d", pg->maxval);
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x94(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xa08ff(%rip), %rsi     # 0x1aed63
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xa9704(%rip), %rsi     # 0x1b7b90
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl $0x64, %r8d
callq 0x10e990
cmpl $0x0, %eax
jne 0x10e4cb
jmp 0x10e5b4
leaq -0x90(%rbp), %rdi
callq 0x15ccc0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl $0x64, %r8d
callq 0x10e990
cmpl $0x0, %eax
jne 0x10e50a
jmp 0x10e5b4
leaq -0x90(%rbp), %rdi
callq 0x15ccc0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x15bba0
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x10eab0
cmpl $0x0, %eax
je 0x10e557
movq -0x18(%rbp), %rax
movl $0x1, 0x20(%rax)
jmp 0x10e5aa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl $0x64, %r8d
callq 0x10e990
cmpl $0x0, %eax
jne 0x10e57c
jmp 0x10e5b4
leaq -0x90(%rbp), %rdi
callq 0x15cca0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %edx
leaq 0xb51b5(%rip), %rsi     # 0x1c3758
movb $0x0, %al
callq 0x15b0d0
movl $0x1, -0x94(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: do_image
static int do_image(deark *c, lctx *d, struct page_ctx *pg, i64 pos1)
{
	int retval = 0;

	de_dbg(c, "image data at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	if(pg->maxval<1 || pg->maxval>65535) {
		de_err(c, "Invalid maxval: %d", pg->maxval);
		goto done;
	}
	if(!de_good_image_dimensions(c, pg->width, pg->height)) goto done;

	switch(pg->fmt) {
	case FMT_PBM_ASCII:
		if(!do_image_pbm_ascii(c, d, pg, pos1)) goto done;
		break;
	case FMT_PGM_ASCII:
	case FMT_PPM_ASCII:
		if(!do_image_pgm_ppm_ascii(c, d, pg, pos1)) goto done;
		break;
	case FMT_PBM_BINARY:
		if(!do_image_pbm_binary(c, d, pg, pos1)) goto done;
		break;
	case FMT_PGM_BINARY:
	case FMT_PPM_BINARY:
	case FMT_PAM:
		if(!do_image_pgm_ppm_pam_binary(c, d, pg, c->infile, pos1)) goto done;
		break;
	default:
		de_err(c, "Unsupported PNM format");
		goto done;
	}

	retval = 1;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xb8457(%rip), %rsi     # 0x1c6a65
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jl 0x10e63a
movq -0x18(%rbp), %rax
cmpl $0xffff, 0x20(%rax)     # imm = 0xFFFF
jle 0x10e658
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %edx
leaq 0xb5104(%rip), %rsi     # 0x1c3750
movb $0x0, %al
callq 0x15bfb0
jmp 0x10e741
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0x10e67b
jmp 0x10e741
movq -0x18(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x6, %eax
ja 0x10e726
movq -0x30(%rbp), %rax
leaq 0xb4f47(%rip), %rcx     # 0x1c35e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10eae0
cmpl $0x0, %eax
jne 0x10e6c2
jmp 0x10e741
jmp 0x10e73a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10ec40
cmpl $0x0, %eax
jne 0x10e6e0
jmp 0x10e741
jmp 0x10e73a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10ede0
cmpl $0x0, %eax
jne 0x10e6fe
jmp 0x10e741
jmp 0x10e73a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %r8
callq 0x10ee80
cmpl $0x0, %eax
jne 0x10e724
jmp 0x10e741
jmp 0x10e73a
movq -0x8(%rbp), %rdi
leaq 0xb5032(%rip), %rsi     # 0x1c3763
movb $0x0, %al
callq 0x15bfb0
jmp 0x10e741
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: read_pam_header_line
static int read_pam_header_line(deark *c, lctx *d, struct page_ctx *pg, i64 pos,
	i64 *content_len, i64 *total_len,
	char *linebuf, size_t linebuf_len)
{
	int ret;
	i64 amt_to_read;

	linebuf[0]='\0';

	ret = dbuf_find_line(c->infile, pos,
		content_len, total_len);

	if(!ret) return 0;

	amt_to_read = *content_len;
	if(amt_to_read > (i64)(linebuf_len-1)) amt_to_read = (i64)(linebuf_len-1);

	de_read((u8*)linebuf, pos, amt_to_read);

	*content_len = amt_to_read;
	linebuf[amt_to_read] = '\0';
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq 0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x169640
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x10e7ba
movl $0x0, -0x4(%rbp)
jmp 0x10e819
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jle 0x10e7e2
movq 0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x164d10
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: read_next_pam_token
static int read_next_pam_token(deark *c, lctx *d, struct page_ctx *pg,
	const char *linebuf, size_t linebuflen,
	char *tokenbuf, size_t tokenbuflen, i64 *curpos)
{
	u8 b;
	i64 token_len = 0;
	i64 linepos;

	token_len = 0;

	linepos = *curpos;
	while(1) {
		if(token_len >= (i64)tokenbuflen) {
			// Token too long.
			return 0;
		}

		if(linepos >= (i64)linebuflen) {
			return 0;
		}
		b = linebuf[linepos++];
		if(b==0) break; // End of line

		if(is_pnm_whitespace(b)) {
			if(token_len>0) {
				break;
			}
			else {
				continue; // Skip leading whitespace.
			}
		}
		else {
			// Append the character to the token.
			tokenbuf[token_len++] = b;
		}
	}

	tokenbuf[token_len] = '\0';
	*curpos = linepos;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x48(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq 0x10(%rbp), %rax
jl 0x10e889
movl $0x0, -0x4(%rbp)
jmp 0x10e915
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jl 0x10e89c
movl $0x0, -0x4(%rbp)
jmp 0x10e915
movq -0x28(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movzbl -0x39(%rbp), %eax
cmpl $0x0, %eax
jne 0x10e8c0
jmp 0x10e8f7
movzbl -0x39(%rbp), %edi
callq 0x10e920
cmpl $0x0, %eax
je 0x10e8d9
cmpq $0x0, -0x48(%rbp)
jle 0x10e8d7
jmp 0x10e8f7
jmp 0x10e873
movb -0x39(%rbp), %dl
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x48(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x10e873
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x50(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: read_next_token
static int read_next_token(deark *c, lctx *d, struct page_ctx *pg,
	char *tokenbuf, size_t tokenbuflen)
{
	u8 b;
	size_t token_len = 0;
	int in_comment = 0;

	token_len = 0;
	while(1) {
		if(pg->hdr_parse_pos >= c->infile->len) return 0;

		if(token_len >= tokenbuflen) {
			return 0; // Token too long.
		}

		b = de_getbyte_p(&pg->hdr_parse_pos);

		if(in_comment) {
			if(b==10 || b==13) {
				in_comment = 0;
			}
			continue;
		}
		else if(b=='#') {
			in_comment = 1;
			continue;
		}
		else if(is_pnm_whitespace(b)) {
			if(token_len>0) {
				tokenbuf[token_len] = '\0';
				return 1;
			}
			else {
				continue; // Skip leading whitespace.
			}
		}
		else {
			// Append the character to the token.
			tokenbuf[token_len] = (char)b;
			token_len++;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x10e9e5
movl $0x0, -0x4(%rbp)
jmp 0x10ea9b
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x10e9fb
movl $0x0, -0x4(%rbp)
jmp 0x10ea9b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x30, %rsi
callq 0x165170
movb %al, -0x31(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x10ea34
movzbl -0x31(%rbp), %eax
cmpl $0xa, %eax
je 0x10ea2b
movzbl -0x31(%rbp), %eax
cmpl $0xd, %eax
jne 0x10ea32
movl $0x0, -0x44(%rbp)
jmp 0x10e9c3
movzbl -0x31(%rbp), %eax
cmpl $0x23, %eax
jne 0x10ea49
movl $0x1, -0x44(%rbp)
jmp 0x10e9c3
movzbl -0x31(%rbp), %edi
callq 0x10e920
cmpl $0x0, %eax
je 0x10ea78
cmpq $0x0, -0x40(%rbp)
jbe 0x10ea73
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
jmp 0x10ea9b
jmp 0x10e9c3
movb -0x31(%rbp), %dl
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10ea94
jmp 0x10ea96
jmp 0x10e9c3
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: do_image_pbm_ascii
static int do_image_pbm_ascii(deark *c, lctx *d, struct page_ctx *pg, i64 pos1)
{
	de_bitmap *img = NULL;
	i64 xpos, ypos;
	i64 pos = pos1;
	u8 b;
	u8 v;

	img = de_bitmap_create(c, pg->width, pg->height, 1);

	xpos=0; ypos=0;
	while(1) {
		if(pos >= c->infile->len) break; // end of file
		if(ypos==(pg->height-1) && xpos>=pg->width) break; // end of image
		if(ypos>=pg->height) break;

		b = de_getbyte_p(&pos);
		if(b=='1') v=0;
		else if(b=='0') v=255;
		else continue;

		de_bitmap_setpixel_gray(img, xpos, ypos, v);
		xpos++;
		if(xpos>=pg->width) {
			ypos++;
			xpos=0;
		}
	}

	de_bitmap_write_to_file_finfo(img, NULL, DE_CREATEFLAG_IS_BWIMG);
	de_bitmap_destroy(img);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x1, %ecx
callq 0x16b750
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x10eb51
jmp 0x10ec0d
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x10eb79
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x10eb79
jmp 0x10ec0d
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x10eb8c
jmp 0x10ec0d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165170
movb %al, -0x41(%rbp)
movzbl -0x41(%rbp), %eax
cmpl $0x31, %eax
jne 0x10ebaf
movb $0x0, -0x42(%rbp)
jmp 0x10ebc5
movzbl -0x41(%rbp), %eax
cmpl $0x30, %eax
jne 0x10ebbe
movb $-0x1, -0x42(%rbp)
jmp 0x10ebc3
jmp 0x10eb3a
jmp 0x10ebc5
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movzbl -0x42(%rbp), %ecx
callq 0x16b1c0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x10ec08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
jmp 0x10eb3a
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x8, %edx
callq 0x16afa0
movq -0x28(%rbp), %rdi
callq 0x16af60
movl $0x1, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: do_image_pbm_binary
static int do_image_pbm_binary(deark *c, lctx *d, struct page_ctx *pg, i64 pos1)
{
	i64 rowspan;

	rowspan = (pg->width+7)/8;
	pg->image_data_len = rowspan * pg->height;

	de_convert_and_write_image_bilevel2(c->infile, pos1, pg->width, pg->height,
		rowspan, DE_CVTF_WHITEISZERO, NULL, 0);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x7, %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
imulq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x28(%rbp), %r8
movl $0x1, %r9d
xorl %eax, %eax
xorl %eax, %eax
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x16c000
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: pgm_ppm_ascii_handle_sample
static void pgm_ppm_ascii_handle_sample(struct pgm_ppm_ascii_ctx *actx)
{
	i64 v;

	actx->samplebuf[actx->samplebuf_used] = '\0'; // NUL terminate for de_atoi64()
	v = de_atoi64((const char*)actx->samplebuf);
	actx->samplebuf_used = 0;

	if(actx->intermed_nbytes_per_sample==1) {
		dbuf_writebyte(actx->intermed_img, (u8)v);
	}
	else {
		dbuf_writeu16be(actx->intermed_img, v);
	}

	actx->sample_count++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movb $0x0, 0x20(%rax,%rcx)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x15ccc0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x10f3fc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movzbl %al, %esi
callq 0x168380
jmp 0x10f40d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x168a50
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: de_module_pgx
void de_module_pgx(deark *c, struct deark_module_info *mi)
{
	mi->id = "pgx";
	mi->desc = "Atari Portfolio animation";
	mi->run_fn = de_run_pgx;
	mi->identify_fn = de_identify_pgx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb434a(%rip), %rcx     # 0x1c3791
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb4340(%rip), %rcx     # 0x1c3795
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x10f480
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x16d(%rip), %rcx       # 0x10f5e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: de_run_pgx
static void de_run_pgx(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 frame_size;
	int ret;
	int executable = 0;

	if(dbuf_memcmp(c->infile, 0, "PGX", 3)) {
		// Some "PGX" files are actually .COM files with an embedded PGX file.
		// The ones I've seen always have the PGX file at offset 1248, so look
		// for it there.
		if(dbuf_memcmp(c->infile, 0, "PGX", 1248)) {
			executable = 1;
		}
	}

	if(executable) {
		de_declare_fmt(c, "PGX (Portfolio Animation, executable)");
		pos = 1248;
	}
	else{
		de_declare_fmt(c, "PGX (Portfolio Animation)");
		pos = 0;
	}

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

	d->version = de_getbyte(pos+3);
	de_dbg(c, "Version: %d", (int)d->version);

	pos += 8;
	while(1) {
		if(pos >= c->infile->len) break;
		ret = do_process_frame(c, d, pos, &frame_size);
		if(!ret || !frame_size) break;
		pos += frame_size;
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb4356(%rip), %rdx     # 0x1c3808
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x10f4ec
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb4334(%rip), %rdx     # 0x1c3808
movl $0x4e0, %ecx            # imm = 0x4E0
callq 0x166ab0
cmpl $0x0, %eax
je 0x10f4ea
movl $0x1, -0x30(%rbp)
jmp 0x10f4ec
cmpl $0x0, -0x30(%rbp)
je 0x10f50c
movq -0x8(%rbp), %rdi
leaq 0xb430f(%rip), %rsi     # 0x1c380c
callq 0x15e380
movq $0x4e0, -0x20(%rbp)     # imm = 0x4E0
jmp 0x10f524
movq -0x8(%rbp), %rdi
leaq 0xb431b(%rip), %rsi     # 0x1c3832
callq 0x15e380
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x3, %rsi
callq 0x165060
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl (%rax), %edx
leaq 0xb42e7(%rip), %rsi     # 0x1c384c
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x10f58c
jmp 0x10f5c1
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x10f920
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x10f5b1
cmpq $0x0, -0x28(%rbp)
jne 0x10f5b3
jmp 0x10f5c1
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x10f578
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: de_module_pf_pgf
void de_module_pf_pgf(deark *c, struct deark_module_info *mi)
{
	mi->id = "pf_pgf";
	mi->desc = "Atari Portfolio Graphics - uncompressed";
	mi->run_fn = de_run_pf_pgf;
	mi->identify_fn = de_identify_pf_pgf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb4168(%rip), %rcx     # 0x1c37af
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb4161(%rip), %rcx     # 0x1c37b6
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x10f680
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0x10f6e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: de_module_pgc
void de_module_pgc(deark *c, struct deark_module_info *mi)
{
	mi->id = "pgc";
	mi->desc = "Atari Portfolio Graphics - compressed";
	mi->run_fn = de_run_pgc;
	mi->identify_fn = de_identify_pgc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb4087(%rip), %rcx     # 0x1c37de
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb407d(%rip), %rcx     # 0x1c37e2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x10f790
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x10f8d0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: de_run_pgc
static void de_run_pgc(deark *c, de_module_params *mparams)
{
	dbuf *unc_pixels = NULL;
	i64 pos;
	i64 count;
	u8 b, b2;

	de_declare_fmt(c, "PGC (Portfolio graphics compressed)");
	unc_pixels = dbuf_create_membuf(c, 1920, 1);

	pos = 3;
	while(pos<c->infile->len) {
		b = de_getbyte(pos);
		pos++;
		count = (i64)(b & 0x7f);
		if(b & 0x80) {
			// compressed run
			b2 = de_getbyte(pos);
			pos++;
			dbuf_write_run(unc_pixels, b2, count);
		}
		else {
			// uncompressed run
			dbuf_copy(c->infile, pos, count, unc_pixels);
			pos += count;
		}
	}

	de_convert_and_write_image_bilevel(unc_pixels, 0, 240, 64, 240/8,
		DE_CVTF_WHITEISZERO, NULL, 0);
	dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xb414f(%rip), %rsi     # 0x1c3902
callq 0x15e380
movq -0x8(%rbp), %rdi
movl $0x780, %esi            # imm = 0x780
movl $0x1, %edx
callq 0x168020
movq %rax, -0x18(%rbp)
movq $0x3, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x10f887
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movzbl -0x29(%rbp), %eax
andl $0x7f, %eax
cltq
movq %rax, -0x28(%rbp)
movzbl -0x29(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x10f85d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165060
movb %al, -0x2a(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movb -0x2a(%rbp), %al
movq -0x28(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
jmp 0x10f882
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x166070
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x10f7d7
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xf0, %edx
movl $0x40, %ecx
movl $0x1e, %r8d
movl $0x1, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x16bf50
movq -0x18(%rbp), %rdi
callq 0x1676a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/portfolio.c
// Function: do_pgc_in_pgx
static void do_pgc_in_pgx(deark *c, lctx *d, i64 pos, i64 len)
{
	dbuf *f = NULL;

	f = dbuf_create_output_file(c, "pgc", NULL, 0);

	// Embedded PGC files don't include the 3-byte PGC header, so we have to add that.
	dbuf_write(f, (const unsigned char*)"PG\x01", 3);

	// Copy the rest of the PGC file.
	dbuf_copy(c->infile, pos, len, f);

	dbuf_close(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xb3cc3(%rip), %rsi     # 0x1c37de
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0xb3db0(%rip), %rsi     # 0x1c38e5
movl $0x3, %edx
callq 0x166170
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x166070
movq -0x28(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: de_module_pp_gph
void de_module_pp_gph(deark *c, struct deark_module_info *mi)
{
	mi->id = "pp_gph";
	mi->desc = "PrintPartner .GPH";
	mi->run_fn = de_run_pp_gph;
	mi->identify_fn = de_identify_pp_gph;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb3d9f(%rip), %rcx     # 0x1c3926
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb3d98(%rip), %rcx     # 0x1c392d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x10fbc0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x10fd00
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: de_run_pp_gph
static void de_run_pp_gph(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 bytes_consumed;
	int img_idx = 0;
	u8 *bufptr;
	u8 buf[256];

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

	de_read(buf, 0, sizeof(buf)-1);
	buf[sizeof(buf)-1] = '\0';
	bufptr = (u8*)de_strchr((const char*)buf, 0x1a);
	if(!bufptr) {
		de_err(c, "This doesn't look like a valid .GPH file");
		goto done;
	}

	pos = (bufptr - buf);
	de_dbg(c, "end of header found at %d", (int)pos);

	pos++;

	while(1) {
		if(pos > (c->infile->len - 24)) break;
		bytes_consumed = 0;
		if(!do_one_image(c, d, pos, img_idx, &bytes_consumed)) goto done;
		if(bytes_consumed<1) goto done;
		pos += bytes_consumed;
		img_idx++;
	}

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x140(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xff, %ecx
callq 0x164d10
movb $0x0, -0x41(%rbp)
leaq -0x140(%rbp), %rdi
movl $0x1a, %esi
callq 0x15abe0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x10fc48
movq -0x8(%rbp), %rdi
leaq 0xb3d03(%rip), %rsi     # 0x1c393f
movb $0x0, %al
callq 0x15bfb0
jmp 0x10fce2
movq -0x38(%rbp), %rax
leaq -0x140(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xb3cfd(%rip), %rsi     # 0x1c3968
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
subq $0x18, %rcx
cmpq %rcx, %rax
jle 0x10fc99
jmp 0x10fce0
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
leaq -0x28(%rbp), %r8
callq 0x10fd70
cmpl $0x0, %eax
jne 0x10fcc0
jmp 0x10fce2
cmpq $0x1, -0x28(%rbp)
jge 0x10fcc9
jmp 0x10fce2
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x10fc7e
jmp 0x10fce2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: de_identify_pp_gph
static int de_identify_pp_gph(deark *c)
{
	if(!de_input_file_has_ext(c, "gph")) return 0;

	if(!dbuf_memcmp(c->infile, 0, "PrintPartner", 12)) {
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xb3c12(%rip), %rsi     # 0x1c3929
callq 0x15d180
cmpl $0x0, %eax
jne 0x10fd2a
movl $0x0, -0x4(%rbp)
jmp 0x10fd5c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb3ca3(%rip), %rdx     # 0x1c39e0
movl $0xc, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x10fd55
movl $0x64, -0x4(%rbp)
jmp 0x10fd5c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: do_image_cmpr1
static void do_image_cmpr1(deark *c, lctx *d, struct page_ctx *pg, i64 pos1,
	i64 *bytes_consumed)
{
	dbuf *unc_pixels = NULL;

	*bytes_consumed = pg->width_raw*pg->height;
	unc_pixels = dbuf_open_input_subfile(c->infile, pos1,
		pg->width_raw*pg->height);
	do_write_image_fromuncpixels(c, d, pg, unc_pixels);
	dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rdx
callq 0x1691b0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x110470
movq -0x30(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: do_image_cmpr2
static void do_image_cmpr2(deark *c, lctx *d, struct page_ctx *pg, i64 pos1,
	i64 *bytes_consumed)
{
	i64 cmpr_len;
	i64 pos = pos1;
	dbuf *unc_pixels = NULL;

	cmpr_len = de_getu16le(pos);
	de_dbg(c, "cmpr data len: %d bytes", (int)cmpr_len);
	pos += 2;
	*bytes_consumed = 2 + cmpr_len;

	unc_pixels = dbuf_create_membuf(c, pg->width_raw*pg->height, 0x1);

	while(1) {
		i64 count;
		u8 b, b2;

		if(pos >= pos1+2+cmpr_len) break;
		b = de_getbyte(pos++);
		count = (i64)(b & 0x7f);
		if(b & 0x80) { // compressed run
			b2 = de_getbyte(pos);
			pos++;
			dbuf_write_run(unc_pixels, b2, count);
		}
		else { // uncompressed run
			dbuf_copy(c->infile, pos, count, unc_pixels);
			pos += count;
		}
	}

	do_write_image_fromuncpixels(c, d, pg, unc_pixels);
	dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0xb385c(%rip), %rsi     # 0x1c39ae
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
addq $0x2, %rcx
addq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jl 0x1101b1
jmp 0x11024a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
callq 0x165060
movb %al, -0x49(%rbp)
movzbl -0x49(%rbp), %eax
andl $0x7f, %eax
cltq
movq %rax, -0x48(%rbp)
movzbl -0x49(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x110220
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x4a(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movb -0x4a(%rbp), %al
movq -0x48(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
jmp 0x110245
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x166070
movq -0x48(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x110197
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x110470
movq -0x40(%rbp), %rdi
callq 0x1676a0
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: do_write_image_fromuncpixels
static void do_write_image_fromuncpixels(deark *c, lctx *d, struct page_ctx *pg,
	dbuf *unc_pixels)
{
	de_bitmap *img = NULL;

	img = de_bitmap_create(c, pg->width, pg->height, 1);
	de_convert_image_bilevel(unc_pixels, 0, pg->width_raw, img, DE_CVTF_WHITEISZERO);
	do_write_image_frombitmap(c, d, pg, img);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x1, %ecx
callq 0x16b750
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %r8d
callq 0x16bee0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x110500
movq -0x28(%rbp), %rdi
callq 0x16af60
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/printptnr.c
// Function: do_write_image_frombitmap
static void do_write_image_frombitmap(deark *c, lctx *d, struct page_ctx *pg,
	de_bitmap *img)
{
	de_finfo *fi = NULL;

	fi = de_finfo_create(c);
	fi->density.code = DE_DENSITY_UNK_UNITS;
	fi->density.xdens = 2;
	fi->density.ydens = 1;

	if(c->filenames_from_file && pg->imgname && (pg->imgname->len > 0)) {
		de_finfo_set_name_from_ucstring(c, fi, pg->imgname, 0);
	}
	de_bitmap_write_to_file_finfo(img, fi, DE_CREATEFLAG_IS_BWIMG);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x78(%rax)
movq -0x28(%rbp), %rax
movsd 0x9fee4(%rip), %xmm0    # 0x1b0428
movsd %xmm0, 0x80(%rax)
movq -0x28(%rbp), %rax
movsd 0x90c60(%rip), %xmm0    # 0x1a11b8
movsd %xmm0, 0x88(%rax)
movq -0x8(%rbp), %rax
movzbl 0xd0(%rax), %eax
cmpl $0x0, %eax
je 0x1105a1
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x1105a1
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x10(%rax)
jle 0x1105a1
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x8, %edx
callq 0x16afa0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15d260
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: de_module_packdir
void de_module_packdir(deark *c, struct deark_module_info *mi)
{
	mi->id = "packdir";
	mi->desc = "PackDir compressed archive format";
	mi->run_fn = de_run_packdir;
	mi->identify_fn = de_identify_packdir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb3406(%rip), %rcx     # 0x1c39ed
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb3400(%rip), %rcx     # 0x1c39f5
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x110620
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xad(%rip), %rcx        # 0x1106c0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: de_run_packdir
static void de_run_packdir(deark *c, de_module_params *mparams)
{
	struct pdctx_struct *d = NULL;
	i64 bytes_consumed;

	d = de_malloc(c, sizeof(struct pdctx_struct));

	if(!do_packdir_header(c, d)) goto done;
	d->curpath = de_strarray_create(c, MAX_NESTING_LEVEL+10);
	do_packdir_object(c, d, 9, 0, &bytes_consumed);

done:
	if(d) {
		de_strarray_destroy(d->curpath);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x110740
cmpl $0x0, %eax
jne 0x11065e
jmp 0x11068f
movq -0x8(%rbp), %rdi
movl $0x2a, %esi
callq 0x1727a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x9, %edx
xorl %ecx, %ecx
leaq -0x20(%rbp), %r8
callq 0x110810
cmpq $0x0, -0x18(%rbp)
je 0x1106b0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1727f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: de_identify_packdir
static int de_identify_packdir(deark *c)
{
	i64 n;

	if(dbuf_memcmp(c->infile, 0, "PACK\0", 5)) return 0;
	n = de_getu32le(5);
	if(n<=4) return 100; // maxbits = 12...16
	if(n<=8) return 10; // Dunno what the "maxbits" limit is.
	return 0; // Could be Git pack format
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xb342c(%rip), %rdx     # 0x1c3b0b
movl $0x5, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x1106f7
movl $0x0, -0x4(%rbp)
jmp 0x110734
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x5, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
cmpq $0x4, -0x18(%rbp)
jg 0x11071d
movl $0x64, -0x4(%rbp)
jmp 0x110734
cmpq $0x8, -0x18(%rbp)
jg 0x11072d
movl $0xa, -0x4(%rbp)
jmp 0x110734
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: do_packdir_header
static int do_packdir_header(deark *c, struct pdctx_struct *d)
{
	unsigned int maxbits_raw;
	i64 pos = 0;
	int retval = 0;

	de_dbg(c, "header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	pos += 5; // signature
	maxbits_raw = (unsigned int)de_getu32le_p(&pos);
	d->lzw_maxbits = maxbits_raw + 12;
	de_dbg(c, "lzw maxbits: %u (+12=%u)", maxbits_raw, d->lzw_maxbits);
	if(d->lzw_maxbits>16) {
		de_err(c, "Unsupported \"maxbits\" value: %u", d->lzw_maxbits);
		goto done;
	}
	retval = 1;
done:
	de_dbg_indent(c, -1);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x9e5f5(%rip), %rsi     # 0x1aed63
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x20(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
addl $0xc, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
leaq 0xb3254(%rip), %rsi     # 0x1c3a17
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x10, (%rax)
jbe 0x1107ed
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0xb324c(%rip), %rsi     # 0x1c3a30
movb $0x0, %al
callq 0x15bfb0
jmp 0x1107f4
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: convert_root_name
static void convert_root_name(deark *c, struct pdctx_struct *d,
	de_ucstring *nsrc, de_ucstring *ndst)
{
	i64 k;

	for(k=0; k<nsrc->len; k++) {
		i32 ch = nsrc->str[k];
		if(ch=='.' || ch==':') {
			ucstring_empty(ndst);
		}
		else {
			ucstring_append_char(ndst, ch);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x110d53
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x2e, -0x2c(%rbp)
je 0x110d2c
cmpl $0x3a, -0x2c(%rbp)
jne 0x110d37
movq -0x20(%rbp), %rdi
callq 0x171210
jmp 0x110d43
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x1714c0
jmp 0x110d45
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x110d00
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: do_packdir_file_compressed
static void do_packdir_file_compressed(deark *c, struct pdctx_struct *d,
	struct pdctx_object *md, i64 pos, dbuf *outf)
{
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = pos;
	dcmpri.len = md->cmpr_len;
	dcmpro.f = outf;
	dcmpro.len_known = 1;
	dcmpro.expected_len = md->orig_len;

	decompress_zoo_lzd(c, &dcmpri, &dcmpro, &dres, d->lzw_maxbits);
	dbuf_flush(outf);

	if(dres.errcode) {
		de_err(c, "%s: %s", ucstring_getpsz_d(md->name), de_dfilter_get_errmsg(c, &dres));
	}
	else if(outf->len != md->orig_len) {
		de_err(c, "%s: Expected %"I64_FMT" decompressed bytes, got %"I64_FMT,
			ucstring_getpsz_d(md->name), md->orig_len, outf->len);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x1773f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x1, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %r8d
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x1110e0
movq -0x28(%rbp), %rdi
callq 0x167c30
cmpl $0x0, -0xc0(%rbp)
je 0x111080
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x172650
movq %rax, -0xc8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x177360
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movq %rax, %rcx
leaq 0xc3e4f(%rip), %rsi     # 0x1d4ec6
movb $0x0, %al
callq 0x15bfb0
jmp 0x1110d4
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x1110d2
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x172650
movq -0xd8(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %r8
leaq 0xb2a13(%rip), %rsi     # 0x1c3ade
movb $0x0, %al
callq 0x15bfb0
jmp 0x1110d4
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/packdir.c
// Function: decompress_zoo_lzd
static void decompress_zoo_lzd(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres, int maxbits)
{
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_ZOOLZD;
	delzwp.max_code_size = (unsigned int)maxbits;
	fmtutil_decompress_lzw(c, dcmpri, dcmpro, dres, &delzwp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x19140
movl $0x4, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x1843b0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pack.c
// Function: de_module_pack
void de_module_pack(deark *c, struct deark_module_info *mi)
{
	mi->id = "pack";
	mi->desc = "Unix pack (.z)";
	mi->run_fn = de_run_pack;
	mi->identify_fn = de_identify_pack;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xac664(%rip), %rcx     # 0x1bd7bb
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb29ac(%rip), %rcx     # 0x1c3b11
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x111190
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x15d(%rip), %rcx       # 0x1112e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)