LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/bsave.c
// Function: do_wh16
static void do_wh16(deark *c, lctx *d)
{
	de_bitmap *img = NULL;
	i64 w, h;
	i64 src_planespan;
	i64 src_rowspan;
	i64 pos;

	pos = BSAVE_HDRSIZE;
	w = d->metrics.maybe_bitsperrow;
	h = d->metrics.maybe_nrows;
	pos += 4;
	de_dbg_dimensions(c, w, h);
	if(!de_good_image_dimensions(c, w, h)) goto done;

	img = de_bitmap_create(c, w, h, 3);
	src_planespan = (w+7)/8;
	src_rowspan = src_planespan*4;

	de_copy_std_palette(DE_PALID_PC16, 0, 0, d->pal, 16, 0);
	de_convert_image_paletted_planar(c->infile, pos, 4, src_rowspan, src_planespan,
		d->pal, img, 0x2);
	de_bitmap_write_to_file(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x440(%rsi), %r14
movq 0x448(%rsi), %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0xe8f88
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x399ee
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0xf266a
leaq 0x7(%r14), %rcx
addq $0xe, %r14
testq %rcx, %rcx
cmovnsq %rcx, %r14
movq %rax, %r12
sarq $0x3, %r14
leaq (,%r14,4), %r13
addq $0x3c, %rbx
movl $0x10, %r8d
movl $0x14, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0xec55a
movq 0x18(%r15), %rdi
movl $0xb, %esi
movl $0x4, %edx
movq %r13, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq $0x2
pushq %r12
callq 0xf30b3
addq $0x10, %rsp
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
jmp 0x399f1
xorl %r12d, %r12d
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/bsave.c
// Function: do_b265
static void do_b265(deark *c, lctx *d)
{
	static const de_color palette1[4] = { 0xffffff, 0x55ffff, 0x000000, 0xffffff };
	static const de_color palette2[4] = { 0xffffff, 0x000000, 0x000000, 0x000000 };
	int palent;
	i64 w, h;
	i64 i,j;
	i64 bits_per_scanline;
	de_bitmap *img = NULL;
	i64 fakewidth;

	w = 320;
	fakewidth = w/2;
	h = d->data_size * 4 / fakewidth;
	bits_per_scanline = w;

	de_dbg_dimensions(c, w, h);
	if(!de_good_image_dimensions(c, w, h)) goto done;
	img = de_bitmap_create(c, w, h, 3);

	for(j=0; j<h; j++) {
		for(i=0; i<fakewidth; i++) {
			palent = (int)de_get_bits_symbol(c->infile, 2,
				BSAVE_HDRSIZE + (j/8)*bits_per_scanline + (i/4)*8 + j%8, i%4);
			de_bitmap_setpixel_rgb(img, 2*i  , j, palette1[palent]);
			de_bitmap_setpixel_rgb(img, 2*i+1, j, palette2[palent]);
		}
	}

	de_bitmap_write_to_file(img, NULL, 0);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbp
movq 0x10(%rsi), %r12
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
movq %r12, %rax
imulq %rcx
movq %rdx, %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x4, %r14
addq %rax, %r14
movl $0x140, %esi            # imm = 0x140
movq %r14, %rdx
callq 0xe8f88
movl $0x140, %esi            # imm = 0x140
movq %rbp, %rdi
movq %r14, %rdx
callq 0xf1db1
testl %eax, %eax
je 0x39b37
movl $0x140, %esi            # imm = 0x140
movq %rbp, %rdi
movq %r14, %rdx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r15
cmpq $0x28, %r12
jl 0x39b29
xorl %r12d, %r12d
movq %r14, 0x8(%rsp)
leaq (,%r12,8), %rax
andq $-0x40, %rax
leaq (%rax,%rax,4), %rax
movl %r12d, %ecx
andl $0x7, %ecx
addq %rcx, %rax
addq $0x7, %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x18(%rbp), %rdi
movl %r13d, %edx
andl $0x1f8, %edx            # imm = 0x1F8
addq 0x10(%rsp), %rdx
movl %r14d, %ecx
andl $0x3, %ecx
movl $0x2, %esi
callq 0xf26f9
movzbl %al, %ebx
shll $0x2, %ebx
leaq 0xdf402(%rip), %rax     # 0x118ee0
movl (%rbx,%rax), %ecx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xf24ba
leaq 0x1(%r13), %rsi
leaq 0xdf3f6(%rip), %rax     # 0x118ef0
movl (%rbx,%rax), %ecx
movq %r15, %rdi
movq %r12, %rdx
callq 0xf24ba
incq %r14
addq $0x2, %r13
cmpq $0xa0, %r14
jne 0x39aaf
incq %r12
movq 0x8(%rsp), %r14
cmpq %r14, %r12
jne 0x39a87
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf22dc
jmp 0x39b3a
xorl %r15d, %r15d
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/bsave.c
// Function: detect_cga16_cbfn
static int detect_cga16_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct detect_cga16_struct *ctx = (struct detect_cga16_struct*)brctx->userdata;
	i64 k;

	for(k=0; k<buf_len; k++) {
		if(ctx->flag0) break;
		if(((brctx->offset+k)%2)==0) { // Even-numbered byte
			if(buf[k]==0xdd) ctx->count1++;
			else if(buf[k]==0xde) ctx->count2++;
			else ctx->flag0 = 1;
		}
		else { // Odd-numbered (color) byte.
			// We want to make sure there is a color byte that isn't one of the
			// special screen codes.
			if(ctx->flag1==0 && buf[k]!=0xdd && buf[k]!=0xde) {
				ctx->flag1 = 1;
			}
		}
	}

	return (ctx->flag0) ? 0 : 1;
}

// Assembly:
movq (%rdi), %rax
movb 0x8(%rax), %cl
testq %rdx, %rdx
jle 0x39c56
xorl %r8d, %r8d
movl %ecx, %r9d
testb %r9b, %r9b
jne 0x39c56
movl 0x10(%rdi), %r9d
addl %r8d, %r9d
testb $0x1, %r9b
jne 0x39c21
movzbl (%rsi,%r8), %r9d
cmpl $0xde, %r9d
je 0x39c3b
cmpl $0xdd, %r9d
jne 0x39c4b
incl (%rax)
jmp 0x39c3e
cmpb $0x0, 0x9(%rax)
jne 0x39c3e
movb (%rsi,%r8), %r9b
addb $0x23, %r9b
cmpb $0x2, %r9b
jb 0x39c3e
movb $0x1, 0x9(%rax)
jmp 0x39c3e
incl 0x4(%rax)
xorl %r9d, %r9d
incq %r8
cmpq %r8, %rdx
jne 0x39bf4
jmp 0x39c56
movb $0x1, 0x8(%rax)
movb $0x1, %cl
movb $0x1, %r9b
jmp 0x39c41
xorl %eax, %eax
testb %cl, %cl
sete %al
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/aldus.c
// Function: de_module_aldus_inst
void de_module_aldus_inst(deark *c, struct deark_module_info *mi)
{
	mi->id = "aldus_inst";
	mi->desc = "Aldus LZW and PKZP";
	mi->run_fn = de_run_aldus_inst;
	mi->identify_fn = de_identify_aldus_inst;
}

// Assembly:
leaq 0xdf299(%rip), %rax     # 0x118f00
movq %rax, (%rsi)
leaq 0xdf29a(%rip), %rax     # 0x118f0b
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x39c8c
movq %rax, 0x18(%rsi)
leaq 0x4a(%rip), %rax        # 0x39cd1
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/aldus.c
// Function: de_identify_aldus_inst
static int de_identify_aldus_inst(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, (const u8*)"ALDUS ", 6)) return 0;

	if(!dbuf_memcmp(c->infile, 6, (const u8*)"PKZP  2.", 8))
		return 100;
	if(!dbuf_memcmp(c->infile, 6, (const u8*)"LZW   1.", 8))
		return 100;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0xdf41b(%rip), %rdx     # 0x1190fe
xorl %r14d, %r14d
movl $0x6, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x39d44
movq 0x18(%rbx), %rdi
leaq 0xdf404(%rip), %rdx     # 0x119105
movl $0x6, %esi
movl $0x8, %ecx
callq 0xefc85
testl %eax, %eax
je 0x39d3e
movq 0x18(%rbx), %rdi
leaq 0xdf3ef(%rip), %rdx     # 0x11910e
movl $0x6, %esi
movl $0x8, %ecx
callq 0xefc85
xorl %ecx, %ecx
testl %eax, %eax
movl $0x64, %r14d
cmovnel %ecx, %r14d
jmp 0x39d44
movl $0x64, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/adex.c
// Function: de_module_adex
void de_module_adex(deark *c, struct deark_module_info *mi)
{
	mi->id = "adex";
	mi->desc = "ADEX IMG/RLE";
	mi->run_fn = de_run_adex;
	mi->identify_fn = de_identify_adex;
}

// Assembly:
leaq 0xdeb00(%rip), %rax     # 0x119117
movq %rax, (%rsi)
leaq 0xdeafb(%rip), %rax     # 0x11911c
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x3a63c
movq %rax, 0x18(%rsi)
leaq 0x46f(%rip), %rax       # 0x3aaa6
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/adex.c
// Function: de_identify_adex
static int de_identify_adex(deark *c)
{
	u8 b;

	if((u32)de_getu32be(0)!=0x50494354U) return 0; // "PICT"
	b = de_getbyte(4);
	if(b!=0 && b!=1) return 0;
	b = de_getbyte(5);
	if(b!=4 && b!=8) return 0;
	return 65;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xeed0d
cmpl $0x50494354, %eax       # imm = 0x50494354
jne 0x3aaef
movq 0x18(%r14), %rdi
movl $0x4, %esi
callq 0xeead3
cmpb $0x1, %al
ja 0x3aaef
movq 0x18(%r14), %rdi
movl $0x5, %esi
callq 0xeead3
addb $-0x4, %al
xorl %ecx, %ecx
testb $-0x5, %al
movl $0x41, %ebx
cmovnel %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cab.c
// Function: de_module_cab
void de_module_cab(deark *c, struct deark_module_info *mi)
{
	mi->id = "cab";
	mi->desc = "Microsoft Cabinet (CAB)";
	mi->run_fn = de_run_cab;
	mi->identify_fn = de_identify_cab;
	mi->flags |= DE_MODFLAG_WARNPARSEONLY;
}

// Assembly:
leaq 0xde68e(%rip), %rax     # 0x119191
movq %rax, (%rsi)
leaq 0xde688(%rip), %rax     # 0x119195
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x3ab2c
movq %rax, 0x18(%rsi)
leaq 0xc4f(%rip), %rax       # 0x3b772
movq %rax, 0x20(%rsi)
orb $0x20, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cardfile.c
// Function: de_module_cardfile
void de_module_cardfile(deark *c, struct deark_module_info *mi)
{
	mi->id = "cardfile";
	mi->desc = "Windows Cardfile address book";
	mi->run_fn = de_run_cardfile;
	mi->identify_fn = de_identify_cardfile;
}

// Assembly:
leaq 0xdde0d(%rip), %rax     # 0x1195ac
movq %rax, (%rsi)
leaq 0xdde0c(%rip), %rax     # 0x1195b5
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x3b7c4
movq %rax, 0x18(%rsi)
leaq 0x7de(%rip), %rax       # 0x3bf9d
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cardfile.c
// Function: detect_crd_fmt
static int detect_crd_fmt(deark *c)
{
	u8 buf[4];
	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "MGC", 3)) return DE_CRDFMT_MGC;
	if(!de_memcmp(buf, "RRG", 3)) return DE_CRDFMT_RRG;
	if(!de_memcmp(buf, "DKO", 3)) return DE_CRDFMT_DKO;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x4, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xee8d4
movzwl (%rbx), %eax
xorl $0x474d, %eax           # imm = 0x474D
movzbl 0x2(%rbx), %ecx
xorl $0x43, %ecx
orw %ax, %cx
je 0x3c016
movzwl 0xc(%rsp), %eax
xorl $0x5252, %eax           # imm = 0x5252
movzbl 0xe(%rsp), %ecx
xorl $0x47, %ecx
orw %ax, %cx
je 0x3c01d
movzwl 0xc(%rsp), %eax
xorl $0x4b44, %eax           # imm = 0x4B44
movzbl 0xe(%rsp), %ecx
xorl $0x4f, %ecx
xorl %edx, %edx
orw %ax, %cx
sete %dl
leal (%rdx,%rdx,2), %eax
jmp 0x3c022
movl $0x1, %eax
jmp 0x3c022
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cardfile.c
// Function: do_text
static void do_text(deark *c, lctx *d, struct page_ctx *pg,
	i64 text_pos, i64 text_len)
{
	de_finfo *fi_text = NULL;

	if(text_len<1) goto done;

	if(c->extract_level>=2) {
		fi_text = de_finfo_create(c);
		if(c->filenames_from_file)
			de_finfo_set_name_from_ucstring(c, fi_text, pg->name, 0);

		do_extract_text_data(c, d, fi_text, text_pos, text_len);
	}
	else {
		do_dbg_text_data(c, d, text_pos, text_len);
	}

done:
	de_finfo_destroy(c, fi_text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %r8, %r8
jle 0x3c08a
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %r13
cmpl $0x2, 0x90(%rbx)
jl 0x3c092
movq %rdx, %rbp
movq %rbx, %rdi
callq 0xea504
movq %rax, %r14
cmpb $0x0, 0xd0(%rbx)
je 0x3c075
movq 0x20(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xea53f
leaq (%r15,%r12), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x3c0e7
xorl %ebp, %ebp
jmp 0x3c121
xorl %r14d, %r14d
jmp 0x3c129
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rbp
movq 0x18(%rbx), %rdi
movl 0x4(%r13), %eax
movl %eax, (%rsp)
xorl %r14d, %r14d
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r12, %rsi
movq %r15, %rdx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %rbp, %rdi
callq 0xf70f6
leaq 0xfefd4(%rip), %rsi     # 0x13b0a4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
callq 0xf6753
jmp 0x3c129
leaq 0xee1c2(%rip), %rsi     # 0x12a2b0
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xefda1
movq %rax, %rbp
movq 0x18(%rbx), %rdi
movzbl 0x4(%r13), %ecx
orl $0x300, %ecx            # imm = 0x300
movq %r12, %rsi
movq %r15, %rdx
movq %rax, %r8
movl $0x6, %r9d
callq 0xf1883
movq %rbp, %rdi
callq 0xf052b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xea50e
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: de_module_cfb
void de_module_cfb(deark *c, struct deark_module_info *mi)
{
	mi->id = "cfb";
	mi->desc = "Microsoft Compound File Binary File";
	mi->run_fn = de_run_cfb;
	mi->identify_fn = de_identify_cfb;
	mi->help_fn = de_help_cfb;
}

// Assembly:
leaq 0xdd6f5(%rip), %rax     # 0x119840
movq %rax, (%rsi)
leaq 0xdd6ef(%rip), %rax     # 0x119844
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x3c17b
movq %rax, 0x18(%rsi)
leaq 0x10d(%rip), %rax       # 0x3c278
movq %rax, 0x20(%rsi)
leaq 0x128(%rip), %rax       # 0x3c29e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: de_run_cfb
static void de_run_cfb(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *cfbfmt_opt;

	d = de_malloc(c, sizeof(lctx));
	d->decode_streams = 1;
	d->subformat_req = SUBFMT_AUTO;

	if(de_get_ext_option(c, "cfb:extractstreams")) {
		d->extract_raw_streams = 1;
		d->decode_streams = 0;
	}
	if(de_get_ext_option(c, "cfb:dumpdir")) {
		d->dump_dir_structure = 1; // A low-level debugging feature
	}

	if(de_havemodcode(c, mparams, 'T')) {
		// TIFF tag 37680 mode
		// TODO: Handle 'OLE Property Set Storage' more generally.
		d->subformat_req = SUBFMT_TIFF37680;
	}

	if(d->subformat_req == SUBFMT_AUTO) {
		// If we haven't set subformat_req yet, look at the command-line option

		cfbfmt_opt = de_get_ext_option(c, "cfb:fmt");
		if(cfbfmt_opt) {
			if(!de_strcmp(cfbfmt_opt, "auto")) {
				d->subformat_req = SUBFMT_AUTO;
			}
			else if(!de_strcmp(cfbfmt_opt, "raw")) {
				d->subformat_req = SUBFMT_RAW;
			}
			else if(!de_strcmp(cfbfmt_opt, "thumbsdb")) {
				d->subformat_req = SUBFMT_THUMBSDB;
			}
		}
	}

	de_run_cfb_internal(c, d);

	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0xc8, %esi
callq 0xe8b2b
movq %rax, %r14
movb $0x1, 0xd(%rax)
movl $0x0, (%rax)
leaq 0xdd6c4(%rip), %rsi     # 0x119868
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x3c1b8
movw $0x1, 0xc(%r14)
leaq 0xdd6bc(%rip), %rsi     # 0x11987b
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x3c1d1
movb $0x1, 0xe(%r14)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x54, %edx
callq 0xea4d9
movl $0x3, %ecx
testl %eax, %eax
je 0x3c1ef
movl %ecx, (%r14)
jmp 0x3c1f5
cmpl $0x0, (%r14)
je 0x3c210
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c2e4
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2
leaq 0xdd670(%rip), %rsi     # 0x119887
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x3c1f5
movq %rax, %r15
leaq 0xd4349(%rip), %rsi     # 0x110577
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0x3c267
leaq 0xfc3e3(%rip), %rsi     # 0x138624
movq %r15, %rdi
callq 0x181a0
testl %eax, %eax
je 0x3c26e
leaq 0xdd63b(%rip), %rsi     # 0x11988f
movq %r15, %rdi
callq 0x181a0
testl %eax, %eax
jne 0x3c1f5
movl $0x2, %ecx
jmp 0x3c1ea
xorl %ecx, %ecx
jmp 0x3c1ea
movl $0x1, %ecx
jmp 0x3c1ea
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: de_help_cfb
static void de_help_cfb(deark *c)
{
	de_msg(c, "-opt cfb:extractstreams : Extract raw streams, instead of decoding");
	de_msg(c, "-opt cfb:fmt=raw : Do not try to detect the document type");
	de_msg(c, "-opt cfb:fmt=thumbsdb : Assume Thumbs.db format");
	de_msg(c, "-opt cfb:msrgbamode=0 : Disable special processing of nonstandard-"
		"JPEG Thumbs.db thumbnails");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xddf07(%rip), %rsi     # 0x11a1b0
xorl %eax, %eax
callq 0xe9461
leaq 0xddf3c(%rip), %rsi     # 0x11a1f3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xddf65(%rip), %rsi     # 0x11a22d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9461
leaq 0xddf84(%rip), %rsi     # 0x11a25d
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0xe9461
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: describe_sec_id
static void describe_sec_id(deark *c, lctx *d, i64 sec_id,
	char *buf, size_t buf_len)
{
	i64 sec_offset;

	if(sec_id >= 0) {
		sec_offset = sec_id_to_offset(c, d, sec_id);
		de_snprintf(buf, buf_len, "offs=%d", (int)sec_offset);
	}
	else if(sec_id == -1) {
		de_strlcpy(buf, "free", buf_len);
	}
	else if(sec_id == -2) {
		de_strlcpy(buf, "end of chain", buf_len);
	}
	else if(sec_id == -3) {
		de_strlcpy(buf, "FAT SecID", buf_len);
	}
	else if(sec_id == -4) {
		de_strlcpy(buf, "DIFAT SecID", buf_len);
	}
	else {
		de_strlcpy(buf, "?", buf_len);
	}
}

// Assembly:
movq %rdx, %rax
movq %rsi, %rcx
testq %rsi, %rsi
js 0x3e97a
incl %ecx
imull 0x20(%rdi), %ecx
leaq 0xee967(%rip), %rdx     # 0x12d2d2
movl $0x50, %esi
movq %rax, %rdi
xorl %eax, %eax
jmp 0xe8193
addq $0x4, %rcx
cmpq $0x3, %rcx
ja 0x3e9b8
leaq 0xdae7d(%rip), %rdx     # 0x119808
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xdb077(%rip), %rsi     # 0x119a12
jmp 0x3e9bf
leaq 0xdb061(%rip), %rsi     # 0x119a05
jmp 0x3e9bf
leaq 0xdb053(%rip), %rsi     # 0x119a00
jmp 0x3e9bf
leaq 0xdb05e(%rip), %rsi     # 0x119a14
jmp 0x3e9bf
leaq 0xed792(%rip), %rsi     # 0x12c151
movl $0x50, %edx
movq %rax, %rdi
jmp 0xe8219
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: read_and_cvt_timestamp
static void read_and_cvt_timestamp(deark *c, dbuf *f, i64 pos,
	struct de_timestamp *ts)
{
	i64 ts_as_FILETIME;

	de_zeromem(ts, sizeof(struct de_timestamp));
	ts_as_FILETIME = dbuf_geti64le(f, pos);
	if(ts_as_FILETIME!=0) {
		de_FILETIME_to_timestamp(ts_as_FILETIME, ts, 0x1);
	}
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
callq 0xeef09
testq %rax, %rax
je 0x3e9f1
movq %rax, %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
jmp 0xea829
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: do_dump_dir_structure
static void do_dump_dir_structure(deark *c, lctx *d)
{
	i64 i;

	de_dbg(c, "dir structure:");
	de_dbg_indent(c, 1);
	for(i=0; i<d->num_dir_entries; i++) {
		de_dbg(c, "[%d] t=%d p=%d c=%d s=%d,%d", (int)i,
			(int)d->dir_entry[i].entry_type,
			(int)d->dir_entry[i].parent_id,
			(int)d->dir_entry[i].child_id,
			(int)d->dir_entry[i].sibling_id[0],
			(int)d->dir_entry[i].sibling_id[1]);
		de_dbg_indent(c, 1);
		if(d->dir_entry[i].fname_srd && d->dir_entry[i].fname_srd->str) {
			de_dbg(c, "fname: \"%s\"",
				ucstring_getpsz(d->dir_entry[i].fname_srd->str));
		}
		if(d->dir_entry[i].path) {
			de_dbg(c, "path: \"%s\"",
				ucstring_getpsz(d->dir_entry[i].path));
		}
		de_dbg_indent(c, -1);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xdb339(%rip), %rsi     # 0x119d44
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq $0x0, 0x70(%r14)
jle 0x3eafc
leaq 0xdb322(%rip), %r15     # 0x119d53
leaq 0x1058f1(%rip), %r12    # 0x144329
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x98(%r14), %rax
movzbl 0x4(%rax,%r13), %ecx
movl 0x70(%rax,%r13), %r8d
movl 0x64(%rax,%r13), %r9d
movl 0x68(%rax,%r13), %r10d
movl 0x6c(%rax,%r13), %r11d
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0xe8617
addq $0x10, %rsp
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x98(%r14), %rax
movq 0x28(%rax,%r13), %rcx
testq %rcx, %rcx
je 0x3eabc
movq 0x18(%rcx), %rdi
testq %rdi, %rdi
je 0x3eabc
callq 0xf705c
movq %rbx, %rdi
leaq 0xdb2c4(%rip), %rsi     # 0x119d6f
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x98(%r14), %rax
movq 0x78(%rax,%r13), %rdi
testq %rdi, %rdi
je 0x3eadb
callq 0xf705c
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
addq $0x88, %r13
cmpq 0x70(%r14), %rbp
jl 0x3ea3d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: do_mark_dir_entries_recursively
static void do_mark_dir_entries_recursively(deark *c, lctx *d, i32 parent_id,
	i32 dir_entry_idx, int level)
{
	struct dir_entry_info *dei;
	int k;

	if(dir_entry_idx<0 || (i64)dir_entry_idx>=d->num_dir_entries) return;

	dei = &d->dir_entry[dir_entry_idx];

	if(dei->entry_type!=OBJTYPE_STORAGE && dei->entry_type!=OBJTYPE_STREAM) return;

	dei->parent_id = parent_id;

	if(dei->entry_type==OBJTYPE_STORAGE && dei->fname_srd && dei->fname_srd->str && !dei->path) {
		// Set the full pathname
		dei->path = ucstring_create(c);
		if(parent_id>0 && d->dir_entry[parent_id].path) {
			ucstring_append_ucstring(dei->path, d->dir_entry[parent_id].path);
			ucstring_append_sz(dei->path, "/", DE_ENCODING_LATIN1);
		}
		ucstring_append_ucstring(dei->path, dei->fname_srd->str);
	}

	if(level>50) return;
	for(k=0; k<2; k++) {
		do_mark_dir_entries_recursively(c, d, parent_id, dei->sibling_id[k], level+1);
	}

	if(dei->entry_type==OBJTYPE_STORAGE) {
		// This is a "subdirectory" entry, so examine its children (starting with the
		// one that we know about).
		do_mark_dir_entries_recursively(c, d, dir_entry_idx, dei->child_id, level+1);
	}
}

// Assembly:
testl %ecx, %ecx
js 0x3ec53
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x34, %r8d
movl $0x33, %eax
cmovgel %r8d, %eax
negl %eax
movq %rax, (%rsp)
incl %ebx
movl %ecx, %eax
cmpq %rax, 0x70(%r14)
jle 0x3ec45
movl %ecx, %r12d
movq 0x98(%r14), %r13
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rcx
movb 0x4(%r13,%rcx), %al
leal -0x1(%rax), %edx
cmpb $0x1, %dl
ja 0x3ec45
addq %rcx, %r13
movl %ebp, 0x70(%r13)
cmpb $0x1, %al
jne 0x3ebfa
movq 0x28(%r13), %rax
testq %rax, %rax
je 0x3ebfa
cmpq $0x0, 0x18(%rax)
je 0x3ebfa
cmpq $0x0, 0x78(%r13)
jne 0x3ebfa
movq %r15, %rdi
callq 0xf6410
movq %rax, %rdi
movq %rax, 0x78(%r13)
testl %ebp, %ebp
jle 0x3ebed
movq 0x98(%r14), %rax
movl %ebp, %ecx
movq %rcx, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rcx,8), %rcx
movq 0x78(%rax,%rcx), %rsi
testq %rsi, %rsi
je 0x3ebed
callq 0xf6509
movq 0x78(%r13), %rdi
leaq 0xd349f(%rip), %rsi     # 0x11207e
movl $0x5, %edx
callq 0xf65e3
movq 0x78(%r13), %rdi
movq 0x28(%r13), %rax
movq 0x18(%rax), %rsi
callq 0xf6509
movq (%rsp), %rax
addl %ebx, %eax
cmpl $0x1, %eax
je 0x3ec45
movl 0x68(%r13), %ecx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %r8d
callq 0x3eb17
movl 0x6c(%r13), %ecx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %r8d
callq 0x3eb17
cmpb $0x1, 0x4(%r13)
jne 0x3ec45
movl 0x64(%r13), %ecx
incl %ebx
movl %r12d, %ebp
testl %ecx, %ecx
jns 0x3eb4a
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/cfb.c
// Function: copy_normal_stream_to_dbuf
static void copy_normal_stream_to_dbuf(deark *c, lctx *d, i64 first_sec_id,
	i64 stream_startpos, i64 stream_size,
	dbuf *outf)
{
	i64 sec_id;
	i64 bytes_left_to_copy;
	i64 bytes_left_to_skip;

	if(stream_size<=0) return;
	if(stream_startpos+stream_size > c->infile->len) {
		// This is a not-too-strict emergency brake. If the file has been
		// truncated, we might still be able to process some of the data
		// that is there.
		stream_size = c->infile->len - stream_startpos;
	}

	bytes_left_to_copy = stream_size;
	bytes_left_to_skip = stream_startpos;
	sec_id = first_sec_id;
	while(bytes_left_to_copy > 0) {
		i64 sec_offs;
		i64 bytes_to_copy;
		i64 bytes_to_skip;

		if(sec_id<0) break;
		sec_offs = sec_id_to_offset(c, d, sec_id);

		bytes_to_skip = bytes_left_to_skip;
		if(bytes_to_skip > d->sec_size) bytes_to_skip = d->sec_size;

		bytes_to_copy = d->sec_size - bytes_to_skip;
		if(bytes_to_copy > bytes_left_to_copy) bytes_to_copy = bytes_left_to_copy;

		dbuf_copy(c->infile, sec_offs + bytes_to_skip, bytes_to_copy, outf);

		bytes_left_to_copy -= bytes_to_copy;
		bytes_left_to_skip -= bytes_to_skip;
		sec_id = get_next_sec_id(c, d, sec_id);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
testq %r8, %r8
jle 0x3ecef
movq %rcx, %r14
movq %rdx, %r13
leaq (%r8,%rcx), %rax
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, %rbx
subq %r14, %rbx
cmpq %rcx, %rax
cmovleq %r8, %rbx
testq %rbx, %rbx
setle %al
testq %rdx, %rdx
sets %cl
orb %al, %cl
je 0x3ecfe
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq 0x20(%r15), %rbp
leaq 0x1(%r13), %rsi
imulq %rbp, %rsi
cmpq %rbp, %r14
movq %rbp, %r12
cmovlq %r14, %r12
subq %r12, %rbp
cmpq %rbx, %rbp
cmovgeq %rbx, %rbp
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
addq %r12, %rsi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
callq 0xef481
movq 0x80(%r15), %rdi
testq %rdi, %rdi
je 0x3ecef
shlq $0x2, %r13
movq %r13, %rsi
callq 0xeedfa
subq %rbp, %rbx
jle 0x3ecef
movq %rax, %r13
subq %r12, %r14
testq %rax, %rax
jns 0x3ed01
jmp 0x3ecef
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cfb.c
// Function: copy_any_stream_to_dbuf
static void copy_any_stream_to_dbuf(deark *c, lctx *d, struct dir_entry_info *dei,
	i64 stream_startpos, i64 stream_size,
	dbuf *outf)
{
	if(dei->is_mini_stream) {
		copy_mini_stream_to_dbuf(c, d, dei->minisec_id, stream_startpos, stream_size, outf);
	}
	else {
		copy_normal_stream_to_dbuf(c, d, dei->normal_sec_id, stream_startpos, stream_size, outf);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
cmpl $0x0, 0x8(%rdx)
je 0x3edb5
movq %r9, (%rsp)
movq 0xa0(%r12), %rax
testq %rax, %rax
sete %cl
testq %r14, %r14
setle %sil
orb %cl, %sil
jne 0x3eda6
movq 0x18(%rdi), %rcx
cmpq %r14, 0x18(%rcx)
jge 0x3edd5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rdx), %rdx
movq %r12, %rsi
movq %r15, %rcx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3ec9e
movq 0x20(%rdx), %r13
testq %r13, %r13
js 0x3eda6
cmpq %r14, 0x18(%rax)
jl 0x3eda6
movq 0x50(%r12), %rbp
movq 0xa0(%r12), %rdi
movq %rbp, %rsi
imulq %r13, %rsi
cmpq %rbp, %r15
movq %rbp, %rbx
cmovlq %r15, %rbx
subq %rbx, %rbp
cmpq %r14, %rbp
cmovgeq %r14, %rbp
addq %rbx, %rsi
movq %rbp, %rdx
movq (%rsp), %rcx
callq 0xef481
movq 0x88(%r12), %rdi
testq %rdi, %rdi
je 0x3eda6
shlq $0x2, %r13
movq %r13, %rsi
callq 0xeedfa
subq %rbp, %r14
jle 0x3eda6
movq %rax, %r13
subq %rbx, %r15
testq %rax, %rax
jns 0x3ede4
jmp 0x3eda6
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cpio.c
// Function: de_module_cpio
void de_module_cpio(deark *c, struct deark_module_info *mi)
{
	mi->id = "cpio";
	mi->desc = "cpio archive";
	mi->run_fn = de_run_cpio;
	mi->identify_fn = de_identify_cpio;
}

// Assembly:
leaq 0xdb0f5(%rip), %rax     # 0x11a2ec
movq %rax, (%rsi)
leaq 0xdb0f0(%rip), %rax     # 0x11a2f1
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x3f21c
movq %rax, 0x18(%rsi)
leaq 0x799(%rip), %rax       # 0x3f9b0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/cpio.c
// Function: identify_cpio_internal
static int identify_cpio_internal(deark *c, i64 pos, int *subfmt)
{
	u8 b[6];

	*subfmt = 0;
	de_read(b, pos, sizeof(b));

	if(!de_memcmp(b, "070707", 6)) {
		*subfmt = SUBFMT_ASCII_PORTABLE;
		return 100;
	}
	if(!de_memcmp(b, "070701", 6)) {
		*subfmt = SUBFMT_ASCII_NEW;
		return 100;
	}
	if(!de_memcmp(b, "070702", 6)) {
		*subfmt = SUBFMT_ASCII_NEWCRC;
		return 100;
	}
	if(b[0]==0xc7 && b[1]==0x71) {
		*subfmt = SUBFMT_BINARY_LE;
		return 70;
	}
	if(b[0]==0x71 && b[1]==0xc7) {
		*subfmt = SUBFMT_BINARY_BE;
		return 70;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
movl $0x0, (%rbx)
leaq 0x2(%rsp), %r14
movl $0x6, %ecx
movq %r14, %rsi
callq 0xee8d4
movl $0x37303730, %eax       # imm = 0x37303730
movl (%r14), %edx
xorl %eax, %edx
movzwl 0x4(%r14), %esi
xorl $0x3730, %esi           # imm = 0x3730
movl $0x64, %ecx
orl %edx, %esi
je 0x3fa68
xorl 0x2(%rsp), %eax
movzwl 0x6(%rsp), %edx
xorl $0x3130, %edx           # imm = 0x3130
orl %eax, %edx
je 0x3fa6f
movl $0x37303730, %eax       # imm = 0x37303730
xorl 0x2(%rsp), %eax
movzwl 0x6(%rsp), %edx
xorl $0x3230, %edx           # imm = 0x3230
orl %eax, %edx
je 0x3fa76
movb 0x2(%rsp), %sil
movb 0x3(%rsp), %dil
movl %esi, %eax
xorb $-0x39, %al
movl %edi, %r8d
xorb $0x71, %r8b
movl $0x46, %ecx
movl $0x1, %edx
orb %al, %r8b
je 0x3fa7b
xorb $0x71, %sil
xorb $-0x39, %dil
xorl %eax, %eax
movl $0x2, %edx
orb %sil, %dil
je 0x3fa7b
jmp 0x3fa7f
movl $0x3, %edx
jmp 0x3fa7b
movl $0x4, %edx
jmp 0x3fa7b
movl $0x5, %edx
movl %edx, (%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/d64.c
// Function: de_module_d64
void de_module_d64(deark *c, struct deark_module_info *mi)
{
	mi->id = "d64";
	mi->desc = "D64 (C64 disk image)";
	mi->run_fn = de_run_d64;
	mi->identify_fn = de_identify_d64;
}

// Assembly:
leaq 0xda905(%rip), %rax     # 0x11a504
movq %rax, (%rsi)
leaq 0xda8ff(%rip), %rax     # 0x11a508
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x3fc24
movq %rax, 0x18(%rsi)
leaq 0x576(%rip), %rax       # 0x40195
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/d64.c
// Function: de_identify_d64
static int de_identify_d64(deark *c)
{
	if(!de_input_file_has_ext(c, "d64")) return 0;
	if(!dbuf_memcmp(c->infile, 357*256, "\x12\x01\x41\x00", 4)) {
		return 100;
	}
	if(c->infile->len==683*256) return 30;
	if(c->infile->len==683*256+683) return 30;
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xda364(%rip), %rsi     # 0x11a504
callq 0xea491
testl %eax, %eax
je 0x401ec
movq 0x18(%rbx), %rdi
leaq 0xda33c(%rip), %rdx     # 0x11a4f0
movl $0x16500, %esi          # imm = 0x16500
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
je 0x401f0
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
cmpq $0x2adab, %rcx          # imm = 0x2ADAB
movl $0x1e, %edx
cmovel %edx, %eax
cmpq $0x2ab00, %rcx          # imm = 0x2AB00
cmovel %edx, %eax
jmp 0x401f5
xorl %eax, %eax
jmp 0x401f5
movl $0x64, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/drhalo.c
// Function: de_module_drhalocut
void de_module_drhalocut(deark *c, struct deark_module_info *mi)
{
	mi->id = "drhalocut";
	mi->desc = "Dr. Halo .CUT image";
	mi->run_fn = de_run_drhalocut;
	mi->identify_fn = de_identify_drhalocut;
	mi->help_fn = de_help_drhalocut;
}

// Assembly:
leaq 0xda4b1(%rip), %rax     # 0x11a6b0
movq %rax, (%rsi)
leaq 0xda4b1(%rip), %rax     # 0x11a6ba
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x4022f
movq %rax, 0x18(%rsi)
leaq 0x3ee(%rip), %rax       # 0x4060d
movq %rax, 0x20(%rsi)
leaq 0x45d(%rip), %rax       # 0x40687
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/drhalo.c
// Function: de_identify_drhalocut
static int de_identify_drhalocut(deark *c)
{
	i64 n;

	if(!de_input_file_has_ext(c, "cut")) return 0;
	n = de_getu16le(4);
	if(n!=0) return 0;
	n = de_getu16le(0);
	if(n<1 || n>4096) return 0;
	n = de_getu16le(2);
	if(n<1 || n>4096) return 0;
	return 10;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xda09b(%rip), %rsi     # 0x11a6b6
callq 0xea491
xorl %r14d, %r14d
testl %eax, %eax
je 0x4067c
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeebc8
testq %rax, %rax
jne 0x4067c
movq 0x18(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xeebc8
addq $-0x1001, %rax          # imm = 0xEFFF
cmpq $-0x1000, %rax          # imm = 0xF000
jb 0x4067c
movq 0x18(%rbx), %rdi
movl $0x2, %esi
callq 0xeebc8
addq $-0x1001, %rax          # imm = 0xEFFF
xorl %ecx, %ecx
cmpq $-0x1000, %rax          # imm = 0xF000
movl $0xa, %r14d
cmovbl %ecx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/drhalo.c
// Function: de_module_drhalopic
void de_module_drhalopic(deark *c, struct deark_module_info *mi)
{
	mi->id = "drhalopic";
	mi->desc = "Dr. Halo .PIC image";
	mi->run_fn = de_run_drhalopic;
	mi->identify_fn = de_identify_drhalopic;
	mi->help_fn = de_help_drhalopic;
}

// Assembly:
leaq 0xda01c(%rip), %rax     # 0x11a6ce
movq %rax, (%rsi)
leaq 0xda01c(%rip), %rax     # 0x11a6d8
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x406e2
movq %rax, 0x18(%rsi)
leaq 0x777(%rip), %rax       # 0x40e49
movq %rax, 0x20(%rsi)
leaq 0x7c1(%rip), %rax       # 0x40e9e
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/drhalo.c
// Function: do_write_image_pal
static void do_write_image_pal(deark *c, lctx *d, dbuf *unc_pixels)
{
	de_bitmap *img = NULL;

	img = de_bitmap_create(c, d->w, d->h, 3);
	de_convert_image_paletted(unc_pixels, 0, 8, d->w, d->pal, img, 0);
	de_bitmap_write_to_file(img, NULL, DE_CREATEFLAG_OPT_IMAGE);
	de_bitmap_destroy(img);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r15
movq (%r14), %rcx
addq $0x18, %r14
movl $0x0, (%rsp)
movl $0x8, %edx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %r8
movq %rax, %r9
callq 0xf2f79
movq %r15, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xf22dc
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xf228d
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: de_module_ebml
void de_module_ebml(deark *c, struct deark_module_info *mi)
{
	mi->id = "ebml";
	mi->desc = "EBML";
	mi->run_fn = de_run_ebml;
	mi->identify_fn = de_identify_ebml;
	mi->help_fn = de_help_ebml;
}

// Assembly:
leaq 0xd98ed(%rip), %rax     # 0x11ab38
movq %rax, (%rsi)
leaq 0xd98e8(%rip), %rax     # 0x11ab3d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x4127b
movq %rax, 0x18(%rsi)
leaq 0x7f(%rip), %rax        # 0x412ea
movq %rax, 0x20(%rsi)
leaq 0x9a(%rip), %rax        # 0x41310
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: de_run_ebml
static void de_run_ebml(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;

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

	if(de_get_ext_option(c, "ebml:encodedid")) {
		d->show_encoded_id = 1;
	}

	pos = 0;
	do_element_sequence(c, d, pos, c->infile->len);

	if(d) {
		destroy_attachment_data(c, d);
		de_free(c, d);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r14
leaq 0xd98ac(%rip), %rsi     # 0x11ab42
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x412ab
movl $0x1, 0x4(%r14)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4131e
testq %r14, %r14
je 0x412e2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41947
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe8be2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: destroy_attachment_data
static void destroy_attachment_data(deark *c, lctx *d)
{
	if(!d->attachmentctx) return;
	ucstring_destroy(d->attachmentctx->filename);
	de_free(c, d->attachmentctx);
	d->attachmentctx = NULL;
}

// Assembly:
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x4197d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rax), %rdi
callq 0xf6753
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0xe8be2
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: decode_string
static void decode_string(deark *c, lctx *d, const struct ele_id_info *ele_id,
	  i64 pos, i64 len, de_ext_encoding ee)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, len, DE_DBG_MAX_STRLEN, s,
		DE_CONVFLAG_STOP_AT_NUL, ee);
	de_dbg(c, "value: \"%s\"", ucstring_getpsz_d(s));

	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xf6410
movq %rax, %rbx
movq 0x18(%r12), %rdi
movl %ebp, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %r8
movl $0x1, %r9d
callq 0xefc2a
movq %rbx, %rdi
callq 0xf70f6
leaq 0xd0cda(%rip), %rsi     # 0x11276b
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: handler_filename
static void handler_filename(deark *c, lctx *d, struct handler_params *hp)
{
	if(!d->attachmentctx) return;
	if(d->attachmentctx->filename) return;
	if(hp->dlen<1) return;

	d->attachmentctx->filename = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, hp->dpos, hp->dlen, 300,
		d->attachmentctx->filename,
		DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_UTF8);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x41b42
cmpq $0x0, (%rax)
jne 0x41b42
movq %rdx, %rbx
cmpq $0x0, 0x8(%rdx)
jle 0x41b42
movq %rsi, %r15
movq %rdi, %r14
callq 0xf6410
movq 0x8(%r15), %rcx
movq %rax, (%rcx)
movq 0x18(%r14), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movl $0x2, (%rsp)
movl $0x12c, %ecx            # imm = 0x12C
movq %rax, %r8
movl $0x1, %r9d
callq 0xefc2a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ebml.c
// Function: handler_attachedfile
static void handler_attachedfile(deark *c, lctx *d, struct handler_params *hp)
{
	if(hp->end_flag) {
		handler_attachedfile_end(c, d);
	}
	else {
		handler_attachedfile_start(c, d, hp);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x10(%rdx)
movq 0x8(%rsi), %rax
je 0x41ba9
testq %rax, %rax
je 0x41ba4
cmpq $0x0, 0x8(%rax)
je 0x41ba4
movq %r14, %rdi
callq 0xea504
movq %rax, %r15
movq 0x8(%rbx), %rax
movq (%rax), %rdx
testq %rdx, %rdx
je 0x41bd0
cmpq $0x0, 0x10(%rdx)
jle 0x41bd0
cmpb $0x0, 0xd0(%r14)
je 0x41bd0
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xea53f
jmp 0x41bea
xorl %r15d, %r15d
jmp 0x41c0a
testq %rax, %rax
je 0x41bb9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x41947
movl $0x18, %esi
movq %r14, %rdi
callq 0xe8b2b
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0xf3be6(%rip), %rdx     # 0x1357bd
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xea78f
movq 0x18(%r14), %rdi
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x1, %r9d
callq 0xefd48
movq %r14, %rdi
movq %r15, %rsi
callq 0xea50e
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x41947
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: de_module_emf
void de_module_emf(deark *c, struct deark_module_info *mi)
{
	mi->id = "emf";
	mi->desc = "Enhanced Windows Metafile";
	mi->desc2 = "extract bitmaps only";
	mi->run_fn = de_run_emf;
	mi->identify_fn = de_identify_emf;
}

// Assembly:
leaq 0xd9522(%rip), %rax     # 0x11b175
movq %rax, (%rsi)
leaq 0xd951c(%rip), %rax     # 0x11b179
movq %rax, 0x8(%rsi)
leaq 0xd952b(%rip), %rax     # 0x11b193
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x41c83
movq %rax, 0x18(%rsi)
leaq 0x266(%rip), %rax       # 0x41ee4
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: handler_CREATEPEN
static int handler_CREATEPEN(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 pos = dp->dpos;

	if(dp->dlen<20) return 1;
	read_object_index_p(c, d, &pos);
	read_LogPen(c, d, pos);
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq $0x14, 0x20(%rdx)
jl 0x421ea
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x42e5d
movq (%r14), %rax
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeed83
leaq 0xd97cd(%rip), %rsi     # 0x11b972
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeee2f
leaq 0xdcf13(%rip), %rsi     # 0x11f0d7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x4, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeed83
movq %rbx, %rdi
movl %eax, %esi
callq 0x42e03
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: handler_CREATEBRUSHINDIRECT
static int handler_CREATEBRUSHINDIRECT(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 pos = dp->dpos;

	if(dp->dlen<16) return 1;
	read_object_index_p(c, d, &pos);
	read_LogBrushEx(c, d, pos);
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq $0x10, 0x20(%rdx)
jl 0x4225e
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x42e5d
movq (%r14), %rax
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeed83
leaq 0xd9736(%rip), %rsi     # 0x11b972
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeed83
movq %rbx, %rdi
movl %eax, %esi
callq 0x42e03
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: emf_handler_4c
static int emf_handler_4c(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 rop;
	i64 bmi_offs;
	i64 bmi_len;
	i64 bits_offs;
	i64 bits_len;

	if(dp->recsize_bytes<100) return 1;

	rop = de_getu32le(dp->recpos+40);
	de_dbg(c, "raster operation: 0x%08x", (UI)rop);

	bmi_offs = de_getu32le(dp->recpos+84);
	bmi_len = de_getu32le(dp->recpos+88);
	de_dbg(c, "bmi offset=%"I64_FMT", len=%"I64_FMT, bmi_offs, bmi_len);
	bits_offs = de_getu32le(dp->recpos+92);
	bits_len = de_getu32le(dp->recpos+96);
	de_dbg(c, "bits offset=%"I64_FMT", len=%"I64_FMT, bits_offs, bits_len);

	if(bmi_len<12) return 1;
	if(bmi_offs<100) return 1;
	if(bmi_offs+bmi_len>dp->recsize_bytes) return 1;
	if(bits_len<1) return 1;
	if(bits_offs<100) return 1;
	if(bits_offs+bits_len>dp->recsize_bytes) return 1;
	extract_dib(c, d, dp->recpos+bmi_offs, bmi_len, dp->recpos+bits_offs, bits_len);
	return 1;
}

// Assembly:
cmpq $0x64, 0x10(%rdx)
jl 0x42beb
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x8(%rdx), %rsi
addq $0x28, %rsi
callq 0xeed61
leaq 0xd935d(%rip), %rsi     # 0x11be5d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x54, %rsi
callq 0xeed61
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x58, %rsi
callq 0xeed61
movq %rax, %r12
leaq 0xd933b(%rip), %rsi     # 0x11be76
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x5c, %rsi
callq 0xeed61
movq %rax, %r13
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x60, %rsi
callq 0xeed61
movq %rax, %rbp
leaq 0xd9314(%rip), %rsi     # 0x11be8e
movq %rbx, %rdi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
cmpq $0xc, %r12
setl %al
cmpq $0x64, %r15
setl %cl
orb %al, %cl
jne 0x42bdd
testq %rbp, %rbp
jle 0x42bdd
leaq (%r12,%r15), %rcx
movq 0x10(%r14), %rax
cmpq %rax, %rcx
jg 0x42bdd
cmpq $0x64, %r13
jl 0x42bdd
movq %rbp, %rcx
addq %r13, %rcx
cmpq %rax, %rcx
jg 0x42bdd
movq 0x8(%r14), %rax
addq %rax, %r15
addq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x42ec8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: emf_handler_50_51
static int emf_handler_50_51(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 rop;
	i64 bmi_offs;
	i64 bmi_len;
	i64 bits_offs;
	i64 bits_len;
	i64 fixed_header_len;
	i64 num_scans;

	if(dp->rectype==0x50)
		fixed_header_len = 76;
	else
		fixed_header_len = 80;

	if(dp->recsize_bytes<fixed_header_len) return 1;

	bmi_offs = de_getu32le(dp->recpos+48);
	bmi_len = de_getu32le(dp->recpos+52);
	de_dbg(c, "bmi offset=%"I64_FMT", len=%"I64_FMT, bmi_offs, bmi_len);
	bits_offs = de_getu32le(dp->recpos+56);
	bits_len = de_getu32le(dp->recpos+60);
	de_dbg(c, "bits offset=%"I64_FMT", len=%"I64_FMT, bits_offs, bits_len);

	if(dp->rectype==0x51) {
		rop = de_getu32le(dp->recpos+68);
		de_dbg(c, "raster operation: 0x%08x", (UI)rop);
	}

	if(dp->rectype==0x50) {
		num_scans = de_getu32le(dp->recpos+72);
		de_dbg(c, "number of scanlines: %u", (UI)num_scans);
	}

	if(bmi_len<12) return 1;
	if(bmi_offs<fixed_header_len) return 1;
	if(bmi_offs+bmi_len>dp->recsize_bytes) return 1;
	if(bits_len<1) return 1;
	if(bits_offs<fixed_header_len) return 1;
	if(bits_offs+bits_len>dp->recsize_bytes) return 1;
	extract_dib(c, d, dp->recpos+bmi_offs, bmi_len, dp->recpos+bits_offs, bits_len);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
cmpl $0x50, (%rdx)
setne %al
leaq 0x4c(,%rax,4), %r12
cmpq %r12, 0x10(%rdx)
jge 0x42c26
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x8(%rdx), %rsi
addq $0x30, %rsi
callq 0xeed61
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x34, %rsi
callq 0xeed61
leaq 0xd921e(%rip), %rsi     # 0x11be76
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, (%rsp)
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x38, %rsi
callq 0xeed61
movq %rax, %r13
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x3c, %rsi
callq 0xeed61
movq %rax, %rbp
leaq 0xd91f3(%rip), %rsi     # 0x11be8e
movq %rbx, %rdi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movl (%r14), %eax
cmpl $0x51, %eax
jne 0x42cda
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x44, %rsi
callq 0xeed61
leaq 0xd9192(%rip), %rsi     # 0x11be5d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl (%r14), %eax
cmpl $0x50, %eax
jne 0x42d03
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x48, %rsi
callq 0xeed61
leaq 0xd91bf(%rip), %rsi     # 0x11beb6
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq (%rsp), %rdx
cmpq $0xc, %rdx
jl 0x42c12
cmpq %r12, %r15
jl 0x42c12
testq %rbp, %rbp
jle 0x42c12
leaq (%rdx,%r15), %rcx
movq 0x10(%r14), %rax
cmpq %rax, %rcx
jg 0x42c12
cmpq %r12, %r13
jl 0x42c12
movq %rbp, %rcx
addq %r13, %rcx
cmpq %rax, %rcx
jg 0x42c12
movq 0x8(%r14), %rax
addq %rax, %r15
addq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %rbp, %r8
callq 0x42ec8
jmp 0x42c12
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/emf.c
// Function: handler_EXTCREATEFONTINDIRECTW
static int handler_EXTCREATEFONTINDIRECTW(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 pos = dp->dpos;
	i64 elw_size;

	read_object_index_p(c, d, &pos); // ihFonts

	// "If the size of the elw field is equal to or less than the size of a
	// LogFontPanose object, elw MUST be treated as a fixed-length LogFont object.
	// [Else LogFontExDv.] The size of a LogFontPanose object is 320 decimal."
	elw_size = dp->dlen - 4;

	if(elw_size<=320) {
		do_LogFont(c, d, dp, pos, elw_size);
	}
	else {
		do_LogFontExDv(c, d, dp, pos, elw_size);
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdx), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %r15, %rsi
callq 0x42e5d
movq 0x20(%rbx), %rdx
addq $-0x4, %rdx
movq (%r15), %rsi
movq %r14, %rdi
callq 0x4307b
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq