LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: detect_dctv
static void detect_dctv(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx)
{
	i64 pos;
	int result;

	// As far as I can tell, in DCTV images, the last plane of the first row is
	// as follows:
	//   <00> <31-byte signature> <00 fill> <31-byte signature> <00>
	// (Sometimes, the last plane of the *second* row is the same.)
	// (But I have a 2-plane image in which it's the *first* plane of the first
	// two rows that are special. TODO: Figure this out.)
	//
	// Unknowns:
	// * Is DCTV possible if there are fewer than 64 bytes per row per plane (i.e. width < 512)?
	// * Can a DCTV image have transparency?
	// * If a DCTV image has a thumbnail image, what format does the thumbnail use?

	if(d->is_dctv) return;
	if(!frctx || !frctx->frame_buffer) return;
	if(ibi->is_thumb) return;
	if(frctx->formtype!=CODE_ILBM && frctx->formtype!=CODE_ACBM) return;
	if(ibi->bytes_per_row_per_plane<64) return;

	// Test end of last plane of first row
	pos = d->planes_raw * ibi->bytes_per_row_per_plane - 32;
	result = is_dctv_sig_at(frctx->frame_buffer, pos);

	if(!result) {
		// Test end of first plane of first row
		pos = ibi->bytes_per_row_per_plane - 32;
		result = is_dctv_sig_at(frctx->frame_buffer, pos);
	}

	if(!result) return;

	if(d->opt_allowdctv) {
		de_warn(c, "This is probably a DCTV image, which is not supported correctly.");
	}
	else {
		de_err(c, "DCTV images are not supported. "
			"(\"-opt ilbm:allowspecial\" to decode anyway)");
		d->errflag = 1;
	}

	d->is_dctv = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x4a(%rax)
je 0xb2cb7
jmp 0xb2dac
cmpq $0x0, -0x20(%rbp)
je 0xb2cc9
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xb2cce
jmp 0xb2dac
movq -0x18(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
je 0xb2cdd
jmp 0xb2dac
movq -0x20(%rbp), %rax
cmpl $0x494c424d, (%rax)     # imm = 0x494C424D
je 0xb2cfa
movq -0x20(%rbp), %rax
cmpl $0x4143424d, (%rax)     # imm = 0x4143424D
je 0xb2cfa
jmp 0xb2dac
movq -0x18(%rbp), %rax
cmpq $0x40, 0x40(%rax)
jge 0xb2d0a
jmp 0xb2dac
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
imulq 0x40(%rcx), %rax
subq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xb3e50
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xb2d61
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
subq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xb3e50
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xb2d69
jmp 0xb2dac
movq -0x10(%rbp), %rax
cmpb $0x0, 0x2f(%rax)
je 0xb2d87
movq -0x8(%rbp), %rdi
leaq 0x101b49(%rip), %rsi    # 0x1b48c7
movb $0x0, %al
callq 0x15bc10
jmp 0xb2da4
movq -0x8(%rbp), %rdi
leaq 0x101b76(%rip), %rsi    # 0x1b4908
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x4a(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: fixup_palette
static void fixup_palette(deark *c, lctx *d)
{
	i64 k;
	u8 cr, cg, cb;

	if(d->pal_ncolors<1) return;
	if(d->formtype==CODE_RGBN || d->formtype==CODE_RGB8) return;

	if(d->is_ham8) {
		pal_fixup6(c, d);
		return;
	}
	if(d->is_ham6) {
		pal_fixup4(c, d);
		return;
	}

	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]);
		if((cr&0x0f) != 0) return;
		if((cg&0x0f) != 0) return;
		if((cb&0x0f) != 0) return;
	}
	de_dbg(c, "Palette seems to have 4 bits of precision. Rescaling palette.");
	pal_fixup4(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0xc8(%rax)
jge 0xb36a3
jmp 0xb37be
movq -0x10(%rbp), %rax
cmpl $0x5247424e, 0x4(%rax)  # imm = 0x5247424E
je 0xb36bd
movq -0x10(%rbp), %rax
cmpl $0x52474238, 0x4(%rax)  # imm = 0x52474238
jne 0xb36c2
jmp 0xb37be
movq -0x10(%rbp), %rax
cmpb $0x0, 0x3a(%rax)
je 0xb36de
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb37d0
jmp 0xb37be
movq -0x10(%rbp), %rax
cmpb $0x0, 0x39(%rax)
je 0xb36fa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb38d0
jmp 0xb37be
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jge 0xb379f
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, -0x1b(%rbp)
movzbl -0x19(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0xb3770
jmp 0xb37be
movzbl -0x1a(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0xb377e
jmp 0xb37be
movzbl -0x1b(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0xb378c
jmp 0xb37be
jmp 0xb378e
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb3702
movq -0x8(%rbp), %rdi
leaq 0x101019(%rip), %rsi    # 0x1b47c3
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb38d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: pal_fixup6
static void pal_fixup6(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 = (cr&0xfc)|(cr>>6);
		cg = (cg&0xfc)|(cg>>6);
		cb = (cb&0xfc)|(cb>>6);
		d->pal[k] = DE_MAKE_RGB(cr, cg, cb);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jge 0xb38bf
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, -0x1b(%rbp)
movzbl -0x19(%rbp), %eax
andl $0xfc, %eax
movzbl -0x19(%rbp), %ecx
sarl $0x6, %ecx
orl %ecx, %eax
movb %al, -0x19(%rbp)
movzbl -0x1a(%rbp), %eax
andl $0xfc, %eax
movzbl -0x1a(%rbp), %ecx
sarl $0x6, %ecx
orl %ecx, %eax
movb %al, -0x1a(%rbp)
movzbl -0x1b(%rbp), %eax
andl $0xfc, %eax
movzbl -0x1b(%rbp), %ecx
sarl $0x6, %ecx
orl %ecx, %eax
movb %al, -0x1b(%rbp)
movzbl -0x19(%rbp), %edx
shll $0x10, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movzbl -0x1a(%rbp), %eax
shll $0x8, %eax
orl %eax, %edx
movzbl -0x1b(%rbp), %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl %edx, 0x4d4(%rax,%rcx,4)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb37e4
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jge 0xb39a7
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4d4(%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, -0x1b(%rbp)
movzbl -0x19(%rbp), %eax
sarl $0x4, %eax
imull $0x11, %eax, %eax
movb %al, -0x19(%rbp)
movzbl -0x1a(%rbp), %eax
sarl $0x4, %eax
imull $0x11, %eax, %eax
movb %al, -0x1a(%rbp)
movzbl -0x1b(%rbp), %eax
sarl $0x4, %eax
imull $0x11, %eax, %eax
movb %al, -0x1b(%rbp)
movzbl -0x19(%rbp), %edx
shll $0x10, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movzbl -0x1a(%rbp), %eax
shll $0x8, %eax
orl %eax, %edx
movzbl -0x1b(%rbp), %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl %edx, 0x4d4(%rax,%rcx,4)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb38e4
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
je 0xb39e9
jmp 0xb3a3a
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0xb3a0f
jmp 0xb3a3a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %rcx
callq 0xb3a70
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
jne 0xb3a5e
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
imulq 0x48(%rcx), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x2, %ecx
callq 0x1683f0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jl 0xb3e49
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: is_dctv_sig_at
static int is_dctv_sig_at(dbuf *f, i64 pos)
{
	u8 x;

	static const u8 sig[31] = {
		0x49, 0x87, 0x28, 0xde, 0x11, 0x0b, 0xef, 0xd2, 0x0c, 0x8e, 0x8b, 0x35, 0x5b, 0x75, 0xec, 0xb8,
		0x29, 0x6b, 0x03, 0xf9, 0x2b, 0xb4, 0x34, 0xee, 0x67, 0x1e, 0x7c, 0x4f, 0x53, 0x63, 0x15 };

	x = dbuf_getbyte(f, pos);
	if(x != sig[0]) return 0;
	if(dbuf_memcmp(f, pos, sig, 31)) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movzbl 0x100575(%rip), %ecx    # 0x1b43f0
cmpl %ecx, %eax
je 0xb3e88
movl $0x0, -0x4(%rbp)
jmp 0xb3eb6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x100559(%rip), %rdx    # 0x1b43f0
movl $0x1f, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0xb3eaf
movl $0x0, -0x4(%rbp)
jmp 0xb3eb6
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: render_pixel_row_rgb24
static void render_pixel_row_rgb24(deark *c, lctx *d, struct imgbody_info *ibi,
	i64 rownum, const u32 *rowbuf, UI rowbuf_size, de_bitmap *img)
{
	UI k;

	for(k=0; k<rowbuf_size; k++) {
		UI r, g, b;

		r = (rowbuf[k] & 0x0000ff);
		g = (rowbuf[k] & 0x00ff00)>>8;
		b = (rowbuf[k] & 0xff0000)>>16;
		de_bitmap_setpixel_rgb(img, (i64)k, rownum, DE_MAKE_RGB(r, g, b));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0xb3f63
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff, %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff00, %eax           # imm = 0xFF00
shrl $0x8, %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
shrl $0x10, %eax
movl %eax, -0x3c(%rbp)
movq 0x10(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
shll $0x10, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movl -0x38(%rbp), %eax
shll $0x8, %eax
orl %eax, %ecx
orl -0x3c(%rbp), %ecx
callq 0x16b310
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xb3eeb
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: render_pixel_row_ham6
static void render_pixel_row_ham6(deark *c, lctx *d, i64 rownum, const u32 *rowbuf,
	UI rowbuf_size, de_bitmap *img)
{
	UI i;
	u8 cr, cg, cb;

	// At the beginning of each row, the color accumulators are
	// initialized to palette entry 0.
	cr = DE_COLOR_R(d->pal[0]);
	cg = DE_COLOR_G(d->pal[0]);
	cb = DE_COLOR_B(d->pal[0]);

	for(i=0; i<rowbuf_size; i++) {
		u32 clr;
		u8 val = rowbuf[i] & 0xff;

		switch((val>>4)&0x3) {
		case 0x1: // Modify blue value
			cb = 17*(val&0x0f);
			break;
		case 0x2: // Modify red value
			cr = 17*(val&0x0f);
			break;
		case 0x3: // Modify green value
			cg = 17*(val&0x0f);
			break;
		default: // 0: Use colormap value
			clr = d->pal[(UI)val];
			cr = DE_COLOR_R(clr);
			cg = DE_COLOR_G(clr);
			cb = DE_COLOR_B(clr);
			break;
		}

		de_bitmap_setpixel_rgb(img, (i64)i, rownum, DE_MAKE_RGB(cr, cg, cb));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x35(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x36(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
andl $0xff, %eax
movb %al, -0x37(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xb40b8
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
movb (%rax,%rcx,4), %al
movb %al, -0x3d(%rbp)
movzbl -0x3d(%rbp), %eax
shrl $0x4, %eax
andl $0x3, %eax
movl %eax, -0x44(%rbp)
subl $0x1, %eax
je 0xb4014
jmp 0xb4000
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0xb4023
jmp 0xb400a
movl -0x44(%rbp), %eax
subl $0x3, %eax
je 0xb4032
jmp 0xb4041
movzbl -0x3d(%rbp), %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movb %al, -0x37(%rbp)
jmp 0xb407c
movzbl -0x3d(%rbp), %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movb %al, -0x35(%rbp)
jmp 0xb407c
movzbl -0x3d(%rbp), %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movb %al, -0x36(%rbp)
jmp 0xb407c
movq -0x10(%rbp), %rax
movzbl -0x3d(%rbp), %ecx
movl %ecx, %ecx
movl 0x4d4(%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x35(%rbp)
movl -0x3c(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x36(%rbp)
movl -0x3c(%rbp), %eax
andl $0xff, %eax
movb %al, -0x37(%rbp)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
movq -0x18(%rbp), %rdx
movzbl -0x35(%rbp), %ecx
shll $0x10, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movzbl -0x36(%rbp), %eax
shll $0x8, %eax
orl %eax, %ecx
movzbl -0x37(%rbp), %eax
orl %eax, %ecx
callq 0x16b310
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb3fd3
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: render_pixel_row_ham8
static void render_pixel_row_ham8(deark *c, lctx *d, i64 rownum, const u32 *rowbuf,
	UI rowbuf_size, de_bitmap *img)
{
	UI i;
	u8 cr, cg, cb;

	// At the beginning of each row, the color accumulators are
	// initialized to palette entry 0.
	cr = DE_COLOR_R(d->pal[0]);
	cg = DE_COLOR_G(d->pal[0]);
	cb = DE_COLOR_B(d->pal[0]);

	for(i=0; i<rowbuf_size; i++) {
		u32 clr;
		u8 val = rowbuf[i] & 0xff;

		switch((val>>6)&0x3) {
		case 0x1:
			cb = ((val&0x3f)<<2)|((val&0x3f)>>4);
			break;
		case 0x2:
			cr = ((val&0x3f)<<2)|((val&0x3f)>>4);
			break;
		case 0x3:
			cg = ((val&0x3f)<<2)|((val&0x3f)>>4);
			break;
		default:
			clr = d->pal[(UI)val];
			cr = DE_COLOR_R(clr);
			cg = DE_COLOR_G(clr);
			cb = DE_COLOR_B(clr);
			break;
		}

		de_bitmap_setpixel_rgb(img, (i64)i, rownum, DE_MAKE_RGB(cr, cg, cb));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x35(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x36(%rbp)
movq -0x10(%rbp), %rax
movl 0x4d4(%rax), %eax
andl $0xff, %eax
movb %al, -0x37(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xb4229
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
movb (%rax,%rcx,4), %al
movb %al, -0x3d(%rbp)
movzbl -0x3d(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x44(%rbp)
subl $0x1, %eax
je 0xb4161
jmp 0xb414d
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0xb417c
jmp 0xb4157
movl -0x44(%rbp), %eax
subl $0x3, %eax
je 0xb4197
jmp 0xb41b2
movzbl -0x3d(%rbp), %eax
andl $0x3f, %eax
shll $0x2, %eax
movzbl -0x3d(%rbp), %ecx
andl $0x3f, %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, -0x37(%rbp)
jmp 0xb41ed
movzbl -0x3d(%rbp), %eax
andl $0x3f, %eax
shll $0x2, %eax
movzbl -0x3d(%rbp), %ecx
andl $0x3f, %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, -0x35(%rbp)
jmp 0xb41ed
movzbl -0x3d(%rbp), %eax
andl $0x3f, %eax
shll $0x2, %eax
movzbl -0x3d(%rbp), %ecx
andl $0x3f, %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, -0x36(%rbp)
jmp 0xb41ed
movq -0x10(%rbp), %rax
movzbl -0x3d(%rbp), %ecx
movl %ecx, %ecx
movl 0x4d4(%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x35(%rbp)
movl -0x3c(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x36(%rbp)
movl -0x3c(%rbp), %eax
andl $0xff, %eax
movb %al, -0x37(%rbp)
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
movq -0x18(%rbp), %rdx
movzbl -0x35(%rbp), %ecx
shll $0x10, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movzbl -0x36(%rbp), %eax
shll $0x8, %eax
orl %eax, %ecx
movzbl -0x37(%rbp), %eax
orl %eax, %ecx
callq 0x16b310
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb4123
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: set_finfo_data
static void set_finfo_data(deark *c, lctx *d, struct imgbody_info *ibi, de_finfo *fi)
{
	int has_aspect = 0;
	int has_dpi = 0;

	if(ibi->is_thumb) {
		de_finfo_set_name_from_sz(c, fi, "thumb", 0, DE_ENCODING_LATIN1);
	}

	if(d->x_aspect>0 && d->y_aspect>0) {
		has_aspect = 1;
	}
	if(!ibi->is_thumb && d->x_dpi>0 && d->y_dpi>0) {
		has_dpi = 1;
	}

	if(has_dpi) {
		fi->density.code = DE_DENSITY_DPI;
		fi->density.xdens = (double)d->x_dpi;
		fi->density.ydens = (double)d->y_dpi;
	}
	else if(has_aspect) {
		fi->density.code = DE_DENSITY_UNK_UNITS;
		fi->density.ydens = (double)d->x_aspect;
		fi->density.xdens = (double)d->y_aspect;
	}

	if(!ibi->is_thumb && d->has_hotspot) {
		fi->has_hotspot = 1;
		fi->hotspot_x = d->hotspot_x;
		fi->hotspot_y = d->hotspot_y;
	}
}

// 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)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
je 0xb42fc
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x10284c(%rip), %rdx    # 0x1b6b3b
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0x15d4c0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jle 0xb4319
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jle 0xb4319
movl $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0xb4346
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jle 0xb4346
movq -0x10(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jle 0xb4346
movl $0x1, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0xb438b
movq -0x20(%rbp), %rax
movl $0x2, 0x78(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0x80(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x80(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0x88(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x88(%rax)
jmp 0xb43ca
cmpl $0x0, -0x24(%rbp)
je 0xb43c8
movq -0x20(%rbp), %rax
movl $0x1, 0x78(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0x70(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x88(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0x78(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x80(%rax)
jmp 0xb43ca
movq -0x18(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0xb4414
movq -0x10(%rbp), %rax
movzbl 0xa0(%rax), %eax
cmpl $0x0, %eax
je 0xb4414
movq -0x20(%rbp), %rax
movb $0x1, 0xe(%rax)
movq -0x10(%rbp), %rax
movl 0xa4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x98(%rax)
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x9c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: decompress_delta_op3
static void decompress_delta_op3(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx, i64 pos1, i64 len)
{
	i64 i;
	i64 pos = pos1;
	i64 planedata_offs[8];

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

	for(i=0; i<8; i++) {
		planedata_offs[i] = de_getu32be_p(&pos);
		if(i<ibi->planes_total) {
			de_dbg2(c, "plane[%d] offs: %"I64_FMT, (int)i, planedata_offs[i]);
			if(planedata_offs[i]>0) {
				decompress_plane_delta_op3(c, d, ibi, frctx, i,
					pos1+planedata_offs[i], len-planedata_offs[i]);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %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 -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1005aa(%rip), %rsi    # 0x1b4a00
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x38(%rbp)
cmpq $0x8, -0x38(%rbp)
jge 0xb4514
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1654b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x80(%rbp,%rax,8)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0xb4501
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movq -0x80(%rbp,%rax,8), %rcx
leaq 0x100559(%rip), %rsi    # 0x1b4a0e
movb $0x0, %al
callq 0x15b350
movq -0x38(%rbp), %rax
cmpq $0x0, -0x80(%rbp,%rax,8)
jle 0xb44ff
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x38(%rbp), %rax
addq -0x80(%rbp,%rax,8), %r9
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %r10
subq -0x80(%rbp,%r10,8), %rax
movq %rax, (%rsp)
callq 0xb5070
jmp 0xb4501
jmp 0xb4503
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xb4465
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: get_elem_as_int_p
static i64 get_elem_as_int_p(dbuf *f, i64 *ppos, i64 elem_size)
{
	if(elem_size==1) {
		return (i64)dbuf_getbyte_p(f, ppos);
	}
	if(elem_size==2) {
		return dbuf_getu16be_p(f, ppos);
	}
	return dbuf_getu32be_p(f, ppos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jne 0xb5ac1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movq %rax, -0x8(%rbp)
jmp 0xb5aec
cmpq $0x2, -0x20(%rbp)
jne 0xb5adb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x165210
movq %rax, -0x8(%rbp)
jmp 0xb5aec
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: on_color_cycling_enabled
static void on_color_cycling_enabled(deark *c, lctx *d)
{
	d->uses_color_cycling = 1;
	if(d->color_cycling_warned) return;
	de_warn(c, "This image uses color cycling animation, which is not supported.");
	d->color_cycling_warned = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x3c(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x3d(%rax)
je 0xb60e4
jmp 0xb60fe
movq -0x8(%rbp), %rdi
leaq 0xfeb89(%rip), %rsi     # 0x1b4c78
movb $0x0, %al
callq 0x15bc10
movq -0x10(%rbp), %rax
movb $0x1, 0x3d(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: on_frame_begin
static void on_frame_begin(deark *c, lctx *d, u32 formtype)
{
	if(d->frctx) return;
	d->num_frames_started++;
	d->frctx = create_frame(c, d);
	d->frctx->formtype = formtype;
	d->frctx->frame_idx = d->num_frames_finished;
	if(d->is_anim) de_dbg(c, "[frame #%d begin]", d->frctx->frame_idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0xb6133
jmp 0xb61a9
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb6090
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb61a9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl 0x4(%rax), %edx
leaq 0xfece5(%rip), %rsi     # 0x1b4e87
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xfecf5(%rip), %rsi     # 0x1b4fbf
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0xfed2e(%rip), %rsi     # 0x1b500a
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0xfed6d(%rip), %rsi     # 0x1b505b
movb $0x0, %al
callq 0x15c190
cmpl $0x0, -0xc(%rbp)
je 0xb630d
movq -0x8(%rbp), %rdi
leaq 0xfed8f(%rip), %rsi     # 0x1b5095
movb $0x0, %al
callq 0x15c190
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: do_deep_DGBL
static void do_deep_DGBL(deark *c, struct deep_ctx *d, struct de_iffctx *ictx)
{
	i64 pos = ictx->chunkctx->dpos;

	d->dspw = dbuf_getu16be_p(ictx->f, &pos);
	d->dsph = dbuf_getu16be_p(ictx->f, &pos);
	de_dbg(c, "display size: %"I64_FMT DE_CHAR_TIMES "%"I64_FMT, d->dspw, d->dsph);
	if(!d->found_DLOC) {
		d->width = d->dspw;
		d->height = d->dsph;
	}
	d->cmpr_meth = (UI)dbuf_getu16be_p(ictx->f, &pos);
	de_dbg(c, "cmpr meth: %u", d->cmpr_meth);
	d->x_aspect = (i64)dbuf_getbyte_p(ictx->f, &pos);
	d->y_aspect = (i64)dbuf_getbyte_p(ictx->f, &pos);
	de_dbg(c, "aspect ratio: %d, %d", (int)d->x_aspect, (int)d->y_aspect);
}

// 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 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0xfeb0f(%rip), %rsi     # 0x1b50e9
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x9(%rax)
jne 0xb660b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0xee794(%rip), %rsi     # 0x1a4dc9
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %ecx
leaq 0xfdee6(%rip), %rsi     # 0x1b457d
movb $0x0, %al
callq 0x15b0d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: do_deep_DLOC
static void do_deep_DLOC(deark *c, struct deep_ctx *d, struct de_iffctx *ictx)
{
	i64 pos = ictx->chunkctx->dpos;
	i64 pixpos_x, pixpos_y;

	d->found_DLOC = 1;
	d->width = dbuf_getu16be_p(ictx->f, &pos);
	d->height = dbuf_getu16be_p(ictx->f, &pos);
	de_dbg_dimensions(c, d->width, d->height);
	pixpos_x = dbuf_geti16be_p(ictx->f, &pos);
	pixpos_y = dbuf_geti16be_p(ictx->f, &pos);
	de_dbg(c, "position: %"I64_FMT", %"I64_FMT, pixpos_x, pixpos_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x9(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x15bba0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1653b0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1653b0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0xfe993(%rip), %rsi     # 0x1b5100
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: do_deep_DPEL
static void do_deep_DPEL(deark *c, struct deep_ctx *d, struct de_iffctx *ictx)
{
	i64 pos = ictx->chunkctx->dpos;
	i64 endpos = ictx->chunkctx->dpos + ictx->chunkctx->dlen;
	UI i;

	d->found_DPEL = 1;
	d->num_components = (UI)dbuf_getu32be_p(ictx->f, &pos);
	de_dbg(c, "num cmpts: %u", (UI)d->num_components);
	if(d->num_components>DEEP_MAX_COMPONENTS) {
		d->num_components = 0;
		goto done;
	}
	for(i=0; i<d->num_components; i++) {
		if(pos+4 > endpos) break;
		d->cmp_type[i] = (UI)dbuf_getu16be_p(ictx->f, &pos);
		if(d->cmp_type[i]==4 || d->cmp_type[i]==17) {
			d->have_alpha_hint = 1;
		}
		d->cmp_nbits[i] = (UI)dbuf_getu16be_p(ictx->f, &pos);
		de_dbg(c, "cmpt[%u]: type=%u depth=%u", i, d->cmp_type[i], d->cmp_nbits[i]);
	}
done:
	;
}

// 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 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x128(%rcx), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0xb(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1654b0
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl %eax, %edx
leaq 0xfe910(%rip), %rsi     # 0x1b5113
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpq $0x8, 0x48(%rax)
jle 0xb6826
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
jmp 0xb68ed
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jge 0xb68eb
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jle 0xb6851
jmp 0xb68eb
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, 0x74(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
cmpl $0x4, 0x74(%rax,%rcx,4)
je 0xb688b
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
cmpl $0x11, 0x74(%rax,%rcx,4)
jne 0xb6893
movq -0x10(%rbp), %rax
movb $0x1, 0x51(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165210
movl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, 0x54(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl 0x74(%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %esi
movl 0x54(%rax,%rsi,4), %r8d
leaq 0xfe84b(%rip), %rsi     # 0x1b5121
movb $0x0, %al
callq 0x15b0d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb682d
jmp 0xb68ed
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: do_deep_DBOD
static void do_deep_DBOD(deark *c, struct deep_ctx *d, struct de_iffctx *ictx)
{
	if(d->cmpr_meth!=0 && d->cmpr_meth!=1 && d->cmpr_meth!=5) {
		de_err(c, "Unsupported compression type: %u", d->cmpr_meth);
		goto done;
	}

	if(!deep_make_sample_map(c, d)) goto done;

	if(!de_good_image_dimensions(c, d->width, d->height)) {
		goto done;
	}

	d->expected_image_size = d->width * d->height * d->num_components;

	if(d->cmpr_meth==0) {
		deep_decode_image_unc(c, d, ictx->f, ictx->chunkctx->dpos,
			ictx->chunkctx->dlen);
	}
	else {
		deep_decompress_and_decode_image(c, d, ictx->f, ictx->chunkctx->dpos,
			ictx->chunkctx->dlen);
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb694c
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0xb694c
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
je 0xb694c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0xecfab(%rip), %rsi     # 0x1a38eb
movb $0x0, %al
callq 0x15bfb0
jmp 0xb6a1b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb6bc0
cmpl $0x0, %eax
jne 0xb6963
jmp 0xb6a1b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0xb6986
jmp 0xb6a1b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
imulq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
imulq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xb69e6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %r8
callq 0xb6d90
jmp 0xb6a19
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %r8
callq 0xb7010
jmp 0xb6a1b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: deep_decompress_and_decode_image
static void deep_decompress_and_decode_image(deark *c, struct deep_ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	int ret;
	dbuf *unc_pixels = NULL;

	unc_pixels = dbuf_create_membuf(c, d->expected_image_size, 0x1);
	if(d->cmpr_meth!=5) {
		dbuf_enable_wbuffer(unc_pixels);
	}
	if(d->cmpr_meth==5) {
		ret = decompress_deep_5(c, d, f, pos1, len, unc_pixels);
	}
	else {
		ret = decompress_ilbm_packbits(c, f, pos1, len, unc_pixels, d->expected_image_size,
			(UI)d->num_components);
	}
	dbuf_flush(unc_pixels);
	if(!ret) goto done;

	deep_decode_image_unc(c, d, unc_pixels, 0, unc_pixels->len);
done:
	dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
je 0xb7060
movq -0x38(%rbp), %rdi
callq 0x167b90
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
jne 0xb708b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0xb7100
movl %eax, -0x2c(%rbp)
jmp 0xb70ba
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %r9
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl %eax, (%rsp)
callq 0xb2ac0
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x167c30
cmpl $0x0, -0x2c(%rbp)
jne 0xb70cb
jmp 0xb70e8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x18(%rax), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0xb6d90
movq -0x38(%rbp), %rdi
callq 0x1676a0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: convert_image_rgba
static void convert_image_rgba(dbuf *f, i64 fpos,
	de_bitmap *img)
{
	i64 i, j;
	de_color clr;
	i64 pos;
	u8 buf[4];

	pos = fpos;
	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			dbuf_read(f, buf, pos, 4);
			pos += 4;
			clr = DE_MAKE_RGBA(buf[0], buf[1], buf[2], buf[3]);
			de_bitmap_setpixel_rgba(img, i, j, clr);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0xb7435
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0xb7422
movq -0x8(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl $0x4, %ecx
callq 0x164d10
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movzbl -0x39(%rbp), %eax
shll $0x18, %eax
movzbl -0x3c(%rbp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movzbl -0x3b(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x3a(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x16b350
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb73ae
jmp 0xb7424
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb7394
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xfde2d(%rip), %rcx     # 0x1b5284
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0xfde28(%rip), %rcx     # 0x1b528d
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xb7490
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x47d(%rip), %rcx       # 0xb7900
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x1652c0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x165540
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpl $0x4000, (%rax)         # imm = 0x4000
setae %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x8000, (%rcx)         # imm = 0x8000
movb %al, -0x19(%rbp)
jb 0xb7b71
movq -0x18(%rbp), %rax
cmpl $0xffff, (%rax)         # imm = 0xFFFF
setb %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x9(%rax)
je 0xb7ba1
movq -0x18(%rbp), %rax
movl (%rax), %ecx
subl $0x8000, %ecx           # imm = 0x8000
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0xb7bac
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x28, %edx
callq 0xb8ba0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
leaq -0x40(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %r9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
leaq 0xfd7b7(%rip), %rsi     # 0x1b53c8
movq %rax, (%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/insetpix.c
// Function: do_tileinfo
static void do_tileinfo(deark *c, lctx *d)
{
	i64 pos1;
	i64 pos;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	pos1 = d->tileinfo_pos;
	if(!pos1 || d->tileinfo_len<8) goto done;

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

	d->page_rows = de_getu16le_p(&pos);
	d->page_cols = de_getu16le_p(&pos);
	d->stp_rows = de_getu16le_p(&pos);
	d->stp_cols = de_getu16le_p(&pos);
	de_dbg(c, "dimensions of a tile: %"I64_FMT DE_CHAR_TIMES "%"I64_FMT,
		d->page_cols, d->page_rows);
	de_dbg(c, "dimensions in tiles: %"I64_FMT DE_CHAR_TIMES "%"I64_FMT,
		d->stp_cols, d->stp_rows);

	if(d->page_cols%8 != 0) {
		de_err(c, "page_cols must be a multiple of 8 (is %d)", (int)d->page_cols);
		goto done;
	}

	if(d->num_tiles_found==0) goto done;

	d->have_tile_info = 1;
done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb856b
movq -0x10(%rbp), %rax
cmpq $0x8, 0x38(%rax)
jge 0xb8570
jmp 0xb86b9
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xfcfb1(%rip), %rsi     # 0x1b5530
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
leaq 0xfcf0f(%rip), %rsi     # 0x1b5548
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rcx
leaq 0xfcf06(%rip), %rsi     # 0x1b5567
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0xb86a4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl %eax, %edx
leaq 0xfceea(%rip), %rsi     # 0x1b5585
movb $0x0, %al
callq 0x15bfb0
jmp 0xb86b9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0xb86b1
jmp 0xb86b9
movq -0x10(%rbp), %rax
movb $0x1, 0xa(%rax)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)