LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_picture_bank
static void do_picture_bank(deark *c, lctx *d, struct amosbank *bk, i64 pos1)
{
	i64 pos = pos1;
	UI segtype;
	int found_screen_header = 0;

	de_dbg(c, "picture bank");
	de_dbg_indent(c, 1);

	segtype = (UI)de_getu32be(pos);
	if(is_scr_hdr_id(segtype)) {
		found_screen_header = 1;
		picture_bank_screen_header(c, d, bk, pos);
		if(bk->errflag) goto done;
		pos += 90;
		segtype = (UI)de_getu32be(pos);
	}

	if(segtype!=AMOS_PIC_HDR_ID) {
		de_err(c, "Missing Picture Header");
		goto done;
	}

	if(!found_screen_header) {
		if(d->opt_allownopal<1) {
			de_warn(c, "No palette found. Can't decode this image.%s",
				(d->opt_allownopal<0 ?
					" (Use \"-opt abk:allownopal\" to try anyway.)" : ""));
			goto done;
		}
		de_warn(c, "No palette found. Using grayscale palette.");
		de_make_grayscale_palette(bk->pal, 32, 0);
	}

	// There's only room for 32 palette entries in the file, so it does no harm
	// to set the next 32 as if this were EHB format.
	picture_bank_make_ehb_pal(bk);

	picture_bank_read_picture(c, d, bk, pos);

done:
	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 -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x181451(%rip), %rsi    # 0x19ce53
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165470
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
callq 0x1b640
cmpl $0x0, %eax
je 0x1ba83
movl $0x1, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x1bb80
movq -0x18(%rbp), %rax
cmpb $0x0, 0x30(%rax)
je 0x1ba63
jmp 0x1bb27
movq -0x28(%rbp), %rax
addq $0x5a, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165470
movl %eax, -0x2c(%rbp)
cmpl $0x6071963, -0x2c(%rbp) # imm = 0x6071963
je 0x1baa3
movq -0x8(%rbp), %rdi
leaq 0x1813c9(%rip), %rsi    # 0x19ce60
movb $0x0, %al
callq 0x15bfb0
jmp 0x1bb27
cmpl $0x0, -0x30(%rbp)
jne 0x1bb09
movq -0x10(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jge 0x1bae3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x1b510b(%rip), %rdx    # 0x1d0bd0
leaq 0x1813d8(%rip), %rax    # 0x19cea4
cmpl $0x0, %ecx
cmovlq %rax, %rdx
leaq 0x18139d(%rip), %rsi    # 0x19ce77
movb $0x0, %al
callq 0x15bc10
jmp 0x1bb27
movq -0x8(%rbp), %rdi
leaq 0x1813e2(%rip), %rsi    # 0x19ced0
movb $0x0, %al
callq 0x15bc10
movq -0x18(%rbp), %rdi
addq $0x70, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x16d580
movq -0x18(%rbp), %rdi
callq 0x1bde0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x1bea0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: picture_bank_make_ehb_pal
static void picture_bank_make_ehb_pal(struct amosbank *bk)
{
	UI k;

	for(k=0; k<32; k++) {
		u8 cr, cg, cb;

		cr = DE_COLOR_R(bk->pal[k]);
		cg = DE_COLOR_G(bk->pal[k]);
		cb = DE_COLOR_B(bk->pal[k]);
		bk->pal[k+32] = DE_MAKE_RGB(cr/2, cg/2, cb/2);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x20, -0xc(%rbp)
jae 0x1be97
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl 0x70(%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl 0x70(%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0xe(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl 0x70(%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, -0xf(%rbp)
movzbl -0xd(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, -0x18(%rbp)
movzbl -0xe(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movzbl -0xf(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x14(%rbp), %edx
orl %eax, %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x20, %ecx
movl %ecx, %ecx
movl %edx, 0x70(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1bdef
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: render_pictbank_to_bitmap
static void render_pictbank_to_bitmap(deark *c, lctx *d, struct amosbank *bk,
	struct amos_pictbank_params *pb, de_bitmap *img)
{
	dbuf *out_pixdata = NULL;

	out_pixdata = dbuf_create_membuf(c, img->width*img->height, 0x1);
	process_pictbank_to_membuf(c, pb, out_pixdata, img->width);
	if(bk->is_ham6) {
		render_to_bitmap_ham6(out_pixdata, bk->pal, img);
	}
	else {
		de_convert_image_paletted(out_pixdata, 0, 8, img->width, bk->pal, img, 0);
	}
	dbuf_close(out_pixdata);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rax
imulq 0x10(%rax), %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x1c5b0
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4b6(%rax)
je 0x1c564
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
movq -0x28(%rbp), %rdx
callq 0x1c7f0
jmp 0x1c593
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %r8
addq $0x70, %r8
movq -0x28(%rbp), %r9
xorl %eax, %eax
movl %eax, %esi
movl $0x8, %edx
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c520
movq -0x30(%rbp), %rdi
callq 0x1676a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_read_sprite
static int do_read_sprite(deark *c, lctx *d, struct amosbank *bk)
{
	bk->num_objects = dbuf_getu16be(bk->f, 4);
	de_dbg(c, "number of objects: %d", (int)bk->num_objects);

	do_read_sprite_objects(c, d, bk, 6, 1);

	if(d->sig1==CODE_AmBs) {
		dbuf_create_file_from_slice(bk->f, 0, bk->bank_len, bk->file_ext, NULL, 0);
	}
	else {
		do_read_sprite_or_pic_palette(c, d, bk);

		do_read_sprite_objects(c, d, bk, 6, 2);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movl $0x4, %esi
callq 0x1651d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movl %eax, %edx
leaq 0x1806dc(%rip), %rsi    # 0x19d0e2
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x6, %ecx
movl $0x1, %r8d
callq 0x1cd30
movq -0x10(%rbp), %rax
cmpl $0x416d4273, (%rax)     # imm = 0x416D4273
jne 0x1ca5f
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
movq %r8, %rsi
callq 0x166be0
jmp 0x1ca8c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1c2e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x6, %ecx
movl $0x2, %r8d
callq 0x1cd30
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_read_sprite_objects
static void do_read_sprite_objects(deark *c, lctx *d, struct amosbank *bk, i64 pos, int pass)
{
	int ret;
	i64 bytes_consumed;
	i64 obj_idx;

	de_dbg(c, "pass %d", pass);

	obj_idx = 0;
	while(1) {
		if(pos >= bk->f->len) break;
		if(obj_idx >= bk->num_objects) break;
		bytes_consumed = 0;
		ret = do_sprite_object(c, d, bk, obj_idx, pos, pass, &bytes_consumed);
		if(!ret || bytes_consumed<1) break;
		pos += bytes_consumed;
		obj_idx++;
	}

	if(pass==1) {
		bk->pal_pos = pos;
		bk->bank_len = bk->pal_pos + 64;
		de_dbg(c, "palette offset: %"I64_FMT, bk->pal_pos);
		de_dbg(c, "bank len: %"I64_FMT, bk->bank_len);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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
movl -0x24(%rbp), %edx
leaq 0x18fde6(%rip), %rsi    # 0x1acb40
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x50(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x1cd7d
jmp 0x1cde6
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jl 0x1cd8d
jmp 0x1cde6
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x1ce50
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x1cdca
cmpq $0x1, -0x30(%rbp)
jge 0x1cdcc
jmp 0x1cde6
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1cd69
cmpl $0x1, -0x24(%rbp)
jne 0x1ce40
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x40, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdx
leaq 0x1802d9(%rip), %rsi    # 0x19d0f8
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
leaq 0x1802d3(%rip), %rsi    # 0x19d10c
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_sprite_object
static int do_sprite_object(deark *c, lctx *d, struct amosbank *bk, i64 obj_idx,
	i64 pos, int pass, i64 *bytes_consumed)
{

	if(pass==2) {
		de_dbg(c, "object #%d at %"I64_FMT, (int)obj_idx, pos);
	}
	de_dbg_indent(c, 1);

	bk->xsize = dbuf_getu16be(bk->f, pos);
	bk->ysize = dbuf_getu16be(bk->f, pos+2);
	bk->nplanes = dbuf_getu16be(bk->f, pos+4);

	if(pass==1) {
		if(bk->nplanes > bk->max_planes) {
			bk->max_planes = bk->nplanes;
		}
	}

	if(pass==2) {
		do_read_sprite_image(c, d, bk, pos+10);
	}

	*bytes_consumed = 10 + (bk->xsize*bk->ysize*bk->nplanes*2);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jne 0x1ce96
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rcx
leaq 0x18028b(%rip), %rsi    # 0x19d11a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x1651d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x470(%rax)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x2, %rsi
callq 0x1651d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x478(%rax)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
callq 0x1651d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x480(%rax)
cmpl $0x1, -0x2c(%rbp)
jne 0x1cf3f
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x488(%rcx), %rax
jle 0x1cf3d
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x488(%rax)
jmp 0x1cf3f
cmpl $0x2, -0x2c(%rbp)
jne 0x1cf5e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq $0xa, %rcx
callq 0x1cfb0
movq -0x18(%rbp), %rax
movq 0x470(%rax), %rcx
movq -0x18(%rbp), %rax
imulq 0x478(%rax), %rcx
movq -0x18(%rbp), %rax
imulq 0x480(%rax), %rcx
shlq %rcx
addq $0xa, %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
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/abk.c
// Function: do_read_sprite_image
static void do_read_sprite_image(deark *c, lctx *d, struct amosbank *bk, i64 pos)
{
	i64 width, height;
	i64 rowspan, planespan;
	de_bitmap *img = NULL;

	width = bk->xsize * 16;
	height = bk->ysize;

	de_dbg_dimensions(c, width, height);
	de_dbg(c, "planes: %d", (int)bk->nplanes);
	if(!de_good_image_dimensions(c, width, height)) goto done;
	if(bk->nplanes<1 || bk->nplanes>6) {
		de_err(c, "Unsupported number of planes: %d", (int)bk->nplanes);
		goto done;
	}

	img = de_bitmap_create(c, width, height, 4);

	rowspan = bk->xsize*2;
	planespan = rowspan*bk->ysize;
	de_convert_image_paletted_planar(bk->f, pos, bk->nplanes,
		rowspan, planespan, bk->pal, img, 0x2);

	de_bitmap_write_to_file(img, NULL, DE_CREATEFLAG_OPT_IMAGE);

done:
	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x470(%rax), %rax
shlq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x478(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x15bba0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rax
movl %eax, %edx
leaq 0x1a9ce4(%rip), %rsi    # 0x1c6cff
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0x1d03d
jmp 0x1d10b
movq -0x18(%rbp), %rax
cmpq $0x1, 0x480(%rax)
jl 0x1d059
movq -0x18(%rbp), %rax
cmpq $0x6, 0x480(%rax)
jle 0x1d07d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rax
movl %eax, %edx
leaq 0x17fff9(%rip), %rsi    # 0x19d06a
movb $0x0, %al
callq 0x15bfb0
jmp 0x1d10b
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl $0x4, %ecx
callq 0x16b750
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x470(%rax), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq 0x478(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x18(%rbp), %r9
addq $0x70, %r9
movq -0x48(%rbp), %rax
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x16c690
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x16afd0
movq -0x48(%rbp), %rdi
callq 0x16af60
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: is_amos_picture_file
static int is_amos_picture_file(deark *c, UI sig)
{
	UI x;
	i64 picpos;

	if(is_scr_hdr_id(sig)) {
		picpos = 90;
	}
	else if(sig==AMOS_PIC_HDR_ID) {
		// Need to be careful here, because some STOS formats also
		// start this way.
		picpos = 0;
	}
	else {
		return 0;
	}

	x = (UI)de_getu32be(picpos);
	if(x!=AMOS_PIC_HDR_ID) return 0;
	x = (UI)de_getu16be(picpos+14); // # bitplanes
	if(x>=1 && x<=6) {
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
callq 0x1b640
cmpl $0x0, %eax
je 0x1d146
movq $0x5a, -0x20(%rbp)
jmp 0x1d164
cmpl $0x6071963, -0x14(%rbp) # imm = 0x6071963
jne 0x1d159
movq $0x0, -0x20(%rbp)
jmp 0x1d162
movl $0x0, -0x4(%rbp)
jmp 0x1d1be
jmp 0x1d164
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165470
movl %eax, -0x18(%rbp)
cmpl $0x6071963, -0x18(%rbp) # imm = 0x6071963
je 0x1d18a
movl $0x0, -0x4(%rbp)
jmp 0x1d1be
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0xe, %rsi
callq 0x1651d0
movl %eax, -0x18(%rbp)
cmpl $0x1, -0x18(%rbp)
jb 0x1d1b7
cmpl $0x6, -0x18(%rbp)
ja 0x1d1b7
movl $0x1, -0x4(%rbp)
jmp 0x1d1be
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/alphabmp.c
// Function: de_module_alphabmp
void de_module_alphabmp(deark *c, struct deark_module_info *mi)
{
	mi->id = "alphabmp";
	mi->desc = "Alpha Microsystems BMP";
	mi->run_fn = de_run_alphabmp;
	mi->identify_fn = de_identify_alphabmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1800d2(%rip), %rcx    # 0x19d2b9
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1800cd(%rip), %rcx    # 0x19d2c2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x1d220
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3ad(%rip), %rcx       # 0x1d5c0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/alphabmp.c
// Function: de_identify_alphabmp
static int de_identify_alphabmp(deark *c)
{
	i64 flg;

	if(!de_input_file_has_ext(c, "bmp")) return 0;

	flg = de_getu16le(0);
	if(flg==0xffff || flg==0xfffe) {
		return 60;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x18f730(%rip), %rsi    # 0x1acd07
callq 0x15d180
cmpl $0x0, %eax
jne 0x1d5ea
movl $0x0, -0x4(%rbp)
jmp 0x1d623
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movq %rax, -0x18(%rbp)
cmpq $0xffff, -0x18(%rbp)    # imm = 0xFFFF
je 0x1d613
cmpq $0xfffe, -0x18(%rbp)    # imm = 0xFFFE
jne 0x1d61c
movl $0x3c, -0x4(%rbp)
jmp 0x1d623
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/alphabmp.c
// Function: do_read_palette
static int do_read_palette(deark *c, lctx *d, i64 pos, i64 *pal_nbytes)
{
	de_dbg(c, "palette at %d", (int)pos);
	de_dbg_indent(c, 1);

	d->num_pal_entries = de_getu16le(pos) + 1;
	de_dbg(c, "number of palette colors: %d", (int)d->num_pal_entries);
	if(d->palette_is_hls)
		*pal_nbytes = 2 + d->num_pal_entries * 6;
	else
		*pal_nbytes = 2 + d->num_pal_entries * 3;
	if(d->palette_is_hls) goto done;

	de_read_palette_rgb(c->infile, pos+2, d->num_pal_entries, 3, d->pal, 256, 0);
done:
	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 %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0x19e8f7(%rip), %rsi    # 0x1bbf50
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x165280
movq %rax, %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, %edx
leaq 0x17fcf9(%rip), %rsi    # 0x19d39c
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x1d6ca
movq -0x10(%rbp), %rax
imulq $0x6, 0x30(%rax), %rcx
addq $0x2, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1d6de
movq -0x10(%rbp), %rax
imulq $0x3, 0x30(%rax), %rcx
addq $0x2, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x1d6ea
jmp 0x1d723
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %r8
addq $0x38, %r8
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c0c0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/alphabmp.c
// Function: do_uncompress_image
static int do_uncompress_image(deark *c, lctx *d, i64 pos1, dbuf *unc_pixels)
{
	i64 bytes_in_this_line;
	i64 pos = pos1;
	i64 j;
	struct de_dfilter_ctx *dfctx = NULL;
	struct de_dfilter_out_params dcmpro;
	struct de_dfilter_results dres;

	de_dbg(c, "decompressing bitmap");

	// Each line is compressed independently, using PackBits.
	de_dfilter_init_objects(c, NULL, &dcmpro, &dres);
	dcmpro.f = unc_pixels;
	dfctx = de_dfilter_create(c, dfilter_packbits_codec, NULL, &dcmpro, &dres);

	for(j=0; j<d->h; j++) {
		bytes_in_this_line = de_getu16le(pos);
		pos += 2;
		de_dfilter_addslice(dfctx, c->infile, pos, bytes_in_this_line);
		de_dfilter_command(dfctx, DE_DFILTER_COMMAND_SOFTRESET, 0);
		pos += bytes_in_this_line;
	}

	de_dfilter_finish(dfctx);
	if(dres.errcode) {
		de_err(c, "%s", de_dfilter_get_errmsg(c, &dres));
		return 0;
	}

	de_dbg(c, "decompressed %d bytes to %d bytes", (int)(pos-pos1),
		(int)unc_pixels->len);

	de_dfilter_destroy(dfctx);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x17fc43(%rip), %rsi    # 0x19d3b9
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x1773f0
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x15a1c8(%rip), %rsi    # 0x177970
xorl %eax, %eax
movl %eax, %edx
leaq -0x60(%rbp), %rcx
leaq -0xc0(%rbp), %r8
callq 0x1775a0
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x1d83a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x177770
movq -0x48(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x177690
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1d7c8
movq -0x48(%rbp), %rdi
callq 0x1776f0
cmpl $0x0, -0xc0(%rbp)
je 0x1d888
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x177360
movq -0xc8(%rbp), %rdi
movq %rax, %rdx
leaq 0x1832b7(%rip), %rsi    # 0x1a0b2f
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x1d8be
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
subq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
leaq 0x17fb27(%rip), %rsi    # 0x19d3ce
movb $0x0, %al
callq 0x15b0d0
movq -0x48(%rbp), %rdi
callq 0x177720
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/alphabmp.c
// Function: do_bitmap
static void do_bitmap(deark *c, lctx *d, dbuf *unc_pixels)
{
	i64 rowspan;
	i64 bits_per_row;
	de_bitmap *img = NULL;

	bits_per_row = de_pad_to_n(d->npwidth * d->bpp, 8);
	rowspan = bits_per_row/8;
	d->pdwidth = bits_per_row / d->bpp;

	img = de_bitmap_create2(c, d->npwidth, d->pdwidth, d->h, 3);

	if(d->bpp<=8) {
		de_convert_image_paletted(unc_pixels, 0, d->bpp, rowspan, d->pal, img, 0);
	}
	else {
		de_convert_image_rgb(unc_pixels, 0, rowspan, 3, img, 0);
	}

	de_bitmap_write_to_file(img, NULL, DE_CREATEFLAG_OPT_IMAGE);

	de_bitmap_destroy(img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq 0x18(%rax), %rdi
movl $0x8, %esi
callq 0x15ce90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cqto
idivq 0x18(%rcx)
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x3, %r8d
callq 0x16b7f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x8, 0x18(%rax)
jg 0x1d99a
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %r8
addq $0x38, %r8
movq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %esi
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c520
jmp 0x1d9b7
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %esi
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0x16c8b0
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x16afd0
movq -0x30(%rbp), %rdi
callq 0x16af60
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: de_module_amigaicon
void de_module_amigaicon(deark *c, struct deark_module_info *mi)
{
	mi->id = "amigaicon";
	mi->desc = "Amiga Workbench icon (.info), NewIcons, GlowIcons";
	mi->run_fn = de_run_amigaicon;
	mi->identify_fn = de_identify_amigaicon;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x17fa59(%rip), %rcx    # 0x19d450
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x17fa55(%rip), %rcx    # 0x19d45a
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x1da30
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x18d(%rip), %rcx       # 0x1dbb0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: de_run_amigaicon
static void de_run_amigaicon(deark *c, de_module_params *mparams)
{
	lctx *d;
	i64 i;

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

	do_scan_file(c, d);

	if(d->has_glowicons) {
		de_declare_fmt(c, "Amiga Workbench Icon, GlowIcons");
	}
	else if(d->has_newicons) {
		de_declare_fmt(c, "Amiga Workbench Icon, NewIcons");
	}
	else {
		de_declare_fmt(c, "Amiga Workbench Icon");
	}

	de_dbg(c, "finished scanning file, now extracting icons");

	// Original format icons
	for(i=0; i<d->num_main_icons; i++) {
		do_read_main_icon(c, d, d->main_icon_pos[i], i);
	}

	// NewIcons
	for(i=0; i<2; i++) {
		if(d->newicons_data[i]) {
			do_decode_newicons(c, d, d->newicons_data[i], (int)i);
		}
	}

	// GlowIcons
	if(d->has_glowicons) {
		do_glowicons(c, d, d->glowicons_pos);
	}

	if(d->newicons_data[0]) dbuf_close(d->newicons_data[0]);
	if(d->newicons_data[1]) dbuf_close(d->newicons_data[1]);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc88, %esi            # imm = 0xC88
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1dc00
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x1da7b
movq -0x8(%rbp), %rdi
leaq 0x17fa18(%rip), %rsi    # 0x19d48c
callq 0x15e380
jmp 0x1daa9
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x1da97
movq -0x8(%rbp), %rdi
leaq 0x17fa1c(%rip), %rsi    # 0x19d4ac
callq 0x15e380
jmp 0x1daa7
movq -0x8(%rbp), %rdi
leaq 0x17fa29(%rip), %rsi    # 0x19d4cb
callq 0x15e380
jmp 0x1daa9
movq -0x8(%rbp), %rdi
leaq 0x17fa2c(%rip), %rsi    # 0x19d4e0
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x1dafd
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rdx
movq -0x20(%rbp), %rcx
callq 0x1e250
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1dac3
movq $0x0, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jge 0x1db4c
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq $0x0, 0x40(%rax,%rcx,8)
je 0x1db3c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x40(%rax,%rcx,8), %rdx
movq -0x20(%rbp), %rax
movl %eax, %ecx
callq 0x1e5e0
jmp 0x1db3e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1db05
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x1db6b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdx
callq 0x1eb00
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x1db83
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x1676a0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x1db9b
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: do_glowicons
static void do_glowicons(deark *c, lctx *d, i64 pos1)
{
	struct de_iffctx *ictx = NULL;
	int saved_indent_level;

	ictx = fmtutil_create_iff_decoder(c);
	de_dbg_indent_save(c, &saved_indent_level);

	de_dbg(c, "GlowIcons data at offset %d", (int)pos1);
	de_dbg_indent(c, 1);

	ictx->userdata = (void*)d;
	ictx->handle_chunk_fn = my_iff_chunk_handler;
	ictx->f = c->infile;
	fmtutil_read_iff_format(ictx, pos1, c->infile->len - pos1);

	de_dbg_indent_restore(c, saved_indent_level);
	fmtutil_destroy_iff_decoder(ictx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18c8b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
leaq 0x17ed87(%rip), %rsi    # 0x19d8ce
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
leaq 0x71d(%rip), %rcx       # 0x1f290
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
subq -0x18(%rbp), %rdx
callq 0x18c920
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x15b5a0
movq -0x20(%rbp), %rdi
callq 0x18c8f0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: get_icon_type_name
static const char *get_icon_type_name(u8 t)
{
	const char *tn = NULL;

	switch(t) {
	case 1: tn="disk"; break;
	case 2: tn="drawer"; break;
	case 3: tn="tool"; break;
	case 4: tn="project"; break;
	case 6: tn="device"; break;
	case 7: tn="kick"; break;
	}
	return tn?tn:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x6, %eax
ja 0x1ec43
movq -0x18(%rbp), %rax
leaq 0x17e802(%rip), %rcx    # 0x19d3f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x17ea97(%rip), %rax    # 0x19d695
movq %rax, -0x10(%rbp)
jmp 0x1ec43
leaq 0x17ea8f(%rip), %rax    # 0x19d69a
movq %rax, -0x10(%rbp)
jmp 0x1ec43
leaq 0x17ea89(%rip), %rax    # 0x19d6a1
movq %rax, -0x10(%rbp)
jmp 0x1ec43
leaq 0x17ea81(%rip), %rax    # 0x19d6a6
movq %rax, -0x10(%rbp)
jmp 0x1ec43
leaq 0x17ea7c(%rip), %rax    # 0x19d6ae
movq %rax, -0x10(%rbp)
jmp 0x1ec43
leaq 0x17ea76(%rip), %rax    # 0x19d6b5
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1ec54
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1ec61
leaq 0x198fd2(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x1ec61
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: get_main_icon_size
static void get_main_icon_size(deark *c, lctx *d, i64 pos, i64 *pbytesused)
{
	i64 width, height;
	i64 depth;
	i64 src_rowspan, src_planespan;

	width = de_getu16be(pos+4);
	height = de_getu16be(pos+6);
	depth = de_getu16be(pos+8);
	src_rowspan = ((width+15)/16)*2;
	src_planespan = src_rowspan * height;

	*pbytesused = 20 + src_planespan * depth;
}

// 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 -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x1651d0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x6, %rsi
callq 0x1651d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x1651d0
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq $0xf, %rax
movl $0x10, %ecx
cqto
idivq %rcx
shlq %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
imulq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
imulq -0x38(%rbp), %rcx
addq $0x14, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: do_detect_glowicons
static int do_detect_glowicons(deark *c, lctx *d, i64 pos)
{
	i64 gsize;
	u32 chunk_id;
	u32 form_type;

	gsize = c->infile->len - pos;
	if(gsize<=0) return 0;

	if(gsize>=24) {
		chunk_id = (u32)de_getu32be(pos);
		form_type = (u32)de_getu32be(pos+8);
		if(chunk_id==CODE_FORM && form_type==CODE_ICON) {
			de_dbg(c, "GlowIcons data found at %d", (int)pos);
			return 1;
		}
	}

	de_warn(c, "Extra data found at end of file, but not identified as GlowIcons format.");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jg 0x1ef0b
movl $0x0, -0x4(%rbp)
jmp 0x1ef8c
cmpq $0x18, -0x28(%rbp)
jl 0x1ef73
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165470
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
callq 0x165470
movl %eax, -0x30(%rbp)
cmpl $0x464f524d, -0x2c(%rbp) # imm = 0x464F524D
jne 0x1ef71
cmpl $0x49434f4e, -0x30(%rbp) # imm = 0x49434F4E
jne 0x1ef71
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x17e80a(%rip), %rsi    # 0x19d76b
movb $0x0, %al
callq 0x15b0d0
movl $0x1, -0x4(%rbp)
jmp 0x1ef8c
jmp 0x1ef73
movq -0x10(%rbp), %rdi
leaq 0x17e808(%rip), %rsi    # 0x19d786
movb $0x0, %al
callq 0x15bc10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: do_newicons_process_bits
static void do_newicons_process_bits(deark *c, lctx *d, dbuf *f, u8 b, UI nbits)
{
	UI i;
	u8 tmpb;

	for(i=0; i<nbits; i++) {
		tmpb = (b>>(nbits-1-i))&0x01;
		do_newicons_process_bit(c, d, f, tmpb);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x1f1c1
movzbl -0x19(%rbp), %eax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
subl -0x24(%rbp), %ecx
sarl %cl, %eax
andl $0x1, %eax
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movzbl -0x25(%rbp), %ecx
callq 0x1f1d0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1f184
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: do_newicons_process_bit
static void do_newicons_process_bit(deark *c, lctx *d, dbuf *f, u8 b)
{
	UI nbits_needed;

	de_bitbuf_lowlevel_add_bits(&d->newicons_bbll, (u64)b, 1);

	// If line_count==0, we're still reading palette samples, which are always 8 bits.
	nbits_needed = (d->newicons_finished_pal==0) ? 8 : d->newicons_bits_per_pixel;

	if(d->newicons_bbll.nbits_in_bitbuf >= nbits_needed) {
		UI x;

		x = (UI)de_bitbuf_lowlevel_get_bits(&d->newicons_bbll, nbits_needed);
		if(x>255 && d->newicons_finished_pal) {
			// For now at least, we only support 9-bit images if they don't
			// actually use the 9th bit.
			d->newicons_largepalentry_flag = 1;
		}
		dbuf_writebyte(f, (u8)x);
		d->newicons_bbll.nbits_in_bitbuf = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
addq $0x58, %rdi
movzbl -0x19(%rbp), %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x16a1b0
movq -0x10(%rbp), %rax
movzbl 0x54(%rax), %eax
cmpl $0x0, %eax
jne 0x1f218
movl $0x8, %eax
movl %eax, -0x28(%rbp)
jmp 0x1f222
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
cmpl -0x20(%rbp), %eax
jb 0x1f27f
movq -0x10(%rbp), %rdi
addq $0x58, %rdi
movl -0x20(%rbp), %esi
callq 0x16a2a0
movl %eax, -0x24(%rbp)
cmpl $0xff, -0x24(%rbp)
jbe 0x1f265
movq -0x10(%rbp), %rax
movzbl 0x54(%rax), %eax
cmpl $0x0, %eax
je 0x1f265
movq -0x10(%rbp), %rax
movb $0x1, 0x55(%rax)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
movzbl %al, %esi
callq 0x168380
movq -0x10(%rbp), %rax
movl $0x0, 0x5c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amigaicon.c
// Function: my_iff_chunk_handler
static int my_iff_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	lctx *d = (lctx*)ictx->userdata;
	i64 dpos, dlen;

	if(ictx->chunkctx->chunk4cc.id == CODE_FORM) {
		ictx->is_std_container = 1;
		return 1;
	}

	if(ictx->level!=1) {
		return 1;
	}

	if(ictx->curr_container_contentstype4cc.id != CODE_ICON) {
		return 1;
	}

	dpos = ictx->chunkctx->dpos;
	dlen = ictx->chunkctx->dlen;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_FACE: // FACE (parameters)
		ictx->handled = 1;
		d->glowicons_width = 1+(i64)dbuf_getbyte(ictx->f, dpos);
		d->glowicons_height = 1+(i64)dbuf_getbyte(ictx->f, dpos+1);
		de_dbg_dimensions(c, d->glowicons_width, d->glowicons_height);
		break;
	case CODE_IMAG: // IMAG (one of the images that make up this icon)
		ictx->handled = 1;
		do_glowicons_IMAG(c, d, dpos, dlen);
		break;
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
cmpl $0x464f524d, 0x4(%rax)  # imm = 0x464F524D
jne 0x1f2e1
movq -0x10(%rbp), %rax
movl $0x1, 0x134(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1f403
movq -0x10(%rbp), %rax
cmpl $0x1, 0x64(%rax)
je 0x1f2f7
movl $0x1, -0x4(%rbp)
jmp 0x1f403
movq -0x10(%rbp), %rax
cmpl $0x49434f4e, 0xfc(%rax) # imm = 0x49434F4E
je 0x1f313
movl $0x1, -0x4(%rbp)
jmp 0x1f403
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x46414345, %eax       # imm = 0x46414345
je 0x1f362
jmp 0x1f353
movl -0x34(%rbp), %eax
subl $0x494d4147, %eax       # imm = 0x494D4147
je 0x1f3d9
jmp 0x1f3fc
movq -0x10(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165060
movzbl %al, %eax
movl %eax, %ecx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
callq 0x165060
movzbl %al, %eax
movl %eax, %ecx
addq $0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rdx
callq 0x15bba0
jmp 0x1f3fc
movq -0x10(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x1f410
movl $0x1, -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/amigaicon.c
// Function: glowdata_decompress
static void glowdata_decompress(dbuf *f, i64 pos, i64 len,
	dbuf *outf, UI bits_per_pixel)
{
	i64 x;
	i64 i;
	u8 b, b2;
	struct de_bitreader bitrd;

	de_zeromem(&bitrd, sizeof(struct de_bitreader));
	bitrd.f = f;
	bitrd.curpos = pos;
	bitrd.endpos = pos + len;
	bitrd.bbll.is_lsb = 0;
	de_bitbuf_lowlevel_empty(&bitrd.bbll);

	while(1) {
		b = (u8)de_bitreader_getbits(&bitrd, 8);
		if(bitrd.eof_flag) break;

		if(b<=127) {
			// 1+b literal pixels
			x = 1+(i64)b;
			for(i=0; i<x; i++) {
				b2 = (u8)de_bitreader_getbits(&bitrd, bits_per_pixel);
				dbuf_writebyte(outf, b2);
			}
		}
		else if(b>=129) {
			// 257-b repeated pixels
			x = 257 - (i64)b;
			b2 = (u8)de_bitreader_getbits(&bitrd, bits_per_pixel);
			for(i=0; i<x; i++) {
				dbuf_writebyte(outf, b2);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x19140
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x0, -0x50(%rbp)
leaq -0x70(%rbp), %rdi
addq $0x20, %rdi
callq 0x16a360
leaq -0x70(%rbp), %rdi
movl $0x8, %esi
callq 0x16a390
movb %al, -0x39(%rbp)
cmpb $0x0, -0x58(%rbp)
je 0x1f9a5
jmp 0x1fa5a
movzbl -0x39(%rbp), %eax
cmpl $0x7f, %eax
jg 0x1f9f8
movzbl -0x39(%rbp), %eax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x1f9f6
movl -0x24(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x16a390
movb %al, -0x3a(%rbp)
movq -0x20(%rbp), %rdi
movzbl -0x3a(%rbp), %esi
callq 0x168380
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1f9c2
jmp 0x1fa55
movzbl -0x39(%rbp), %eax
cmpl $0x81, %eax
jl 0x1fa53
movzbl -0x39(%rbp), %eax
movl %eax, %ecx
movl $0x101, %eax            # imm = 0x101
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x16a390
movb %al, -0x3a(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x1fa51
movq -0x20(%rbp), %rdi
movzbl -0x3a(%rbp), %esi
callq 0x168380
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1fa2c
jmp 0x1fa53
jmp 0x1fa55
jmp 0x1f989
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ansiart.c
// Function: de_module_ansiart
void de_module_ansiart(deark *c, struct deark_module_info *mi)
{
	mi->id = "ansiart";
	mi->id_alias[0] = "ansi";
	mi->desc = "ANSI Art character graphics";
	mi->run_fn = de_run_ansiart;
	mi->identify_fn = de_identify_ansiart;
	mi->help_fn = de_help_ansiart;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x17e1a9(%rip), %rcx    # 0x19dc20
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x17cc71(%rip), %rcx    # 0x19c6f6
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
leaq 0x17e194(%rip), %rcx    # 0x19dc28
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2d(%rip), %rcx        # 0x1fad0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x4be(%rip), %rcx       # 0x1ff70
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x5ef(%rip), %rcx       # 0x200b0
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ansiart.c
// Function: de_identify_ansiart
static int de_identify_ansiart(deark *c)
{
	u8 buf[4];
	int has_ans_ext;

	if(!c->detection_data->SAUCE_detection_attempted) {
		de_err(c, "ansiart detection requires sauce module");
		return 0;
	}

	de_read(buf, 0, 4);

	if(!de_memcmp(buf, "\x04\x31\x2e\x34", 4)) {
		// Looks like iCEDraw format, which may use the same SAUCE identifiers
		// as ANSI Art, even though it is incompatible.
		return 0;
	}

	has_ans_ext = de_input_file_has_ext(c, "ans");

	if(c->detection_data->sauce.has_SAUCE) {
		if(c->detection_data->sauce.data_type==1 &&
			c->detection_data->sauce.file_type==1)
		{
			// Unfortunately, iCEDraw and possibly other formats may use the
			// same SAUCE identifiers as ANSI Art, so we probably shouldn't always
			// return 100.
			if(has_ans_ext)
				return 100;
			return 91;
		}
	}

	// ANSI Art files usually start with an ANSI escape sequence.
	// TODO: Another possibility is that the file could start with email headers.
	if(buf[0]==0x1b && buf[1]==0x5b && (buf[2]=='?' ||
		(buf[2]>='0' && buf[2]<='9')))
	{
		return has_ans_ext ? 100 : 50;
	}

	if(has_ans_ext)
		return 10;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpb $0x0, 0x5(%rax)
jne 0x1ffa8
movq -0x10(%rbp), %rdi
leaq 0x17df7c(%rip), %rsi    # 0x19df11
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x2009c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x14(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
callq 0x164d10
leaq -0x14(%rbp), %rax
movl (%rax), %eax
subl $0x342e3104, %eax       # imm = 0x342E3104
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1ffe4
movl $0x0, -0x4(%rbp)
jmp 0x2009c
movq -0x10(%rbp), %rdi
leaq 0x1a775a(%rip), %rsi    # 0x1c7749
callq 0x15d180
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpb $0x0, 0x10(%rax)
je 0x20041
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movzbl 0x11(%rax), %eax
cmpl $0x1, %eax
jne 0x2003f
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movzbl 0x12(%rax), %eax
cmpl $0x1, %eax
jne 0x2003f
cmpl $0x0, -0x18(%rbp)
je 0x20036
movl $0x64, -0x4(%rbp)
jmp 0x2009c
movl $0x5b, -0x4(%rbp)
jmp 0x2009c
jmp 0x20041
movzbl -0x14(%rbp), %eax
cmpl $0x1b, %eax
jne 0x20086
movzbl -0x13(%rbp), %eax
cmpl $0x5b, %eax
jne 0x20086
movzbl -0x12(%rbp), %eax
cmpl $0x3f, %eax
je 0x2006e
movzbl -0x12(%rbp), %eax
cmpl $0x30, %eax
jl 0x20086
movzbl -0x12(%rbp), %eax
cmpl $0x39, %eax
jg 0x20086
movl -0x18(%rbp), %edx
movl $0x32, %eax
movl $0x64, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x2009c
cmpl $0x0, -0x18(%rbp)
je 0x20095
movl $0xa, -0x4(%rbp)
jmp 0x2009c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ansiart.c
// Function: de_help_ansiart
static void de_help_ansiart(deark *c)
{
	de_msg(c, "-opt ansiart:no24bitcolor : Disable extended colors");
	de_msg(c, "-opt ansiart:noblink : Disable blinking characters");
	de_msg(c, "-opt ansiart:vt100 : Use VT100 mode");
	de_msg(c, "-opt char:output=image : Write an image file instead of HTML");
	de_msg(c, " -opt char:charwidth=<8|9> : Width of a character cell");
	de_msg(c, "-opt char:width=<n> : Number of characters per row");
	// TODO: SAUCE help is relevant to more formats than this one.
	de_msg(c, "-opt sauce:combinecomments=1 : Don't put line breaks between comments");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x17de77(%rip), %rsi    # 0x19df3e
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17de99(%rip), %rsi    # 0x19df72
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17deba(%rip), %rsi    # 0x19dfa5
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17decc(%rip), %rsi    # 0x19dfc9
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17def7(%rip), %rsi    # 0x19e006
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17df1c(%rip), %rsi    # 0x19e03d
movb $0x0, %al
callq 0x15c190
movq -0x8(%rbp), %rdi
leaq 0x17df3d(%rip), %rsi    # 0x19e070
movb $0x0, %al
callq 0x15c190
addq $0x10, %rsp
popq %rbp
retq