LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_plaintext_ext_textsubblock
static void do_plaintext_ext_textsubblock(deark *c, lctx *d, struct plaintext_ext_ctx *ctx,
	dbuf *inf, i64 pos1, i64 len)
{
	i64 k;

	for(k=0; k<len; k++) {
		u8 b;

		b = dbuf_getbyte(inf, pos1+k);
		if(ctx->outf_txt) dbuf_writebyte(ctx->outf_txt, b);

		if(ctx->ok_to_render &&
			((ctx->cur_ypos_in_chars+1)*ctx->char_height <= ctx->textarea_ysize_in_pixels))
		{
			render_plaintext_char(c, d, b,
				ctx->textarea_xpos_in_pixels + ctx->cur_xpos_in_chars*ctx->char_width,
				ctx->textarea_ypos_in_pixels + ctx->cur_ypos_in_chars*ctx->char_height,
				ctx->char_width, ctx->char_height, ctx->fgclr, ctx->bgclr);
		}

		ctx->cur_xpos_in_chars++;
		if(ctx->cur_xpos_in_chars >= ctx->text_width_in_chars) {
			ctx->cur_ypos_in_chars++;
			ctx->cur_xpos_in_chars = 0;

			if(ctx->outf_txt) {
				// Insert newlines in appropriate places.
				dbuf_writebyte(ctx->outf_txt, '\n');
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %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, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x743ea
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x39(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x742d6
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
movzbl -0x39(%rbp), %esi
callq 0x168380
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x7437a
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
imulq 0x38(%rcx), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jg 0x7437a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x39(%rbp), %dl
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %r8
imulq 0x30(%r8), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %r8
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %r9
imulq 0x38(%r9), %rax
addq %rax, %r8
movq -0x18(%rbp), %rax
movq 0x30(%rax), %r9
movq -0x18(%rbp), %rax
movq 0x38(%rax), %r11
movq -0x18(%rbp), %rax
movl 0x50(%rax), %r10d
movq -0x18(%rbp), %rax
movl 0x54(%rax), %eax
movzbl %dl, %edx
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x74510
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jl 0x743d7
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x743d5
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
movl $0xa, %esi
callq 0x168380
jmp 0x743d7
jmp 0x743d9
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x74298
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: decode_text_color
static void decode_text_color(deark *c, lctx *d, const char *name, u8 clr_idx,
	de_color *pclr)
{
	de_color clr;
	const char *alphastr;
	char csamp[32];

	clr = d->global_ct[(unsigned int)clr_idx];
	*pclr = clr;

	if(d->gce && d->gce->trns_color_idx_valid && d->gce->trns_color_idx==clr_idx) {
		alphastr = ",A=0";
		*pclr = DE_SET_ALPHA(*pclr, 0);
	}
	else {
		alphastr = "";
	}
	de_get_colorsample_code(c, clr, csamp, sizeof(csamp));
	de_dbg(c, "%s color: idx=%3u (%3u,%3u,%3u%s)%s", name,
		(unsigned int)clr_idx, (unsigned int)DE_COLOR_R(clr),
		(unsigned int)DE_COLOR_G(clr), (unsigned int)DE_COLOR_B(clr),
		alphastr, csamp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x19(%rbp), %ecx
movl %ecx, %ecx
movl 0x38(%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x440(%rax)
je 0x74485
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x74485
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movzbl 0x2(%rax), %eax
movzbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x74485
leaq 0x137427(%rip), %rax    # 0x1ab891
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
orl $0x0, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x74490
leaq 0x15c744(%rip), %rax    # 0x1d0bd0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x60(%rbp), %rdx
movl $0x20, %ecx
callq 0x15bcc0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movzbl -0x19(%rbp), %ecx
movl -0x2c(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movzbl %al, %r8d
movl -0x2c(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %r9d
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movzbl %al, %r11d
movq -0x38(%rbp), %r10
leaq -0x60(%rbp), %rax
leaq 0x1373ac(%rip), %rsi    # 0x1ab896
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: render_plaintext_char
static void render_plaintext_char(deark *c, lctx *d, u8 ch,
	i64 pos_x, i64 pos_y, i64 size_x, i64 size_y,
	de_color fgclr, de_color bgclr)
{
	i64 i, j;
	const u8 *fontdata;
	const u8 *chardata;

	fontdata = de_get_8x8ascii_font_ptr();

	if(ch<32 || ch>127) ch=32;
	chardata = &fontdata[8 * ((unsigned int)ch - 32)];

	for(j=0; j<size_y; j++) {
		for(i=0; i<size_x; i++) {
			unsigned int x2, y2;
			int isbg;
			de_color clr;

			// TODO: Better character-rendering facilities.
			// de_font_paint_character_idx() doesn't quite do what we need.

			x2 = (unsigned int)(0.5+(((double)i)*(8.0/(double)size_x)));
			y2 = (unsigned int)(0.5+(((double)j)*(8.0/(double)size_y)));

			if(x2<8 && y2<8 && (chardata[y2]&(1<<(7-x2)))) {
				isbg = 0;
			}
			else {
				isbg = 1;
			}
			clr = isbg ? bgclr : fgclr;
			if(DE_COLOR_A(clr)>0) {
				de_bitmap_setpixel_rgb(d->screen_img, pos_x+i, pos_y+j, clr);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %dl, %al
movl 0x20(%rbp), %edx
movl 0x18(%rbp), %edx
movq 0x10(%rbp), %rdx
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
callq 0x161450
movq %rax, -0x48(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x20, %eax
jl 0x74556
movzbl -0x11(%rbp), %eax
cmpl $0x7f, %eax
jle 0x7455a
movb $0x20, -0x11(%rbp)
movq -0x48(%rbp), %rax
movzbl -0x11(%rbp), %ecx
subl $0x20, %ecx
shll $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq 0x10(%rbp), %rax
jge 0x746a5
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x74692
cvtsi2sdq -0x38(%rbp), %xmm0
cvtsi2sdq -0x30(%rbp), %xmm3
movsd 0x137097(%rip), %xmm2   # 0x1ab648
movaps %xmm2, %xmm1
divsd %xmm3, %xmm1
mulsd %xmm1, %xmm0
movsd 0x12f074(%rip), %xmm1   # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x54(%rbp)
cvtsi2sdq -0x40(%rbp), %xmm0
cvtsi2sdq 0x10(%rbp), %xmm3
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x58(%rbp)
cmpl $0x8, -0x54(%rbp)
jae 0x74628
cmpl $0x8, -0x58(%rbp)
jae 0x74628
movq -0x50(%rbp), %rax
movl -0x58(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl $0x7, %ecx
subl -0x54(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x74628
movl $0x0, -0x5c(%rbp)
jmp 0x7462f
movl $0x1, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x7463d
movl 0x20(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x74643
movl 0x18(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x7467f
movq -0x10(%rbp), %rax
movq 0x438(%rax), %rdi
movq -0x20(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq -0x40(%rbp), %rdx
movl -0x60(%rbp), %ecx
callq 0x16b310
jmp 0x74681
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x7458f
jmp 0x74694
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x74579
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: callback_for_comment_ext
static void callback_for_comment_ext(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct comment_ext_ctx *ctx = (struct comment_ext_ctx*)sbrd->userdata;

	if(sbrd->dlen<1) return;

	if(ctx->outf) {
		// GIF comments are supposed to be 7-bit ASCII, so just copy them as-is.
		dbuf_copy(sbrd->inf, sbrd->dpos, sbrd->dlen, ctx->outf);
	}

	if(ctx->s->len<DE_DBG_MAX_STRLEN) {
		dbuf_read_to_ucstring(sbrd->inf, sbrd->dpos, sbrd->dlen, ctx->s, 0, DE_ENCODING_ASCII);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x30(%rax)
jge 0x746dc
jmp 0x7474a
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7470c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x166070
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x1f4, 0x10(%rax)      # imm = 0x1F4
jge 0x7474a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1669f0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_animation_extension
static void do_animation_extension(deark *c, lctx *d, i64 pos)
{
	i64 sub_block_len;
	u8 sub_block_id;
	const char *name;

	sub_block_len = (i64)de_getbyte(pos++);
	if(sub_block_len<1) return;

	sub_block_id = de_getbyte(pos++);
	switch(sub_block_id) {
	case 1: name="looping"; break;
	case 2: name="buffering"; break;
	default: name="?";
	}
	de_dbg(c, "netscape extension type: %d (%s)", (int)sub_block_id, name);

	if(sub_block_id==1 && sub_block_len>=3) {
		i64 loop_count;
		loop_count = de_getu16le(pos);
		de_dbg(c, "loop count: %d%s", (int)loop_count,
			(loop_count==0)?" (infinite)":"");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
callq 0x165060
movzbl %al, %eax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jge 0x74793
jmp 0x7485f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq %rsi, %rax
incq %rax
movq %rax, -0x18(%rbp)
callq 0x165060
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x1, %eax
je 0x747c9
jmp 0x747bf
movl -0x3c(%rbp), %eax
subl $0x2, %eax
je 0x747d6
jmp 0x747e3
leaq 0x13722e(%rip), %rax    # 0x1ab9fe
movq %rax, -0x30(%rbp)
jmp 0x747ee
leaq 0x137229(%rip), %rax    # 0x1aba06
movq %rax, -0x30(%rbp)
jmp 0x747ee
leaq 0x143443(%rip), %rax    # 0x1b7c2d
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x21(%rbp), %edx
movq -0x30(%rbp), %rcx
leaq 0x13720f(%rip), %rsi    # 0x1aba10
movb $0x0, %al
callq 0x15b0d0
movzbl -0x21(%rbp), %eax
cmpl $0x1, %eax
jne 0x7485f
cmpq $0x3, -0x20(%rbp)
jl 0x7485f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rsi
leaq 0x15c38e(%rip), %rcx    # 0x1d0bd0
leaq 0x1371f9(%rip), %rax    # 0x1aba42
cmpq $0x0, %rsi
cmoveq %rax, %rcx
leaq 0x1371d9(%rip), %rsi    # 0x1aba31
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/gif.c
// Function: do_xmp_extension
static void do_xmp_extension(deark *c, lctx *d, i64 pos)
{
	i64 nbytes_tot, nbytes_payload;

	// XMP abuses GIF's subblock structure. Instead of being split into
	// subblocks as GIF expects, XMP is stored as a single blob of bytes,
	// followed by 258 "magic" bytes that re-sync the GIF decoder.

	// Calculate the total number of bytes used in this series of subblocks.
	do_skip_subblocks(c, d, pos, &nbytes_tot);
	if(nbytes_tot<=258) return;
	nbytes_payload = nbytes_tot-258;
	dbuf_create_file_from_slice(c->infile, pos, nbytes_payload, "xmp", NULL, DE_CREATEFLAG_IS_AUX);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x73c80
cmpq $0x102, -0x20(%rbp)     # imm = 0x102
jg 0x748a5
jmp 0x748da
movq -0x20(%rbp), %rax
subq $0x102, %rax            # imm = 0x102
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0x14eafc(%rip), %rcx    # 0x1c33c6
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_iccprofile_extension
static void do_iccprofile_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "icc", NULL, DE_CREATEFLAG_IS_AUX);
	do_copy_subblocks_to_dbuf(c, d, outf, pos, 0, 0);
	dbuf_close(outf);
}

// 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
leaq 0x12d0de(%rip), %rsi    # 0x1a19e5
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x74cb0
movq -0x20(%rbp), %rdi
callq 0x1676a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_imagemagick_extension
static void do_imagemagick_extension(deark *c, lctx *d, i64 pos)
{
	i64 sub_block_len;
	de_ucstring *s = NULL;

	sub_block_len = (i64)de_getbyte_p(&pos);
	if(sub_block_len<1) goto done;
	s = ucstring_create(c);
	dbuf_read_to_ucstring(c->infile, pos, sub_block_len, s, 0, DE_ENCODING_ASCII);
	de_dbg(c, "ImageMagick extension data: \"%s\"", ucstring_getpsz_d(s));
done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jge 0x7498d
jmp 0x749e2
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x137073(%rip), %rsi    # 0x1aba4e
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_mgk8bim_extension
static void do_mgk8bim_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *tmpf = NULL;
	tmpf = dbuf_create_membuf(c, 0, 0);
	do_copy_subblocks_to_dbuf(c, d, tmpf, pos, 1, 4*1048576);
	de_dbg(c, "photoshop data at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	fmtutil_handle_photoshop_rsrc(c, tmpf, 0, tmpf->len, 0x0);
	de_dbg_indent(c, -1);
	dbuf_close(tmpf);
}

// 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
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %r8d
movl $0x400000, %r9d         # imm = 0x400000
callq 0x74cb0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x137010(%rip), %rsi    # 0x1aba6f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
xorl %r8d, %r8d
callq 0x173bd0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x20(%rbp), %rdi
callq 0x1676a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_giflite_extension
static void do_giflite_extension(deark *c, lctx *d, i64 pos1)
{
	i64 sub_block_len;
	i64 pos = pos1;
	UI vmajor, vminor;
	i64 olen;

	sub_block_len = (i64)de_getbyte_p(&pos);
	if(sub_block_len<2) return;
	vmajor = (UI)de_getbyte_p(&pos);
	vminor = (UI)de_getbyte_p(&pos);
	de_dbg(c, "GIFLITE ver: %u.%02u", vmajor, vminor);
	if(sub_block_len<6) return;
	olen = de_getu32le_p(&pos);
	de_dbg(c, "orig file size: %"I64_FMT, olen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jge 0x74b9d
jmp 0x74c17
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
leaq 0x136ebe(%rip), %rsi    # 0x1aba9a
movb $0x0, %al
callq 0x15b0d0
cmpq $0x6, -0x20(%rbp)
jge 0x74bec
jmp 0x74c17
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165580
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0x136e9f(%rip), %rsi    # 0x1abaaf
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_unknown_extension
static void do_unknown_extension(deark *c, lctx *d, i64 pos)
{
	dbuf *tmpf = NULL;
	tmpf = dbuf_create_membuf(c, 0, 0);
	do_copy_subblocks_to_dbuf(c, d, tmpf, pos, 1, 256);
	de_dbg_hexdump(c, tmpf, 0, tmpf->len, 256, NULL, 0x1);
	dbuf_close(tmpf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x168020
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %r8d
movl $0x100, %r9d            # imm = 0x100
callq 0x74cb0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %r9d
movl $0x100, %r8d            # imm = 0x100
movq %r9, %rdx
movl $0x1, (%rsp)
callq 0x15b840
movq -0x20(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_copy_subblocks_to_dbuf
static void do_copy_subblocks_to_dbuf(deark *c, lctx *d, dbuf *outf,
	i64 pos1, int has_max, i64 maxlen)
{
	i64 pos = pos1;
	struct copy_subblocks_ctx ctx;

	ctx.outf = outf;
	ctx.has_max = has_max;
	ctx.maxlen = maxlen;
	ctx.nbytes_copied = 0;
	do_read_subblocks_p(c, d, c->infile, callback_for_copy_subblocks, (void*)&ctx, &pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x13(%rip), %rcx        # 0x74d20
leaq -0x58(%rbp), %r8
leaq -0x38(%rbp), %r9
callq 0x73ce0
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: callback_for_copy_subblocks
static void callback_for_copy_subblocks(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct copy_subblocks_ctx *ctx = (struct copy_subblocks_ctx*)sbrd->userdata;
	i64 nbytes_to_copy;

	if(ctx->has_max && (ctx->nbytes_copied >= ctx->maxlen)) return;
	if(sbrd->dlen<1) return;

	nbytes_to_copy = sbrd->dlen;
	if(ctx->has_max) {
		if(ctx->nbytes_copied + nbytes_to_copy > ctx->maxlen) {
			nbytes_to_copy = ctx->maxlen - ctx->nbytes_copied;
		}
	}
	dbuf_copy(sbrd->inf, sbrd->dpos, nbytes_to_copy, ctx->outf);
	ctx->nbytes_copied += nbytes_to_copy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x74d5d
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x74d5d
jmp 0x74ddc
movq -0x18(%rbp), %rax
cmpq $0x1, 0x30(%rax)
jge 0x74d6a
jmp 0x74ddc
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x74dac
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0x74daa
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x28(%rbp)
jmp 0x74dac
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
callq 0x166070
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_create_interlace_map
static void do_create_interlace_map(deark *c, lctx *d, struct gif_image_data *gi)
{
	int pass;
	i64 startrow, rowskip;
	i64 row;
	i64 rowcount = 0;

	if(!gi->interlaced) return;
	gi->interlace_map = de_mallocarray(c, gi->height, sizeof(u16));

	for(pass=1; pass<=4; pass++) {
		if(pass==1) { startrow=0; rowskip=8; }
		else if(pass==2) { startrow=4; rowskip=8; }
		else if(pass==3) { startrow=2; rowskip=4; }
		else { startrow=1; rowskip=2; }

		for(row=startrow; row<gi->height; row+=rowskip) {
			gi->interlace_map[rowcount] = (u16)row;
			rowcount++;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x7556b
jmp 0x75650
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl $0x2, %edx
callq 0x15c450
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movl $0x1, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jg 0x75650
cmpl $0x1, -0x1c(%rbp)
jne 0x755b5
movq $0x0, -0x28(%rbp)
movq $0x8, -0x30(%rbp)
jmp 0x755f9
cmpl $0x2, -0x1c(%rbp)
jne 0x755cd
movq $0x4, -0x28(%rbp)
movq $0x8, -0x30(%rbp)
jmp 0x755f7
cmpl $0x3, -0x1c(%rbp)
jne 0x755e5
movq $0x2, -0x28(%rbp)
movq $0x4, -0x30(%rbp)
jmp 0x755f5
movq $0x1, -0x28(%rbp)
movq $0x2, -0x30(%rbp)
jmp 0x755f7
jmp 0x755f9
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x75640
movq -0x38(%rbp), %rax
movw %ax, %dx
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x40(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x75601
jmp 0x75642
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x75593
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: my_giflzw_write_cb
static void my_giflzw_write_cb(dbuf *f, void *userdata,
	const u8 *buf, i64 size)
{
	i64 i;
	struct my_giflzw_userdata *u = (struct my_giflzw_userdata*)userdata;

	for(i=0; i<(i64)size; i++) {
		do_record_pixel(u->c, u->d, u->gi,
			buf[i], i);
	}
	u->gi->pixels_set += (i64)size;
}

// 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 -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x756cc
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x28(%rbp), %r8
callq 0x757a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x75688
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: callback_for_image_subblock
static void callback_for_image_subblock(deark *c, lctx *d, struct subblock_reader_data *sbrd)
{
	struct gif_image_data *gi = (struct gif_image_data*)sbrd->userdata;

	if(sbrd->reported_dlen==0) {
		de_dbg(c, "block terminator at %"I64_FMT, sbrd->subblkpos);
		return;
	}
	de_dbg2(c, "sub-block at %"I64_FMT", size=%"I64_FMT, sbrd->subblkpos, sbrd->reported_dlen);

	if(!gi->failure_flag && !gi->dfctx->finished_flag) {
		de_dfilter_addslice(gi->dfctx, sbrd->inf, sbrd->dpos, sbrd->dlen);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x75736
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x1364eb(%rip), %rsi    # 0x1abc18
movb $0x0, %al
callq 0x15b0d0
jmp 0x75795
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0x1364df(%rip), %rsi    # 0x1abc30
movb $0x0, %al
callq 0x15b350
movq -0x20(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x75795
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
cmpb $0x0, 0x20(%rax)
jne 0x75795
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
callq 0x177770
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_record_pixel
static void do_record_pixel(deark *c, lctx *d, struct gif_image_data *gi, unsigned int coloridx,
	i64 offset)
{
	i64 pixnum;
	i64 xi, yi;
	i64 yi1;
	de_color clr;

	if(coloridx>255) return;

	pixnum = gi->pixels_set + offset;
	xi = pixnum%gi->width;
	yi1 = pixnum/gi->width;
	if(gi->interlace_map && yi1<gi->height) {
		yi = gi->interlace_map[yi1];
	}
	else {
		yi = yi1;
	}

	if(gi->has_local_color_table && coloridx<gi->local_color_table_size) {
		clr = gi->local_ct[coloridx];
	}
	else {
		clr = d->global_ct[coloridx];
	}

	if(d->gce && d->gce->trns_color_idx_valid &&
		(d->gce->trns_color_idx == coloridx))
	{
		// Make this pixel transparent
		clr = DE_SET_ALPHA(clr, 0);
	}
	else {
		clr = DE_SET_ALPHA(clr, 0xff);
	}

	de_bitmap_setpixel_rgb(gi->img, xi, yi, clr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0xff, -0x1c(%rbp)
jbe 0x757c9
jmp 0x758d6
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cqto
idivq 0x18(%rcx)
movq %rdx, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cqto
idivq 0x18(%rcx)
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x7582c
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x7582c
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x48(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movq %rax, -0x40(%rbp)
jmp 0x75834
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x7585b
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jge 0x7585b
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl 0x58(%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
jmp 0x75869
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl 0x38(%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x440(%rax)
je 0x758af
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x758af
movq -0x10(%rbp), %rax
movq 0x440(%rax), %rax
movzbl 0x2(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x758af
movl -0x4c(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
orl $0x0, %eax
movl %eax, -0x4c(%rbp)
jmp 0x758bf
movl -0x4c(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x4c(%rbp), %ecx
callq 0x16b310
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_module_graspgl
void de_module_graspgl(deark *c, struct deark_module_info *mi)
{
	mi->id = "graspgl";
	mi->desc = "GRASP GL animation";
	mi->run_fn = de_run_graspgl;
	mi->identify_fn = de_identify_graspgl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x13646b(%rip), %rcx    # 0x1abd62
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x136465(%rip), %rcx    # 0x1abd6a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x75930
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ad(%rip), %rcx       # 0x75ad0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_run_graspgl
static void de_run_graspgl(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 num_files;
	i64 pos = 0;
	i64 i;

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

	if((UI)de_getu32be(0)==0x41470100U) {
		// Ref: Aminet : gl2p1.lzh
		d->is_amiga = 1;
	}

	if(d->is_amiga) {
		de_declare_fmt(c, "Amiga GRASP GL");
		pos += 4;
	}
	else {
		de_declare_fmt(c, "GRASP GL");
		d->is_le = 1;
	}

	d->input_encoding = de_get_input_encoding(c, NULL,
		(d->is_amiga ? DE_ENCODING_LATIN1 : DE_ENCODING_CP437));

	d->index_size = dbuf_getu16x(c->infile, pos, d->is_le);
	pos += 2;

	d->index_pos = pos;
	de_dbg(c, "index size: %"I64_FMT, d->index_size);

	// 17 bytes per file entry
	num_files = (d->index_size+16)/17;
	de_dbg(c, "max number of files: %d", (int)num_files);

	for(i=0; i<num_files; i++) {
		if(!do_extract_file(c, d, i))
			break;
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
cmpl $0x41470100, %eax       # imm = 0x41470100
jne 0x75982
movq -0x18(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x759aa
movq -0x8(%rbp), %rdi
leaq 0x1363fb(%rip), %rsi    # 0x1abd92
callq 0x15e380
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x759c5
movq -0x8(%rbp), %rdi
leaq 0x1363e3(%rip), %rsi    # 0x1abd98
callq 0x15e380
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %ecx
movl $0xd, %edx
movl $0x5, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x165820
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x136361(%rip), %rsi    # 0x1abda1
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x10, %rax
movl $0x11, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x13633f(%rip), %rsi    # 0x1abdb1
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x75ab3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x75df0
cmpl $0x0, %eax
jne 0x75aa3
jmp 0x75ab3
jmp 0x75aa5
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x75a81
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_identify_graspgl
static int de_identify_graspgl(deark *c)
{
	i64 index_size;
	i64 index_pos;
	i64 first_offset;
	int is_le = 1;
	int gl_ext;

	index_size = de_getu16le(0);
	if(index_size==0x4741) {
		if((UI)de_getu16be(2)==0x0100U) {
			is_le = 0; // Amiga GL?
			index_size = de_getu16be(4);
		}
	}

	// Header should be a nonzero multiple of 17 bytes.
	if(index_size==0 || (index_size%17 != 0)) return 0;
	index_pos = is_le ? 2 : 6;
	if(index_pos+index_size>c->infile->len) return 0;

	gl_ext = de_input_file_has_ext(c, "gl");

	// Most likely, the first embedded file immediately follows
	// the header. If so, it's pretty good evidence this is a
	// grasp_gl file.
	first_offset = dbuf_getu32x(c->infile, index_pos, is_le);

	if(first_offset>c->infile->len || first_offset<index_pos+index_size) return 0;
	if(first_offset == index_pos+index_size)
		return gl_ext ? 100 : 70;

	if(gl_ext) return 5;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x4741, -0x18(%rbp)    # imm = 0x4741
jne 0x75b3a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x1651d0
cmpl $0x100, %eax            # imm = 0x100
jne 0x75b38
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x1651d0
movq %rax, -0x18(%rbp)
jmp 0x75b3a
cmpq $0x0, -0x18(%rbp)
je 0x75b55
movq -0x18(%rbp), %rax
movl $0x11, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x75b61
movl $0x0, -0x4(%rbp)
jmp 0x75c32
movl -0x2c(%rbp), %edx
movl $0x6, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x75b9c
movl $0x0, -0x4(%rbp)
jmp 0x75c32
movq -0x10(%rbp), %rdi
leaq 0x1361c0(%rip), %rsi    # 0x1abd67
callq 0x15d180
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x1658c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jg 0x75bea
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
addq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jge 0x75bf3
movl $0x0, -0x4(%rbp)
jmp 0x75c32
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
addq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0x75c1c
movl -0x30(%rbp), %edx
movl $0x46, %eax
movl $0x64, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x75c32
cmpl $0x0, -0x30(%rbp)
je 0x75c2b
movl $0x5, -0x4(%rbp)
jmp 0x75c32
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_module_graspfont
void de_module_graspfont(deark *c, struct deark_module_info *mi)
{
	mi->id = "graspfont";
	mi->desc = "GRASP font";
	mi->run_fn = de_run_graspfont;
	mi->identify_fn = de_identify_graspfont;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x136126(%rip), %rcx    # 0x1abd7d
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x136122(%rip), %rcx    # 0x1abd87
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x75c90
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x6d(%rip), %rcx        # 0x75cf0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_run_graspfont
static void de_run_graspfont(deark *c, de_module_params *mparams)
{
	if(gfont_is_new_format(c)) {
		de_declare_fmt(c, "GRASP font (new)");
		de_run_graspfont_newfmt(c);
	}
	else {
		de_declare_fmt(c, "GRASP font (old)");
		de_run_graspfont_oldfmt(c);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x76070
cmpl $0x0, %eax
je 0x75cc9
movq -0x8(%rbp), %rdi
leaq 0x136175(%rip), %rsi    # 0x1abe2e
callq 0x15e380
movq -0x8(%rbp), %rdi
callq 0x760e0
jmp 0x75ce2
movq -0x8(%rbp), %rdi
leaq 0x13616b(%rip), %rsi    # 0x1abe3f
callq 0x15e380
movq -0x8(%rbp), %rdi
callq 0x764e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: de_identify_graspfont
static int de_identify_graspfont(deark *c)
{
	i64 reported_filesize;
	i64 num_chars;
	i64 bytes_per_glyph;

	if(!de_input_file_has_ext(c, "set") && !de_input_file_has_ext(c, "fnt"))
		return 0;

	if(gfont_is_new_format(c)) {
		return 30;
	}

	reported_filesize = de_getu16le(0);
	if(reported_filesize != c->infile->len) return 0;
	num_chars = (i64)de_getbyte(2);
	if(num_chars==0) num_chars=256;
	bytes_per_glyph = (i64)de_getbyte(6);
	if(7+num_chars*bytes_per_glyph == reported_filesize)
		return 100;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x134a56(%rip), %rsi    # 0x1aa75d
callq 0x15d180
cmpl $0x0, %eax
jne 0x75d32
movq -0x10(%rbp), %rdi
leaq 0x133262(%rip), %rsi    # 0x1a8f7e
callq 0x15d180
cmpl $0x0, %eax
jne 0x75d32
movl $0x0, -0x4(%rbp)
jmp 0x75de0
movq -0x10(%rbp), %rdi
callq 0x76070
cmpl $0x0, %eax
je 0x75d4c
movl $0x1e, -0x4(%rbp)
jmp 0x75de0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0x75d7c
movl $0x0, -0x4(%rbp)
jmp 0x75de0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x75da4
movq $0x100, -0x20(%rbp)     # imm = 0x100
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
callq 0x165060
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
imulq -0x28(%rbp), %rax
addq $0x7, %rax
cmpq -0x18(%rbp), %rax
jne 0x75dd9
movl $0x64, -0x4(%rbp)
jmp 0x75de0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grasp.c
// Function: gfont_is_new_format
static int gfont_is_new_format(deark *c)
{
	i64 reported_filesize;

	if(de_getbyte(0)==0x10) {
		reported_filesize = de_getu16le(25);
		if(reported_filesize == c->infile->len) {
			return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x10, %eax
jne 0x760c8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x19, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x760c6
movl $0x1, -0x4(%rbp)
jmp 0x760cf
jmp 0x760c8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grob.c
// Function: de_module_grob
void de_module_grob(deark *c, struct deark_module_info *mi)
{
	mi->id = "grob";
	mi->desc = "GROB - HP48/49 calculator image";
	mi->run_fn = de_run_grob;
	mi->identify_fn = de_identify_grob;
	mi->help_fn = de_help_grob;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x135733(%rip), %rcx    # 0x1abf6a
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x13572a(%rip), %rcx    # 0x1abf6f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x76880
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x14d(%rip), %rcx       # 0x769b0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fe(%rip), %rcx       # 0x76a70
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grob.c
// Function: de_run_grob
static void de_run_grob(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	u8 buf[4];
	const char *s;

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

	s = de_get_ext_option(c, "grob:planes");
	if(s) {
		d->num_planes = de_atoi64(s);
	}
	if(d->num_planes<1) d->num_planes=1;
	if(d->num_planes>8) {
		de_err(c, "Unsupported grob:planes option");
		goto done;
	}

	s = de_get_ext_option(c, "grob:planeorder");
	if(s && s[0]=='l') {
		d->grayscale_lsb = 1;
	}

	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "HPHP", 4)) {
		de_run_grob_binary(c, d);
	}
	else {
		de_run_grob_text(c, d);
	}

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x28, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1356da(%rip), %rsi    # 0x1abf8f
callq 0x15cb30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x768d9
movq -0x28(%rbp), %rdi
callq 0x15ccc0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x18(%rax)
jge 0x768f0
movq -0x18(%rbp), %rax
movq $0x1, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x8, 0x18(%rax)
jle 0x76912
movq -0x8(%rbp), %rdi
leaq 0x135695(%rip), %rsi    # 0x1abf9b
movb $0x0, %al
callq 0x15bfb0
jmp 0x76992
movq -0x8(%rbp), %rdi
leaq 0x13569d(%rip), %rsi    # 0x1abfba
callq 0x15cb30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x76944
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6c, %eax
jne 0x76944
movq -0x18(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1c(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x164d10
leaq -0x1c(%rbp), %rax
movl (%rax), %eax
subl $0x50485048, %eax       # imm = 0x50485048
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x76983
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x76ab0
jmp 0x76990
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x76c30
jmp 0x76992
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grob.c
// Function: de_identify_grob
static int de_identify_grob(deark *c)
{
	u8 buf[10];
	de_read(buf, 0, 10);

	if(buf[0]=='H' && buf[1]=='P' && buf[2]=='H' && buf[3]=='P' &&
		buf[4]=='4' && (buf[5]=='8' || buf[5]=='9') &&
		buf[8]==0x1e && buf[9]==0x2b)
	{
			return 100;
	}

	if(buf[0]=='G' && buf[1]=='R' && buf[2]=='O' && buf[3]=='B') {
		return 90;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xa, %ecx
callq 0x164d10
movzbl -0x1a(%rbp), %eax
cmpl $0x48, %eax
jne 0x76a30
movzbl -0x19(%rbp), %eax
cmpl $0x50, %eax
jne 0x76a30
movzbl -0x18(%rbp), %eax
cmpl $0x48, %eax
jne 0x76a30
movzbl -0x17(%rbp), %eax
cmpl $0x50, %eax
jne 0x76a30
movzbl -0x16(%rbp), %eax
cmpl $0x34, %eax
jne 0x76a30
movzbl -0x15(%rbp), %eax
cmpl $0x38, %eax
je 0x76a15
movzbl -0x15(%rbp), %eax
cmpl $0x39, %eax
jne 0x76a30
movzbl -0x12(%rbp), %eax
cmpl $0x1e, %eax
jne 0x76a30
movzbl -0x11(%rbp), %eax
cmpl $0x2b, %eax
jne 0x76a30
movl $0x64, -0x4(%rbp)
jmp 0x76a64
movzbl -0x1a(%rbp), %eax
cmpl $0x47, %eax
jne 0x76a5d
movzbl -0x19(%rbp), %eax
cmpl $0x52, %eax
jne 0x76a5d
movzbl -0x18(%rbp), %eax
cmpl $0x4f, %eax
jne 0x76a5d
movzbl -0x17(%rbp), %eax
cmpl $0x42, %eax
jne 0x76a5d
movl $0x5a, -0x4(%rbp)
jmp 0x76a64
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/grob.c
// Function: de_run_grob_binary
static void de_run_grob_binary(deark *c, lctx *d)
{
	u8 hdr[18];
	i64 obj_id;
	i64 length;

	de_declare_fmt(c, "HP GROB, binary encoded");

	de_read(hdr, 0, 18);

	// Next 4 fields are packed 20-bit integers, 2.5 bytes each.

	obj_id = (hdr[10]&0x0f)<<16 | hdr[9]<<8 | hdr[8];
	length = hdr[12]<<12 | hdr[11]<<4 | hdr[10]>>4;
	de_dbg(c, "object id: 0x%05x", (unsigned int)obj_id);
	if(obj_id != 0x02b1e) {
		de_warn(c, "Unexpected object identifier (0x%05x, expected 0x02b1e)", (unsigned int)obj_id);
	}
	de_dbg(c, "object length in nibbles: %d", (int)length);

	d->h_phys = (hdr[15]&0x0f)<<16 | hdr[14]<<8 | hdr[13];
	d->w = hdr[17]<<12 | hdr[16]<<4 | hdr[15]>>4;
	de_dbg(c, "%sdimensions: %d"DE_CHAR_TIMES"%d", (d->num_planes==1)?"":"physical ",
		(int)d->w, (int)d->h_phys);

	grob_read_binary_bitmap(c, d, c->infile, 18);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x135504(%rip), %rsi    # 0x1abfcf
callq 0x15e380
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x12, %ecx
callq 0x164d10
movzbl -0x26(%rbp), %eax
andl $0xf, %eax
shll $0x10, %eax
movzbl -0x27(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x28(%rbp), %ecx
orl %ecx, %eax
cltq
movq %rax, -0x38(%rbp)
movzbl -0x24(%rbp), %eax
shll $0xc, %eax
movzbl -0x25(%rbp), %ecx
shll $0x4, %ecx
orl %ecx, %eax
movzbl -0x26(%rbp), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x1354ae(%rip), %rsi    # 0x1abfe7
movb $0x0, %al
callq 0x15b0d0
cmpq $0x2b1e, -0x38(%rbp)    # imm = 0x2B1E
je 0x76b62
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x13549e(%rip), %rsi    # 0x1abff9
movb $0x0, %al
callq 0x15bc10
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq 0x1354be(%rip), %rsi    # 0x1ac031
movb $0x0, %al
callq 0x15b0d0
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
shll $0x10, %eax
movzbl -0x22(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x23(%rbp), %ecx
orl %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movzbl -0x1f(%rbp), %eax
shll $0xc, %eax
movzbl -0x20(%rbp), %ecx
shll $0x4, %ecx
orl %ecx, %eax
movzbl -0x21(%rbp), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x13548f(%rip), %rdx    # 0x1ac063
leaq 0x159ff5(%rip), %rax    # 0x1d0bd0
cmpq $0x1, %rcx
cmoveq %rax, %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %r8d
leaq 0x135450(%rip), %rsi    # 0x1ac04e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x12, %ecx
callq 0x76d50
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)