LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_read_palette
static void do_read_palette(deark *c, lctx *d)
{
	i64 pal_size_in_bytes;

	if(d->pal_entries<1) return;

	pal_size_in_bytes = d->pal_entries*d->bytes_per_pal_entry;
	if(d->pal_pos+pal_size_in_bytes > d->bits_offset) {
		de_warn(c, "Palette at %"I64_FMT" (size %"I64_FMT") overlaps bitmap at %"I64_FMT,
			d->pal_pos, pal_size_in_bytes, d->bits_offset);
		if(d->version==DE_BMPVER_OS2V2) {
			do_os2v2_bad_palette(c, d);
		}
	}

	de_dbg(c, "color table at %"I64_FMT", %"I64_FMT" entries", d->pal_pos, d->pal_entries);

	de_dbg_indent(c, 1);
	de_read_palette_rgb(c->infile, d->pal_pos, d->pal_entries, d->bytes_per_pal_entry,
		d->pal, 256, DE_GETRGBFLAG_BGR);

	d->pal_is_grayscale = de_is_grayscale_palette(d->pal, d->pal_entries);
	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, 0x70(%rax)
jge 0x44ba0
jmp 0x44cae
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x80(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jle 0x44c0c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %r8
leaq 0x15ed51(%rip), %rsi    # 0x1a393e
movb $0x0, %al
callq 0x15bc10
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x44c0a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45310
jmp 0x44c0c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
leaq 0x15ed48(%rip), %rsi    # 0x1a396f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x10(%rbp), %r8
addq $0x140, %r8             # imm = 0x140
movl $0x100, %r9d            # imm = 0x100
movl $0x1, (%rsp)
callq 0x16c0c0
movq -0x10(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rsi
callq 0x16aa20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
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_profile
static void do_read_profile(deark *c, lctx *d)
{
	if(d->want_returned_img) return;
	if(d->version!=DE_BMPVER_WINV345) return;
	if(d->infohdrsize<124) return;
	if(d->profile_offset_raw==0 || d->profile_size==0) return;
	d->profile_offset = FILEHEADER_SIZE + d->profile_offset_raw;
	if(d->profile_offset+d->profile_size > c->infile->len) return;
	if(d->cstype4cc.id==CODE_LINK) {
		do_read_linked_profile(c, d);
	}
	else if(d->cstype4cc.id==CODE_MBED) {
		do_read_embedded_profile(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0x4504f
jmp 0x45109
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
je 0x4505d
jmp 0x45109
movq -0x10(%rbp), %rax
cmpq $0x7c, 0x30(%rax)
jge 0x4506d
jmp 0x45109
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x45089
movq -0x10(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
jne 0x4508b
jmp 0x45109
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rcx
addq $0xe, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe8(%rax)
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0xf0(%rcx), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x450cb
jmp 0x45109
movq -0x10(%rbp), %rax
cmpl $0x4c494e4b, 0xb0(%rax) # imm = 0x4C494E4B
jne 0x450ea
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x468d0
jmp 0x45109
movq -0x10(%rbp), %rax
cmpl $0x4d424544, 0xb0(%rax) # imm = 0x4D424544
jne 0x45107
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x469a0
jmp 0x45109
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: set_default_bitfields
static void set_default_bitfields(deark *c, lctx *d)
{
	if(d->bitcount==16) {
		d->bitfield[0].mask = 0x000007c00U;
		d->bitfield[1].mask = 0x0000003e0U;
		d->bitfield[2].mask = 0x00000001fU;
		update_bitfields_info(c, d);
	}
	else if(d->bitcount==32) {
		d->bitfield[0].mask = 0x00ff0000U;
		d->bitfield[1].mask = 0x0000ff00U;
		d->bitfield[2].mask = 0x000000ffU;
		update_bitfields_info(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x10, 0x38(%rax)
jne 0x45164
movq -0x10(%rbp), %rax
movl $0x7c00, 0x100(%rax)    # imm = 0x7C00
movq -0x10(%rbp), %rax
movl $0x3e0, 0x110(%rax)     # imm = 0x3E0
movq -0x10(%rbp), %rax
movl $0x1f, 0x120(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45250
jmp 0x451a8
movq -0x10(%rbp), %rax
cmpq $0x20, 0x38(%rax)
jne 0x451a6
movq -0x10(%rbp), %rax
movl $0xff0000, 0x100(%rax)  # imm = 0xFF0000
movq -0x10(%rbp), %rax
movl $0xff00, 0x110(%rax)    # imm = 0xFF00
movq -0x10(%rbp), %rax
movl $0xff, 0x120(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45250
jmp 0x451a8
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: get_cstype_descr_dbgstr
static void get_cstype_descr_dbgstr(struct de_fourcc *cstype4cc, char *s_dbgstr, size_t s_len)
{
	// The ID might be a FOURCC, or not.
	if(cstype4cc->id>0xffffU) {
		de_snprintf(s_dbgstr, s_len, "0x%08x ('%s')", (UI)cstype4cc->id,
			cstype4cc->id_dbgstr);
	}
	else {
		const char *name = "?";
		switch(cstype4cc->id) {
		case 0: name = "LCS_CALIBRATED_RGB"; break;
		}
		de_snprintf(s_dbgstr, s_len, "%u (%s)", (UI)cstype4cc->id, name);
	}
}

// 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
cmpl $0xffff, 0x4(%rax)      # imm = 0xFFFF
jbe 0x451f8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %r8
addq $0x10, %r8
leaq 0x15e71d(%rip), %rdx    # 0x1a390c
movb $0x0, %al
callq 0x15a980
jmp 0x4523c
leaq 0x172a2e(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
testl %eax, %eax
jne 0x4521b
jmp 0x45210
leaq 0x15e703(%rip), %rax    # 0x1a391a
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %r8
leaq 0x15c073(%rip), %rdx    # 0x1a12a8
movb $0x0, %al
callq 0x15a980
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: update_bitfields_info
static void update_bitfields_info(deark *c, lctx *d)
{
	i64 k;
	u32 tmpmask;

	for(k=0; k<4; k++) {
		tmpmask = d->bitfield[k].mask;
		if(tmpmask==0) continue;
		while((tmpmask & 0x1) == 0) {
			d->bitfield[k].shift++;
			tmpmask >>= 1;
		}
		d->bitfield[k].scale = 255.0 / (double)tmpmask;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x4, -0x18(%rbp)
jge 0x45305
movq -0x10(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x45291
jmp 0x452f4
jmp 0x45293
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x452c6
movq -0x10(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %eax
shrl %eax
movl %eax, -0x1c(%rbp)
jmp 0x45293
movl -0x1c(%rbp), %eax
cvtsi2sd %rax, %xmm1
movsd 0x15e35a(%rip), %xmm0   # 0x1a3630
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x45264
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_os2v2_bad_palette
static void do_os2v2_bad_palette(deark *c, lctx *d)
{
	i64 pal_space_avail;
	i64 pal_bytes_if_3bpc;
	i64 pal_bytes_if_4bpc;
	int nonzero_rsvd;
	int i;

	if(d->version!=DE_BMPVER_OS2V2) return;
	if(d->pal_entries<1) return;

	pal_space_avail = d->bits_offset - d->pal_pos;
	pal_bytes_if_4bpc = 4*d->pal_entries;
	pal_bytes_if_3bpc = 3*d->pal_entries;

	if(pal_space_avail>=pal_bytes_if_4bpc) return;
	if(pal_space_avail<pal_bytes_if_3bpc || pal_space_avail>(pal_bytes_if_3bpc+1)) return;

	// Look for nonzero 'reserved' bytes
	nonzero_rsvd = 0;
	for(i=0; i<pal_bytes_if_3bpc; i+=4) {
		if(de_getbyte(d->pal_pos + i + 3) != 0) {
			nonzero_rsvd = 1;
			break;
		}
	}
	if(!nonzero_rsvd) return;

	de_warn(c, "Assuming palette has 3 bytes per entry, instead of 4");
	d->bytes_per_pal_entry = 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0x4532e
jmp 0x4541a
movq -0x10(%rbp), %rax
cmpq $0x1, 0x70(%rax)
jge 0x4533e
jmp 0x4541a
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x78(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
imulq $0x3, 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x4537e
jmp 0x4541a
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jl 0x45399
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jle 0x4539b
jmp 0x4541a
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x453f1
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
movslq -0x30(%rbp), %rax
addq %rax, %rsi
addq $0x3, %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
je 0x453e4
movl $0x1, -0x2c(%rbp)
jmp 0x453f1
jmp 0x453e6
movl -0x30(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x30(%rbp)
jmp 0x453a9
cmpl $0x0, -0x2c(%rbp)
jne 0x453f9
jmp 0x4541a
movq -0x8(%rbp), %rdi
leaq 0x15e58b(%rip), %rsi    # 0x1a398f
movb $0x0, %al
callq 0x15bc10
movq -0x10(%rbp), %rax
movq $0x3, 0x80(%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_image_paletted
static void do_image_paletted(deark *c, lctx *d, dbuf *bits, i64 bits_offset, u8 want_trns)
{
	int bypp;

	if(d->pal_is_grayscale) bypp = 1;
	else bypp = 3;
	if(want_trns) bypp++;

	d->img = bmp_bitmap_create(c, d, bypp);
	de_convert_image_paletted(bits, bits_offset,
		d->bitcount, d->rowspan, d->pal, d->img, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x45454
movl $0x1, -0x28(%rbp)
jmp 0x4545b
movl $0x3, -0x28(%rbp)
cmpb $0x0, -0x21(%rbp)
je 0x4546a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x28(%rbp), %edx
callq 0x45f20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rcx
movq -0x10(%rbp), %r8
addq $0x140, %r8             # imm = 0x140
movq -0x10(%rbp), %rax
movq 0x10(%rax), %r9
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c520
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_image_24bit
static void do_image_24bit(deark *c, lctx *d, dbuf *bits, i64 bits_offset, u8 want_trns)
{
	i64 i, j;
	u32 clr;
	int bypp;

	if(want_trns) bypp = 4;
	else bypp = 3;

	d->img = bmp_bitmap_create(c, d, bypp);
	for(j=0; j<d->height; j++) {
		i64 rowpos = bits_offset + j*d->rowspan;
		i64 pos_in_this_row = 0;
		u8 cbuf[3];

		for(i=0; i<d->pdwidth; i++) {
			dbuf_read(bits, cbuf, rowpos + pos_in_this_row, 3);
			if(pos_in_this_row+3 > d->rowspan) {
				// If -padpix was used, a partial pixel at the end of the row is
				// possible. Happens when width == 1 or 2 (mod 4).
				// To handle that, zero out the byte(s) that we shouldn't have read.
				cbuf[2] = 0;
				if(pos_in_this_row+2 > d->rowspan) {
					cbuf[1] = 0;
				}
			}
			clr = DE_MAKE_RGB(cbuf[2], cbuf[1], cbuf[0]);
			de_bitmap_setpixel_rgb(d->img, i, j, clr);
			pos_in_this_row += 3;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpb $0x0, -0x21(%rbp)
je 0x454fd
movl $0x4, -0x40(%rbp)
jmp 0x45504
movl $0x3, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x40(%rbp), %edx
callq 0x45f20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jge 0x4562a
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rdx
imulq 0xf8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jge 0x45617
movq -0x18(%rbp), %rdi
leaq -0x53(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x164d10
movq -0x50(%rbp), %rax
addq $0x3, %rax
movq -0x10(%rbp), %rcx
cmpq 0xf8(%rcx), %rax
jle 0x455c4
movb $0x0, -0x51(%rbp)
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq -0x10(%rbp), %rcx
cmpq 0xf8(%rcx), %rax
jle 0x455c2
movb $0x0, -0x52(%rbp)
jmp 0x455c4
movzbl -0x51(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0x52(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x53(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl -0x3c(%rbp), %ecx
callq 0x16b310
movq -0x50(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x45564
jmp 0x45619
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x45527
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_image_huffman1d
static void do_image_huffman1d(deark *c, lctx *d)
{
	dbuf *unc_pixels = NULL;
	struct de_dfilter_in_params dcmpri;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;
	struct de_fax34_params fax34params;

	// Caution: These settings might be wrong. I need more information about this format.
	de_zeromem(&fax34params, sizeof(struct de_fax34_params));
	fax34params.image_width = d->width;
	fax34params.image_height = d->height;
	fax34params.out_rowspan = d->rowspan;
	fax34params.tiff_cmpr_meth = 3;
	fax34params.t4options = 0;
	fax34params.is_lsb = (u8)de_get_ext_option_bool(c, "bmp:huffmanlsb", 0);

	unc_pixels = dbuf_create_membuf(c, d->rowspan*d->height, 0x1);

	de_dfilter_init_objects(c, &dcmpri, &dcmpro, &dres);
	dcmpri.f = c->infile;
	dcmpri.pos = d->bits_offset;
	dcmpri.len = get_bits_size(c, d);
	dcmpro.f = unc_pixels;
	dcmpro.len_known = 1;
	dcmpro.expected_len = d->rowspan*d->height;

	fmtutil_fax34_codectype1(c, &dcmpri, &dcmpro, &dres,
		 (void*)&fax34params);

	do_image_paletted(c, d, unc_pixels, 0, 0);

	dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x19140
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0xc8(%rbp)
movl $0x3, -0xc0(%rbp)
movl $0x0, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x15dc98(%rip), %rsi    # 0x1a3a65
xorl %edx, %edx
callq 0x15cbc0
movb %al, -0xbc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rsi
movq -0x10(%rbp), %rax
imulq 0x60(%rax), %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x1773f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x46860
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movb $0x1, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0x10(%rbp), %rcx
imulq 0x60(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
leaq -0xd8(%rbp), %r8
callq 0x17d920
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x45420
movq -0x18(%rbp), %rdi
callq 0x1676a0
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: extract_embedded_image
static void extract_embedded_image(deark *c, lctx *d, const char *ext)
{
	i64 nbytes;

	if(d->want_returned_img) return;

	nbytes = get_bits_size(c, d);
	if(nbytes<1) return;

	dbuf_create_file_from_slice(c->infile, d->bits_offset, nbytes, ext, NULL, 0);
}

// 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
cmpb $0x0, 0x4(%rax)
je 0x45ed0
jmp 0x45f0f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x46860
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jge 0x45eea
jmp 0x45f0f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x166be0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: rle_to_bytes_append_unit4
static void rle_to_bytes_append_unit4(deark *c, struct rle_dcmpr_ctx *rc, u8 n, u8 mflag)
{
	if(rc->num_pending_bits) { // presumably = 4
		rc->pending_bits |= n;
		rc->num_pending_bits += 4;
		rle_to_bytes_flush(c, rc);
	}
	else { // presumably num_pending_bits = 0
		rc->pending_bits = n<<4;
		rc->num_pending_bits += 4;
	}

	if(mflag && rc->mask) {
		de_bitmap_setpixel_gray(rc->mask, rc->xpos, rc->ypos, 0xff);
	}
	rc->xpos++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x46651
movzbl -0x11(%rbp), %edx
movq -0x10(%rbp), %rax
movzbl 0x64(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x64(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x60(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x46810
jmp 0x4666e
movzbl -0x11(%rbp), %eax
shll $0x4, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x64(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x60(%rax)
movzbl -0x12(%rbp), %eax
cmpl $0x0, %eax
je 0x466a4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x466a4
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movl $0xff, %ecx
callq 0x16b1c0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: rle_to_bytes_append_unit24
static void rle_to_bytes_append_unit24(deark *c, struct rle_dcmpr_ctx *rc,
	u8 cr, u8 cg, u8 cb, u8 mflag)
{
	dbuf_writebyte(rc->unc_pixels, cb);
	dbuf_writebyte(rc->unc_pixels, cg);
	dbuf_writebyte(rc->unc_pixels, cr);
	if(mflag && rc->mask) {
		de_bitmap_setpixel_gray(rc->mask, rc->xpos, rc->ypos, 0xff);
	}
	rc->xpos++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r8d, -0x2c(%rbp)
movl %ecx, %eax
movl -0x2c(%rbp), %ecx
movl %eax, -0x28(%rbp)
movl %edx, %eax
movl -0x28(%rbp), %edx
movl %eax, -0x24(%rbp)
movq %rsi, %rax
movl -0x24(%rbp), %esi
movq %rax, -0x20(%rbp)
movq %rdi, %r8
movq -0x20(%rbp), %rdi
movb %r9b, %al
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movb %sil, -0x11(%rbp)
movb %dl, -0x12(%rbp)
movb %cl, -0x13(%rbp)
movb %al, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movzbl -0x13(%rbp), %esi
callq 0x168380
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movzbl -0x12(%rbp), %esi
callq 0x168380
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movzbl -0x11(%rbp), %esi
callq 0x168380
movzbl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x4676e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x4676e
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movl $0xff, %ecx
callq 0x16b1c0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: rle_to_bytes_append_unit8
static void rle_to_bytes_append_unit8(deark *c, struct rle_dcmpr_ctx *rc, u8 n, u8 mflag)
{
	dbuf_writebyte(rc->unc_pixels, n);
	if(mflag && rc->mask) {
		de_bitmap_setpixel_gray(rc->mask, rc->xpos, rc->ypos, 0xff);
	}
	rc->xpos++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movzbl -0x11(%rbp), %esi
callq 0x168380
movzbl -0x12(%rbp), %eax
cmpl $0x0, %eax
je 0x467f1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x467f1
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
movl $0xff, %ecx
callq 0x16b1c0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: rle_to_bytes_flush
static void rle_to_bytes_flush(deark *c, struct rle_dcmpr_ctx *rc)
{
	if(rc->num_pending_bits) {
		dbuf_writebyte(rc->unc_pixels, rc->pending_bits);
	}
	rc->pending_bits = 0;
	rc->num_pending_bits = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x4683f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0x64(%rax), %esi
callq 0x168380
movq -0x10(%rbp), %rax
movb $0x0, 0x64(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x60(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_read_linked_profile
static void do_read_linked_profile(deark *c, lctx *d)
{
	de_ucstring *fname = NULL;

	de_dbg(c, "linked profile filename at %"I64_FMT, d->profile_offset);
	fname = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, d->profile_offset,
		d->profile_size, DE_DBG_MAX_STRLEN, fname,
		DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_WINDOWS1252);
	de_dbg_indent(c, 1);
	de_dbg(c, "profile filename: \"%s\"", ucstring_getpsz(fname));
	de_dbg_indent(c, -1);
	ucstring_destroy(fname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rdx
leaq 0x15d176(%rip), %rsi    # 0x1a3a74
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdx
movq -0x18(%rbp), %r8
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x1, %r9d
movl $0x9, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x172500
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0x15d11b(%rip), %rsi    # 0x1a3a93
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x18(%rbp), %rdi
callq 0x171750
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: do_read_embedded_profile
static void do_read_embedded_profile(deark *c, lctx *d)
{
	de_dbg(c, "embedded profile at %"I64_FMT", size=%"I64_FMT, d->profile_offset,
		d->profile_size);
	de_dbg_indent(c, 1);
	dbuf_create_file_from_slice(c->infile, d->profile_offset, d->profile_size, "icc",
		NULL, DE_CREATEFLAG_IS_AUX);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rcx
leaq 0x15d0d9(%rip), %rsi    # 0x1a3aaa
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0xe8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdx
leaq 0x15afda(%rip), %rcx    # 0x1a19e5
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: picjpeg_scale_qtable
static void picjpeg_scale_qtable(u8 tbl[64], UI setting)
{
	size_t i;

	for(i=0; i<64; i++) {
		UI x;

		x = tbl[i];
		// The denominator 32 might not be exactly right, but assuming this is
		// the right idea, it's not too far off.
		x = (x * setting)/32;
		if(x>255) x = 255;
		else if(x<1) x = 1;
		tbl[i] = x;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x40, -0x18(%rbp)
jae 0x46d25
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
imull -0xc(%rbp), %eax
shrl $0x5, %eax
movl %eax, -0x1c(%rbp)
cmpl $0xff, -0x1c(%rbp)
jbe 0x46cf8
movl $0xff, -0x1c(%rbp)
jmp 0x46d07
cmpl $0x1, -0x1c(%rbp)
jae 0x46d05
movl $0x1, -0x1c(%rbp)
jmp 0x46d07
movl -0x1c(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x46cc3
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: ddb_convert_pal4planar
static void ddb_convert_pal4planar(deark *c, struct ddbctx_struct *d,
	i64 fpos, de_bitmap *img)
{
	const i64 nplanes = 4;
	i64 rowspan;
	de_color pal16[16];

	rowspan = d->bmWidthBytes * nplanes;

	// The usual order seems to be
	//  row0_plane0x1, row0_plane0x2, row0_plane0x4, row0_plane0x8,
	//  row1_plane0x1, row1_plane0x2, row1_plane0x4, row1_plane0x8,
	//  ...
	// But I have seen another, and I see no way to detect/support it.

	de_copy_std_palette(DE_PALID_WIN16, 0, 0, pal16, 16, 0);
	de_convert_image_paletted_planar(c->infile, fpos, nplanes, rowspan,
		d->bmWidthBytes, pal16, img, 0x2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x4, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
shlq $0x2, %rax
movq %rax, -0x30(%rbp)
leaq -0x70(%rbp), %rcx
movl $0x32, %edi
xorl %r9d, %r9d
xorl %eax, %eax
movl %eax, %edx
movl $0x10, %r8d
movl %r9d, %esi
callq 0x161320
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %r8
leaq -0x70(%rbp), %r9
movq -0x20(%rbp), %rax
movl $0x4, %edx
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x16c690
addq $0x80, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: ddb_convert_pal8
static void ddb_convert_pal8(deark *c, struct ddbctx_struct *d,
	i64 fpos, de_bitmap *img)
{
	i64 i, j;
	size_t k;
	int badcolorflag = 0;

	de_copy_std_palette(DE_PALID_WIN16, 1, 0, &d->pal[0], 8, 0);
	de_copy_std_palette(DE_PALID_WIN16, 1, 8, &d->pal[248], 8, 0);

	if(!d->have_custom_pal) {
		for(k=16; k<248; k++) {
			d->pal[k] = DE_MAKE_RGB(254, (u8)k ,254); // Just an arbitrary color
		}
	}

	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			UI palent;
			de_color clr;

			palent = de_getbyte(fpos+j*d->bmWidthBytes+i);
			if(!d->have_custom_pal && palent>=8 && palent<248) {
				badcolorflag = 1;
			}
			clr = d->pal[(UI)palent];

			de_bitmap_setpixel_rgb(img, i, j, clr);
		}
	}
	if(badcolorflag) {
		de_warn(c, "Image uses nonportable colors");
	}
}

// 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, -0x3c(%rbp)
movq -0x10(%rbp), %rcx
addq $0x1c, %rcx
movl $0x32, %edi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %r8d
xorl %r9d, %r9d
callq 0x161320
movq -0x10(%rbp), %rcx
addq $0x1c, %rcx
addq $0x3e0, %rcx            # imm = 0x3E0
movl $0x32, %edi
movl $0x1, %esi
movl $0x8, %r8d
xorl %r9d, %r9d
movq %r8, %rdx
callq 0x161320
movq -0x10(%rbp), %rax
cmpb $0x0, 0x18(%rax)
jne 0x471bb
movq $0x10, -0x38(%rbp)
cmpq $0xf8, -0x38(%rbp)
jae 0x471b9
movq -0x38(%rbp), %rax
movzbl %al, %edx
shll $0x8, %edx
orl $0xfffe0000, %edx       # imm = 0xFFFE0000
orl $0xfe, %edx
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movl %edx, 0x1c(%rax,%rcx,4)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4717f
jmp 0x471bb
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x4727b
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x47268
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq (%rcx), %rax
addq %rax, %rsi
addq -0x28(%rbp), %rsi
callq 0x165060
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x18(%rax)
jne 0x47235
cmpl $0x8, -0x40(%rbp)
jb 0x47235
cmpl $0xf8, -0x40(%rbp)
jae 0x47235
movl $0x1, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
movl 0x1c(%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0x16b310
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x471dd
jmp 0x4726a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x471c3
cmpl $0x0, -0x3c(%rbp)
je 0x47293
movq -0x8(%rbp), %rdi
leaq 0x15c98a(%rip), %rsi    # 0x1a3c16
movb $0x0, %al
callq 0x15bc10
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: de_module_arj
void de_module_arj(deark *c, struct deark_module_info *mi)
{
	mi->id = "arj";
	mi->desc = "ARJ";
	mi->run_fn = de_run_arj;
	mi->identify_fn = de_identify_arj;
	mi->help_fn = de_help_arj;
	mi->flags |= DE_MODFLAG_MULTIPART;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x15c8fd(%rip), %rcx    # 0x1a3c64
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x15c8f3(%rip), %rcx    # 0x1a3c68
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x3c(%rip), %rcx        # 0x473c0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x55d(%rip), %rcx       # 0x478f0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x5ee(%rip), %rcx       # 0x47990
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: de_identify_arj
static int de_identify_arj(deark *c)
{
	i64 basic_hdr_size;

	if(dbuf_memcmp(c->infile, 0, g_arj_hdr_id, 2)) return 0;
	basic_hdr_size = de_getu16le(2);
	if(basic_hdr_size>ARJ_MAX_BASIC_HEADER_SIZE || basic_hdr_size<ARJ_MIN_BASIC_HEADER_SIZE) return 0;
	if(de_input_file_has_ext(c, "arj")) return 100;
	return 75;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x1ddbf5(%rip), %rdx    # 0x225500
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x47927
movl $0x0, -0x4(%rbp)
jmp 0x4797c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0xa28, -0x18(%rbp)     # imm = 0xA28
jg 0x4794e
cmpq $0x1e, -0x18(%rbp)
jge 0x47957
movl $0x0, -0x4(%rbp)
jmp 0x4797c
movq -0x10(%rbp), %rdi
leaq 0x15c302(%rip), %rsi    # 0x1a3c64
callq 0x15d180
cmpl $0x0, %eax
je 0x47975
movl $0x64, -0x4(%rbp)
jmp 0x4797c
movl $0x4b, -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/arj.c
// Function: is_exe_format
static u8 is_exe_format(deark *c)
{
	u8 sig[2];

	de_read(sig, 0, 2);
	if((sig[0]=='M' && sig[1]=='Z') || (sig[0]=='Z' && sig[1]=='M')) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x12(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
callq 0x164d10
movzbl -0x12(%rbp), %eax
cmpl $0x4d, %eax
jne 0x47a18
movzbl -0x11(%rbp), %eax
cmpl $0x5a, %eax
je 0x47a2a
movzbl -0x12(%rbp), %eax
cmpl $0x5a, %eax
jne 0x47a30
movzbl -0x11(%rbp), %eax
cmpl $0x4d, %eax
jne 0x47a30
movb $0x1, -0x1(%rbp)
jmp 0x47a34
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: get_exe_overlay_pos
static i64 get_exe_overlay_pos(deark *c)
{
	i64 overlay_pos;
	struct fmtutil_exe_info *ei;

	ei = de_malloc(c, sizeof(struct fmtutil_exe_info));
	// TODO: Should collect_exe_info do more validation of the format?
	fmtutil_collect_exe_info(c, c->infile, ei);
	overlay_pos = ei->end_of_dos_code;
	de_free(c, ei);
	return overlay_pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0xf0, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x188930
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: is_arj_data_at
static int is_arj_data_at(deark *c, i64 pos1)
{
	i64 pos;
	i64 basic_hdr_size, first_ext_hdr_size;
	UI hdr_id;

	pos = pos1+2;

	basic_hdr_size = de_getu16le_p(&pos);
	if(basic_hdr_size>ARJ_MAX_BASIC_HEADER_SIZE || basic_hdr_size<ARJ_MIN_BASIC_HEADER_SIZE) return 0;
	pos += basic_hdr_size + 4;
	first_ext_hdr_size = de_getu16le_p(&pos);
	if(first_ext_hdr_size!=0) pos += first_ext_hdr_size+4;

	// Should now be at the start of the 1st member file (after the archive header)
	hdr_id = (UI)de_getu16le(pos);
	if(hdr_id==0xea60) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x28(%rbp)
cmpq $0xa28, -0x28(%rbp)     # imm = 0xA28
jg 0x47ae2
cmpq $0x1e, -0x28(%rbp)
jge 0x47aeb
movl $0x0, -0x4(%rbp)
jmp 0x47b54
movq -0x28(%rbp), %rax
addq $0x4, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x47b27
movq -0x30(%rbp), %rax
addq $0x4, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165280
movl %eax, -0x34(%rbp)
cmpl $0xea60, -0x34(%rbp)    # imm = 0xEA60
jne 0x47b4d
movl $0x1, -0x4(%rbp)
jmp 0x47b54
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/arj.c
// Function: do_arj_volume
static void do_arj_volume(deark *c, lctx *d, struct arjvol_struct *v)
{
	i64 pos;
	i64 bytes_consumed = 0;

	d->cv = v;
	d->inf = v->inf;
	pos = v->archive_start;
	if(do_header_or_member(c, d, pos, 1, &bytes_consumed) != 1) goto done;
	pos += bytes_consumed;
	if(d->cv->is_secured) {
		do_security_envelope(c, d);
	}

	do_member_sequence(c, d, pos);

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x1, %ecx
leaq -0x28(%rbp), %r8
callq 0x48170
cmpl $0x1, %eax
je 0x47db3
jmp 0x47deb
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x19(%rax)
je 0x47dda
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x49420
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x494d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: arj_logical_member_finish_and_free
static void arj_logical_member_finish_and_free(deark *c, lctx *d, u8 errflag)
{
	if(!d->clm) return;

	if(errflag) {
		if(d->mp_opt_used) {
			de_err(c, "%s: Incomplete file; not all fragments were found",
				ucstring_getpsz_d(d->clm->filename));
		}
		else {
			if(!d->clm->warned_incomplete) {
				de_warn(c, "%s: Incomplete file; use \"-mp\" for multi-volume support",
					ucstring_getpsz_d(d->clm->filename));
				d->clm->warned_incomplete = 1;
			}
		}
	}
	dbuf_close(d->clm->outf);
	ucstring_destroy(d->clm->filename);
	de_free(c, d->clm);
	d->clm = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x47e25
jmp 0x47ef3
cmpb $0x0, -0x11(%rbp)
je 0x47eb5
movq -0x10(%rbp), %rax
cmpb $0x0, 0x14(%rax)
je 0x47e69
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x172650
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0x15c626(%rip), %rsi    # 0x1a4486
movb $0x0, %al
callq 0x15bfb0
jmp 0x47eb3
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x47eb1
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x172650
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x15c50e(%rip), %rsi    # 0x1a43ac
movb $0x0, %al
callq 0x15bc10
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movb $0x1, 0x10(%rax)
jmp 0x47eb3
jmp 0x47eb5
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
callq 0x1676a0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x15b820
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: do_security_envelope
static void do_security_envelope(deark *c, lctx *d)
{
	if(d->cv->security_envelope_len==0) return;
	de_dbg(c, "security envelope at %"I64_FMT", len=%"I64_FMT, d->cv->security_envelope_pos,
		d->cv->security_envelope_len);
	de_dbg_indent(c, 1);
	de_dbg_hexdump(c, d->inf, d->cv->security_envelope_pos, d->cv->security_envelope_len,
		256, NULL, 0x0);
	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
movq 0x8(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x49444
jmp 0x494c6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
leaq 0x15afd3(%rip), %rsi    # 0x1a443a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x15b840
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/arj.c
// Function: do_member_sequence
static void do_member_sequence(deark *c, lctx *d, i64 pos1)
{
	i64 pos = pos1;

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

		if(pos+2 > d->inf->len) goto done;

		ret = do_header_or_member(c, d, pos, 0, &bytes_consumed);
		if(ret==0 || bytes_consumed<2) goto done;
		pos += bytes_consumed;
		if(ret==2) { // End of archive
			break;
		}
	}

	report_extra_bytes(c, d, pos);

done:
	;
}

// 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 $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4950b
jmp 0x4955b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x30(%rbp), %r8
callq 0x48170
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x49532
cmpq $0x2, -0x30(%rbp)
jge 0x49534
jmp 0x4955b
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x2, -0x24(%rbp)
jne 0x49548
jmp 0x4954a
jmp 0x494ec
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4aa70
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: get_objtype_name
static const char *get_objtype_name(enum objtype_enum t) {
	const char *name = NULL;

	switch(t) {
	case ARJ_OBJTYPE_MAINHDR: name="archive header"; break;
	case ARJ_OBJTYPE_MEMBERFILE: name="member file"; break;
	case ARJ_OBJTYPE_CHAPTERLABEL: name="chapter label"; break;
	case ARJ_OBJTYPE_EOA: name="end of archive"; break;
	default: break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl -0x4(%rbp), %eax
addl $-0x64, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x495d8
movq -0x18(%rbp), %rax
leaq 0x15a69d(%rip), %rcx    # 0x1a3c38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x15af31(%rip), %rax    # 0x1a44dc
movq %rax, -0x10(%rbp)
jmp 0x495da
leaq 0x15ab46(%rip), %rax    # 0x1a40fe
movq %rax, -0x10(%rbp)
jmp 0x495da
leaq 0x15ab45(%rip), %rax    # 0x1a410a
movq %rax, -0x10(%rbp)
jmp 0x495da
leaq 0x15ab46(%rip), %rax    # 0x1a4118
movq %rax, -0x10(%rbp)
jmp 0x495da
jmp 0x495da
cmpq $0x0, -0x10(%rbp)
je 0x495eb
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x495f8
leaq 0x16e63b(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x495f8
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: get_archiver_ver_name
static char *get_archiver_ver_name(u8 v, char *buf, size_t buflen)
{
	static const char *anames[11] = {
		"0.13-0.14", "0.15-1.00", "1.10-2.22", "2.30", "2.39a-b",
		"2.39c-2.41a", "2.42a-2.50a", "2.55-2.61", "2.62-2.63", "2.63-2.76",
		"2.81+" };
	static const char *a32names[3] = { "3.00a-3.01a", "3.02-3.09", "3.10+" };

	if(v>=1 && v<=11) {
		// v=9 could also be ARJ32 3.00, but it's not worth listing.
		de_snprintf(buf, buflen, "ARJ %s", anames[(UI)v-1]);
	}
	else if(v>=100 && v<=102) {
		de_snprintf(buf, buflen, "ARJ32 %s", a32names[(UI)v-100]);
	}
	else if(v==51) {
		de_strlcpy(buf, "ARJZ", buflen);
	}
	else {
		de_strlcpy(buf, "?", buflen);
	}
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jl 0x49656
movzbl -0x1(%rbp), %eax
cmpl $0xb, %eax
jg 0x49656
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movzbl -0x1(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x1dbece(%rip), %rax    # 0x225510
movq (%rax,%rcx,8), %rcx
leaq 0x15ab5d(%rip), %rdx    # 0x1a41aa
movb $0x0, %al
callq 0x15a980
jmp 0x496cd
movzbl -0x1(%rbp), %eax
cmpl $0x64, %eax
jl 0x49696
movzbl -0x1(%rbp), %eax
cmpl $0x66, %eax
jg 0x49696
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movzbl -0x1(%rbp), %eax
subl $0x64, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x1dbeee(%rip), %rax    # 0x225570
movq (%rax,%rcx,8), %rcx
leaq 0x15ab24(%rip), %rdx    # 0x1a41b1
movb $0x0, %al
callq 0x15a980
jmp 0x496cb
movzbl -0x1(%rbp), %eax
cmpl $0x33, %eax
jne 0x496b5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x15ab0c(%rip), %rsi    # 0x1a41ba
callq 0x15aa30
jmp 0x496c9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x16e569(%rip), %rsi    # 0x1b7c2d
callq 0x15aa30
jmp 0x496cb
jmp 0x496cd
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/arj.c
// Function: get_file_type_name
static const char *get_file_type_name(struct member_data *md, u8 n)
{
	const char *name = NULL;

	switch(n) {
	case 0: name = "binary"; break;
	case 1: name = "text"; break;
	case 2: name = "main header"; break;
	case 3: name = "directory"; break;
	case 4: name = "volume label"; break;
	case 5: name = "chapter"; break;
	}

	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x5, %rax
ja 0x49954
movq -0x20(%rbp), %rax
leaq 0x15a34d(%rip), %rcx    # 0x1a3c4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1826e9(%rip), %rax    # 0x1cbff8
movq %rax, -0x18(%rbp)
jmp 0x49954
leaq 0x16eebb(%rip), %rax    # 0x1b87d7
movq %rax, -0x18(%rbp)
jmp 0x49954
leaq 0x16e9b4(%rip), %rax    # 0x1b82dd
movq %rax, -0x18(%rbp)
jmp 0x49954
leaq 0x156221(%rip), %rax    # 0x19fb57
movq %rax, -0x18(%rbp)
jmp 0x49954
leaq 0x18b473(%rip), %rax    # 0x1d4db6
movq %rax, -0x18(%rbp)
jmp 0x49954
leaq 0x15a8eb(%rip), %rax    # 0x1a423b
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x49965
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x49972
leaq 0x16e2c1(%rip), %rax    # 0x1b7c2d
movq %rax, -0x28(%rbp)
jmp 0x49972
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)