LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/iff.c
// Function: do_RGFX_RCOL
static void do_RGFX_RCOL(deark *c, struct rgfx_ctx *d, struct de_iffctx *ictx)
{
	i64 num_entries;
	i64 pos;
	i64 len;

	d->found_RCOL = 1;

	pos = ictx->chunkctx->dpos;
	len = ictx->chunkctx->dlen;
	if(len==776) { // ???
		pos += 8;
		len -= 8;
	}

	num_entries = len / 3;
	if(num_entries>256) num_entries = 256;
	de_read_simple_palette(c, ictx->f, pos, num_entries, 3,
		d->pal, 256, DE_RDPALTYPE_24BIT, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x308, -0x30(%rbp)     # imm = 0x308
jne 0xaea44
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x3, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
cmpq $0x100, -0x20(%rbp)     # imm = 0x100
jle 0xaea68
movq $0x100, -0x20(%rbp)     # imm = 0x100
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %r9
addq $0x48, %r9
movl $0x3, %r8d
xorl %eax, %eax
movq $0x100, (%rsp)          # imm = 0x100
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x16c160
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/iff.c
// Function: do_RGFX_decompress
static void do_RGFX_decompress(deark *c, struct rgfx_ctx *d,
	struct de_iffctx *ictx)
{
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	de_dbg(c, "[decompressing]");
	de_dbg_indent(c, 1);

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);

	dcmpri.f = ictx->f;
	dcmpri.pos = ictx->chunkctx->dpos;
	dcmpri.len = ictx->chunkctx->dlen;
	dcmpro.f = d->unc_image;

	if(d->rgfx_cmpr_meth==1) {
		fmtutil_xpk_codectype1(c, &dcmpri, &dcmpro, &dres, NULL);
	}
	else {
		de_dfilter_set_errorf(c, &dres, NULL, "Unsupported compression method");
	}

	if(dres.errcode) {
		de_err(c, "Decompression failed: %s", dres.errmsg);
		d->errflag = 1;
		goto done;
	}

done:
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xff8f5(%rip), %rsi     # 0x1ae667
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x1773f0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0xaee06
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x179a90
jmp 0xaee23
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0xfd7d1(%rip), %rcx     # 0x1ac5ed
movb $0x0, %al
callq 0x177450
cmpl $0x0, -0xb0(%rbp)
je 0xaee52
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
addq $0x10, %rdx
leaq 0xf11bb(%rip), %rsi     # 0x19fffd
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0xaee54
jmp 0xaee54
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_module_ilbm
void de_module_ilbm(deark *c, struct deark_module_info *mi)
{
	mi->id = "ilbm";
	mi->desc = "IFF-ILBM and related image formats";
	mi->run_fn = de_run_ilbm;
	mi->identify_fn = de_identify_ilbm;
	mi->help_fn = de_help_ilbm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x10520a(%rip), %rcx    # 0x1b4091
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x105589(%rip), %rcx    # 0x1b441e
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xaeed0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x4d(%rip), %rcx        # 0xaef00
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0xde(%rip), %rcx        # 0xaefa0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_identify_ilbm
static int de_identify_ilbm(deark *c)
{
	u32 id;

	id = (u32)de_getu32be(0);
	if(id!=CODE_FORM) return 0;
	id = (u32)de_getu32be(8);
	switch(id) {
	case CODE_ILBM:
	case CODE_PBM:
	case CODE_ACBM:
	case CODE_RGBN:
	case CODE_RGB8:
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0x464f524d, -0x14(%rbp) # imm = 0x464F524D
je 0xaef32
movl $0x0, -0x4(%rbp)
jmp 0xaef96
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x4143424d, %eax       # imm = 0x4143424D
je 0xaef86
jmp 0xaef56
movl -0x18(%rbp), %eax
subl $0x494c424d, %eax       # imm = 0x494C424D
je 0xaef86
jmp 0xaef62
movl -0x18(%rbp), %eax
subl $0x50424d20, %eax       # imm = 0x50424D20
je 0xaef86
jmp 0xaef6e
movl -0x18(%rbp), %eax
subl $0x52474238, %eax       # imm = 0x52474238
je 0xaef86
jmp 0xaef7a
movl -0x18(%rbp), %eax
subl $0x5247424e, %eax       # imm = 0x5247424E
jne 0xaef8f
jmp 0xaef86
movl $0x64, -0x4(%rbp)
jmp 0xaef96
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_module_anim
void de_module_anim(deark *c, struct deark_module_info *mi)
{
	mi->id = "anim";
	mi->desc = "IFF-ANIM animation";
	mi->run_fn = de_run_anim;
	mi->identify_fn = de_identify_anim;
	mi->help_fn = de_help_anim;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x10546a(%rip), %rcx    # 0x1b4441
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x105461(%rip), %rcx    # 0x1b4446
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xaf020
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x4d(%rip), %rcx        # 0xaf050
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0xae(%rip), %rcx        # 0xaf0c0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_identify_anim
static int de_identify_anim(deark *c)
{
	u32 id;

	id = (u32)de_getu32be(0);
	if(id!=CODE_FORM) return 0;
	id = (u32)de_getu32be(8);
	if(id==CODE_ANIM) return 100;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0x464f524d, -0x14(%rbp) # imm = 0x464F524D
je 0xaf082
movl $0x0, -0x4(%rbp)
jmp 0xaf0b0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0x414e494d, -0x14(%rbp) # imm = 0x414E494D
jne 0xaf0a9
movl $0x64, -0x4(%rbp)
jmp 0xaf0b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_module_deep
void de_module_deep(deark *c, struct deark_module_info *mi)
{
	mi->id = "deep";
	mi->desc = "IFF-DEEP";
	mi->run_fn = de_run_deep;
	mi->identify_fn = de_identify_deep;
	mi->help_fn = de_help_deep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf9c91(%rip), %rcx     # 0x1a8d88
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x105354(%rip), %rcx    # 0x1b4459
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xaf140
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x19d(%rip), %rcx       # 0xaf2c0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fe(%rip), %rcx       # 0xaf330
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_run_deep
static void de_run_deep(deark *c, de_module_params *mparams)
{
	struct deep_ctx *d = NULL;
	struct de_iffctx *ictx = NULL;
	const char *opt_trans_str;

	d = de_malloc(c, sizeof(struct deep_ctx));

	d->trans_setting = TRANS_AUTO; // default
	opt_trans_str = de_get_ext_option(c, "deep:trans");
	if(opt_trans_str) {
		if(!de_strcmp(opt_trans_str, "auto")) {
			d->trans_setting = TRANS_AUTO;
		}
		else if(!de_strcmp(opt_trans_str, "")) {
			d->trans_setting = TRANS_RESPECT;
		}
		else {
			int opt_trans_n;

			opt_trans_n = de_atoi(opt_trans_str);
			if(opt_trans_n==0) {
				d->trans_setting = TRANS_REMOVE;
			}
			else if(opt_trans_n>0) {
				d->trans_setting = TRANS_RESPECT;
			}
		}
	}

	de_declare_fmt(c, "IFF-DEEP");

	ictx = fmtutil_create_iff_decoder(c);
	ictx->has_standard_iff_chunks = 1;
	ictx->alignment = 2;
	ictx->userdata = (void*)d;
	ictx->handle_chunk_fn = my_deep_chunk_handler;
	ictx->f = c->infile;

	fmtutil_read_iff_format(ictx, 0, c->infile->len);
	de_dbg(c, "image count: %d", d->DBOD_count);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0xd8, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x2, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x105f49(%rip), %rsi    # 0x1b50ce
callq 0x15cb30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xaf205
movq -0x28(%rbp), %rdi
leaq 0xed3d3(%rip), %rsi     # 0x19c573
callq 0x191a0
cmpl $0x0, %eax
jne 0xaf1b4
movq -0x18(%rbp), %rax
movb $0x2, 0x8(%rax)
jmp 0xaf203
movq -0x28(%rbp), %rdi
leaq 0x121a11(%rip), %rsi    # 0x1d0bd0
callq 0x191a0
cmpl $0x0, %eax
jne 0xaf1d3
movq -0x18(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xaf201
movq -0x28(%rbp), %rdi
callq 0x15cca0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xaf1ef
movq -0x18(%rbp), %rax
movb $0x0, 0x8(%rax)
jmp 0xaf1ff
cmpl $0x0, -0x2c(%rbp)
jle 0xaf1fd
movq -0x18(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0xaf1ff
jmp 0xaf201
jmp 0xaf203
jmp 0xaf205
movq -0x8(%rbp), %rdi
leaq 0x105249(%rip), %rsi    # 0x1b4459
callq 0x15e380
movq -0x8(%rbp), %rdi
callq 0x18c8b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb $0x1, 0x5d(%rax)
movq -0x20(%rbp), %rax
movq $0x2, 0x48(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
leaq 0x70d3(%rip), %rcx      # 0xb6320
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x18c920
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x105e4d(%rip), %rsi    # 0x1b50d9
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x18c8f0
cmpq $0x0, -0x18(%rbp)
je 0xaf2b0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: de_identify_deep
static int de_identify_deep(deark *c)
{
	UI n;

	if((UI)de_getu32be(0)!=CODE_FORM) return 0;
	n = (UI)de_getu32be(8);
	if(n==CODE_DEEP || n==CODE_TVPP) return 100;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
cmpl $0x464f524d, %eax       # imm = 0x464F524D
je 0xaf2ed
movl $0x0, -0x4(%rbp)
jmp 0xaf324
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0x44454550, -0x14(%rbp) # imm = 0x44454550
je 0xaf314
cmpl $0x54565050, -0x14(%rbp) # imm = 0x54565050
jne 0xaf31d
movl $0x64, -0x4(%rbp)
jmp 0xaf324
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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
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
movl 0x64(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xb01c2
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0xb00e2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xb0200
movq -0x8(%rbp), %rax
cmpl $0x494c424d, 0xfc(%rax) # imm = 0x494C424D
je 0xb0132
movq -0x8(%rbp), %rax
cmpl $0x50424d20, 0xfc(%rax) # imm = 0x50424D20
je 0xb0132
movq -0x8(%rbp), %rax
cmpl $0x4143424d, 0xfc(%rax) # imm = 0x4143424D
je 0xb0132
movq -0x8(%rbp), %rax
cmpl $0x5247424e, 0xfc(%rax) # imm = 0x5247424E
je 0xb0132
movq -0x8(%rbp), %rax
cmpl $0x52474238, 0xfc(%rax) # imm = 0x52474238
jne 0xb014b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0xfc(%rax), %edx
callq 0xb6110
jmp 0xb01c0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb01a1
movq -0x8(%rbp), %rax
cmpl $0x38535658, 0xfc(%rax) # imm = 0x38535658
jne 0xb016c
movq -0x18(%rbp), %rax
movb $0x1, 0x44(%rax)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x48(%rax)
jne 0xb019f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0xf8, %rdx
addq $0x8, %rdx
leaq 0x104cab(%rip), %rsi    # 0x1b4e3b
movb $0x0, %al
callq 0x15bc10
movq -0x18(%rbp), %rax
movb $0x1, 0x48(%rax)
jmp 0xb01be
movq -0x10(%rbp), %rdi
leaq 0x104cbe(%rip), %rsi    # 0x1b4e6a
movb $0x0, %al
callq 0x15bfb0
movq -0x18(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0xb01c0
jmp 0xb01c2
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: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0xb0223
jmp 0xb02ac
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb024c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl 0x4(%rax), %edx
leaq 0x104c54(%rip), %rsi    # 0x1b4e99
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdx
callq 0xb0660
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%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: do_eof_stuff
static void do_eof_stuff(deark *c, lctx *d)
{
	i64 endpos, endpos_padded;
	i64 extra_bytes;

	endpos = d->main_chunk_endpos;
	if(endpos<1) return;
	endpos_padded = de_pad_to_2(endpos);
	extra_bytes = c->infile->len - endpos_padded;
	if(extra_bytes<1) return;
	de_dbg(c, "[found %"I64_FMT" extra bytes at end of file, starting at %"I64_FMT"]",
		extra_bytes, endpos_padded);

	look_for_RAST(c, d, endpos);
	if(endpos_padded!=endpos) {
		look_for_RAST(c, d, endpos_padded);
	}
	if(d->found_rast) {
		de_warn(c, "Possible RAST data found, which is not supported. "
			"Image might not be decoded correctly.");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jge 0xb02e8
jmp 0xb0374
movq -0x18(%rbp), %rdi
callq 0x15cdf0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x1, -0x28(%rbp)
jge 0xb0312
jmp 0xb0374
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x104b84(%rip), %rsi    # 0x1b4ea9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xb61b0
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xb0358
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb61b0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x43(%rax)
je 0xb0374
movq -0x8(%rbp), %rdi
leaq 0x104b74(%rip), %rsi    # 0x1b4ee1
movb $0x0, %al
callq 0x15bc10
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %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
movb $0x1, 0x33(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x34(%rax)
movq -0x20(%rbp), %rax
movl $0x3, %ecx
cqto
idivq %rcx
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xec7e1(%rip), %rsi     # 0x19d39c
movb $0x0, %al
callq 0x15b0d0
cmpq $0x100, -0x28(%rbp)     # imm = 0x100
jle 0xb0bd4
movq $0x100, -0x28(%rbp)     # imm = 0x100
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %r8
addq $0xd4, %r8
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c0c0
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jle 0xb0c28
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jge 0xb0c54
jmp 0xb0d63
movq -0x10(%rbp), %rax
movb $0x1, 0x37(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x36(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x39(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x3a(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x3b(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165470
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %edx
leaq 0x103a89(%rip), %rsi    # 0x1b4739
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xb0cd0
movq -0x10(%rbp), %rax
movb $0x1, 0x38(%rax)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xb0ce9
movq -0x10(%rbp), %rax
movb $0x1, 0x3b(%rax)
movq -0x10(%rbp), %rax
cmpl $0x5247424e, 0x4(%rax)  # imm = 0x5247424E
je 0xb0d03
movq -0x10(%rbp), %rax
cmpl $0x52474238, 0x4(%rax)  # imm = 0x52474238
jne 0xb0d13
movq -0x10(%rbp), %rax
movb $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x3b(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x38(%rax), %edx
leaq 0x103a15(%rip), %rsi    # 0x1b4749
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x3b(%rax), %edx
leaq 0x103a03(%rip), %rsi    # 0x1b4751
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: do_body_or_abit
static void do_body_or_abit(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos1, i64 len)
{
	if(!de_good_image_dimensions(c, d->width, d->height)) {
		d->errflag = 1;
		goto done;
	}
	if(!do_image_chunk_internal(c, d, d->frctx, pos1, len, 0)) {
		d->errflag = 1;
		goto done;
	}
done:
	;
}

// 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 %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0xb0db7
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0xb0dee
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
xorl %r9d, %r9d
callq 0xb1c30
cmpl $0x0, %eax
jne 0xb0dec
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0xb0dee
jmp 0xb0dee
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_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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x4, -0x20(%rbp)
jg 0xb1174
jmp 0xb124e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movl %eax, %ecx
leaq 0x1039f3(%rip), %rsi    # 0x1b4bca
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdx
callq 0x16a7f0
cmpl $0x0, %eax
jne 0xb1216
movq -0x8(%rbp), %rdi
leaq 0x1039e1(%rip), %rsi    # 0x1b4bee
movb $0x0, %al
callq 0x15bc10
jmp 0xb124e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb6090
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %r8
addq -0x20(%rbp), %r8
subq -0x30(%rbp), %r8
movl $0x1, %r9d
callq 0xb1c30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb0660
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_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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165210
movq %rax, -0x28(%rbp)
imulq $0x3, -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165210
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movl %eax, %ecx
leaq 0x10392b(%rip), %rsi    # 0x1b4c0d
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x16a7f0
cmpl $0x0, %eax
jne 0xb1301
jmp 0xb136e
movq -0x38(%rbp), %rax
imulq -0x30(%rbp), %rax
addq $0x6, %rax
cmpq -0x20(%rbp), %rax
je 0xb1316
jmp 0xb136e
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl $0x3, %ecx
callq 0x16b750
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0x16c8b0
movq -0x48(%rbp), %rdi
leaq 0x1057d7(%rip), %rsi    # 0x1b6b3b
movl $0x3, %edx
callq 0x16afd0
movq -0x48(%rbp), %rdi
callq 0x16af60
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jge 0xb13a1
jmp 0xb140f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1651d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movl %eax, %ecx
leaq 0x103830(%rip), %rsi    # 0x1b4c38
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_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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jge 0xb1441
jmp 0xb14b0
movq -0x10(%rbp), %rax
movb $0x1, 0xa0(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1651d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xa4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x1651d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xa8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xa4(%rax), %edx
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %ecx
leaq 0x10379b(%rip), %rsi    # 0x1b4c44
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_dpan
static void do_dpan(deark *c, lctx *d, i64 pos, i64 len)
{
	i64 nframes;

	if(!d->is_anim) return;
	if(len<4) return;
	nframes = de_getu16be(pos+2);
	de_dbg(c, "number of frames: %d", (int)nframes);
}

// 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
cmpl $0x0, (%rax)
jne 0xb14e3
jmp 0xb151d
cmpq $0x4, -0x20(%rbp)
jge 0xb14ec
jmp 0xb151d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xee55a(%rip), %rsi     # 0x19fa70
movb $0x0, %al
callq 0x15b0d0
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_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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x8, -0x20(%rbp)
jge 0xb1554
jmp 0xb15d7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
callq 0x1651d0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x1651d0
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %edx
leaq 0x1036c4(%rip), %rsi    # 0x1b4c56
movb $0x0, %al
callq 0x15b0d0
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb15d7
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd 0x102c10(%rip), %xmm1   # 0x1b41c8
mulsd %xmm1, %xmm0
leaq 0x1036a6(%rip), %rsi    # 0x1b4c69
movb $0x1, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb60c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x1651d0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x10369b(%rip), %rsi    # 0x1b4cb9
movb $0x0, %al
callq 0x15b0d0
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb163d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb60c0
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_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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165310
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x10363e(%rip), %rsi    # 0x1b4ccc
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x28(%rbp)
je 0xb16a4
movq -0x10(%rbp), %rax
movb $0x1, 0x3c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x2e(%rax)
jne 0xb16d5
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x47(%rax)
je 0xb16e1
jmp 0xb1711
movq -0x10(%rbp), %rax
cmpb $0x0, 0x2e(%rax)
je 0xb16ff
movq -0x8(%rbp), %rdi
leaq 0x1035ec(%rip), %rsi    # 0x1b4ce2
movb $0x0, %al
callq 0x15bc10
jmp 0xb1711
movq -0x8(%rbp), %rdi
leaq 0x103619(%rip), %rsi    # 0x1b4d23
movb $0x0, %al
callq 0x15bfb0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x103621(%rip), %rsi    # 0x1b4d7c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jge 0xb1770
jmp 0xb1834
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x41(%rbp)
jge 0xb17a3
cmpq $0x7d0, -0x30(%rbp)     # imm = 0x7D0
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xb17ac
jmp 0xb1826
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x1651d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %eax, %r8d
leaq 0x10358f(%rip), %rsi    # 0x1b4d9d
movb $0x0, %al
callq 0x15b350
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xb1786
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: get_maskingtype_name
static const char *get_maskingtype_name(u8 n)
{
	const char *name = NULL;

	switch(n) {
	case MASKINGTYPE_NONE: name = "no transparency"; break;
	case MASKINGTYPE_1BITMASK: name = "1-bit transparency mask"; break;
	case MASKINGTYPE_COLORKEY: name = "color-key transparency"; break;
	case MASKINGTYPE_LASSO: name = "lasso"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0xb18a6
movq -0x18(%rbp), %rax
leaq 0x102965(%rip), %rcx    # 0x1b41d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x102d17(%rip), %rax    # 0x1b4592
movq %rax, -0x10(%rbp)
jmp 0xb18a6
leaq 0x102d1a(%rip), %rax    # 0x1b45a2
movq %rax, -0x10(%rbp)
jmp 0xb18a6
leaq 0x102d25(%rip), %rax    # 0x1b45ba
movq %rax, -0x10(%rbp)
jmp 0xb18a6
leaq 0x102d2f(%rip), %rax    # 0x1b45d1
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb18b7
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xb18c4
leaq 0x10636f(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0xb18c4
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: get_cmprtype_name
static const char *get_cmprtype_name(lctx *d, u8 n)
{
	const char *name = NULL;

	if(d->formtype==CODE_ACBM) return "n/a";

	switch(n) {
	case 0: name = "uncompressed"; break;
	case 1: name = "PackBits"; break;
	case 2: name = "VDAT"; break;
	case 3: case 4:
		if(d->formtype==CODE_RGBN || d->formtype==CODE_RGB8) {
			name = "RGBN/RGB8";
		}
		break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4143424d, 0x4(%rax)  # imm = 0x4143424D
jne 0xb1903
leaq 0xf4055(%rip), %rax     # 0x1a594f
movq %rax, -0x8(%rbp)
jmp 0xb1999
movzbl -0x11(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x4, %rax
ja 0xb1973
movq -0x28(%rbp), %rax
leaq 0x1028c4(%rip), %rcx    # 0x1b41e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x12450c(%rip), %rax    # 0x1d5e38
movq %rax, -0x20(%rbp)
jmp 0xb1973
leaq 0x102c9e(%rip), %rax    # 0x1b45d7
movq %rax, -0x20(%rbp)
jmp 0xb1973
leaq 0x102c9a(%rip), %rax    # 0x1b45e0
movq %rax, -0x20(%rbp)
jmp 0xb1973
movq -0x10(%rbp), %rax
cmpl $0x5247424e, 0x4(%rax)  # imm = 0x5247424E
je 0xb1966
movq -0x10(%rbp), %rax
cmpl $0x52474238, 0x4(%rax)  # imm = 0x52474238
jne 0xb1971
leaq 0x102c78(%rip), %rax    # 0x1b45e5
movq %rax, -0x20(%rbp)
jmp 0xb1973
cmpq $0x0, -0x20(%rbp)
je 0xb1984
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xb1991
leaq 0x1062a2(%rip), %rax    # 0x1b7c2d
movq %rax, -0x30(%rbp)
jmp 0xb1991
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: anim_get_op_name
static const char *anim_get_op_name(u8 op)
{
	const char *name = NULL;

	switch(op) {
	case 0: name="direct"; break;
	case ANIM_OP_XOR: name="XOR"; break;
	case 2: name="long delta"; break;
	case 3: name="short delta"; break;
	case 4: name="short/long delta"; break;
	case 5: name="byte vert. delta"; break;
	case 7: name="short/long vert. delta, separated"; break;
	case 8: name="short/long vert. delta, contiguous"; break;
	case 74: name="ANIM-J (Eric Graham)"; break;
	case 100: name="ANIM32"; break;
	case 101: name="ANIM16"; break;
	case 108: name="ANIM-l (Eric Graham)"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x6c, %rax
ja 0xb1a78
movq -0x18(%rbp), %rax
leaq 0x102825(%rip), %rcx    # 0x1b41f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x102c6d(%rip), %rax    # 0x1b464c
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c64(%rip), %rax    # 0x1b4653
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c6a(%rip), %rax    # 0x1b4669
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c4b(%rip), %rax    # 0x1b4657
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c4a(%rip), %rax    # 0x1b4663
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c4e(%rip), %rax    # 0x1b4674
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c52(%rip), %rax    # 0x1b4685
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c67(%rip), %rax    # 0x1b46a7
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c7d(%rip), %rax    # 0x1b46ca
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c85(%rip), %rax    # 0x1b46df
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c7f(%rip), %rax    # 0x1b46e6
movq %rax, -0x10(%rbp)
jmp 0xb1a78
leaq 0x102c79(%rip), %rax    # 0x1b46ed
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb1a89
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xb1a96
leaq 0x10619d(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0xb1a96
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
imulq 0x40(%rcx), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0xb284c
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0xb2839
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
imulq -0x48(%rbp), %rax
addq %rax, %rsi
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq 0x40(%rcx), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x18(%rbp), %rax
imulq 0x48(%rax), %r8
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %r9
imulq 0x40(%r9), %rax
addq %rax, %r8
callq 0x166410
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xb27c7
jmp 0xb283b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xb27ad
movl $0x1, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0xd4(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x19140
movl 0x10(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x70(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
callq 0x1773f0
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x1, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x70(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
leaq -0xd4(%rbp), %r8
callq 0x177e10
movq -0x70(%rbp), %rdi
callq 0x167c30
cmpl $0x0, -0xd0(%rbp)
je 0xb2b9d
movq -0x8(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
addq $0x10, %rdx
leaq 0xed469(%rip), %rsi     # 0x19fffd
movb $0x0, %al
callq 0x15bfb0
jmp 0xb2bc2
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0xfa544(%rip), %rsi     # 0x1ad0f8
movb $0x0, %al
callq 0x15b0d0
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %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)
movq %r9, -0x30(%rbp)
movq $0x0, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x19140
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18c8b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rax
leaq 0xd68(%rip), %rcx       # 0xb39b0
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x18c920
movq -0x68(%rbp), %rdi
callq 0x18c8f0
movl $0x1, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)