LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: de_identify_ldog_com
static int de_identify_ldog_com(deark *c)
{
	if(c->infile->len>65280) return 0;
	if(de_getbyte(0) != 0x06) return 0;

	if(dbuf_memcmp(c->infile, 1,
		(const void*)"\xb4\x0f\xcd\x10\x3c\x07\x74\x06\xb8\x00\xb8\xeb\x04\x90\xb8", 15))
	{
		return 0;
	}
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x406d7
movl $0x0, -0x4(%rbp)
jmp 0x4072c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movzbl %al, %eax
cmpl $0x6, %eax
je 0x406f9
movl $0x0, -0x4(%rbp)
jmp 0x4072c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
leaq 0x162ca1(%rip), %rdx    # 0x1a33ae
movl $0xf, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x40725
movl $0x0, -0x4(%rbp)
jmp 0x4072c
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: de_module_grabber
void de_module_grabber(deark *c, struct deark_module_info *mi)
{
	mi->id = "grabber";
	mi->desc = "GRABBER";
	mi->run_fn = de_run_grabber;
	mi->identify_fn = de_identify_grabber;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16279e(%rip), %rcx    # 0x1a2ef5
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x162798(%rip), %rcx    # 0x1a2efd
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x407a0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x27d(%rip), %rcx       # 0x40a00
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: de_identify_grabber
static int de_identify_grabber(deark *c)
{
	struct grabber_id_data gi;
	u8 b0;

	if(c->infile->len>65280) return 0;
	b0 = de_getbyte(0);
	if(b0!=0xe9 && b0!=0xfb) return 0;

	grabber_id_com(c, b0, &gi);
	if(gi.is_grabber) return 100;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0xff00, 0x18(%rax)     # imm = 0xFF00
jle 0x40a27
movl $0x0, -0x4(%rbp)
jmp 0x40a81
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165060
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0xe9, %eax
je 0x40a5a
movzbl -0x21(%rbp), %eax
cmpl $0xfb, %eax
je 0x40a5a
movl $0x0, -0x4(%rbp)
jmp 0x40a81
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rdx
movzbl -0x21(%rbp), %esi
callq 0x41aa0
cmpb $0x0, -0x20(%rbp)
je 0x40a7a
movl $0x64, -0x4(%rbp)
jmp 0x40a81
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: do_read_palette
static void do_read_palette(deark *c, lctx *d,struct de_char_context *charctx,
	i64 pos, int adf_style)
{
	i64 k;
	u8 cr1, cg1, cb1;
	u8 cr2, cg2, cb2;
	i64 cpos;
	char tmps[64];

	de_dbg(c, "palette at %"I64_FMT, pos);

	for(k=0; k<16; k++) {
		i64 idx = k;

		if(adf_style) {
			if(k>=8) idx = 48+k;
			else if(k==6) idx = 20;
		}
		cpos = pos + idx*3;
		cr1 = de_getbyte(cpos);
		cg1 = de_getbyte(cpos+1);
		cb1 = de_getbyte(cpos+2);
		cr2 = de_scale_63_to_255(cr1);
		cg2 = de_scale_63_to_255(cg1);
		cb2 = de_scale_63_to_255(cb1);
		charctx->pal[k] = DE_MAKE_RGB(cr2, cg2, cb2);
		de_snprintf(tmps, sizeof(tmps), "(%2d,%2d,%2d) "DE_CHAR_RIGHTARROW" ",
			(int)cr1, (int)cg1, (int)cb1);
		de_dbg_pal_entry2(c, k, charctx->pal[k], tmps, NULL, NULL);
	}
}

// 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)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x18142f(%rip), %rsi    # 0x1c1eed
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x30(%rbp)
cmpq $0x10, -0x30(%rbp)
jge 0x40c15
movq -0x30(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x40b17
cmpq $0x8, -0x30(%rbp)
jl 0x40b01
movq -0x30(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x88(%rbp)
jmp 0x40b15
cmpq $0x6, -0x30(%rbp)
jne 0x40b13
movq $0x14, -0x88(%rbp)
jmp 0x40b15
jmp 0x40b17
movq -0x20(%rbp), %rax
imulq $0x3, -0x88(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x165060
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
addq $0x1, %rsi
callq 0x165060
movb %al, -0x32(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
addq $0x2, %rsi
callq 0x165060
movb %al, -0x33(%rbp)
movzbl -0x31(%rbp), %edi
callq 0x161710
movb %al, -0x34(%rbp)
movzbl -0x32(%rbp), %edi
callq 0x161710
movb %al, -0x35(%rbp)
movzbl -0x33(%rbp), %edi
callq 0x161710
movb %al, -0x36(%rbp)
movzbl -0x34(%rbp), %edx
shll $0x10, %edx
orl $0xff000000, %edx       # imm = 0xFF000000
movzbl -0x35(%rbp), %eax
shll $0x8, %eax
orl %eax, %edx
movzbl -0x36(%rbp), %eax
orl %eax, %edx
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movl %edx, 0x20(%rax,%rcx,4)
leaq -0x80(%rbp), %rdi
movzbl -0x31(%rbp), %ecx
movzbl -0x32(%rbp), %r8d
movzbl -0x33(%rbp), %r9d
movl $0x40, %esi
leaq 0x15c399(%rip), %rdx    # 0x19cf71
movb $0x0, %al
callq 0x15a980
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rax,%rcx,4), %edx
leaq -0x80(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x15bdb0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x40acd
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: do_read_font_data
static void do_read_font_data(deark *c, lctx *d, i64 pos)
{
	u32 crc;
	struct de_crcobj *crco;

	de_dbg(c, "font at %"I64_FMT", %"I64_FMT" bytes", pos, d->font_data_len);
	de_dbg_indent(c, 1);
	d->font_data = de_malloc(c, d->font_data_len);
	de_read(d->font_data, pos, d->font_data_len);

	crco = de_crcobj_create(c, DE_CRCOBJ_CRC32_IEEE);
	de_crcobj_addbuf(crco, d->font_data, d->font_data_len);
	crc = de_crcobj_getval(crco);
	de_crcobj_destroy(crco);

	d->is_standard_font = de_font_is_standard_vga_font(c, crc);
	de_dbg(c, "font crc: 0x%08x (%s)", (UI)crc,
		d->is_standard_font?"known CP437 font":"unrecognized");

	if(de_get_ext_option(c, "font:dumpvgafont")) {
		dbuf *df;
		df = dbuf_create_output_file(c, "font.dat", NULL, DE_CREATEFLAG_IS_AUX);
		dbuf_write(df, d->font_data, d->font_data_len);
		dbuf_close(df);
	}
	de_dbg_indent(c, -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), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq 0x1623ca(%rip), %rsi    # 0x1a3015
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0x164d10
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x15eac0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x15f430
movq -0x28(%rbp), %rdi
callq 0x15f340
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x15f2e0
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x171170
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
leaq 0x16234c(%rip), %rcx    # 0x1a3053
leaq 0x162334(%rip), %rax    # 0x1a3042
cmpl $0x0, %esi
cmovneq %rax, %rcx
leaq 0x162310(%rip), %rsi    # 0x1a302c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
leaq 0x162332(%rip), %rsi    # 0x1a3060
callq 0x15cb30
cmpq $0x0, %rax
je 0x40d78
movq -0x8(%rbp), %rdi
leaq 0x16232d(%rip), %rsi    # 0x1a3071
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x166170
movq -0x30(%rbp), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: do_extract_font
static void do_extract_font(deark *c, lctx *d)
{
	de_finfo *fi = NULL;

	if(!d->has_font || !d->font) return;
	fi = de_finfo_create(c);
	de_finfo_set_name_from_sz(c, fi, "font", 0, DE_ENCODING_ASCII);

	de_font_bitmap_font_to_image(c, d->font, fi, DE_CREATEFLAG_IS_AUX);

	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0x40fcd
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x40fcf
jmp 0x4101f
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x18108f(%rip), %rdx    # 0x1c207a
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x15d4c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rdx
movl $0x1, %ecx
callq 0x16fe80
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15d260
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: free_lctx
static void free_lctx(deark *c, lctx *d)
{
	if(d->font) {
		de_free(c, d->font->char_array);
		de_destroy_bitmap_font(c, d->font);
	}
	de_free(c, d->font_data);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x412c1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x16f730
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: read_and_discard_SAUCE
static void read_and_discard_SAUCE(deark *c)
{
	struct de_SAUCE_detection_data sdd;

	fmtutil_detect_SAUCE(c, c->infile, &sdd, 0x1);
	if(sdd.has_SAUCE) {
		// Read the SAUCE record if present, just for the debugging info.
		struct de_SAUCE_info *si = NULL;

		si = fmtutil_create_SAUCE(c);

		de_dbg_indent(c, 1);
		fmtutil_handle_SAUCE(c, c->infile, si);
		de_dbg_indent(c, -1);

		fmtutil_free_SAUCE(c, si);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0xb(%rbp), %rdx
movl $0x1, %ecx
callq 0x173ca0
cmpb $0x0, -0xb(%rbp)
je 0x4136f
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x173e20
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x173db0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x173e40
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: tdc_decrunch_emit_char
static void tdc_decrunch_emit_char(deark *c, struct thedrawcom_ctx *tdc, u8 ch)
{
	if(!tdc->dc.prescan_mode) {
		dbuf_writebyte(tdc->unc_data, ch);
		dbuf_writebyte(tdc->unc_data, (u8)(tdc->dc.curr_blink_code |
			tdc->dc.curr_bg_code | tdc->dc.curr_fg_code));
	}
	if(tdc->dc.next_xpos > tdc->dc.max_xpos) {
		tdc->dc.max_xpos = tdc->dc.next_xpos;
	}
	if(tdc->dc.next_ypos > tdc->dc.max_ypos) {
		tdc->dc.max_ypos = tdc->dc.next_ypos;
	}
	if(ch!=0 && ch!=32 && tdc->dc.next_ypos>tdc->dc.ypos_of_last_nonblank) {
		tdc->dc.ypos_of_last_nonblank = tdc->dc.next_ypos;
	}
	tdc->dc.next_xpos++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x58(%rax)
jne 0x4182c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movzbl -0x11(%rbp), %esi
callq 0x168380
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0x5b(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x5a(%rcx), %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movzbl 0x59(%rcx), %ecx
orl %ecx, %eax
movzbl %al, %esi
callq 0x168380
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x70(%rcx), %rax
jle 0x4184e
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jle 0x41870
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x418aa
movzbl -0x11(%rbp), %eax
cmpl $0x20, %eax
je 0x418aa
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jle 0x418aa
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: aciddraw_id
static void aciddraw_id(deark *c, u8 b0, struct aciddraw_id_data *adi)
{
	de_zeromem(adi, sizeof(struct aciddraw_id_data));
	if(b0==0xe9) {
		adi->jmppos = de_geti16le(1) + 3;
	}
	else if(b0==0xeb) {
		adi->jmppos = de_getbyte(1) + 2;
	}
	else {
		return;
	}

	if(dbuf_memcmp(c->infile, adi->jmppos,
		(const void*)"\xb8\x03\x00\xcd\x10\xb4\x01\xb9\x00\x20\xcd\x10\xe8", 13))
	{
		return;
	}
	adi->is_aciddraw = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movzbl -0x9(%rbp), %eax
cmpl $0xe9, %eax
jne 0x41914
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x165360
movq %rax, %rcx
addq $0x3, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x41948
movzbl -0x9(%rbp), %eax
cmpl $0xeb, %eax
jne 0x41944
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x165060
movzbl %al, %eax
addl $0x2, %eax
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x41946
jmp 0x41977
jmp 0x41948
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x16146b(%rip), %rdx    # 0x1a2dca
movl $0xd, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x41970
jmp 0x41977
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: aciddraw_handle_SAUCE
static void aciddraw_handle_SAUCE(deark *c, struct aciddraw_ctx *adctx)
{
	struct de_SAUCE_detection_data sdd;

	fmtutil_detect_SAUCE(c, c->infile, &sdd, 0x1);
	if(!sdd.has_SAUCE) goto done;

	adctx->si = fmtutil_create_SAUCE(c);
	de_dbg_indent(c, 1);
	fmtutil_handle_SAUCE(c, c->infile, adctx->si);
	de_dbg_indent(c, -1);
	if(!adctx->si->is_valid) goto done;

	adctx->charctx->title = adctx->si->title;
	adctx->charctx->artist = adctx->si->artist;
	adctx->charctx->organization = adctx->si->organization;
	adctx->charctx->creation_date = adctx->si->creation_date;
	adctx->charctx->comment = adctx->si->comment;

	// Note about blinking text:
	// ACiDDraw has a nonblink mode (Ctrl+Z), but the COM files it writes do
	// not record or respect this mode in any way, even if a SAUCE record is
	// written. They just use whatever mode the video hardware is in, which
	// is usually the mode with blinking text.
	// So we don't bother to respect the SAUCE flag.
	// (ACiDDraw does have a separate BLINK.EXE utility that changes the mode,
	// which could maybe be useful in batch files.)

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x13(%rbp), %rdx
movl $0x1, %ecx
callq 0x173ca0
cmpb $0x0, -0x13(%rbp)
jne 0x419b5
jmp 0x41a99
movq -0x8(%rbp), %rdi
callq 0x173e20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x173db0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
jne 0x41a10
jmp 0x41a99
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x80(%rax)
movq 0x28(%rcx), %rcx
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x90(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bintext.c
// Function: grabber_id_com
static void grabber_id_com(deark *c, u8 b0, struct grabber_id_data *gi)
{
	de_zeromem(gi, sizeof(struct grabber_id_data));

	if(b0==0xfb) {
		if(!dbuf_memcmp(c->infile, 1,
			(const void*)"\xbe\x81\x00\x8a\x4c\xff\x30\xed\x09\xc9\x74", 11)) {
			gi->is_grabber = 1;
			gi->fmt_class = 200;
		}
		return;
	}

	if(b0!=0xe9) return;
	gi->jmppos = de_geti16le(1) + 3;

	if(!dbuf_memcmp(c->infile, gi->jmppos,
		(const void*)"\xbe\x81\x00\xad\x80\xfc\x0d\x74\x17\x3c\x0d\x74", 12))
	{
		gi->is_grabber = 1;
		gi->fmt_class = 300;
		return;
	}
	if(!dbuf_memcmp(c->infile, gi->jmppos,
		(const void*)"\xbe\x81\x00\xfc\xad\x80\xfc\x0d\x74\x1c\x3c\x0d\x74", 13))
	{
		gi->is_grabber = 1;
		gi->fmt_class = 334;
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x19140
movzbl -0x9(%rbp), %eax
cmpl $0xfb, %eax
jne 0x41b0b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
leaq 0x1612f3(%rip), %rdx    # 0x1a2dd8
movl $0xb, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x41b06
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0xc8, 0x4(%rax)
jmp 0x41bae
movzbl -0x9(%rbp), %eax
cmpl $0xe9, %eax
je 0x41b1b
jmp 0x41bae
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x165360
movq %rax, %rcx
addq $0x3, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x161291(%rip), %rdx    # 0x1a2de4
movl $0xc, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x41b76
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0x12c, 0x4(%rax)       # imm = 0x12C
jmp 0x41bae
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x161264(%rip), %rdx    # 0x1a2df1
movl $0xd, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x41bae
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0x14e, 0x4(%rax)       # imm = 0x14E
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: de_module_bmi
void de_module_bmi(deark *c, struct deark_module_info *mi)
{
	mi->id = "bmi";
	mi->desc = "Zoner BMI bitmap";
	mi->run_fn = de_run_bmi;
	mi->identify_fn = de_identify_bmi;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x161607(%rip), %rcx    # 0x1a33be
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1615fd(%rip), %rcx    # 0x1a33c2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x41df0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x11d(%rip), %rcx       # 0x41f00
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: de_run_bmi
static void de_run_bmi(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos = 0;

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

	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);

	if(!do_header(c, d, pos)) goto done;
	pos += d->fixed_header_size;

	if(d->globalimg.num_pal_entries>0) {
		read_palette(c, d, &d->globalimg, pos);
		pos += 4*d->globalimg.num_pal_entries;
	}

	if(!do_read_table(c, d, pos)) goto done;
	do_comments(c, d);
	do_bitmaps(c, d);

done:
	if(d) {
		de_free(c, d->table);
		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 $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x448, %esi            # imm = 0x448
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, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x41f50
cmpl $0x0, %eax
jne 0x41e54
jmp 0x41ece
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jle 0x41e9c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
movq -0x20(%rbp), %rcx
callq 0x42120
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
shlq $0x2, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x421c0
cmpl $0x0, %eax
jne 0x41eb4
jmp 0x41ece
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x42310
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x42390
cmpq $0x0, -0x18(%rbp)
je 0x41ef3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: read_palette
static void read_palette(deark *c, lctx *d, struct imageinfo *ii, i64 pos1)
{
	if(ii->num_pal_entries<1) return;
	de_dbg(c, "palette at %"I64_FMT", %d entries", pos1, (int)ii->num_pal_entries);
	de_dbg_indent(c, 1);
	de_read_palette_rgb(c->infile, pos1, ii->num_pal_entries, 4,
		ii->pal, 256, DE_GETRGBFLAG_BGR);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x20(%rax)
jge 0x42145
jmp 0x421b4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %ecx
leaq 0x16129b(%rip), %rsi    # 0x1a33f9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x18(%rbp), %r8
addq $0x28, %r8
movl $0x4, %ecx
movl $0x100, %r9d            # imm = 0x100
movl $0x1, (%rsp)
callq 0x16c0c0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: do_read_table
static int do_read_table(deark *c, lctx *d, i64 pos1)
{
	i64 pos = pos1;
	i64 k;

	de_dbg(c, "table at %d, %d items", (int)pos1, (int)d->num_table_items);
	d->table = de_mallocarray(c, d->num_table_items, sizeof(struct table_item));

	de_dbg_indent(c, 1);

	for(k=0; k<d->num_table_items; k++) {
		d->table[k].tag_num = (unsigned int)de_getu16le_p(&pos);
		d->table[k].tag_offs = de_getu32le_p(&pos);
		de_dbg(c, "item[%d]: tag=0x%x, offset=%"I64_FMT, (int)k,
			d->table[k].tag_num, d->table[k].tag_offs);
	}

	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 -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %ecx
leaq 0x16121d(%rip), %rsi    # 0x1a3414
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x10, %edx
callq 0x15c450
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x422ef
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq 0x8(%rax), %r8
leaq 0x161153(%rip), %rsi    # 0x1a342a
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x42235
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: do_comments
static void do_comments(deark *c, lctx *d)
{
	i64 k;

	for(k=0; k<d->num_table_items; k++) {
		if(d->table[k].tag_num==0x0003) {
			do_comment(c, d, k, d->table[k].tag_offs);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x42386
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x42376
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
callq 0x42410
jmp 0x42378
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x42328
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: do_bitmaps
static void do_bitmaps(deark *c, lctx *d)
{
	i64 k;

	for(k=0; k<d->num_table_items; k++) {
		if(d->table[k].tag_num==0x0001) {
			do_bitmap(c, d, d->table[k].tag_offs);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x42402
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x423f2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
callq 0x424e0
jmp 0x423f4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x423a8
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmi.c
// Function: do_comment
static void do_comment(deark *c, lctx *d, i64 idx, i64 pos1)
{
	de_ucstring *s = NULL;
	i64 cmt_len;
	i64 pos = pos1;

	pos += 2;
	cmt_len = de_getu32le_p(&pos);
	pos += 2;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, pos, cmt_len, DE_DBG_MAX_STRLEN, s,
		DE_CONVFLAG_STOP_AT_NUL, d->input_encoding);
	de_dbg(c, "comment (item[%d]): \"%s\"", (int)idx, ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// 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)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165580
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x1, %r9d
movl %eax, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %edx
movq %rax, %rcx
leaq 0x160f81(%rip), %rsi    # 0x1a3449
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_bmp
void de_module_bmp(deark *c, struct deark_module_info *mi)
{
	mi->id = "bmp";
	mi->desc = "BMP (Windows or OS/2 bitmap)";
	mi->run_fn = de_run_bmp;
	mi->identify_fn = de_identify_bmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16a300(%rip), %rcx    # 0x1acd07
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x160c2b(%rip), %rcx    # 0x1a3640
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x42a40
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3bd(%rip), %rcx       # 0x42df0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_picjpeg
void de_module_picjpeg(deark *c, struct deark_module_info *mi)
{
	mi->id = "picjpeg";
	mi->desc = "Pegasus JPEG, and KQP";
	mi->run_fn = de_run_picjpeg;
	mi->identify_fn = de_identify_picjpeg;
	mi->id_alias[0] = "kqp";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x160686(%rip), %rcx    # 0x1a365d
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x160680(%rip), %rcx    # 0x1a3665
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x43020
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x5bd(%rip), %rcx       # 0x435c0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x160669(%rip), %rcx    # 0x1a367b
movq %rcx, 0x38(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_identify_picjpeg
static int de_identify_picjpeg(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, (const void*)"BM", 2)) return 0;
	if(de_getu32le(14) != 68) return 0;
	if((UI)de_getu32le(30) != 0x4745504aU) return 0;
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x16470b(%rip), %rdx    # 0x1a7cea
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x435f7
movl $0x0, -0x4(%rbp)
jmp 0x43641
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0xe, %esi
callq 0x165540
cmpq $0x44, %rax
je 0x43618
movl $0x0, -0x4(%rbp)
jmp 0x43641
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x1e, %esi
callq 0x165540
cmpl $0x4745504a, %eax       # imm = 0x4745504A
je 0x4363a
movl $0x0, -0x4(%rbp)
jmp 0x43641
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_dib
void de_module_dib(deark *c, struct deark_module_info *mi)
{
	mi->id = "dib";
	mi->desc = "DIB (raw Windows bitmap)";
	mi->run_fn = de_run_dib;
	mi->identify_fn = de_identify_dib;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16b78c(%rip), %rcx    # 0x1aedf3
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x16000a(%rip), %rcx    # 0x1a367f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x436a0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x20d(%rip), %rcx       # 0x438a0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_identify_dib
static int de_identify_dib(deark *c)
{
	i64 n;

	n = de_getu32le(0); // biSize
	if(n!=40) return 0;
	n = de_getu16le(12); // biPlanes
	if(n!=1) return 0;
	n = de_getu16le(14); // biBitCount
	if(n==1 || n==4 || n==8 || n==16 || n==24 || n==32) return 15;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
cmpq $0x28, -0x18(%rbp)
je 0x438d1
movl $0x0, -0x4(%rbp)
jmp 0x43947
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0xc, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
je 0x438f7
movl $0x0, -0x4(%rbp)
jmp 0x43947
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0xe, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
je 0x43937
cmpq $0x4, -0x18(%rbp)
je 0x43937
cmpq $0x8, -0x18(%rbp)
je 0x43937
cmpq $0x10, -0x18(%rbp)
je 0x43937
cmpq $0x18, -0x18(%rbp)
je 0x43937
cmpq $0x20, -0x18(%rbp)
jne 0x43940
movl $0xf, -0x4(%rbp)
jmp 0x43947
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_ddb
void de_module_ddb(deark *c, struct deark_module_info *mi)
{
	mi->id = "ddb";
	mi->desc = "Windows DDB bitmap";
	mi->run_fn = de_run_ddb;
	mi->identify_fn = NULL;
	mi->flags |= DE_MODFLAG_HIDDEN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16b44a(%rip), %rcx    # 0x1aedb1
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x15fd23(%rip), %rcx    # 0x1a3698
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x439b0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_run_ddb
static void de_run_ddb(deark *c, de_module_params *mparams)
{
	int has_filetype = 1;
	struct ddbctx_struct *d = NULL;
	i64 pos = 0;

	d = de_malloc(c, sizeof(struct ddbctx_struct));
	d->createflags = 0;

	if(de_havemodcode(c, mparams, 'N')) {
		has_filetype = 0;
	}
	if(de_havemodcode(c, mparams, 'X')) {
		d->createflags |= DE_CREATEFLAG_IS_AUX;
	}
	if(!c->padpix) {
		d->cdr_adjdim_flag = (u8)de_havemodcode(c, mparams, 'C');
	}
	if(mparams) {
		if(mparams->in_params.fi) {
			d->fi = mparams->in_params.fi;
		}
		// If not NULL, obj1 points to the  palette to use (must be de_color[256]).
		if(mparams->in_params.obj1) {
			d->have_custom_pal = 1;
			de_memcpy(d->pal, mparams->in_params.obj1, 256*sizeof(de_color));
		}
	}

	if(has_filetype) {
		UI file_type;
		file_type = (UI)de_getu16le_p(&pos);
		de_dbg(c, "file type: 0x%04x", file_type);
	}

	do_ddb_bitmap(c, d, pos);

	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x420, %esi            # imm = 0x420
callq 0x15b780
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4e, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0x43a12
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x58, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0x43a36
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd5(%rax)
jne 0x43a5e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x43, %edx
callq 0x15d1d0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xc(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x43aaf
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x43a80
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x43aad
movq -0x20(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x191e0
jmp 0x43aaf
cmpl $0x0, -0x14(%rbp)
je 0x43ade
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %edx
leaq 0x15d508(%rip), %rsi    # 0x1a0fdf
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x46d30
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_winzle
void de_module_winzle(deark *c, struct deark_module_info *mi)
{
	mi->id = "winzle";
	mi->desc = "Winzle! puzzle image";
	mi->run_fn = de_run_winzle;
	mi->identify_fn = de_identify_winzle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x15fb84(%rip), %rcx    # 0x1a36ab
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x15fb7d(%rip), %rcx    # 0x1a36b2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x43b60
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x15d(%rip), %rcx       # 0x43cb0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_run_winzle
static void de_run_winzle(deark *c, de_module_params *mparams)
{
	u8 buf[256];
	i64 xorsize;
	i64 i;
	dbuf *f = NULL;

	xorsize = c->infile->len >= 256 ? 256 : c->infile->len;
	de_read(buf, 0, xorsize);
	for(i=0; i<xorsize; i++) {
		buf[i] ^= 0x0d;
	}

	f = dbuf_create_output_file(c, "bmp", NULL, 0);
	dbuf_write(f, buf, xorsize);
	if(c->infile->len > 256) {
		dbuf_copy(c->infile, 256, c->infile->len - 256, f);
	}
	dbuf_close(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x128(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x100, 0x18(%rax)      # imm = 0x100
jl 0x43b9e
movl $0x100, %eax            # imm = 0x100
movq %rax, -0x130(%rbp)
jmp 0x43bb1
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x164d10
movq $0x0, -0x120(%rbp)
movq -0x120(%rbp), %rax
cmpq -0x118(%rbp), %rax
jge 0x43c26
movq -0x120(%rbp), %rax
movzbl -0x110(%rbp,%rax), %ecx
xorl $0xd, %ecx
movb %cl, -0x110(%rbp,%rax)
movq -0x120(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x120(%rbp)
jmp 0x43be9
movq -0x8(%rbp), %rdi
leaq 0x1690d6(%rip), %rsi    # 0x1acd07
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rdx
callq 0x166170
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x100, 0x18(%rax)      # imm = 0x100
jle 0x43c9b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
subq $0x100, %rdx            # imm = 0x100
movq -0x128(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x166070
movq -0x128(%rbp), %rdi
callq 0x1676a0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_identify_winzle
static int de_identify_winzle(deark *c)
{
	u8 b[18];
	de_read(b, 0, sizeof(b));

	if(b[0]==0x4f && b[1]==0x40) {
		if(b[14]==0x25 && b[15]==0x0d && b[16]==0x0d && b[17]==0x0d) {
			return 95;
		}
		return 40;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x12, %ecx
callq 0x164d10
movzbl -0x30(%rbp), %eax
cmpl $0x4f, %eax
jne 0x43d1e
movzbl -0x2f(%rbp), %eax
cmpl $0x40, %eax
jne 0x43d1e
movzbl -0x22(%rbp), %eax
cmpl $0x25, %eax
jne 0x43d15
movzbl -0x21(%rbp), %eax
cmpl $0xd, %eax
jne 0x43d15
movzbl -0x20(%rbp), %eax
cmpl $0xd, %eax
jne 0x43d15
movzbl -0x1f(%rbp), %eax
cmpl $0xd, %eax
jne 0x43d15
movl $0x5f, -0x4(%rbp)
jmp 0x43d25
movl $0x28, -0x4(%rbp)
jmp 0x43d25
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_module_jigsaw_wk
void de_module_jigsaw_wk(deark *c, struct deark_module_info *mi)
{
	mi->id = "jigsaw_wk";
	mi->desc = "Jigsaw .jig";
	mi->run_fn = de_run_jigsaw_wk;
	mi->identify_fn = de_identify_jigsaw_wk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x15f980(%rip), %rcx    # 0x1a36c7
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x15f97c(%rip), %rcx    # 0x1a36d1
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x43d80
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xad(%rip), %rcx        # 0x43e20
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_run_jigsaw_wk
static void de_run_jigsaw_wk(deark *c, de_module_params *mparams)
{
	i64 fsize;
	dbuf *outf = NULL;

	fsize = de_getu32le(2);
	if(fsize>c->infile->len) goto done;

	outf = dbuf_create_output_file(c, "bmp", NULL, 0);
	dbuf_write(outf, (const u8*)"BM", 2);
	dbuf_copy(c->infile, 2, fsize-2, outf);

done:
	dbuf_close(outf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x43dc2
jmp 0x43e0f
movq -0x8(%rbp), %rdi
leaq 0x168f3a(%rip), %rsi    # 0x1acd07
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x163f03(%rip), %rsi    # 0x1a7cea
movl $0x2, %edx
callq 0x166170
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rdx
subq $0x2, %rdx
movq -0x20(%rbp), %rcx
movl $0x2, %esi
callq 0x166070
movq -0x20(%rbp), %rdi
callq 0x1676a0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: de_identify_jigsaw_wk
static int de_identify_jigsaw_wk(deark *c)
{
	i64 fsize;
	int ret;
	u8 buf[32];

	if(dbuf_memcmp(c->infile, 0, "JG", 2)) {
		return 0;
	}

	fsize = de_getu32le(2);
	if(fsize>c->infile->len) return 0;

	de_read(buf, 0, sizeof(buf));
	buf[0] = 'B';
	buf[1] = 'M';
	ret = looks_like_bmp_bytes(buf, sizeof(buf), 0);
	if(ret) {
		return 95;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x15fdf5(%rip), %rdx    # 0x1a3c34
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x43e57
movl $0x0, -0x4(%rbp)
jmp 0x43ed3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165540
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x43e88
movl $0x0, -0x4(%rbp)
jmp 0x43ed3
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x20, %ecx
callq 0x164d10
movb $0x42, -0x40(%rbp)
movb $0x4d, -0x3f(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x472f0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x43ecc
movl $0x5f, -0x4(%rbp)
jmp 0x43ed3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: read_fileheader
static int read_fileheader(deark *c, lctx *d, i64 pos)
{
	de_dbg(c, "file header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	de_dbg(c, "bfSize: %"I64_FMT, d->fsize);
	d->bits_offset = de_getu32le(pos+10);
	de_dbg(c, "bfOffBits: %"I64_FMT, d->bits_offset);
	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 -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x16419d(%rip), %rsi    # 0x1a82c0
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x15f69b(%rip), %rsi    # 0x1a37e6
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0xa, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x15f66d(%rip), %rsi    # 0x1a37f2
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
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_read_bitfields
static void do_read_bitfields(deark *c, lctx *d, i64 pos, i64 len)
{
	i64 k;

	if(len>16) len=16;
	for(k=0; 4*k<len; k++) {
		d->bitfield[k].mask = (u32)de_getu32le(pos+4*k);
		de_dbg(c, "mask[%d]: 0x%08x", (int)k, (UI)d->bitfield[k].mask);
	}
	update_bitfields_info(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x10, -0x20(%rbp)
jle 0x44ad7
movq $0x10, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x2, %rax
cmpq -0x20(%rbp), %rax
jge 0x44b5f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x165540
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %ecx
leaq 0x15ede3(%rip), %rsi    # 0x1a392d
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x44adf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45250
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)