LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_11
static void handler_11(struct item_handler_data *h)
{
	u8 ver;

	ver = dbuf_getbyte(h->inf, h->data_pos);
	de_dbg(h->c, "version: %u", (UI)ver);

	if(ver==2) {
		h->d->version = 2;
	}
	else if(ver!=1) {
		de_err(h->c, "Unsupported PICT version: %u", (UI)ver);
		h->fatal_errflag = 1;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3eb4
movq (%rbx), %rdi
movzbl %al, %ebp
leaq 0x7e15e(%rip), %rsi     # 0x129a84
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
cmpb $0x1, %bpl
je 0xab95e
cmpl $0x2, %ebp
jne 0xab947
movq 0x8(%rbx), %rax
movl $0x2, 0xc(%rax)
jmp 0xab95e
movq (%rbx), %rdi
leaq 0x7e122(%rip), %rsi     # 0x129a73
movl %ebp, %edx
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_pixpat
static void handler_pixpat(struct item_handler_data *h)
{
	UI pattype;
	i64 pos = h->data_pos;
	int needmsg = 1;
	int retval = 0;
	i64 colortable_size = 0;
	i64 pixdata_size = 0;
	struct fmtutil_macbitmap_info *bi = NULL;
	deark *c = h->c;

	pattype = (UI)dbuf_getu16be_p(h->inf, &pos);
	de_dbg(c, "PatType: %u", pattype);
	pos += 8; // Pat1Data

	if(pattype==2) { // ditherPat(?)
		pos += 6; // RGB
		retval = 1;
		goto done;
	}

	bi = de_malloc(c, sizeof(struct fmtutil_macbitmap_info));

	fmtutil_macbitmap_read_rowbytes_and_bounds(c, h->inf, bi, pos);
	pos += 10;
	fmtutil_macbitmap_read_pixmap_only_fields(c, h->inf, bi, pos);
	pos += 36;

	bi->uses_pal = 1;
	if(!fmtutil_macbitmap_read_colortable(c, h->inf, bi, pos, &colortable_size)) goto done;
	pos += colortable_size;

	if(!get_pixdata_size(c, h->d, bi, pos, &pixdata_size)) {
		goto done;
	}
	// Note: We could extract the "PixMap" pattern easily enough here, by calling
	// decode_pixdata(). But if we do that, maybe we should also extract the
	// Pat1Data data above, as well as other opcodes like BkPat.
	pos += pixdata_size;
	retval = 1;

done:
	if(!retval && needmsg) {
		de_err(c, "Failed to parse PixPat data");
	}
	if(retval) {
		h->data_len = pos - h->data_pos;
	}
	if(!retval) {
		h->fatal_errflag = 1;
	}
	de_free(c, bi);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
andq $0x0, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
movq %rsp, %r15
movq %rax, (%r15)
movq (%rdi), %r14
movq 0x10(%rdi), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, %r12
leaq 0x7e0ee(%rip), %rsi     # 0x129a90
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq (%r15), %rax
leaq 0x8(%rax), %rcx
movq %rcx, (%r15)
cmpl $0x2, %r12d
jne 0xab9cb
addq $0xe, %rax
xorl %r15d, %r15d
jmp 0xaba5f
movl $0x480, %esi            # imm = 0x480
movq %r14, %rdi
callq 0xdecaf
movq %rax, %r15
movq 0x10(%rbx), %rsi
movq (%rsp), %rcx
movq %r14, %rdi
movq %rax, %rdx
callq 0xedb9a
movq (%rsp), %rcx
addq $0xa, %rcx
movq %rcx, (%rsp)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xedcaf
movq (%rsp), %rcx
addq $0x24, %rcx
movq %rcx, (%rsp)
movl $0x1, 0x74(%r15)
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %r8
movq %r14, %rdi
movq %r15, %rdx
callq 0xedeaa
testl %eax, %eax
je 0xaba6d
movq (%rsp), %rdx
addq 0x10(%rsp), %rdx
movq %rdx, (%rsp)
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0xacba6
testl %eax, %eax
je 0xaba6d
movq (%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, (%rsp)
subq 0x28(%rbx), %rax
movq %rax, 0x30(%rbx)
jmp 0xaba82
leaq 0x7e028(%rip), %rsi     # 0x129a9c
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, 0x38(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xded32
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_RGBColor
static void handler_RGBColor(struct item_handler_data *h)
{
	UI clr16[3];
	u8 clr8[3];
	de_color clr;
	char csamp[16];
	i64 pos = h->data_pos;
	i64 k;

	for(k=0; k<3; k++) {
		clr16[k] = (UI)dbuf_getu16be_p(h->inf, &pos);
		clr8[k] = (u8)(clr16[k]>>8);
	}
	clr = DE_MAKE_RGB(clr8[0], clr8[1], clr8[2]);
	de_get_colorsample_code(h->c, clr, csamp, sizeof(csamp));
	de_dbg(h->c, "color: (0x%04x,0x%04x,0x%04x)%s", clr16[0], clr16[1], clr16[2], csamp);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
xorl %ebp, %ebp
cmpq $0x3, %rbp
je 0xabad1
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f6e
movl %eax, 0xc(%rsp,%rbp,4)
movb %ah, 0x9(%rsp,%rbp)
incq %rbp
jmp 0xabab2
movzbl 0x9(%rsp), %eax
shll $0x10, %eax
movzbl 0xa(%rsp), %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0xb(%rsp), %esi
orl %ecx, %esi
orl $0xff000000, %esi       # imm = 0xFF000000
movq (%rbx), %rdi
leaq 0x20(%rsp), %r14
pushq $0x10
popq %rcx
movq %r14, %rdx
callq 0xdf0eb
movq (%rbx), %rdi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x14(%rsp), %r8d
leaq 0x7e010(%rip), %rsi     # 0x129b2a
movq %r14, %r9
xorl %eax, %eax
callq 0xde896
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_28
static void handler_28(struct item_handler_data *h)
{
	i64 tlen;
	de_ucstring *s = NULL;
	struct pict_point pt;

	pict_read_point(h->inf, h->data_pos, &pt, "txLoc");
	tlen = (i64)dbuf_getbyte(h->inf, h->data_pos+4);
	s = ucstring_create(h->c);
	dbuf_read_to_ucstring(h->inf, h->data_pos+5, tlen, s, 0, h->d->input_encoding);
	de_dbg(h->c, "text: \"%s\"", ucstring_getpsz(s));
	h->data_len = 5+tlen;
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x28(%rdi), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe3fee
movq %rax, %r12
addq $0x2, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe3fee
movq 0x8(%r14), %rdi
leaq 0x7dfe8(%rip), %rsi     # 0x129b50
leaq 0x7dfdb(%rip), %rdx     # 0x129b4a
movl %eax, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xe3eb4
movzbl %al, %r14d
movq (%rbx), %rdi
callq 0xeac74
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x5, %rsi
movl 0x8(%rax), %r9d
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq (%rbx), %r12
movq %r15, %rdi
callq 0xeb7e4
leaq 0x821e5(%rip), %rsi     # 0x12ddb4
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x5, %r14
movq %r14, 0x30(%rbx)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_DxText
static void handler_DxText(struct item_handler_data *h)
{
	i64 tlen;
	i64 dx;
	de_ucstring *s = NULL;

	dx = (i64)dbuf_getbyte(h->inf, h->data_pos);
	de_dbg(h->c, "%s: %d", h->opcode==0x2a?"dv":"dh", (int)dx);

	tlen = (i64)dbuf_getbyte(h->inf, h->data_pos+1);
	h->data_len = 2+tlen;

	s = ucstring_create(h->c);
	dbuf_read_to_ucstring(h->inf, h->data_pos+2, tlen, s, 0, h->d->input_encoding);
	de_dbg(h->c, "text: \"%s\"", ucstring_getpsz(s));

	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3eb4
movq (%rbx), %rdi
cmpl $0x2a, 0x18(%rbx)
leaq 0x6c3a9(%rip), %rcx     # 0x117fc3
leaq 0x7df3b(%rip), %rdx     # 0x129b5c
cmoveq %rcx, %rdx
movzbl %al, %ecx
leaq 0x86184(%rip), %rsi     # 0x131db3
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
incq %rsi
callq 0xe3eb4
movzbl %al, %r14d
leaq 0x2(%r14), %rax
movq %rax, 0x30(%rbx)
movq (%rbx), %rdi
callq 0xeac74
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x2, %rsi
movl 0x8(%rax), %r9d
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xeb7e4
leaq 0x82123(%rip), %rsi     # 0x12ddb4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_2b
static void handler_2b(struct item_handler_data *h)
{
	i64 tlen;
	i64 dh, dv;
	de_ucstring *s = NULL;

	dh = (i64)dbuf_getbyte(h->inf, h->data_pos);
	dv = (i64)dbuf_getbyte(h->inf, h->data_pos+1);
	de_dbg(h->c, "dh,dv: (%d,%d)", (int)dh, (int)dv);

	tlen = (i64)dbuf_getbyte(h->inf, h->data_pos+2);
	de_dbg(h->c, "text size: %d", (int)tlen);
	h->data_len = 3+tlen;

	s = ucstring_create(h->c);
	dbuf_read_to_ucstring(h->inf, h->data_pos+3, tlen, s, 0, h->d->input_encoding);
	de_dbg(h->c, "text: \"%s\"", ucstring_getpsz(s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
incq %rsi
callq 0xe3eb4
movq (%rbx), %rdi
movzbl %bpl, %edx
movzbl %al, %ecx
leaq 0x7de7a(%rip), %rsi     # 0x129b5f
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x2, %rsi
callq 0xe3eb4
movzbl %al, %r14d
movq (%rbx), %rdi
leaq 0x7de63(%rip), %rsi     # 0x129b6e
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
leaq 0x3(%r14), %rax
movq %rax, 0x30(%rbx)
movq (%rbx), %rdi
callq 0xeac74
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x3, %rsi
movl 0x8(%rax), %r9d
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xeb7e4
leaq 0x82058(%rip), %rsi     # 0x12ddb4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_2c
static void handler_2c(struct item_handler_data *h)
{
	i64 n;
	i64 tlen;
	i64 id;
	de_ucstring *s = NULL;

	n = dbuf_getu16be(h->inf, h->data_pos);
	h->data_len = 2+n;
	id = dbuf_getu16be(h->inf, h->data_pos+2);
	de_dbg(h->c, "old font id: %d", (int)id);
	tlen = (i64)dbuf_getbyte(h->inf, h->data_pos+4);
	s = ucstring_create(h->c);
	dbuf_read_to_ucstring(h->inf, h->data_pos+5, tlen, s, 0, h->d->input_encoding);
	de_dbg(h->c, "font name: \"%s\"", ucstring_getpsz(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3f46
addq $0x2, %rax
movq %rax, 0x30(%rbx)
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x2, %rsi
callq 0xe3f46
movq (%rbx), %rdi
leaq 0x7ddd1(%rip), %rsi     # 0x129b7c
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xe3eb4
movzbl %al, %r14d
movq (%rbx), %rdi
callq 0xeac74
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x5, %rsi
movl 0x8(%rax), %r9d
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xeb7e4
leaq 0x7dd84(%rip), %rsi     # 0x129b8c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_a1
static void handler_a1(struct item_handler_data *h)
{
	i64 kind;
	i64 len;
	deark *c = h->c;

	kind = dbuf_getu16be(h->inf, h->data_pos);
	len = dbuf_getu16be(h->inf, h->data_pos+2);
	de_dbg(c, "comment kind: %d, size: %d", (int)kind, (int)len);
	h->data_len = 4+len;

	if(kind==100 && len>=4) {
		struct de_fourcc sig4cc;

		dbuf_read_fourcc(h->inf, h->data_pos+4, &sig4cc, 4, 0x0);
		de_dbg(c, "application comment, signature=0x%08x '%s'",
			(UI)sig4cc.id, sig4cc.id_dbgstr);
		de_dbg_hexdump(c, h->inf, h->data_pos+8, len-4, 256, NULL, 0x1);
	}
	else if(kind==224) {
		do_iccprofile_item(c, h->d, h->data_pos+4, len);
	}
	else {
		de_dbg_hexdump(c, h->inf, h->data_pos+4, len, 256, NULL, 0x1);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r15
movq (%rdi), %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%r15), %rsi
callq 0xe3f46
movq %rax, %r12
movq 0x10(%r15), %rdi
movq 0x28(%r15), %rsi
addq $0x2, %rsi
callq 0xe3f46
movq %rax, %r14
leaq 0x7d644(%rip), %rsi     # 0x129d9b
movq %rbx, %rdi
movl %r12d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xde896
leaq 0x4(%r14), %rax
movq %rax, 0x30(%r15)
cmpq $0x64, %r12
setne %al
cmpq $0x4, %r14
setl %cl
orb %al, %cl
jne 0xac7d0
movq 0x10(%r15), %rdi
movq 0x28(%r15), %rsi
addq $0x4, %rsi
leaq 0x10(%rsp), %r12
pushq $0x4
popq %rcx
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xe657c
movl 0x4(%r12), %edx
leaq 0x20(%rsp), %rcx
leaq 0x7d605(%rip), %rsi     # 0x129db6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %rsi
movq 0x28(%r15), %rdx
addq $0x8, %rdx
addq $-0x4, %r14
jmp 0xac883
cmpq $0xe0, %r12
jne 0xac877
cmpq $0x4, %r14
jl 0xac89e
movq 0x28(%r15), %r12
leaq 0x4(%r12), %rsi
movq 0x8(%r15), %r13
movq 0x18(%rbx), %rdi
callq 0xe404f
movq %rax, %r15
addq $-0x4, %r14
leaq 0x7d5d6(%rip), %rsi     # 0x129de1
movq %rbx, %rdi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rcx
cmpq $0x1, %r15
je 0xac852
movq %rcx, %rdi
callq 0xe5591
andq $0x0, 0x18(%r13)
testq %r15, %r15
jne 0xac89e
leaq 0x5c2cf(%rip), %rsi     # 0x108b0d
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe4e62
movq %rax, %rcx
movq %rax, 0x18(%r13)
testq %rcx, %rcx
je 0xac8ac
movq 0x18(%rbx), %rdi
addq $0x8, %r12
movq %r12, %rsi
movq %r14, %rdx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe45f4
movq 0x10(%r15), %rsi
movq 0x28(%r15), %rdx
addq $0x4, %rdx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rcx
xorl %r9d, %r9d
callq 0xded3a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x7d55d(%rip), %rsi     # 0x129e10
movq %rbx, %rdi
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xdf05a
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pict.c
// Function: handler_0c00
static void handler_0c00(struct item_handler_data *h)
{
	i64 hdrver;
	double hres, vres;
	struct pict_rect srcrect;

	hdrver = dbuf_getu16be(h->inf, h->data_pos);
	h->d->is_extended_v2 = (hdrver==0xfffe);

	de_dbg(h->c, "extended v2: %s", h->d->is_extended_v2?"yes":"no");
	if(h->d->is_extended_v2) {
		hres = pict_read_fixed(h->inf, h->data_pos+4);
		vres = pict_read_fixed(h->inf, h->data_pos+8);
		de_dbg(h->c, "dpi: %.2f"DE_CHAR_TIMES"%.2f", hres, vres);
		pict_read_rect(h->inf, h->data_pos+12, &srcrect, "srcRect");
	}
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3f46
xorl %ecx, %ecx
cmpq $0xfffe, %rax           # imm = 0xFFFE
sete %cl
movq 0x8(%rbx), %rax
movl %ecx, 0x10(%rax)
movq (%rbx), %rdi
leaq 0x7d53d(%rip), %rax     # 0x129e38
leaq 0x6e714(%rip), %rdx     # 0x11b016
cmoveq %rax, %rdx
leaq 0x7d51b(%rip), %rsi     # 0x129e28
xorl %eax, %eax
callq 0xde896
movq 0x8(%rbx), %rax
cmpl $0x0, 0x10(%rax)
je 0xac97d
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xacd1d
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x8, %rsi
callq 0xacd1d
movaps %xmm0, %xmm1
movq (%rbx), %rdi
leaq 0x7d4e9(%rip), %rsi     # 0x129e3c
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0xde896
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0xc, %rsi
leaq 0x7d2e7(%rip), %rcx     # 0x129c5a
leaq 0x10(%rsp), %rdx
callq 0xab87e
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/pkfont.c
// Function: de_module_pkfont
void de_module_pkfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "pkfont";
	mi->desc = "PK Font";
	mi->run_fn = de_run_pkfont;
	mi->identify_fn = de_identify_pkfont;
}

// Assembly:
leaq 0x7d225(%rip), %rax     # 0x129f60
movq %rax, (%rsi)
leaq 0x7d222(%rip), %rax     # 0x129f67
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xacd60
movq %rax, 0x18(%rsi)
leaq 0xbae(%rip), %rax       # 0xad909
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: de_module_png
void de_module_png(deark *c, struct deark_module_info *mi)
{
	mi->id = "png";
	mi->desc = "PNG image";
	mi->desc2 = "resources only";
	mi->run_fn = de_run_png;
	mi->identify_fn = de_identify_png;
	mi->help_fn = de_help_png;
}

// Assembly:
leaq 0x6db81(%rip), %rax     # 0x11b4f0
movq %rax, (%rsi)
leaq 0x7c927(%rip), %rax     # 0x12a2a0
movq %rax, 0x8(%rsi)
leaq 0x5a97d(%rip), %rax     # 0x108301
movq %rax, 0x10(%rsi)
leaq 0x1b(%rip), %rax        # 0xad9aa
movq %rax, 0x18(%rsi)
leaq 0x483(%rip), %rax       # 0xade1d
movq %rax, 0x20(%rsi)
leaq 0x488(%rip), %rax       # 0xade2d
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: do_identify_png_internal
static int do_identify_png_internal(deark *c)
{
	u8 buf[8];
	de_read(buf, 0, sizeof(buf));
	if(!de_memcmp(buf, g_png_sig, 8)) return DE_PNGFMT_PNG;
	if(!de_memcmp(buf, "\x8b\x4a\x4e\x47\x0d\x0a\x1a\x0a", 8)) return DE_PNGFMT_JNG;
	if(!de_memcmp(buf, "\x8a\x4d\x4e\x47\x0d\x0a\x1a\x0a", 8)) return DE_PNGFMT_MNG;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rdi), %rdi
leaq 0x8(%rsp), %rbx
pushq $0x8
popq %rcx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xe3cb7
movabsq $0xa1a0a0d474e5089, %rax # imm = 0xA1A0A0D474E5089
cmpq %rax, (%rbx)
je 0xadea5
movabsq $0xa1a0a0d474e4a8b, %rax # imm = 0xA1A0A0D474E4A8B
cmpq %rax, 0x8(%rsp)
je 0xadea9
movabsq $0xa1a0a0d474e4d8a, %rax # imm = 0xA1A0A0D474E4D8A
xorl %ecx, %ecx
cmpq %rax, 0x8(%rsp)
sete %cl
leal (%rcx,%rcx,2), %eax
jmp 0xadeac
pushq $0x1
jmp 0xadeab
pushq $0x2
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: declare_png_fmt
static void declare_png_fmt(deark *c, lctx *d)
{
	if(d->fmt==DE_PNGFMT_JNG) {
		de_declare_fmt(c, "JNG");
		return;
	}
	if(d->fmt==DE_PNGFMT_MNG) {
		de_declare_fmt(c, "MNG");
		return;
	}
	if(d->fmt!=DE_PNGFMT_PNG) return;
	if(d->is_APNG) {
		de_declare_fmt(c, "APNG");
		return;
	}
	if(d->is_CgBI) {
		de_declare_fmt(c, "CgBI");
		return;
	}
	if(!d->found_IDAT) return;
	de_declare_fmt(c, "PNG");
}

// Assembly:
movl (%rsi), %eax
cmpl $0x1, %eax
je 0xadedb
cmpl $0x2, %eax
je 0xadecf
cmpl $0x3, %eax
jne 0xadf11
leaq 0x7c4d6(%rip), %rsi     # 0x12a3a0
jmp 0xe07f7
leaq 0x7c4c6(%rip), %rsi     # 0x12a39c
jmp 0xe07f7
cmpb $0x0, 0x8(%rsi)
je 0xadeed
leaq 0x7c4bc(%rip), %rsi     # 0x12a3a4
jmp 0xe07f7
cmpb $0x0, 0x7(%rsi)
je 0xadeff
leaq 0x7c4af(%rip), %rsi     # 0x12a3a9
jmp 0xe07f7
cmpb $0x0, 0xc(%rsi)
je 0xadf11
leaq 0x7c499(%rip), %rsi     # 0x12a3a5
jmp 0xe07f7
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: finish_APNG_frame
static void finish_APNG_frame(deark *c, lctx *d)
{
	static const u8 IEND_data[12] = {0, 0, 0, 0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82};

	if(!d->curr_APNG_frame) return;

	dbuf_write(d->curr_APNG_frame, IEND_data, 12);
	dbuf_close(d->curr_APNG_frame);
	d->curr_APNG_frame = NULL;
	d->curr_fcTL_width = 0;
	d->curr_fcTL_height = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0xadf43
leaq 0x7c32a(%rip), %rsi     # 0x12a250
pushq $0xc
popq %rdx
callq 0xe46ba
movq 0x40(%rbx), %rdi
callq 0xe5591
andq $0x0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_IHDR
static void handler_IHDR(deark *c, lctx *d, struct handler_params *hp)
{
	i64 w, h;
	u8 n;
	const char *name;

	if(hp->dlen<13) return;
	w = de_getu32be(hp->dpos);
	h = de_getu32be(hp->dpos+4);
	de_dbg_dimensions(c, w, h);

	n = de_getbyte(hp->dpos+8);
	de_dbg(c, "depth: %d bits/sample", (int)n);

	d->color_type = de_getbyte(hp->dpos+9);
	switch(d->color_type) {
	case 0: name="grayscale"; break;
	case 2: name="truecolor"; break;
	case 3: name="palette"; break;
	case 4: name="grayscale+alpha"; break;
	case 6: name="truecolor+alpha"; break;
	default: name="?";
	}
	de_dbg(c, "color type: %d (%s)", (int)d->color_type, name);

	n = de_getbyte(hp->dpos+12);
	de_dbg(c, "interlaced: %d", (int)n);
}

// Assembly:
cmpq $0xd, 0x8(%rdx)
jge 0xae2e3
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xe404f
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xe404f
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xdf038
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x8, %rsi
callq 0xe3eb4
movzbl %al, %edx
leaq 0x7c25b(%rip), %rsi     # 0x12a596
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x9, %rsi
callq 0xe3eb4
movb %al, 0x9(%r15)
movzbl %al, %edx
cmpb $0x6, %al
ja 0xae370
leaq 0x7bef5(%rip), %rax     # 0x12a25c
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmp 0xae377
leaq 0x70b6a(%rip), %rcx     # 0x11eee1
leaq 0x843ba(%rip), %rsi     # 0x132738
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0xc, %rsi
callq 0xe3eb4
movzbl %al, %edx
leaq 0x63872(%rip), %rsi     # 0x111c14
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_bKGD
static void handler_bKGD(deark *c, lctx *d, struct handler_params *hp)
{
	i64 r, g, b;
	u8 idx;

	if(d->color_type==0 || d->color_type==4) {
		if(hp->dlen<2) return;
		r = de_getu16be(hp->dpos);
		de_dbg(c, "%s gray shade: %d", hp->cti->name, (int)r);
	}
	else if(d->color_type==2 || d->color_type==6) {
		if(hp->dlen<6) return;
		r = de_getu16be(hp->dpos);
		g = de_getu16be(hp->dpos+2);
		b = de_getu16be(hp->dpos+4);
		de_dbg(c, "%s: (%d,%d,%d)", hp->cti->name, (int)r, (int)g, (int)b);
	}
	else if(d->color_type==3) {
		if(hp->dlen<1) return;
		idx = de_getbyte(hp->dpos);
		de_dbg(c, "%s palette index: %d", hp->cti->name, (int)idx);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movzbl 0x9(%rsi), %eax
cmpq $0x6, %rax
ja 0xae51b
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x7bdc2(%rip), %rcx     # 0x12a200
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x2, 0x8(%r14)
jl 0xae51b
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xe3f46
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0x7c167(%rip), %rsi     # 0x12a5d4
movq %rbx, %rdi
movl %eax, %ecx
jmp 0xae509
cmpq $0x6, 0x8(%r14)
jl 0xae51b
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xe3f46
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x2, %rsi
callq 0xe3f46
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xe3f46
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0x7c123(%rip), %rsi     # 0x12a5e6
movq %rbx, %rdi
movl %r15d, %ecx
movl %r12d, %r8d
movl %eax, %r9d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xde896
cmpq $0x0, 0x8(%r14)
jle 0xae51b
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xe3eb4
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
movzbl %al, %ecx
leaq 0x7c0ef(%rip), %rsi     # 0x12a5f5
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xde896
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_acTL
static void handler_acTL(deark *c, lctx *d, struct handler_params *hp)
{
	unsigned int n;
	i64 pos = hp->dpos;

	if(!d->found_IDAT) {
		d->is_APNG = 1;
		declare_png_fmt(c, d);
	}
	if(hp->dlen<8) return;
	n = (unsigned int)de_getu32be_p(&pos);
	de_dbg(c, "num frames: %u", n);
	n = (unsigned int)de_getu32be_p(&pos);
	de_dbg(c, "num plays: %u%s", n, (n==0)?" (infinite)":"");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdx), %rax
movq %rax, (%rsp)
cmpb $0x0, 0xc(%rsi)
jne 0xae54a
movb $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0xadeb2
cmpq $0x8, 0x8(%r14)
jl 0xae5a6
movq 0x18(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0xe4071
leaq 0x585ce(%rip), %rsi     # 0x106b35
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
testl %eax, %eax
leaq 0x648a6(%rip), %rdx     # 0x112e2e
leaq 0x896d1(%rip), %rcx     # 0x137c60
cmoveq %rdx, %rcx
leaq 0x7c070(%rip), %rsi     # 0x12a60a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_cHRM
static void handler_cHRM(deark *c, lctx *d, struct handler_params *hp)
{
	i64 n[8];
	double nd[8];
	size_t i;

	if(hp->dlen<32) return;
	for(i=0; i<8; i++) {
		n[i] = de_getu32be(hp->dpos+4*(i64)i);
		nd[i] = ((double)n[i])/100000.0;
	}
	de_dbg(c, "white point: (%1.5f, %1.5f)", nd[0], nd[1]);
	de_dbg(c, "red        : (%1.5f, %1.5f)", nd[2], nd[3]);
	de_dbg(c, "green      : (%1.5f, %1.5f)", nd[4], nd[5]);
	de_dbg(c, "blue       : (%1.5f, %1.5f)", nd[6], nd[7]);
}

// Assembly:
cmpq $0x20, 0x8(%rdx)
jge 0xae5b6
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0xae5f6
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq %r15, %rsi
callq 0xe404f
cvtsi2sd %rax, %xmm0
divsd 0x7bcae(%rip), %xmm0    # 0x12a298
movsd %xmm0, (%rsp,%r15,2)
addq $0x4, %r15
jmp 0xae5c8
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x7c012(%rip), %rsi     # 0x12a61a
movq %rbx, %rdi
movb $0x2, %al
callq 0xde896
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
leaq 0x7c011(%rip), %rsi     # 0x12a636
movq %rbx, %rdi
movb $0x2, %al
callq 0xde896
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
leaq 0x7c010(%rip), %rsi     # 0x12a652
movq %rbx, %rdi
movb $0x2, %al
callq 0xde896
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
leaq 0x7c00f(%rip), %rsi     # 0x12a66e
movq %rbx, %rdi
movb $0x2, %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_caNv
static void handler_caNv(deark *c, lctx *d, struct handler_params *hp)
{
	i64 x0, x1;

	if(hp->dlen<16) return;
	x0 = de_geti32be(hp->dpos);
	x1 = de_geti32be(hp->dpos+4);
	de_dbg(c, "caNv dimensions: %dx%d", (int)x0, (int)x1);
	x0 = de_geti32be(hp->dpos+8);
	x1 = de_geti32be(hp->dpos+12);
	de_dbg(c, "caNv position: %d,%d", (int)x0, (int)x1);
}

// Assembly:
cmpq $0x10, 0x8(%rdx)
jge 0xae67a
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xe40e8
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xe40e8
leaq 0x7bfdf(%rip), %rsi     # 0x12a68a
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x8, %rsi
callq 0xe40e8
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0xc, %rsi
callq 0xe40e8
leaq 0x7bfbd(%rip), %rsi     # 0x12a6a1
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_eXIf
static void handler_eXIf(deark *c, lctx *d, struct handler_params *hp)
{
	i64 pos = hp->dpos;
	i64 len = hp->dlen;

	if(len>=6 && !dbuf_memcmp(c->infile, pos, "Exif\0", 5)) {
		// Some versions of the PNG-Exif proposal had the Exif data starting with
		// an "Exif\0\0" identifier, and some files were created in this format.
		// So we'll support it.
		de_dbg(c, "[skipping JPEG app ID]");
		pos += 6;
		len -= 6;
	}
	if(len<8) return;

	fmtutil_handle_exif(c, pos, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdx), %rbx
cmpq $0x6, %rbx
jl 0xae746
movq %rdi, %r14
movq (%rdx), %r15
movq 0x18(%rdi), %rdi
leaq 0x7bb1c(%rip), %rdx     # 0x12a234
pushq $0x5
popq %rcx
movq %r15, %rsi
callq 0xe4d48
testl %eax, %eax
jne 0xae740
leaq 0x7bf88(%rip), %rsi     # 0x12a6b6
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
addq $0x6, %r15
addq $-0x6, %rbx
cmpq $0x8, %rbx
jae 0xae74c
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xec1b2
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_fcTL
static void handler_fcTL(deark *c, lctx *d, struct handler_params *hp)
{
	i64 n1, n2;
	i64 pos = hp->dpos;
	u8 b;

	d->found_fcTL = 1;
	finish_APNG_frame(c, d); // Finished previous frame
	if(hp->dlen<26) return;
	do_APNG_seqno(c, d, pos);
	pos += 4;
	d->curr_fcTL_width = de_getu32be_p(&pos);
	d->curr_fcTL_height = de_getu32be_p(&pos);
	de_dbg_dimensions(c, d->curr_fcTL_width, d->curr_fcTL_height);
	n1 = de_getu32be_p(&pos);
	n2 = de_getu32be_p(&pos);
	de_dbg(c, "offset: (%u, %u)", (unsigned int)n1, (unsigned int)n2);
	n1 = de_getu16be_p(&pos);
	n2 = de_getu16be_p(&pos);
	de_dbg(c, "delay: %d/%d seconds", (int)n1, (int)n2);
	b = de_getbyte_p(&pos);
	de_dbg(c, "disposal type: %u (%s)", (unsigned int)b, get_apng_disp_name(b));
	b = de_getbyte_p(&pos);
	de_dbg(c, "blend type: %u (%s)", (unsigned int)b, get_apng_blend_name(b));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %r12
movb $0x1, 0xd(%rsi)
movq %rsi, %rdi
callq 0xadf12
cmpq $0x1a, 0x8(%r14)
jl 0xae8aa
movq %rbx, %rdi
movq %r12, %rsi
callq 0xaf545
addq $0x4, %r12
movq %rsp, %r14
movq %r12, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
movq %rax, 0x28(%r15)
movq 0x20(%r15), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdf038
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
leaq 0x7bedd(%rip), %rsi     # 0x12a6cd
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f6e
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f6e
leaq 0x7bebd(%rip), %rsi     # 0x12a6de
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0x7069b(%rip), %r14     # 0x11eee1
movq %r14, %rcx
cmpb $0x2, %dl
ja 0xae85e
movl %edx, %eax
leaq 0x7ba21(%rip), %rsi     # 0x12a278
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0x7be8e(%rip), %rsi     # 0x12a6f3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
callq 0xe3f2a
movzbl %al, %edx
cmpb $0x1, %dl
leaq 0x6c56a(%rip), %rax     # 0x11adf2
cmoveq %rax, %r14
testb %dl, %dl
leaq 0x729f7(%rip), %rcx     # 0x12128c
cmovneq %r14, %rcx
leaq 0x7be6a(%rip), %rsi     # 0x12a70a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_hIST
static void handler_hIST(deark *c, lctx *d, struct handler_params *hp)
{
	i64 i;
	i64 v;
	i64 nentries = hp->dlen/2;

	de_dbg(c, "number of histogram values: %d", (int)nentries);
	if(c->debug_level<2) return;
	for(i=0; i<nentries; i++) {
		v = de_getu16be(hp->dpos+i*2);
		de_dbg2(c, "freq[%3d] = %d", (int)i, (int)v);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdx), %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
movq %rax, %r15
leaq 0x7bc84(%rip), %rsi     # 0x12a740
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpl $0x2, (%r14)
jge 0xaeadb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testq %r15, %r15
cmovleq %rax, %r15
leaq 0x7bc74(%rip), %r12     # 0x12a75f
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq %r13, %r15
je 0xaeacc
movq 0x18(%r14), %rdi
movq (%rbx), %rsi
addq %rbp, %rsi
callq 0xe3f46
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde9f1
incq %r13
addq $0x2, %rbp
jmp 0xaeaf0
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_htSP
static void handler_htSP(deark *c, lctx *d, struct handler_params *hp)
{
	i64 hotspot_x, hotspot_y;

	if(hp->dlen<24) return;
	hotspot_x = de_geti32be(hp->dpos+16);
	hotspot_y = de_geti32be(hp->dpos+20);
	de_dbg(c, "hotspot: (%d, %d)", (int)hotspot_x, (int)hotspot_y);
}

// Assembly:
cmpq $0x18, 0x8(%rdx)
jge 0xaeb27
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
addq $0x10, %rsi
callq 0xe40e8
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x14, %rsi
callq 0xe40e8
leaq 0x6d57a(%rip), %rsi     # 0x11c0d6
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_pHYs
static void handler_pHYs(deark *c, lctx *d, struct handler_params *hp)
{
	i64 dx, dy;
	u8 u;
	const char *name;

	dx = de_getu32be(hp->dpos);
	dy = de_getu32be(hp->dpos+4);
	de_dbg(c, "density: %d"DE_CHAR_TIMES"%d", (int)dx, (int)dy);
	u = de_getbyte(hp->dpos+8);
	switch(u) {
	case 0: name="unspecified"; break;
	case 1: name="per meter"; break;
	default: name="?";
	}
	de_dbg(c, "units: %d (%s)", (int)u, name);
	if(u==1) {
		de_dbg(c, "approx. dpi: %.3f"DE_CHAR_TIMES"%.3f",
			(double)dx*0.0254, (double)dy*0.0254);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xe404f
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq (%r12), %rsi
addq $0x4, %rsi
callq 0xe404f
movq %rax, %r15
leaq 0x6943c(%rip), %rsi     # 0x1183c2
movq %rbx, %rdi
movl %r14d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq (%r12), %rsi
addq $0x8, %rsi
callq 0xe3eb4
movzbl %al, %ebp
cmpb $0x1, %bpl
leaq 0x7b8ac(%rip), %rax     # 0x12a861
leaq 0x6ff25(%rip), %rdx     # 0x11eee1
cmoveq %rax, %rdx
testb %bpl, %bpl
leaq 0x6bdeb(%rip), %rcx     # 0x11adb5
cmovneq %rdx, %rcx
leaq 0x7b896(%rip), %rsi     # 0x12a86b
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
cmpb $0x1, %bpl
jne 0xaf01a
cvtsi2sd %r14, %xmm0
movsd 0x592ec(%rip), %xmm2    # 0x1082e0
cvtsi2sd %r15, %xmm1
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
leaq 0x7b872(%rip), %rsi     # 0x12a87a
movq %rbx, %rdi
movb $0x2, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xde896
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_sBIT
static void handler_sBIT(deark *c, lctx *d, struct handler_params *hp)
{
	const char *sbname[4];
	i64 i;

	sbname[0] = "red";
	sbname[1] = "green";
	sbname[2] = "blue";
	sbname[3] = "alpha";
	if(d->color_type==0 || d->color_type==4) {
		sbname[0] = "gray";
		sbname[1] = "alpha";
	}

	for(i=0; i<4 && i<hp->dlen; i++) {
		u8 n;
		n = de_getbyte(hp->dpos+i);
		de_dbg(c, "significant %s bits: %d", sbname[i], (int)n);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x81747(%rip), %rax     # 0x130782
movq %rax, (%rsp)
leaq 0x7b84c(%rip), %rax     # 0x12a892
movq %rax, 0x8(%rsp)
leaq 0x6ed9d(%rip), %rax     # 0x11ddef
movq %rax, 0x10(%rsp)
leaq 0x7b558(%rip), %rax     # 0x12a5b6
movq %rax, 0x18(%rsp)
movzbl 0x9(%rsi), %ecx
testb $-0x5, %cl
jne 0xaf07c
leaq 0x5a234(%rip), %rcx     # 0x1092a7
movq %rcx, (%rsp)
movq %rax, 0x8(%rsp)
leaq 0x7b815(%rip), %r15     # 0x12a898
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0xaf0ba
cmpq 0x8(%rbx), %r12
jge 0xaf0ba
movq 0x18(%r14), %rdi
movq (%rbx), %rsi
addq %r12, %rsi
callq 0xe3eb4
movq (%rsp,%r12,8), %rdx
movzbl %al, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xde896
incq %r12
jmp 0xaf086
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_sRGB
static void handler_sRGB(deark *c, lctx *d, struct handler_params *hp)
{
	u8 intent;
	const char *name;

	if(hp->dlen<1) return;
	intent = de_getbyte(hp->dpos);
	switch(intent) {
	case 0: name="perceptual"; break;
	case 1: name="relative"; break;
	case 2: name="saturation"; break;
	case 3: name="absolute"; break;
	default: name="?";
	}
	de_dbg(c, "rendering intent: %d (%s)", (int)intent, name);
}

// Assembly:
cmpq $0x0, 0x8(%rdx)
jle 0xaf320
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xe3eb4
movzbl %al, %edx
cmpb $0x3, %dl
ja 0xaf321
movl %edx, %eax
leaq 0x7af6d(%rip), %rsi     # 0x12a284
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0xaf328
retq
leaq 0x6fbb9(%rip), %rcx     # 0x11eee1
leaq 0x6a391(%rip), %rsi     # 0x1196c0
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: handler_tIME
static void handler_tIME(deark *c, lctx *d, struct handler_params *hp)
{
	i64 yr;
	u8 mo, da, hr, mi, se;
	struct de_timestamp ts;
	char timestamp_buf[64];

	yr = de_getu16be(hp->dpos);
	mo = de_getbyte(hp->dpos+2);
	da = de_getbyte(hp->dpos+3);
	hr = de_getbyte(hp->dpos+4);
	mi = de_getbyte(hp->dpos+5);
	se = de_getbyte(hp->dpos+6);

	de_make_timestamp(&ts, yr, mo, da, hr, mi, se);
	ts.tzcode = DE_TZCODE_UTC;
	de_timestamp_to_string(&ts, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "mod time: %s", timestamp_buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xe3f46
movq %rax, 0x8(%rsp)
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
addq $0x2, %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
addq $0x3, %rsi
callq 0xe3eb4
movl %eax, %r12d
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
addq $0x4, %rsi
callq 0xe3eb4
movl %eax, %r13d
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
addq $0x5, %rsi
callq 0xe3eb4
movl %eax, %r14d
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
addq $0x6, %rsi
callq 0xe3eb4
movzbl %bpl, %edx
movzbl %r12b, %ecx
movzbl %r13b, %r8d
movzbl %r14b, %r9d
movzbl %al, %eax
movq %rax, (%rsp)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0xe0174
movb $0x1, 0x1(%r14)
leaq 0x20(%rsp), %r15
pushq $0x40
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xe0644
leaq 0x626bb(%rip), %rsi     # 0x111abf
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x68, %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/png.c
// Function: handler_tRNS
static void handler_tRNS(deark *c, lctx *d, struct handler_params *hp)
{
	i64 r, g, b;

	if(d->color_type==0) {
		if(hp->dlen<2) return;
		r = de_getu16be(hp->dpos);
		de_dbg(c, "transparent color gray shade: %d", (int)r);
	}
	else if(d->color_type==2) {
		if(hp->dlen<6) return;
		r = de_getu16be(hp->dpos);
		g = de_getu16be(hp->dpos+2);
		b = de_getu16be(hp->dpos+4);
		de_dbg(c, "transparent color: (%d,%d,%d)", (int)r, (int)g, (int)b);
	}
	else if(d->color_type==3) {
		i64 i;
		u8 a;

		de_dbg(c, "number of alpha values: %d", (int)hp->dlen);
		if(c->debug_level<2) return;
		for(i=0; i<hp->dlen && i<256; i++) {
			a = de_getbyte(hp->dpos+i);
			de_dbg2(c, "alpha[%3d] = %d", (int)i, (int)a);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movzbl 0x9(%rsi), %eax
cmpl $0x3, %eax
je 0xaf4df
cmpl $0x2, %eax
je 0xaf47d
testl %eax, %eax
jne 0xaf539
cmpq $0x2, 0x8(%r14)
jl 0xaf539
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xe3f46
leaq 0x7b4b5(%rip), %rsi     # 0x12a91b
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xde896
cmpq $0x6, 0x8(%r14)
jl 0xaf539
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xe3f46
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x2, %rsi
callq 0xe3f46
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xe3f46
leaq 0x7b47b(%rip), %rsi     # 0x12a93c
movq %rbx, %rdi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xde896
movl 0x8(%r14), %edx
leaq 0x7b470(%rip), %rsi     # 0x12a95a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpl $0x2, (%rbx)
jl 0xaf539
leaq 0x7b475(%rip), %r15     # 0x12a975
xorl %r12d, %r12d
cmpq $0xff, %r12
ja 0xaf539
cmpq 0x8(%r14), %r12
jge 0xaf539
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq %r12, %rsi
callq 0xe3eb4
movzbl %al, %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde9f1
incq %r12
jmp 0xaf503
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/png.c
// Function: do_text_field
static int do_text_field(deark *c, lctx *d,
	struct text_chunk_ctx *tcc, int which_field,
	i64 pos, i64 bytes_avail,
	int is_nul_terminated, int is_compressed, de_encoding encoding,
	i64 *bytes_consumed)
{
	dbuf *tmpdbuf = NULL;
	int retval = 0;
	i64 bytes_consumed2;

	if(!is_compressed) {
		retval = do_unc_text_field(c, d, tcc,
			which_field, c->infile, pos, bytes_avail,
			is_nul_terminated, encoding, bytes_consumed);
		goto done;
	}

	// Decompress to a membuf, then call do_unc_text_field() with that membuf.
	// Note that a compressed field cannot be NUL-terminated.
	*bytes_consumed = bytes_avail;

	tmpdbuf = dbuf_create_membuf(c, 0, 0);
	if(!fmtutil_decompress_deflate(c->infile, pos, bytes_avail, tmpdbuf, 0, NULL,
		d->is_CgBI ? 0 : DE_DEFLATEFLAG_ISZLIB))
	{
		goto done;
	}

	retval = do_unc_text_field(c, d, tcc,
		which_field, tmpdbuf, 0, tmpdbuf->len,
		0, encoding, &bytes_consumed2);

done:
	dbuf_close(tmpdbuf);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbp
movq %r8, %rbx
movl %ecx, %r8d
movq %rdi, %r12
movq 0x88(%rsp), %rax
movl 0x80(%rsp), %edi
cmpl $0x0, 0x78(%rsp)
je 0xaf659
movq %rsi, %r14
movq %rdx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movq %rbp, (%rax)
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe59cd
movq %rax, %r15
movq 0x18(%r12), %rdi
xorl %eax, %eax
cmpb $0x0, 0x7(%r14)
sete %al
movl %eax, (%rsp)
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf4638
testl %eax, %eax
je 0xaf688
movq 0x18(%r15), %r9
leaq 0x30(%rsp), %rax
andl $0x0, (%rsp)
movq %rax, 0x10(%rsp)
movl 0x80(%rsp), %eax
movl %eax, 0x8(%rsp)
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xaf6a2
movl %eax, %r13d
jmp 0xaf688
movl 0x70(%rsp), %esi
movq 0x18(%r12), %rcx
movq %rax, 0x10(%rsp)
movl %edi, 0x8(%rsp)
movl %esi, (%rsp)
movq %r12, %rdi
movq %rdx, %rsi
movl %r8d, %edx
movq %rbx, %r8
movq %rbp, %r9
callq 0xaf6a2
movl %eax, %r13d
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xe5591
movl %r13d, %eax
addq $0x38, %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/pnm.c
// Function: de_module_pnm
void de_module_pnm(deark *c, struct deark_module_info *mi)
{
	mi->id = "pnm";
	mi->desc = "Netpbm formats (PNM, PBM, PGM, PPM, PAM)";
	mi->run_fn = de_run_pnm;
	mi->identify_fn = de_identify_pnm;
}

// Assembly:
leaq 0x7aefd(%rip), %rax     # 0x12aa4c
movq %rax, (%rsi)
leaq 0x7aef7(%rip), %rax     # 0x12aa50
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xafb74
movq %rax, 0x18(%rsi)
leaq 0x924(%rip), %rax       # 0xb0493
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq 0x18(%rdi), %rdi
leaq 0xd(%rsp), %rbx
pushq $0x3
popq %rcx
movq %rbx, %rsi
callq 0xe3cb7
xorl %eax, %eax
cmpb $0x50, (%rbx)
jne 0xb050f
movzbl 0xe(%rsp), %ecx
movl %ecx, %esi
xorb $0x37, %sil
movb 0xf(%rsp), %dl
movl %edx, %edi
xorb $0xa, %dil
orb %sil, %dil
jne 0xb04e7
pushq $0x7
popq %rax
jmp 0xb050f
leal -0x31(%rcx), %esi
cmpb $0x5, %sil
ja 0xb050f
movzbl %dl, %edx
cmpl $0x20, %edx
ja 0xb050f
movl %edx, %edx
movabsq $0x100002600, %rsi      # imm = 0x100002600
btq %rdx, %rsi
jae 0xb050f
addl $-0x30, %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq $0x30, %r15
xorl %ebx, %ebx
xorl %eax, %eax
cmpq $0x63, %rax
ja 0xb0602
movq %rax, %r13
movb $0x1, %bpl
movq (%r15), %rax
movq 0x18(%r12), %rdi
cmpq 0x18(%rdi), %rax
jge 0xb0602
movq %r15, %rsi
callq 0xe3f2a
testb $0x1, %bpl
je 0xb05c2
xorl %ebp, %ebp
cmpb $0x23, %al
je 0xb059e
jmp 0xb05d2
cmpb $0xd, %al
sete %cl
cmpb $0xa, %al
sete %bpl
orb %cl, %bpl
jmp 0xb059e
movzbl %al, %ecx
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jae 0xb05e9
movl $0x0, %eax
testq %r13, %r13
je 0xb0592
jmp 0xb05fa
cmpl $0x20, %ecx
je 0xb05dd
movb %al, (%r14,%r13)
incq %r13
movq %r13, %rax
jmp 0xb0592
movb $0x0, (%r14,%r13)
pushq $0x1
popq %rbx
movl %ebx, %eax
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/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 %rbx
movq %rdi, %rbx
addq $0x20, %rdi
movq 0x18(%rbx), %rax
movb $0x0, 0x20(%rbx,%rax)
callq 0xdfb3b
andq $0x0, 0x18(%rbx)
cmpb $0x1, (%rbx)
movq 0x10(%rbx), %rdi
jne 0xb09a2
movzbl %al, %esi
callq 0xe5bc5
jmp 0xb09aa
movq %rax, %rsi
callq 0xe5f1e
incq 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0x7a226(%rip), %rax     # 0x12abdd
movq %rax, (%rsi)
leaq 0x7a220(%rip), %rax     # 0x12abe1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb09dc
movq %rax, 0x18(%rsi)
leaq 0x234(%rip), %rax       # 0xb0c0b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0x79fc7(%rip), %rax     # 0x12abfb
movq %rax, (%rsi)
leaq 0x79fc4(%rip), %rax     # 0x12ac02
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb0c59
movq %rax, 0x18(%rsi)
leaq 0x44(%rip), %rax        # 0xb0c98
movq %rax, 0x20(%rsi)
retq