LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/misc3.c
// Function: tc_decompressor_fn
static void tc_decompressor_fn(struct de_arch_member_data *md)
{
	deark *c = md->c;

	if(md->cmpr_meth==0) {
		fmtutil_decompress_uncompressed(c, md->dcmpri, md->dcmpro, md->dres, 0);
	}
	else if(md->cmpr_meth==1) {
		tc_decompress_rle(md);
	}
	else {
		de_dfilter_set_generic_error(c, md->dres, NULL);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x90(%rdi), %eax
cmpl $0x1, %eax
je 0x6e060
movq (%rbx), %rdi
testl %eax, %eax
jne 0x6e15e
movq 0xb0(%rbx), %rsi
movq 0xb8(%rbx), %rdx
movq 0xc0(%rbx), %rcx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeea8f
movq 0xb0(%rbx), %rax
movq 0x8(%rax), %r13
movq %rsp, %r15
movq %r13, (%r15)
addq 0x10(%rax), %r13
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f2a
movl %eax, %ebp
xorl %r14d, %r14d
cmpq %r13, (%rsp)
jge 0x6e190
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f2a
cmpb %bpl, %al
jne 0x6e0f1
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f2a
pushq $0x1
popq %r12
movl %ebp, %ecx
testb %al, %al
je 0x6e141
movzbl %al, %r12d
cmpl $0x2, %r12d
je 0x6e10b
cmpl $0x1, %r12d
jne 0x6e129
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %r12d
orq $0x100, %r12            # imm = 0x100
jmp 0x6e12d
movq 0xb8(%rbx), %rcx
movq (%rcx), %rdi
movzbl %al, %esi
callq 0xe5bc5
incq %r14
jmp 0x6e085
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, %r12
addq $0x200, %r12            # imm = 0x200
jmp 0x6e12d
cmpb $0x4, %al
jb 0x6e17a
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xe3f2a
movl %eax, %ecx
movq 0xb8(%rbx), %rax
movq (%rax), %rdi
movzbl %cl, %esi
movq %r12, %rdx
callq 0xe5e40
addq %r12, %r14
jmp 0x6e085
movq 0xc0(%rbx), %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xee91c
movq (%rbx), %rdi
movq 0xc0(%rbx), %rsi
leaq 0xab3ea(%rip), %rdx     # 0x119575
callq 0xee91c
movq 0xc0(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x6e1bf
movq (%rsp), %rdx
movq (%rbx), %rdi
movq 0xb0(%rbx), %rax
subq 0x8(%rax), %rdx
leaq 0xa62aa(%rip), %rsi     # 0x11445f
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: de_module_iccprofile
void de_module_iccprofile(deark *c, struct deark_module_info *mi)
{
	mi->id = "iccprofile";
	mi->desc = "ICC profile";
	mi->run_fn = de_run_iccprofile;
	mi->identify_fn = de_identify_iccprofile;
}

// Assembly:
leaq 0xab3b9(%rip), %rax     # 0x119590
movq %rax, (%rsi)
leaq 0xb2141(%rip), %rax     # 0x120322
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x6e1fc
movq %rax, 0x18(%rsi)
leaq 0x697(%rip), %rax       # 0x6e88e
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: format_4cc_dbgstr
static const char *format_4cc_dbgstr(const struct de_fourcc *tmp4cc,
	char *buf, size_t buflen, UI flags)
{
	char str[40];

	if((tmp4cc->id==0) && (flags&0x2))
		de_strlcpy(str, "(none)", sizeof(str));
	else
		de_snprintf(str, sizeof(str), "'%s'", tmp4cc->id_dbgstr);

	if(flags&0x1)
		de_snprintf(buf, buflen, "0x%08x=%s", (UI)tmp4cc->id, str);
	else
		de_strlcpy(buf, str, buflen);

	return buf;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testb $0x2, %bpl
je 0x6e8e2
cmpl $0x0, 0x4(%r14)
jne 0x6e8e2
leaq 0xc5c50(%rip), %rsi     # 0x134525
movq %rsp, %rdi
pushq $0x28
popq %rdx
callq 0xde492
jmp 0x6e8fa
leaq 0x10(%r14), %rcx
leaq 0xbe9b6(%rip), %rdx     # 0x12d2a3
movq %rsp, %rdi
pushq $0x28
popq %rsi
xorl %eax, %eax
callq 0xde40c
testb $0x1, %bpl
jne 0x6e910
movq %rsp, %rsi
pushq $0x50
popq %rdx
movq %rbx, %rdi
callq 0xde492
jmp 0x6e92b
movl 0x4(%r14), %ecx
leaq 0xaadf0(%rip), %rdx     # 0x11970b
pushq $0x50
popq %rsi
movq %rsp, %r8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde40c
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: typedec_XYZ
static void typedec_XYZ(deark *c, struct typedec_params *p)
{
	i64 xyz_count;
	i64 k;

	if(p->len<8) return;
	xyz_count = (p->len-8)/12;
	for(k=0; k<xyz_count; k++) {
		struct XYZ_type xyz;

		read_XYZ(c, p->pos1+8+12*k, &xyz);
		de_dbg(c, "XYZ[%d]: %.5f, %.5f, %.5f", (int)k,
			xyz.v[0], xyz.v[1], xyz.v[2]);
	}
}

// Assembly:
movq 0x18(%rsi), %rax
cmpq $0x8, %rax
jl 0x6ec9b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $-0x8, %rax
xorl %r15d, %r15d
pushq $0xc
popq %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %r12
pushq $0x8
popq %r13
leaq 0xab0b6(%rip), %rbp     # 0x119d02
cmpq %r15, %r12
je 0x6ec8d
movq 0x10(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdi
movq %rsp, %rdx
callq 0x6e937
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movq %r14, %rdi
movq %rbp, %rsi
movl %r15d, %edx
movb $0x3, %al
callq 0xde896
incq %r15
addq $0xc, %r13
jmp 0x6ec4c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: typedec_dict
static void typedec_dict(deark *c, struct typedec_params *p)
{
	i64 pos = p->pos1 + 8;
	i64 nrec;
	i64 reclen;
	i64 i;

	if(p->len<16) goto done;

	nrec = de_getu32be_p(&pos);
	de_dbg(c, "num records: %u", (UI)nrec);
	reclen = de_getu32be_p(&pos);
	de_dbg(c, "rec len: %u", (UI)reclen);
	if(reclen!=16 && reclen!=24 && reclen!=32) goto done;
	if(pos+nrec*reclen > p->pos1 + p->len) goto done;
	if(nrec>MAX_TAGS_PER_TAGSET) goto done;

	for(i=0; i<nrec; i++) {
		do_dict_string(c, p, pos, "name");
		pos += 8;
		do_dict_string(c, p, pos, "value");
		pos += 8;
		if(reclen>=24) {
			do_dict_string(c, p, pos, "display name");
			pos += 8;
		}
		if(reclen>=32) {
			do_dict_string(c, p, pos, "display value");
			pos += 8;
		}
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rsi), %rax
addq $0x8, %rax
movq %rax, (%rsp)
cmpq $0x10, 0x18(%rsi)
jge 0x6ee4b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xe4071
movq %rax, %r12
leaq 0xaaef2(%rip), %rsi     # 0x119d5c
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %r15
leaq 0xb214f(%rip), %rsi     # 0x120fdc
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x20, %r15
ja 0x6ee3c
movabsq $0x101010000, %rax      # imm = 0x101010000
btq %r15, %rax
jae 0x6ee3c
cmpq $0x1f4, %r12            # imm = 0x1F4
jg 0x6ee3c
movq (%rsp), %rdx
movq %r15, %rax
imulq %r12, %rax
addq %rdx, %rax
movq 0x18(%rbx), %rcx
addq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jg 0x6ee3c
xorl %ebp, %ebp
testq %r12, %r12
cmovgq %r12, %rbp
leaq 0xac72a(%rip), %r12     # 0x11b612
leaq 0xb794a(%rip), %r13     # 0x126839
subq $0x1, %rbp
jb 0x6ee3c
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x6f583
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rcx
callq 0x6f583
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
cmpq $0x18, %r15
jb 0x6eeef
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xaae2c(%rip), %rcx     # 0x119d6c
callq 0x6f583
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
cmpq $0x20, %r15
jb 0x6eeef
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xaae15(%rip), %rcx     # 0x119d79
callq 0x6f583
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
jmp 0x6eeef
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: typedec_sf32
static void typedec_sf32(deark *c, struct typedec_params *p)
{
	i64 count;
	i64 i;
	i64 pos = p->pos1 + 8;
	double val;

	if(p->len<8) return;
	count = (p->len-8)/4;
	for(i=0; i<count && i<64; i++) {
		val = read_s15Fixed16Number(c->infile, pos);
		pos += 4;
		de_dbg(c, "arr[%d] = %.5f", (int)i, val);
	}
}

// Assembly:
movq 0x18(%rsi), %rax
cmpq $0x8, %rax
jl 0x6f200
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsi), %r14
addq $0x8, %r14
addq $-0x8, %rax
shrq $0x2, %rax
cmpq $0x40, %rax
pushq $0x40
popq %r13
cmovbq %rax, %r13
xorl %r15d, %r15d
leaq 0xaac4c(%rip), %r12     # 0x119e19
cmpq %r15, %r13
je 0x6f1f7
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x6e97f
addq $0x4, %r14
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
movb $0x1, %al
callq 0xde896
incq %r15
jmp 0x6f1cd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: typedec_text
static void typedec_text(deark *c, struct typedec_params *p)
{
	de_ucstring *s = NULL;
	i64 textlen = p->len-8;
	de_ext_encoding enc;

	if(textlen<0) goto done;

	if(p->type_id==0x75746638U) {
		enc = DE_ENCODING_UTF8;
	}
	else {
		enc = DE_ENCODING_ASCII;
	}

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, p->pos1+8, textlen, DE_DBG_MAX_STRLEN,
		s, 0, enc);
	ucstring_truncate_at_NUL(s);
	de_dbg(c, "text: \"%s\"", ucstring_getpsz(s));

done:
	ucstring_destroy(s);
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0x18(%rsi), %r15
cmpq $0x8, %r15
jge 0x6f507
xorl %r14d, %r14d
jmp 0x6f56f
movq %rsi, %r12
movq %rdi, %rbx
addq $-0x8, %r15
xorl %ebp, %ebp
cmpl $0x75746638, 0x20(%rsi) # imm = 0x75746638
sete %bpl
incl %ebp
callq 0xeac74
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq 0x10(%r12), %rsi
addq $0x8, %rsi
movl %ebp, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r14, %rdi
callq 0xeacc0
movq %r14, %rdi
callq 0xeb7e4
leaq 0xbe852(%rip), %rsi     # 0x12ddb4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iccprofile.c
// Function: do_dict_string
static void do_dict_string(deark *c, struct typedec_params *p, i64 itempos, const char *itemname)
{
	de_ucstring *s = NULL;
	i64 dpos_rel, dpos_abs, dlen;

	dpos_rel = de_getu32be(itempos);
	dpos_abs = p->pos1 + dpos_rel;
	dlen = de_getu32be(itempos+4);
	if(dpos_abs + dlen > p->pos1 + p->len) goto done;
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(c->infile, dpos_abs, dlen, DE_DBG_MAX_STRLEN, s, 0, DE_ENCODING_UTF16BE);
	de_dbg(c, "%s: dpos=%"I64_FMT", dlen=%"I64_FMT", string=\"%s\"", itemname, dpos_abs, dlen,
		ucstring_getpsz_d(s));

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xe404f
movq %rax, %r15
addq 0x10(%r13), %r15
movq 0x18(%r14), %rdi
addq $0x4, %r12
movq %r12, %rsi
callq 0xe404f
movq %rax, %r12
addq %r15, %rax
movq 0x18(%r13), %rcx
addq 0x10(%r13), %rcx
cmpq %rcx, %rax
jle 0x6f5d7
xorl %r13d, %r13d
jmp 0x6f628
movq %r14, %rdi
callq 0xeac74
movq %rax, %r13
movq 0x18(%r14), %rdi
movl $0x4, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, %rdi
callq 0xeb877
leaq 0xaa775(%rip), %rsi     # 0x119d87
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/icns.c
// Function: de_module_icns
void de_module_icns(deark *c, struct deark_module_info *mi)
{
	mi->id = "icns";
	mi->desc = "Macintosh icon";
	mi->run_fn = de_run_icns;
	mi->identify_fn = de_identify_icns;
	mi->help_fn = de_help_icns;
}

// Assembly:
leaq 0xaad51(%rip), %rax     # 0x11a398
movq %rax, (%rsi)
leaq 0xaad4c(%rip), %rax     # 0x11a39d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x6f677
movq %rax, 0x18(%rsi)
leaq 0x26b(%rip), %rax       # 0x6f8d2
movq %rax, 0x20(%rsi)
leaq 0x2ad(%rip), %rax       # 0x6f91f
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/icns.c
// Function: do_read_mask
static void do_read_mask(deark *c, lctx *d, struct page_ctx *pg, int masktype_id,
	int depth, i64 w, i64 h)
{
	de_bitmap *img;
	i64 rowspan;
	i64 mask_offset;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	if(depth==1) {
		rowspan = (w+7)/8;
		mask_offset = rowspan*h;
	}
	else {
		rowspan = w;
		mask_offset = 0;
	}

	de_dbg(c, "mask(%d"DE_CHAR_TIMES"%d,%d) segment at %"I64_FMT", mask at %"I64_FMT"+%"I64_FMT,
		(int)w, (int)h, depth, pg->segment_pos, pg->image_pos, mask_offset);
	de_dbg_indent(c, 1);

	if(d->mask[masktype_id].img) {
		de_dbg(c, "duplicate mask type %u", (UI)masktype_id);
		de_bitmap_destroy(d->mask[masktype_id].img);
	}
	d->mask[masktype_id].img = de_bitmap_create(c, w, h, 1);
	d->mask[masktype_id].segment_pos = pg->segment_pos;
	img = d->mask[masktype_id].img;

	if(depth==1) {
		de_convert_image_bilevel(c->infile, pg->image_pos+mask_offset, rowspan, img, 0);
	}
	else {
		convert_image_gray8(c->infile, pg->image_pos+mask_offset, rowspan, img);
	}

	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movl %r8d, %ebx
movl %ecx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, 0x18(%rsp)
movq %rdi, %rbp
movq 0x60(%rsp), %r13
leaq 0xc(%rsp), %rsi
callq 0xdebae
leaq 0x7(%r12), %r14
shrq $0x3, %r14
movq %r14, %rcx
imulq %r13, %rcx
cmpl $0x1, %ebx
movq %r12, %rax
cmoveq %r14, %rax
movq %rax, 0x20(%rsp)
movl $0x0, %r10d
movq %rcx, 0x10(%rsp)
cmoveq %rcx, %r10
movq 0x8(%r15), %r9
leaq 0xa9f68(%rip), %rsi     # 0x11a4c2
movq %rbp, %rdi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
pushq %r10
pushq 0x10(%r15)
callq 0xde896
popq %rax
popq %rcx
pushq $0x1
popq %rsi
movq %rbp, %rdi
callq 0xdeba7
movl 0x8(%rsp), %edx
movl %edx, %eax
shlq $0x5, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax), %r13
addq $0x10, %r13
cmpq $0x0, 0x18(%r13)
je 0x705b8
leaq 0xa9f4d(%rip), %rsi     # 0x11a4f2
movq %rbp, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
callq 0xe7084
pushq $0x1
popq %rcx
movq %rbp, %rdi
movq %r12, %rsi
movq 0x60(%rsp), %rdx
callq 0xe7437
movq %rax, %r12
movq %rax, 0x18(%r13)
movq 0x8(%r15), %rax
movq %rax, (%r13)
movq 0x18(%rbp), %r13
movq 0x10(%r15), %r15
cmpl $0x1, %ebx
movq %rbp, %rbx
jne 0x70621
addq 0x10(%rsp), %r15
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0xe77b7
movq %rbx, %rbp
movl 0xc(%rsp), %esi
movq %rbp, %rdi
callq 0xdebb7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
cmpq 0x10(%r12), %r14
jge 0x70606
xorl %ebp, %ebp
cmpq 0x8(%r12), %rbp
jge 0x70656
leaq (%r15,%rbp), %rsi
movq %r13, %rdi
callq 0xe3eb4
movzbl %al, %ecx
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xe71da
incq %rbp
jmp 0x7062d
incq %r14
addq 0x20(%rsp), %r15
movq %rbx, %rbp
jmp 0x70624
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rsi), %rax
leaq 0x4(%rax), %r12
testq %rcx, %rcx
cmoveq %rax, %r12
addq 0x18(%r14), %rax
cmpq %rax, %r12
jge 0x706ec
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xe3eb4
leaq 0x1(%r12), %rbp
movq 0x18(%r15), %rdi
movzbl %al, %r13d
testb %al, %al
js 0x706c8
leaq 0x1(%r13), %rdx
movq %rbp, %rsi
movq %rbx, %rcx
callq 0xe45f4
leaq 0x1(,%r13), %r12
addq %rbp, %r12
jmp 0x706e6
addq $-0x7d, %r13
movq %rbp, %rsi
callq 0xe3eb4
addq $0x2, %r12
movzbl %al, %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0xe5e40
movq 0x10(%r14), %rax
jmp 0x70686
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rdi, %r15
movq 0x8(%rdx), %rax
movq 0x10(%rdx), %rbp
xorl %r12d, %r12d
testq %rax, %rax
movl $0x0, %ebx
cmovgq %rax, %rbx
testq %rbp, %rbp
movl $0x0, %ecx
cmovgq %rbp, %rcx
movq %rcx, 0x8(%rsp)
movq %rax, (%rsp)
imulq %rax, %rbp
imulq %rsi, %rbp
cmpq 0x8(%rsp), %r12
je 0x7078a
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x70781
movq %rbp, %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0xe3eb4
movzbl %al, %r8d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
callq 0xe712a
incq %r13
jmp 0x70752
incq %r12
addq (%rsp), %rbp
jmp 0x70748
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0x95013(%rip), %rax     # 0x1057b6
movq %rax, (%rsi)
leaq 0xa9f47(%rip), %rax     # 0x11a6f4
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x707cc
movq %rax, 0x18(%rsi)
leaq 0xe09(%rip), %rax       # 0x715cc
movq %rax, 0x20(%rsi)
orb $0x11, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movb $0x1, 0x14(%rax)
movq 0x18(%rdi), %rdi
leaq 0x94195(%rip), %rdx     # 0x10577e
pushq $0x3
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x7165e
movq 0x28(%rbx), %rax
movb $0x1, 0x15(%rax)
movq 0x18(%rbx), %rdi
pushq $0x3
popq %rsi
callq 0xe3eb4
movl %eax, %ebp
movq 0x18(%rbx), %rdi
pushq $0x5
popq %rsi
callq 0xe3eb4
movl %eax, %r14d
movq 0x18(%rbx), %rdi
pushq $0x6
popq %rsi
callq 0x7166b
movq %rax, %r15
testb $0x10, %r14b
pushq $0xa
popq %rax
pushq $0x14
popq %rcx
cmovel %eax, %ecx
cmpb $0x4, %bpl
cmovbl %eax, %ecx
addl %ecx, %r15d
leaq 0xa9d64(%rip), %rsi     # 0x11b3ad
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde9f1
movq 0x28(%rbx), %rax
movl %r15d, 0x18(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xa91e1(%rip), %rsi     # 0x11a8ae
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
callq 0xdeba7
leaq (%r14,%r13), %rbx
movq %r14, 0x8(%rsp)
leaq (%r14,%r13), %r15
decq %r15
cmpq %rbx, %r13
jge 0x71745
leaq 0x1(%r13), %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0xe3eb4
movl %eax, %r14d
cmpb $-0x1, %al
sete %al
cmpq %r15, %rbp
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x71733
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe3eb4
testb %al, %al
jne 0x71733
addq $0x2, %r13
movq %r13, %rbp
movzbl %r14b, %esi
movq (%rsp), %rdi
callq 0xe5bc5
movq %rbp, %r13
jmp 0x716f4
movq (%rsp), %rax
movl 0x18(%rax), %ecx
leaq 0xa9182(%rip), %rsi     # 0x11a8d5
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0xde896
pushq $-0x1
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdeba7
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_txxx_etc
static void decode_id3v2_frame_txxx_etc(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len, struct de_fourcc *tag4cc)
{
	i64 pos = pos1;
	u8 id3_encoding;
	de_ucstring *description = NULL;
	de_ucstring *value = NULL;
	i64 bytes_consumed;
	const char *name;
	int ret;

	id3_encoding = dbuf_getbyte(f, pos++);
	de_dbg(c, "text encoding: %d (%s)", (int)id3_encoding,
		get_id3v2_textenc_name(d, id3_encoding));

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

	value = ucstring_create(c);
	id3v2_read_to_ucstring(c, f, pos, pos1+len-pos, value, id3_encoding);
	if(tag4cc->id==CODE_WXX || tag4cc->id==CODE_WXXX) name="url";
	else name="value";
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz(value));

done:
	ucstring_destroy(description);
	ucstring_destroy(value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x28(%rsp)
movq %r8, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x1(%rcx), %r14
movq %rdx, %rdi
movq %rcx, 0x10(%rsp)
movq %rcx, %rsi
callq 0xe3eb4
movzbl %al, %r15d
movq %rbp, %rdi
movl %r15d, %esi
callq 0x72350
leaq 0xa9256(%rip), %rsi     # 0x11acc9
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r9
leaq 0x30(%rsp), %rax
andq $0x0, (%rax)
leaq -0x1(%r12), %rcx
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, 0x20(%rsp)
movq %r13, %rsi
movq %r14, 0x18(%rsp)
movq %r14, %rdx
movl %r15d, %r8d
movq %r9, %r13
callq 0x723ac
testl %eax, %eax
je 0x71b61
addq 0x10(%rsp), %r12
movq %r13, %rdi
callq 0xeb7e4
leaq 0xa9258(%rip), %rsi     # 0x11ad34
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rsp), %r14
addq 0x30(%rsp), %r14
movq %rbx, %rdi
callq 0xeac74
movq %rax, %rbp
subq %r14, %r12
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rax, %r8
movl %r15d, %r9d
callq 0x72463
movq 0x28(%rsp), %rax
movl 0x4(%rax), %eax
cmpl $0x57585858, %eax       # imm = 0x57585858
leaq 0xa91b2(%rip), %rcx     # 0x11ace0
leaq 0xb4d04(%rip), %r14     # 0x126839
cmoveq %rcx, %r14
cmpl $0x575858, %eax         # imm = 0x575858
cmoveq %rcx, %r14
movq %rbp, %rdi
callq 0xeb7e4
leaq 0xad369(%rip), %rsi     # 0x11eeba
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
callq 0xeaf3c
movq %rbp, %rdi
callq 0xeaf3c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %r8, %r8
jle 0x71c15
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x1(%rcx), %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xe3eb4
movzbl %al, %ebp
movq %r13, %rdi
movl %ebp, %esi
callq 0x72350
leaq 0xa9106(%rip), %rsi     # 0x11acc9
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r13
decq %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
movl %ebp, %r9d
callq 0x72463
movq %r13, %rdi
callq 0xeb7e4
leaq 0xbc1ae(%rip), %rsi     # 0x12ddb4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x71c18
xorl %r13d, %r13d
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0xeac74
movq %rax, %r13
pushq $0x5
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq %r13, %rdi
callq 0xeb7e4
leaq 0x93bf5(%rip), %rsi     # 0x105867
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_comm
static void decode_id3v2_frame_comm(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	u8 id3_encoding;
	i64 pos = pos1;
	de_ucstring *lang = NULL;
	de_ucstring *shortdesc = NULL;
	de_ucstring *comment_text = NULL;
	i64 bytes_consumed;
	int ret;

	id3_encoding = dbuf_getbyte(f, pos++);
	de_dbg(c, "text encoding: %d (%s)", (int)id3_encoding,
		get_id3v2_textenc_name(d, id3_encoding));

	lang = ucstring_create(c);
	dbuf_read_to_ucstring(f, pos, 3, lang, 0, DE_ENCODING_ASCII);
	de_dbg(c, "language: \"%s\"", ucstring_getpsz(lang));
	pos += 3;

	shortdesc = ucstring_create(c);
	bytes_consumed = 0;
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, id3_encoding,
		shortdesc, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "short description: \"%s\"", ucstring_getpsz(shortdesc));
	pos += bytes_consumed;

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

done:
	ucstring_destroy(lang);
	ucstring_destroy(shortdesc);
	ucstring_destroy(comment_text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1(%rcx), %r15
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xe3eb4
movzbl %al, %r14d
movq %r12, %rdi
movl %r14d, %esi
callq 0x72350
leaq 0xa8ff5(%rip), %rsi     # 0x11acc9
movq %rbx, %rdi
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r12
pushq $0x3
popq %rdx
pushq $0x1
popq %r9
movq %rbp, %rdi
movq %r15, %rsi
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq %r12, 0x28(%rsp)
movq %r12, %rdi
callq 0xeb7e4
leaq 0xa9004(%rip), %rsi     # 0x11ad1f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, 0x10(%rsp)
leaq 0x4(%r13), %r15
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r9
leaq 0x30(%rsp), %rax
andq $0x0, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, %r12
addq $-0x4, %rcx
movq %rax, (%rsp)
movq %rbx, %rdi
movq %rbp, 0x18(%rsp)
movq %rbp, %rsi
movq %r15, %rdx
movl %r14d, %r8d
movq %r9, %r13
callq 0x723ac
testl %eax, %eax
je 0x71de0
movq %r12, %rbp
addq 0x10(%rsp), %rbp
movq %r13, %rdi
callq 0xeb7e4
leaq 0xa8fa5(%rip), %rsi     # 0x11ad2e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq 0x30(%rsp), %r15
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r12
subq %r15, %rbp
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %rax, %r8
movl %r14d, %r9d
callq 0x72463
movq %r12, %rdi
callq 0xeb7e4
leaq 0x95a24(%rip), %rsi     # 0x1077f5
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x71de3
xorl %r12d, %r12d
movq 0x28(%rsp), %rdi
callq 0xeaf3c
movq %r13, %rdi
callq 0xeaf3c
movq %r12, %rdi
callq 0xeaf3c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rbp
andq $0x0, (%rbp)
callq 0xeac74
movq %rax, %rbx
movq %rbp, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x723ac
testl %eax, %eax
je 0x72339
movq %rbx, %rdi
callq 0xeb7e4
leaq 0xa8bea(%rip), %rsi     # 0x11aed9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rsp), %rsi
cmpq %r13, %rsi
jge 0x72339
addq %r12, %rsi
movq %r15, %rdi
callq 0xe3eb4
movzbl %al, %edx
testb %dl, %dl
leaq 0xa8bd8(%rip), %rax     # 0x11aef5
leaq 0xa8bdc(%rip), %rcx     # 0x11af00
cmoveq %rax, %rcx
leaq 0xa8bb9(%rip), %rsi     # 0x11aee8
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeaf3c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpl $0x3, %esi
ja 0x723a4
movl %esi, %eax
leaq 0xa8376(%rip), %rcx     # 0x11a6d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa8976(%rip), %rax     # 0x11ace4
retq
leaq 0xa8998(%rip), %rax     # 0x11ad0e
retq
leaq 0xa4d7b(%rip), %rax     # 0x1170f9
retq
movb 0x30(%rdi), %al
cmpb $0x3, %al
leaq 0xa896a(%rip), %rcx     # 0x11acf5
leaq 0xa896f(%rip), %rdx     # 0x11ad01
cmoveq %rcx, %rdx
cmpb $0x2, %al
leaq 0xa8950(%rip), %rax     # 0x11acef
cmovneq %rdx, %rax
retq
leaq 0xacb36(%rip), %rax     # 0x11eee1
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %r15d
movq %rcx, %rax
movq %rdx, %r14
movq %rsi, %r12
andq $0x0, (%rsp)
movq %rdi, %r13
movq 0x40(%rsp), %r8
movl $0x100, %ecx            # imm = 0x100
cmpq %rcx, %rax
cmovlq %rax, %rcx
xorl %ebp, %ebp
testq %rcx, %rcx
cmovleq %rbp, %rcx
leal -0x1(%r15), %eax
cmpb $0x1, %al
ja 0x72413
movq %r12, %rdi
movq %r14, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0xe642e
testl %eax, %eax
je 0x72452
movq 0x40(%rsp), %rax
movq (%rax), %rcx
addq $-0x2, %rcx
jmp 0x7243a
movq %rsp, %r8
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xe4b21
testl %eax, %eax
je 0x72452
movq (%rsp), %rcx
subq %r14, %rcx
leaq 0x1(%rcx), %rax
movq 0x40(%rsp), %rdx
movq %rax, (%rdx)
movzbl %r15b, %r9d
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x72463
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/id3.c
// Function: id3v2_read_to_ucstring
static void id3v2_read_to_ucstring(deark *c, dbuf *f, i64 pos1, i64 len,
	de_ucstring *s, u8 id3_encoding)
{
	i64 pos = pos1;
	const char *bomdesc = "none";
	de_encoding encoding_to_use = DE_ENCODING_UNKNOWN;

	if(len<=0) goto done;

	if(id3_encoding==ID3ENC_ISO_8859_1) {
		encoding_to_use = DE_ENCODING_LATIN1;
	}
	else if(id3_encoding==ID3ENC_UTF16) {
		u32 bom_id;

		if(len<2) goto done;
		bom_id = (u32)dbuf_getu16be(f, pos);

		if(bom_id==0xfeff) {
			encoding_to_use = DE_ENCODING_UTF16BE;
			bomdesc = "BE";
		}
		else if(bom_id==0xfffe) {
			encoding_to_use = DE_ENCODING_UTF16LE;
			bomdesc = "LE";
		}
		else {
			// TODO: What should we do if there's no BOM?
			// v2.2.x does not say anything about a BOM, but it also does not
			// say anything about what byte order is used.
			// v2.3.x and 2.4.x require a BOM.
			goto done;
		}
		pos += 2;
	}
	else if(id3_encoding==ID3ENC_UTF16BE) {
		encoding_to_use = DE_ENCODING_UTF16BE;
	}
	else if(id3_encoding==ID3ENC_UTF8) { // UTF-8
		encoding_to_use = DE_ENCODING_UTF8;
	}
	else {
		goto done; // Error
	}

	// TODO: Maybe shouldn't use DE_DBG_MAX_STRLEN here.
	dbuf_read_to_ucstring_n(f, pos, pos1+len-pos, DE_DBG_MAX_STRLEN, s, 0, encoding_to_use);
	ucstring_truncate_at_NUL(s);

done:
	if(id3_encoding==ID3ENC_UTF16 && c->debug_level>=2) {
		de_dbg2(c, "BOM: %s", bomdesc);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %rdi, %rbx
testq %rcx, %rcx
jle 0x724b6
cmpb $0x3, %bpl
ja 0x72529
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
leaq 0x91278(%rip), %rdx     # 0x103711
movzbl %bpl, %eax
leaq 0xa8240(%rip), %rcx     # 0x11a6e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, 0x10(%rsp)
pushq $0x5
jmp 0x724cf
leaq 0x91254(%rip), %rdx     # 0x103711
jmp 0x724ff
movq %rdx, 0x10(%rsp)
pushq $0x4
jmp 0x724cf
movq %rdx, 0x10(%rsp)
pushq $0x2
popq %rax
movq %r14, %rsi
addq %r14, %r12
subq %rsi, %r12
movl %eax, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r15, %rdi
callq 0xeacc0
movq 0x10(%rsp), %rdx
cmpb $0x1, %bpl
jne 0x72529
cmpl $0x2, (%rbx)
jl 0x72529
leaq 0xa8806(%rip), %rsi     # 0x11ad17
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xde9f1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x911d2(%rip), %rdx     # 0x103711
cmpq $0x1, %r12
je 0x72505
movq %r13, %rdi
movq %r14, %rsi
callq 0xe3f46
cmpl $0xfeff, %eax           # imm = 0xFEFF
je 0x72571
cmpl $0xfffe, %eax           # imm = 0xFFFE
leaq 0x911ae(%rip), %rdx     # 0x103711
jne 0x72505
pushq $0x3
popq %rax
leaq 0x9d516(%rip), %rcx     # 0x10fa85
jmp 0x7257b
pushq $0x4
popq %rax
leaq 0xa506a(%rip), %rcx     # 0x1175e5
movq %rcx, 0x10(%rsp)
leaq 0x2(%r14), %rsi
jmp 0x724d3
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
pushq $0x78
popq %rsi
callq 0xdecaf
movq %rax, %r12
movq %r13, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
movb $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xee4da
testq %rbp, %rbp
je 0x72608
movq 0x10(%rbp), %rax
testq %rax, %rax
jne 0x7261e
xorl %eax, %eax
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x1(%rcx)
leaq 0xa88b2(%rip), %rcx     # 0x11aecc
cmovneq %rcx, %rax
testq %rax, %rax
leaq 0xa88aa(%rip), %rcx     # 0x11aed2
cmovneq %rax, %rcx
movq %r12, %r8
addq $0x6c, %r8
leaq 0xbb1f0(%rip), %rdx     # 0x12d82a
leaq 0x10(%rsp), %rbp
pushq $0x20
popq %rsi
movq %rbp, %rdi
xorl %eax, %eax
callq 0xde40c
pushq $0x1
popq %r9
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0xe4e0b
movq %rbx, %rdi
movq %r12, %rsi
callq 0xded32
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xa19e2(%rip), %rax     # 0x114069
movq %rax, (%rsi)
leaq 0xa8d49(%rip), %rax     # 0x11b3da
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x726ac
movq %rax, 0x18(%rsi)
leaq 0x742(%rip), %rax       # 0x72de9
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0xa8528(%rip), %rax     # 0x11b3ee
movq %rax, (%rsi)
leaq 0xa868a(%rip), %rax     # 0x11b55a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x72eeb
movq %rax, 0x18(%rsi)
leaq 0xff(%rip), %rax        # 0x72fe5
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ico.c
// Function: de_run_win1ico
static void de_run_win1ico(deark *c, de_module_params *mparams)
{
	win1ctx *d = NULL;
	i64 pos = 0;

	d = de_malloc(c, sizeof(win1ctx));
	d->type_code = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "type code: 0x%04x", d->type_code);
	if(d->type_code==0x0003 || d->type_code==0x0103 || d->type_code==0x0203) {
		d->is_cur = 1;
		d->type_name = "cursor";
	}
	else if(d->type_code==0x0001 || d->type_code==0x0101 || d->type_code==0x0201) {
		d->type_name = "icon";
	}
	else {
		de_err(c, "Not a Windows 1.0 icon/cursor");
		goto done;
	}
	de_declare_fmtf(c, "Windows 1.0 %s", d->type_name);

	if(!decode_win1_icon(c, d, pos)) goto done;
	pos += d->bytes_consumed;
	if((d->type_code & 0xff00)==0x0200) {
		// In this case there are supposed to be two icons (this is untested).
		if(!decode_win1_icon(c, d, pos)) goto done;
	}

done:
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
pushq $0x18
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movl %eax, (%r14)
leaq 0xa8621(%rip), %rsi     # 0x11b542
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl (%r14), %eax
leaq 0xa4ea3(%rip), %rdx     # 0x117dda
cmpl $0x1, %eax
je 0x72f6c
cmpl $0x3, %eax
je 0x72f5d
cmpl $0x101, %eax            # imm = 0x101
je 0x72f6c
cmpl $0x203, %eax            # imm = 0x203
je 0x72f5d
cmpl $0x201, %eax            # imm = 0x201
je 0x72f6c
cmpl $0x103, %eax            # imm = 0x103
jne 0x72fbf
movl $0x1, 0x4(%r14)
leaq 0xba34d(%rip), %rdx     # 0x12d2b9
movq %rdx, 0x8(%r14)
leaq 0xa85fb(%rip), %rsi     # 0x11b572
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe0824
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x730e0
testl %eax, %eax
je 0x72fd0
movq 0x8(%rsp), %rdx
addq 0x10(%r14), %rdx
movq %rdx, 0x8(%rsp)
movzbl 0x1(%r14), %eax
shll $0x8, %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0x72fd0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x730e0
jmp 0x72fd0
leaq 0xa858e(%rip), %rsi     # 0x11b554
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ico.c
// Function: de_identify_win1ico
static int de_identify_win1ico(deark *c)
{
	u8 tclo, tchi;
	i64 w, h, wb;
	int has_ext;

	tclo = de_getbyte(0);
	tchi = de_getbyte(1);
	if((tclo==1 || tclo==3) && (tchi<=2)) {
		;
	}
	else {
		return 0;
	}

	w = de_getu16le(6);
	h = de_getu16le(8);
	wb = de_getu16le(10);
	if(w<16 || h<16 || w>256 || h>256) return 0;
	if(wb != ((w+15)/16)*2) return 0;
	has_ext = de_input_file_has_ext(c, (tclo==3)?"cur":"ico");
	if((w==32 || w==64) && h==w && has_ext) return 100;
	return has_ext ? 70 : 6;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xe3eb4
movl %eax, %r15d
movq 0x18(%r14), %rdi
pushq $0x1
popq %rsi
callq 0xe3eb4
leal -0x1(%r15), %ecx
testb $-0x3, %cl
jne 0x730c6
cmpb $0x2, %al
ja 0x730c6
movq 0x18(%r14), %rdi
pushq $0x6
popq %rsi
callq 0xe3fa3
movq %rax, %r12
movq 0x18(%r14), %rdi
pushq $0x8
popq %rsi
callq 0xe3fa3
movq %rax, %r13
movq 0x18(%r14), %rdi
pushq $0xa
popq %rsi
callq 0xe3fa3
movq $-0x101, %rcx           # imm = 0xFEFF
leaq (%r12,%rcx), %rdx
movq $-0xf1, %rsi
cmpq %rsi, %rdx
setb %dl
addq %r13, %rcx
cmpq %rsi, %rcx
setb %cl
orb %dl, %cl
jne 0x730c6
leal 0xf(%r12), %ecx
shrl $0x3, %ecx
andl $0x7e, %ecx
cmpq %rcx, %rax
jne 0x730c6
cmpb $0x3, %r15b
leaq 0x9d217(%rip), %rax     # 0x1102a3
leaq 0xa0fd6(%rip), %rsi     # 0x114069
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0xdfcd5
cmpq $0x40, %r12
je 0x730ab
cmpq $0x20, %r12
jne 0x730b9
cmpq %r12, %r13
jne 0x730b9
testl %eax, %eax
je 0x730b9
pushq $0x64
popq %rbx
jmp 0x730c6
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
shll $0x6, %ebx
orl $0x6, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_module_iff
void de_module_iff(deark *c, struct deark_module_info *mi)
{
	mi->id = "iff";
	mi->desc = "IFF (Interchange File Format)";
	mi->run_fn = de_run_iff;
	mi->identify_fn = de_identify_iff;
	mi->help_fn = de_help_iff;
}

// Assembly:
leaq 0xb9c79(%rip), %rax     # 0x12d104
movq %rax, (%rsi)
leaq 0xa8127(%rip), %rax     # 0x11b5bc
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x734bb
movq %rax, 0x18(%rsi)
leaq 0x112(%rip), %rax       # 0x735bd
movq %rax, 0x20(%rsi)
leaq 0x11f(%rip), %rax       # 0x735d5
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_run_iff
static void de_run_iff(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;
	const char *s;
	i64 pos;
	int confidence = 0;

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

	ictx = fmtutil_create_iff_decoder(c);
	ictx->has_standard_iff_chunks = 1;
	ictx->alignment = 2; // default

	d->fmt = identify_internal(c, &confidence);

	if(d->fmt==FMT_FOR4) {
		ictx->alignment = 4;
	}

	d->decode_hint = (u8)de_get_ext_option_bool(c, "iff:decode", 0);
	s = de_get_ext_option(c, "iff:align");
	if(s) {
		ictx->alignment = de_atoi(s);
	}

	if(d->fmt==FMT_DJVU) {
		de_declare_fmt(c, "DjVu");
		pos = 4;
	}
	else {
		pos = 0;
	}

	ictx->userdata = (void*)d;
	ictx->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_ASCII);
	ictx->handle_chunk_fn = my_iff_chunk_handler;
	ictx->on_std_container_start_fn = my_std_container_start_fn;
	ictx->f = c->infile;

	fmtutil_read_iff_format(ictx, pos, c->infile->len - pos);

	fmtutil_destroy_iff_decoder(ictx);
	de_free(c, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %rsi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
callq 0xfacc0
movq %rax, %r15
movb $0x1, 0x5d(%rax)
movq $0x2, 0x48(%rax)
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x737b1
movl %eax, (%r14)
cmpl $0x4, %eax
jne 0x73505
movq $0x4, 0x48(%r15)
leaq 0xbc180(%rip), %rsi     # 0x12f68c
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdfae5
movb %al, 0x4(%r14)
leaq 0xa80dc(%rip), %rsi     # 0x11b5fd
movq %rbx, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x7353c
movq %rax, %rdi
callq 0xdfb36
cltq
movq %rax, 0x48(%r15)
cmpl $0xa, (%r14)
jne 0x73557
leaq 0xa80be(%rip), %rsi     # 0x11b607
movq %rbx, %rdi
callq 0xe07f7
pushq $0x4
popq %r12
jmp 0x7355a
xorl %r12d, %r12d
movq %r14, 0x10(%r15)
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, 0x60(%r15)
leaq 0x2ec(%rip), %rax       # 0x73862
movq %rax, 0x20(%r15)
leaq 0x7d3(%rip), %rax       # 0x73d54
movq %rax, 0x30(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
subq %r12, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xface4
movq %r15, %rdi
callq 0xfacd3
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xded32
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: de_module_midi
void de_module_midi(deark *c, struct deark_module_info *mi)
{
	mi->id = "midi";
	mi->desc = "MIDI audio";
	mi->run_fn = de_run_midi;
	mi->identify_fn = de_identify_midi;
}

// Assembly:
leaq 0xa7fda(%rip), %rax     # 0x11b5da
movq %rax, (%rsi)
leaq 0xa7fd5(%rip), %rax     # 0x11b5df
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x73625
movq %rax, 0x18(%rsi)
leaq 0x68(%rip), %rax        # 0x73688
movq %rax, 0x20(%rsi)
retq