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

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

	ictx = fmtutil_create_iff_decoder(c);
	ictx->userdata = (void*)d;
	ictx->preprocess_chunk_fn = my_preprocess_riff_chunk_fn;
	ictx->handle_chunk_fn = my_riff_chunk_handler;
	ictx->on_std_container_start_fn = my_on_std_container_start_fn;
	ictx->on_container_end_fn = my_on_container_end_fn;
	ictx->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);
	ictx->f = c->infile;

	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "RIFF", 4)) {
		ictx->is_le = 1;
		ictx->reversed_4cc = 0;
	}
	else if(!de_memcmp(buf, "RIFX", 4)) {
		ictx->is_le = 0;
		ictx->reversed_4cc = 0;
	}
	else if(!de_memcmp(buf, "XFIR", 4)) {
		ictx->is_le = 1;
		ictx->reversed_4cc = 1;
	}
	else {
		de_warn(c, "This is probably not a RIFF file.");
		ictx->is_le = 1;
		ictx->reversed_4cc = 0;
	}

	fmtutil_read_iff_format(ictx, 0, ictx->f->len);

	fmtutil_destroy_iff_decoder(ictx);
	if(d) {
		ucstring_destroy(d->INAM_data);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %esi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1075c0
movq %rax, %r15
movq %r14, 0x10(%rax)
leaq 0x14c(%rip), %rax       # 0xc1c99
movq %rax, 0x28(%r15)
leaq 0x1f7(%rip), %rax       # 0xc1d4f
movq %rax, 0x20(%r15)
leaq 0x5ce(%rip), %rax       # 0xc2131
movq %rax, 0x30(%r15)
leaq 0x7a5(%rip), %rax       # 0xc2313
movq %rax, 0x38(%r15)
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x9, %edx
callq 0xeb220
movl %eax, 0x60(%r15)
movq 0x18(%rbx), %rdi
movq %rdi, 0x18(%r15)
leaq 0x4(%rsp), %r12
movl $0x4, %ecx
movq %r12, %rsi
xorl %edx, %edx
callq 0xee8d4
movl $0x1, %ebp
cmpl $0x46464952, (%r12)     # imm = 0x46464952
je 0xc1be4
cmpl $0x58464952, 0x4(%rsp)  # imm = 0x58464952
je 0xc1bdd
cmpl $0x52494658, 0x4(%rsp)  # imm = 0x52494658
je 0xc1be1
leaq 0x7884b(%rip), %rsi     # 0x13a419
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8faa
jmp 0xc1be4
xorl %ebp, %ebp
jmp 0xc1be4
movb $0x1, %r13b
movl %ebp, 0x58(%r15)
movb %r13b, 0x5c(%r15)
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1075e4
movq %r15, %rdi
callq 0x1075d3
testq %r14, %r14
je 0xc1c1f
movq 0x18(%r14), %rdi
callq 0xf6753
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: de_identify_riff
static int de_identify_riff(deark *c)
{
	u8 buf[4];
	int has_sig;
	i64 dlen;

	de_read(buf, 0, 4);
	has_sig = (!de_memcmp(buf, "RIFF", 4)) ||
		(!de_memcmp(buf, "XFIR", 4)) ||
		(!de_memcmp(buf, "RIFX", 4));
	if(!has_sig) return 0;

	dlen = de_getu32le(4);
	// This check screens out .AMV format, for example.
	if(dlen==0 && c->infile->len!=8) return 0;

	return 50;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x4(%rsp), %r14
movl $0x4, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xee8d4
cmpl $0x46464952, (%r14)     # imm = 0x46464952
je 0xc1c6a
cmpl $0x52494658, 0x4(%rsp)  # imm = 0x52494658
je 0xc1c6a
cmpl $0x58464952, 0x4(%rsp)  # imm = 0x58464952
jne 0xc1c8f
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeed61
testq %rax, %rax
jne 0xc1c88
movq 0x18(%rbx), %rax
cmpq $0x8, 0x18(%rax)
jne 0xc1c8f
movl $0x32, %eax
jmp 0xc1c91
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: my_preprocess_riff_chunk_fn
static int my_preprocess_riff_chunk_fn(struct de_iffctx *ictx)
{
	const char *name = NULL;

	// TODO: Need a better way to do this.
	switch(ictx->chunkctx->chunk4cc.id) {
	case CHUNK_DISP: name="display"; break;
	case CHUNK_IART: name="artist"; break;
	case CHUNK_ICOP: name="copyright"; break;
	case CHUNK_ICMT: name="comments"; break;
	case CHUNK_IKEY: name="keywords"; break;
	case CHUNK_ISBJ: name="subject"; break;
	case CHUNK_JUNK: name="filler"; break;
	case CHUNK_LIST: name="subchunk container"; break;
	}

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

// Assembly:
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x494b4558, %ecx       # imm = 0x494B4558
jg 0xc1cd0
cmpl $0x49434d53, %ecx       # imm = 0x49434D53
jg 0xc1cf1
cmpl $0x44495350, %ecx       # imm = 0x44495350
je 0xc1d23
cmpl $0x49415254, %ecx       # imm = 0x49415254
jne 0xc1d49
leaq 0x66386(%rip), %rcx     # 0x128054
jmp 0xc1d45
cmpl $0x4a554e4a, %ecx       # imm = 0x4A554E4A
jg 0xc1d0a
cmpl $0x494b4559, %ecx       # imm = 0x494B4559
je 0xc1d2c
cmpl $0x4953424a, %ecx       # imm = 0x4953424A
jne 0xc1d49
leaq 0x6a417(%rip), %rcx     # 0x12c106
jmp 0xc1d45
cmpl $0x49434d54, %ecx       # imm = 0x49434D54
je 0xc1d35
cmpl $0x49434f50, %ecx       # imm = 0x49434F50
jne 0xc1d49
leaq 0x509e7(%rip), %rcx     # 0x1126ef
jmp 0xc1d45
cmpl $0x4a554e4b, %ecx       # imm = 0x4A554E4B
je 0xc1d3e
cmpl $0x4c495354, %ecx       # imm = 0x4C495354
jne 0xc1d49
leaq 0x7872a(%rip), %rcx     # 0x13a44b
jmp 0xc1d45
leaq 0x54498(%rip), %rcx     # 0x1161c2
jmp 0xc1d45
leaq 0x78708(%rip), %rcx     # 0x13a43b
jmp 0xc1d45
leaq 0x502b1(%rip), %rcx     # 0x111fed
jmp 0xc1d45
leaq 0x786ff(%rip), %rcx     # 0x13a444
movq %rcx, 0x58(%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: my_on_container_end_fn
static int my_on_container_end_fn(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;

	if(ictx->curr_container_contentstype4cc.id==CODE_movi &&
		d->in_movi && ictx->level==d->in_movi_level)
	{
		d->in_movi = 0;
	}

	return 1;
}

// Assembly:
cmpl $0x6d6f7669, 0xfc(%rdi) # imm = 0x6D6F7669
jne 0xc2335
movq 0x10(%rdi), %rax
cmpb $0x0, 0xe(%rax)
je 0xc2335
movl 0x64(%rdi), %ecx
cmpl 0x10(%rax), %ecx
jne 0xc2335
movb $0x0, 0xe(%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: do_DISP
static void do_DISP(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	unsigned int ty;
	i64 dpos, dlen;

	if(!ictx->is_le) return;
	if(len<4) return;
	ty = (unsigned int)de_getu32le(pos);
	de_dbg(c, "data type: %u (%s)", ty,
		fmtutil_get_windows_cb_data_type_name(ty));

	dpos = pos+4;
	dlen = len-4;
	switch(ty) {
	case 1:
	case 7:
		do_DISP_TEXT(c, d, ictx, dpos, dlen);
		break;
	case 8:
	case 17:
		do_DISP_DIB(c, d, ictx, dpos, dlen);
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x4, %rcx
jl 0xc2422
movq %rsi, %r15
cmpl $0x0, 0x58(%rsi)
je 0xc2422
movq %rcx, %r12
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xeed61
movq %rax, %r13
movl %r13d, %edi
callq 0xf8eb5
leaq 0x503a7(%rip), %rsi     # 0x11272d
movq %r14, %rdi
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
addq $0x4, %rbx
addq $-0x4, %r12
cmpl $0x7, %r13d
jg 0xc2410
cmpl $0x1, %r13d
je 0xc23b0
cmpl $0x7, %r13d
jne 0xc2422
movq 0x18(%r15), %rdi
leaq 0x8(%rsp), %r13
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0xefa77
movq (%r13), %r13
subq %rbx, %r13
testl %eax, %eax
cmoveq %r12, %r13
leaq 0x57351(%rip), %rsi     # 0x11972e
movq %r14, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
testq %r13, %r13
jle 0xc2422
movq 0x18(%r15), %rdi
leaq 0x78068(%rip), %rcx     # 0x13a462
movq %rbx, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
jmp 0xc2422
cmpl $0x8, %r13d
je 0xc241c
cmpl $0x11, %r13d
jne 0xc2422
cmpq $0xc, %r12
jae 0xc2430
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x70, %esi
movq %r14, %rdi
callq 0xe8b2b
movq %rax, %r13
leaq 0x815f5(%rip), %rax     # 0x143a3c
movq %rax, (%r13)
movl $0x80, 0x8(%r13)
movq 0x18(%r15), %rcx
leaq 0x60fb1(%rip), %rsi     # 0x12340f
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %r8
movq %r12, %r9
callq 0xe9aa3
movq %r14, %rdi
movq %r13, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: extract_ani_frame
static void extract_ani_frame(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	u8 buf[4];
	const char *ext;

	de_dbg(c, "frame at %d, len=%d", (int)pos, (int)len);

	de_read(buf, pos, 4);

	// Try to identify the format of this frame.
	if(!de_memcmp(buf, "\x00\x00\x01\x00", 4)) {
		ext = "ico";
	}
	else if(!de_memcmp(buf, "\x00\x00\x02\x00", 4)) {
		ext = "cur";
	}
	else {
		ext = "bin";
	}

	dbuf_create_file_from_slice(ictx->f, pos, len, ext, NULL, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x77fc9(%rip), %rsi     # 0x13a46b
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r12), %rdi
leaq 0x4(%rsp), %r12
movl $0x4, %ecx
movq %r12, %rsi
movq %r14, %rdx
callq 0xee8d4
cmpl $0x10000, (%r12)        # imm = 0x10000
je 0xc24e9
cmpl $0x20000, 0x4(%rsp)     # imm = 0x20000
leaq 0x5aeb7(%rip), %rax     # 0x11d393
leaq 0x732da(%rip), %rcx     # 0x1357bd
cmoveq %rax, %rcx
jmp 0xc24f0
leaq 0x5ec69(%rip), %rcx     # 0x121159
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xefd48
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: do_palette
static void do_palette(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	i64 ver;
	i64 n;
	i64 i;
	u8 r,g,b,flags;
	u32 clr;
	char tmps[32];

	if(!ictx->is_le) return;
	ver = de_getu16le(pos);
	de_dbg(c, "version: 0x%04x", (unsigned int)ver);
	pos += 2;
	n = de_getu16le(pos);
	de_dbg(c, "number of entries: %d", (int)n);
	pos += 2;
	if(n>(len-4)/4) n=(len-4)/4;
	if(n>1024) n=1024;
	if(n<1) return;

	de_dbg(c, "palette entries at %d", (int)pos);
	de_dbg_indent(c, 1);
	for(i=0; i<n; i++) {
		r = de_getbyte(pos);
		g = de_getbyte(pos+1);
		b = de_getbyte(pos+2);
		flags = de_getbyte(pos+3);
		pos += 4;
		clr = DE_MAKE_RGB(r, g, b);
		de_snprintf(tmps, sizeof(tmps), " flags=0x%02x", (unsigned int)flags);
		de_dbg_pal_entry2(c, i, clr, NULL, NULL, tmps);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
testl %esi, %esi
je 0xc268c
movq %rcx, %r15
movq %rdx, %r14
movq 0x8(%rsp), %rbx
movq 0x18(%rbx), %rdi
movq %rdx, %rsi
callq 0xeebc8
leaq 0x72eaf(%rip), %rsi     # 0x1353f9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
leaq 0x2(%r14), %rsi
movq 0x18(%rbx), %rdi
callq 0xeebc8
movq %rax, %r12
leaq 0x54511(%rip), %rsi     # 0x116a7e
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
leaq -0x4(%r15), %rax
decq %r15
testq %rax, %rax
cmovnsq %rax, %r15
sarq $0x2, %r15
cmpq %r15, %r12
cmovlq %r12, %r15
movl $0x400, %r12d           # imm = 0x400
cmpq %r12, %r15
cmovlq %r15, %r12
testq %r15, %r15
jle 0xc268c
addq $0x4, %r14
leaq 0x77ecb(%rip), %rsi     # 0x13a47f
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
xorl %r13d, %r13d
movq 0x8(%rsp), %r15
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xeead3
movb %al, 0x7(%rsp)
movq 0x18(%r15), %rdi
leaq 0x1(%r14), %rsi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%r15), %rdi
leaq 0x2(%r14), %rsi
callq 0xeead3
movq %r12, %rbx
movl %eax, %r12d
movq 0x18(%r15), %rdi
leaq 0x3(%r14), %rsi
callq 0xeead3
movzbl 0x7(%rsp), %ecx
shll $0x10, %ecx
movzbl %bpl, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl %r12b, %ebp
movq %rbx, %r12
orl %edx, %ebp
orl $0xff000000, %ebp       # imm = 0xFF000000
movzbl %al, %ecx
movl $0x20, %esi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5b91c(%rip), %rdx     # 0x11df6d
xorl %eax, %eax
callq 0xe8193
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0xe90a3
incq %r13
addq $0x4, %r14
cmpq %r13, %r12
jne 0xc25db
movq 0x8(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: do_RDIB_data
static void do_RDIB_data(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	de_finfo *fi = NULL;

	if(!ictx->chunkctx->parent) goto done;
	if(ictx->chunkctx->parent->user_flags & 0x1) goto done; // Extraction suppressed, or already done
	ictx->chunkctx->parent->user_flags |= 0x1;

	fi = de_finfo_create(c);
	if(ucstring_isnonempty(d->INAM_data)) {
		// In CorelMOVE format, at least, the INAM chunk seems to have a usable
		// name for the RDIB bitmap.
		de_finfo_set_name_from_ucstring(c, fi, d->INAM_data, 0);
		ucstring_empty(d->INAM_data);
	}
	do_extract_raw(c, d, ictx, pos, len, "bmp", fi, 0);
done:
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x128(%rdx), %rax
movq 0x50(%rax), %rax
testq %rax, %rax
je 0xc2723
movq %rcx, %r15
movl 0x60(%rax), %ecx
testb $0x1, %cl
jne 0xc2723
movq %r8, %r14
movq %rdx, %r13
movq %rsi, %rbp
orl $0x1, %ecx
movl %ecx, 0x60(%rax)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r12
movq 0x18(%rbp), %rdi
callq 0xf67a3
testl %eax, %eax
je 0xc2705
movq 0x18(%rbp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0xea53f
movq 0x18(%rbp), %rdi
callq 0xf6423
movq 0x18(%r13), %rdi
leaq 0x5ea52(%rip), %rcx     # 0x121162
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xefd48
jmp 0xc2726
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea50e
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: do_avi_avih
static void do_avi_avih(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	i64 n, n2;

	if(len<40) return;
	n = de_getu32le(pos);
	de_dbg(c, "microseconds/frame: %u", (unsigned int)n);
	n = de_getu32le(pos+12);
	de_dbg(c, "flags: 0x%08x", (unsigned int)n);
	n = de_getu32le(pos+16);
	de_dbg(c, "number of frames: %u", (unsigned int)n);
	n = de_getu32le(pos+24);
	de_dbg(c, "number of streams: %u", (unsigned int)n);
	n = de_getu32le(pos+32);
	n2 = de_getu32le(pos+36);
	de_dbg_dimensions(c, n, n2);
	// TODO: There are more fields in this chunk.
}

// Assembly:
cmpq $0x28, %rdx
jge 0xc277b
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xeed61
leaq 0x77da6(%rip), %rsi     # 0x13a53c
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0xc(%r14), %rsi
callq 0xeed61
leaq 0x64078(%rip), %rsi     # 0x12682e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x10(%r14), %rsi
callq 0xeed61
leaq 0x77d7d(%rip), %rsi     # 0x13a553
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x18(%r14), %rsi
callq 0xeed61
leaq 0x77d72(%rip), %rsi     # 0x13a568
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x20(%r14), %rsi
callq 0xeed61
movq %rax, %r15
movq 0x18(%rbx), %rdi
addq $0x24, %r14
movq %r14, %rsi
callq 0xeed61
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xe8f88
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: do_avi_strh
static void do_avi_strh(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos, i64 len)
{
	struct de_fourcc type4cc;
	struct de_fourcc codec4cc;

	if(len<8) return;

	dbuf_read_fourcc(ictx->f, pos, &type4cc, 4, 0x0);
	de_dbg(c, "stream type: '%s'", type4cc.id_dbgstr);
	// Hack. TODO: Need a better way to track state.
	d->curr_avi_stream_type = type4cc.id;

	dbuf_read_fourcc(ictx->f, pos+4, &codec4cc, 4, 0x0);
	de_dbg(c, "codec: '%s'", codec4cc.id_dbgstr);

	// TODO: There are more fields here.
}

// Assembly:
cmpq $0x8, %r8
jl 0xc28d1
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdx), %rdi
leaq 0x30(%rsp), %rdx
movq %rcx, %rsi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x40(%rsp), %r13
leaq 0x77d01(%rip), %rsi     # 0x13a57e
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe8617
movl -0xc(%r13), %eax
movl %eax, 0x8(%r12)
movq 0x18(%r15), %rdi
addq $0x4, %r14
movq %rsp, %rdx
movq %r14, %rsi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x10(%rsp), %rdx
leaq 0x77cd6(%rip), %rsi     # 0x13a590
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: decode_WAVEFORMATEX
static void decode_WAVEFORMATEX(deark *c, lctx *d, struct de_iffctx *ictx, i64 pos1, i64 len)
{
	unsigned int formattag;
	i64 n;
	i64 pos = pos1;

	if(!ictx->is_le) goto done;
	if(len<14) goto done;

	formattag = (unsigned int)dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "FormatTag: 0x%04x (%s)", formattag, get_wav_fmt_name(formattag));
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "Channels: %u", (unsigned int)n);
	n = dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "SamplesPerSec: %u", (unsigned int)n);
	n = dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "AvgBytesPerSec: %u", (unsigned int)n);
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "BlockAlign: %u", (unsigned int)n);
	if(len<16) goto done;
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "BitsPerSample: %u", (unsigned int)n);
	if(len<18) goto done;
	n = dbuf_getu16le_p(ictx->f, &pos);
	de_dbg(c, "cbSize: %u", (unsigned int)n);

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
cmpq $0xe, %rcx
jl 0xc2a73
movq %rsi, %r14
cmpl $0x0, 0x58(%rsi)
je 0xc2a73
movq %rcx, %r15
movq %rdi, %rbx
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
leaq 0x69805(%rip), %rcx     # 0x12c151
cmpl $0x4f, %eax
jle 0xc296b
cmpl $0x50, %eax
je 0xc297e
cmpl $0x55, %eax
je 0xc2987
cmpl $0xfffe, %eax           # imm = 0xFFFE
jne 0xc2997
leaq 0x77bb2(%rip), %rcx     # 0x13a51b
jmp 0xc2997
cmpl $0x1, %eax
je 0xc2990
cmpl $0x2, %eax
jne 0xc2997
leaq 0x77b8e(%rip), %rcx     # 0x13a50a
jmp 0xc2997
leaq 0x6a34e(%rip), %rcx     # 0x12ccd3
jmp 0xc2997
leaq 0x77b82(%rip), %rcx     # 0x13a510
jmp 0xc2997
leaq 0x77b75(%rip), %rcx     # 0x13a50c
leaq 0x77af7(%rip), %rsi     # 0x13a495
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xeebeb
leaq 0x77aec(%rip), %rsi     # 0x13a4ac
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed83
leaq 0x77ada(%rip), %rsi     # 0x13a4b9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed83
leaq 0x77acd(%rip), %rsi     # 0x13a4cb
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
leaq 0x77ac1(%rip), %rsi     # 0x13a4de
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
cmpq $0x10, %r15
jb 0xc2a73
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
leaq 0x77aab(%rip), %rsi     # 0x13a4ed
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
cmpq $0x12, %r15
jb 0xc2a73
movq 0x18(%r14), %rdi
movq %rsp, %rsi
callq 0xeebeb
leaq 0x77a98(%rip), %rsi     # 0x13a4ff
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/riff.c
// Function: my_handle_nonchunk_riff_data_fn
static int my_handle_nonchunk_riff_data_fn(struct de_iffctx *ictx,
	i64 pos, i64 *plen)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;

	if(d->cmx_parse_hack) {
		return do_cmx_parse_hack(c, d, ictx, pos, plen);
	}
	else if(d->cmv_parse_hack) {
		return do_cmv_parse_hack(c, d, ictx, pos, plen);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %r15
movq 0x10(%rdi), %rax
cmpb $0x0, 0xc(%rax)
je 0xc2b29
movq 0x18(%r12), %rdi
movq %r14, %rsi
callq 0xeebc8
cmpq $0x101, %rax            # imm = 0x101
setge %cl
testq %rax, %rax
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0xc2b85
movq %rax, %rdi
callq 0xe9c7e
movq %rax, %r13
leaq (%rax,%r14), %rdx
movq 0x18(%r12), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %ecx
callq 0xee8d4
xorl %eax, %eax
movb 0x4(%rsp,%rax), %cl
addb $-0x7f, %cl
cmpb $-0x60, %cl
jbe 0xc2b83
incq %rax
cmpq $0x4, %rax
jne 0xc2aef
leaq 0x77b11(%rip), %rsi     # 0x13a620
movq %r15, %rdi
movl %r13d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r13, (%rbx)
movl $0x1, %ebp
jmp 0xc2b85
xorl %ebp, %ebp
cmpb $0x0, 0xd(%rax)
je 0xc2b85
cmpl $0x0, 0x64(%r12)
jne 0xc2b85
movq 0x18(%r12), %rdi
movq %r14, %rsi
callq 0xeed0d
testq %rax, %rax
jne 0xc2b85
movq 0x18(%r12), %rdi
leaq 0x4(%r14), %rsi
callq 0xeed0d
cmpq $0x52494646, %rax       # imm = 0x52494646
jne 0xc2b85
leaq 0x77ab8(%rip), %rsi     # 0x13a620
movq %r15, %rdi
movl $0x4, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq $0x4, (%rbx)
jmp 0xc2b22
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rosprite.c
// Function: de_module_rosprite
void de_module_rosprite(deark *c, struct deark_module_info *mi)
{
	mi->id = "rosprite";
	mi->desc = "RISC OS Sprite, a.k.a. Acorn Sprite";
	mi->run_fn = de_run_rosprite;
	mi->identify_fn = de_identify_rosprite;
}

// Assembly:
leaq 0x77ac1(%rip), %rax     # 0x13a660
movq %rax, (%rsi)
leaq 0x77ac0(%rip), %rax     # 0x13a669
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc2bc4
movq %rax, 0x18(%rsi)
leaq 0xd7c(%rip), %rax       # 0xc393b
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rosprite.c
// Function: de_identify_rosprite
static int de_identify_rosprite(deark *c)
{
	i64 num_images, first_sprite_offset, implied_file_size;
	i64 offset2;

	num_images = de_getu32le(0);
	if(num_images<1 || num_images>1000) return 0;

	first_sprite_offset = de_getu32le(4) - 4;
	// I've only ever seen this be 12 or (rarely) 28, though it's legal
	// for it to have other values
	if(first_sprite_offset!=12 && first_sprite_offset!=28) return 0;
	if(first_sprite_offset+48 > c->infile->len) return 0;

	implied_file_size = de_getu32le(8) - 4;
	if(implied_file_size > c->infile->len) return 0;

	if(num_images!=1) {
		// TODO?: A multi-sprite file with extra junk at EOF will not be detected.
		// To better detect multi-sprite files, we'd probably have to walk through
		// the file.
		if(implied_file_size != c->infile->len) return 0;
		return 55;
	}

	offset2 = de_getu32le(first_sprite_offset);
	if(offset2==implied_file_size && implied_file_size==c->infile->len) {
		// Found some bad files where this pointer is absolute when it should be
		// relative.
		return 15;
	}
	offset2 += first_sprite_offset;
	if(offset2 != implied_file_size) return 0;
	if(implied_file_size == c->infile->len) return 80;
	return 30;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeed61
movq %rax, %r13
addq $-0x3e9, %rax           # imm = 0xFC17
cmpq $-0x3e8, %rax           # imm = 0xFC18
jb 0xc3a12
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeed61
leaq -0x4(%rax), %r15
movq %r15, %rcx
andq $-0x11, %rcx
cmpq $0xc, %rcx
jne 0xc3a12
addq $0x2c, %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jg 0xc3a12
movl $0x8, %esi
callq 0xeed61
movq %rax, %r12
addq $-0x4, %r12
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rax
cmpq %rax, %r12
jg 0xc3a12
cmpq $0x1, %r13
jne 0xc3a03
movq %r15, %rsi
callq 0xeed61
cmpq %r12, %rax
jne 0xc39dc
movq 0x18(%rbx), %rcx
movl $0xf, %r14d
cmpq 0x18(%rcx), %r12
je 0xc3a12
addq %r15, %rax
movl $0x0, %r14d
cmpq %r12, %rax
jne 0xc3a12
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %r12
movl $0x50, %eax
movl $0x1e, %r14d
cmovel %eax, %r14d
jmp 0xc3a12
xorl %ecx, %ecx
cmpq %rax, %r12
movl $0x37, %r14d
cmovnel %ecx, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rosprite.c
// Function: getpal256
static de_color getpal256(int k)
{
	u8 r, g, b;
	if(k<0 || k>255) return 0;
	r = k%8 + ((k%32)/16)*8;
	g = k%4 + ((k%128)/32)*4;
	b = (u8)(k%4 + ((k%16)/8)*4 + (k/128)*8);
	r = (r<<4)|r;
	g = (g<<4)|g;
	b = (b<<4)|b;
	return DE_MAKE_RGB(r,g,b);
}

// Assembly:
xorl %eax, %eax
cmpl $0xff, %edi
ja 0xc3a71
movl %edi, %eax
andl $0x7, %eax
movl %edi, %ecx
shrl %ecx
movl %ecx, %edx
andl $0x8, %edx
orl %eax, %edx
movl %edi, %eax
andl $0x3, %eax
movl %edi, %esi
shrl $0x3, %esi
andl $0xc, %esi
orl %eax, %esi
andl $0x4, %ecx
shrl $0x4, %edi
andl $0x8, %edi
orl %ecx, %edi
orl %eax, %edi
movl %edi, %eax
shll $0x4, %eax
orl %edi, %eax
imull $0x110000, %edx, %ecx   # imm = 0x110000
imull $0x1100, %esi, %edx     # imm = 0x1100
orl %ecx, %edx
addl %edx, %eax
addl $0xff000000, %eax       # imm = 0xFF000000
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rpm.c
// Function: de_module_rpm
void de_module_rpm(deark *c, struct deark_module_info *mi)
{
	mi->id = "rpm";
	mi->desc = "RPM Package Manager";
	mi->run_fn = de_run_rpm;
	mi->identify_fn = de_identify_rpm;
}

// Assembly:
leaq 0x7702d(%rip), %rax     # 0x13aaa8
movq %rax, (%rsi)
leaq 0x77027(%rip), %rax     # 0x13aaac
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc3aa0
movq %rax, 0x18(%rsi)
leaq 0x2ed(%rip), %rax       # 0xc3d88
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: de_module_rsc
void de_module_rsc(deark *c, struct deark_module_info *mi)
{
	mi->id = "rsc";
	mi->desc = "GEM resource file";
	mi->run_fn = de_run_rsc;
	mi->identify_fn = de_identify_rsc;
	mi->help_fn = de_help_rsc;
}

// Assembly:
leaq 0x76a83(%rip), %rax     # 0x13ac5a
movq %rax, (%rsi)
leaq 0x76a7d(%rip), %rax     # 0x13ac5e
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc4207
movq %rax, 0x18(%rsi)
leaq 0x11a5(%rip), %rax      # 0xc539c
movq %rax, 0x20(%rsi)
leaq 0x11d3(%rip), %rax      # 0xc53d5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: is_valid_segment_pos
static int is_valid_segment_pos(deark *c, lctx *d, i64 pos, i64 len, const char *name)
{
	int ok_start = 1;
	int ok_end = 1;

	if(pos<36 && len>0) ok_start = 0;
	if(pos>d->avail_file_size) ok_start = 0;
	if(!d->allow_unaligned_offsets && (pos%2)) ok_start = 0;
	if(pos+len > d->avail_file_size) ok_end = 0;

	if(ok_start && ok_end) return 1;
	if(ok_start && !ok_end && len>=2) {
		de_err(c, "Invalid %s location: %"I64_FMT"-%"I64_FMT, name, pos, pos+len-1);
	}
	else {
		de_err(c, "Invalid %s location: %"I64_FMT, name, pos);
	}
	return 0;
}

// Assembly:
pushq %rbx
cmpq $0x24, %rcx
setge %al
testq %r8, %r8
setle %r10b
orb %al, %r10b
cmpq %rcx, %rdx
setge %al
andb %r10b, %al
testb %sil, %sil
setne %r10b
testb $0x1, %cl
sete %sil
orb %r10b, %sil
andb %al, %sil
leaq (%r8,%rcx), %rax
cmpq %rdx, %rax
jg 0xc5425
movl $0x1, %ebx
testb %sil, %sil
jne 0xc5464
cmpq %rdx, %rax
jle 0xc5451
cmpq $0x2, %r8
jl 0xc5451
xorb $0x1, %sil
jne 0xc5451
decq %rax
leaq 0x75947(%rip), %rsi     # 0x13ad87
xorl %ebx, %ebx
movq %r9, %rdx
movq %rax, %r8
xorl %eax, %eax
callq 0xe9295
jmp 0xc5464
leaq 0x7594c(%rip), %rsi     # 0x13ada4
xorl %ebx, %ebx
movq %r9, %rdx
xorl %eax, %eax
callq 0xe9295
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: do_decode_bilevel_image
static void do_decode_bilevel_image(deark *c, lctx *d, de_bitmap *img, i64 bits_pos,
	i64 rowspan)
{
	i64 i, j;
	i64 rowspan_in_16bit_chunks;
	UI k;
	UI n;

	rowspan_in_16bit_chunks = (rowspan+1)/2;

	for(j=0; j<img->height; j++) {
		for(i=0; i<rowspan_in_16bit_chunks; i++) {
			n = (UI)gem_getu16(d, bits_pos + j*rowspan + i*2);
			for(k=0; k<16; k++) {
				u8 clr;

				clr = (n & (1U<<(15-k))) ? 0 : 0xff;
				de_bitmap_setpixel_gray(img, i*16+(i64)k, j, clr);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x10(%rsi), %rax
testq %rax, %rax
jle 0xc5553
movq %rsi, %r15
leaq 0x1(%rcx), %rdx
shrq $0x3f, %rdx
addq %rcx, %rdx
incq %rdx
sarq %rdx
cmpq $0x2, %rdx
movl $0x1, %esi
cmovgeq %rdx, %rsi
movq %rsi, 0x18(%rsp)
xorl %r13d, %r13d
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
jle 0xc5547
movq %r13, %rax
imulq %rcx, %rax
addq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
leaq (%rax,%r12,2), %rsi
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movl 0x10(%rcx), %edx
movq 0x18(%rax), %rdi
callq 0xeef43
movq %rax, %rbp
movl $0x10, %ebx
movq %r14, 0x30(%rsp)
decq %rbx
btl %ebx, %ebp
movl $0x0, %eax
adcb $-0x1, %al
movzbl %al, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xf2405
incq %r14
testq %rbx, %rbx
jne 0xc5505
incq %r12
movq 0x30(%rsp), %r14
addq $0x10, %r14
cmpq 0x18(%rsp), %r12
jne 0xc54db
movq 0x10(%r15), %rax
movq 0x8(%rsp), %rcx
incq %r13
cmpq %rax, %r13
jl 0xc54bb
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: do_scan_iconblk
static int do_scan_iconblk(deark *c, lctx *d, i64 pos1, struct iconinfo *ii)
{
	i64 pos;

	// TODO: Refactor this code to better share it with old- and new-style RSC.

	pos = pos1;
	ii->width = gem_getu16(d, pos+22);
	ii->height = gem_getu16(d, pos+24);
	de_dbg_dimensions(c, ii->width, ii->height);
	if(ii->width<1 || ii->width>MAX_RSC_ICON_WIDTH ||
		ii->height<1 || ii->height>MAX_RSC_ICON_HEIGHT)
	{
		de_dbg(c, "bad or unexpected icon dimensions");
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x16(%rdx), %rsi
movq (%r12), %rax
movl 0x10(%r12), %edx
movq 0x18(%rax), %rdi
callq 0xeef43
movq %rax, (%r14)
addq $0x18, %r15
movq (%r12), %rax
movl 0x10(%r12), %edx
movq 0x18(%rax), %rdi
movq %r15, %rsi
callq 0xeef43
movq %rax, 0x8(%r14)
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe8f88
movq $-0x401, %rax           # imm = 0xFBFF
movq (%r14), %rcx
addq %rax, %rcx
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0xc55e1
movq 0x8(%r14), %rcx
addq %rax, %rcx
movl $0x1, %ebp
cmpq %rax, %rcx
ja 0xc55f4
leaq 0x759a9(%rip), %rsi     # 0x13af91
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: do_bilevel_icon
static void do_bilevel_icon(deark *c, lctx *d, struct iconinfo *ii, i64 fg_pos,
	i64 mask_pos, const char *token)
{
	de_bitmap *img = NULL;
	de_bitmap *mask = NULL;
	de_finfo *fi = NULL;

	if(!is_valid_segment_pos(c, d, fg_pos, ii->height*ii->mono_rowspan, "bitmap")) {
		goto done;
	}
	if(!is_valid_segment_pos(c, d, mask_pos, ii->height*ii->mono_rowspan, "mask")) {
		goto done;
	}
	if(!de_good_image_dimensions(c, ii->width, ii->height)) {
		goto done;
	}

	img = de_bitmap_create(c, ii->width, ii->height, 2);
	mask = de_bitmap_create(c, ii->width, ii->height, 1);
	do_decode_bilevel_image(c, d, img, fg_pos, ii->mono_rowspan);
	do_decode_bilevel_image(c, d, mask, mask_pos, ii->mono_rowspan);
	de_bitmap_apply_mask(img, mask, DE_BITMAPFLAG_WHITEISTRNS);
	fi = de_finfo_create(c);
	set_icon_finfo(c, d, fi, ii, token);
	de_bitmap_write_to_file_finfo(img, fi, DE_CREATEFLAG_OPT_IMAGE);

done:
	de_bitmap_destroy(img);
	de_bitmap_destroy(mask);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x10(%rdx), %r8
imulq 0x8(%rdx), %r8
movq 0x80(%rsi), %rdx
movzbl 0x15(%rsi), %esi
leaq 0x52380(%rip), %r9      # 0x1179b4
callq 0xc53e3
testl %eax, %eax
je 0xc5722
movq 0x10(%r14), %r8
imulq 0x8(%r14), %r8
movq 0x80(%r12), %rdx
movzbl 0x15(%r12), %esi
leaq 0x80a1e(%rip), %r9      # 0x14607d
movq %rbx, %rdi
movq %r15, %rcx
callq 0xc53e3
testl %eax, %eax
je 0xc5722
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xf1db1
testl %eax, %eax
je 0xc5722
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movl $0x2, %ecx
callq 0xf266a
movq %rax, %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0xf266a
movq %r15, (%rsp)
movq %rax, %r15
movq 0x10(%r14), %rcx
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xc5468
movq 0x10(%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0xc5468
movq %rbp, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xf37bd
movq %rbx, %rdi
callq 0xea504
movq %rax, %r12
leaq 0x6dd33(%rip), %rcx     # 0x133435
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xc5783
movq %rbp, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0xf22d0
jmp 0xc572a
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rbp, %rdi
callq 0xf228d
movq %r15, %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea50e
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: destroy_iconinfo
static void destroy_iconinfo(deark *c, struct iconinfo *ii)
{
	if(!ii) return;
	if(ii->icon_text) {
		ucstring_destroy(ii->icon_text);
	}
	de_free(c, ii);
}

// Assembly:
testq %rsi, %rsi
je 0xc5782
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0xc5770
callq 0xf6753
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/rsc.c
// Function: set_icon_finfo
static void set_icon_finfo(deark *c, lctx *d, de_finfo *fi, struct iconinfo *ii,
	const char *token)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);

	if(ucstring_isnonempty(ii->icon_text)) {
		ucstring_append_ucstring(s, ii->icon_text);
	}

	if(token) {
		if(ucstring_isnonempty(s)) {
			ucstring_append_char(s, '.');
		}
		ucstring_append_sz(s, token, DE_ENCODING_UTF8);
	}

	de_finfo_set_name_from_ucstring(c, fi, s, 0x0);
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
callq 0xf6410
movq %rax, %r14
movq 0x20(%r13), %rdi
callq 0xf67a3
testl %eax, %eax
je 0xc57b9
movq 0x20(%r13), %rsi
movq %r14, %rdi
callq 0xf6509
testq %r12, %r12
je 0xc57e7
movq %r14, %rdi
callq 0xf67a3
testl %eax, %eax
je 0xc57d7
movq %r14, %rdi
movl $0x2e, %esi
callq 0xf6542
movq %r14, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0xf65e3
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xea53f
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/shg.c
// Function: de_module_shg
void de_module_shg(deark *c, struct deark_module_info *mi)
{
	mi->id = "shg";
	mi->desc = "SHG (Segmented Hypergraphics), MRB (Multiple Resolution Bitmap)";
	mi->run_fn = de_run_shg;
	mi->identify_fn = de_identify_shg;
}

// Assembly:
leaq 0x5b6b1(%rip), %rax     # 0x121150
movq %rax, (%rsi)
leaq 0x75837(%rip), %rax     # 0x13b2e0
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc5ac4
movq %rax, 0x18(%rsi)
leaq 0xae1(%rip), %rax       # 0xc65a0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/shg.c
// Function: dfilter_shgrle_codec
static void dfilter_shgrle_codec(struct de_dfilter_ctx *dfctx, void *codec_private_params)
{
	struct rlectx *rctx = NULL;

	rctx = de_malloc(dfctx->c, sizeof(struct rlectx));
	rctx->outf = dfctx->dcmpro->f;

	dfctx->codec_private = (void*)rctx;
	dfctx->codec_finish_fn = my_shgrle_codec_finish;
	dfctx->codec_destroy_fn = my_shgrle_codec_destroy;
	dfctx->codec_addbuf_fn = my_shgrle_codec_addbuf;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x28, %esi
callq 0xe8b2b
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq %rax, 0x28(%rbx)
leaq 0x1c(%rip), %rax        # 0xc6813
movq %rax, 0x40(%rbx)
leaq 0x26(%rip), %rax        # 0xc6828
movq %rax, 0x48(%rbx)
leaq 0x2a(%rip), %rax        # 0xc6837
movq %rax, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/shg.c
// Function: my_shgrle_codec_addbuf
static void  my_shgrle_codec_addbuf(struct de_dfilter_ctx *dfctx,
	const u8 *buf, i64 buf_len)
{
	i64 k;
	struct rlectx *rctx = (struct rlectx*)dfctx->codec_private;

	for(k=0; k<buf_len; k++) {
		if(rctx->uncompressed_run_bytes_left>0) {
			dbuf_writebyte(rctx->outf, buf[k]);
			rctx->uncompressed_run_bytes_left--;
			rctx->nbytes_consumed++;
			continue;
		}

		if(rctx->compressed_run_pending) {
			dbuf_write_run(rctx->outf, buf[k], rctx->compressed_run_count);
			rctx->compressed_run_pending = 0;
			rctx->nbytes_consumed += 2;
			continue;
		}

		if(buf[k] & 0x80) { // beginning of uncompressed run
			rctx->uncompressed_run_bytes_left = (i64)(buf[k] & 0x7f);
			rctx->nbytes_consumed++;
			continue;
		}

		rctx->compressed_run_count = (i64)buf[k];
		rctx->compressed_run_pending = 1;
	}
}

// Assembly:
testq %rdx, %rdx
jle 0xc68db
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x28(%rdi), %r15
xorl %r12d, %r12d
cmpq $0x0, 0x18(%r15)
jle 0xc687f
movq (%r15), %rdi
movzbl (%r14,%r12), %esi
callq 0xf0bd6
movdqu 0x18(%r15), %xmm0
paddq 0x74a59(%rip), %xmm0    # 0x13b2d0
movdqu %xmm0, 0x18(%r15)
jmp 0xc68c8
cmpl $0x0, 0x8(%r15)
je 0xc68a6
movzbl (%r14,%r12), %esi
movq (%r15), %rdi
movq 0x10(%r15), %rdx
callq 0xf0eba
movl $0x0, 0x8(%r15)
addq $0x2, 0x20(%r15)
jmp 0xc68c8
movzbl (%r14,%r12), %eax
testb %al, %al
js 0xc68bd
movq %rax, 0x10(%r15)
movl $0x1, 0x8(%r15)
jmp 0xc68c8
andl $0x7f, %eax
movq %rax, 0x18(%r15)
incq 0x20(%r15)
incq %r12
cmpq %r12, %rbx
jne 0xc6855
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512u
void de_module_spectrum512u(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512u";
	mi->desc = "Spectrum 512 Uncompressed";
	mi->run_fn = de_run_spectrum512u;
	mi->identify_fn = de_identify_spectrum512u;
	mi->help_fn = de_help_spectrum512u;
}

// Assembly:
leaq 0x74d55(%rip), %rax     # 0x13b638
movq %rax, (%rsi)
leaq 0x74d58(%rip), %rax     # 0x13b645
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc6913
movq %rax, 0x18(%rsi)
leaq 0x6c(%rip), %rax        # 0xc696f
movq %rax, 0x20(%rsi)
leaq 0xb8(%rip), %rax        # 0xc69c6
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512c
void de_module_spectrum512c(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512c";
	mi->desc = "Spectrum 512 Compressed";
	mi->run_fn = de_run_spectrum512c;
	mi->identify_fn = de_identify_spectrum512c;
	mi->help_fn = de_help_spectrum512cs;
}

// Assembly:
leaq 0x74c8d(%rip), %rax     # 0x13b65f
movq %rax, (%rsi)
leaq 0x74c90(%rip), %rax     # 0x13b66c
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc6a02
movq %rax, 0x18(%rsi)
leaq 0x17(%rip), %rax        # 0xc6a09
movq %rax, 0x20(%rsi)
leaq 0x72(%rip), %rax        # 0xc6a6f
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: de_identify_spectrum512c
static int de_identify_spectrum512c(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, "\x53\x50\x00\x00", 4))
		return 0;

	if(de_input_file_has_ext(c, "spc")) {
		return 100;
	}

	if(de_input_file_has_ext(c, "sps")) {
		return 0;
	}

	return 10;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x74d89(%rip), %rdx     # 0x13b7a4
xorl %r14d, %r14d
movl $0x4, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0xc6a64
leaq 0x74d37(%rip), %rsi     # 0x13b76c
movq %rbx, %rdi
callq 0xea491
movl $0x64, %r14d
testl %eax, %eax
jne 0xc6a64
leaq 0x74d22(%rip), %rsi     # 0x13b770
movq %rbx, %rdi
callq 0xea491
xorl %ecx, %ecx
testl %eax, %eax
movl $0xa, %r14d
cmovnel %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: de_module_spectrum512s
void de_module_spectrum512s(deark *c, struct deark_module_info *mi)
{
	mi->id = "spectrum512s";
	mi->desc = "Spectrum 512 Smooshed";
	mi->run_fn = de_run_spectrum512s;
	mi->identify_fn = de_identify_spectrum512s;
	mi->help_fn = de_help_spectrum512cs;
}

// Assembly:
leaq 0x74bf3(%rip), %rax     # 0x13b684
movq %rax, (%rsi)
leaq 0x74bf6(%rip), %rax     # 0x13b691
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc6ac1
movq %rax, 0x18(%rsi)
leaq 0x1a(%rip), %rax        # 0xc6acb
movq %rax, 0x20(%rsi)
leaq -0x4d(%rip), %rax       # 0xc6a6f
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: do_spu_internal
static void do_spu_internal(deark *c, dbuf *inf, int is_enhanced)
{
	struct atari_img_decode_data *adata = NULL;
	de_finfo *fi = NULL;
	static const i64 num_colors = 199*48;

	adata = de_malloc(c, sizeof(struct atari_img_decode_data));
	adata->is_spectrum512 = 1;
	adata->pal = de_mallocarray(c, num_colors, sizeof(u32));
	adata->bpp = 4;
	adata->w = 320;
	adata->h = 199;
	adata->ncolors = num_colors;

	fmtutil_read_atari_palette(c, inf, 32000, adata->pal, num_colors, num_colors,
		is_enhanced?DE_FLAG_ATARI_15BIT_PAL:0);

	adata->unc_pixels = dbuf_open_input_subfile(inf, 160, inf->len-160);
	adata->img = de_bitmap_create(c, adata->w, adata->h, 3);
	fi = de_finfo_create(c);
	fmtutil_atari_set_standard_density(c, adata, fi);
	fmtutil_atari_decode_image(c, adata);
	de_bitmap_write_to_file_finfo(adata->img, fi, 0);

	if(adata) {
		de_bitmap_destroy(adata->img);
		de_free(c, adata->pal);
		dbuf_close(adata->unc_pixels);
		de_free(c, adata);
	}
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
xorl %ebp, %ebp
testl %edx, %edx
setne %bpl
movl $0x40, %esi
callq 0xe8b2b
movq %rax, %r14
movl $0x1, 0x2c(%rax)
movl $0x2550, %esi           # imm = 0x2550
movl $0x4, %edx
movq %rbx, %rdi
callq 0xe96f7
movq %rax, 0x30(%r14)
movq $0x4, (%r14)
movq $0x140, 0x10(%r14)      # imm = 0x140
movq $0xc7, 0x18(%r14)
movq $0x2550, 0x8(%r14)      # imm = 0x2550
addl %ebp, %ebp
movl %ebp, (%rsp)
movl $0x7d00, %edx           # imm = 0x7D00
movl $0x2550, %r8d           # imm = 0x2550
movl $0x2550, %r9d           # imm = 0x2550
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xf876e
movq $-0xa0, %rdx
addq 0x18(%r15), %rdx
movl $0xa0, %esi
movq %r15, %rdi
callq 0xf1388
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, 0x38(%r14)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf8e1c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf8b10
movq 0x38(%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf22d0
movq 0x38(%r14), %rdi
callq 0xf228d
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xe8be2
movq 0x20(%r14), %rdi
callq 0xf052b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xea50e
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/spectrum512.c
// Function: reorder_img_bytes
static void reorder_img_bytes(deark *c, dbuf *src, dbuf *dst, reorder_fn rfn)
{
	i64 i;
	u8 b;

	for(i=0; i<src->len; i++) {
		b = dbuf_getbyte(src, i);
		dbuf_writebyte_at(dst, rfn(i), b);
	}
}

// Assembly:
cmpq $0x0, 0x18(%rdi)
jle 0xc72e0
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xeead3
movl %eax, %ebp
movq %r12, %rdi
callq *%rbx
movzbl %bpl, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xf0e8b
incq %r12
cmpq 0x18(%r15), %r12
jl 0xc72ae
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/sunras.c
// Function: de_module_sunras
void de_module_sunras(deark *c, struct deark_module_info *mi)
{
	mi->id = "sunras";
	mi->desc = "Sun Raster";
	mi->run_fn = de_run_sunras;
	mi->identify_fn = de_identify_sunras;
	mi->help_fn = de_help_sunras;
}

// Assembly:
leaq 0x74431(%rip), %rax     # 0x13b7d0
movq %rax, (%rsi)
leaq 0x7442e(%rip), %rax     # 0x13b7d7
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0xc73cf
movq %rax, 0x18(%rsi)
leaq 0x858(%rip), %rax       # 0xc7c17
movq %rax, 0x20(%rsi)
leaq 0x873(%rip), %rax       # 0xc7c3d
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/t64.c
// Function: de_module_t64
void de_module_t64(deark *c, struct deark_module_info *mi)
{
	mi->id = "t64";
	mi->desc = "T64 (C64 tape format)";
	mi->run_fn = de_run_t64;
	mi->identify_fn = de_identify_t64;
}

// Assembly:
leaq 0x4d869(%rip), %rax     # 0x1154bc
movq %rax, (%rsi)
leaq 0x73da1(%rip), %rax     # 0x13b9fe
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc7c78
movq %rax, 0x18(%rsi)
leaq 0x32c(%rip), %rax       # 0xc7f9f
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: de_module_tar
void de_module_tar(deark *c, struct deark_module_info *mi)
{
	mi->id = "tar";
	mi->desc = "tar archive";
	mi->run_fn = de_run_tar;
	mi->identify_fn = de_identify_tar;
}

// Assembly:
leaq 0x81132(%rip), %rax     # 0x149101
movq %rax, (%rsi)
leaq 0x73b41(%rip), %rax     # 0x13bb1a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0xc7ff4
movq %rax, 0x18(%rsi)
leaq 0xc5a(%rip), %rax       # 0xc8c49
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/tar.c
// Function: de_identify_tar
static int de_identify_tar(deark *c)
{
	int has_ext;
	u8 buf[8];
	i64 k;
	i64 digit_count;

	has_ext = de_input_file_has_ext(c, "tar");;
	if(!dbuf_memcmp(c->infile, 257, "ustar", 5)) {
		return has_ext ? 100 : 90;
	}

	if(has_ext) {
		if(!dbuf_memcmp(c->infile, 508, "tar\0", 4)) {
			return 90;
		}
	}

	// Try to detect tar formats that don't have the "ustar" identifier.
	if(!has_ext) return 0;

	// The 'checksum' field has a fairly distinctive format.
	// "This field should be stored as six octal digits followed by a null and
	// a space character."

	de_read(buf, 148, 8);
	digit_count = 0;
	for(k=0; k<6; k++) {
		if(buf[k]>='0' && buf[k]<='7') {
			digit_count++;
		}
		else if(buf[k]!=' ') {
			return 0;
		}
	}
	if(digit_count<1) return 0;
	if(buf[6]==0x00 && buf[7]==' ') return 60;
	if(buf[6]==' ' && buf[7]==0x00) return 15;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x804ab(%rip), %rsi     # 0x149101
callq 0xea491
movl %eax, %ebp
movq 0x18(%rbx), %rdi
leaq 0x731c5(%rip), %rdx     # 0x13be2d
movl $0x101, %esi            # imm = 0x101
movl $0x5, %ecx
callq 0xefc85
testl %eax, %eax
je 0xc8d13
testl %ebp, %ebp
je 0xc8d0f
movq 0x18(%rbx), %rdi
leaq 0x731b2(%rip), %rdx     # 0x13be44
movl $0x1fc, %esi            # imm = 0x1FC
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
je 0xc8d24
movq 0x18(%rbx), %rdi
movq %rsp, %rsi
movl $0x94, %edx
movl $0x8, %ecx
callq 0xee8d4
xorl %eax, %eax
xorl %ecx, %ecx
movb (%rsp,%rcx), %dl
movl %edx, %esi
andb $-0x8, %sil
cmpb $0x30, %sil
jne 0xc8cd3
incq %rax
jmp 0xc8cd8
cmpb $0x20, %dl
jne 0xc8d0f
incq %rcx
cmpq $0x6, %rcx
jne 0xc8cbf
testq %rax, %rax
jle 0xc8d0f
movb 0x6(%rsp), %cl
movb 0x7(%rsp), %dl
movl %edx, %esi
xorb $0x20, %sil
movl $0x3c, %eax
orb %cl, %sil
je 0xc8d29
xorb $0x20, %cl
xorl %esi, %esi
orb %dl, %cl
movl $0xf, %eax
cmovnel %esi, %eax
jmp 0xc8d29
xorl %eax, %eax
jmp 0xc8d29
testl %ebp, %ebp
movl $0x5a, %ecx
movl $0x64, %eax
cmovel %ecx, %eax
jmp 0xc8d29
movl $0x5a, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq