LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pff2.c
// Function: de_run_pff2
static void de_run_pff2(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;
	i64 i;

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

	ictx->userdata = (void*)d;
	ictx->alignment = 1;
	ictx->preprocess_chunk_fn = my_preprocess_pff2_chunk_fn;
	ictx->handle_chunk_fn = my_pff2_chunk_handler;
	ictx->f = c->infile;

	d->font = de_create_bitmap_font(c);
	d->font->has_nonunicode_codepoints = 0;
	d->font->has_unicode_codepoints = 1;
	d->font->prefer_unicode = 1;

	fmtutil_read_iff_format(ictx, 0, c->infile->len);

	if(d->font) {
		if(d->font->char_array) {
			for(i=0; i<d->font->num_chars; i++) {
				de_free(c, d->font->char_array[i].bitmap);
			}
			de_free(c, d->font->char_array);
		}
		de_destroy_bitmap_font(c, d->font);
	}

	fmtutil_destroy_iff_decoder(ictx);
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe969b
movq %rax, %r14
movq %rbx, %rdi
callq 0x107b04
movq %rax, %r15
movq %r14, 0x10(%rax)
movq $0x1, 0x48(%rax)
leaq 0xd9(%rip), %rax        # 0xb2780
movq %rax, 0x28(%r15)
leaq 0x12d(%rip), %rax       # 0xb27df
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq %rbx, %rdi
callq 0xf57ec
movq %rax, (%r14)
movw $0x100, 0x10(%rax)      # imm = 0x100
movb $0x1, 0x12(%rax)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x107b28
movq (%r14), %rax
testq %rax, %rax
je 0xb273e
cmpq $0x0, 0x20(%rax)
je 0xb2733
movq (%r14), %rax
cmpq $0x0, 0x18(%rax)
jle 0xb2727
movl $0x20, %r12d
xorl %r13d, %r13d
movq 0x20(%rax), %rax
movq (%rax,%r12), %rsi
movq %rbx, %rdi
callq 0xe9752
incq %r13
movq (%r14), %rax
addq $0x28, %r12
cmpq 0x18(%rax), %r13
jl 0xb2707
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0xe9752
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xf5801
movq %r15, %rdi
callq 0x107b17
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe9752
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pff2.c
// Function: my_preprocess_pff2_chunk_fn
static int my_preprocess_pff2_chunk_fn(struct de_iffctx *ictx)
{
	const struct pff2_sectiontype_info *si;

	si = find_pffs_sectiontype_info(ictx->chunkctx->chunk4cc.id);
	if(si) {
		ictx->chunkctx->chunk_name = si->name;
	}

	if(ictx->chunkctx->dlen==0xffffffffU) {
		// The 'DATA' chunk's length is usually set to the special value 0xffffffff.
		// We are allowed to adjust ictx->chunkctx->dlen here.
		ictx->chunkctx->dlen = ictx->f->len - ictx->chunkctx->dpos;
	}
	return 1;
}

// Assembly:
movq 0x128(%rdi), %rax
movl 0x4(%rax), %esi
xorl %ecx, %ecx
leaq 0xd396d(%rip), %rdx     # 0x186100
xorl %r8d, %r8d
cmpl %esi, (%r8,%rdx)
je 0xb27ab
addq $0x18, %r8
cmpq $0x120, %r8             # imm = 0x120
jne 0xb2796
jmp 0xb27b1
addq %r8, %rdx
movq %rdx, %rcx
testq %rcx, %rcx
je 0xb27be
movq 0x8(%rcx), %rcx
movq %rcx, 0x58(%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x48(%rax)
jne 0xb27d9
movq 0x18(%rdi), %rcx
movq 0x18(%rcx), %rcx
subq 0x40(%rax), %rcx
movq %rcx, 0x48(%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pff2.c
// Function: my_pff2_chunk_handler
static int my_pff2_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;
	const struct pff2_sectiontype_info *si;

	si = find_pffs_sectiontype_info(ictx->chunkctx->chunk4cc.id);
	if(!si) goto done;
	ictx->handled = 1;

	// Default value decoders:
	if(si->flags&0x1) {
		de_ucstring *str;
		str = ucstring_create(c);
		dbuf_read_to_ucstring_n(ictx->f,
			ictx->chunkctx->dpos, ictx->chunkctx->dlen,
			DE_DBG_MAX_STRLEN, str, 0, DE_ENCODING_ASCII);
		de_dbg(c, "value: \"%s\"", ucstring_getpsz_d(str));
		ucstring_destroy(str);
	}
	else if(si->flags&0x2) {
		i64 n;
		n = dbuf_getu16be(ictx->f, ictx->chunkctx->dpos);
		de_dbg(c, "value: %d", (int)n);
	}

	if(si->hfn) {
		si->hfn(c, d, si, ictx->chunkctx->dpos, ictx->chunkctx->dlen);
	}

done:
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
movq (%rdi), %rbx
movq 0x10(%rdi), %r14
movq 0x128(%rdi), %rax
movl 0x4(%rax), %edx
xorl %r12d, %r12d
leaq 0xd38f6(%rip), %rcx     # 0x186100
xorl %esi, %esi
cmpl %edx, (%rsi,%rcx)
je 0xb2820
addq $0x18, %rsi
cmpq $0x120, %rsi            # imm = 0x120
jne 0xb280c
jmp 0xb2826
addq %rsi, %rcx
movq %rcx, %r12
testq %r12, %r12
je 0xb28e8
movl $0x1, 0x130(%r15)
movl 0x4(%r12), %ecx
testb $0x1, %cl
jne 0xb286b
testb $0x2, %cl
je 0xb28c4
movq 0x18(%r15), %rdi
movq 0x40(%rax), %rsi
callq 0xef169
leaq 0x781f7(%rip), %rsi     # 0x12aa54
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
jmp 0xb28c4
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r13
movq 0x18(%r15), %rdi
movq 0x128(%r15), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movl $0x1, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r13, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r13, %rdi
callq 0xf7557
leaq 0x5feac(%rip), %rsi     # 0x11275b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
callq 0xf6bb0
movq 0x10(%r12), %rax
testq %rax, %rax
je 0xb28e8
movq 0x128(%r15), %rdx
movq 0x40(%rdx), %rcx
movq 0x48(%rdx), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *%rax
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pict.c
// Function: de_module_pict
void de_module_pict(deark *c, struct deark_module_info *mi)
{
	mi->id = "pict";
	mi->desc = "Macintosh PICT";
	mi->run_fn = de_run_pict;
	mi->identify_fn = de_identify_pict;
	mi->help_fn = de_help_pict;
}

// Assembly:
leaq 0x632a1(%rip), %rax     # 0x115e30
movq %rax, (%rsi)
leaq 0x8395d(%rip), %rax     # 0x1364f6
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xb2bbf
movq %rax, 0x18(%rsi)
leaq 0x3b3(%rip), %rax       # 0xb2f62
movq %rax, 0x20(%rsi)
leaq 0x3eb(%rip), %rax       # 0xb2fa5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pict.c
// Function: de_identify_pict
static int de_identify_pict(deark *c)
{
	struct detection_info dti;

	do_detect_version(c, &dti, 0);
	if(dti.file_version==2) {
		return 85;
	}
	else if(dti.file_version==1) {
		if(dti.has_fileheader) return 25;
		return 15;
	}
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xb2fb3
movl (%rbx), %eax
cmpl $0x2, %eax
je 0xb2f96
cmpl $0x1, %eax
jne 0xb2f9d
cmpl $0x0, 0xc(%rsp)
movl $0xf, %ecx
movl $0x19, %eax
cmovel %ecx, %eax
jmp 0xb2f9f
movl $0x55, %eax
jmp 0xb2f9f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pict.c
// Function: do_detect_version
static void do_detect_version(deark *c, struct detection_info *dti, int mode)
{
	static const u8 v1pattern[2] = { 0x11, 0x01 };
	static const u8 v2pattern[6] = { 0x00, 0x11, 0x02, 0xff, 0x0c, 0x00 };
	u8 buf[6];
	int v1_nohdr = 0;
	int v2_nohdr = 0;
	int v1_hdr = 0;
	int v2_hdr = 0;

	dti->file_version = 0;
	dti->has_fileheader = 0;

	de_read(buf, 522, sizeof(buf));
	if(!de_memcmp(buf, v2pattern, 6)) {
		v2_hdr = 1;
	}
	else if(!de_memcmp(buf, v1pattern, 2)) {
		v1_hdr = 1;
	}
	else {
		de_read(buf, 10, sizeof(buf));
		if(!de_memcmp(buf, v2pattern, 6)) {
			v2_nohdr = 1;
		}
		else if(!de_memcmp(buf, v1pattern, 2)) {
			v1_nohdr = 1;
		}
	}

	if(!v1_hdr && !v2_hdr && !v1_nohdr && !v2_nohdr) {
		return;
	}

	if(v2_hdr) {
		dti->file_version = 2;
		dti->has_fileheader = 1;
		return;
	}
	else if(v2_nohdr) {
		dti->file_version = 2;
		return;
	}

	if(mode==0) {
		// For v1, check that the file ends as expected
		de_read(buf, c->infile->len-2, 2);
		if(buf[1]==0xff) {
			; // v1 files should end with 0xff
		}
		else if(buf[0]==0xff && buf[1]==0x00) {
			; // But a few have an extra NUL byte at the end
		}
	}

	if(v1_hdr) {
		dti->file_version = 1;
		dti->has_fileheader = 1;
		return;
	}
	else if(v1_nohdr) {
		dti->file_version = 1;
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x14(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsi)
movq 0x18(%rdi), %rdi
leaq 0xe(%rsp), %r15
movl $0x20a, %edx            # imm = 0x20A
movl $0x6, %ecx
movq %r15, %rsi
callq 0xeeee8
movl $0xff021100, %eax       # imm = 0xFF021100
xorl (%r15), %eax
movzwl 0x4(%r15), %ecx
xorl $0xc, %ecx
xorl %r12d, %r12d
orl %eax, %ecx
setne %r13b
je 0xb3051
cmpw $0x111, 0xe(%rsp)       # imm = 0x111
je 0xb305a
movq 0x18(%r14), %rdi
leaq 0xe(%rsp), %r15
movl $0xa, %edx
movl $0x6, %ecx
movq %r15, %rsi
callq 0xeeee8
movl $0xff021100, %eax       # imm = 0xFF021100
xorl (%r15), %eax
movzwl 0x4(%r15), %ecx
xorl $0xc, %ecx
orl %eax, %ecx
je 0xb30d8
cmpw $0x111, 0xe(%rsp)       # imm = 0x111
sete %r15b
jmp 0xb3054
xorl %r15d, %r15d
xorl %eax, %eax
xorl %ebp, %ebp
jmp 0xb3062
movb $0x1, %bpl
xorl %r15d, %r15d
xorl %eax, %eax
movb %r13b, %r12b
testb %al, %al
jne 0xb3078
testb %r15b, %r15b
jne 0xb3078
testl %r12d, %r12d
je 0xb3078
testb %bpl, %bpl
je 0xb30c9
testl %r12d, %r12d
je 0xb3089
testb %al, %al
je 0xb3095
movl $0x2, (%rbx)
jmp 0xb30c9
movabsq $0x100000002, %rax      # imm = 0x100000002
jmp 0xb30c6
cmpl $0x0, 0x14(%rsp)
jne 0xb30b7
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rdx
addq $-0x2, %rdx
leaq 0xe(%rsp), %rsi
movl $0x2, %ecx
callq 0xeeee8
testb %bpl, %bpl
je 0xb30e2
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
xorl %r15d, %r15d
jmp 0xb3056
testb %r15b, %r15b
je 0xb30c9
movl $0x1, (%rbx)
jmp 0xb30c9
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pict.c
// Function: pict_read_rect
static void pict_read_rect(dbuf *f, i64 pos,
	struct pict_rect *rect, const char *dbgname)
{
	rect->t = dbuf_geti16be(f, pos);
	rect->l = dbuf_geti16be(f, pos+2);
	rect->b = dbuf_geti16be(f, pos+4);
	rect->r = dbuf_geti16be(f, pos+6);

	if(dbgname) {
		de_dbg(f->c, "%s: (%d,%d)-(%d,%d)", dbgname, (int)rect->l, (int)rect->t,
			(int)rect->r, (int)rect->b);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0xef219
movq %rax, (%r14)
leaq 0x2(%r12), %rsi
movq %r15, %rdi
callq 0xef219
movq %rax, 0x8(%r14)
leaq 0x4(%r12), %rsi
movq %r15, %rdi
callq 0xef219
movq %rax, 0x10(%r14)
addq $0x6, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xef219
movq %rax, 0x18(%r14)
testq %rbx, %rbx
je 0xb316b
movq 0x8(%r15), %rdi
movl (%r14), %r8d
movl 0x8(%r14), %ecx
movl 0x10(%r14), %edx
movl %edx, (%rsp)
leaq 0x8040b(%rip), %rsi     # 0x133569
movq %rbx, %rdx
movl %eax, %r9d
xorl %eax, %eax
callq 0xe9226
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xef0d5
movq (%rbx), %rdi
movzbl %al, %ebp
leaq 0x83823(%rip), %rsi     # 0x1369ba
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
cmpb $0x1, %bpl
je 0xb31cf
cmpl $0x2, %ebp
jne 0xb31b8
movq 0x8(%rbx), %rax
movl $0x2, 0xc(%rax)
jmp 0xb31cf
movq (%rbx), %rdi
leaq 0x837e7(%rip), %rsi     # 0x1369a9
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq %rsp, %r15
movq %rax, (%r15)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq (%rdi), %r14
movq 0x10(%rdi), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, %r12
leaq 0x837b3(%rip), %rsi     # 0x1369c6
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rax
leaq 0x8(%rax), %rcx
movq %rcx, (%r15)
cmpl $0x2, %r12d
jne 0xb3240
addq $0xe, %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
jmp 0xb32d7
movl $0x480, %esi            # imm = 0x480
movq %r14, %rdi
callq 0xe969b
movq %rax, %r15
movq 0x10(%rbx), %rsi
movq (%rsp), %rcx
movq %r14, %rdi
movq %rax, %rdx
callq 0xf9a19
movq (%rsp), %rcx
addq $0xa, %rcx
movq %rcx, (%rsp)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xf9b30
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 0xf9d2c
movb $0x1, %r12b
testl %eax, %eax
je 0xb32da
movq (%rsp), %rdx
addq 0x10(%rsp), %rdx
movq %rdx, (%rsp)
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0xb4094
testl %eax, %eax
je 0xb32da
movq 0x8(%rsp), %rax
addq %rax, (%rsp)
xorl %r12d, %r12d
testb %r12b, %r12b
je 0xb32f6
leaq 0x836ec(%rip), %rsi     # 0x1369d2
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x38(%rbx)
jmp 0xb3302
movq (%rsp), %rax
subq 0x28(%rbx), %rax
movq %rax, 0x30(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe9752
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
movl %eax, 0xc(%rsp,%rbp,4)
movb %ah, 0x9(%rsp,%rbp)
incq %rbp
cmpq $0x3, %rbp
jne 0xb3332
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
movl $0x10, %ecx
movq %r14, %rdx
callq 0xe9bb8
movq (%rbx), %rdi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x14(%rsp), %r8d
leaq 0x836c6(%rip), %rsi     # 0x136a60
movq %r14, %r9
xorl %eax, %eax
callq 0xe9226
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xef219
movq %rax, %r12
addq $0x2, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xef219
movq 0x8(%r14), %rdi
leaq 0x8369e(%rip), %rsi     # 0x136a86
leaq 0x83691(%rip), %rdx     # 0x136a80
movl %eax, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xef0d5
movzbl %al, %r14d
movq (%rbx), %rdi
callq 0xf6870
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 0xf01b0
movq (%rbx), %r12
movq %r15, %rdi
callq 0xf74bd
leaq 0x878bd(%rip), %rsi     # 0x13ad0c
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq $0x5, %r14
movq %r14, 0x30(%rbx)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/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 0xef0d5
movq (%rbx), %rdi
cmpl $0x2a, 0x18(%rbx)
leaq 0x71af9(%rip), %rcx     # 0x124f93
leaq 0x835f1(%rip), %rdx     # 0x136a92
cmoveq %rcx, %rdx
movzbl %al, %ecx
leaq 0x8b834(%rip), %rsi     # 0x13ece3
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
incq %rsi
callq 0xef0d5
movzbl %al, %r14d
leaq 0x2(%r14), %rax
movq %rax, 0x30(%rbx)
movq (%rbx), %rdi
callq 0xf6870
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 0xf01b0
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xf74bd
leaq 0x877fb(%rip), %rsi     # 0x13ad0c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/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 0xef0d5
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
incq %rsi
callq 0xef0d5
movq (%rbx), %rdi
movzbl %bpl, %edx
movzbl %al, %ecx
leaq 0x83530(%rip), %rsi     # 0x136a95
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x2, %rsi
callq 0xef0d5
movzbl %al, %r14d
movq (%rbx), %rdi
leaq 0x83519(%rip), %rsi     # 0x136aa4
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
leaq 0x3(%r14), %rax
movq %rax, 0x30(%rbx)
movq (%rbx), %rdi
callq 0xf6870
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 0xf01b0
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xf74bd
leaq 0x87730(%rip), %rsi     # 0x13ad0c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/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 0xef169
addq $0x2, %rax
movq %rax, 0x30(%rbx)
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x2, %rsi
callq 0xef169
movq (%rbx), %rdi
leaq 0x83487(%rip), %rsi     # 0x136ab2
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xef0d5
movzbl %al, %r14d
movq (%rbx), %rdi
callq 0xf6870
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 0xf01b0
movq (%rbx), %rbx
movq %r15, %rdi
callq 0xf74bd
leaq 0x8343a(%rip), %rsi     # 0x136ac2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/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 0xef169
movq %rax, %r12
movq 0x10(%r15), %rdi
movq 0x28(%r15), %rsi
addq $0x2, %rsi
callq 0xef169
movq %rax, %r14
leaq 0x830b1(%rip), %rsi     # 0x136cd1
movq %rbx, %rdi
movl %r12d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe9226
leaq 0x4(%r14), %rax
movq %rax, 0x30(%r15)
cmpq $0x64, %r12
setne %al
cmpq $0x4, %r14
setl %cl
orb %al, %cl
jne 0xb3c9b
movq 0x10(%r15), %rdi
movq 0x28(%r15), %rsi
addq $0x4, %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1d74
movl 0x4(%r12), %edx
leaq 0x20(%rsp), %rcx
leaq 0x83070(%rip), %rsi     # 0x136cec
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x10(%r15), %rsi
movq 0x28(%r15), %rdx
addq $0x8, %rdx
addq $-0x4, %r14
jmp 0xb3d56
cmpq $0xe0, %r12
jne 0xb3d4a
cmpq $0x4, %r14
jl 0xb3d71
movq 0x8(%r15), %r13
movq 0x28(%r15), %r15
leaq 0x4(%r15), %rsi
movq 0x18(%rbx), %rdi
callq 0xef32a
movq %rax, %r12
addq $-0x4, %r14
leaq 0x83042(%rip), %rsi     # 0x136d17
movq %rbx, %rdi
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe9226
cmpq $0x1, %r12
je 0xb3d1b
movq 0x18(%r13), %rdi
callq 0xf0b13
movq $0x0, 0x18(%r13)
testq %r12, %r12
jne 0xb3d1b
leaq 0x61de5(%rip), %rsi     # 0x115aed
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, 0x18(%r13)
cmpq $0x1, %r12
ja 0xb3d71
movq 0x18(%r13), %rcx
testq %rcx, %rcx
je 0xb3d7f
movq 0x18(%rbx), %rdi
addq $0x8, %r15
movq %r15, %rsi
movq %r14, %rdx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xefabc
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 0xe975a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x82fc0(%rip), %rsi     # 0x136d46
movq %rbx, %rdi
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe9b27
// File: /workspace/github_c_makefile_star2_O1/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 0xef169
xorl %ecx, %ecx
cmpq $0xfffe, %rax           # imm = 0xFFFE
sete %cl
movq 0x8(%rbx), %rax
movl %ecx, 0x10(%rax)
movq (%rbx), %rdi
leaq 0x82fa0(%rip), %rax     # 0x136d6e
leaq 0x74251(%rip), %rdx     # 0x128026
cmoveq %rax, %rdx
leaq 0x82f7e(%rip), %rsi     # 0x136d5e
xorl %eax, %eax
callq 0xe9226
movq 0x8(%rbx), %rax
cmpl $0x0, 0x10(%rax)
je 0xb3e67
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x4, %rsi
callq 0xef3cb
cvtsi2sd %rax, %xmm0
mulsd 0x72749(%rip), %xmm0    # 0x126558
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0x8, %rsi
callq 0xef3cb
cvtsi2sd %rax, %xmm1
mulsd 0x72725(%rip), %xmm1    # 0x126558
movq (%rbx), %rdi
leaq 0x82f35(%rip), %rsi     # 0x136d72
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0xe9226
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rsi
addq $0xc, %rsi
leaq 0x82d33(%rip), %rcx     # 0x136b90
leaq 0x10(%rsp), %rdx
callq 0xb30ef
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/pict.c
// Function: get_pixdata_size
static int get_pixdata_size(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi,
	i64 pos1, i64 *pixdata_size)
{
	i64 pos;
	i64 j;
	i64 bytecount;
	int retval = 0;

	pos = pos1;
	de_dbg(c, "PixData at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	if(bi->height<0 || bi->height>65535) {
		de_err(c, "Invalid bitmap height (%"I64_FMT")", (i64)bi->height);
		goto done;
	}

	// Make sure rowbytes is sane. We use it to decide how much memory to allocate.
	// Note: I've seen valid bitmaps with as many as 284 extra bytes per row.
	if(bi->rowbytes > (bi->npwidth * bi->pixelsize)/8 + 1000) {
		de_err(c, "Bad rowBytes value (%d)", (int)bi->rowbytes);
		goto done;
	}

	if(bi->packing_type>=3 || (bi->packing_type==0 && bi->rowbytes>=8)) {
		for(j=0; j<bi->height; j++) {
			if(bi->rowbytes > 250) {
				bytecount = de_getu16be_p(&pos);
			}
			else {
				bytecount = (i64)de_getbyte_p(&pos);
			}
			pos += bytecount;
		}
	}
	else if(bi->packing_type==1 || (bi->packing_type==0 && bi->rowbytes<8)) {
		pos += bi->rowbytes * bi->height; // uncompressed
	}
	else {
		de_err(c, "Unsupported packing type: %d", (int)bi->packing_type);
		goto done;
	}

	*pixdata_size = pos - pos1;
	de_dbg(c, "PixData size: %"I64_FMT, (i64)*pixdata_size);
	retval = 1;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, (%rsp)
leaq 0x82938(%rip), %rsi     # 0x1369ee
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x20(%r12), %rdx
cmpq $0x10000, %rdx          # imm = 0x10000
jb 0xb40f0
leaq 0x8291c(%rip), %rsi     # 0x1369fd
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xb41d0
movq 0x40(%r12), %rax
imulq 0x10(%r12), %rax
leaq 0x7(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
movq (%r12), %rax
sarq $0x3, %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jle 0xb4134
leaq 0x828f8(%rip), %rsi     # 0x136a19
xorl %ebp, %ebp
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9df7
jmp 0xb41d0
movq 0x30(%r12), %rcx
cmpq $0x2, %rcx
jg 0xb4153
testq %rcx, %rcx
setne %sil
cmpq $0x8, %rax
setl %dil
orb %sil, %dil
jne 0xb4197
cmpq $0x0, 0x20(%r12)
jle 0xb41b0
xorl %ebp, %ebp
movq %rsp, %r13
cmpq $0xfb, (%r12)
jl 0xb4178
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef193
jmp 0xb4187
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef14d
movzbl %al, %eax
addq %rax, (%rsp)
incq %rbp
cmpq 0x20(%r12), %rbp
jl 0xb4160
jmp 0xb41b0
cmpq $0x1, %rcx
je 0xb41a8
testq %rcx, %rcx
jne 0xb41ee
cmpq $0x7, %rax
jg 0xb41ee
imulq %rdx, %rax
addq %rax, (%rsp)
movq (%rsp), %rdx
subq %r15, %rdx
movq %rdx, (%r14)
leaq 0x8288d(%rip), %rsi     # 0x136a4e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl $0x1, %ebp
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8283c(%rip), %rsi     # 0x136a31
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ecx, %edx
jmp 0xb4128
// File: /workspace/github_c_makefile_star2_O1/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 0x82879(%rip), %rax     # 0x136eb4
movq %rax, (%rsi)
leaq 0x82876(%rip), %rax     # 0x136ebb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xb4660
movq %rax, 0x18(%rsi)
leaq 0xe13(%rip), %rax       # 0xb546e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x73065(%rip), %rax     # 0x128500
movq %rax, (%rsi)
leaq 0x81d53(%rip), %rax     # 0x1371f8
movq %rax, 0x8(%rsi)
leaq 0x5fe31(%rip), %rax     # 0x1152e1
movq %rax, 0x10(%rsi)
leaq 0x1b(%rip), %rax        # 0xb54d6
movq %rax, 0x18(%rsi)
leaq 0x4a9(%rip), %rax       # 0xb596f
movq %rax, 0x20(%rsi)
leaq 0x4b0(%rip), %rax       # 0xb5981
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movabsq $0xa1a0a0d474e4a8b, %r14 # imm = 0xA1A0A0D474E4A8B
movq 0x18(%rdi), %rdi
movq %rsp, %rbx
movl $0x8, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xeeee8
leaq 0x5fe(%r14), %rax
cmpq %rax, (%rbx)
je 0xb59f0
cmpq %r14, (%rsp)
je 0xb59f7
addq $0x2ff, %r14            # imm = 0x2FF
xorl %eax, %eax
cmpq %r14, (%rsp)
sete %al
leal (%rax,%rax,2), %eax
jmp 0xb59fc
movl $0x1, %eax
jmp 0xb59fc
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb5a2d
cmpl $0x2, %eax
je 0xb5a21
cmpl $0x3, %eax
jne 0xb5a63
leaq 0x818dc(%rip), %rsi     # 0x1372f8
jmp 0xeb6d6
leaq 0x818cc(%rip), %rsi     # 0x1372f4
jmp 0xeb6d6
cmpb $0x0, 0x8(%rsi)
je 0xb5a3f
leaq 0x818c2(%rip), %rsi     # 0x1372fc
jmp 0xeb6d6
cmpb $0x0, 0x7(%rsi)
je 0xb5a51
leaq 0x818b5(%rip), %rsi     # 0x137301
jmp 0xeb6d6
cmpb $0x0, 0xc(%rsi)
je 0xb5a63
leaq 0x8189f(%rip), %rsi     # 0x1372fd
jmp 0xeb6d6
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb5a9a
leaq 0x81728(%rip), %rsi     # 0x1371a0
movl $0xc, %edx
callq 0xefb82
movq 0x40(%rbx), %rdi
callq 0xf0b13
movq $0x0, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb5e61
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 0xef32a
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xef32a
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xe9b05
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x8, %rsi
callq 0xef0d5
movzbl %al, %edx
leaq 0x81635(%rip), %rsi     # 0x1374ee
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x9, %rsi
callq 0xef0d5
movb %al, 0x9(%r15)
movzbl %al, %edx
cmpb $0x6, %al
ja 0xb5eee
leaq 0x812c7(%rip), %rax     # 0x1371ac
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmp 0xb5ef5
leaq 0x75f74(%rip), %rcx     # 0x12be69
leaq 0x8976c(%rip), %rsi     # 0x13f668
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0xc, %rsi
callq 0xef0d5
movzbl %al, %edx
leaq 0x68cbc(%rip), %rsi     # 0x11ebdc
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/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 0xb60a5
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x81188(%rip), %rcx     # 0x137150
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x2, 0x8(%r14)
jl 0xb60a5
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xef169
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0x81535(%rip), %rsi     # 0x13752c
movq %rbx, %rdi
movl %eax, %ecx
jmp 0xb6093
cmpq $0x6, 0x8(%r14)
jl 0xb60a5
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xef169
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x2, %rsi
callq 0xef169
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xef169
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0x814f1(%rip), %rsi     # 0x13753e
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 0xe9226
cmpq $0x0, 0x8(%r14)
jle 0xb60a5
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
callq 0xef0d5
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rdx
movzbl %al, %ecx
leaq 0x814bd(%rip), %rsi     # 0x13754d
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe9226
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb60d4
movb $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0xb5a04
cmpq $0x8, 0x8(%r14)
jl 0xb6130
movq 0x18(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0xef34e
leaq 0x5d9f4(%rip), %rsi     # 0x113ae5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
testl %eax, %eax
leaq 0x69ca0(%rip), %rdx     # 0x11fdb2
leaq 0x8eab7(%rip), %rcx     # 0x144bd0
cmoveq %rdx, %rcx
leaq 0x8143e(%rip), %rsi     # 0x137562
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb6140
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq %r15, %rsi
callq 0xef32a
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x8107f(%rip), %xmm0    # 0x1371f0
movsd %xmm0, (%rsp,%r15,2)
addq $0x4, %r15
cmpq $0x20, %r15
jne 0xb6152
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x813df(%rip), %rsi     # 0x137572
movq %rbx, %rdi
movb $0x2, %al
callq 0xe9226
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
leaq 0x813de(%rip), %rsi     # 0x13758e
movq %rbx, %rdi
movb $0x2, %al
callq 0xe9226
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
leaq 0x813dd(%rip), %rsi     # 0x1375aa
movq %rbx, %rdi
movb $0x2, %al
callq 0xe9226
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
leaq 0x813dc(%rip), %rsi     # 0x1375c6
movq %rbx, %rdi
movb $0x2, %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/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 0xb6205
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
callq 0xef3cb
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x4, %rsi
callq 0xef3cb
leaq 0x813ac(%rip), %rsi     # 0x1375e2
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x8, %rsi
callq 0xef3cb
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0xc, %rsi
callq 0xef3cb
leaq 0x8138a(%rip), %rsi     # 0x1375f9
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %rbx
movq (%rdx), %r14
movq 0x8(%rdx), %r15
cmpq $0x6, %r15
jl 0xb62cd
movq 0x18(%rbx), %rdi
leaq 0x80ee1(%rip), %rdx     # 0x137184
movl $0x5, %ecx
movq %r14, %rsi
callq 0xf025e
testl %eax, %eax
jne 0xb62cd
leaq 0x81353(%rip), %rsi     # 0x13760e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq $0x6, %r14
addq $-0x6, %r15
cmpq $0x8, %r15
jge 0xb62d9
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xf7eab
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rax
movq %rax, 0x8(%rsp)
movb $0x1, 0xd(%rsi)
movq %rsi, %rdi
callq 0xb5a64
cmpq $0x1a, 0x8(%r14)
jl 0xb6452
leaq 0x8(%rsp), %r14
movq (%r14), %rsi
movq 0x18(%rbx), %rdi
callq 0xef32a
leaq 0x81341(%rip), %rsi     # 0x137676
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x4, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
movq %rax, 0x28(%r15)
movq 0x20(%r15), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe9b05
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
leaq 0x8128f(%rip), %rsi     # 0x137625
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
leaq 0x8126f(%rip), %rsi     # 0x137636
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0x75a7d(%rip), %r14     # 0x12be69
movq %r14, %rcx
cmpb $0x2, %dl
ja 0xb6404
movl %edx, %eax
leaq 0x80dcb(%rip), %rsi     # 0x1371c8
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0x81240(%rip), %rsi     # 0x13764b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movzbl %al, %edx
cmpb $0x1, %dl
leaq 0x719d2(%rip), %rax     # 0x127e02
cmoveq %rax, %r14
testb %dl, %dl
leaq 0x77dc7(%rip), %rcx     # 0x12e204
cmovneq %r14, %rcx
leaq 0x8121a(%rip), %rsi     # 0x137662
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r12
movq %r12, %r15
shrq $0x3f, %r15
addq %r12, %r15
sarq %r15
leaq 0x8101b(%rip), %rsi     # 0x137698
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
cmpl $0x2, (%r14)
setl %al
cmpq $0x2, %r12
setl %cl
orb %al, %cl
jne 0xb66d2
leaq 0x81017(%rip), %r12     # 0x1376b7
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x18(%r14), %rdi
movq (%rbx), %rsi
addq %rbp, %rsi
callq 0xef169
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe93cf
incq %r13
addq $0x2, %rbp
cmpq %r13, %r15
jne 0xb66a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/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 0xb66e9
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdx), %rsi
addq $0x10, %rsi
callq 0xef3cb
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r14), %rsi
addq $0x14, %rsi
callq 0xef3cb
leaq 0x729c8(%rip), %rsi     # 0x1290e6
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226