LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_run_midi
static void de_run_midi(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;

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

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

	fmtutil_read_iff_format(ictx, 0, c->infile->len);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x8
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movq $0x1, 0x48(%rax)
movq %r14, 0x10(%rax)
leaq 0x811(%rip), %rax       # 0x73e67
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xface4
movq %r15, %rdi
callq 0xfacd3
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_module_rgfx
void de_module_rgfx(deark *c, struct deark_module_info *mi)
{
	mi->id = "rgfx";
	mi->desc = "RGFX graphics";
	mi->run_fn = de_run_rgfx;
	mi->identify_fn = de_identify_rgfx;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
leaq 0xa7f39(%rip), %rax     # 0x11b5ea
movq %rax, (%rsi)
leaq 0xa7f34(%rip), %rax     # 0x11b5ef
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x736da
movq %rax, 0x18(%rsi)
leaq 0xa9(%rip), %rax        # 0x7377a
movq %rax, 0x20(%rsi)
orb $0x1, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_run_rgfx
static void de_run_rgfx(deark *c, de_module_params *mparams)
{
	struct rgfx_ctx *d = NULL;
	struct de_iffctx *ictx = NULL;

	de_declare_fmt(c, "IFF-RGFX");
	d = de_malloc(c, sizeof(struct rgfx_ctx));

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

	fmtutil_read_iff_format(ictx, 0, c->infile->len);

	fmtutil_destroy_iff_decoder(ictx);
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Unsupported or bad RGFX file");
		}
		dbuf_close(d->unc_image);
		de_free(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa8078(%rip), %rsi     # 0x11b761
callq 0xe07f7
movl $0x448, %esi            # imm = 0x448
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movq $0x2, 0x48(%rax)
movq %r14, 0x10(%rax)
leaq 0x7e9(%rip), %rax       # 0x73f05
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xface4
movq %r15, %rdi
callq 0xfacd3
testq %r14, %r14
je 0x73774
cmpb $0x0, 0x1(%r14)
je 0x7375b
leaq 0xa8019(%rip), %rsi     # 0x11b76a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq 0x40(%r14), %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xded32
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: identify_internal
static int identify_internal(deark *c, int *pconfidence)
{
	UI n1, n2, n4;

	n1 = (UI)de_getu32be(0);
	n2 = (UI)de_getu32be(4);

	if(n1==CODE_AT_T && n2==CODE_FORM) {
		*pconfidence = 100;
		return FMT_DJVU;
	}

	if(n1==CODE_FOR4) {
		*pconfidence = 25;
		return FMT_FOR4;
	}

	// Try to screen out plain text files.
	if(n2>=0x20202020U && c->infile->len<0x20000000) goto done_nomatch;

	if(n1==CODE_FORM) {
		// Must use a lower confidence than other IFF-like formats
		// (ilbm, anim, cdi_imag, nsl, ...).
		*pconfidence = 9;
		return FMT_FORM;
	}

	if(n1==CODE_CAT) {
		n4 = (UI)de_getu32be(12);
		if(n4==CODE_FORM) {
			*pconfidence = 19;
			return FMT_FORM;
		}
		*pconfidence = 9;
		return FMT_FORM;
	}

	// TODO: LIST. (The problem is that the only LIST files I've found don't seem
	// to conform to the spec.)

done_nomatch:
	*pconfidence = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %esi, %esi
callq 0xe404f
movq %rax, %r15
movq 0x18(%r14), %rdi
pushq $0x4
popq %rsi
callq 0xe404f
movl %r15d, %ecx
xorl $0x41542654, %ecx       # imm = 0x41542654
movl %eax, %edx
xorl $0x464f524d, %edx       # imm = 0x464F524D
orl %ecx, %edx
jne 0x737f4
pushq $0xa
popq %rbp
pushq $0x64
jmp 0x73802
cmpl $0x464f5234, %r15d      # imm = 0x464F5234
jne 0x73812
pushq $0x4
popq %rbp
pushq $0x19
popq %rax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x20202020, %eax       # imm = 0x20202020
jb 0x73827
movq 0x18(%r14), %rax
cmpq $0x20000000, 0x18(%rax) # imm = 0x20000000
jl 0x73858
pushq $0x1
popq %rbp
cmpl $0x464f524d, %r15d      # imm = 0x464F524D
je 0x7385e
cmpl $0x43415420, %r15d      # imm = 0x43415420
jne 0x73858
movq 0x18(%r14), %rdi
pushq $0xc
popq %rsi
callq 0xe404f
cmpl $0x464f524d, %eax       # imm = 0x464F524D
pushq $0x13
popq %rcx
pushq $0x9
popq %rax
cmovel %ecx, %eax
jmp 0x73803
xorl %eax, %eax
xorl %ebp, %ebp
jmp 0x73803
pushq $0x9
jmp 0x73802
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: my_std_container_start_fn
static int my_std_container_start_fn(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;

	if(ictx->level>0 && d->decode_hint==0 && ictx->chunkctx->parent) {
		if(ictx->chunkctx->parent->chunk4cc.id==CODE_CAT) {
			if(ictx->curr_container_fmt4cc.id==CODE_FORM) {
				// TODO: Extract more formats.
				if(ictx->curr_container_contentstype4cc.id==CODE_ILBM) {
					extract_iff_item(c, d, ictx, "ilbm");
					return 0; // = Stop processing this container
				}
			}
		}
	}

	if(ictx->level==0 &&
		ictx->curr_container_fmt4cc.id==CODE_FORM &&
		ictx->main_fmt4cc.id==CODE_FORM)
	{
		const char *fmtname = NULL;

		switch(ictx->main_contentstype4cc.id) {
		case CODE_8SVX: fmtname = "8SVX"; break;
		case CODE_AIFF: fmtname = "AIFF"; break;
		case CODE_YAFA: fmtname = "YAFA"; break;
		}

		if(fmtname) {
			de_declare_fmt(c, fmtname);
		}
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpl $0x0, 0x64(%rdi)
jle 0x73e06
movq 0x10(%r14), %rax
pushq $0x1
popq %rbx
cmpb $0x0, 0x4(%rax)
jne 0x73e5f
movq 0x128(%r14), %rax
movq 0x50(%rax), %rcx
testq %rcx, %rcx
je 0x73e5f
cmpl $0x43415420, 0x4(%rcx)  # imm = 0x43415420
jne 0x73e5f
cmpl $0x464f524d, 0xcc(%r14) # imm = 0x464F524D
jne 0x73e5f
cmpl $0x494c424d, 0xfc(%r14) # imm = 0x494C424D
jne 0x73e5f
movq 0x30(%rax), %r15
movq 0x48(%rax), %rdi
movq 0x48(%r14), %rsi
callq 0xdfbb6
leaq (%rax,%r15), %rcx
addq $0x8, %rcx
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rdx
addq $0x64, %rdx
xorl %ebx, %ebx
cmpq %rdx, %rcx
jge 0x73e5f
addq $0x8, %rax
leaq 0xa78c4(%rip), %rcx     # 0x11b6b5
xorl %ebx, %ebx
movq %r15, %rsi
movq %rax, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe4e0b
jmp 0x73e5f
pushq $0x1
popq %rbx
jne 0x73e5f
cmpl $0x464f524d, 0xcc(%r14) # imm = 0x464F524D
jne 0x73e5f
cmpl $0x464f524d, 0x6c(%r14) # imm = 0x464F524D
jne 0x73e5f
movq (%r14), %rdi
movl 0x9c(%r14), %eax
cmpl $0x38535658, %eax       # imm = 0x38535658
je 0x73e53
cmpl $0x59414641, %eax       # imm = 0x59414641
je 0x73e4a
cmpl $0x41494646, %eax       # imm = 0x41494646
jne 0x73e5f
leaq 0xa7877(%rip), %rsi     # 0x11b6bf
jmp 0x73e5a
leaq 0xa7873(%rip), %rsi     # 0x11b6c4
jmp 0x73e5a
leaq 0xa7860(%rip), %rsi     # 0x11b6ba
callq 0xe07f7
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: my_midi_chunk_handler
static int my_midi_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_MThd:
		do_midi_MThd(c, ictx, ictx->chunkctx);
		break;
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x128(%rdi), %r15
cmpl $0x4d546864, 0x4(%r15)  # imm = 0x4D546864
jne 0x73efc
cmpq $0x6, 0x48(%r15)
jl 0x73efc
movq %rdi, %r14
movl $0x1, 0x130(%rdi)
movq (%rdi), %rbx
movq 0x18(%rdi), %rdi
movq 0x40(%r15), %rsi
callq 0xe3f46
leaq 0xa08f3(%rip), %rsi     # 0x11479b
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq 0x40(%r15), %rsi
addq $0x2, %rsi
callq 0xe3f46
leaq 0xa7879(%rip), %rsi     # 0x11b745
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq 0x40(%r15), %rsi
addq $0x4, %rsi
callq 0xe3f46
leaq 0xa785f(%rip), %rsi     # 0x11b74f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xa732a(%rip), %rax     # 0x11b6b5
movq %rax, (%rsi)
leaq 0xa751b(%rip), %rax     # 0x11b8b0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x743bb
movq %rax, 0x18(%rsi)
leaq 0x15(%rip), %rax        # 0x743c0
movq %rax, 0x20(%rsi)
leaq 0x63(%rip), %rax        # 0x74419
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe404f
cmpl $0x464f524d, %eax       # imm = 0x464F524D
jne 0x7440f
movq 0x18(%r14), %rdi
pushq $0x8
popq %rsi
callq 0xe404f
pushq $0x64
popq %rbx
cmpl $0x4143424d, %eax       # imm = 0x4143424D
je 0x7440f
cmpl $0x494c424d, %eax       # imm = 0x494C424D
je 0x7440f
cmpl $0x50424d20, %eax       # imm = 0x50424D20
je 0x7440f
cmpl $0x52474238, %eax       # imm = 0x52474238
je 0x7440f
cmpl $0x5247424e, %eax       # imm = 0x5247424E
je 0x7440f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xa74ac(%rip), %rax     # 0x11b8d3
movq %rax, (%rsi)
leaq 0xa74a7(%rip), %rax     # 0x11b8d8
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x74457
movq %rax, 0x18(%rsi)
leaq 0x15(%rip), %rax        # 0x7445c
movq %rax, 0x20(%rsi)
leaq 0x48(%rip), %rax        # 0x7449a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe404f
cmpl $0x464f524d, %eax       # imm = 0x464F524D
jne 0x74490
movq 0x18(%r14), %rdi
pushq $0x8
popq %rsi
callq 0xe404f
xorl %ecx, %ecx
cmpl $0x414e494d, %eax       # imm = 0x414E494D
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0x9bc3e(%rip), %rax     # 0x1100e7
movq %rax, (%rsi)
leaq 0xa7438(%rip), %rax     # 0x11b8eb
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x744d9
movq %rax, 0x18(%rsi)
leaq 0xf6(%rip), %rax        # 0x745bf
movq %rax, 0x20(%rsi)
leaq 0x131(%rip), %rax       # 0x74605
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xd8, %esi
callq 0xdecaf
movq %rax, %r14
movb $0x2, 0x8(%rax)
leaq 0xa8065(%rip), %rsi     # 0x11c560
movq %rbx, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x74542
movq %rax, %r15
leaq 0x8f065(%rip), %rsi     # 0x103577
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0x74537
movb $0x1, %bpl
cmpb $0x0, (%r15)
je 0x7453e
movq %r15, %rdi
callq 0xdfb36
testl %eax, %eax
je 0x7453c
jg 0x7453e
jmp 0x74542
movb $0x2, %bpl
jmp 0x7453e
xorl %ebp, %ebp
movb %bpl, 0x8(%r14)
leaq 0xa73a2(%rip), %rsi     # 0x11b8eb
movq %rbx, %rdi
callq 0xe07f7
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movb $0x1, 0x5d(%rax)
movq $0x2, 0x48(%rax)
movq %r14, 0x10(%rax)
leaq 0x4199(%rip), %rax      # 0x7870c
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0xface4
movl 0x4(%r14), %edx
leaq 0xa7fd3(%rip), %rsi     # 0x11c56b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
callq 0xfacd3
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: my_preprocess_iff_chunk_fn
static int my_preprocess_iff_chunk_fn(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;
	const char *name = NULL;

	// frctx will be set if we're in an "image" container, such as FORM:ILBM.
	// It is possible, e.g., for an ANIM file to contain FORM:8SVX containers
	// which contain BODY chunks that are not "image data".
	if(d->frctx) {
		switch(ictx->chunkctx->chunk4cc.id) {
		case CODE_ANHD: name="animation header"; break;
		case CODE_BMHD: name="bitmap header"; break;
		case CODE_BODY: name="image data"; break;
		case CODE_CAMG: name="Amiga viewport mode"; break;
		case CODE_CMAP: name="color map"; break;
		case CODE_CRNG: name="color register range info"; break;
		case CODE_DLTA: name="delta-compressed data"; break;
		case CODE_DPI : name="dots/inch"; break;
		case CODE_DRNG: name="color cycle"; break;
		case CODE_GRAB: name="hotspot"; break;
		case CODE_TINY: name="thumbnail"; break;
		}
	}

	if(name) {
		ictx->chunkctx->chunk_name = name;
	}
	return 1;
}

// Assembly:
movq 0x10(%rdi), %rax
cmpq $0x0, 0xb0(%rax)
je 0x767bb
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x414e4844, %ecx       # imm = 0x414E4844
je 0x7678c
cmpl $0x54494e59, %ecx       # imm = 0x54494E59
je 0x7675f
cmpl $0x424f4459, %ecx       # imm = 0x424F4459
je 0x767b0
cmpl $0x43414d47, %ecx       # imm = 0x43414D47
je 0x76783
cmpl $0x434d4150, %ecx       # imm = 0x434D4150
je 0x7677a
cmpl $0x43524e47, %ecx       # imm = 0x43524E47
je 0x767a7
cmpl $0x444c5441, %ecx       # imm = 0x444C5441
je 0x76768
cmpl $0x44504920, %ecx       # imm = 0x44504920
je 0x76771
cmpl $0x44524e47, %ecx       # imm = 0x44524E47
je 0x76795
cmpl $0x47524142, %ecx       # imm = 0x47524142
je 0x7679e
cmpl $0x424d4844, %ecx       # imm = 0x424D4844
jne 0x767bb
leaq 0xa5afe(%rip), %rcx     # 0x11c25b
jmp 0x767b7
leaq 0xa5eed(%rip), %rcx     # 0x11c653
jmp 0x767b7
leaq 0xa5b32(%rip), %rcx     # 0x11c2a1
jmp 0x767b7
leaq 0xa5b3f(%rip), %rcx     # 0x11c2b7
jmp 0x767b7
leaq 0xa5afc(%rip), %rcx     # 0x11c27d
jmp 0x767b7
leaq 0xa5adf(%rip), %rcx     # 0x11c269
jmp 0x767b7
leaq 0xa5ab7(%rip), %rcx     # 0x11c24a
jmp 0x767b7
leaq 0xa5b25(%rip), %rcx     # 0x11c2c1
jmp 0x767b7
leaq 0xb3c99(%rip), %rcx     # 0x12a43e
jmp 0x767b7
leaq 0xa5ad9(%rip), %rcx     # 0x11c287
jmp 0x767b7
leaq 0xb3d2e(%rip), %rcx     # 0x12a4e5
movq %rcx, 0x58(%rax)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: my_on_std_container_start_fn
static int my_on_std_container_start_fn(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
movl 0x64(%rdi), %eax
cmpl 0x18(%rbx), %eax
jne 0x768b3
movq %rdi, %r15
movq (%rdi), %r14
cmpq $0x0, 0xb0(%rbx)
je 0x767f1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x768cb
movl 0xfc(%r15), %ebp
cmpl $0x4143424d, %ebp       # imm = 0x4143424D
je 0x76820
cmpl $0x494c424d, %ebp       # imm = 0x494C424D
je 0x76820
cmpl $0x50424d20, %ebp       # imm = 0x50424D20
je 0x76820
cmpl $0x5247424e, %ebp       # imm = 0x5247424E
je 0x76820
cmpl $0x52474238, %ebp       # imm = 0x52474238
jne 0x76863
cmpq $0x0, 0xb0(%rbx)
jne 0x768b3
incl 0x20(%rbx)
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0xdecaf
movq %rax, 0xb0(%rbx)
movl %ebp, (%rax)
movl 0x24(%rbx), %edx
movl %edx, 0x4(%rax)
cmpl $0x0, (%rbx)
je 0x768b3
leaq 0xa5ac2(%rip), %rsi     # 0x11c319
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0x768b3
cmpl $0x0, (%rbx)
je 0x7689b
cmpl $0x38535658, %ebp       # imm = 0x38535658
jne 0x76874
movb $0x1, 0x44(%rbx)
cmpb $0x0, 0x48(%rbx)
jne 0x768b3
addq $0x100, %r15            # imm = 0x100
leaq 0xa5a45(%rip), %rsi     # 0x11c2cd
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xdf05a
movb $0x1, 0x48(%rbx)
jmp 0x768b3
leaq 0xa5a5a(%rip), %rsi     # 0x11c2fc
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
movl $0x1, 0x1c(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: on_frame_end
static void on_frame_end(deark *c, lctx *d)
{
	if(!d->frctx) return;

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

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

// Assembly:
movq 0xb0(%rsi), %rax
testq %rax, %rax
je 0x76929
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, (%rsi)
je 0x768fa
movl 0x4(%rax), %edx
leaq 0xa5a3b(%rip), %rsi     # 0x11c32b
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
movq 0xc0(%rbx), %rsi
movq %r14, %rdi
callq 0x7692a
movups 0xb0(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
andq $0x0, 0xb0(%rbx)
incl 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: do_xs24
static void do_xs24(deark *c, dbuf *f, i64 pos1, i64 len)
{
	i64 w, h, rowspan;
	i64 pos = pos1;
	de_bitmap *img = NULL;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rdx, (%rbx)
movq 0x18(%rdi), %rdi
movq %rbx, %rsi
callq 0xe3f6e
movq %rax, %r13
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xe3f6e
movq %rax, %rbp
leaq 0xa5704(%rip), %rsi     # 0x11c09f
xorl %r15d, %r15d
movq %r14, %rdi
movl %r13d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xe6bb4
testl %eax, %eax
je 0x76a2a
leaq (,%r13,2), %rbx
addq %r13, %rbx
movq %rbp, %rax
imulq %rbx, %rax
addq $0x6, %rax
cmpq %r12, %rax
jne 0x76a27
addq $0x2, 0x8(%rsp)
pushq $0x3
popq %r12
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl %r12d, %ecx
callq 0xe7437
movq %rax, %r15
movq 0x8(%rsp), %rsi
pushq $0x3
popq %rcx
movq 0x10(%rsp), %rdi
movq %rbx, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe7f67
leaq 0xa748c(%rip), %rsi     # 0x11dea6
movq %r15, %rdi
movl %r12d, %edx
callq 0xe70b7
jmp 0x76a2a
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xe7084
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpb $0x0, 0x2e(%rsi)
je 0x76a5b
cmpb $0x0, 0x47(%rsi)
jne 0x76a68
leaq 0xa5720(%rip), %rsi     # 0x11c174
xorl %eax, %eax
jmp 0xdf05a
movl $0x1, 0x1c(%rsi)
cmpb $0x0, 0x47(%rsi)
je 0x76a69
retq
leaq 0xa5745(%rip), %rsi     # 0x11c1b5
xorl %eax, %eax
jmp 0xdf2a5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: decompress_ilbm_packbits
static int decompress_ilbm_packbits(deark *c, dbuf *inf, i64 pos, i64 len,
	dbuf *unc_pixels, i64 expected_len, UI nbytes_per_unit)
{
	int retval = 0;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_packbits_params pbparams;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movl 0xf0(%rsp), %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x98(%rsp), %r14
leaq 0x80(%rsp), %r15
leaq 0x20(%rsp), %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0xee7ee
movq %rbp, (%r14)
movq %r13, 0x8(%r14)
movq %r12, %r13
movq 0x10(%rsp), %r12
movq %r13, 0x10(%r14)
movq %r12, (%r15)
movb $0x1, 0x8(%r15)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
leaq 0x20(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0xeed4f
movq (%r15), %rdi
callq 0xe58e8
leaq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
je 0x7761a
leaq 0x30(%rsp), %rdx
leaq 0x8fbb5(%rip), %rsi     # 0x1071c1
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x77636
movq 0x18(%r12), %rcx
leaq 0x9ce39(%rip), %rsi     # 0x11445f
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: vdat_write_element
static void vdat_write_element(deark *c, struct vdat_ctx *vdctx, const u8 *elembuf)
{
	i64 dstpos;

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

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

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
imulq 0x40(%rcx), %rax
movq 0x20(%rbx), %rsi
leaq (%rax,%rsi,2), %rax
movq 0x48(%rcx), %rsi
imulq 0x28(%rbx), %rsi
addq %rax, %rsi
pushq $0x2
popq %rcx
callq 0xe5bfe
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
incq %rcx
movq %rcx, 0x28(%rbx)
cmpq 0x8(%rax), %rcx
jl 0x77f78
andq $0x0, 0x28(%rbx)
incq 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movb $0x1, 0x3c(%rsi)
cmpb $0x0, 0x3d(%rsi)
je 0x785c7
retq
pushq %rbx
movq %rsi, %rbx
leaq 0xa3b38(%rip), %rsi     # 0x11c10a
xorl %eax, %eax
callq 0xdf05a
movb $0x1, 0x3d(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: do_help_ilbm_anim
static void do_help_ilbm_anim(deark *c, int is_anim)
{
	de_msg(c, "-opt ilbm:trans=<0|1|auto> : Always remove (0) or respect (1) "
		"transparency");
	de_msg(c, "-opt ilbm:fixpal=<0|1> : Don't/Do try to fix palettes that are "
		"slightly too dark");
	de_msg(c, "-opt ilbm:allowspecial : Suppress an error on some images");
	if(is_anim) {
		de_msg(c, "-opt anim:includedups : Do not suppress duplicate frames");
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xa3d90(%rip), %rsi     # 0x11c451
xorl %eax, %eax
callq 0xdf42e
leaq 0xa3dcd(%rip), %rsi     # 0x11c49c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
leaq 0xa3e0d(%rip), %rsi     # 0x11c4ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf42e
testl %ebp, %ebp
je 0x78705
leaq 0xa3e32(%rip), %rsi     # 0x11c527
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xdf42e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/insetpix.c
// Function: de_module_insetpix
void de_module_insetpix(deark *c, struct deark_module_info *mi)
{
	mi->id = "insetpix";
	mi->desc = "Inset PIX image";
	mi->run_fn = de_run_insetpix;
	mi->identify_fn = de_identify_insetpix;
}

// Assembly:
leaq 0xa35a5(%rip), %rax     # 0x11c6e0
movq %rax, (%rsi)
leaq 0xa35a4(%rip), %rax     # 0x11c6e9
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x79160
movq %rax, 0x18(%rsi)
leaq 0xeef(%rip), %rax       # 0x7a04a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/insetpix.c
// Function: de_identify_insetpix
static int de_identify_insetpix(deark *c)
{
	UI pix_version;
	i64 item_count;
	i64 item;
	i64 item_loc, item_len;
	u8 has_ext;
	u8 has_typical_1st_item;

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

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

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

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

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

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

	return 20;
}

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpb $0x0, 0x9(%rsi)
je 0x7a1e7
movl 0x4(%r15), %ecx
leaq 0xa2675(%rip), %rdx     # 0x11c84b
leaq 0x10(%rsp), %rdi
pushq $0x28
popq %rsi
xorl %eax, %eax
callq 0xde40c
jmp 0x7a245
movl (%r15), %eax
testl %eax, %eax
je 0x7a231
cmpl $0xff, %eax
je 0x7a20d
cmpl $0x2, %eax
je 0x7a21f
cmpl $0x11, %eax
je 0x7a216
cmpl $0x1, %eax
jne 0x7a228
leaq 0xaefa9(%rip), %rsi     # 0x1291b4
jmp 0x7a238
leaq 0x8f945(%rip), %rsi     # 0x109b59
jmp 0x7a238
leaq 0xa264c(%rip), %rsi     # 0x11c869
jmp 0x7a238
leaq 0xa2639(%rip), %rsi     # 0x11c85f
jmp 0x7a238
leaq 0xa4cb2(%rip), %rsi     # 0x11eee1
jmp 0x7a238
leaq 0xa261c(%rip), %rsi     # 0x11c854
leaq 0x10(%rsp), %rdi
pushq $0x28
popq %rdx
callq 0xde492
movl (%r15), %ecx
movq 0x18(%r15), %r9
movq 0x10(%r15), %rax
movq %rax, (%rsp)
leaq 0xa25c9(%rip), %rsi     # 0x11c824
leaq 0x10(%rsp), %r8
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xde896
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iptc.c
// Function: de_module_iptc
void de_module_iptc(deark *c, struct deark_module_info *mi)
{
	mi->id = "iptc";
	mi->desc = "IPTC-IIM metadata";
	mi->run_fn = de_run_iptc;
	mi->identify_fn = de_identify_iptc;
}

// Assembly:
leaq 0xc2b4f(%rip), %rax     # 0x13cfa2
movq %rax, (%rsi)
leaq 0xa265f(%rip), %rax     # 0x11cabc
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7a478
movq %rax, 0x18(%rsi)
leaq 0x2a7(%rip), %rax       # 0x7a71a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iptc.c
// Function: de_identify_iptc
static int de_identify_iptc(deark *c)
{
	u8 b;

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

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

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

	return 60;
}

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

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

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

	d->charset = DE_ENCODING_UNKNOWN;

	// TODO: Fully interpret this field.

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

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andl $0x0, (%rsi)
cmpq $0x3, %r8
jl 0x7a870
movq %rsi, %r14
movq 0x18(%rbx), %rdi
leaq 0xa27fc(%rip), %rdx     # 0x11d042
pushq $0x3
popq %rax
movq %rcx, %rsi
movq %rax, %rcx
callq 0xe4d48
testl %eax, %eax
je 0x7a879
cmpl $0x2, (%r14)
leaq 0xa27e3(%rip), %rax     # 0x11d046
leaq 0x8ac12(%rip), %rdx     # 0x10547c
cmoveq %rax, %rdx
jmp 0x7a887
leaq 0x8ac05(%rip), %rdx     # 0x10547c
jmp 0x7a887
movl $0x2, (%r14)
leaq 0xa27bf(%rip), %rdx     # 0x11d046
leaq 0xa27be(%rip), %rsi     # 0x11d04c
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iptc.c
// Function: handle_2_120
static void handle_2_120(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	dbuf *outf = NULL;
	de_encoding encoding;

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
cmpl $0x1, 0x90(%rdi)
jg 0x7a8cf
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7a765
movb (%rdx), %al
addb $-0x2, %al
movl $0x300, %ebp            # imm = 0x300
cmpb $0x4, %al
ja 0x7a8e5
movzbl (%rsi), %ebp
orl $0x300, %ebp            # imm = 0x300
leaq 0xa276c(%rip), %rsi     # 0x11d058
pushq $0x1
popq %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0xe4e62
movq %rax, %r12
movq 0x18(%r15), %rdi
pushq $0x5
popq %r9
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movq %rax, %r8
callq 0xe66ec
testq %r12, %r12
je 0x7a929
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xe5591
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iptc.c
// Function: handle_2_125
static void handle_2_125(deark *c, lctx *d, const struct ds_info *dsi,
	i64 pos, i64 len)
{
	de_bitmap *img = NULL;
	i64 rowspan;
	i64 width1, height1;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x1cc0, %r8            # imm = 0x1CC0
jge 0x7a946
xorl %ebx, %ebx
jmp 0x7a992
movq %rcx, %r14
movq %rdi, %r15
pushq $0x1
popq %rbp
movl $0x80, %esi
movl $0x1cc, %edx            # imm = 0x1CC
movl %ebp, %ecx
callq 0xe7437
movq %rax, %rbx
movq 0x18(%r15), %rdi
pushq $0x10
popq %rdx
movq %r14, %rsi
movq %rax, %rcx
movl %ebp, %r8d
callq 0xe77b7
movq %rbx, %rdi
callq 0xe8161
leaq 0xa26dd(%rip), %rsi     # 0x11d064
pushq $0xd
popq %rdx
movq %rbx, %rdi
callq 0xe70b7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe7084
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jbf.c
// Function: de_module_jbf
void de_module_jbf(deark *c, struct deark_module_info *mi)
{
	mi->id = "jbf";
	mi->desc = "PaintShop Pro Browser Cache (pspbrwse.jbf)";
	mi->run_fn = de_run_jbf;
	mi->identify_fn = de_identify_jbf;
}

// Assembly:
leaq 0xa2a25(%rip), %rax     # 0x11d3d0
movq %rax, (%rsi)
leaq 0xa2a1f(%rip), %rax     # 0x11d3d4
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7a9d0
movq %rax, 0x18(%rsi)
leaq 0x897(%rip), %rax       # 0x7b262
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jovianvi.c
// Function: de_module_jovianvi
void de_module_jovianvi(deark *c, struct deark_module_info *mi)
{
	mi->id = "jovianvi";
	mi->desc = "Jovian Logic VI";
	mi->run_fn = de_run_jovianvi;
	mi->identify_fn = de_identify_jovianvi;
}

// Assembly:
leaq 0xa2385(%rip), %rax     # 0x11d610
movq %rax, (%rsi)
leaq 0xa2384(%rip), %rax     # 0x11d619
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7b2b0
movq %rax, 0x18(%rsi)
leaq 0x5a6(%rip), %rax       # 0x7b851
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jovianvi.c
// Function: de_identify_jovianvi
static int de_identify_jovianvi(deark *c)
{
	u8 t;

	if(dbuf_memcmp(c->infile, 0, "VI", 2)) return 0;
	t = de_getbyte(2);
	if((t>=0x10 && t<=0x11) ||
		(t>=0x20 && t<=0x23) ||
		(t>=0x30 && t<=0x31))
	{
		return 100;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0xa1dc3(%rip), %rdx     # 0x11d626
xorl %ebx, %ebx
pushq $0x2
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x7b89a
movq 0x18(%r14), %rdi
pushq $0x2
popq %rsi
callq 0xe3eb4
movl %eax, %ecx
andb $-0x4, %cl
cmpb $0x20, %cl
jne 0x7b88e
pushq $0x64
popq %rbx
jmp 0x7b89a
addb $-0x10, %al
xorl %ecx, %ecx
testb $-0x22, %al
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_module_jpeg
void de_module_jpeg(deark *c, struct deark_module_info *mi)
{
	mi->id = "jpeg";
	mi->desc = "JPEG image";
	mi->desc2 = "resources only";
	mi->run_fn = de_run_jpeg;
	mi->identify_fn = de_identify_jpeg;
}

// Assembly:
leaq 0x8efd5(%rip), %rax     # 0x10a880
movq %rax, (%rsi)
leaq 0xa1eeb(%rip), %rax     # 0x11d7a0
movq %rax, 0x8(%rsi)
leaq 0x8ca41(%rip), %rax     # 0x108301
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x7b8db
movq %rax, 0x18(%rsi)
leaq 0x9a4(%rip), %rax       # 0x7c27a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_module_syberia_syj
void de_module_syberia_syj(deark *c, struct deark_module_info *mi)
{
	mi->id = "syberia_syj";
	mi->desc = "Syberia texture";
	mi->run_fn = de_run_syberia_syj;
	mi->identify_fn = de_identify_syberia_syj;
}

// Assembly:
leaq 0xa12ba(%rip), %rax     # 0x11d7e6
movq %rax, (%rsi)
leaq 0xa12bc(%rip), %rax     # 0x11d7f2
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7c551
movq %rax, 0x18(%rsi)
leaq 0x52(%rip), %rax        # 0x7c59e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_run_syberia_syj
static void de_run_syberia_syj(deark *c, de_module_params *mparams)
{
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "jpg", NULL, 0);
	dbuf_write(outf, (const u8*)"\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46", 10);
	dbuf_copy(c->infile, 0, c->infile->len, outf);
	dbuf_close(outf);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xaa07b(%rip), %rsi     # 0x1265da
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r14
leaq 0xa1215(%rip), %rsi     # 0x11d787
pushq $0xa
popq %rdx
movq %rax, %rdi
callq 0xe46ba
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %r14, %rcx
callq 0xe45f4
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe5591
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_identify_syberia_syj
static int de_identify_syberia_syj(deark *c)
{
	if(de_getu16be(0) != 0x0001) return 0;
	if(!de_input_file_has_ext(c, "syj")) return 0;
	if(dbuf_memcmp(c->infile, 8, (const void*)"\0\0\xff", 3)) {
		return 0;
	}
	if(de_getu16be(c->infile->len-2) != 0xffd9) return 0;
	return 80;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3f46
cmpq $0x1, %rax
jne 0x7c604
leaq 0xa122f(%rip), %rsi     # 0x11d7ee
movq %r14, %rdi
callq 0xdfcd5
testl %eax, %eax
je 0x7c604
movq 0x18(%r14), %rdi
leaq 0xa22ba(%rip), %rdx     # 0x11e890
pushq $0x8
popq %rsi
pushq $0x3
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x7c604
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rsi
addq $-0x2, %rsi
callq 0xe3f46
xorl %ecx, %ecx
cmpq $0xffd9, %rax           # imm = 0xFFD9
pushq $0x50
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_module_esm_pix
void de_module_esm_pix(deark *c, struct deark_module_info *mi)
{
	mi->id = "esm_pix";
	mi->desc = "Esm Software PIX";
	mi->run_fn = de_run_esm_pix;
	mi->identify_fn = de_identify_esm_pix;
}

// Assembly:
leaq 0xa11ed(%rip), %rax     # 0x11d802
movq %rax, (%rsi)
leaq 0xa11eb(%rip), %rax     # 0x11d80a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7c63a
movq %rax, 0x18(%rsi)
leaq 0x45(%rip), %rax        # 0x7c67a
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_identify_esm_pix
static int de_identify_esm_pix(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, (const void*)"Esm ", 4)) {
		return 0;
	}
	if(dbuf_memcmp(c->infile, 13, (const void*)"PIX ", 4)) {
		return 0;
	}
	if((UI)de_getu16be(21) != 0xffd8) return 0;
	return 100;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0xa21cc(%rip), %rdx     # 0x11e858
xorl %ebx, %ebx
pushq $0x4
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x7c6cf
movq 0x18(%r14), %rdi
leaq 0xa21b6(%rip), %rdx     # 0x11e85d
pushq $0xd
popq %rsi
pushq $0x4
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x7c6cf
movq 0x18(%r14), %rdi
pushq $0x15
popq %rsi
callq 0xe3f46
xorl %ecx, %ecx
cmpl $0xffd8, %eax           # imm = 0xFFD8
pushq $0x64
popq %rbx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/jpeg.c
// Function: de_module_pegasus_pic2
void de_module_pegasus_pic2(deark *c, struct deark_module_info *mi)
{
	mi->id = "pegasus_pic2";
	mi->desc = "Pegasus PIC2";
	mi->run_fn = de_run_pegasus_pic2;
	mi->identify_fn = de_identify_pegasus_pic2;
}

// Assembly:
leaq 0xa113b(%rip), %rax     # 0x11d81b
movq %rax, (%rsi)
leaq 0xa113e(%rip), %rax     # 0x11d828
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7c705
movq %rax, 0x18(%rsi)
leaq 0x1ff(%rip), %rax       # 0x7c8ff
movq %rax, 0x20(%rsi)
retq