LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fli.c
// Function: do_chunk_frame
static void do_chunk_frame(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 num_subchunks;
	i64 frame_idx;
	i64 prev_use_count = 0;
	de_finfo *fi = NULL;

	frame_idx = d->frame_count;
	d->frame_count++;
	de_dbg(c, "frame number: %d", (int)frame_idx);

	num_subchunks = de_getu16le(ci->dpos);
	de_dbg(c, "num subchunks: %"I64_FMT, num_subchunks);

	if(ci->ictx) {
		prev_use_count = ci->ictx->use_count;
	}

	do_sequence_of_chunks(c, d, ci, ci->dpos+10, num_subchunks);

	if(ci->ictx) {
		if(ci->ictx->use_count > prev_use_count && !ci->ictx->error_flag) {
			if(d->num_frames>0 && frame_idx==d->num_frames && c->extract_level<2) {
				de_dbg(c, "[not extracting ring frame]");
				goto done;
			}

			fi = de_finfo_create(c);
			fi->density = ci->ictx->density;
			fi->internal_mod_time = d->mod_timestamp;
			de_bitmap_write_to_file_finfo(ci->ictx->img, fi, 0);
		}
	}

done:
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rsi), %r12
leaq 0x1(%r12), %rax
movq %rax, 0x10(%rsi)
leaq 0xc780b(%rip), %rsi     # 0x1222f0
xorl %ebp, %ebp
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x20(%r14), %rsi
callq 0xeebc8
movq %rax, %r13
leaq 0xc77f9(%rip), %rsi     # 0x122301
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x5ab22
movslq 0x10(%rax), %rbp
movq 0x20(%r14), %rcx
addq $0xa, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %r8
callq 0x5b733
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x5ab53
movslq 0x10(%rax), %rcx
cmpq %rcx, %rbp
jge 0x5ab53
cmpl $0x0, 0x14(%rax)
je 0x5ab6f
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
movq 0x8(%r15), %rax
testq %rax, %rax
setle %cl
cmpq %rax, %r12
setne %al
orb %cl, %al
jne 0x5aba2
cmpl $0x1, 0x90(%rbx)
jg 0x5aba2
leaq 0xc7781(%rip), %rsi     # 0x122314
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x5ab56
movq %rbx, %rdi
callq 0xea504
movq %rax, %r12
movq 0x48(%r14), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x88(%r12)
movups 0x18(%rax), %xmm0
movups %xmm0, 0x78(%r12)
movups 0x28(%r15), %xmm0
movups %xmm0, 0x68(%r12)
movq 0x48(%r14), %rax
movq 0x30(%rax), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xf22d0
jmp 0x5ab56
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fli.c
// Function: do_chunk_colormap
static void do_chunk_colormap(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 npackets;
	i64 pknum;
	i64 pos = ci->dpos;
	int bps;
	UI num_entries_total = 0;
	UI next_idx = 0;

	if(!ci->ictx) return;
	if(ci->chunktype==CHUNKTYPE_COLORMAP256)
		bps = 8;
	else
		bps = 6;
	npackets = de_getu16le_p(&pos);

	for(pknum=0; pknum<npackets; pknum++) {
		UI num_entries_to_skip;
		UI num_entries_to_set;
		UI k;

		if(pos >= ci->pos + ci->len)  goto done;
		num_entries_to_skip = (UI)de_getbyte_p(&pos);
		next_idx += num_entries_to_skip;
		num_entries_to_set = (UI)de_getbyte_p(&pos);
		if(num_entries_to_set==0) num_entries_to_set = 256;
		num_entries_total += num_entries_to_set;

		for(k=0; k<num_entries_to_set; k++) {
			u8 samp[3];
			u32 clr;
			UI z;

			for(z=0; z<3; z++) {
				samp[z] = de_getbyte_p(&pos);
				if(bps==6) {
					samp[z] = de_scale_63_to_255(samp[z]);
				}
			}

			clr = DE_MAKE_RGB(samp[0], samp[1], samp[2]);
			if(next_idx < 256) {
				ci->ictx->pal[next_idx] = clr;
				de_dbg_pal_entry(c, (i64)next_idx, clr);
			}
			next_idx++;
		}
	}
done:
	de_dbg(c, "number of entries: %u", num_entries_total);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x20(%rdx), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x48(%rdx)
je 0x5ad50
movq %rdx, %r14
movq %rdi, %rbx
movl (%rdx), %r13d
movq 0x18(%rdi), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeebeb
movq %rax, 0x28(%rsp)
testq %rax, %rax
jle 0x5ad3d
xorl %ecx, %ecx
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
xorl %edx, %edx
movq %r14, 0x20(%rsp)
movq 0x18(%r14), %rax
addq 0x10(%r14), %rax
cmpq %rax, 0x10(%rsp)
jge 0x5ad3f
movq %rcx, 0x30(%rsp)
movl %edx, 0x1c(%rsp)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %eax
addl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %ecx
testb %cl, %cl
movl $0x100, %eax            # imm = 0x100
cmovel %eax, %ecx
movl %ecx, 0xc(%rsp)
testl %ecx, %ecx
je 0x5ad1b
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeeb4b
movb %al, 0x9(%rsp,%r15)
cmpl $0x4, %r13d
je 0x5acc8
movzbl %al, %edi
callq 0xec78a
movb %al, 0x9(%rsp,%r15)
incq %r15
cmpq $0x3, %r15
jne 0x5aca4
cmpl $0xff, %ebp
ja 0x5ad0f
movzbl 0xb(%rsp), %eax
movzbl 0x9(%rsp), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0xa(%rsp), %edx
shll $0x8, %edx
orl %ecx, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movl %ebp, %esi
movl %edx, 0x38(%rax,%rsi,4)
movq %rbx, %rdi
callq 0xe91fc
incl %ebp
incl %r14d
cmpl 0xc(%rsp), %r14d
jne 0x5aca1
movl 0x1c(%rsp), %edx
addl 0xc(%rsp), %edx
movq 0x30(%rsp), %rcx
incq %rcx
cmpq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r14
jne 0x5ac50
jmp 0x5ad3f
xorl %edx, %edx
leaq 0xc75ea(%rip), %rsi     # 0x122330
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
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/fli.c
// Function: do_chunk_rle
static void do_chunk_rle(deark *c, lctx *d, struct chunk_info_type *ci)
{
	i64 xpos = 0;
	i64 ypos = 0;
	i64 pos = ci->dpos;
	struct image_ctx_type *ictx;

	if(!ci->ictx) goto done;
	de_dbg(c, "doing RLE decompression");
	ictx = ci->ictx;
	ictx->use_count++;
	pos++; // First byte of each line is a packet count (not needed)

	while(1) {
		UI clridx;
		u8 code;
		i64 count;
		i64 k;

		if(pos >= ci->pos + ci->len) break;

		code = de_getbyte_p(&pos); // packet type/size
		if(code >= 128) { // "negative" = run of uncompressed pixels
			count = (i64)256 - (i64)code;
			for(k=0; k<count; k++) {
				clridx = (UI)de_getbyte_p(&pos);
				de_bitmap_setpixel_rgb(ictx->img, xpos, ypos, ictx->pal[clridx]);
				xpos++;
			}
		}
		else { // "positive" = RLE
			count = (i64)code;
			clridx = (UI)de_getbyte_p(&pos);
			for(k=0; k<count; k++) {
				de_bitmap_setpixel_rgb(ictx->img, xpos, ypos, ictx->pal[clridx]);
				xpos++;
			}
		}

		if(xpos >= ictx->w) {
			xpos = 0;
			ypos++;
			pos++; // packet count
			if(ypos>=ictx->h) break;
		}
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x48(%rdx)
je 0x5ae7c
movq %rdi, %r14
movq 0x10(%rsp), %r15
movq 0x20(%r15), %rbx
leaq 0xc75b6(%rip), %rsi     # 0x122346
xorl %eax, %eax
callq 0xe8617
movq 0x48(%r15), %rbp
incl 0x10(%rbp)
incq %rbx
movq %rbx, 0x8(%rsp)
movq 0x18(%r15), %rax
addq 0x10(%r15), %rax
cmpq %rax, %rbx
jge 0x5ae7c
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
xorl %r12d, %r12d
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %ebx
testb %al, %al
js 0x5ae08
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
testq %rbx, %rbx
je 0x5ae3b
movzbl %al, %r15d
movq 0x30(%rbp), %rdi
movl 0x38(%rbp,%r15,4), %ecx
movq %r13, %rsi
movq %r12, %rdx
callq 0xf24ba
incq %r13
decq %rbx
jne 0x5adea
jmp 0x5ae3b
orq $-0x100, %rbx
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xeeb4b
movq 0x30(%rbp), %rdi
movzbl %al, %eax
movl 0x38(%rbp,%rax,4), %ecx
movq %r13, %rsi
movq %r12, %rdx
callq 0xf24ba
incq %r13
incq %rbx
jne 0x5ae0f
movq 0x8(%rsp), %rax
cmpq (%rbp), %r13
jge 0x5ae4d
leaq 0x8(%rsp), %r15
jmp 0x5ae66
incq %r12
incq %rax
movq %rax, 0x8(%rsp)
cmpq 0x8(%rbp), %r12
leaq 0x8(%rsp), %r15
jge 0x5ae7c
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
movq 0x18(%rdx), %rcx
addq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jl 0x5adc2
addq $0x18, %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/fli.c
// Function: do_chunk_copy
static void do_chunk_copy(deark *c, lctx *d, struct chunk_info_type *ci)
{
	if(!ci->ictx) return;
	ci->ictx->use_count++;
	de_convert_image_paletted(c->infile, ci->dpos, 8, ci->ictx->w, ci->ictx->pal,
		ci->ictx->img, 0);
}

// Assembly:
movq 0x48(%rdx), %rax
testq %rax, %rax
je 0x5b259
pushq %rax
incl 0x10(%rax)
movq 0x18(%rdi), %rdi
movq 0x20(%rdx), %rsi
leaq 0x38(%rax), %r8
movq (%rax), %rcx
movq 0x30(%rax), %r9
movl $0x0, (%rsp)
movl $0x8, %edx
callq 0xf2f79
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fli.c
// Function: read_timestamp
static void read_timestamp(deark *c, lctx *d, i64 pos, struct de_timestamp *ts,
	const char *name)
{
	i64 datetime_raw;
	i64 date_raw, time_raw;
	struct de_timestamp tmp_timestamp;
	char timestamp_buf[64];

	de_zeromem(ts, sizeof(struct de_timestamp));

	// The timestamp is said to be "MS-DOS formatted", but that's uncomfortably
	// vague, and bogus timestamps seem to be common.

	datetime_raw = de_getu32le_p(&pos);
	de_dbg(c, "%s time: %"I64_FMT, name, datetime_raw);
	if(datetime_raw==0) return;

	de_dbg_indent(c, 1);
	time_raw = datetime_raw & 0xffff;
	date_raw = (datetime_raw >> 16) & 0xffff;

	de_zeromem(&tmp_timestamp, sizeof(struct de_timestamp));
	de_dos_datetime_to_timestamp(&tmp_timestamp, date_raw, time_raw);
	tmp_timestamp.tzcode = DE_TZCODE_LOCAL;
	de_timestamp_to_string(&tmp_timestamp, timestamp_buf, sizeof(timestamp_buf), 0);
	de_dbg(c, "... if DOS time/date: %s", timestamp_buf);

	// Autodesk animator was first released in 1989. Assume timestamps older than
	// the middle of 1988 are bogus.
	if(de_timestamp_to_unix_time(&tmp_timestamp) >= 583718400) {
		*ts = tmp_timestamp;
	}

	de_dbg_indent(c, -1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq 0x18(%rdi), %rdi
movq %rax, %rsi
callq 0xeed83
movq %rax, %r15
leaq 0xc6c92(%rip), %rsi     # 0x122291
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
testq %r15, %r15
je 0x5b699
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movzwl %r15w, %edx
shrl $0x10, %r15d
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0xea92a
movb $0x2, 0x1(%r12)
leaq 0x20(%rsp), %r15
movl $0x40, %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xeaf46
leaq 0xc6c37(%rip), %rsi     # 0x12229e
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
callq 0xeacfd
cmpq $0x22cad600, %rax       # imm = 0x22CAD600
jl 0x5b68c
movaps (%rsp), %xmm0
movups %xmm0, (%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fli.c
// Function: dbg_id
static void dbg_id(deark *c, lctx *d, i64 pos, const char *name)
{
	i64 n;
	struct de_fourcc id4cc;

	n = de_getu32le(pos);
	if(n<0x01000000) {
		de_dbg(c, "%s: %"I64_FMT,name, n);
		return;
	}
	dbuf_read_fourcc(c->infile, pos, &id4cc, 4, 0x0);
	de_dbg(c, "%s: %"I64_FMT" (0x%08x, '%s')", name, n, (UI)n,
		id4cc.id_dbgstr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%rdi), %rdi
callq 0xeed61
movq %rax, %r14
cmpq $0xffffff, %rax         # imm = 0xFFFFFF
jg 0x5b6ef
leaq 0xc6be3(%rip), %rsi     # 0x1222b7
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe8617
movq 0x18(%r15), %rdi
leaq 0x8(%rsp), %rdx
movq %r12, %rsi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x18(%rsp), %r9
leaq 0xc6bab(%rip), %rsi     # 0x1222bf
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe8617
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fli.c
// Function: do_sequence_of_chunks
static void do_sequence_of_chunks(deark *c, lctx *d, struct chunk_info_type *parent_ci,
	i64 pos1, i64 max_nchunks)
{
	i64 pos = pos1;
	i64 endpos = parent_ci->pos + parent_ci->len;
	i64 chunk_idx = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	if(!parent_ci) goto done;
	if(parent_ci->level > 10) goto done;
	if(pos+6 >= endpos) goto done;
	de_dbg(c, "sequence of chunks at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	while(1) {
		i64 bytes_avail;
		i64 bytes_consumed = 0;
		int ret;

		if(max_nchunks>=0 && chunk_idx>=max_nchunks) break;
		bytes_avail = endpos - pos;
		if(bytes_avail<6) break;

		ret = do_chunk(c, d, parent_ci, pos, bytes_avail, parent_ci->level+1, &bytes_consumed);
		if(!ret || bytes_consumed<1) break;
		pos += bytes_consumed;
		chunk_idx++;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
movq 0x18(%rdx), %rbp
addq 0x10(%rdx), %rbp
leaq 0x1c(%rsp), %rsi
callq 0xe8a1c
cmpl $0xb, 0x4(%r12)
setl %al
leaq 0x6(%r15), %rcx
cmpq %rbp, %rcx
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5b816
leaq 0xc6b4d(%rip), %rsi     # 0x1222d6
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq $0x0, 0x10(%rsp)
testq %r14, %r14
je 0x5b816
movl $0x1, %r13d
movq %rbp, %r8
subq %r15, %r8
cmpq $0x6, %r8
jl 0x5b816
movl 0x4(%r12), %r9d
incl %r9d
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x5a2aa
testl %eax, %eax
je 0x5b816
movq 0x10(%rsp), %rax
testq %rax, %rax
jle 0x5b816
testq %r14, %r14
sets %cl
addq %rax, %r15
movq $0x0, 0x10(%rsp)
cmpq %r14, %r13
setl %al
orb %cl, %al
incq %r13
testb %al, %al
jne 0x5b7b7
movl 0x1c(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x28, %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/fli.c
// Function: destroy_image_ctx
static void destroy_image_ctx(deark *c, struct image_ctx_type *ictx)
{
	if(!ictx) return;
	if(ictx->img) {
		de_bitmap_destroy(ictx->img);
	}
	de_free(c, ictx);
}

// Assembly:
testq %rsi, %rsi
je 0x5b860
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdi
testq %rdi, %rdi
je 0x5b84e
callq 0xf228d
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: de_module_fat
void de_module_fat(deark *c, struct deark_module_info *mi)
{
	mi->id = "fat";
	mi->desc = "FAT disk image";
	mi->run_fn = de_run_fat;
	mi->identify_fn = de_identify_fat;
	mi->help_fn = de_help_fat;
}

// Assembly:
leaq 0xb7527(%rip), %rax     # 0x112d92
movq %rax, (%rsi)
leaq 0xc6b5b(%rip), %rax     # 0x1223d0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5b89b
movq %rax, 0x18(%rsi)
leaq 0xa31(%rip), %rax       # 0x5c2bc
movq %rax, 0x20(%rsi)
leaq 0xbe7(%rip), %rax       # 0x5c47d
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: de_module_loaddskf
void de_module_loaddskf(deark *c, struct deark_module_info *mi)
{
	mi->id = "loaddskf";
	mi->desc = "LoadDskF/SaveDskF disk image";
	mi->run_fn = de_run_loaddskf;
	mi->identify_fn = de_identify_loaddskf;
	mi->help_fn = de_help_loaddskf;
}

// Assembly:
leaq 0xc5f37(%rip), %rax     # 0x1223df
movq %rax, (%rsi)
leaq 0xc5f36(%rip), %rax     # 0x1223e8
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5c4d8
movq %rax, 0x18(%rsi)
leaq 0x529(%rip), %rax       # 0x5c9f1
movq %rax, 0x20(%rsi)
leaq 0x566(%rip), %rax       # 0x5ca39
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: do_oem_name
static void do_oem_name(deark *c, lctx *d, i64 pos, i64 len)
{
	struct de_stringreaderdata *srd;
	i64 i;

	srd = dbuf_read_string(c->infile, pos, len, len, 0, DE_ENCODING_ASCII);

	// Require printable ASCII.
	for(i=0; i<len; i++) {
		if(srd->sz[i]<32 || srd->sz[i]>126) {
			goto done;
		}
	}

	de_dbg(c, "OEM name: \"%s\"", ucstring_getpsz_d(srd->str));

done:
	de_destroy_stringreaderdata(c, srd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq %rdx, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xef87c
movq %rax, %r14
testq %r15, %r15
jle 0x5ca88
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
addb $-0x7f, %dl
cmpb $-0x5f, %dl
jb 0x5caa5
incq %rcx
cmpq %rcx, %r15
jne 0x5ca75
movq 0x18(%r14), %rdi
callq 0xf70f6
leaq 0xc5cdf(%rip), %rsi     # 0x122777
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xefaca
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: do_fat_eadata
static void do_fat_eadata(deark *c, lctx *d, struct member_data *md)
{
	int ret;

	if(d->ea_data) goto done;
	d->ea_data = dbuf_create_membuf(c, 0, 0);
	dbuf_set_length_limit(d->ea_data, c->infile->len);
	ret = extract_file_lowlevel(c, d, md, d->ea_data);
	if(!ret) {
		dbuf_close(d->ea_data);
		d->ea_data = NULL;
		goto done;
	}
	de_dbg(c, "[read EA data, len=%"I64_FMT"]", d->ea_data->len);
done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0xa8(%rsi)
je 0x5d537
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0xf09c5
movq %rax, 0xa8(%rbx)
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rsi
movq %rax, %rdi
callq 0xf0a7c
movq 0xa8(%rbx), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5d6ce
movq 0xa8(%rbx), %rdi
testl %eax, %eax
je 0x5d59a
movq 0x18(%rdi), %rdx
leaq 0xc53e1(%rip), %rsi     # 0x12296c
movq %r14, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
callq 0xf052b
movq $0x0, 0xa8(%rbx)
jmp 0x5d531
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: do_extract_file
static void do_extract_file(deark *c, lctx *d, struct member_data *md)
{
	dbuf *outf = NULL;
	de_finfo *fi = NULL;
	de_ucstring *fullfn = NULL;

	if(!md->is_subdir) {
		if(md->filesize > d->num_data_region_clusters * d->bytes_per_cluster) {
			de_err(c, "%s: Bad file size", ucstring_getpsz_d(md->short_fn));
			goto done;
		}
	}

	fi = de_finfo_create(c);
	fullfn = ucstring_create(c);
	de_strarray_make_path(d->curpath, fullfn, DE_MPFLAG_NOTRAILINGSLASH);
	de_finfo_set_name_from_ucstring(c, fi, fullfn, DE_SNFLAG_FULLPATH);
	fi->original_filename_flag = 1;
	if(md->is_subdir) {
		fi->is_directory = 1;
	}
	else if(md->is_volume_label) {
		fi->is_volume_label = 1;
	}
	if(md->mod_time.is_valid) {
		fi->timestamp[DE_TIMESTAMPIDX_MODIFY] = md->mod_time;
	}

	outf = dbuf_create_output_file(c, NULL, fi, 0);

	if(!extract_file_lowlevel(c, d, md, outf)) {
		de_err(c, "%s: File extraction failed", ucstring_getpsz_d(md->short_fn));
		goto done;
	}

done:
	dbuf_close(outf);
	ucstring_destroy(fullfn);
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
cmpb $0x0, 0xb(%rdx)
jne 0x5d5ea
movq 0x28(%r13), %rax
imulq 0x48(%r13), %rax
cmpq %rax, 0x28(%r12)
jle 0x5d5ea
leaq 0xc53d0(%rip), %r13     # 0x1229ad
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x5d68b
movq %rbx, %rdi
callq 0xea504
movq %rax, %r14
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x80(%r13), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xf730d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0xea53f
movb $0x1, 0x8(%r14)
cmpb $0x0, 0xb(%r12)
je 0x5d63b
movb $0x1, 0x9(%r14)
jmp 0x5d648
cmpb $0x0, 0xc(%r12)
je 0x5d648
movb $0x1, 0xa(%r14)
cmpb $0x0, 0x48(%r12)
je 0x5d65d
leaq 0x48(%r12), %rax
movups (%rax), %xmm0
movups %xmm0, 0x18(%r14)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xefda1
movq %rax, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x5d6ce
testl %eax, %eax
jne 0x5d6a5
leaq 0xc5334(%rip), %r13     # 0x1229bf
movq 0x38(%r12), %rdi
callq 0xf70f6
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
movq %rbp, %rdi
callq 0xf052b
movq %r15, %rdi
callq 0xf6753
movq %rbx, %rdi
movq %r14, %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/fat.c
// Function: extract_file_lowlevel
static int extract_file_lowlevel(deark *c, lctx *d, struct member_data *md, dbuf *outf)
{
	int retval = 0;
	i64 cur_cluster;
	i64 nbytes_remaining;

	cur_cluster = md->first_cluster;
	if(md->is_subdir) {
		nbytes_remaining = 0;
	}
	else {
		nbytes_remaining = md->filesize;
	}

	while(1) {
		i64 dpos;
		i64 nbytes_to_copy;

		if(nbytes_remaining <= 0) break;
		if(!is_good_clusternum(d, cur_cluster)) break;
		if(d->cluster_used_flags[cur_cluster]) break;
		d->cluster_used_flags[cur_cluster] = 1;
		if(c->debug_level>=3) de_dbg3(c, "cluster: %d", (int)cur_cluster);
		dpos = clusternum_to_offset(c, d, cur_cluster);
		nbytes_to_copy = de_min_int(d->bytes_per_cluster, nbytes_remaining);
		dbuf_copy(c->infile, dpos, nbytes_to_copy, outf);
		nbytes_remaining -= nbytes_to_copy;
		cur_cluster = (i64)d->fat_nextcluster[cur_cluster];
	}

	if(nbytes_remaining>0) {
		goto done;
	}

	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0xb(%rdx)
je 0x5d6e3
xorl %ebx, %ebx
jmp 0x5d6ff
movq %rcx, %rbp
movq 0x30(%rdx), %r13
movq 0x28(%rdx), %rbx
testq %rbx, %rbx
setle %al
cmpq $0x2, %r13
setl %cl
orb %al, %cl
je 0x5d716
xorl %eax, %eax
testq %rbx, %rbx
setle %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq %rdi, %r14
movq %rbp, (%rsp)
cmpq %r13, 0x78(%r15)
jle 0x5d6ff
movq 0x98(%r15), %rax
cmpb $0x0, (%rax,%r13)
jne 0x5d6ff
movb $0x1, (%rax,%r13)
cmpl $0x3, (%r14)
jl 0x5d753
movq %r14, %rdi
leaq 0xc4dc9(%rip), %rsi     # 0x122512
movl %r13d, %edx
xorl %eax, %eax
callq 0xe889f
movq 0x28(%r15), %rdi
leaq -0x2(%r13), %rbp
imulq %rdi, %rbp
addq 0x40(%r15), %rbp
movq %rbx, %rsi
callq 0xe9c3b
movq %rax, %r12
movq 0x18(%r14), %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq (%rsp), %rcx
callq 0xef481
subq %r12, %rbx
jle 0x5d6ff
movq 0x90(%r15), %rax
movl (%rax,%r13,4), %r13d
cmpl $0x1, %r13d
ja 0x5d720
jmp 0x5d6ff
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: loaddskf_finish_checksum
static void loaddskf_finish_checksum(deark *c, struct skf_ctx *d)
{
	d->checksum_calc = de_crcobj_getval(d->crco);
	de_dbg(c, "checksum (calculated): 0x%08x", (UI)d->checksum_calc);
	if(d->checksum_calc != d->checksum_reported) {
		de_warn(c, "Checksum mismatch (reported 0x%08x, calculated 0x%08x). "
			"Something may have gone wrong.", (UI)d->checksum_reported,
			(UI)d->checksum_calc);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rsi), %rdi
callq 0xeb865
movl %eax, 0x10(%r14)
leaq 0xc5475(%rip), %rsi     # 0x122c33
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl 0xc(%r14), %edx
movl 0x10(%r14), %ecx
cmpl %edx, %ecx
jne 0x5d7de
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xc546c(%rip), %rsi     # 0x122c51
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8faa
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/fat.c
// Function: loaddskf_pad_ima_file
static void loaddskf_pad_ima_file(deark *c, struct skf_ctx *d, dbuf *outf)
{
	i64 num_padding_bytes;
	u8 padding_value;

	dbuf_flush(outf);
	if(d->padded_size<=0) goto done;
	num_padding_bytes = d->padded_size - outf->len;
	if(num_padding_bytes<=0) goto done;
	de_dbg(c, "[adding padding]");

	// TODO: Does it matter what we pad with? Possibilities include 0x00, 0xe5, 0xf6.
	padding_value = 0x00;
	dbuf_write_run(outf, padding_value, num_padding_bytes);
done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0xf08ba
movq 0x28(%r14), %r14
testq %r14, %r14
jle 0x5d83e
subq 0x18(%rbx), %r14
jle 0x5d83e
leaq 0xc5400(%rip), %rsi     # 0x122c22
movq %r15, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xf0eba
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/flac.c
// Function: de_module_flac
void de_module_flac(deark *c, struct deark_module_info *mi)
{
	mi->id = "flac";
	mi->desc = "FLAC";
	mi->run_fn = de_run_flac;
	mi->identify_fn = de_identify_flac;
}

// Assembly:
leaq 0xc54bd(%rip), %rax     # 0x122d08
movq %rax, (%rsi)
leaq 0xcf43f(%rip), %rax     # 0x12cc94
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5d870
movq %rax, 0x18(%rsi)
leaq 0x228(%rip), %rax       # 0x5da93
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/flac.c
// Function: de_run_flac
static void de_run_flac(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_id3info id3i;

	d = de_malloc(c, sizeof(lctx));
	fmtutil_handle_id3(c, c->infile, &id3i, 0);
	run_flac_internal(c, d, id3i.main_start, id3i.main_end-id3i.main_start);
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x4, %esi
callq 0xe8b2b
movq %rax, 0x18(%rsp)
movq 0x18(%rbx), %rsi
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xf90e4
movq 0x8(%r14), %r15
movq 0x10(%r14), %r14
leaq 0xecc1b(%rip), %rsi     # 0x14a4d0
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x4, %r15
leaq 0x8(%rsp), %rax
movq %r15, (%rax)
leaq 0x14(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
movq 0x8(%rsp), %rdx
cmpq %r14, %rdx
jge 0x5da6b
movq %rbx, %rdi
leaq 0xc541a(%rip), %rsi     # 0x122d0d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xeeb4b
movl %eax, %r12d
shrb $0x7, %al
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xc53fb(%rip), %rsi     # 0x122d23
xorl %eax, %eax
callq 0xe8617
movl %r12d, %eax
andb $0x7f, %al
movzbl %al, %ebp
leaq 0xce813(%rip), %rcx     # 0x12c151
cmpb $0x6, %al
ja 0x5d950
leaq 0xc54bf(%rip), %rax     # 0x122e08
movslq (%rax,%rbp,4), %rcx
addq %rax, %rcx
movq %rbx, %rdi
leaq 0xc53d5(%rip), %rsi     # 0x122d2f
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xef0f6
movq %rax, %r13
addq $0x3, 0x8(%rsp)
movq %rbx, %rdi
leaq 0xc53b5(%rip), %rsi     # 0x122d43
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x8(%rsp), %r15
cmpb $0x6, %bpl
je 0x5d9e4
cmpl $0x4, %ebp
jne 0x5da37
movq %rbx, %rdi
leaq 0xc53f8(%rip), %rsi     # 0x122dae
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rcx
movq %rbx, %rdi
leaq 0xc53ef(%rip), %rsi     # 0x122dca
leaq 0xc606d(%rip), %rdx     # 0x123a4f
jmp 0x5da1a
movq %rbx, %rdi
leaq 0xc53e0(%rip), %rsi     # 0x122dce
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rcx
movq %rbx, %rdi
leaq 0xb4dc3(%rip), %rsi     # 0x1127d6
leaq 0xce012(%rip), %rdx     # 0x12ba2c
movq %r15, %r8
movq %r13, %r9
callq 0xe9b13
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x8(%rsp), %r15
addq %r13, %r15
movq %r15, 0x8(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testb %r12b, %r12b
jns 0x5d8db
movq 0x8(%rsp), %rdx
leaq 0xc52f0(%rip), %rsi     # 0x122d51
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x14(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0xe8be2
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/flac.c
// Function: de_identify_flac
static int de_identify_flac(deark *c)
{
	i64 pos = 0;

	if(!c->detection_data->id3.detection_attempted) {
		de_err(c, "flac detection requires id3 module");
		return 0;
	}

	if(c->detection_data->id3.has_id3v2) {
		pos = (i64)c->detection_data->id3.bytes_at_start;
	}

	if(!dbuf_memcmp(c->infile, pos, "fLaC", 4))
		return 100;

	return 0;
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rax
cmpb $0x0, 0x14(%rax)
je 0x5daab
xorl %ebx, %ebx
cmpb $0x0, 0x15(%rax)
je 0x5dabd
movl 0x18(%rax), %esi
jmp 0x5dabf
leaq 0xc532b(%rip), %rsi     # 0x122ddd
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe9295
jmp 0x5dade
xorl %esi, %esi
movq 0x18(%rdi), %rdi
leaq 0xc5336(%rip), %rdx     # 0x122e00
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
movl $0x64, %eax
cmovel %eax, %ebx
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/dlmaker.c
// Function: de_module_dlmaker
void de_module_dlmaker(deark *c, struct deark_module_info *mi)
{
	mi->id = "dlmaker";
	mi->desc = "DL animation (DL MAKER)";
	mi->run_fn = de_run_dlmaker;
	mi->identify_fn = de_identify_dlmaker;
	mi->help_fn = de_help_dlmaker;
}

// Assembly:
leaq 0xc5355(%rip), %rax     # 0x122e40
movq %rax, (%rsi)
leaq 0xc5353(%rip), %rax     # 0x122e48
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5db1b
movq %rax, 0x18(%rsi)
leaq 0x901(%rip), %rax       # 0x5e40c
movq %rax, 0x20(%rsi)
leaq 0xa59(%rip), %rax       # 0x5e56f
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/dlmaker.c
// Function: de_identify_dlmaker
static int de_identify_dlmaker(deark *c)
{
	u8 v;
	i64 nscrn;
	i64 hsize;
	i64 ctlsize;
	i64 expected_filesize;

	if(!de_input_file_has_ext(c, "dl")) return 0;
	v = de_getbyte(0);
	if(v==1) {
		nscrn = (i64)de_getbyte(21);
		ctlsize = de_getu16le(22); // num frames * 1 byte
		hsize = 792;
	}
	else if(v==2) {
		if(de_getbyte(1)>2) return 0;
		nscrn = (i64)de_getbyte(42);
		ctlsize = de_getu32le(43) * 2;
		hsize = 815;
	}
	else if(v==3) {
		nscrn = (i64)de_getbyte(132);
		ctlsize = de_getu16le(134) * 2;
		hsize = 906;
	}
	else {
		return 0;
	}

	if(nscrn==0 || ctlsize==0) return 0;
	if(v==3) {
		// This is just a minimum file size. v3 is hard to identify.
		expected_filesize = hsize + nscrn*5 + ctlsize;
		if(c->infile->len < expected_filesize) return 0;
		return 10;
	}
	expected_filesize = hsize + V12_SCREEN_SIZE_IN_BYTES*nscrn + ctlsize;
	if(c->infile->len == expected_filesize) return 90;
	if(c->infile->len < expected_filesize) return 0;
	// Allow for some padding or other unknown data at EOF.
	if(c->infile->len > expected_filesize+511) return 0;
	return 10;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xc4b8a(%rip), %rsi     # 0x122fa4
callq 0xea491
testl %eax, %eax
je 0x5e46f
movq 0x18(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeead3
cmpb $0x3, %al
je 0x5e50d
movzbl %al, %eax
cmpl $0x2, %eax
je 0x5e477
cmpl $0x1, %eax
jne 0x5e567
movq 0x18(%rbx), %rdi
movl $0x15, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl $0x16, %esi
callq 0xeebc8
movl $0x318, %ecx            # imm = 0x318
jmp 0x5e4b3
xorl %r14d, %r14d
jmp 0x5e567
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0xeead3
cmpb $0x2, %al
ja 0x5e567
movq 0x18(%rbx), %rdi
movl $0x2a, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl $0x2b, %esi
callq 0xeed61
addq %rax, %rax
movl $0x32f, %ecx            # imm = 0x32F
testb %bpl, %bpl
sete %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
jne 0x5e567
movzbl %bpl, %edx
imulq $0xfa00, %rdx, %rdx     # imm = 0xFA00
addq %rax, %rcx
addq %rdx, %rcx
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movl $0x5a, %r14d
cmpq %rcx, %rax
je 0x5e567
movl $0x0, %r14d
jl 0x5e567
addq $0x1ff, %rcx            # imm = 0x1FF
xorl %edx, %edx
cmpq %rcx, %rax
movl $0xa, %r14d
cmovgl %edx, %r14d
jmp 0x5e567
movq 0x18(%rbx), %rdi
movl $0x84, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl $0x86, %esi
callq 0xeebc8
testb %bpl, %bpl
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movl $0x0, %r14d
jne 0x5e567
movzbl %bpl, %ecx
leaq (%rcx,%rcx,4), %rcx
leaq (%rcx,%rax,2), %rax
addq $0x38a, %rax            # imm = 0x38A
movq 0x18(%rbx), %rcx
xorl %edx, %edx
cmpq %rax, 0x18(%rcx)
movl $0xa, %r14d
cmovll %edx, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/dlmaker.c
// Function: read_name
static void read_name(deark *c, lctx *d, i64 pos, de_ucstring *s, size_t nsize)
{
	size_t i;
	u8 buf[40];

	if(nsize>40) return;
	de_read(buf, pos, nsize);
	for(i=0; i<nsize; i++) {
		if(buf[i]) buf[i] ^= 0xff;
	}
	ucstring_append_bytes(s, buf, nsize, DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rsp, %rsi
movq %r8, %rcx
callq 0xee8d4
testq %rbx, %rbx
je 0x5e5b5
xorl %eax, %eax
movb (%rsp,%rax), %cl
testb %cl, %cl
je 0x5e5ad
notb %cl
movb %cl, (%rsp,%rax)
incq %rax
cmpq %rax, %rbx
jne 0x5e5a1
movl (%r15), %r8d
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xf6cdd
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/crush.c
// Function: de_module_crush
void de_module_crush(deark *c, struct deark_module_info *mi)
{
	mi->id = "crush";
	mi->desc = "CRUSH archive";
	mi->run_fn = de_run_crush;
	mi->identify_fn = de_identify_crush;
}

// Assembly:
leaq 0xc4a16(%rip), %rax     # 0x122ff5
movq %rax, (%rsi)
leaq 0xc4a12(%rip), %rax     # 0x122ffb
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5e604
movq %rax, 0x18(%rsi)
leaq 0x78a(%rip), %rax       # 0x5ed89
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cdiimage.c
// Function: de_module_cdi_imag
void de_module_cdi_imag(deark *c, struct deark_module_info *mi)
{
	mi->id = "cdi_imag";
	mi->desc = "CD-I IFF IMAG";
	mi->run_fn = de_run_cdi_imag;
	mi->identify_fn = de_identify_cdi_imag;
}

// Assembly:
leaq 0xc4321(%rip), %rax     # 0x123130
movq %rax, (%rsi)
leaq 0xc4320(%rip), %rax     # 0x123139
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x5ee34
movq %rax, 0x18(%rsi)
leaq 0x66(%rip), %rax        # 0x5ee95
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cdiimage.c
// Function: de_run_cdi_imag
static void de_run_cdi_imag(deark *c, de_module_params *mparams)
{
	struct cdi_imag_ctx *d = NULL;
	struct de_iffctx *ictx = NULL;

	d = de_malloc(c, sizeof(struct cdi_imag_ctx));
	ictx = fmtutil_create_iff_decoder(c);
	ictx->userdata = (void*)d;
	ictx->has_standard_iff_chunks = 1;
	ictx->handle_chunk_fn = my_cdi_imag_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
movl $0x430, %esi            # imm = 0x430
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1075c0
movq %rax, %r15
movq %r14, 0x10(%rax)
movb $0x1, 0x5d(%rax)
leaq 0x7d(%rip), %rax        # 0x5eee0
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1075e4
movq %r15, %rdi
callq 0x1075d3
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cdiimage.c
// Function: yuv_to_rgb
static void yuv_to_rgb(UI y, UI u, UI v, de_color *rgbclr)
{
	double r1, g1, b1;

	b1 = (double)y + ((double)u - 128.0) * 1.733;
	r1 = (double)y + ((double)v - 128.0) * 1.371;
	g1 = ((double)y - 0.299*r1 - 0.114*b1)/0.587;
	*rgbclr = DE_MAKE_RGB(dbl_to_u8(r1), dbl_to_u8(g1), dbl_to_u8(b1));
}

// Assembly:
cvtsi2sd %edi, %xmm1
cvtsi2sd %esi, %xmm0
movsd 0xc3b1c(%rip), %xmm3    # 0x123100
addsd %xmm3, %xmm0
mulsd 0xc3b18(%rip), %xmm0    # 0x123108
addsd %xmm1, %xmm0
cvtsi2sd %edx, %xmm2
addsd %xmm3, %xmm2
mulsd 0xc3b0c(%rip), %xmm2    # 0x123110
addsd %xmm1, %xmm2
movsd 0xc3b08(%rip), %xmm3    # 0x123118
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movsd 0xc3b00(%rip), %xmm1    # 0x123120
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
divsd 0xc3af8(%rip), %xmm1    # 0x123128
movl $0xff000000, %eax       # imm = 0xFF000000
xorpd %xmm3, %xmm3
ucomisd %xmm2, %xmm3
jae 0x5f662
movl $0xffff0000, %eax       # imm = 0xFFFF0000
ucomisd 0xb81ec(%rip), %xmm2    # 0x117838
jae 0x5f662
addsd 0xb81da(%rip), %xmm2    # 0x117830
cvttsd2si %xmm2, %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
xorl %edx, %edx
ucomisd %xmm1, %xmm3
movl $0x0, %esi
jae 0x5f691
movl $0xff00, %esi           # imm = 0xFF00
ucomisd 0xb81bc(%rip), %xmm1    # 0x117838
jae 0x5f691
addsd 0xb81aa(%rip), %xmm1    # 0x117830
cvttsd2si %xmm1, %esi
movzbl %sil, %esi
shll $0x8, %esi
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x5f6b9
movl $0xff, %edx
ucomisd 0xb8190(%rip), %xmm0    # 0x117838
jae 0x5f6b9
addsd 0xb817e(%rip), %xmm0    # 0x117830
cvttsd2si %xmm0, %edx
movzbl %dl, %edx
orl %esi, %eax
orl %edx, %eax
movl %eax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/clp.c
// Function: de_module_clp
void de_module_clp(deark *c, struct deark_module_info *mi)
{
	mi->id = "clp";
	mi->desc = "Windows Clipboard";
	mi->run_fn = de_run_clp;
	mi->identify_fn = de_identify_clp;
	mi->help_fn = de_help_clp;
}

// Assembly:
leaq 0xc3c25(%rip), %rax     # 0x1232ec
movq %rax, (%rsi)
leaq 0xc3c1f(%rip), %rax     # 0x1232f0
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x5f6f7
movq %rax, 0x18(%rsi)
leaq 0x2ec(%rip), %rax       # 0x5f9d3
movq %rax, 0x20(%rsi)
leaq 0x32b(%rip), %rax       # 0x5fa1d
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/clp.c
// Function: de_identify_clp
static int de_identify_clp(deark *c)
{
	int has_ext;
	UI sig;

	// TODO: Improve this
	sig = (UI)de_getu16le(0);
	if(sig<0xc350 || sig>0xc352) return 0;
	has_ext = de_input_file_has_ext(c, "clp");
	if(has_ext) return 80;
	return 15;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeebc8
addl $0xffff3cad, %eax       # imm = 0xFFFF3CAD
cmpl $-0x3, %eax
jb 0x5fa12
leaq 0xc38f3(%rip), %rsi     # 0x1232ec
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
movl $0xf, %eax
movl $0x50, %r14d
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: de_module_comicchat
void de_module_comicchat(deark *c, struct deark_module_info *mi)
{
	mi->id = "comicchat";
	mi->desc = "Microsoft Comic Chat AVB or BGB";
	mi->run_fn = de_run_comicchat;
	mi->identify_fn = de_identify_comicchat;
	mi->help_fn = de_help_comicchat;
}

// Assembly:
leaq 0xc3429(%rip), %rax     # 0x123530
movq %rax, (%rsi)
leaq 0xc3429(%rip), %rax     # 0x12353a
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x60137
movq %rax, 0x18(%rsi)
leaq 0x5c6(%rip), %rax       # 0x606ed
movq %rax, 0x20(%rsi)
leaq 0x6b7(%rip), %rax       # 0x607e9
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: de_identify_comicchat
static int de_identify_comicchat(deark *c)
{
	u8 has_ext, has_hdr, has_endtag;
	UI n0, n2, n4;

	n0 = (UI)de_getu16be(0);
	if(n0!=0x8100 && n0!=0x8181) return 0;
	n2 = (UI)de_getu16le(2);
	n4 = (UI)de_getu16le(4);

	has_hdr = 0;
	if(n0==0x8100) {
		if(n4==1 && (n2==1 || n2==2)) has_hdr = 1;
	}
	else { // 0x8181
		if(n4==2 && (n2>=1 && n2<=3)) has_hdr = 1;
	}
	if(!has_hdr) return 0;

	has_endtag = (de_getu16le(c->infile->len - 2) == 0x0007);
	has_ext = (de_input_file_has_ext(c, "avb") ||
		de_input_file_has_ext(c, "bgb"));
	if(has_endtag && has_ext) return 100;
	if(has_endtag || has_ext) return 55;
	return 35;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeeb67
movq %rax, %r15
cmpl $0x8181, %r15d          # imm = 0x8181
je 0x6071f
cmpl $0x8100, %r15d          # imm = 0x8100
jne 0x607da
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeebc8
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeebc8
cmpl $0x8100, %r15d          # imm = 0x8100
jne 0x6075d
cmpl $0x1, %eax
sete %al
decl %r12d
cmpl $0x2, %r12d
setb %cl
testb %cl, %al
jne 0x60772
jmp 0x607da
cmpl $0x2, %eax
setne %al
addl $-0x4, %r12d
cmpl $-0x3, %r12d
setb %cl
orb %al, %cl
jne 0x607da
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %rsi
addq $-0x2, %rsi
callq 0xeebc8
movq %rax, %r15
leaq 0xc3032(%rip), %rsi     # 0x1237bf
movq %rbx, %rdi
callq 0xea491
movb $0x1, %cl
testl %eax, %eax
jne 0x607af
leaq 0xc3021(%rip), %rsi     # 0x1237c3
movq %rbx, %rdi
callq 0xea491
testl %eax, %eax
setne %cl
cmpq $0x7, %r15
sete %al
movl $0x64, %r14d
testb %cl, %al
jne 0x607da
testb $0x1, %cl
movl $0x37, %eax
movl $0x23, %r14d
cmovnel %eax, %r14d
cmpq $0x7, %r15
cmovel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: handle_chunk_string
static void handle_chunk_string(deark *c, lctx *d, i64 pos, i64 len,
	de_ucstring *s, const char *name)
{
	ucstring_empty(s);
	dbuf_read_to_ucstring_n(c->infile, pos, len, 512, s,
		DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz_d(s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %r8, %rdi
callq 0xf6423
movq 0x18(%rbp), %rdi
movl (%r13), %eax
movl %eax, (%rsp)
movl $0x200, %ecx            # imm = 0x200
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
movl $0x1, %r9d
callq 0xefc2a
movq %r14, %rdi
callq 0xf70f6
leaq 0xcb8c5(%rip), %rsi     # 0x12c12a
movq %rbp, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8617
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: handle_chunk_multiimageptr
static void handle_chunk_multiimageptr(deark *c, lctx *d, struct chunk_ctx *cctx,
	i64 offset, i64 item_size, i64 item_count)
{
	i64 pos;
	i64 i;

	de_dbg(c, "item count: %"I64_FMT, item_count);
	pos = cctx->ck_pos + offset;

	for(i=0; i<item_count; i++) {
		i64 n, m1, m2;

		n = de_getu32le(pos);
		m1 = de_getu32le(pos+4);
		m2 = de_getu32le(pos+8);
		if(!found_image(c, d, cctx, n, m1, m2)) goto done;
		pos += item_size;
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
leaq 0xc2f04(%rip), %rsi     # 0x1237af
movq %r8, %rdx
xorl %eax, %eax
callq 0xe8617
testq %rbx, %rbx
jle 0x60915
movq 0x8(%r15), %rbp
addq $0xc, %rbp
leaq -0x8(%rbp), %rsi
movq 0x18(%r13), %rdi
callq 0xeed61
movq %rax, %r14
movq 0x18(%r13), %rdi
leaq -0x4(%rbp), %rsi
callq 0xeed61
movq %rax, %r12
movq 0x18(%r13), %rdi
movq %rbp, %rsi
callq 0xeed61
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %rax, %r9
callq 0x60924
testl %eax, %eax
je 0x60915
addq 0x8(%rsp), %rbp
decq %rbx
jne 0x608c2
addq $0x18, %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/comicchat.c
// Function: emit_images_highlevel_separate
static void emit_images_highlevel_separate(deark *c, lctx *d,
	struct image_highlevel_ctx *ih)
{
	size_t k;

	if(ih->llimg[0].img) {
		if(ih->is_icon) {
			de_finfo_set_name_from_sz(c, ih->llimg[0].fi,
				"icon", 0, DE_ENCODING_LATIN1);
		}
		de_bitmap_write_to_file_finfo(ih->llimg[0].img, ih->llimg[0].fi,
			ih->llimg[0].createflags);
	}
	for(k=1; k<=2; k++) {
		if(ih->llimg[k].img) {
			de_finfo_set_name_from_sz(c, ih->llimg[k].fi,
				(k==1?"sm_mask":"lg_mask"), 0, DE_ENCODING_LATIN1);
			de_bitmap_write_to_file_finfo(ih->llimg[k].img, ih->llimg[k].fi,
				(ih->llimg[k].createflags | DE_CREATEFLAG_IS_AUX));
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x611d7
cmpb $0x0, 0x1(%rbx)
je 0x611cb
movq 0x10(%rbx), %rsi
leaq 0xc3e23(%rip), %rdx     # 0x124fda
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xea78f
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
callq 0xf22d0
xorl %r15d, %r15d
leaq 0xc25be(%rip), %r12     # 0x12379f
leaq 0xc25bf(%rip), %r13     # 0x1237a7
cmpq $0x0, 0x20(%rbx,%r15)
je 0x61226
movq 0x28(%rbx,%r15), %rsi
testq %r15, %r15
movq %r13, %rdx
cmoveq %r12, %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xea78f
movq 0x20(%rbx,%r15), %rdi
movq 0x28(%rbx,%r15), %rsi
movl 0x30(%rbx,%r15), %edx
orl $0x1, %edx
callq 0xf22d0
addq $0x18, %r15
cmpq $0x30, %r15
jne 0x611e8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: extract_whole_bmp
static void extract_whole_bmp(deark *c, lctx *d, dbuf *inf, i64 pos1,
	struct image_highlevel_ctx *ih)
{
	i64 bmplen;
	dbuf *outf = NULL;
	const char *ext;

	bmplen = dbuf_getu32le(inf, pos1+2);
	if(pos1+bmplen > inf->len) goto done;
	if(bmplen < 54) goto done;

	if(ih->is_icon) {
		ext = "icon.bmp";
	}
	else {
		ext = "bmp";
	}
	outf = dbuf_create_output_file(c, ext, NULL, 0);
	dbuf_copy(inf, pos1, bmplen, outf);

done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x2(%rdx), %rsi
movq %r14, %rdi
callq 0xeed61
xorl %r13d, %r13d
cmpq $0x36, %rax
jl 0x612a8
movq %rax, %r15
addq %rbx, %rax
cmpq 0x18(%r14), %rax
jg 0x612a8
cmpb $0x0, 0x1(%rbp)
leaq 0xbfee5(%rip), %rax     # 0x121162
leaq 0xc24c3(%rip), %rsi     # 0x123747
cmoveq %rax, %rsi
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xefda1
movq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xef481
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf052b
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/comicchat.c
// Function: reconstruct_bmp_and_cvt_to_img
static void reconstruct_bmp_and_cvt_to_img(deark *c, lctx *d,
	struct image_extract_ctx *ic, struct image_highlevel_ctx *ih, int itype,
	u8 direct_to_bmp)
{
	dbuf *tmpbmp = NULL;

	tmpbmp = dbuf_create_membuf(c, 0, 0);
	fmtutil_generate_bmpfileheader(c, tmpbmp, &ic->bi, 0);
	dbuf_copy(c->infile, ic->ihpos, ic->bi.infohdrsize, tmpbmp);
	write_palette(c, d, tmpbmp, ic->pal, ic->bi.pal_entries);
	dbuf_copy(ic->unc_pixels, 0, ic->unc_pixels->len, tmpbmp);
	dbuf_flush(tmpbmp);
	if(direct_to_bmp) {
		extract_whole_bmp(c, d, tmpbmp, 0, ih);
	}
	else {
		read_bmp_to_img(c, d, tmpbmp, 0, ih, itype);
	}
	dbuf_close(tmpbmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r12d
movl %ecx, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r13
movq %rdi, %r15
xorl %esi, %esi
xorl %edx, %edx
callq 0xf09c5
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0xf78fa
movq 0x18(%r15), %rdi
movq 0x18(%r13), %rdx
movq 0xa0(%r13), %rsi
movq %r14, %rcx
callq 0xef481
movq 0x50(%r13), %rbp
testq %rbp, %rbp
jle 0x61568
xorl %ebx, %ebx
movzbl 0xb8(%r13,%rbx,4), %esi
movq %r14, %rdi
callq 0xf0bd6
movzbl 0xb9(%r13,%rbx,4), %esi
movq %r14, %rdi
callq 0xf0bd6
movzbl 0xba(%r13,%rbx,4), %esi
movq %r14, %rdi
callq 0xf0bd6
movq %r14, %rdi
xorl %esi, %esi
callq 0xf0bd6
incq %rbx
cmpq %rbx, %rbp
jne 0x61523
movq 0xa8(%r13), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %r14, %rcx
callq 0xef481
movq %r14, %rdi
callq 0xf08ba
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
testb %r12b, %r12b
je 0x6159e
movq 0x10(%rsp), %rcx
callq 0x6123a
jmp 0x615ad
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
callq 0x612be
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf052b
nop