LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: get_chunk_type_info
static void get_chunk_type_info(deark *c, lctx *d,
	struct handler_params *hp)
{
	size_t i;
	u32 flags_mask;

	switch(d->fmt) {
	case DE_PNGFMT_MNG: flags_mask = 0x4; break;
	case DE_PNGFMT_JNG: flags_mask = 0x2; break;
	default: flags_mask = 0x1; break;
	}

	for(i=0; i<DE_ARRAYCOUNT(chunk_type_info_arr); i++) {
		const struct chunk_type_info_struct *cti = &chunk_type_info_arr[i];

		if(cti->id != hp->chunk4cc.id) continue;
		if(!(cti->flags & flags_mask)) continue;

		// Chunks needing further tests are hardcoded here
		if(cti->id==CODE_htSP) {
			if(!chunk_is_deark_htSP(c, hp)) continue;
		}

		hp->cti = cti;
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x2, %eax
je 0x10ad67
jmp 0x10ad54
movl -0x34(%rbp), %eax
subl $0x3, %eax
jne 0x10ad70
jmp 0x10ad5e
movl $0x4, -0x24(%rbp)
jmp 0x10ad77
movl $0x2, -0x24(%rbp)
jmp 0x10ad77
movl $0x1, -0x24(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x3d, -0x20(%rbp)
jae 0x10adf9
leaq 0x112073(%rip), %rax    # 0x21ce00
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
je 0x10adaa
jmp 0x10adeb
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
jne 0x10adbb
jmp 0x10adeb
movq -0x30(%rbp), %rax
cmpl $0x68745350, (%rax)     # imm = 0x68745350
jne 0x10addd
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10af80
cmpl $0x0, %eax
jne 0x10addb
jmp 0x10adeb
jmp 0x10addd
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x10adf9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10ad7f
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: do_check_chunk_crc
static void do_check_chunk_crc(deark *c, lctx *d, struct chunk_ctx *cctx, int suppress_idat_dbg)
{
	if(d->crco) {
		de_crcobj_reset(d->crco);
	}
	else {
		d->crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);
	}

	// Don't include Length field, start with Type field
	de_crcobj_addslice(d->crco, c->infile, cctx->pos + 4, cctx->hp.dlen + 4);

	cctx->crc_calc = de_crcobj_getval(d->crco);
	if(!suppress_idat_dbg) {
		de_dbg(c, "crc32 (calculated): 0x%08x", (unsigned int)cctx->crc_calc);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x10ae81
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x15f250
jmp 0x10ae9a
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15eac0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
addq $0x4, %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4, %rcx
callq 0x15f500
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x15f340
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x54(%rax)
cmpl $0x0, -0x1c(%rbp)
jne 0x10aefc
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x54(%rax), %edx
leaq 0xa1414(%rip), %rsi     # 0x1ac309
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x10af2d
jmp 0x10af77
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
leaq 0xb7f14(%rip), %rsi     # 0x1c2e50
movl $0xc, %edx
callq 0x166170
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: chunk_is_deark_htSP
static int chunk_is_deark_htSP(deark *c, struct handler_params *hp)
{
	u8 buf[16];
	static const u8 uuid[16] = {0xb9,0xfe,0x4f,0x3d,0x8f,0x32,0x45,0x6f,
		0xaa,0x02,0xdc,0xd7,0x9c,0xce,0x0e,0x24};

	if(hp->dlen<24) return 0;
	de_read(buf, hp->dpos, 16);
	if(de_memcmp(buf, uuid, 16)) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x18, 0x8(%rax)
jge 0x10afa4
movl $0x0, -0x4(%rbp)
jmp 0x10aff7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0x10, %ecx
callq 0x164d10
leaq -0x30(%rbp), %rax
movups (%rax), %xmm0
movaps 0xb7e21(%rip), %xmm1    # 0x1c2df0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x10aff0
movl $0x0, -0x4(%rbp)
jmp 0x10aff7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: handler_CgBI
static void handler_CgBI(deark *c, lctx *d, struct handler_params *hp)
{
	if(!d->found_IDAT) {
		d->is_CgBI = 1;
		d->extract_from_APNG_enabled = 0;
		declare_png_fmt(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0xc(%rax)
jne 0x10b03b
movq -0x10(%rbp), %rax
movb $0x1, 0x7(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0xa(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10ac80
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: handler_IDAT
static void handler_IDAT(deark *c, lctx *d, struct handler_params *hp)
{
	if(!d->found_IDAT) {
		d->found_IDAT = 1;
		// In case format declaration was deferred, do it now.
		declare_png_fmt(c, d);

		prepare_PNG_extraction_from_APNG(c, d);

		if(d->fmt==DE_PNGFMT_PNG && !d->is_CgBI && !d->IDAT_prefix) {
			d->IDAT_prefix = dbuf_create_membuf(c, 8, 0x1);
		}

		if(d->opt_want_raw_zlib && d->fmt==DE_PNGFMT_PNG && !d->is_CgBI &&
			!d->raw_zlib)
		{
			d->raw_zlib = dbuf_create_output_file(c, "zlib", NULL, 0);
		}
	}

	// Collect at least the first 2 bytes of IDAT data for analysis.
	// We allow for the possibility that the bytes are not all in the same chunk.
	if(d->IDAT_prefix && d->IDAT_prefix->len<2) {
		i64 n;

		n = de_min_int(2, hp->dlen);
		dbuf_copy(c->infile, hp->dpos, n, d->IDAT_prefix);
		if(d->IDAT_prefix->len>=2) {
			decode_zlib_header(c, d);
		}
	}

	if(d->raw_zlib) {
		dbuf_copy(c->infile, hp->dpos, hp->dlen, d->raw_zlib);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0xc(%rax)
jne 0x10b11e
movq -0x10(%rbp), %rax
movb $0x1, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10ac80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10cdb0
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10b0d0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x7(%rax)
jne 0x10b0d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x10b0d0
movq -0x8(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x168020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movzbl 0x6(%rax), %eax
cmpl $0x0, %eax
je 0x10b11c
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10b11c
movq -0x10(%rbp), %rax
cmpb $0x0, 0x7(%rax)
jne 0x10b11c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x10b11c
movq -0x8(%rbp), %rdi
leaq 0xb7d94(%rip), %rsi     # 0x1c2e9a
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
jmp 0x10b11e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x10b18c
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x2, 0x18(%rax)
jge 0x10b18c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x2, %edi
callq 0x15ccf0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
callq 0x166070
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x2, 0x18(%rax)
jl 0x10b18a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10d0c0
jmp 0x10b18c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x10b1bb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
callq 0x166070
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0xd, 0x8(%rax)
jge 0x10b1f4
jmp 0x10b34c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165470
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x165470
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x15bba0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x29(%rbp), %edx
leaq 0xb7efb(%rip), %rsi     # 0x1c315e
xorl %eax, %eax
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x9, %rsi
callq 0x165060
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
movq %rax, -0x40(%rbp)
subq $0x6, %rax
ja 0x10b2f2
movq -0x40(%rbp), %rax
leaq 0xb7b58(%rip), %rcx     # 0x1c2e00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x96c10(%rip), %rax     # 0x1a1ec8
movq %rax, -0x38(%rbp)
jmp 0x10b2fd
leaq 0xb6a28(%rip), %rax     # 0x1c1ced
movq %rax, -0x38(%rbp)
jmp 0x10b2fd
leaq 0xb6ae4(%rip), %rax     # 0x1c1db6
movq %rax, -0x38(%rbp)
jmp 0x10b2fd
leaq 0xb7e95(%rip), %rax     # 0x1c3174
movq %rax, -0x38(%rbp)
jmp 0x10b2fd
leaq 0xb6a0b(%rip), %rax     # 0x1c1cf7
movq %rax, -0x38(%rbp)
jmp 0x10b2fd
leaq 0xac934(%rip), %rax     # 0x1b7c2d
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %edx
movq -0x38(%rbp), %rcx
leaq 0xc03c9(%rip), %rsi     # 0x1cb6dd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0xc, %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x29(%rbp), %edx
leaq 0x9f51b(%rip), %rsi     # 0x1aa860
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x0, %eax
je 0x10b41e
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x4, %eax
jne 0x10b46f
movq -0x18(%rbp), %rax
cmpq $0x2, 0x8(%rax)
jge 0x10b42e
jmp 0x10b578
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movl %eax, %ecx
leaq 0xb7d39(%rip), %rsi     # 0x1c319c
movb $0x0, %al
callq 0x15b0d0
jmp 0x10b578
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x2, %eax
je 0x10b48d
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x6, %eax
jne 0x10b521
movq -0x18(%rbp), %rax
cmpq $0x6, 0x8(%rax)
jge 0x10b49d
jmp 0x10b578
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x1651d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %eax, %r8d
movq -0x30(%rbp), %rax
movl %eax, %r9d
leaq 0xb7c96(%rip), %rsi     # 0x1c31ae
movb $0x0, %al
callq 0x15b0d0
jmp 0x10b576
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x3, %eax
jne 0x10b574
movq -0x18(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jge 0x10b53b
jmp 0x10b578
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165060
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdx
movzbl -0x31(%rbp), %ecx
leaq 0xb7c50(%rip), %rsi     # 0x1c31bd
movb $0x0, %al
callq 0x15b0d0
jmp 0x10b576
jmp 0x10b578
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0xc(%rax)
jne 0x10b5be
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10ac80
movq -0x18(%rbp), %rax
cmpq $0x8, 0x8(%rax)
jge 0x10b5cb
jmp 0x10b635
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x944d8(%rip), %rsi     # 0x19fac5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x1c(%rbp), %esi
leaq 0xc55b7(%rip), %rcx     # 0x1d0bd0
leaq 0xa0422(%rip), %rax     # 0x1aba42
cmpl $0x0, %esi
cmoveq %rax, %rcx
leaq 0xb7ba4(%rip), %rsi     # 0x1c31d2
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x20, 0x8(%rax)
jge 0x10b667
jmp 0x10b767
movq $0x0, -0xa8(%rbp)
cmpq $0x8, -0xa8(%rbp)
jae 0x10b6eb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0xa8(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x165470
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movq %rcx, -0x60(%rbp,%rax,8)
movq -0xa8(%rbp), %rax
cvtsi2sdq -0x60(%rbp,%rax,8), %xmm0
movsd 0xb779d(%rip), %xmm1    # 0x1c2e60
divsd %xmm1, %xmm0
movq -0xa8(%rbp), %rax
movsd %xmm0, -0xa0(%rbp,%rax,8)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x10b672
movq -0x8(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
leaq 0xb7adc(%rip), %rsi     # 0x1c31e2
movb $0x2, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
leaq 0xb7ad6(%rip), %rsi     # 0x1c31fe
movb $0x2, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
leaq 0xb7ad6(%rip), %rsi     # 0x1c321a
movb $0x2, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
leaq 0xb7ad6(%rip), %rsi     # 0x1c3236
movb $0x2, %al
callq 0x15b0d0
addq $0xb0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x10, 0x8(%rax)
jge 0x10b794
jmp 0x10b83c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1655d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x1655d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0xb7a73(%rip), %rsi     # 0x1c3252
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x1655d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0xc, %rsi
callq 0x1655d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0xb7a34(%rip), %rsi     # 0x1c3269
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x6, -0x28(%rbp)
jl 0x10b8ce
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0xb759f(%rip), %rdx     # 0x1c2e34
movl $0x5, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x10b8ce
movq -0x8(%rbp), %rdi
leaq 0xb79cf(%rip), %rsi     # 0x1c327e
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
subq $0x6, %rax
movq %rax, -0x28(%rbp)
cmpq $0x8, -0x28(%rbp)
jge 0x10b8d7
jmp 0x10b8e8
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1736c0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0xb751d(%rip), %rsi     # 0x1c3308
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jge 0x10bdfd
jmp 0x10be5d
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x10be5d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
shlq %rax
addq %rax, %rsi
callq 0x1651d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0xb74df(%rip), %rsi     # 0x1c3327
movb $0x0, %al
callq 0x15b350
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10be05
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x18, 0x8(%rax)
jge 0x10be91
jmp 0x10bee7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x10, %rsi
callq 0x1655d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x14, %rsi
callq 0x1655d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0xa8d64(%rip), %rsi     # 0x1b4c44
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165470
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x165470
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %edx
movl -0x28(%rbp), %ecx
leaq 0xa4519(%rip), %rsi     # 0x1b0a32
xorl %eax, %eax
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x8, %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x10c552
jmp 0x10c548
movl -0x3c(%rbp), %eax
subl $0x1, %eax
je 0x10c55f
jmp 0x10c56c
leaq 0xa7244(%rip), %rax     # 0x1b379d
movq %rax, -0x38(%rbp)
jmp 0x10c577
leaq 0xb6ec3(%rip), %rax     # 0x1c3429
movq %rax, -0x38(%rbp)
jmp 0x10c577
leaq 0xab6ba(%rip), %rax     # 0x1b7c2d
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x29(%rbp), %edx
movq -0x38(%rbp), %rcx
leaq 0xb6ea9(%rip), %rsi     # 0x1c3433
movb $0x0, %al
callq 0x15b0d0
movzbl -0x29(%rbp), %eax
cmpl $0x1, %eax
jne 0x10c5d0
movq -0x8(%rbp), %rdi
cvtsi2sdq -0x20(%rbp), %xmm0
movsd 0x94c04(%rip), %xmm1    # 0x1a11b0
mulsd %xmm1, %xmm0
cvtsi2sdq -0x28(%rbp), %xmm1
movsd 0x94bf2(%rip), %xmm2    # 0x1a11b0
mulsd %xmm2, %xmm1
leaq 0xb6e79(%rip), %rsi     # 0x1c3442
movb $0x2, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0xbd123(%rip), %rax     # 0x1c971e
movq %rax, -0x40(%rbp)
leaq 0xb6e54(%rip), %rax     # 0x1c345a
movq %rax, -0x38(%rbp)
leaq 0xaa473(%rip), %rax     # 0x1b6a84
movq %rax, -0x30(%rbp)
leaq 0xb6b62(%rip), %rax     # 0x1c317e
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x0, %eax
je 0x10c63a
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x4, %eax
jne 0x10c650
leaq 0x95b3e(%rip), %rax     # 0x1a217f
movq %rax, -0x40(%rbp)
leaq 0xb6b32(%rip), %rax     # 0x1c317e
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x4, -0x48(%rbp)
movb %al, -0x4a(%rbp)
jge 0x10c676
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setl %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x10c67f
jmp 0x10c6c7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq -0x48(%rbp), %rsi
callq 0x165060
movb %al, -0x49(%rbp)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rdx
movzbl -0x49(%rbp), %ecx
leaq 0xb6dae(%rip), %rsi     # 0x1c3460
movb $0x0, %al
callq 0x15b0d0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x10c658
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jge 0x10ca34
jmp 0x10cac6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movq %rax, -0x30(%rbp)
subq $0x3, %rax
ja 0x10caa1
movq -0x30(%rbp), %rax
leaq 0xb63b8(%rip), %rcx     # 0x1c2e1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa565a(%rip), %rax     # 0x1b20ce
movq %rax, -0x28(%rbp)
jmp 0x10caac
leaq 0xb6a50(%rip), %rax     # 0x1c34d1
movq %rax, -0x28(%rbp)
jmp 0x10caac
leaq 0xa5661(%rip), %rax     # 0x1b20ef
movq %rax, -0x28(%rbp)
jmp 0x10caac
leaq 0xb6a3f(%rip), %rax     # 0x1c34da
movq %rax, -0x28(%rbp)
jmp 0x10caac
leaq 0xab185(%rip), %rax     # 0x1b7c2d
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x19(%rbp), %edx
movq -0x28(%rbp), %rcx
leaq 0xa5651(%rip), %rsi     # 0x1b2110
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x2, %rsi
callq 0x165060
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x3, %rsi
callq 0x165060
movb %al, -0x22(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x165060
movb %al, -0x23(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x5, %rsi
callq 0x165060
movb %al, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x6, %rsi
callq 0x165060
movb %al, -0x25(%rbp)
movq -0x20(%rbp), %rsi
movzbl -0x21(%rbp), %eax
movl %eax, %edx
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
movzbl -0x23(%rbp), %eax
movl %eax, %r8d
movzbl -0x24(%rbp), %eax
movl %eax, %r9d
movzbl -0x25(%rbp), %eax
leaq -0x38(%rbp), %rdi
movq %rax, (%rsp)
callq 0x15d830
movb $0x1, -0x37(%rbp)
leaq -0x80(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x9db2f(%rip), %rsi     # 0x1aa70b
movb $0x0, %al
callq 0x15b0d0
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x0, %eax
jne 0x10cc56
movq -0x18(%rbp), %rax
cmpq $0x2, 0x8(%rax)
jge 0x10cc21
jmp 0x10cda6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xb6899(%rip), %rsi     # 0x1c34e3
movb $0x0, %al
callq 0x15b0d0
jmp 0x10cda6
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x2, %eax
jne 0x10ccf1
movq -0x18(%rbp), %rax
cmpq $0x6, 0x8(%rax)
jge 0x10cc77
jmp 0x10cda6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x4, %rsi
callq 0x1651d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %eax, %r8d
leaq 0xb681f(%rip), %rsi     # 0x1c3504
movb $0x0, %al
callq 0x15b0d0
jmp 0x10cda4
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
cmpl $0x3, %eax
jne 0x10cda2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %edx
leaq 0xb680b(%rip), %rsi     # 0x1c3522
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jge 0x10cd29
jmp 0x10cda6
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x3a(%rbp)
jge 0x10cd52
cmpq $0x100, -0x38(%rbp)     # imm = 0x100
setl %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x10cd5b
jmp 0x10cda0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x39(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movzbl -0x39(%rbp), %ecx
leaq 0xb67b2(%rip), %rsi     # 0x1c353d
movb $0x0, %al
callq 0x15b350
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x10cd31
jmp 0x10cda2
jmp 0x10cda4
jmp 0x10cda6
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: decode_zlib_header
static void decode_zlib_header(deark *c, lctx *d)
{
	u8 cmf, flg;

	if(!d->IDAT_prefix) return;

	// TODO: Consider consolidating this with the redundant code in
	// lzh_read_zlib_header() (in another file). But it's a lot of trouble.
	cmf = dbuf_getbyte(d->IDAT_prefix, 0);
	flg = dbuf_getbyte(d->IDAT_prefix, 1);
	de_dbg(c, "zlib window size: %u", (UI)(1U<<(((UI)cmf>>4)+8)));
	de_dbg(c, "zlib cmpr level (0-3): %u", (UI)(flg>>6));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x10d0dd
jmp 0x10d142
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x1, %esi
callq 0x165060
movb %al, -0x12(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %ecx
shrl $0x4, %ecx
addl $0x8, %ecx
movl $0x1, %edx
shll %cl, %edx
leaq 0xb600d(%rip), %rsi     # 0x1c312f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movzbl -0x12(%rbp), %edx
sarl $0x6, %edx
leaq 0xb6009(%rip), %rsi     # 0x1c3144
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: get_apng_disp_name
static const char *get_apng_disp_name(u8 t)
{
	switch(t) {
	case 0: return "none"; break;
	case 1: return "background"; break;
	case 2: return "previous"; break;
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x10d1cb
jmp 0x10d1b7
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x10d1d8
jmp 0x10d1c1
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0x10d1e5
jmp 0x10d1f2
leaq 0x8f53b(%rip), %rax     # 0x19c70d
movq %rax, -0x8(%rbp)
jmp 0x10d1fd
leaq 0x9e743(%rip), %rax     # 0x1ab922
movq %rax, -0x8(%rbp)
jmp 0x10d1fd
leaq 0x9e74c(%rip), %rax     # 0x1ab938
movq %rax, -0x8(%rbp)
jmp 0x10d1fd
leaq 0xaaa34(%rip), %rax     # 0x1b7c2d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: get_apng_blend_name
static const char *get_apng_blend_name(u8 t)
{
	switch(t) {
	case 0: return "source"; break;
	case 1: return "over"; break;
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x10d231
jmp 0x10d227
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x10d23e
jmp 0x10d24b
leaq 0xacde2(%rip), %rax     # 0x1ba01a
movq %rax, -0x8(%rbp)
jmp 0x10d256
leaq 0xa6595(%rip), %rax     # 0x1b37da
movq %rax, -0x8(%rbp)
jmp 0x10d256
leaq 0xaa9db(%rip), %rax     # 0x1b7c2d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x0, 0x18(%rbp)
jne 0x10d32d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %r8
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %rbx
movl 0x10(%rbp), %r11d
movl 0x20(%rbp), %r10d
movq 0x28(%rbp), %rax
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x10d3f0
movl %eax, -0x44(%rbp)
jmp 0x10d3d8
movq -0x38(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %r9d
movl $0x1, %eax
xorl %r8d, %r8d
cmpl $0x0, %r9d
cmovnel %r8d, %eax
xorl %r8d, %r8d
movl %r8d, %r9d
movq %r9, %r8
movl %eax, (%rsp)
callq 0x17f4f0
cmpl $0x0, %eax
jne 0x10d390
jmp 0x10d3d8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %r8
movq -0x40(%rbp), %rax
movq 0x18(%rax), %r11
movl 0x20(%rbp), %r10d
xorl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
leaq -0x50(%rbp), %rax
movq %r11, (%rsp)
movl $0x0, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x10d3f0
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1676a0
movl -0x44(%rbp), %eax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/png.c
// Function: on_im_generic_profile_keyword
static void on_im_generic_profile_keyword(deark *c, lctx *d,
	struct text_chunk_ctx *tcc, struct de_stringreaderdata *srd)
{
	char typestr[32];

	tcc->is_im_generic_profile = 1;
	tcc->im_generic_profile_type = 0;
	tcc->im_generic_profile_type_name = NULL;
	tcc->suppress_debugstr = 1;

	de_bytes_to_printable_sz((const u8*)(srd->sz+17), de_strlen(srd->sz+17),
		typestr, sizeof(typestr), 0, DE_ENCODING_ASCII);

	if(!de_strcmp(typestr, "8bim")) {
		tcc->im_generic_profile_type = PROFILETYPE_8BIM;
		tcc->im_generic_profile_type_name = "Photoshop";
	}
	else if(!de_strcmp(typestr, "iptc")) {
		tcc->im_generic_profile_type = PROFILETYPE_IPTC;
		tcc->im_generic_profile_type_name = "IPTC";
	}
	else if(!de_strcmp(typestr, "xmp")) {
		tcc->im_generic_profile_type = PROFILETYPE_XMP;
		tcc->im_generic_profile_type_name = "XMP";
	}
	else if(!de_strcmp(typestr, "icc")) {
		tcc->im_generic_profile_type = PROFILETYPE_ICC;
		tcc->im_generic_profile_type_name = "ICC";
	}
	else {
		if(c->extract_level<2) {
			tcc->suppress_debugstr = 0;
		}
	}
}

// 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 -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x11, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x11, %rdi
callq 0x190e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
leaq -0x40(%rbp), %rdx
movl $0x20, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x161ab0
leaq -0x40(%rbp), %rdi
leaq 0xb1202(%rip), %rsi     # 0x1be980
callq 0x191a0
cmpl $0x0, %eax
jne 0x10d7a7
movq -0x18(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xb11e7(%rip), %rcx     # 0x1be985
movq %rcx, 0x10(%rax)
jmp 0x10d859
leaq -0x40(%rbp), %rdi
leaq 0xc8770(%rip), %rsi     # 0x1d5f22
callq 0x191a0
cmpl $0x0, %eax
jne 0x10d7d8
movq -0x18(%rbp), %rax
movl $0x2, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xc8765(%rip), %rcx     # 0x1d5f37
movq %rcx, 0x10(%rax)
jmp 0x10d857
leaq -0x40(%rbp), %rdi
leaq 0xb5be3(%rip), %rsi     # 0x1c33c6
callq 0x191a0
cmpl $0x0, %eax
jne 0x10d809
movq -0x18(%rbp), %rax
movl $0x3, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xa9c64(%rip), %rcx     # 0x1b7467
movq %rcx, 0x10(%rax)
jmp 0x10d855
leaq -0x40(%rbp), %rdi
leaq 0x941d1(%rip), %rsi     # 0x1a19e5
callq 0x191a0
cmpl $0x0, %eax
jne 0x10d83a
movq -0x18(%rbp), %rax
movl $0x4, 0xc(%rax)
movq -0x18(%rbp), %rax
leaq 0xa9c2e(%rip), %rcx     # 0x1b7462
movq %rcx, 0x10(%rax)
jmp 0x10d853
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jge 0x10d851
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x10d853
jmp 0x10d855
jmp 0x10d857
jmp 0x10d859
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb5b19(%rip), %rcx     # 0x1c3600
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb5b0f(%rip), %rcx     # 0x1c3604
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x10db20
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xed(%rip), %rcx        # 0x10dc00
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pnm.c
// Function: de_run_pnm
static void de_run_pnm(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	int ret;
	int pagenum = 0;

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

	pos = 0;
	while(1) {
		if(c->infile->len - pos < 8) break;
		d->last_fmt = 0;
		d->last_bytesused = 0;
		ret = do_page(c, d, pagenum, pos);
		if(!ret) break;
		if(d->last_bytesused<8) break;

		if(!fmt_is_binary(d->last_fmt))
		{
			break; // ASCII formats don't support multiple images
		}

		pos += d->last_bytesused;
		pagenum++;
	}

	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, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x20(%rbp), %rax
cmpq $0x8, %rax
jge 0x10db71
jmp 0x10dbe3
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x10dc40
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x10dba6
jmp 0x10dbe3
movq -0x18(%rbp), %rax
cmpq $0x8, 0x8(%rax)
jge 0x10dbb3
jmp 0x10dbe3
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x10ddc0
cmpl $0x0, %eax
jne 0x10dbc5
jmp 0x10dbe3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10db59
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/pnm.c
// Function: do_page
static int do_page(deark *c, lctx *d, int pagenum, i64 pos1)
{
	struct page_ctx *pg = NULL;
	int retval = 0;

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

	pg = de_malloc(c, sizeof(struct page_ctx));

	pg->fmt = identify_fmt(c, pos1);
	d->last_fmt = pg->fmt;
	pg->fmt_name = get_fmt_name(pg->fmt);
	if(pg->fmt==0) {
		de_err(c, "Not PNM/PAM format");
		goto done;
	}

	if(pagenum==0) {
		de_declare_fmt(c, pg->fmt_name);
	}

	if(pg->fmt==FMT_PAM) {
		if(!read_pam_header(c, d, pg, pos1)) goto done;
	}
	else {
		if(!read_pnm_header(c, d, pg, pos1)) goto done;
	}

	if(!do_image(c, d, pg, pg->hdr_parse_pos)) {
		goto done;
	}

	d->last_bytesused = (pg->hdr_parse_pos + pg->image_data_len) - pos1;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xac6b9(%rip), %rsi     # 0x1ba32e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x15b780
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10de00
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %edi
callq 0x10deb0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x10dcf3
movq -0x8(%rbp), %rdi
leaq 0xb5946(%rip), %rsi     # 0x1c362d
movb $0x0, %al
callq 0x15bfb0
jmp 0x10dd92
cmpl $0x0, -0x14(%rbp)
jne 0x10dd0a
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x15e380
movq -0x28(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x10dd31
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10df50
cmpl $0x0, %eax
jne 0x10dd2f
jmp 0x10dd92
jmp 0x10dd4f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10e430
cmpl $0x0, %eax
jne 0x10dd4d
jmp 0x10dd92
jmp 0x10dd4f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
callq 0x10e5e0
cmpl $0x0, %eax
jne 0x10dd6f
jmp 0x10dd92
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %rax
addq 0x38(%rax), %rcx
subq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)