LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: do_read_items
static void do_read_items(deark *c, lctx *d, i64 pos)
{
	struct item_handler_data *h = NULL;

	h = de_malloc(c, sizeof(struct item_handler_data));
	h->c = c;
	h->d = d;
	h->inf = c->infile;

	while(1) {
		if(pos%2 && d->version==2) {
			pos++; // 2-byte alignment
		}

		if(pos >= c->infile->len) break;

		h->opcode_pos = pos;

		if(d->version==2) {
			h->opcode = (UI)de_getu16be_p(&pos);
		}
		else {
			h->opcode = (UI)de_getbyte_p(&pos);
		}

		h->data_pos = pos;

		// Must initialize all remaining relevant fields.
		h->data_len = 0;

		do_handle_item(h);
		if(h->fatal_errflag) goto done;
		if(h->opcode==0x00ff) goto done; // End of image

		pos += h->data_len;
	}
done:
	de_free(c, h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x106b9f
movq -0x10(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x106b9f
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x106bb6
jmp 0x106c54
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x106be8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x165210
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x106c03
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x165170
movzbl %al, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x20(%rbp), %rdi
callq 0x106c70
movq -0x20(%rbp), %rax
cmpb $0x0, 0x38(%rax)
je 0x106c30
jmp 0x106c56
movq -0x20(%rbp), %rax
cmpl $0xff, 0x18(%rax)
jne 0x106c3f
jmp 0x106c56
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x106b75
jmp 0x106c56
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: find_opcode_info
static const struct opcode_info *find_opcode_info(UI opcode)
{
	size_t i;

	for(i=0; i<DE_ARRAYCOUNT(opcode_info_arr); i++) {
		if((UI)opcode_info_arr[i].opcode == opcode) {
			return &opcode_info_arr[i];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x66, -0x18(%rbp)
jae 0x106fb2
leaq 0x1154f3(%rip), %rax    # 0x21c470
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzwl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x106fa2
leaq 0x1154dc(%rip), %rax    # 0x21c470
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x106fba
jmp 0x106fa4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x106f6f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x165060
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %edx
leaq 0xbb690(%rip), %rsi     # 0x1c2686
movb $0x0, %al
callq 0x15b0d0
movzbl -0x9(%rbp), %eax
cmpl $0x2, %eax
jne 0x107017
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x2, 0xc(%rax)
jmp 0x107043
movzbl -0x9(%rbp), %eax
cmpl $0x1, %eax
je 0x107041
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %edx
leaq 0xbb643(%rip), %rsi     # 0x1c2675
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movb $0x1, 0x38(%rax)
jmp 0x107043
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x3, -0x40(%rbp)
jge 0x107285
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165210
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, -0x14(%rbp,%rax,4)
movq -0x40(%rbp), %rax
movl -0x14(%rbp,%rax,4), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, -0x17(%rbp,%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x107240
movzbl -0x17(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0x16(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x15(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
leaq -0x30(%rbp), %rdx
movl $0x10, %ecx
callq 0x15bcc0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x14(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0xc(%rbp), %r8d
leaq -0x30(%rbp), %r9
leaq 0xbb455(%rip), %rsi     # 0x1c272c
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/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
leaq -0x28(%rbp), %rdx
leaq 0xbb42d(%rip), %rcx     # 0x1c274c
callq 0x1080e0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x4, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x5, %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x172500
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xbf6ac(%rip), %rsi     # 0x1c6a52
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rcx
addq $0x5, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
leaq 0xbb349(%rip), %rdx     # 0x1c275e
leaq 0xa9217(%rip), %rax     # 0x1b0633
cmpl $0x2a, %ecx
cmoveq %rax, %rdx
movq -0x18(%rbp), %rax
movl %eax, %ecx
leaq 0xc391f(%rip), %rsi     # 0x1cad4f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172500
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0xbf589(%rip), %rsi     # 0x1c6a52
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movl %eax, %ecx
leaq 0xbb217(%rip), %rsi     # 0x1c2761
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x2, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl %eax, %edx
leaq 0xbb1eb(%rip), %rsi     # 0x1c2770
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rcx
addq $0x3, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x3, %rsi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172500
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xbf454(%rip), %rsi     # 0x1c6a52
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/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x1651d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xbb100(%rip), %rsi     # 0x1c277e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x4, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x5, %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %r9d
xorl %r8d, %r8d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172500
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0xbb087(%rip), %rsi     # 0x1c278e
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x1651d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movl %eax, %ecx
leaq 0xbadc9(%rip), %rsi     # 0x1c299d
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
cmpq $0x64, -0x10(%rbp)
jne 0x107c78
cmpq $0x4, -0x18(%rbp)
jl 0x107c78
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x4, %rsi
leaq -0x50(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x20(%rbp), %rdi
movl -0x4c(%rbp), %edx
leaq -0x50(%rbp), %rcx
addq $0x10, %rcx
leaq 0xbad80(%rip), %rsi     # 0x1c29b8
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdx
addq $0x8, %rdx
movq -0x18(%rbp), %rcx
subq $0x4, %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
jmp 0x107cda
cmpq $0xe0, -0x10(%rbp)
jne 0x107ca5
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdx
addq $0x4, %rdx
movq -0x18(%rbp), %rcx
callq 0x108d00
jmp 0x107cd8
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdx
addq $0x4, %rdx
movq -0x18(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
jmp 0x107cda
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x1651d0
movq %rax, -0x10(%rbp)
cmpq $0xfffe, -0x10(%rbp)    # imm = 0xFFFE
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %ecx
leaq 0xabcc5(%rip), %rdx     # 0x1b39fe
leaq 0xbacfa(%rip), %rax     # 0x1c2a3a
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0xbacdc(%rip), %rsi     # 0x1c2a2a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x10(%rax)
je 0x107de2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x4, %rsi
callq 0x108e00
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0x8, %rsi
callq 0x108e00
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
leaq 0xbac87(%rip), %rsi     # 0x1c2a3e
movb $0x2, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq -0x40(%rbp), %rdx
leaq 0xbaa7f(%rip), %rcx     # 0x1c285c
callq 0x106a40
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: handler_QuickTime
static void handler_QuickTime(struct item_handler_data *h)
{
	i64 payload_pos;
	i64 payload_len;
	i64 endpos;
	i64 idsc_pos;

	payload_len = dbuf_getu32be(h->inf, h->data_pos);
	payload_pos = h->data_pos+4;
	de_dbg(h->c, "payload: pos=%"I64_FMT", len=%"I64_FMT, payload_pos, payload_len);
	endpos = payload_pos+payload_len;
	if(endpos > h->inf->len) {
		h->fatal_errflag = 1;
		return;
	}
	h->data_len = 4+payload_len;

	// Following the size field seems to be 68 or 50 bytes of data,
	// followed by QuickTime "idsc" data, followed by image data.
	idsc_pos = payload_pos + ((h->opcode==0x8201) ? 50 : 68);

	do_handle_qtif_idsc(h->c, h->d, idsc_pos, endpos-idsc_pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x165470
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0xbac13(%rip), %rsi     # 0x1c2a4e
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x107e6a
movq -0x8(%rbp), %rax
movb $0x1, 0x38(%rax)
jmp 0x107ec2
movq -0x18(%rbp), %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %esi
movl $0x44, %ecx
movl $0x32, %edx
cmpl $0x8201, %esi           # imm = 0x8201
cmovel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
subq -0x28(%rbp), %rcx
callq 0x108e40
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: pict_read_point
static void pict_read_point(dbuf *f, i64 pos,
	struct pict_point *point, const char *dbgname)
{
	point->y = dbuf_geti16be(f, pos);
	point->x = dbuf_geti16be(f, pos+2);

	if(dbgname) {
		de_dbg(f->c, "%s: (%d,%d)", dbgname, (int)point->x, (int)point->y);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x165310
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x2, %rsi
callq 0x165310
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x108160
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %r8d
leaq 0xba5f9(%rip), %rsi     # 0x1c2752
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/pict.c
// Function: read_src_dst_mode
static void read_src_dst_mode(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi, i64 pos)
{
	struct pict_rect tmprect;
	i64 n;

	de_dbg(c, "src/dst/mode part of bitmap header, at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	pict_read_rect(c->infile, pos, &tmprect, "srcRect");
	pos += 8;
	pict_read_rect(c->infile, pos, &tmprect, "dstRect");
	pos += 8;

	n = de_getu16be_p(&pos);
	de_dbg(c, "transfer mode: %d", (int)n);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xba69a(%rip), %rsi     # 0x1c2831
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq 0xba699(%rip), %rcx     # 0x1c285c
callq 0x106a40
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq 0xba679(%rip), %rcx     # 0x1c2864
callq 0x106a40
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movl %eax, %edx
leaq 0xba64a(%rip), %rsi     # 0x1c286c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: decode_bitmap_rgb16
static void decode_bitmap_rgb16(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi,
	dbuf *unc_pixels, de_bitmap *img, i64 pos)
{
	i64 i, j;
	u8 c0, c1;
	u32 clr555;
	de_color clr888;

	for(j=0; j<bi->height; j++) {
		for(i=0; i<bi->pdwidth; i++) {
			c0 = dbuf_getbyte(unc_pixels, j*bi->rowspan + i*2);
			c1 = dbuf_getbyte(unc_pixels, j*bi->rowspan + i*2+1);
			clr555 = ((u32)c0 << 8)|c1;
			clr888 = de_rgb555_to_888(clr555);
			de_bitmap_setpixel_rgb(img, i, j, clr888);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x108b91
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x108b7e
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movq -0x38(%rbp), %rax
shlq %rax
addq %rax, %rsi
callq 0x165060
movb %al, -0x41(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movq -0x38(%rbp), %rax
shlq %rax
addq %rax, %rsi
addq $0x1, %rsi
callq 0x165060
movb %al, -0x42(%rbp)
movzbl -0x41(%rbp), %eax
shll $0x8, %eax
movzbl -0x42(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %edi
callq 0x1619e0
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x4c(%rbp), %ecx
callq 0x16b310
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x108ae2
jmp 0x108b80
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x108ac8
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: decode_bitmap_rgb24
static void decode_bitmap_rgb24(deark *c, lctx *d, struct fmtutil_macbitmap_info *bi,
	dbuf *unc_pixels, de_bitmap *img, i64 pos)
{
	i64 i, j;
	u8 cr, cg, cb;

	for(j=0; j<bi->height; j++) {
		for(i=0; i<bi->pdwidth; i++) {
			cr = dbuf_getbyte(unc_pixels, j*bi->rowspan + (bi->cmpcount-3+0)*bi->pdwidth + i);
			cg = dbuf_getbyte(unc_pixels, j*bi->rowspan + (bi->cmpcount-3+1)*bi->pdwidth + i);
			cb = dbuf_getbyte(unc_pixels, j*bi->rowspan + (bi->cmpcount-3+2)*bi->pdwidth + i);
			de_bitmap_setpixel_rgb(img, i, j, DE_MAKE_RGB(cr,cg,cb));
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x108cf0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x108cdd
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
subq $0x3, %rax
addq $0x0, %rax
movq -0x18(%rbp), %rcx
imulq 0x18(%rcx), %rax
addq %rax, %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x41(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
subq $0x3, %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
imulq 0x18(%rcx), %rax
addq %rax, %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x42(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
subq $0x3, %rax
addq $0x2, %rax
movq -0x18(%rbp), %rcx
imulq 0x18(%rcx), %rax
addq %rax, %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x43(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movzbl -0x41(%rbp), %ecx
shll $0x10, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movzbl -0x42(%rbp), %eax
shll $0x8, %eax
orl %eax, %ecx
movzbl -0x43(%rbp), %eax
orl %eax, %ecx
callq 0x16b310
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x108be2
jmp 0x108cdf
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x108bc8
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: do_iccprofile_item
static void do_iccprofile_item(deark *c, lctx *d, i64 pos, i64 len)
{
	i64 selector;
	i64 data_len;

	if(len<4) return;
	selector = de_getu32be(pos);
	data_len = len-4;
	de_dbg(c, "ICC profile segment, selector=%d, data len=%"I64_FMT, (int)selector,
		data_len);

	if(selector!=1) {
		// If this is not a Continuation segment, close any current file.
		dbuf_close(d->iccprofile_file);
		d->iccprofile_file = NULL;
	}

	if(selector==0) { // Beginning segment
		d->iccprofile_file = dbuf_create_output_file(c, "icc", NULL, DE_CREATEFLAG_IS_AUX);
	}

	if(selector==0 || selector==1) {
		// Beginning and Continuation segments normally have profile data.
		// End segments (selector==2) are not allowed to include data.

		if(!d->iccprofile_file) {
			de_warn(c, "Bad ICC profile segment");
			return;
		}
		dbuf_copy(c->infile, pos+4, data_len, d->iccprofile_file);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jge 0x108d24
jmp 0x108dfa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165470
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
leaq 0xb9c89(%rip), %rsi     # 0x1c29e3
movb $0x0, %al
callq 0x15b0d0
cmpq $0x1, -0x28(%rbp)
je 0x108d81
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpq $0x0, -0x28(%rbp)
jne 0x108dac
movq -0x8(%rbp), %rdi
leaq 0x98c52(%rip), %rsi     # 0x1a19e5
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x108dba
cmpq $0x1, -0x28(%rbp)
jne 0x108dfa
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x108dd9
movq -0x8(%rbp), %rdi
leaq 0xb9c42(%rip), %rsi     # 0x1c2a12
movb $0x0, %al
callq 0x15bc10
jmp 0x108dfa
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
callq 0x166070
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pict.c
// Function: do_decode_qt
static int do_decode_qt(deark *c, lctx *d, i64 pos, i64 len)
{
	de_module_params *mparams = NULL;
	int retval = 0;

	mparams = de_malloc(c, sizeof(de_module_params));
	mparams->in_params.codes = "I";
	mparams->in_params.flags |= 0x01;

	de_run_module_by_id_on_slice(c, "qtif", mparams, c->infile, pos, len);
	if(mparams->out_params.flags & 0x1) {
		retval = 1;
	}

	de_free(c, mparams);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
leaq 0xb3a17(%rip), %rcx     # 0x1bca9b
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0xb9a23(%rip), %rsi     # 0x1c2ad6
callq 0x15c9f0
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1090ce
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xb9a59(%rip), %rcx     # 0x1c2b60
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb9a52(%rip), %rcx     # 0x1c2b67
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x109140
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3fd(%rip), %rcx       # 0x109530
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: get_flagbyte_name
static const char *get_flagbyte_name(u8 flagbyte)
{
	if(flagbyte<240) return "character descriptor";
	switch(flagbyte) {
	case PK_XXX1: return "special xxx1";
	case PK_XXX2: return "special xxx2";
	case PK_XXX3: return "special xxx3";
	case PK_XXX4: return "special xxx4";
	case PK_YYY: return "special yyy";
	case 245: return "postamble";
	case 246: return "no-op";
	case 247: return "preamble";
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0xf0, %eax
jge 0x1095a5
leaq 0xb9636(%rip), %rax     # 0x1c2bd2
movq %rax, -0x8(%rbp)
jmp 0x109640
movzbl -0x9(%rbp), %eax
addl $0xffffff10, %eax       # imm = 0xFFFFFF10
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x7, %eax
ja 0x109635
movq -0x18(%rbp), %rax
leaq 0xb957c(%rip), %rcx     # 0x1c2b40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb9613(%rip), %rax     # 0x1c2be7
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9613(%rip), %rax     # 0x1c2bf4
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9613(%rip), %rax     # 0x1c2c01
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9613(%rip), %rax     # 0x1c2c0e
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9613(%rip), %rax     # 0x1c2c1b
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9612(%rip), %rax     # 0x1c2c27
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb960f(%rip), %rax     # 0x1c2c31
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xb9608(%rip), %rax     # 0x1c2c37
movq %rax, -0x8(%rbp)
jmp 0x109640
leaq 0xae5f1(%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/pkfont.c
// Function: do_preamble
static void do_preamble(deark *c, lctx *d, i64 pos, i64 *bytesused)
{
	i64 comment_len;

	de_dbg(c, "preamble at %d", (int)pos);
	de_dbg_indent(c, 1);

	// (identification byte (should be 89) is at pos+1)

	comment_len = (i64)de_getbyte(pos+2);
	de_dbg(c, "comment length: %d", (int)comment_len);

	*bytesused = 3+comment_len+16;
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0xb95c7(%rip), %rsi     # 0x1c2c40
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xb9594(%rip), %rsi     # 0x1c2c4f
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rcx
addq $0x3, %rcx
addq $0x10, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: scan_and_fixup_font
static void scan_and_fixup_font(deark *c, lctx *d)
{
	struct de_bitmap_font_char *ch;
	i64 i;
	int min_v_pos = 1000000;
	int max_v_pos = -1000000;

	// Find the maximum character width, and the bounding box of the character heights.
	for(i=0; i<d->font->num_chars; i++) {
		ch = &d->font->char_array[i];

		if(ch->width > d->font->nominal_width)
			d->font->nominal_width = ch->width;

		if(ch->v_offset < min_v_pos)
			min_v_pos = ch->v_offset;

		if(ch->v_offset + ch->height > max_v_pos)
			max_v_pos = ch->v_offset + ch->height;
	}

	d->font->nominal_height = max_v_pos - min_v_pos;

	// Another pass, to fixup the v_offsets so that the minimum one is 0.
	for(i=0; i<d->font->num_chars; i++) {
		ch = &d->font->char_array[i];

		ch->v_offset -= min_v_pos;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xf4240, -0x24(%rbp)   # imm = 0xF4240
movl $0xfff0bdc0, -0x28(%rbp) # imm = 0xFFF0BDC0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x109bfd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jle 0x109bb0
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x24(%rbp), %eax
jge 0x109bc6
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
addl 0xc(%rcx), %eax
cmpl -0x28(%rbp), %eax
jle 0x109bea
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
addl 0xc(%rcx), %eax
movl %eax, -0x28(%rbp)
jmp 0x109bec
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x109b62
movl -0x28(%rbp), %ecx
subl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x4(%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x109c5a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x109c15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: get_nybble
static u8 get_nybble(dbuf *f, i64 abs_byte_pos, i64 nybble_offs)
{
	u8 b;
	b = dbuf_getbyte(f, abs_byte_pos + nybble_offs/2);
	if(nybble_offs%2) {
		return b&0x0f;
	}
	return b>>4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
addq %rax, %rsi
callq 0x165060
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x10a3b5
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movb %al, -0x1(%rbp)
jmp 0x10a3bf
movzbl -0x21(%rbp), %eax
sarl $0x4, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: get_packed_int
static int get_packed_int(dbuf *f, i64 raster_pos, i64 *nybble_pos,
	i64 initial_zero_count, i64 *result)
{
	u8 v = 0;
	i64 zero_count = initial_zero_count;
	i64 val;
	i64 i;

	while(1) {
		v = get_nybble(f, raster_pos, *nybble_pos);
		(*nybble_pos)++;

		if(v==0) {
			zero_count++;
			if(zero_count>16) { // Sanity check
				de_err(f->c, "Bad packed int at %d", (int)raster_pos);
				*result = 0;
				return 0;
			}
		}
		else {
			break;
		}
	}

	val = (i64)v;
	// There are zero_count+1 data nybbles, but we've already read the first one,
	// so we need to read zero_count more of them.
	for(i=0; i<zero_count; i++) {
		val = (val<<4) | get_nybble(f, raster_pos, *nybble_pos);
		(*nybble_pos)++;
	}

	*result = val;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x10a360
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movzbl -0x31(%rbp), %eax
cmpl $0x0, %eax
jne 0x10a46b
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpq $0x10, -0x40(%rbp)
jle 0x10a469
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0xb897c(%rip), %rsi     # 0x1c2dca
movb $0x0, %al
callq 0x15bfb0
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x10a4e7
jmp 0x10a46d
jmp 0x10a46f
jmp 0x10a3f8
movzbl -0x31(%rbp), %eax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x10a4d5
movq -0x48(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x10a360
movb %al, %cl
movq -0x58(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x10a47f
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: set_bit_at_cur_pos
static void set_bit_at_cur_pos(struct de_bitmap_font_char *ch, struct page_ctx *pg)
{
	i64 bytepos;
	i64 bitpos;

	if(pg->curpos_x<0 || pg->curpos_x>=pg->w) return;
	if(pg->curpos_y<0 || pg->curpos_y>=pg->h) return;

	bytepos = pg->curpos_y*ch->rowspan + pg->curpos_x/8;
	bitpos = pg->curpos_x%8;
	ch->bitmap[bytepos] |= 1<<(7-bitpos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jl 0x10a51c
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
jl 0x10a521
jmp 0x10a5b5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jl 0x10a541
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jl 0x10a543
jmp 0x10a5b5
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
imulq 0x18(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rdx, -0x20(%rbp)
movl $0x7, %eax
subq -0x20(%rbp), %rax
movl %eax, %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pkfont.c
// Function: repeat_row_as_needed
static void repeat_row_as_needed(struct de_bitmap_font_char *ch, struct page_ctx *pg, i64 repeat_count)
{
	i64 z;
	i64 from_row, to_row;

	from_row = pg->curpos_y-1;
	if(from_row<0) return;

	for(z=0; z<repeat_count; z++) {
		to_row = pg->curpos_y;
		if(to_row>=pg->h) return;
		de_memcpy(&ch->bitmap[to_row*ch->rowspan], &ch->bitmap[from_row*ch->rowspan], (size_t)ch->rowspan);
		pg->curpos_y++;
		pg->pixelcount += pg->w;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jge 0x10a5f0
jmp 0x10a697
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x10a697
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jl 0x10a625
jmp 0x10a697
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq 0x18(%rcx), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq 0x18(%rcx), %rax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x191e0
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10a5f8
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xa9821(%rip), %rcx     # 0x1b3ed8
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xb87a3(%rip), %rcx     # 0x1c2e68
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x96b05(%rip), %rcx     # 0x1a11d9
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x2d(%rip), %rcx        # 0x10a710
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x45e(%rip), %rcx       # 0x10ab50
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x48f(%rip), %rcx       # 0x10ab90
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %ecx
callq 0x164d10
leaq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xa1a0a0d474e5089, %rcx # imm = 0xA1A0A0D474E5089
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x10ac1e
movl $0x1, -0x4(%rbp)
jmp 0x10ac75
leaq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xa1a0a0d474e4a8b, %rcx # imm = 0xA1A0A0D474E4A8B
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x10ac46
movl $0x2, -0x4(%rbp)
jmp 0x10ac75
leaq -0x18(%rbp), %rax
movq (%rax), %rax
movabsq $0xa1a0a0d474e4d8a, %rcx # imm = 0xA1A0A0D474E4D8A
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x10ac6e
movl $0x3, -0x4(%rbp)
jmp 0x10ac75
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x10acab
movq -0x8(%rbp), %rdi
leaq 0xb82c0(%rip), %rsi     # 0x1c2f64
callq 0x15e380
jmp 0x10ad25
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x10acc6
movq -0x8(%rbp), %rdi
leaq 0xb82a9(%rip), %rsi     # 0x1c2f68
callq 0x15e380
jmp 0x10ad25
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x10acd1
jmp 0x10ad25
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x10aced
movq -0x8(%rbp), %rdi
leaq 0xb8286(%rip), %rsi     # 0x1c2f6c
callq 0x15e380
jmp 0x10ad25
movq -0x10(%rbp), %rax
cmpb $0x0, 0x7(%rax)
je 0x10ad09
movq -0x8(%rbp), %rdi
leaq 0xb826f(%rip), %rsi     # 0x1c2f71
callq 0x15e380
jmp 0x10ad25
movq -0x10(%rbp), %rax
cmpb $0x0, 0xc(%rax)
jne 0x10ad15
jmp 0x10ad25
movq -0x8(%rbp), %rdi
leaq 0xb824d(%rip), %rsi     # 0x1c2f6d
callq 0x15e380
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)