LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: my_on_std_container_start_fn
static int my_on_std_container_start_fn(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;

	if(ictx->level==d->FORM_level) {
		if(d->frctx) {
			on_frame_end(c, d);
		}
		if((ictx->curr_container_contentstype4cc.id == CODE_ILBM) ||
			(ictx->curr_container_contentstype4cc.id == CODE_PBM) ||
			(ictx->curr_container_contentstype4cc.id == CODE_ACBM) ||
			(ictx->curr_container_contentstype4cc.id == CODE_RGBN) ||
			(ictx->curr_container_contentstype4cc.id == CODE_RGB8))
		{
			on_frame_begin(c, d, ictx->curr_container_contentstype4cc.id);
		}
		else {
			if(d->is_anim) {
				if(ictx->curr_container_contentstype4cc.id == CODE_8SVX) {
					d->found_audio = 1;
				}
				if(!d->extra_content_warned) {
					de_warn(c, "File includes unsupported content of type '%s'",
						ictx->curr_container_contentstype4cc.id_sanitized_sz);
					d->extra_content_warned = 1;
				}
			}
			else {
				de_err(c, "Unsupported ILBM-like format");
				d->errflag = 1;
			}
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
movl 0x64(%rdi), %eax
cmpl 0x18(%rbx), %eax
jne 0x79a39
movq %rdi, %r15
movq (%rdi), %r14
cmpq $0x0, 0xb0(%rbx)
je 0x7996b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x79a53
movl 0xfc(%r15), %ebp
cmpl $0x50424d1f, %ebp       # imm = 0x50424D1F
jle 0x79994
cmpl $0x50424d20, %ebp       # imm = 0x50424D20
je 0x799a4
cmpl $0x5247424e, %ebp       # imm = 0x5247424E
je 0x799a4
cmpl $0x52474238, %ebp       # imm = 0x52474238
je 0x799a4
jmp 0x799e9
cmpl $0x4143424d, %ebp       # imm = 0x4143424D
je 0x799a4
cmpl $0x494c424d, %ebp       # imm = 0x494C424D
jne 0x799e9
cmpq $0x0, 0xb0(%rbx)
jne 0x79a39
incl 0x20(%rbx)
movl $0x28, %esi
movq %r14, %rdi
callq 0xe969b
movq %rax, 0xb0(%rbx)
movl %ebp, (%rax)
movl 0x24(%rbx), %edx
movl %edx, 0x4(%rax)
cmpl $0x0, (%rbx)
je 0x79a39
leaq 0xaf94c(%rip), %rsi     # 0x129329
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
jmp 0x79a39
cmpl $0x0, (%rbx)
je 0x79a21
cmpl $0x38535658, %ebp       # imm = 0x38535658
jne 0x799fa
movb $0x1, 0x44(%rbx)
cmpb $0x0, 0x48(%rbx)
jne 0x79a39
addq $0x100, %r15            # imm = 0x100
leaq 0xaf8cf(%rip), %rsi     # 0x1292dd
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe9b27
movb $0x1, 0x48(%rbx)
jmp 0x79a39
leaq 0xaf8e4(%rip), %rsi     # 0x12930c
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9df7
movl $0x1, 0x1c(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: on_frame_end
static void on_frame_end(deark *c, lctx *d)
{
	if(!d->frctx) return;

	if(d->is_anim) de_dbg(c, "[frame #%d end]", d->frctx->frame_idx);

	destroy_frame(c, d, d->oldfrctx[1]); // Destroy the frame that's aged out
	d->oldfrctx[1] = d->oldfrctx[0]; // Make room for the new frame
	d->oldfrctx[0] = d->frctx; // Save the new frame
	d->frctx = NULL;
	d->num_frames_finished++;
}

// Assembly:
movq 0xb0(%rsi), %rax
testq %rax, %rax
je 0x79ac4
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, (%rsi)
je 0x79a83
movl 0x4(%rax), %edx
leaq 0xaf8c2(%rip), %rsi     # 0x12933b
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0xc0(%rbx), %r15
testq %r15, %r15
je 0x79aa3
movq 0x20(%r15), %rdi
callq 0xf0b13
movq %r14, %rdi
movq %r15, %rsi
callq 0xe9752
movups 0xb0(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
movq $0x0, 0xb0(%rbx)
incl 0x24(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_cmap
static void do_cmap(deark *c, lctx *d, i64 pos, i64 len)
{
	i64 ncolors;

	d->found_cmap = 1;
	d->cmap_changed_flag = 1;
	ncolors = len/3;
	de_dbg(c, "number of palette colors: %d", (int)ncolors);
	if(ncolors>256) ncolors=256;

	de_read_palette_rgb(c->infile, pos, ncolors, 3, d->pal_raw, 256, 0);
	if(ncolors > d->pal_ncolors) {
		d->pal_ncolors = ncolors;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movw $0x101, 0x33(%rsi)      # imm = 0x101
movabsq $0x5555555555555556, %rcx # imm = 0x5555555555555556
imulq %rcx
movq %rdx, %r15
shrq $0x3f, %r15
addq %rdx, %r15
leaq 0x973ed(%rip), %rsi     # 0x1113b4
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movl $0x100, %eax            # imm = 0x100
cmpq %rax, %r15
cmovgeq %rax, %r15
movq 0x18(%r12), %rdi
leaq 0xd4(%rbx), %r8
movl $0x0, (%rsp)
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
movq %r14, %rsi
movq %r15, %rdx
callq 0xf328f
cmpq 0xc8(%rbx), %r15
jle 0x7a016
movq %r15, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_camg
static void do_camg(deark *c, lctx *d, i64 pos, i64 len)
{
	if(len<4) return;
	d->has_camg = 1;
	d->camg_changed_flag = 1;

	d->ham_flag = 0;
	d->is_ham6 = 0;
	d->is_ham8 = 0;
	d->ehb_flag = 0;

	d->camg_mode = (UI)de_getu32be(pos);
	de_dbg(c, "CAMG mode: 0x%x", d->camg_mode);

	if(d->camg_mode & 0x0800)
		d->ham_flag = 1;
	if(d->camg_mode & 0x0080)
		d->ehb_flag = 1;

	if(d->formtype==CODE_RGBN || d->formtype==CODE_RGB8) {
		d->ham_flag = 0;
		d->ehb_flag = 0;
	}

	de_dbg_indent(c, 1);
	de_dbg(c, "HAM: %d", (int)d->ham_flag);
	de_dbg(c, "EHB: %d", (int)d->ehb_flag);
	de_dbg_indent(c, -1);
}

// Assembly:
cmpq $0x4, %rcx
jge 0x7a029
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movw $0x101, 0x36(%rsi)      # imm = 0x101
movl $0x0, 0x38(%rsi)
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef32a
movl %eax, 0x4c(%r14)
leaq 0xaeb84(%rip), %rsi     # 0x128bdb
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movl 0x4c(%r14), %eax
btl $0xb, %eax
jae 0x7a072
movb $0x1, 0x38(%r14)
testb %al, %al
jns 0x7a07b
movb $0x1, 0x3b(%r14)
movl 0x4(%r14), %eax
cmpl $0x5247424e, %eax       # imm = 0x5247424E
je 0x7a08d
cmpl $0x52474238, %eax       # imm = 0x52474238
jne 0x7a097
xorl %eax, %eax
movb %al, 0x38(%r14)
movb %al, 0x3b(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movzbl 0x38(%r14), %edx
leaq 0xaeb3b(%rip), %rsi     # 0x128beb
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movzbl 0x3b(%r14), %edx
leaq 0xaeb2d(%rip), %rsi     # 0x128bf3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_tiny
static void do_tiny(deark *c, lctx *d, i64 pos1, i64 len)
{
	struct frame_ctx *frctx = NULL;
	i64 pos = pos1;

	if(len<=4) goto done;

	d->thumb_width = de_getu16be_p(&pos);
	d->thumb_height = de_getu16be_p(&pos);
	de_dbg(c, "thumbnail image, dimensions: %d"DE_CHAR_TIMES"%d", (int)d->thumb_width, (int)d->thumb_height);
	if(!de_good_image_dimensions_noerr(c, d->thumb_width, d->thumb_height)) {
		de_warn(c, "Bad thumbnail image dimensions");
		goto done;
	}

	frctx = create_frame(c, d);
	(void)do_image_chunk_internal(c, d, frctx, pos, pos1+len-pos, 1);

done:
	destroy_frame(c, d, frctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rdx, 0x8(%rsp)
cmpq $0x5, %rcx
jge 0x7a356
xorl %r13d, %r13d
jmp 0x7a406
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0xef193
movq %rax, 0x90(%r15)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef193
movq %rax, 0x98(%r15)
movl 0x90(%r15), %edx
leaq 0xaecd4(%rip), %rsi     # 0x12906c
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x90(%r15), %rsi
movq 0x98(%r15), %rdx
movq %rbx, %rdi
callq 0xf23f0
testl %eax, %eax
je 0x7a3f2
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r13
movq 0x8(%rsp), %rcx
addq %r12, %r14
subq %rcx, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %r8
movl $0x1, %r9d
callq 0x7a851
jmp 0x7a406
leaq 0xaec97(%rip), %rsi     # 0x129090
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9b27
testq %r13, %r13
je 0x7a41f
movq 0x20(%r13), %rdi
callq 0xf0b13
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe9752
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_xs24
static void do_xs24(deark *c, dbuf *f, i64 pos1, i64 len)
{
	i64 w, h, rowspan;
	i64 pos = pos1;
	de_bitmap *img = NULL;

	w = de_getu16be_p(&pos);
	rowspan = w*3;
	h = de_getu16be_p(&pos);
	de_dbg(c, "24-bit thumbnail image, dimensions: %u"DE_CHAR_TIMES"%u", (UI)w, (UI)h);
	if(!de_good_image_dimensions_noerr(c, w, h)) goto done;
	if(rowspan*h+6 != len) goto done;
	pos += 2; // unknown field

	img = de_bitmap_create(c, w, h, 3);
	de_convert_image_rgb(f, pos, rowspan, 3, img, 0);
	de_bitmap_write_to_file(img, "thumb", DE_CREATEFLAG_IS_AUX|DE_CREATEFLAG_OPT_IMAGE);
done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rdx, (%rbx)
movq 0x18(%rdi), %rdi
movq %rbx, %rsi
callq 0xef193
movq %rax, %r13
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xef193
movq %rax, %rbp
leaq 0xaec3c(%rip), %rsi     # 0x1290af
xorl %r15d, %r15d
movq %r14, %rdi
movl %r13d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xf23f0
testl %eax, %eax
je 0x7a504
leaq (,%r13,2), %rbx
addq %r13, %rbx
movq %rbp, %rax
imulq %rbx, %rax
addq $0x6, %rax
cmpq %r12, %rax
jne 0x7a501
addq $0x2, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %r15
movq 0x8(%rsp), %rsi
movl $0x3, %ecx
movq 0x10(%rsp), %rdi
movq %rbx, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf38d9
leaq 0xb0954(%rip), %rsi     # 0x12ae46
movq %r15, %rdi
movl $0x3, %edx
callq 0xf2923
jmp 0x7a504
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xf28d4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_dpi
static void do_dpi(deark *c, lctx *d, i64 pos, i64 len)
{
	if(len<4) return;
	d->x_dpi = de_getu16be(pos);
	d->y_dpi = de_getu16be(pos+2);
	de_dbg(c, "dpi: %d"DE_CHAR_TIMES"%d", (int)d->x_dpi, (int)d->y_dpi);
}

// Assembly:
cmpq $0x4, %rcx
jge 0x7a522
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef169
movq %rax, 0x80(%r14)
movq 0x18(%rbx), %rdi
addq $0x2, %r15
movq %r15, %rsi
callq 0xef169
movq %rax, 0x88(%r14)
movl 0x80(%r14), %edx
leaq 0xaeb72(%rip), %rsi     # 0x1290da
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_grab
static void do_grab(deark *c, lctx *d, i64 pos, i64 len)
{
	if(len<4) return;
	d->has_hotspot = 1;
	d->hotspot_x = (int)de_getu16be(pos);
	d->hotspot_y = (int)de_getu16be(pos+2);
	de_dbg(c, "hotspot: (%d, %d)", d->hotspot_x, d->hotspot_y);
}

// Assembly:
cmpq $0x4, %rcx
jge 0x7a580
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, 0xa0(%rsi)
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef169
movl %eax, 0xa4(%r14)
movq 0x18(%rbx), %rdi
addq $0x2, %r15
movq %r15, %rsi
callq 0xef169
movl %eax, 0xa8(%r14)
movl 0xa4(%r14), %edx
leaq 0xaeb19(%rip), %rsi     # 0x1290e6
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_crng
static void do_crng(deark *c, lctx *d, i64 pos1, i64 len)
{
	UI tmp1, tmp2;

	if(len<8) return;
	tmp1 = (UI)de_getu16be(pos1+2);
	tmp2 = (UI)de_getu16be(pos1+4);
	de_dbg(c, "CRNG flags: 0x%04x", tmp2);
	if(tmp2&0x1) {
		de_dbg(c, "rate: %.2f fps", (double)(((double)tmp1)*(60.0/16384.0)));
		on_color_cycling_enabled(c, d);
	}
}

// Assembly:
cmpq $0x8, %rcx
jl 0x7a6b5
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x2(%rdx), %rsi
callq 0xef169
movq %rax, %r15
movq 0x18(%r14), %rdi
addq $0x4, %r12
movq %r12, %rsi
callq 0xef169
movq %rax, %r12
leaq 0xaeaa1(%rip), %rsi     # 0x1290f8
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
testb $0x1, %r12b
je 0x7a6aa
movl %r15d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0xae23e(%rip), %xmm0    # 0x1288b8
leaq 0xaea8a(%rip), %rsi     # 0x12910b
movq %r14, %rdi
movb $0x1, %al
callq 0xe9226
movb $0x1, 0x3c(%rbx)
cmpb $0x0, 0x3d(%rbx)
jne 0x7a6aa
leaq 0xaea7e(%rip), %rsi     # 0x12911a
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9b27
movb $0x1, 0x3d(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_drng
static void do_drng(deark *c, lctx *d, i64 pos1, i64 len)
{
	UI tmp2;

	tmp2 = (UI)de_getu16be(pos1+4);
	de_dbg(c, "DRNG flags: 0x%04x", tmp2);
	if(tmp2&0x1) {
		on_color_cycling_enabled(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x4(%rdx), %rsi
callq 0xef169
movq %rax, %r15
leaq 0xaea83(%rip), %rsi     # 0x12915b
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
testb $0x1, %r15b
je 0x7a70a
movb $0x1, 0x3c(%rbx)
cmpb $0x0, 0x3d(%rbx)
jne 0x7a70a
leaq 0xaea1e(%rip), %rsi     # 0x12911a
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9b27
movb $0x1, 0x3d(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_ccrt
static void do_ccrt(deark *c, lctx *d, i64 pos1, i64 len)
{
	i64 tmp1;

	tmp1 = de_geti16be(pos1);
	de_dbg(c, "cycling direction: %d", (int)tmp1);
	if(tmp1!=0) {
		d->uses_color_cycling = 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xef219
movq %rax, %r15
leaq 0xaea3d(%rip), %rsi     # 0x12916e
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
testq %r15, %r15
je 0x7a747
movb $0x1, 0x3c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: on_multipalette_enabled
static void on_multipalette_enabled(deark *c, lctx *d)
{
	if(!d->opt_allowsham) {
		d->errflag = 1;
	}
	if(d->multipalette_warned) return;
	if(d->opt_allowsham) {
		de_warn(c, "This is a multi-palette image, which is not correctly supported.");
	}
	else {
		de_err(c, "Multi-palette ILBM images are not supported. "
			"(\"-opt ilbm:allowspecial\" to decode anyway)");
	}
}

// Assembly:
movb 0x2e(%rsi), %al
testb %al, %al
jne 0x7a75b
movl $0x1, 0x1c(%rsi)
cmpb $0x0, 0x47(%rsi)
je 0x7a762
retq
testb %al, %al
je 0x7a774
leaq 0xaea17(%rip), %rsi     # 0x129184
xorl %eax, %eax
jmp 0xe9b27
leaq 0xaea4a(%rip), %rsi     # 0x1291c5
xorl %eax, %eax
jmp 0xe9df7
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_ansq
static void do_ansq(deark *c, lctx *d, i64 pos1, i64 len)
{
	i64 num_items;
	i64 i;

	// TODO: Figure out how critical this ANSQ info is.
	// If deltas are supposed to be applied out of sequence, we could at least
	// emit a warning.

	num_items = len / 4;
	de_dbg(c, "number of frames in sequence: %d", (int)num_items);
	if(c->debug_level<2) return;
	de_dbg_indent(c, 1);
	for(i=0; i<num_items && i<2000; i++) {
		i64 frnum, dur;

		frnum = de_getu16be(pos1+i*4);
		dur = de_getu16be(pos1+i*4+2);
		de_dbg2(c, "item[%d]: frame=%d, dur=%d", (int)i, (int)frnum, (int)dur);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3(%rdx), %r15
testq %rdx, %rdx
cmovnsq %rdx, %r15
sarq $0x2, %r15
leaq 0xaea72(%rip), %rsi     # 0x12921e
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
cmpl $0x2, (%rbx)
jge 0x7a7ca
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
cmpq $0x4, %r12
jl 0x7a836
decq %r15
movl $0x7cf, %eax            # imm = 0x7CF
cmpq %rax, %r15
cmovaeq %rax, %r15
incq %r15
leaq 0xaea49(%rip), %r12     # 0x12923f
xorl %r13d, %r13d
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef169
movq %rax, %rbp
movq 0x18(%rbx), %rdi
leaq 0x2(%r14), %rsi
callq 0xef169
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0xe93cf
incq %r13
addq $0x4, %r14
cmpq %r13, %r15
jne 0x7a7f9
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9585
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: convert_abit
static int convert_abit(deark *c, lctx *d, struct imgbody_info *ibi,
	i64 pos, i64 len, dbuf *frame_buffer)
{
	i64 plane, j;
	i64 planespan;

	planespan = ibi->height * ibi->bytes_per_row_per_plane;

	for(plane=0; plane<ibi->planes_total; plane++) {
		for(j=0; j<ibi->height; j++) {
			dbuf_copy_at(c->infile, pos + plane*planespan + j*ibi->bytes_per_row_per_plane,
				ibi->bytes_per_row_per_plane, frame_buffer,
				j*ibi->frame_buffer_rowspan + plane*ibi->bytes_per_row_per_plane);
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x18(%rsi)
jle 0x7b37c
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x40(%rsi), %rax
imulq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
cmpq $0x0, 0x8(%r15)
jle 0x7b373
movq 0x8(%rsp), %r13
imulq %rbp, %r13
addq 0x10(%rsp), %r13
xorl %r14d, %r14d
movq 0x18(%r12), %rdi
movq 0x40(%r15), %rdx
movq %rdx, %rsi
imulq %r14, %rsi
addq %r13, %rsi
movq 0x48(%r15), %rax
imulq %r14, %rax
movq %rdx, %r8
imulq %rbp, %r8
addq %rax, %r8
movq %rbx, %rcx
callq 0xefe16
incq %r14
cmpq 0x8(%r15), %r14
jl 0x7b33d
incq %rbp
cmpq 0x18(%r15), %rbp
jl 0x7b325
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: decompress_ilbm_packbits
static int decompress_ilbm_packbits(deark *c, dbuf *inf, i64 pos, i64 len,
	dbuf *unc_pixels, i64 expected_len, UI nbytes_per_unit)
{
	int retval = 0;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_packbits_params pbparams;

	de_zeromem(&pbparams, sizeof(struct de_packbits_params));
	pbparams.nbytes_per_unit = nbytes_per_unit;
	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = inf;
	dcmpri.pos = pos;
	dcmpri.len = len;
	dcmpro.f = unc_pixels;
	dcmpro.len_known = 1;
	dcmpro.expected_len = expected_len;

	fmtutil_decompress_packbits_ex(c, &dcmpri, &dcmpro, &dres, &pbparams);
	dbuf_flush(dcmpro.f);
	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", dres.errmsg);
		goto done;
	}
	de_dbg(c, "decompressed %"I64_FMT" to %"I64_FMT" bytes", len, unc_pixels->len);
	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movl 0xf0(%rsp), %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x98(%rsp), %r14
leaq 0x80(%rsp), %r15
leaq 0x20(%rsp), %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0xfa6e0
movq %rbp, (%r14)
movq %r13, 0x8(%r14)
movq %r12, %r13
movq 0x10(%rsp), %r12
movq %r13, 0x10(%r14)
movq %r12, (%r15)
movb $0x1, 0x8(%r15)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
leaq 0x20(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0xfacff
movq (%r15), %rdi
callq 0xf0ea4
leaq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
je 0x7b448
leaq 0x30(%rsp), %rdx
leaq 0x98d37(%rip), %rsi     # 0x114171
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x7b466
movq 0x18(%r12), %rcx
leaq 0xa5fef(%rip), %rsi     # 0x121443
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe9226
movl $0x1, %ebp
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: decompress_method2
static int decompress_method2(deark *c, lctx *d, struct imgbody_info *ibi,
	i64 pos, i64 len, dbuf *unc_pixels, i64 expected_len)
{
	struct vdat_ctx vdctx;
	struct de_iffctx *ictx_vdat = NULL;

	// For sanity, we'll use a separate IFF decoder for the contents of this BODY chunk.
	de_zeromem(&vdctx, sizeof(struct vdat_ctx));
	vdctx.d = d;
	vdctx.ibi = ibi;
	vdctx.unc_pixels = unc_pixels;

	ictx_vdat = fmtutil_create_iff_decoder(c);
	ictx_vdat->userdata = (void*)&vdctx;
	ictx_vdat->handle_chunk_fn = my_vdat_chunk_handler;
	ictx_vdat->f = c->infile;
	fmtutil_read_iff_format(ictx_vdat, pos, len);

	fmtutil_destroy_iff_decoder(ictx_vdat);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %r13
movaps %xmm0, (%r13)
movaps %xmm0, 0x10(%r13)
movaps %xmm0, 0x20(%r13)
movq %rsi, (%r13)
movq %rdx, 0x8(%r13)
movq %r9, 0x10(%r13)
callq 0x107b04
movq %rax, %r12
movq %r13, 0x10(%rax)
leaq 0x7ba(%rip), %rax       # 0x7bc7e
movq %rax, 0x20(%r12)
movq 0x18(%r15), %rax
movq %rax, 0x18(%r12)
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x107b28
movq %r12, %rdi
callq 0x107b17
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: pal_fixup4
static void pal_fixup4(deark *c, lctx *d)
{
	i64 k;
	u8 cr, cg, cb;

	for(k=0; k<d->pal_ncolors; k++) {
		cr = DE_COLOR_R(d->pal[k]);
		cg = DE_COLOR_G(d->pal[k]);
		cb = DE_COLOR_B(d->pal[k]);
		cr = 17*(cr>>4);
		cg = 17*(cg>>4);
		cb = 17*(cb>>4);
		d->pal[k] = DE_MAKE_RGB(cr, cg, cb);
	}
}

// Assembly:
movq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x7bc7d
xorl %ecx, %ecx
movl 0x4d4(%rdi,%rcx,4), %edx
movl %edx, %esi
shrl $0x14, %esi
movl %edx, %r8d
shrl $0xc, %r8d
andl $0xf, %esi
andl $0xf, %r8d
shrb $0x4, %dl
movzbl %dl, %edx
movl %edx, %r9d
shll $0x4, %r9d
addl %edx, %r9d
imull $0x110000, %esi, %edx   # imm = 0x110000
imull $0x1100, %r8d, %esi     # imm = 0x1100
orl %edx, %esi
movzbl %r9b, %edx
addl %esi, %edx
addl $0xff000000, %edx       # imm = 0xFF000000
movl %edx, 0x4d4(%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x7bc29
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: my_vdat_chunk_handler
static int my_vdat_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	struct vdat_ctx *vdctx = (struct vdat_ctx*)ictx->userdata;

	if(ictx->chunkctx->chunk4cc.id != CODE_VDAT) {
		goto done;
	}
	ictx->handled = 1;

	if(vdctx->vdat_chunk_count >= vdctx->ibi->planes_total) goto done;
	do_vdat_chunk(c, vdctx, ictx->chunkctx->dpos, ictx->chunkctx->dlen);

done:
	if(ictx->chunkctx->chunk4cc.id == CODE_VDAT) {
		vdctx->vdat_chunk_count++;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rbx
movq 0x128(%rdi), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
jne 0x7bea5
movq (%r14), %r15
movl $0x1, 0x130(%r14)
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdx
cmpq 0x18(%rcx), %rdx
jge 0x7bea5
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rbp
addq %rsi, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x18(%r15), %rdi
movq %rsi, 0x8(%rsp)
callq 0xef169
movq %rax, %r13
leaq -0x2(%rax), %r12
leaq 0xad058(%rip), %rsi     # 0x128d4d
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
cmpq $0x3, %r13
jl 0x7be98
movq %rbp, 0x20(%rsp)
movq 0x8(%rsp), %rbp
leaq 0x2(%rbp), %rax
movq %rax, 0x28(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0xea259
movq 0x18(%r15), %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
movq 0x28(%rsp), %rdx
movq %r12, %rcx
callq 0xeeee8
addq %rbp, %r13
cmpq 0x20(%rsp), %r13
jge 0x7be98
movq %r12, %rax
movq %r14, 0x8(%rsp)
xorl %r14d, %r14d
leaq 0x1e(%rsp), %r12
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax,%r14), %ebp
cmpl $0x1, %ebp
je 0x7bdd4
testl %ebp, %ebp
jne 0x7be13
movq 0x18(%r15), %rdi
movq %r13, %rsi
callq 0xef169
addq $0x2, %r13
testq %rax, %rax
jle 0x7be7b
movq %rax, %rbp
movq 0x18(%r15), %rdi
movl $0x2, %ecx
movq %r12, %rsi
movq %r13, %rdx
callq 0xeeee8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7becd
addq $0x2, %r13
decq %rbp
jne 0x7bda7
jmp 0x7be7b
movq 0x18(%r15), %rdi
movq %r13, %rsi
callq 0xef169
movq %rax, %rbp
leaq 0x2(%r13), %rdx
movq 0x18(%r15), %rdi
movl $0x2, %ecx
movq %r12, %rsi
callq 0xeeee8
addq $0x4, %r13
testq %rbp, %rbp
jle 0x7be7b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7becd
decq %rbp
jne 0x7be01
jmp 0x7be7b
testb %bpl, %bpl
js 0x7be47
movq 0x18(%r15), %rdi
movl $0x2, %ecx
movq %r12, %rsi
movq %r13, %rdx
callq 0xeeee8
addq $0x2, %r13
testq %rbp, %rbp
je 0x7be7b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7becd
decq %rbp
jne 0x7be35
jmp 0x7be7b
andb $0x7f, %bpl
movb $-0x80, %al
subb %bpl, %al
movzbl %al, %ebp
movq 0x18(%r15), %rdi
movl $0x2, %ecx
movq %r12, %rsi
movq %r13, %rdx
callq 0xeeee8
addq $0x2, %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7becd
decq %rbp
jne 0x7be53
incq %r14
movq 0x30(%rsp), %rax
cmpq %rax, %r14
jge 0x7be93
cmpq 0x20(%rsp), %r13
jl 0x7bd74
movq 0x8(%rsp), %r14
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0xe9752
movq 0x128(%r14), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
jne 0x7beb9
incq 0x18(%rbx)
movl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: vdat_write_element
static void vdat_write_element(deark *c, struct vdat_ctx *vdctx, const u8 *elembuf)
{
	i64 dstpos;

	dstpos = vdctx->ibi->bytes_per_row_per_plane * vdctx->vdat_chunk_count;
	dstpos += 2*vdctx->cur_col;
	dstpos += vdctx->ypos * vdctx->ibi->frame_buffer_rowspan;

	dbuf_write_at(vdctx->unc_pixels, dstpos, elembuf, 2);
	vdctx->ypos++;
	if(vdctx->ypos >= vdctx->ibi->height) {
		vdctx->ypos = 0;
		vdctx->cur_col++;
	}
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
imulq 0x40(%rcx), %rax
movq 0x20(%rbx), %rsi
leaq (%rax,%rsi,2), %rax
movq 0x48(%rcx), %rsi
imulq 0x28(%rbx), %rsi
addq %rax, %rsi
movl $0x2, %ecx
callq 0xf11f9
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
incq %rcx
movq %rcx, 0x28(%rbx)
cmpq 0x8(%rax), %rcx
jl 0x7bf24
movq $0x0, 0x28(%rbx)
incq 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: decompress_delta_op5
static void decompress_delta_op5(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx, i64 pos1, i64 len)
{
	i64 planedata_offs[16];
	i64 pos = pos1;
	int i;
	int saved_indent_level;
	u8 delta4_5_xor_mode = 0;

	de_dbg_indent_save(c, &saved_indent_level);
	if(!frctx->frame_buffer) goto done;

	de_dbg(c, "[delta5 data]");

	// Note that we ignore the 0x8 bit ("RLC - run length coded").
	// I don't know what this option is for. *All* ANIM4/5 frames use run length
	// coding, but they almost never have have this bit set.
	// The rare files that do set this bit don't seem to be any different from
	// those that don't.
	if((frctx->bits & 0xfffffff5U) != 0) {
		de_err(c, "Unsupported ANHD options");
		d->errflag = 1;
		goto done;
	}

	if(frctx->bits & 0x2) {
		delta4_5_xor_mode = 1;
	}

	for(i=0; i<16; i++) {
		if(d->errflag) goto done;
		planedata_offs[i] = de_getu32be_p(&pos);
		if(i<ibi->planes_total) {
			de_dbg2(c, "plane[%d] offs: %"I64_FMT, i, planedata_offs[i]);
			if(planedata_offs[i]>0) {
				decompress_plane_vdelta(c, d, ibi, frctx, i, c->infile,
					pos1+planedata_offs[i], 0, pos1+len, 1, 1,
					0, delta4_5_xor_mode);
			}
		}
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x10(%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movq %r8, 0x8(%rsp)
movq %r8, 0x20(%rsp)
leaq 0x4(%rsp), %rsi
callq 0xe958c
cmpq $0x0, 0x20(%r13)
je 0x7c348
leaq 0xacc65(%rip), %rsi     # 0x128ee4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl 0x18(%r13), %eax
testl $0xfffffff5, %eax       # imm = 0xFFFFFFF5
je 0x7c2b2
leaq 0xacc57(%rip), %rsi     # 0x128ef2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movl $0x1, 0x1c(%r14)
jmp 0x7c348
shrb %al
andb $0x1, %al
movq 0x8(%rsp), %rcx
addq %rcx, 0x10(%rsp)
movzbl %al, %eax
movq %rax, 0x18(%rsp)
xorl %r15d, %r15d
cmpl $0x0, 0x1c(%r14)
jne 0x7c348
movq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0xef34e
cmpq %r15, 0x18(%rbp)
jle 0x7c33f
movq %rax, %r12
movq %rbx, %rdi
leaq 0xacbbd(%rip), %rsi     # 0x128eb0
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe93cf
testq %r12, %r12
jle 0x7c33f
movq 0x18(%rbx), %r9
addq 0x8(%rsp), %r12
subq $0x8, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r8
pushq 0x20(%rsp)
pushq $0x0
movl $0x1, %eax
pushq %rax
pushq %rax
pushq 0x38(%rsp)
pushq $0x0
pushq %r12
callq 0x7cc50
addq $0x40, %rsp
incq %r15
cmpq $0x10, %r15
jne 0x7c2cb
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: decompress_delta_op8
static void decompress_delta_op8(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx, i64 pos1, i64 len)
{
	i64 planedata_offs[16];
	i64 pos = pos1;
	i64 elem_size;
	int i;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	if(!frctx->frame_buffer) goto done;

	de_dbg(c, "[delta8 data]");

	if(frctx->bits & 0xfffffffeU) {
		de_err(c, "Unsupported ANHD options");
		d->errflag = 1;
		goto done;
	}
	if(frctx->bits & 0x00000001) {
		elem_size = 4;
	}
	else {
		elem_size = 2;
	}

	for(i=0; i<16; i++) {
		if(d->errflag) goto done;
		planedata_offs[i] = de_getu32be_p(&pos);
		if(i<ibi->planes_total) {
			de_dbg2(c, "plane[%d] offs: %"I64_FMT, i, planedata_offs[i]);
			if(planedata_offs[i]>0) {
				decompress_plane_vdelta(c, d, ibi, frctx, i, c->infile,
					pos1+planedata_offs[i], 0, pos1+len, elem_size, elem_size, 0, 0);
			}
		}
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x10(%rsp)
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movq %r8, 0x8(%rsp)
movq %r8, 0x20(%rsp)
leaq 0x4(%rsp), %rsi
callq 0xe958c
movq %r15, 0x18(%rsp)
cmpq $0x0, 0x20(%r15)
je 0x7c64a
leaq 0xaca4d(%rip), %rsi     # 0x128fc7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rsp), %rax
movl 0x18(%rax), %eax
cmpl $0x2, %eax
jae 0x7c631
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x2(,%rcx,2), %r13
movq 0x8(%rsp), %rax
addq %rax, 0x10(%rsp)
xorl %r15d, %r15d
cmpl $0x0, 0x1c(%r14)
jne 0x7c64a
movq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0xef34e
cmpq %r15, 0x18(%rbp)
jle 0x7c626
movq %rax, %r12
movq %rbx, %rdi
leaq 0xac8d3(%rip), %rsi     # 0x128eb0
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe93cf
testq %r12, %r12
jle 0x7c626
movq 0x18(%rbx), %r9
addq 0x8(%rsp), %r12
subq $0x8, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
pushq %rax
pushq %rax
pushq %r13
pushq %r13
pushq 0x38(%rsp)
pushq $0x0
pushq %r12
callq 0x7cc50
addq $0x40, %rsp
incq %r15
cmpq $0x10, %r15
jne 0x7c5b1
jmp 0x7c64a
leaq 0xac8ba(%rip), %rsi     # 0x128ef2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movl $0x1, 0x1c(%r14)
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: decompress_delta_op74
static void decompress_delta_op74(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx, i64 pos1, i64 len)
{
	struct d74state d74s;

	de_zeromem(&d74s, sizeof(struct d74state));
	d74s.ibi = ibi;
	d74s.frctx = frctx;
	d74s.pos = pos1;
	d74s.endpos = pos1+len;

	if(!d->delta_ops_used[74]) { // If this is the first DLTA#7 chunk...
		if(ibi->width < 320) {
			// The XAnim code says this is a special case, but I haven't found any
			// sample files. (TODO)
			de_warn(c, "ANIM-J with width < 320 might not be supported correctly");
		}
	}

	while(1) {
		UI code;

		if(d74s.pos+2 >= d74s.endpos) goto done;
		code = (UI)de_getu16be_p(&d74s.pos);
		if(code==1) {
			frctx->change_flag = 1;
			d74s.op = (UI)de_getu16be_p(&d74s.pos);
			d74s.nrows = de_getu16be_p(&d74s.pos);
			d74s.nbytes = 1;
			d74s.nblocks = de_getu16be_p(&d74s.pos);
			do_delta74_blocks(c, &d74s);
		}
		else if(code==2) {
			frctx->change_flag = 1;
			d74s.op = (UI)de_getu16be_p(&d74s.pos);
			d74s.nrows = de_getu16be_p(&d74s.pos);
			d74s.nbytes = de_getu16be_p(&d74s.pos);
			d74s.nblocks = de_getu16be_p(&d74s.pos);
			do_delta74_blocks(c, &d74s);
		}
		else if(code==0) {
			break;
		}
		else {
			de_warn(c, "Bad or unsupported ANIM-J compression code: %u", code);
			goto done;
		}
	}

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rdx, (%rsp)
movq %rcx, 0x8(%rsp)
movq %r8, 0x10(%rsp)
addq %r8, %r9
movq %r9, 0x18(%rsp)
cmpb $0x0, 0x91e(%rsi)
jne 0x7c6c5
cmpq $0x13f, (%rdx)          # imm = 0x13F
jg 0x7c6c5
leaq 0xac91a(%rip), %rsi     # 0x128fd5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9b27
movq 0x10(%rsp), %rax
addq $0x2, %rax
cmpq 0x18(%rsp), %rax
jge 0x7c7b2
leaq 0x10(%rsp), %r15
movq %rsp, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
cmpl $0x1, %eax
je 0x7c737
cmpl $0x2, %eax
jne 0x7c79b
movl $0x1, 0xc(%r14)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movl %eax, 0x20(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x30(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x38(%rsp)
jmp 0x7c769
movl $0x1, 0xc(%r14)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movl %eax, 0x20(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x30(%rsp)
movq $0x1, 0x38(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7d35e
movq 0x10(%rsp), %rax
addq $0x2, %rax
cmpq 0x18(%rsp), %rax
jl 0x7c6e1
jmp 0x7c7b2
testl %eax, %eax
je 0x7c7b2
leaq 0xac868(%rip), %rsi     # 0x12900e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9b27
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/ilbm.c
// Function: do_help_ilbm_anim
static void do_help_ilbm_anim(deark *c, int is_anim)
{
	de_msg(c, "-opt ilbm:trans=<0|1|auto> : Always remove (0) or respect (1) "
		"transparency");
	de_msg(c, "-opt ilbm:fixpal=<0|1> : Don't/Do try to fix palettes that are "
		"slightly too dark");
	de_msg(c, "-opt ilbm:allowspecial : Suppress an error on some images");
	if(is_anim) {
		de_msg(c, "-opt anim:includedups : Do not suppress duplicate frames");
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xabea5(%rip), %rsi     # 0x129461
xorl %eax, %eax
callq 0xe9fc3
leaq 0xabee2(%rip), %rsi     # 0x1294ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9fc3
leaq 0xabf22(%rip), %rsi     # 0x1294fd
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9fc3
testl %ebp, %ebp
je 0x7d600
leaq 0xabf47(%rip), %rsi     # 0x129537
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe9fc3
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/insetpix.c
// Function: de_module_insetpix
void de_module_insetpix(deark *c, struct deark_module_info *mi)
{
	mi->id = "insetpix";
	mi->desc = "Inset PIX image";
	mi->run_fn = de_run_insetpix;
	mi->identify_fn = de_identify_insetpix;
}

// Assembly:
leaq 0xab5c9(%rip), %rax     # 0x1296c0
movq %rax, (%rsi)
leaq 0xab5c8(%rip), %rax     # 0x1296c9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7e11c
movq %rax, 0x18(%rsi)
leaq 0xf0c(%rip), %rax       # 0x7f023
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/insetpix.c
// Function: de_identify_insetpix
static int de_identify_insetpix(deark *c)
{
	UI pix_version;
	i64 item_count;
	i64 item;
	i64 item_loc, item_len;
	u8 has_ext;
	u8 has_typical_1st_item;

	if(c->detection_data->best_confidence_so_far>20) return 0;

	pix_version = (UI)de_getu16le(0);
	// Other versions exist, but I don't know anything about them.
	if(pix_version!=3) return 0;

	has_ext = (u8)de_input_file_has_ext(c, "pix");
	has_typical_1st_item = (u8)((u32)de_getu32le(4)==(u32)0x00200000);
	if(!has_ext && !has_typical_1st_item) return 0;

	item_count = de_getu16le(2);
	// Need at least 4 items (image info, palette info, tile info, and 1 tile).
	if(item_count<4 || item_count>500) return 0;

	if(4 + 8*item_count >= c->infile->len) return 0;

	for(item=0; item<item_count && item<16; item++) {
		item_len = de_getu16le(4+8*item+2);
		item_loc = de_getu32le(4+8*item+4);
		if(item_loc < 4 + 8*item_count) return 0;
		if(item_loc+item_len > c->infile->len) return 0;
	}

	return 20;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
xorl %ebx, %ebx
cmpl $0x14, (%rax)
jg 0x7f115
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef1ca
cmpl $0x3, %eax
jne 0x7f115
leaq 0xab749(%rip), %rsi     # 0x12a7a6
movq %r14, %rdi
callq 0xea936
movl %eax, %ebp
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xef37e
testb %bpl, %bpl
jne 0x7f087
movl %eax, %eax
cmpl $0x200000, %eax         # imm = 0x200000
jne 0x7f115
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xef1ca
leaq -0x1f5(%rax), %rcx
cmpq $-0x1f1, %rcx           # imm = 0xFE0F
jb 0x7f115
leaq 0x4(,%rax,8), %r12
movq 0x18(%r14), %rcx
cmpq 0x18(%rcx), %r12
jge 0x7f115
testq %rax, %rax
jle 0x7f110
decq %rax
cmpq $0xf, %rax
movl $0xf, %r13d
cmovbq %rax, %r13
shll $0x3, %r13d
movq $-0x8, %rbp
movq 0x18(%r14), %rdi
leaq 0xe(%rbp), %rsi
callq 0xef1ca
movq %rax, %r15
movq 0x18(%r14), %rdi
leaq 0x10(%rbp), %rsi
callq 0xef37e
cmpq %r12, %rax
jl 0x7f115
addq %r15, %rax
movq 0x18(%r14), %rcx
cmpq 0x18(%rcx), %rax
jg 0x7f115
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0x7f0d8
movl $0x14, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/insetpix.c
// Function: insetpix_read_item
static void insetpix_read_item(deark *c, i64 pos, struct insetpix_item_data *itd)
{
	itd->id = (UI)de_getu16le_p(&pos);
	itd->len = de_getu16le_p(&pos);
	itd->loc = de_getu32le(pos);
	itd->is_special = (u8)(itd->id>=0x4000);
	itd->is_tile = (u8)(itd->id>=0x8000 && itd->id<0xffff);
	if(itd->is_tile)
		itd->tile_num = itd->id-0x8000;
	else
		itd->tile_num = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xef1ed
movl %eax, (%rbx)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xef1ed
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rdi
movq (%r15), %rsi
callq 0xef37e
movq %rax, 0x18(%rbx)
movl (%rbx), %eax
cmpl $0x4000, %eax           # imm = 0x4000
setae 0x8(%rbx)
addl $0xffff8000, %eax       # imm = 0xFFFF8000
xorl %ecx, %ecx
cmpl $0x7fff, %eax           # imm = 0x7FFF
setb 0x9(%rbx)
cmovbl %eax, %ecx
movl %ecx, 0x4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/insetpix.c
// Function: insetpix_dbg_item
static void insetpix_dbg_item(deark *c, struct insetpix_item_data *itd, i64 idx)
{
	char nbuf[40];

	get_item_name(itd, nbuf, sizeof(nbuf));
	de_dbg(c, "item #%d: id=%u (%s), loc=%"I64_FMT", len=%"I64_FMT, (int)idx,
		itd->id, nbuf, itd->loc, itd->len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpb $0x0, 0x9(%rsi)
je 0x7f1cc
movl 0x4(%r15), %ecx
leaq 0xaa672(%rip), %rdx     # 0x12982b
leaq 0x10(%rsp), %rdi
movl $0x28, %esi
xorl %eax, %eax
callq 0xe8d67
jmp 0x7f231
movl (%r15), %eax
cmpl $0x1, %eax
jle 0x7f1ee
cmpl $0x2, %eax
je 0x7f200
cmpl $0x11, %eax
je 0x7f209
cmpl $0xff, %eax
jne 0x7f21b
leaq 0x9794d(%rip), %rsi     # 0x116b39
jmp 0x7f222
testl %eax, %eax
je 0x7f212
cmpl $0x1, %eax
jne 0x7f21b
leaq 0xb6e73(%rip), %rsi     # 0x136071
jmp 0x7f222
leaq 0xaa638(%rip), %rsi     # 0x12983f
jmp 0x7f222
leaq 0xaa639(%rip), %rsi     # 0x129849
jmp 0x7f222
leaq 0xaa61b(%rip), %rsi     # 0x129834
jmp 0x7f222
leaq 0xacc47(%rip), %rsi     # 0x12be69
leaq 0x10(%rsp), %rdi
movl $0x28, %edx
callq 0xe8ded
movl (%r15), %ecx
movq 0x18(%r15), %r9
movq 0x10(%r15), %rax
movq %rax, (%rsp)
leaq 0xaa5bd(%rip), %rsi     # 0x129804
leaq 0x10(%rsp), %r8
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: de_module_iptc
void de_module_iptc(deark *c, struct deark_module_info *mi)
{
	mi->id = "iptc";
	mi->desc = "IPTC-IIM metadata";
	mi->run_fn = de_run_iptc;
	mi->identify_fn = de_identify_iptc;
}

// Assembly:
leaq 0xcaa7b(%rip), %rax     # 0x149ec2
movq %rax, (%rsi)
leaq 0xaa64b(%rip), %rax     # 0x129a9c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7f46c
movq %rax, 0x18(%rsi)
leaq 0x351(%rip), %rax       # 0x7f7b8
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: de_identify_iptc
static int de_identify_iptc(deark *c)
{
	u8 b;

	// First byte of each dataset is 0x1c.
	if(de_getbyte(0)!=0x1c) return 0;

	// Check the record number. Record numbers 1-9 are known.
	b = de_getbyte(1);
	if(b<1 || b>15) return 0;

	// This is not meant to imply that .iptc is an official file extension for
	// IPTC data. It's just that it's sometimes used by Deark when extracting
	// IPTC data to a file.
	if(!de_input_file_has_ext(c, "iptc")) return 0;

	return 60;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xef0d5
cmpb $0x1c, %al
jne 0x7f7fd
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0xef0d5
addb $-0x10, %al
cmpb $-0xf, %al
jb 0x7f7fd
leaq 0xca6d7(%rip), %rsi     # 0x149ec2
movq %r14, %rdi
callq 0xea936
testl %eax, %eax
movl $0x3c, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: handle_text
static void handle_text(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	de_encoding encoding;
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	encoding = get_ds_encoding(c, d, dsi->recnum);
	if(encoding==DE_ENCODING_UNKNOWN)
		encoding = DE_ENCODING_ASCII;
	dbuf_read_to_ucstring(c->infile, pos, len, s, 0, encoding);
	de_dbg(c, "%s: \"%s\"", dsi->dsname, ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r14
callq 0xf6870
movq %rax, %rbx
movb (%r15), %al
addb $-0x2, %al
xorl %r9d, %r9d
cmpb $0x4, %al
ja 0x7f839
movl (%rbp), %r9d
cmpl $0x1, %r9d
adcl $0x0, %r9d
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xf01b0
movq 0x8(%r15), %r15
movq %rbx, %rdi
callq 0xf7557
leaq 0xac5d9(%rip), %rsi     # 0x12be42
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6bb0
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: handle_1_90
static void handle_1_90(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	const char *csname;

	d->charset = DE_ENCODING_UNKNOWN;

	// TODO: Fully interpret this field.

	if(len>=3 && !dbuf_memcmp(c->infile, pos, "\x1b\x25\x47", 3)) {
		d->charset = DE_ENCODING_UTF8;
	}

	if(d->charset==DE_ENCODING_UTF8)
		csname="utf-8";
	else
		csname="unknown";

	de_dbg(c, "charset: %s", csname);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, (%rsi)
cmpq $0x3, %r8
jl 0x7f906
movq %rcx, %rax
movq 0x18(%rbx), %rdi
leaq 0xaa734(%rip), %rdx     # 0x12a022
movl $0x3, %ecx
movq %rax, %rsi
callq 0xf025e
testl %eax, %eax
jne 0x7f906
movl $0x2, (%r14)
cmpl $0x2, (%r14)
leaq 0xaa715(%rip), %rax     # 0x12a026
leaq 0x92b74(%rip), %rdx     # 0x11248c
cmoveq %rax, %rdx
leaq 0xaa709(%rip), %rsi     # 0x12a02c
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe9226
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: handle_2_120
static void handle_2_120(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	dbuf *outf = NULL;
	de_encoding encoding;

	if(c->extract_level<2) {
		handle_text(c, d, dsi, pos, len);
		goto done;
	}

	// Note that this code for extracting captions while decoding IPTC is not
	// easily reached, because it requires the -a option, and -a usually causes
	// IPTC to be extracted instead of decoded.
	// It can be reached when reading a raw IPTC file, or when using
	// "-a -opt extractiptc=0".

	encoding = get_ds_encoding(c, d, dsi->recnum);

	outf = dbuf_create_output_file(c, "caption.txt", NULL, DE_CREATEFLAG_IS_AUX);

	dbuf_copy_slice_convert_to_utf8(c->infile, pos, len,
		DE_EXTENC_MAKE(encoding, DE_ENCSUBTYPE_HYBRID),
		outf, 0x1|0x4);

done:
	if(outf) dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
cmpl $0x1, 0x90(%rdi)
jg 0x7f961
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x7f807
xorl %r12d, %r12d
jmp 0x7f9aa
movb (%rdx), %al
addb $-0x2, %al
movl $0x300, %ebp            # imm = 0x300
cmpb $0x4, %al
ja 0x7f977
movzbl (%rsi), %ebp
orl $0x300, %ebp            # imm = 0x300
leaq 0xaa6ba(%rip), %rsi     # 0x12a038
movq %r15, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, %r12
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movq %rax, %r8
movl $0x5, %r9d
callq 0xf1f28
testq %r12, %r12
je 0x7f9bf
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf0b13
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iptc.c
// Function: handle_2_125
static void handle_2_125(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	de_bitmap *img = NULL;
	i64 rowspan;
	i64 width1, height1;

	// I can't find any examples of this field, so this may not be correct.
	// The format seems to be well-documented, though the pixels are in an
	// unusual order.

	width1 = 128; // (Will be rotated to be 460x128)
	height1 = 460;
	rowspan = width1/8;
	if(len < rowspan * height1) goto done;
	img = de_bitmap_create(c, width1, height1, 1);
	de_convert_image_bilevel(c->infile, pos, rowspan, img, DE_CVTF_WHITEISZERO);
	de_bitmap_transpose(img);
	de_bitmap_write_to_file(img, "caption", DE_CREATEFLAG_IS_AUX|DE_CREATEFLAG_FLIP_IMAGE|
		DE_CREATEFLAG_IS_BWIMG);
done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x1cc0, %r8            # imm = 0x1CC0
jge 0x7f9da
xorl %ebx, %ebx
jmp 0x7fa2d
movq %rcx, %r14
movq %rdi, %r15
movl $0x80, %esi
movl $0x1cc, %edx            # imm = 0x1CC
movl $0x1, %ecx
callq 0xf2cab
movq %rax, %rbx
movq 0x18(%r15), %rdi
movl $0x10, %edx
movq %r14, %rsi
movq %rax, %rcx
movl $0x1, %r8d
callq 0xf3081
movq %rbx, %rdi
callq 0xf3b1a
leaq 0xaa624(%rip), %rsi     # 0x12a044
movq %rbx, %rdi
movl $0xd, %edx
callq 0xf2923
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf28d4
nop