LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: convert_image_gray8
static void convert_image_gray8(dbuf *f, i64 fpos, i64 rowspan, de_bitmap *img)
{
	i64 i, j;

	for(j=0; j<img->height; j++) {
		for(i=0; i<img->width; i++) {
			u8 n;

			n = dbuf_getbyte(f, fpos+j*rowspan+i);
			de_bitmap_setpixel_gray(img, i, j, n);
		}
	}
}

// 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 $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0xa8077
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0xa8067
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
addq -0x28(%rbp), %rsi
callq 0x165060
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movzbl -0x31(%rbp), %ecx
callq 0x16b1c0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa8016
jmp 0xa8069
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa8000
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: do_argb_png_or_jp2
static void do_argb_png_or_jp2(deark *c, lctx *d, struct page_ctx *pg)
{
	identify_content(c, d, pg);

	if(pg->type_info->image_type==IMGTYPE_ARGB_ETC && pg->content_type==CONTENT_ARGB) {
		do_argb(c, d, pg);
		return;
	}

	de_dbg(c, "Trying to extract file at %"I64_FMT, pg->image_pos);

	if(pg->content_type==CONTENT_JP2 || pg->content_type==CONTENT_J2C ||
		pg->content_type==CONTENT_PNG)
	{
		do_extract_png_or_jp2(c, d, pg);
		return;
	}

	de_err(c, "(Image #%d) Unidentified file format", pg->image_num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xa8740
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x5, 0x10(%rax)
jne 0xa80d0
movq -0x18(%rbp), %rax
cmpl $0x5, 0x68(%rax)
jne 0xa80d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xa8850
jmp 0xa8133
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x10aa97(%rip), %rsi    # 0x1b2b7a
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
cmpl $0x3, 0x68(%rax)
je 0xa8108
movq -0x18(%rbp), %rax
cmpl $0x4, 0x68(%rax)
je 0xa8108
movq -0x18(%rbp), %rax
cmpl $0x2, 0x68(%rax)
jne 0xa811b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xa89d0
jmp 0xa8133
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
leaq 0x10aa6c(%rip), %rsi    # 0x1b2b98
movb $0x0, %al
callq 0x15bfb0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: do_decode_1_4_8bit
static void do_decode_1_4_8bit(deark *c, lctx *d, struct page_ctx *pg)
{
	de_bitmap *img = NULL;
	int bypp;

	bypp = (pg->type_info->bpp==1)?2:4;
	img = de_bitmap_create(c, pg->type_info->width, pg->type_info->height, bypp);

	if(pg->type_info->bpp==8) {
		populate_stdpal256(d);
		de_memcpy(pg->pal, d->stdpal256, sizeof(d->stdpal256));
	}
	else if(pg->type_info->bpp==4) {
		de_memcpy(pg->pal, g_stdpal16, sizeof(g_stdpal16));
	}
	else { // 1
		pg->pal[0] = DE_STOCKCOLOR_WHITE;
		pg->pal[1] = DE_STOCKCOLOR_BLACK;
	}

	de_convert_image_paletted(c->infile, pg->image_pos, pg->type_info->bpp, pg->rowspan,
		pg->pal, img, 0);

	if(pg->mask_ref && pg->mask_ref->img) {
		de_bitmap_apply_mask(img, pg->mask_ref->img, 0);
	}

	de_bitmap_write_to_file(img, pg->filename_token, DE_CREATEFLAG_OPT_IMAGE);
	de_bitmap_destroy(img);
}

// 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 -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl 0xc(%rax), %edx
movl $0x4, %eax
movl $0x2, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0x4(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0x8(%rax), %rdx
movl -0x24(%rbp), %ecx
callq 0x16b750
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x8, 0xc(%rax)
jne 0xa848b
movq -0x10(%rbp), %rdi
callq 0xa8cb0
movq -0x18(%rbp), %rdi
addq $0x8c, %rdi
movq -0x10(%rbp), %rsi
addq $0x114, %rsi            # imm = 0x114
movl $0x400, %edx            # imm = 0x400
callq 0x191e0
jmp 0xa84d5
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x4, 0xc(%rax)
jne 0xa84b7
movq -0x18(%rbp), %rdi
addq $0x8c, %rdi
leaq 0x10ab35(%rip), %rsi    # 0x1b2fe0
movl $0x40, %edx
callq 0x191e0
jmp 0xa84d3
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x8c(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0xff000000, 0x90(%rax) # imm = 0xFF000000
jmp 0xa84d5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0xc(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %r8
addq $0x8c, %r8
movq -0x20(%rbp), %r9
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x16c520
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xa8547
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0xa8547
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x16cf60
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x6c, %rsi
movl $0x2, %edx
callq 0x16afd0
movq -0x20(%rbp), %rdi
callq 0x16af60
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: identify_content
static void identify_content(deark *c, lctx *d, struct page_ctx *pg)
{
	u8 buf[8];

	if(pg->content_type!=CONTENT_UNSET) return;

	// Read the first few bytes
	de_read(buf, pg->image_pos, sizeof(buf));

	if(buf[4]=='j' && buf[5]=='P') {
		pg->content_type = CONTENT_JP2;
	}
	else if(buf[0]==0xff && buf[1]==0x4f && buf[2]==0xff && buf[3]==0x51) {
		pg->content_type = CONTENT_J2C;
	}
	else if(buf[0]==0x89 && buf[1]==0x50) {
		pg->content_type = CONTENT_PNG;
	}
	else if(buf[0]=='A' && buf[1]=='R' && buf[2]=='G' && buf[3]=='B') {
		pg->content_type = CONTENT_ARGB;
	}
	else {
		pg->content_type = CONTENT_UNKNOWN;
	}
}

// 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
cmpl $0x0, 0x68(%rax)
je 0xa8763
jmp 0xa883b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x8, %ecx
callq 0x164d10
movzbl -0x1c(%rbp), %eax
cmpl $0x6a, %eax
jne 0xa87a3
movzbl -0x1b(%rbp), %eax
cmpl $0x50, %eax
jne 0xa87a3
movq -0x18(%rbp), %rax
movl $0x3, 0x68(%rax)
jmp 0xa883b
movzbl -0x20(%rbp), %eax
cmpl $0xff, %eax
jne 0xa87d8
movzbl -0x1f(%rbp), %eax
cmpl $0x4f, %eax
jne 0xa87d8
movzbl -0x1e(%rbp), %eax
cmpl $0xff, %eax
jne 0xa87d8
movzbl -0x1d(%rbp), %eax
cmpl $0x51, %eax
jne 0xa87d8
movq -0x18(%rbp), %rax
movl $0x4, 0x68(%rax)
jmp 0xa8839
movzbl -0x20(%rbp), %eax
cmpl $0x89, %eax
jne 0xa87f9
movzbl -0x1f(%rbp), %eax
cmpl $0x50, %eax
jne 0xa87f9
movq -0x18(%rbp), %rax
movl $0x2, 0x68(%rax)
jmp 0xa8837
movzbl -0x20(%rbp), %eax
cmpl $0x41, %eax
jne 0xa882a
movzbl -0x1f(%rbp), %eax
cmpl $0x52, %eax
jne 0xa882a
movzbl -0x1e(%rbp), %eax
cmpl $0x47, %eax
jne 0xa882a
movzbl -0x1d(%rbp), %eax
cmpl $0x42, %eax
jne 0xa882a
movq -0x18(%rbp), %rax
movl $0x5, 0x68(%rax)
jmp 0xa8835
movq -0x18(%rbp), %rax
movl $0x1, 0x68(%rax)
jmp 0xa8837
jmp 0xa8839
jmp 0xa883b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: do_argb
static void do_argb(deark *c, lctx *d, struct page_ctx *pg)
{
	dbuf *unc_pixels = NULL;
	de_bitmap *img = NULL;
	i64 w, h;

	w = pg->type_info->width;
	h = pg->type_info->height;

	unc_pixels = dbuf_create_membuf(c, w*h*4, 1);
	do_uncompress_24(c, d, pg, unc_pixels, 4);

	img = de_bitmap_create(c, w, h, 4);

	read_image_plane(c, d, unc_pixels, 0, img, 3);
	read_image_plane(c, d, unc_pixels, 1, img, 0);
	read_image_plane(c, d, unc_pixels, 2, img, 1);
	read_image_plane(c, d, unc_pixels, 3, img, 2);

	de_snprintf(pg->filename_token, sizeof(pg->filename_token), "%dx%dx32",
		(int)w, (int)h);

	de_bitmap_write_to_file(img, pg->filename_token, DE_CREATEFLAG_OPT_IMAGE);
	de_bitmap_destroy(img);
	if(unc_pixels) dbuf_close(unc_pixels);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0x4(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
imulq -0x38(%rbp), %rsi
shlq $0x2, %rsi
movl $0x1, %edx
callq 0x168020
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x4, %r8d
callq 0xa8ae0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl $0x4, %ecx
callq 0x16b750
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
movl $0x3, %r9d
callq 0xa8bf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r9d
callq 0xa8bf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
movl $0x2, %ecx
movl $0x1, %r9d
callq 0xa8bf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r8
movl $0x3, %ecx
movl $0x2, %r9d
callq 0xa8bf0
movq -0x18(%rbp), %rdi
addq $0x6c, %rdi
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %eax, %r8d
movl $0x20, %esi
leaq 0x10a236(%rip), %rdx    # 0x1b2bbd
movb $0x0, %al
callq 0x15a980
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x6c, %rsi
movl $0x2, %edx
callq 0x16afd0
movq -0x28(%rbp), %rdi
callq 0x16af60
cmpq $0x0, -0x20(%rbp)
je 0xa89bd
movq -0x20(%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/icns.c
// Function: do_extract_png_or_jp2
static void do_extract_png_or_jp2(deark *c, lctx *d, struct page_ctx *pg)
{
	de_finfo *fi = NULL;
	const char *ext;

	if(pg->content_type==CONTENT_JP2) {
		ext = "jp2";
	}
	else if(pg->content_type==CONTENT_J2C) {
		ext = "j2c";
	}
	else if(pg->content_type==CONTENT_PNG) {
		ext = "png";
	}
	else {
		goto done;
	}

	fi = de_finfo_create(c);

	de_snprintf(pg->filename_token, sizeof(pg->filename_token), "%dx%d",
		(int)pg->type_info->width, (int)pg->type_info->height);
	de_finfo_set_name_from_sz(c, fi, pg->filename_token, 0, DE_ENCODING_ASCII);

	dbuf_create_file_from_slice(c->infile, pg->image_pos, pg->image_len, ext, fi, 0);

done:
	de_finfo_destroy(c, fi);
}

// 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 -0x18(%rbp), %rax
cmpl $0x3, 0x68(%rax)
jne 0xa8a03
leaq 0x10a1c9(%rip), %rax    # 0x1b2bc6
movq %rax, -0x28(%rbp)
jmp 0xa8a3a
movq -0x18(%rbp), %rax
cmpl $0x4, 0x68(%rax)
jne 0xa8a1a
leaq 0xf95f2(%rip), %rax     # 0x1a2006
movq %rax, -0x28(%rbp)
jmp 0xa8a38
movq -0x18(%rbp), %rax
cmpl $0x2, 0x68(%rax)
jne 0xa8a31
leaq 0x10b4ad(%rip), %rax    # 0x1b3ed8
movq %rax, -0x28(%rbp)
jmp 0xa8a36
jmp 0xa8abe
jmp 0xa8a38
jmp 0xa8a3a
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x6c, %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x8(%rax), %r8d
movl $0x20, %esi
leaq 0x11a7f1(%rip), %rdx    # 0x1c3263
movb $0x0, %al
callq 0x15a980
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x6c, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x15d4c0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x166be0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15d260
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: do_uncompress_24
static void do_uncompress_24(deark *c, lctx *d, struct page_ctx *pg, dbuf *unc_pixels,
	i64 skip)
{
	i64 pos;
	u8 b;
	i64 count;
	u8 n;

	pos = pg->image_pos;
	if(skip) pos+=4;

	while(1) {
		if(pos >= pg->image_pos + pg->image_len) break;

		b = de_getbyte(pos);
		pos++;
		if(b>=128) {
			// Compressed run
			count = (i64)b - 125;
			n = de_getbyte(pos);
			pos++;
			dbuf_write_run(unc_pixels, n, count);
		}
		else {
			// An uncompressed run
			count = 1 + (i64)b;
			dbuf_copy(c->infile, pos, count, unc_pixels);
			pos += count;
		}
	}
}

// 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 %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xa8b1b
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0xa8b1d
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x18(%rbp), %rdx
addq 0x18(%rdx), %rcx
cmpq %rcx, %rax
jl 0xa8b3b
jmp 0xa8bdd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x165060
movb %al, -0x31(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movzbl -0x31(%rbp), %eax
cmpl $0x80, %eax
jl 0xa8ba7
movzbl -0x31(%rbp), %eax
subq $0x7d, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x165060
movb %al, -0x41(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movb -0x41(%rbp), %al
movq -0x40(%rbp), %rdx
movzbl %al, %esi
callq 0x168800
jmp 0xa8bd8
movzbl -0x31(%rbp), %eax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x166070
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xa8b1d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: read_image_plane
static void read_image_plane(deark *c, lctx *d,
	dbuf *unc_pixels, i64 plane, de_bitmap *img, i64 samplenum)
{
	i64 i, j;
	i64 w, h;

	w = img->width;
	h = img->height;

	for(j=0; j<h; j++) {
		for(i=0; i<w; i++) {
			u8 v;

			v = dbuf_getbyte(unc_pixels, (plane*h+j)*w + i);
			de_bitmap_setsample(img, i, j, samplenum, v);
		}
	}
}

// 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 %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0xa8ca6
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0xa8c96
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
imulq -0x50(%rbp), %rsi
addq -0x40(%rbp), %rsi
imulq -0x48(%rbp), %rsi
addq -0x38(%rbp), %rsi
callq 0x165060
movb %al, -0x51(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x30(%rbp), %rcx
movzbl -0x51(%rbp), %r8d
callq 0x16b060
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xa8c42
jmp 0xa8c98
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xa8c30
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: populate_stdpal256
static void populate_stdpal256(lctx *d)
{
	int k;

	if(d->have_stdpal256) return;
	d->have_stdpal256 = 1;

	for(k=0; k<256; k++) {
		d->stdpal256[k] = getpal256(k);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x110(%rax)
je 0xa8ccb
jmp 0xa8d0a
movq -0x8(%rbp), %rax
movb $0x1, 0x110(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0xa8d0a
movl -0xc(%rbp), %edi
callq 0xa8d10
movl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x114(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa8cdd
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/icns.c
// Function: getpal256
static de_color getpal256(int k)
{
	u8 r, g, b;

	if(k<0 || k>255) return 0;
	if(k<=214) {
		// The first 215 palette entries follow a simple pattern.
		r = (u8)((5-k/36)*0x33);
		g = (5-(k%36)/6)*0x33;
		b = (5-k%6)*0x33;
		return DE_MAKE_RGB(r,g,b);
	}

	return supplpal256[k-215];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0xa8d26
cmpl $0xff, -0x8(%rbp)
jle 0xa8d32
movl $0x0, -0x4(%rbp)
jmp 0xa8dc9
cmpl $0xd6, -0x8(%rbp)
jg 0xa8db1
movl -0x8(%rbp), %eax
movl $0x24, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl $0x5, %eax
subl %ecx, %eax
imull $0x33, %eax, %eax
movb %al, -0x9(%rbp)
movl -0x8(%rbp), %eax
movl $0x24, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl $0x5, %eax
subl %ecx, %eax
imull $0x33, %eax, %eax
movb %al, -0xa(%rbp)
movl -0x8(%rbp), %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl $0x5, %eax
subl %edx, %eax
imull $0x33, %eax, %eax
movb %al, -0xb(%rbp)
movzbl -0x9(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0xa(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0xb(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xa8dc9
movl -0x8(%rbp), %eax
subl $0xd7, %eax
movslq %eax, %rcx
leaq 0x10a25d(%rip), %rax    # 0x1b3020
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: de_module_id3
void de_module_id3(deark *c, struct deark_module_info *mi)
{
	mi->id = "id3";
	mi->desc = "ID3 metadata";
	mi->run_fn = de_run_id3;
	mi->identify_fn = de_identify_id3;
	mi->flags |= DE_MODFLAG_HIDDEN | DE_MODFLAG_SHAREDDETECTION;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xf5aaf(%rip), %rcx     # 0x19e896
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x10a2e7(%rip), %rcx    # 0x1b30dc
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0xa8e30
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x12d(%rip), %rcx       # 0xa8f40
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x11, %ecx
movl %ecx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: de_run_id3
static void de_run_id3(deark *c, de_module_params *mparams)
{
	if(de_havemodcode(c, mparams, 'I')) { // raw ID3v2
		i64 bytes_consumed_id3v2 = 0;
		do_id3v2(c, c->infile, 0, c->infile->len, &bytes_consumed_id3v2);
		if(mparams) {
			mparams->out_params.int64_1 = bytes_consumed_id3v2;
		}
		goto done;
	}
	if(de_havemodcode(c, mparams, '1')) { // raw ID3v1
		do_id3v1(c, 0);
		goto done;
	}
	if(de_havemodcode(c, mparams, 'P')) { // Windows WM/Picture
		do_wmpicture(c, c->infile, 0, c->infile->len);
		goto done;
	}
	if(de_havemodcode(c, mparams, 'F')) { // FLAC PICTURE
		do_flacpicture(c, c->infile, 0, c->infile->len);
		goto done;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x49, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0xa8e9c
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x18(%rbp), %r8
callq 0xa9050
cmpq $0x0, -0x10(%rbp)
je 0xa8e97
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0xa8f38
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x31, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0xa8ec2
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa9300
jmp 0xa8f38
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0xa8efc
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0xa95e0
jmp 0xa8f38
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x46, %edx
callq 0x15d1d0
cmpl $0x0, %eax
je 0xa8f36
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0xa9650
jmp 0xa8f38
jmp 0xa8f38
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: de_identify_id3
static int de_identify_id3(deark *c)
{
	u8 flags;
	u8 version_code;
	u8 has_footer = 0;
	i64 total_len;

	c->detection_data->id3.detection_attempted = 1;
	if(dbuf_memcmp(c->infile, 0, "ID3", 3)) return 0;
	c->detection_data->id3.has_id3v2 = 1;

	version_code = dbuf_getbyte(c->infile, 3);
	flags = dbuf_getbyte(c->infile, 5);
	if(version_code >= 4) {
		has_footer = (flags&0x10)?1:0;
	}

	total_len = 10;
	total_len += get_synchsafe_int(c->infile, 6);
	if(has_footer) total_len += 10;

	de_dbg2(c, "[id3detect] calculated end of ID3v2 data: %u", (unsigned int)total_len);
	c->detection_data->id3.bytes_at_start = (u32)total_len;

	// This module is never "detected". It's only used for its side effects,
	// and as a submodule.
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x13(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movb $0x1, 0x14(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xf58ef(%rip), %rdx     # 0x19e85e
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0xa8f8a
movl $0x0, -0x4(%rbp)
jmp 0xa9044
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movb $0x1, 0x15(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x3, %esi
callq 0x165060
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x5, %esi
callq 0x165060
movb %al, -0x11(%rbp)
movzbl -0x12(%rbp), %eax
cmpl $0x4, %eax
jl 0xa8fe0
movzbl -0x11(%rbp), %edx
andl $0x10, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x13(%rbp)
movq $0xa, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %esi
callq 0xa9a90
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpb $0x0, -0x13(%rbp)
je 0xa9014
movq -0x20(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x10ad70(%rip), %rsi    # 0x1b3d95
movb $0x0, %al
callq 0x15b350
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x18(%rax)
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/id3.c
// Function: do_wmpicture
static void do_wmpicture(deark *c, dbuf *f, i64 pos, i64 len)
{
	id3v2ctx *d = NULL;

	d = de_malloc(c, sizeof(id3v2ctx));
	d->wmpicture_mode = 1;
	decode_id3v2_frame_wmpicture(c, d, f, pos, len);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x15b780
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xab920
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: do_flacpicture
static void do_flacpicture(deark *c, dbuf *f, i64 pos, i64 len)
{
	id3v2ctx *d = NULL;

	d = de_malloc(c, sizeof(id3v2ctx));
	decode_flacpicture(c, d, f, pos, len);
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x15b780
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xabb80
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: unescape_id3v2_data
static void unescape_id3v2_data(deark *c, dbuf *inf, i64 inf_start,
	i64 inf_len, dbuf *outf)
{
	i64 srcpos = inf_start;
	u8 b0;

	de_dbg(c, "unescaping \"unsynchronised\" ID3v2 data");
	de_dbg_indent(c, 1);

	while(srcpos<inf_start+inf_len) {
		b0 = dbuf_getbyte(inf, srcpos++);
		if(b0==0xff && srcpos<(inf_start+inf_len-1) && dbuf_getbyte(inf, srcpos)==0x00) {
			srcpos++;
		}
		dbuf_writebyte(outf, b0);
	}

	de_dbg(c, "unescaped %d bytes to %d bytes", (int)inf_len, (int)outf->len);
	de_dbg_indent(c, -1);
}

// 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 -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x109787(%rip), %rsi    # 0x1b3296
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jge 0xa9ba0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
callq 0x165060
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %eax
cmpl $0xff, %eax
jne 0xa9b91
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0xa9b91
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xa9b91
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movzbl -0x31(%rbp), %esi
callq 0x168380
jmp 0xa9b24
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
leaq 0x109702(%rip), %rsi    # 0x1b32bd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_text
static void decode_id3v2_frame_text(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len, struct de_fourcc *tag4cc)
{
	u8 id3_encoding;
	de_ucstring *s = NULL;
	i64 pos = pos1;

	if(len<1) goto done;
	id3_encoding = dbuf_getbyte(f, pos++);
	de_dbg(c, "text encoding: %d (%s)", (int)id3_encoding,
		get_id3v2_textenc_name(d, id3_encoding));

	s = ucstring_create(c);
	id3v2_read_to_ucstring(c, f, pos, pos1+len-pos, s, id3_encoding);
	de_dbg(c, "text: \"%s\"", ucstring_getpsz(s));

done:
	ucstring_destroy(s);
}

// 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 %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x28(%rbp)
jge 0xaa75c
jmp 0xaa804
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
callq 0x165060
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movzbl -0x31(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x31(%rbp), %esi
callq 0xab3f0
movq -0x60(%rbp), %rdi
movl -0x54(%rbp), %edx
movq %rax, %rcx
leaq 0x108f0d(%rip), %rsi    # 0x1b36b1
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
subq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movzbl -0x31(%rbp), %r9d
callq 0xab5b0
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172500
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0x11c255(%rip), %rsi    # 0x1c6a52
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rdi
callq 0x171750
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_urllink
static void decode_id3v2_frame_urllink(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len, struct de_fourcc *tag4cc)
{
	de_ucstring *s = NULL;

	s = ucstring_create(c);
	dbuf_read_to_ucstring(f, pos1, len, s, 0, DE_ENCODING_LATIN1);
	de_dbg(c, "url: \"%s\"", ucstring_getpsz(s));
	ucstring_destroy(s);
}

// 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 %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
movl $0x5, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x172500
movq -0x40(%rbp), %rdi
movq %rax, %rdx
leaq 0xf40b5(%rip), %rsi     # 0x19e947
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rdi
callq 0x171750
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_pop_popm
static void decode_id3v2_frame_pop_popm(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	i64 bytes_consumed = 0;
	de_ucstring *email = NULL;
	i64 pos = pos1;
	int rating;
	int ret;

	email = ucstring_create(c);
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, ID3ENC_ISO_8859_1,
		email, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "email/id: \"%s\"", ucstring_getpsz(email));
	pos += bytes_consumed;

	if(pos1+len-pos < 1) goto done;
	rating = (int)dbuf_getbyte(f, pos++);
	de_dbg(c, "rating: %d%s", rating, (rating==0)?" (unknown)":"/255");

	// TODO: There can be a "counter" field here.

done:
	ucstring_destroy(email);
}

// 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)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %r8
addq -0x28(%rbp), %r8
subq -0x40(%rbp), %r8
movq -0x38(%rbp), %r10
movl $0x100, %r9d            # imm = 0x100
xorl %eax, %eax
leaq -0x30(%rbp), %rax
movl $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xab4a0
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jne 0xab1a1
jmp 0xab232
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x172500
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0x108701(%rip), %rsi    # 0x1b38c1
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq $0x1, %rax
jge 0xab1e7
jmp 0xab232
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
callq 0x165060
movzbl %al, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x44(%rbp), %esi
leaq 0x1086d2(%rip), %rcx    # 0x1b38e8
leaq 0x1086c0(%rip), %rax    # 0x1b38dd
cmpl $0x0, %esi
cmoveq %rax, %rcx
leaq 0x1086a5(%rip), %rsi    # 0x1b38d0
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rdi
callq 0x171750
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_priv
static void decode_id3v2_frame_priv(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	struct de_stringreaderdata *owner = NULL;
	i64 pos = pos1;
	i64 nbytes_to_scan;
	i64 payload_len;

	nbytes_to_scan = pos1+len-pos;
	if(nbytes_to_scan>256) nbytes_to_scan=256;

	owner = dbuf_read_string(f, pos, nbytes_to_scan, nbytes_to_scan,
		DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_LATIN1);
	if(!owner->found_nul) goto done;

	de_dbg(c, "owner: \"%s\"", ucstring_getpsz(owner->str));
	pos += owner->bytes_consumed;

	payload_len = pos1+len-pos;
	if(payload_len<1) goto done;

	de_dbg(c, "private frame data at %"I64_FMT", len=%"I64_FMT, pos, payload_len);
	if(!de_strcmp(owner->sz, "XMP")) {
		dbuf_create_file_from_slice(f, pos, payload_len, "xmp", NULL, DE_CREATEFLAG_IS_AUX);
	}
	else if(c->debug_level>=2) {
		de_dbg_indent(c, 1);
		de_dbg_hexdump(c, f, pos, payload_len, 256, NULL, 0x1);
		de_dbg_indent(c, -1);
	}

done:
	de_destroy_stringreaderdata(c, owner);
}

// 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 %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x100, -0x40(%rbp)     # imm = 0x100
jle 0xab29e
movq $0x100, -0x40(%rbp)     # imm = 0x100
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl $0x1, %r8d
movl $0x5, %r9d
callq 0x1664c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jne 0xab2d2
jmp 0xab3cf
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x172500
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0x1085f8(%rip), %rsi    # 0x1b38ed
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
movq (%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x48(%rbp)
jge 0xab327
jmp 0xab3cf
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq 0x1085bf(%rip), %rsi    # 0x1b38f9
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x10c117(%rip), %rsi    # 0x1b7467
callq 0x191a0
cmpl $0x0, %eax
jne 0xab37f
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq 0x118059(%rip), %rcx    # 0x1c33c6
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
jmp 0xab3cd
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0xab3cb
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0xab3cd
jmp 0xab3cf
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x166830
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: get_id3v2_textenc_name
static const char *get_id3v2_textenc_name(id3v2ctx *d, u8 id3_encoding)
{
	const char *encname;

	switch(id3_encoding) {
	case 0: encname = "ISO-8859-1"; break;
	case 1:
		if(d->version_code==2) encname = "UCS-2";
		else if(d->version_code==3) encname = "UCS-2 w/BOM";
		else encname = "UTF-16 w/BOM";
		break;
	case 2: encname = "UTF-16BE"; break;
	case 3: encname = "UTF-8"; break;
	default: encname = "?";
	}
	return encname;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0xab48a
movq -0x20(%rbp), %rax
leaq 0x107cb5(%rip), %rcx    # 0x1b30cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1082a5(%rip), %rax    # 0x1b36cc
movq %rax, -0x18(%rbp)
jmp 0xab495
movq -0x8(%rbp), %rax
movzbl 0x30(%rax), %eax
cmpl $0x2, %eax
jne 0xab447
leaq 0x108296(%rip), %rax    # 0x1b36d7
movq %rax, -0x18(%rbp)
jmp 0xab46e
movq -0x8(%rbp), %rax
movzbl 0x30(%rax), %eax
cmpl $0x3, %eax
jne 0xab461
leaq 0x108282(%rip), %rax    # 0x1b36dd
movq %rax, -0x18(%rbp)
jmp 0xab46c
leaq 0x108281(%rip), %rax    # 0x1b36e9
movq %rax, -0x18(%rbp)
jmp 0xab46e
jmp 0xab495
leaq 0x10827f(%rip), %rax    # 0x1b36f6
movq %rax, -0x18(%rbp)
jmp 0xab495
leaq 0x104765(%rip), %rax    # 0x1afbe9
movq %rax, -0x18(%rbp)
jmp 0xab495
leaq 0x10c79c(%rip), %rax    # 0x1b7c2d
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: read_id3v2_terminated_string
static int read_id3v2_terminated_string(deark *c, id3v2ctx *d, dbuf *f,
	i64 pos, i64 nbytes_avail, i64 nbytes_to_scan, u8 id3_encoding,
	de_ucstring *s, i64 *bytes_consumed)
{
	i64 foundpos = 0;
	i64 stringlen;
	int ret;
	int retval = 0;

	if(nbytes_to_scan > nbytes_avail)
		nbytes_to_scan = nbytes_avail;
	if(nbytes_to_scan < 0)
		nbytes_to_scan = 0;

	if(id3_encoding==ID3ENC_UTF16 || id3_encoding==ID3ENC_UTF16BE) {
		// A 2-byte encoding
		int foundflag = 0;

		foundflag = dbuf_get_utf16_NULterm_len(f, pos, nbytes_to_scan, bytes_consumed);
		if(!foundflag) goto done;
		stringlen = (*bytes_consumed)-2;
	}
	else {
		// A 1-byte encoding
		ret = dbuf_search_byte(f, 0x00, pos, nbytes_to_scan, &foundpos);
		if(!ret) goto done;
		stringlen = foundpos - pos;
		*bytes_consumed = stringlen + 1;
	}

	id3v2_read_to_ucstring(c, f, pos, stringlen, s, id3_encoding);

	retval = 1;
done:
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0xab4ec
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0xab4fb
movq $0x0, -0x30(%rbp)
movzbl 0x10(%rbp), %eax
cmpl $0x1, %eax
je 0xab50d
movzbl 0x10(%rbp), %eax
cmpl $0x2, %eax
jne 0xab545
movl $0x0, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x20(%rbp), %rcx
callq 0x1695b0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0xab534
jmp 0xab5a7
movq 0x20(%rbp), %rax
movq (%rax), %rax
subq $0x2, %rax
movq %rax, -0x40(%rbp)
jmp 0xab582
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
xorl %esi, %esi
leaq -0x38(%rbp), %r8
callq 0x1667a0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0xab567
jmp 0xab5a7
movq -0x38(%rbp), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq 0x18(%rbp), %r8
movzbl 0x10(%rbp), %r9d
callq 0xab5b0
movl $0x1, -0x48(%rbp)
movl -0x48(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: get_apic_type_info
static const struct apic_type_info *get_apic_type_info(u8 t)
{
	size_t k;

	for(k=0; k<DE_ARRAYCOUNT(apic_type_info_arr); k++) {
		if(apic_type_info_arr[k].picture_type == t) {
			return &apic_type_info_arr[k];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x14, -0x18(%rbp)
jae 0xab768
leaq 0x16d3f0(%rip), %rax    # 0x218b20
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movzbl (%rax), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0xab758
leaq 0x16d3d6(%rip), %rax    # 0x218b20
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xab770
jmp 0xab75a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xab722
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: extract_pic_apic
static void extract_pic_apic(deark *c, id3v2ctx *d, dbuf *f,
	 i64 pos, i64 len, const struct apic_type_info *ptinfo)
{
	char fullext[32];
	const char *token = NULL;
	struct fmtutil_fmtid_ctx *idctx = NULL;

	idctx = de_malloc(c, sizeof(struct fmtutil_fmtid_ctx));
	idctx->inf = f;
	idctx->inf_pos = pos;
	idctx->inf_len = len;
	idctx->mode = FMTUTIL_FMTIDMODE_ALL_IMG; // expecting PNG or JPEG
	fmtutil_fmtid(c, idctx);

	if(ptinfo && ptinfo->token) token = ptinfo->token;
	if(!token) {
		if(d->wmpicture_mode) token = "wmpic";
	}
	if(!token) token = "id3pic";

	de_snprintf(fullext, sizeof(fullext), "%s.%s", token, idctx->ext_sz);

	dbuf_create_file_from_slice(f, pos, len, fullext, NULL, DE_CREATEFLAG_IS_AUX);

	de_free(c, idctx);
}

// 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 %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movl $0x78, %esi
callq 0x15b780
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x60(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x176960
cmpq $0x0, -0x30(%rbp)
je 0xab818
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xab818
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xab836
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0xab834
leaq 0x108084(%rip), %rax    # 0x1b38b4
movq %rax, -0x58(%rbp)
jmp 0xab836
cmpq $0x0, -0x58(%rbp)
jne 0xab848
leaq 0x108076(%rip), %rax    # 0x1b38ba
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %r8
addq $0x6c, %r8
movl $0x20, %esi
leaq 0x11ab2e(%rip), %rdx    # 0x1c6392
movb $0x0, %al
callq 0x15a980
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
movq -0x8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x15b820
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ico.c
// Function: de_module_ico
void de_module_ico(deark *c, struct deark_module_info *mi)
{
	mi->id = "ico";
	mi->desc = "Windows icon/cursor";
	mi->run_fn = de_run_ico;
	mi->identify_fn = de_identify_ico;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x100f17(%rip), %rcx    # 0x1accfe
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x107fcd(%rip), %rcx    # 0x1b3dc2
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xabe20
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x15d(%rip), %rcx       # 0xabf70
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ico.c
// Function: de_run_ico
static void de_run_ico(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 x;
	i64 num_images;
	i64 i;

	d = de_malloc(c, sizeof(lctx));
	d->extract_unused_masks = (c->extract_level>=2);

	x = de_getu16le(2);
	if(x==1) {
		d->is_cur=0;
		de_declare_fmt(c, "Windows Icon");
	}
	else if(x==2) {
		d->is_cur=1;
		de_declare_fmt(c, "Windows Cursor");
	}
	else {
		de_dbg(c, "Not an ICO/CUR file");
		goto done;
	}

	num_images = de_getu16le(4);
	de_dbg(c, "images in file: %d", (int)num_images);
	if(!de_good_image_count(c, num_images)) {
		goto done;
	}

	for(i=0; i<num_images; i++) {
		do_image_dir_entry(c, d, i, 6+16*i);
	}

done:
	de_free(c, d);
}

// 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
movl $0x8, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
setge %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x2, %esi
callq 0x165280
movq %rax, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jne 0xabe9d
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x107f48(%rip), %rsi    # 0x1b3dde
callq 0x15e380
jmp 0xabed9
cmpq $0x2, -0x20(%rbp)
jne 0xabec0
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x107f32(%rip), %rsi    # 0x1b3deb
callq 0x15e380
jmp 0xabed7
movq -0x8(%rbp), %rdi
leaq 0x107f2f(%rip), %rsi    # 0x1b3dfa
movb $0x0, %al
callq 0x15b0d0
jmp 0xabf5a
jmp 0xabed9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x165280
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x107f0e(%rip), %rsi    # 0x1b3e0e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x16a9a0
cmpl $0x0, %eax
jne 0xabf1b
jmp 0xabf5a
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0xabf58
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq $0x6, %rcx
callq 0xac2e0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xabf23
jmp 0xabf5a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ico.c
// Function: de_module_win1ico
void de_module_win1ico(deark *c, struct deark_module_info *mi)
{
	mi->id = "win1ico";
	mi->desc = "Windows 1.0 icon/cursor";
	mi->run_fn = de_run_win1ico;
	mi->identify_fn = de_identify_win1ico;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x107e0f(%rip), %rcx    # 0x1b3dd6
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x107f6d(%rip), %rcx    # 0x1b3f42
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0xac000
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x17d(%rip), %rcx       # 0xac170
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)