LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: do_wmf_record
static int do_wmf_record(deark *c, lctx *d, i64 recnum, i64 recpos,
	i64 recsize_bytes)
{
	const struct wmf_func_info *fnci;
	struct decoder_params dp;

	de_zeromem(&dp, sizeof(struct decoder_params));
	dp.recpos = recpos;
	dp.recsize_words = recsize_bytes*2;
	dp.recsize_bytes = recsize_bytes;
	dp.dpos = recpos + 6;
	dp.dlen = recsize_bytes - 6;

	dp.recfunc = (u16)de_getu16le(recpos+4);
	dp.rectype = (u8)(dp.recfunc&0xff);

	fnci = find_wmf_func_info(dp.recfunc);

	de_dbg(c, "record #%d at %d, func=0x%04x (%s), dpos=%d, dlen=%d", (int)recnum,
		(int)recpos, (unsigned int)dp.recfunc,
		fnci ? fnci->name : "?",
		(int)dp.dpos, (int)dp.dlen);

	de_dbg_indent(c, 1);
	if(fnci && (fnci->flags&0x1)) {
		on_create_object(c, d, &dp);
	}
	if(fnci && fnci->fn) {
		fnci->fn(c, d, &dp);
	}
	de_dbg_indent(c, -1);

	return (dp.rectype==0x00)?0:1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x19140
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
subq $0x6, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x165280
movw %ax, -0x60(%rbp)
movzwl -0x60(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5e(%rbp)
movzwl -0x60(%rbp), %edi
callq 0x139570
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x6c(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x68(%rbp)
movzwl -0x60(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1394a6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x1394b3
leaq 0x7e780(%rip), %rax     # 0x1b7c2d
movq %rax, -0x80(%rbp)
jmp 0x1394b3
movl -0x64(%rbp), %r8d
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %edx
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %r9
movq -0x40(%rbp), %rax
movl %eax, %r10d
movq -0x38(%rbp), %rax
leaq 0x930d2(%rip), %rsi     # 0x1cc5a9
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
cmpq $0x0, -0x30(%rbp)
je 0x13951c
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13951c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x1395f0
cmpq $0x0, -0x30(%rbp)
je 0x139544
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x139544
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq *%rax
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movzbl -0x5e(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: find_wmf_func_info
static const struct wmf_func_info *find_wmf_func_info(u16 recfunc)
{
	size_t i;
	u8 rectype_wanted = (u8)(recfunc&0xff);

	for(i=0; i<DE_ARRAYCOUNT(wmf_func_info_arr); i++) {
		if(wmf_func_info_arr[i].rectype == rectype_wanted) {
			return &wmf_func_info_arr[i];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
andl $0xff, %eax
movb %al, -0x19(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x46, -0x18(%rbp)
jae 0x1395d5
leaq 0xe9db3(%rip), %rax     # 0x223350
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1395c5
leaq 0xe9d99(%rip), %rax     # 0x223350
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1395dd
jmp 0x1395c7
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13958f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: on_create_object
static void on_create_object(deark *c, lctx *d, struct decoder_params *dp)
{
	unsigned int k;

	if(!d->object_table) return;
	// The CREATE* opcodes assign an object index to the new object.
	// Specifically, the first available index in the object table.
	// The encoder and decoder must be very careful to use exactly the same
	// algorithm for index assignment, or they could get out of sync.
	for(k=0; k<d->num_objects; k++) {
		if(d->object_table[k]==0) {
			d->object_table[k] = 1; // Mark this index as used
			de_dbg(c, "assigned object index: %u", k);
			return;
		}
	}
	de_warn(c, "Out of space in object table");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x139611
jmp 0x13967d
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x13966b
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x13965e
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movb $0x1, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x937af(%rip), %rsi     # 0x1cce04
movb $0x0, %al
callq 0x15b0d0
jmp 0x13967d
jmp 0x139660
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x139618
movq -0x8(%rbp), %rdi
leaq 0x937a8(%rip), %rsi     # 0x1cce1e
movb $0x0, %al
callq 0x15bc10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: handler_colorref
static int handler_colorref(deark *c, lctx *d, struct decoder_params *dp)
{
	u32 colorref;

	if(dp->dlen<4) goto done;
	colorref = (u32)de_getu32le(dp->dpos);
	do_dbg_colorref(c, d, dp, colorref);
done:
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x4, 0x28(%rax)
jge 0x1396b1
jmp 0x1396dd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x165540
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x13a380
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: wmf_handler_TEXTOUT
static int wmf_handler_TEXTOUT(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 pos = dp->dpos;
	i64 stringlen;
	de_ucstring *s = NULL;

	stringlen = de_getu16le(pos);
	pos += 2;

	if(pos+stringlen > dp->dpos+dp->dlen) goto done;
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, stringlen, DE_DBG_MAX_STRLEN, s,
		0, d->input_encoding);
	de_dbg(c, "text: \"%s\"", ucstring_getpsz(s));

done:
	ucstring_destroy(s);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x18(%rbp), %rdx
addq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jle 0x139758
jmp 0x1397b6
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x172500
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x8d2a3(%rip), %rsi     # 0x1c6a52
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rdi
callq 0x171750
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: wmf_handler_ESCAPE
static int wmf_handler_ESCAPE(deark *c, lctx *d, struct decoder_params *dp)
{
	u16 escfn;
	i64 bytecount = 0;
	const struct escape_info *einfo = NULL;
	const char *name;
	size_t k;

	escfn = (u16)de_getu16le(dp->dpos);

	// Find the name, etc. of this record type
	for(k=0; k<DE_ARRAYCOUNT(escape_info_arr); k++) {
		if(escape_info_arr[k].escfn == escfn) {
			einfo = &escape_info_arr[k];
			break;
		}
	}

	if(einfo && einfo->name)
		name = einfo->name;
	else
		name = "?";

	de_dbg(c, "escape function: 0x%04x (%s)", (unsigned int)escfn, name);

	if(dp->dlen>=4) {
		bytecount = de_getu16le(dp->dpos+2);
		de_dbg(c, "bytecount: %d (offset %d + %d = %d)", (int)bytecount,
			(int)(dp->dpos+4), (int)bytecount, (int)(dp->dpos+4+bytecount));
	}

	if(4+bytecount > dp->dlen) {
		goto done;
	}

	if(escfn==0x000f) {
		do_ESCAPE_MFCOMMENT(c, d, dp, bytecount);
	}

done:
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x165280
movw %ax, -0x1a(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x3c, -0x40(%rbp)
jae 0x139ad1
movq -0x40(%rbp), %rcx
leaq 0xe9f49(%rip), %rax     # 0x2239e0
shlq $0x4, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
movzwl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jne 0x139ac1
movq -0x40(%rbp), %rcx
leaq 0xe9f2c(%rip), %rax     # 0x2239e0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x139ad1
jmp 0x139ac3
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x139a85
cmpq $0x0, -0x30(%rbp)
je 0x139af1
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x139af1
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x139afc
leaq 0x7e135(%rip), %rax     # 0x1b7c2d
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movzwl -0x1a(%rbp), %edx
movq -0x38(%rbp), %rcx
leaq 0x92cda(%rip), %rsi     # 0x1cc7e9
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
cmpq $0x4, 0x28(%rax)
jl 0x139b7e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x4, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %eax, %r8d
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x4, %rax
addq -0x28(%rbp), %rax
movl %eax, %r9d
leaq 0x92c8f(%rip), %rsi     # 0x1cc806
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq -0x18(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jle 0x139b92
jmp 0x139bb2
movzwl -0x1a(%rbp), %eax
cmpl $0xf, %eax
jne 0x139bb0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x13a430
jmp 0x139bb2
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: handler_FILLREGION
static int handler_FILLREGION(deark *c, lctx *d, struct decoder_params *dp)
{
	unsigned int oi;
	i64 pos = dp->dpos;

	oi = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "region object index: %u", oi);
	oi = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "brush object index: %u", oi);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x930c9(%rip), %rsi     # 0x1ccccb
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x930b8(%rip), %rsi     # 0x1ccce3
movb $0x0, %al
callq 0x15b0d0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: wmf_handler_EXTTEXTOUT
static int wmf_handler_EXTTEXTOUT(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 pos = dp->dpos;
	i64 stringlen;
	de_ucstring *s = NULL;
	u32 fwOpts;

	pos += 4; // Y, X

	stringlen = de_getu16le(pos);
	pos += 2;

	fwOpts = (u32)de_getu16le(pos);
	pos += 2;

	if(fwOpts & 0x0004) {
		// My best guess is that this flag determines whether the
		// Rectangle field exists. The specification says the field is
		// optional, but AFAICT does not say how to tell whether it exists.
		pos += 8; // Rectangle
	}

	if(pos+stringlen > dp->dpos+dp->dlen) goto done;
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, stringlen, DE_DBG_MAX_STRLEN, s,
		0, d->input_encoding);
	de_dbg(c, "text: \"%s\"", ucstring_getpsz(s));

done:
	ucstring_destroy(s);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movl -0x34(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x139d1c
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x18(%rbp), %rdx
addq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jle 0x139d3b
jmp 0x139d99
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0x172500
movq -0x40(%rbp), %rdi
movq %rax, %rdx
leaq 0x8ccc0(%rip), %rsi     # 0x1c6a52
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rdi
callq 0x171750
movl $0x1, %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: wmf_handler_DIBSTRETCHBLT_STRETCHDIB
static int wmf_handler_DIBSTRETCHBLT_STRETCHDIB(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 dib_pos;
	i64 dib_len;
	int hdrsize;
	int has_src_bitmap = 1;

	if(dp->rectype==0x41) { // DIBSTRETCHBLT
		has_src_bitmap = (dp->recsize_words != ((i64)(dp->recfunc>>8)+3));
		de_dbg(c, "has src bitmap: %d", has_src_bitmap);
	}

	if(!has_src_bitmap) goto done;
	if(dp->rectype==0x41) // DIBSTRETCHBLT
		hdrsize = 26;
	else
		hdrsize = 28;

	if(dp->recsize_bytes < hdrsize) goto done;
	dib_pos = dp->recpos + hdrsize;
	dib_len = dp->recsize_bytes - hdrsize;
	if(dib_len < 12) goto done;
	de_dbg(c, "DIB at %d, size=%d", (int)dib_pos, (int)dib_len);

	de_dbg_indent(c, 1);
	de_run_module_by_id_on_slice(c, "dib", NULL, c->infile, dib_pos, dib_len);
	de_dbg_indent(c, -1);

done:
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x41, %eax
jne 0x139e14
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movzwl (%rcx), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
addq $0x3, %rcx
cmpq %rcx, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq 0x92956(%rip), %rsi     # 0x1cc763
movb $0x0, %al
callq 0x15b0d0
cmpl $0x0, -0x30(%rbp)
jne 0x139e1f
jmp 0x139edf
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x41, %eax
jne 0x139e35
movl $0x1a, -0x2c(%rbp)
jmp 0x139e3c
movl $0x1c, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x139e52
jmp 0x139edf
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0xc, -0x28(%rbp)
jge 0x139e81
jmp 0x139edf
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq 0x9293e(%rip), %rsi     # 0x1cc7d6
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq 0x74f2b(%rip), %rsi     # 0x1aedf3
xorl %eax, %eax
movl %eax, %edx
callq 0x15c9f0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: handler_DELETEOBJECT
static int handler_DELETEOBJECT(deark *c, lctx *d, struct decoder_params *dp)
{
	unsigned int oi;
	oi = (unsigned int)de_getu16le(dp->dpos);
	de_dbg(c, "object index: %u", oi);
	if(d->object_table && oi<d->num_objects) {
		d->object_table[oi] = 0; // Mark this index as available
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x165280
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x92ee3(%rip), %rsi     # 0x1cce0d
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x139f57
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x139f57
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: handler_CREATEFONTINDIRECT
static int handler_CREATEFONTINDIRECT(deark *c, lctx *d, struct decoder_params *dp)
{
	i64 facename_size;
	i64 n, n2;
	u8 b;
	i64 pos = dp->dpos;

	n = de_geti16le_p(&pos);
	n2 = de_geti16le_p(&pos);
	de_dbg(c, "height,width: %d,%d", (int)n, (int)n2);
	pos += 9;
	b = de_getbyte_p(&pos);
	de_dbg(c, "charset: 0x%02x (%s)", (unsigned int)b,
		fmtutil_get_windows_charset_name(b));

	facename_size = dp->dlen-18;
	if(facename_size>32) facename_size=32;
	if(facename_size>=2) {
		de_ucstring *facename = NULL;
		facename = ucstring_create(c);
		dbuf_read_to_ucstring(c->infile, dp->dpos+18, facename_size, facename,
			DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_WINDOWS1252);
		de_dbg(c, "facename: \"%s\"", ucstring_getpsz_d(facename));
		ucstring_destroy(facename);
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1653f0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1653f0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movl %eax, %ecx
leaq 0x6d992(%rip), %rsi     # 0x1a7b23
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x165170
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x31(%rbp), %eax
movl %eax, -0x4c(%rbp)
movzbl -0x31(%rbp), %edi
callq 0x174f50
movq -0x58(%rbp), %rdi
movl -0x4c(%rbp), %edx
movq %rax, %rcx
leaq 0x6d956(%rip), %rsi     # 0x1a7b37
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
subq $0x12, %rax
movq %rax, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jle 0x13a207
movq $0x20, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jl 0x13a27f
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x12, %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
movl $0x1, %r8d
movl $0x9, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rdi
callq 0x172650
movq -0x60(%rbp), %rdi
movq %rax, %rdx
leaq 0x6d8dd(%rip), %rsi     # 0x1a7b4c
movb $0x0, %al
callq 0x15b0d0
movq -0x48(%rbp), %rdi
callq 0x171750
movl $0x1, %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: handler_CREATEBRUSHINDIRECT
static int handler_CREATEBRUSHINDIRECT(deark *c, lctx *d, struct decoder_params *dp)
{
	unsigned int style;
	i64 pos = dp->dpos;

	if(dp->dlen<8) goto done;
	style = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "style: 0x%04x (%s)", style, get_brushstyle_name(style));

	if(style==0x0 || style==0x2) {
		u32 colorref;
		colorref = (u32)de_getu32le(pos);
		do_dbg_colorref(c, d, dp, colorref);
	}
	pos += 4;

	if(style==0x2) {
		unsigned int h;
		h = (unsigned int)de_getu16le(pos);
		de_dbg(c, "hatch: %u", h);
	}

done:
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x8, 0x28(%rax)
jge 0x13a2c0
jmp 0x13a373
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %edi
callq 0x13a870
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %edx
movq %rax, %rcx
leaq 0x92a3b(%rip), %rsi     # 0x1ccd36
movb $0x0, %al
callq 0x15b0d0
cmpl $0x0, -0x1c(%rbp)
je 0x13a30e
cmpl $0x2, -0x1c(%rbp)
jne 0x13a336
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165540
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x13a380
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x13a371
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165280
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq 0x92a4b(%rip), %rsi     # 0x1ccdb5
movb $0x0, %al
callq 0x15b0d0
jmp 0x13a373
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: do_ESCAPE_MFCOMMENT
static void do_ESCAPE_MFCOMMENT(deark *c, lctx *d, struct decoder_params *dp,
	i64 bytecount)
{
	i64 pos;
	i64 endpos;
	int commenttype = 0;
	const char *commenttype_name = "?";
	unsigned int sig;

	endpos = dp->dpos + dp->dlen;
	pos = dp->dpos+4; // Skip over EscapeFunction & ByteCount.
	if(pos+bytecount > endpos) goto done;

	if(bytecount>=4) {
		sig = (unsigned int)de_getu32le(pos);
		if(sig==0x43464d57U) {
			commenttype = 1;
			commenttype_name = "META_ESCAPE_ENHANCED_METAFILE";
		}
	}

	de_dbg(c, "identified as: %s", commenttype_name);
	if(commenttype==1) {
		do_ESCAPE_MFCOMMENT_EMF(c, d, dp, pos, bytecount);
	}
	else {
		de_dbg_hexdump(c, c->infile, pos, bytecount, 256, NULL, 0x1);
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
leaq 0x7d7d7(%rip), %rax     # 0x1b7c2d
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x28(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jle 0x13a491
jmp 0x13a52d
cmpq $0x4, -0x20(%rbp)
jl 0x13a4c9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165540
movl %eax, -0x44(%rbp)
cmpl $0x43464d57, -0x44(%rbp) # imm = 0x43464D57
jne 0x13a4c7
movl $0x1, -0x34(%rbp)
leaq 0x926a7(%rip), %rax     # 0x1ccb6a
movq %rax, -0x40(%rbp)
jmp 0x13a4c9
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x7c392(%rip), %rsi     # 0x1b686a
movb $0x0, %al
callq 0x15b0d0
cmpl $0x1, -0x34(%rbp)
jne 0x13a500
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0x13a540
jmp 0x13a52b
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
jmp 0x13a52d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: get_penbasestyle_name
static const char *get_penbasestyle_name(unsigned int n)
{
	static const char *names[9] = { "PS_SOLID", "PS_DASH", "PS_DOT", "PS_DASHDOT",
		"PS_DASHDOTDOT", "PS_NULL", "PS_INSIDEFRAME", "PS_USERSTYLE", "PS_ALTERNATE" };
	const char *name = NULL;

	if(n<=8) {
		name = names[n];
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
cmpl $0x8, -0x4(%rbp)
ja 0x13a849
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xeb06f(%rip), %rax     # 0x2258b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x13a85a
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x13a867
leaq 0x7d3cc(%rip), %rax     # 0x1b7c2d
movq %rax, -0x18(%rbp)
jmp 0x13a867
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wmf.c
// Function: get_brushstyle_name
static const char* get_brushstyle_name(unsigned int n)
{
	static const char *names[7] = { "BS_SOLID", "BS_NULL", "BS_HATCHED", "BS_PATTERN",
		NULL, "BS_DIBPATTERN", "BS_DIBPATTERNPT"};
	const char *name = NULL;

	if(n<=6) {
		name = names[n];
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
cmpl $0x6, -0x4(%rbp)
ja 0x13a899
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xeb06f(%rip), %rax     # 0x225900
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x13a8aa
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x13a8b7
leaq 0x7d37c(%rip), %rax     # 0x1b7c2d
movq %rax, -0x18(%rbp)
jmp 0x13a8b7
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: de_module_wpg
void de_module_wpg(deark *c, struct deark_module_info *mi)
{
	mi->id = "wpg";
	mi->desc = "WordPerfect Graphics";
	mi->run_fn = de_run_wpg;
	mi->identify_fn = de_identify_wpg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x92564(%rip), %rcx     # 0x1cce3b
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x9255a(%rip), %rcx     # 0x1cce3f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x13a910
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1cd(%rip), %rcx       # 0x13aad0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: de_run_wpg
static void de_run_wpg(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *s;
	i64 pos;

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

	d->opt_fixpal = 1;
	s = de_get_ext_option(c, "wpg:fixpal");
	if(s) d->opt_fixpal = de_atoi(s);

	pos = 0;
	if(!do_read_header(c, d, pos)) goto done;
	pos = d->start_of_data;

	do_set_default_palette(c, d);

	if(!do_record_area(c, d, pos)) goto done;

	// This debug line is mainly to help find interesting WPG files.
	de_dbg(c, "summary: ver=%d.%d dataver=%d pal=%d bitmaps=%d "
		"bitmapver=%d bpp=%d dimensions=%d"DE_CHAR_TIMES"%d%s%s",
		(int)d->ver_major, (int)d->ver_minor, d->start_wpg_data_record_ver,
		(int)d->num_pal_entries,
		(int)d->bitmap_count, d->bitmap_record_ver,
		(int)d->bpp_of_first_bitmap,
		(int)d->width_of_first_bitmap, (int)d->height_of_first_bitmap,
		d->has_eps1?" eps1":"", d->has_eps2?" eps2":"");

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movl $0x450, %esi            # imm = 0x450
callq 0x15b780
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x30(%rbp), %rdi
leaq 0x924fb(%rip), %rsi     # 0x1cce54
callq 0x15cb30
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x13a97b
movq -0x48(%rbp), %rdi
callq 0x15cca0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0xc(%rax)
movq $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x13ab40
cmpl $0x0, %eax
jne 0x13a99e
jmp 0x13aab1
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x13ac70
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x13acc0
cmpl $0x0, %eax
jne 0x13a9d1
jmp 0x13aab1
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rax
movzbl 0x8(%rax), %edx
movq -0x40(%rbp), %rax
movzbl 0x9(%rax), %ecx
movq -0x40(%rbp), %rax
movl 0x420(%rax), %r8d
movq -0x40(%rbp), %rax
movq 0x418(%rax), %rax
movl %eax, %r9d
movq -0x40(%rbp), %rax
movq 0x428(%rax), %rax
movl %eax, %r12d
movq -0x40(%rbp), %rax
movl 0x424(%rax), %r15d
movq -0x40(%rbp), %rax
movq 0x430(%rax), %rax
movl %eax, %r14d
movq -0x40(%rbp), %rax
movq 0x438(%rax), %rax
movl %eax, %ebx
movq -0x40(%rbp), %rax
movq 0x440(%rax), %rax
movl %eax, %r11d
movq -0x40(%rbp), %rax
movzbl 0x448(%rax), %esi
leaq 0x9617e(%rip), %r10     # 0x1d0bd0
leaq 0x92460(%rip), %rax     # 0x1cceb9
cmpl $0x0, %esi
cmovneq %rax, %r10
movq -0x40(%rbp), %rax
movzbl 0x449(%rax), %r13d
leaq 0x9615d(%rip), %rax     # 0x1d0bd0
leaq 0x92445(%rip), %rsi     # 0x1ccebf
cmpl $0x0, %r13d
cmovneq %rsi, %rax
leaq 0x923d6(%rip), %rsi     # 0x1cce5f
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x15b820
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: de_identify_wpg
static int de_identify_wpg(deark *c)
{
	u8 buf[10];
	de_read(buf, 0, 10);
	if(!de_memcmp(buf, "\xff\x57\x50\x43", 4) &&
		buf[8]==0x01 && buf[9]==0x16)
	{
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xa, %ecx
callq 0x164d10
leaq -0x1a(%rbp), %rax
movl (%rax), %eax
subl $0x435057ff, %eax       # imm = 0x435057FF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x13ab27
movzbl -0x12(%rbp), %eax
cmpl $0x1, %eax
jne 0x13ab27
movzbl -0x11(%rbp), %eax
cmpl $0x16, %eax
jne 0x13ab27
movl $0x64, -0x4(%rbp)
jmp 0x13ab2e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: do_read_header
static int do_read_header(deark *c, lctx *d, i64 pos1)
{
	i64 pos = pos1;

	de_dbg(c, "header at %d", (int)pos);
	de_dbg_indent(c, 1);

	pos += 4; // FileId

	d->start_of_data = de_getu32le(pos);
	de_dbg(c, "start of data: %u", (unsigned int)d->start_of_data);
	pos += 4;

	pos++; // ProductType
	pos++; // FileType

	d->ver_major = de_getbyte(pos++);
	d->ver_minor = de_getbyte(pos++);
	de_dbg(c, "version: %d.%d", (int)d->ver_major, (int)d->ver_minor);

	de_dbg_indent(c, -1);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x8a421(%rip), %rsi     # 0x1c4f8e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x92308(%rip), %rsi     # 0x1ccec5
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
callq 0x165060
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
callq 0x165060
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %edx
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %ecx
leaq 0x729d3(%rip), %rsi     # 0x1ad620
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: do_record_area
static int do_record_area(deark *c, lctx *d, i64 pos)
{
	de_dbg(c, "record area at %d", (int)pos);
	de_dbg_indent(c, 1);
	while(1) {
		i64 bytes_consumed = 0;
		int ret;

		if(pos >= c->infile->len) break;

		ret = do_record(c, d, pos, &bytes_consumed);
		if(!ret || bytes_consumed<1) break;

		pos += bytes_consumed;
	}

	de_dbg_indent(c, -1);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0x921f2(%rip), %rsi     # 0x1cced7
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x13ad16
jmp 0x13ad4b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x13ad70
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x13ad3b
cmpq $0x1, -0x20(%rbp)
jge 0x13ad3d
jmp 0x13ad4b
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x13acfa
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: find_wpg_rectype_info
static const struct wpg_rectype_info *find_wpg_rectype_info(u8 rectype)
{
	i64 i;
	for(i=0; i<(i64)DE_ARRAYCOUNT(wpg_rectype_info_arr); i++) {
		if(wpg_rectype_info_arr[i].rectype == rectype) {
			return &wpg_rectype_info_arr[i];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x1a, -0x18(%rbp)
jge 0x13af98
leaq 0xe8e40(%rip), %rax     # 0x223da0
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0x13af88
leaq 0xe8e26(%rip), %rax     # 0x223da0
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x13afa0
jmp 0x13af8a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13af52
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: handler_colormap
static void handler_colormap(deark *c, lctx *d, u8 rectype, i64 dpos1, i64 dlen)
{
	i64 start_index;
	i64 num_entries;
	i64 pos = dpos1;

	d->has_pal = 1;
	start_index = de_getu16le(pos);
	de_dbg(c, "start index: %d", (int)start_index);
	pos += 2;

	num_entries = de_getu16le(pos);
	de_dbg(c, "num entries: %d", (int)num_entries);
	pos += 2;

	if(start_index+num_entries>256) num_entries = 256 - start_index;
	if(start_index<0 || start_index+num_entries>256) return;

	if(num_entries > d->num_pal_entries) {
		d->num_pal_entries = num_entries;
	}

	de_read_palette_rgb(c->infile, pos, num_entries, 3, &d->pal[start_index],
		256-start_index, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x91d41(%rip), %rsi     # 0x1cd177
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x165280
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x6a6ac(%rip), %rsi     # 0x1a5b1b
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
cmpq $0x100, %rax            # imm = 0x100
jle 0x13b49f
movl $0x100, %eax            # imm = 0x100
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
jl 0x13b4b6
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
cmpq $0x100, %rax            # imm = 0x100
jle 0x13b4b8
jmp 0x13b518
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x418(%rcx), %rax
jle 0x13b4d8
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x418(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %r8
addq $0x14, %r8
movq -0x30(%rbp), %rax
shlq $0x2, %rax
addq %rax, %r8
movl $0x100, %r9d            # imm = 0x100
subq -0x30(%rbp), %r9
movl $0x3, %ecx
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c0c0
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wpg.c
// Function: handler_start_of_wpg_data
static void handler_start_of_wpg_data(deark *c, lctx *d, u8 rectype, i64 dpos1, i64 dlen)
{
	int record_version;

	if(rectype==0x19) {
		record_version = 2;
	}
	else {
		record_version = 1;
	}

	// Keep track of the highest record version found.
	if(record_version > d->start_wpg_data_record_ver) {
		d->start_wpg_data_record_ver = record_version;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x19, %eax
jne 0x13b54b
movl $0x2, -0x2c(%rbp)
jmp 0x13b552
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x420(%rcx), %eax
jle 0x13b56e
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x420(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: de_module_wri
void de_module_wri(deark *c, struct deark_module_info *mi)
{
	mi->id = "wri";
	mi->desc = "Microsoft Write";
	mi->run_fn = de_run_wri;
	mi->identify_fn = de_identify_wri;
	mi->help_fn = de_help_wri;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x91687(%rip), %rcx     # 0x1cd1ee
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x9167d(%rip), %rcx     # 0x1cd1f2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x13bbb0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x15d(%rip), %rcx       # 0x13bcf0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ee(%rip), %rcx       # 0x13bd90
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: de_run_wri
static void de_run_wri(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;

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

	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);
	d->extract_text = de_get_ext_option_bool(c, "wri:extracttext", 1);
	d->extract_ole = de_get_ext_option_bool(c, "wri:extractole",
		(c->extract_level>=2)?1:0);

	de_encconv_init(&d->es, d->input_encoding);

	d->tmpstr = ucstring_create(c);

	pos = 0;
	if(!do_header(c, d, pos)) goto done;
	if(d->extract_text) {
		do_html_begin(c, d);
	}

	do_para_info(c, d);

done:
	if(d) {
		do_html_end(c, d);
		ucstring_destroy(d->tmpstr);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0xa0, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x9, %edx
callq 0x15e4a0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x91602(%rip), %rsi     # 0x1cd202
movl $0x1, %edx
callq 0x15cbc0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x90(%rax), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x2, %ecx
cmovgel %eax, %edx
leaq 0x915de(%rip), %rsi     # 0x1cd212
callq 0x15cbc0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x160150
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x13bdd0
cmpl $0x0, %eax
jne 0x13bc8d
jmp 0x13bcb0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x13bca3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13c0a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13c260
cmpq $0x0, -0x18(%rbp)
je 0x13bcde
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13c310
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: de_identify_wri
static int de_identify_wri(deark *c)
{
	u8 buf[6];
	de_read(buf, 0, 6);

	if((buf[0]==0x31 || buf[0]==0x32) &&
		!de_memcmp(&buf[1], "\xbe\x00\x00\x00\xab", 5))
	{
		i64 pnMac;
		pnMac = de_getu16le(48*2);
		if(pnMac==0) return 0; // Apparently MSWord, not Write
		return 100;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x16(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x6, %ecx
callq 0x164d10
movzbl -0x16(%rbp), %eax
cmpl $0x31, %eax
je 0x13bd28
movzbl -0x16(%rbp), %eax
cmpl $0x32, %eax
jne 0x13bd75
leaq -0x16(%rbp), %rdi
addq $0x1, %rdi
leaq 0x914b1(%rip), %rsi     # 0x1cd1e8
movl $0x5, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x13bd75
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x60, %esi
callq 0x165280
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x13bd6c
movl $0x0, -0x4(%rbp)
jmp 0x13bd7c
movl $0x64, -0x4(%rbp)
jmp 0x13bd7c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: do_para_info
static void do_para_info(deark *c, lctx *d)
{
	i64 i;

	if(d->pnPara_npages<1) return;
	de_dbg(c, "paragraph info at %d, len=%d page(s)", (int)d->pnPara_offs, (int)d->pnPara_npages);

	de_dbg_indent(c, 1);
	for(i=0; i<d->pnPara_npages; i++) {
		do_para_info_page(c, d, d->pnPara_offs + 128*i);
	}
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x38(%rax)
jge 0x13c280
jmp 0x13c306
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %ecx
leaq 0x911db(%rip), %rsi     # 0x1cd47a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jge 0x13c2f8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x18(%rbp), %rax
shlq $0x7, %rax
addq %rax, %rdx
callq 0x13c360
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13c2bc
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: do_html_end
static void do_html_end(deark *c, lctx *d)
{
	if(!d->html_outf) return;
	dbuf_puts(d->html_outf, "</body>\n</html>\n");
	dbuf_close(d->html_outf);
	d->html_outf = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x13c32d
jmp 0x13c35a
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
leaq 0x9149d(%rip), %rsi     # 0x1cd7d9
callq 0x168da0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
movq $0x0, 0x70(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: do_paragraph
static void do_paragraph(deark *c, lctx *d, struct para_info *pinfo)
{
	if(pinfo->papflags&0x10) {
		de_dbg(c, "picture at %d, len=%d", (int)pinfo->thisparapos,
			(int)pinfo->thisparalen);
		de_dbg_indent(c, 1);
		do_picture(c, d, pinfo);
		de_dbg_indent(c, -1);
	}
	else {
		de_dbg(c, "text paragraph at %d, len=%d", (int)pinfo->thisparapos,
			(int)pinfo->thisparalen);
		do_text_paragraph(c, d, pinfo);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x18(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x13c938
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
leaq 0x90cd1(%rip), %rsi     # 0x1cd5d3
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x13c980
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0x13c96e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
leaq 0x90c93(%rip), %rsi     # 0x1cd5e9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x13cbe0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: get_picture_storage_type_name
static const char *get_picture_storage_type_name(unsigned int t)
{
	const char *name;
	switch(t) {
	case WRI_STG_METAFILE: name="metafile"; break;
	case WRI_STG_BITMAP: name="bitmap"; break;
	case WRI_STG_OLE: name="OLE object"; break;
	default: name="?"; break;
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x88, %eax
je 0x13cfde
jmp 0x13cfc6
movl -0x14(%rbp), %eax
subl $0xe3, %eax
je 0x13cfeb
jmp 0x13cfd2
movl -0x14(%rbp), %eax
subl $0xe4, %eax
je 0x13cff8
jmp 0x13d005
leaq 0x89bf3(%rip), %rax     # 0x1c6bd8
movq %rax, -0x10(%rbp)
jmp 0x13d010
leaq 0x666b2(%rip), %rax     # 0x1a36a4
movq %rax, -0x10(%rbp)
jmp 0x13d010
leaq 0x9067a(%rip), %rax     # 0x1cd679
movq %rax, -0x10(%rbp)
jmp 0x13d010
leaq 0x7ac21(%rip), %rax     # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)