LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/misc3.c
// Function: binary_ii_is_member_at
static int binary_ii_is_member_at(dbuf *f, i64 pos, u8 check_nr, int nr_expected)
{
	if(dbuf_memcmp(f, pos, (const void*)"\x0a\x47\x4c", 3)) return 0;
	if(dbuf_getbyte(f, pos+18) != 0x02) return 0;
	if(check_nr) {
		int nr;

		nr = (int)dbuf_getbyte(f, pos+127);
		if(nr != nr_expected) return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
leaq 0xb4831(%rip), %rdx     # 0x126661
movl $0x3, %ecx
callq 0xefc85
xorl %ebp, %ebp
testl %eax, %eax
jne 0x71e70
leaq 0x12(%r14), %rsi
movq %r15, %rdi
callq 0xeead3
cmpb $0x2, %al
jne 0x71e70
testb %r12b, %r12b
je 0x71e6b
addq $0x7f, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xeead3
movzbl %al, %eax
cmpl %ebx, %eax
jne 0x71e70
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x71eca
movq (%rbx), %rdi
testl %eax, %eax
jne 0x71fd4
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 0xfa510
movq 0xb0(%rbx), %rax
movq 0x8(%rax), %r13
movq %rsp, %r14
movq %r13, (%r14)
addq 0x10(%rax), %r13
movq (%rax), %rdi
movq %r14, %rsi
callq 0xeeb4b
cmpq %r13, (%r14)
jge 0x71ff0
movl %eax, %ebp
xorl %r14d, %r14d
movq %rsp, %r15
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xeeb4b
cmpb %bpl, %al
jne 0x71f57
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xeeb4b
testb %al, %al
je 0x71f8c
movzbl %al, %r12d
cmpl $0x2, %r12d
je 0x71f6e
cmpl $0x1, %r12d
jne 0x71f96
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %r12d
orq $0x100, %r12            # imm = 0x100
jmp 0x71f9e
movq 0xb8(%rbx), %rcx
movq (%rcx), %rdi
movzbl %al, %esi
callq 0xf0bd6
incq %r14
jmp 0x71fc8
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r12
addq $0x200, %r12            # imm = 0x200
jmp 0x71f9e
movl $0x1, %r12d
movl %ebp, %eax
jmp 0x71fb0
cmpb $0x4, %al
jb 0x72031
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0xeeb4b
movq 0xb8(%rbx), %rcx
movq (%rcx), %rdi
movzbl %al, %esi
movq %r12, %rdx
callq 0xf0eba
addq %r12, %r14
cmpq %r13, (%rsp)
jl 0x71efb
jmp 0x71ff3
movq 0xc0(%rbx), %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfa311
xorl %r14d, %r14d
movq 0xc0(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x72022
movq (%rsp), %rdx
movq (%rbx), %rdi
movq 0xb0(%rbx), %rax
subq 0x8(%rax), %rdx
leaq 0xaf537(%rip), %rsi     # 0x12154f
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
movq 0xc0(%rbx), %rsi
leaq 0xb4733(%rip), %rdx     # 0x126775
callq 0xfa311
jmp 0x71ff3
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xb473d(%rip), %rax     # 0x126790
movq %rax, (%rsi)
leaq 0xbb535(%rip), %rax     # 0x12d592
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x72078
movq %rax, 0x18(%rsi)
leaq 0x77d(%rip), %rax       # 0x727f0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7284c
cmpl $0x0, 0x4(%r14)
jne 0x7284c
leaq 0xcf138(%rip), %rsi     # 0x141975
movq %rsp, %rdi
movl $0x28, %edx
callq 0xe8219
jmp 0x72866
leaq 0x10(%r14), %rcx
leaq 0xc7d40(%rip), %rdx     # 0x13a597
movq %rsp, %rdi
movl $0x28, %esi
xorl %eax, %eax
callq 0xe8193
testb $0x1, %bpl
jne 0x7287e
movq %rsp, %rsi
movl $0x50, %edx
movq %rbx, %rdi
callq 0xe8219
jmp 0x7289b
movl 0x4(%r14), %ecx
leaq 0xb4082(%rip), %rdx     # 0x12690b
movq %rsp, %r8
movl $0x50, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8193
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/iccprofile.c
// Function: typedec_hexdump
static void typedec_hexdump(deark *c, struct typedec_params *p)
{
	UI rsvd;

	if(p->len<8) return;
	rsvd = (UI)de_getu32be(p->pos1+4);
	de_dbg(c, "reserved/etc.: 0x%08x", rsvd);
	de_dbg_hexdump(c, c->infile, p->pos1+8, p->len-8, 256, NULL, 0x1);
}

// Assembly:
cmpq $0x8, 0x18(%rsi)
jl 0x72bf2
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x10(%rsi), %rsi
addq $0x4, %rsi
callq 0xeed0d
leaq 0xb44fd(%rip), %rsi     # 0x1270b0
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rsi
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
addq $0x8, %rdx
addq $-0x8, %rcx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0xe8bea
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x72c94
addq $-0x8, %rax
cmpq $0xc, %rax
jb 0x72c94
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %r15
shrq $0x3, %r15
movl $0x8, %r13d
xorl %r12d, %r12d
leaq 0xb42bb(%rip), %rbp     # 0x126f02
movq 0x10(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdi
movq %rsp, %rdx
callq 0x728a7
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movq %r14, %rdi
movq %rbp, %rsi
movl %r12d, %edx
movb $0x3, %al
callq 0xe8617
incq %r12
addq $0xc, %r13
cmpq %r12, %r15
jne 0x72c47
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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)
jl 0x72f6e
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xeed31
movq %rax, %r15
leaq 0xb40fe(%rip), %rsi     # 0x126f5c
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %r12
leaq 0xbb3cb(%rip), %rsi     # 0x12e24c
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
cmpq $0x20, %r12
ja 0x72f6e
movabsq $0x101010000, %rax      # imm = 0x101010000
btq %r12, %rax
jae 0x72f6e
leaq -0x1(%r15), %rax
cmpq $0x1f3, %rax            # imm = 0x1F3
ja 0x72f6e
movq (%rsp), %rdx
movq %r12, %rax
imulq %r15, %rax
addq %rdx, %rax
movq 0x18(%rbx), %rcx
addq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jg 0x72f6e
leaq 0xb5970(%rip), %r13     # 0x128852
leaq 0xc0c28(%rip), %rbp     # 0x133b11
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rcx
callq 0x73657
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x73657
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
cmpq $0x18, %r12
jb 0x72f65
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xb403c(%rip), %rcx     # 0x126f6c
callq 0x73657
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
cmpq $0x20, %r12
jb 0x72f65
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xb4025(%rip), %rcx     # 0x126f79
callq 0x73657
movq (%rsp), %rdx
addq $0x8, %rdx
movq %rdx, (%rsp)
decq %r15
jne 0x72ee9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7324f
addq $-0x8, %rax
cmpq $0x4, %rax
jb 0x7324f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
shrq $0x2, %rax
cmpq $0x40, %rax
movl $0x40, %r12d
cmovbq %rax, %r12
movq 0x10(%rsi), %r14
addq $0x8, %r14
xorl %r15d, %r15d
movq 0x18(%rbx), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xeec17
movq %rax, %rbp
leaq 0x2(%r14), %rsi
movq %r13, %rdi
callq 0xeeb67
xorps %xmm1, %xmm1
cvtsi2sd %rbp, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xb356b(%rip), %xmm0    # 0x126788
addsd %xmm1, %xmm0
movq %rbx, %rdi
leaq 0xb3dee(%rip), %rsi     # 0x127019
movl %r15d, %edx
movb $0x1, %al
callq 0xe8617
incq %r15
addq $0x4, %r14
cmpq %r15, %r12
jne 0x731e7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x735db
xorl %r14d, %r14d
jmp 0x73643
movq %rsi, %r12
movq %rdi, %rbx
addq $-0x8, %r15
xorl %ebp, %ebp
cmpl $0x75746638, 0x20(%rsi) # imm = 0x75746638
sete %bpl
incl %ebp
callq 0xf6410
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 0xefc2a
movq %r14, %rdi
callq 0xf6461
movq %r14, %rdi
callq 0xf705c
leaq 0xc7a6e(%rip), %rsi     # 0x13b0a4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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 0xeed0d
movq %rax, %r15
addq 0x10(%r13), %r15
movq 0x18(%r14), %rdi
addq $0x4, %r12
movq %r12, %rsi
callq 0xeed0d
movq %rax, %r12
addq %r15, %rax
movq 0x18(%r13), %rcx
addq 0x10(%r13), %rcx
cmpq %rcx, %rax
jle 0x736ab
xorl %r13d, %r13d
jmp 0x736fc
movq %r14, %rdi
callq 0xf6410
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 0xefc2a
movq %r13, %rdi
callq 0xf70f6
leaq 0xb38a1(%rip), %rsi     # 0x126f87
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6753
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xb3e7d(%rip), %rax     # 0x127598
movq %rax, (%rsi)
leaq 0xb3e78(%rip), %rax     # 0x12759d
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x7374b
movq %rax, 0x18(%rsi)
leaq 0x26b(%rip), %rax       # 0x739a6
movq %rax, 0x20(%rsi)
leaq 0x2b5(%rip), %rax       # 0x739fb
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movl %r8d, %r13d
movl %ecx, 0x14(%rsp)
movq %rdx, %r12
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0x60(%rsp), %rbx
leaq 0x1c(%rsp), %rsi
callq 0xe8a1c
leaq 0x7(%r14), %r15
shrq $0x3, %r15
movq %r15, %rax
imulq %rbx, %rax
movq %rbx, %rcx
cmpl $0x1, %r13d
movq %r14, %rbx
cmoveq %r15, %rbx
movl $0x0, %r10d
movq %rax, 0x20(%rsp)
cmoveq %rax, %r10
movq 0x8(%r12), %r9
leaq 0xb2ff6(%rip), %rsi     # 0x1276c2
movq %rbp, %rdi
movl %r14d, %edx
movl %r13d, 0x18(%rsp)
movl %r13d, %r8d
xorl %eax, %eax
pushq %r10
pushq 0x10(%r12)
callq 0xe8617
addq $0x10, %rsp
movq %rbp, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0x14(%rsp), %edx
movl %edx, %eax
shlq $0x5, %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax), %r13
addq $0x10, %r13
cmpq $0x0, 0x18(%r13)
je 0x74731
leaq 0xb2fd4(%rip), %rsi     # 0x1276f2
movq %rbp, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r13), %rdi
callq 0xf228d
movq %rbp, %rdi
movq %r14, %rsi
movq 0x60(%rsp), %rdx
movl $0x1, %ecx
callq 0xf266a
movq %rax, %r14
movq %rax, 0x18(%r13)
movq 0x8(%r12), %rax
movq %rax, (%r13)
movq %rbp, 0x8(%rsp)
movq 0x18(%rbp), %r13
movq 0x10(%r12), %r12
cmpl $0x1, 0x18(%rsp)
jne 0x7478b
addq 0x20(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xf2a40
movq 0x8(%rsp), %rdi
jmp 0x747e4
movq 0x10(%r14), %rcx
testq %rcx, %rcx
movq 0x8(%rsp), %rdi
jle 0x747e4
movq 0x8(%r14), %rax
xorl %r15d, %r15d
testq %rax, %rax
jle 0x747d9
xorl %ebp, %ebp
leaq (%r12,%rbp), %rsi
movq %r13, %rdi
callq 0xeead3
movzbl %al, %ecx
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xf2405
incq %rbp
movq 0x8(%r14), %rax
cmpq %rax, %rbp
jl 0x747a7
movq 0x10(%r14), %rcx
movq 0x8(%rsp), %rdi
incq %r15
addq %rbx, %r12
cmpq %rcx, %r15
jl 0x747a0
movl 0x1c(%rsp), %esi
callq 0xe8a25
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x10(%rsi), %rax
leaq 0x4(%rax), %r12
testq %rcx, %rcx
cmoveq %rax, %r12
addq 0x18(%rsi), %rax
cmpq %rax, %r12
jge 0x7488c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xeead3
leaq 0x1(%r12), %rbp
movq 0x18(%r15), %rdi
movzbl %al, %r13d
testb %al, %al
js 0x74861
leaq 0x1(%r13), %rdx
movq %rbp, %rsi
movq %rbx, %rcx
callq 0xef481
leaq 0x1(,%r13), %r12
addq %rbp, %r12
jmp 0x7487f
addq $-0x7d, %r13
movq %rbp, %rsi
callq 0xeead3
addq $0x2, %r12
movzbl %al, %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf0eba
movq 0x18(%r14), %rax
addq 0x10(%r14), %rax
cmpq %rax, %r12
jl 0x74828
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
movq 0x10(%rdx), %rax
movq %rax, (%rsp)
testq %rax, %rax
jle 0x7491f
movq %rdi, %rbp
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rbx
movq (%rsp), %r12
imulq %rbx, %r12
imulq %rsi, %r12
xorl %r14d, %r14d
movq 0x8(%rsp), %r15
testq %rbx, %rbx
jle 0x74913
xorl %r13d, %r13d
leaq (%r12,%r13), %rsi
movq %rbp, %rdi
callq 0xeead3
movzbl %al, %r8d
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq 0x10(%rsp), %rcx
callq 0xf2355
incq %r13
cmpq %r13, %rbx
jne 0x748e8
incq %r14
addq %rbx, %r12
cmpq (%rsp), %r14
jne 0x748e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x9de9f(%rip), %rax     # 0x1127d6
movq %rax, (%rsi)
leaq 0xb2ff3(%rip), %rax     # 0x127934
movq %rax, 0x8(%rsi)
leaq 0x14(%rip), %rax        # 0x74960
movq %rax, 0x18(%rsi)
leaq 0xe74(%rip), %rax       # 0x757cb
movq %rax, 0x20(%rsi)
orb $0x11, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9cfb6(%rip), %rdx     # 0x11279e
movl $0x3, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
jne 0x7589c
movq 0x28(%rbx), %rax
movb $0x1, 0x15(%rax)
movq 0x18(%rbx), %rdi
movl $0x3, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movl $0x5, %esi
callq 0xeead3
movl %eax, %r14d
movq 0x18(%rbx), %rdi
leaq 0x4(%rsp), %r15
movl $0x6, %edx
movl $0x4, %ecx
movq %r15, %rsi
callq 0xee8d4
movzbl (%r15), %eax
shll $0x15, %eax
movzbl 0x1(%r15), %ecx
shll $0xe, %ecx
orl %eax, %ecx
movzbl 0x2(%r15), %eax
shll $0x7, %eax
movzbl 0x3(%r15), %edx
orl %eax, %edx
orl %ecx, %edx
testb $0x10, %r14b
movl $0xa, %eax
movl $0x14, %r14d
cmovel %eax, %r14d
cmpb $0x4, %bpl
cmovbl %eax, %r14d
addl %edx, %r14d
leaq 0xb2d66(%rip), %rsi     # 0x1285ed
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe87e4
movq 0x28(%rbx), %rax
movl %r14d, 0x18(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xb221f(%rip), %rsi     # 0x127aee
xorl %eax, %eax
callq 0xe8617
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r14, (%rsp)
testq %r14, %r14
jle 0x7594d
movq (%rsp), %rax
leaq (%rax,%r13), %rbx
leaq -0x1(%rbx), %r15
leaq 0x1(%r13), %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0xeead3
movl %eax, %r14d
cmpb $-0x1, %al
sete %al
cmpq %r15, %rbp
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x75937
movq %r12, %rdi
movq %rbp, %rsi
callq 0xeead3
testb %al, %al
jne 0x75937
addq $0x2, %r13
movq %r13, %rbp
movzbl %r14b, %esi
movq 0x8(%rsp), %rdi
callq 0xf0bd6
movq %rbp, %r13
cmpq %rbx, %rbp
jl 0x758fd
movq 0x8(%rsp), %rax
movl 0x18(%rax), %ecx
leaq 0xb21b9(%rip), %rsi     # 0x127b15
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8a15
// File: /workspace/github_c_makefile_star2_O3/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 0x75c7e
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x1(%rcx), %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xeead3
movzbl %al, %r13d
cmpb $0x3, %r13b
ja 0x75cbd
leaq 0xb1c78(%rip), %rax     # 0x1278e4
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xb22a8(%rip), %rcx     # 0x127f24
jmp 0x75cc4
xorl %ebp, %ebp
jmp 0x75d19
leaq 0xb22c2(%rip), %rcx     # 0x127f4e
jmp 0x75cc4
leaq 0xae664(%rip), %rcx     # 0x1242f9
jmp 0x75cc4
movb 0x30(%rbp), %al
cmpb $0x3, %al
leaq 0xb2292(%rip), %rcx     # 0x127f35
leaq 0xb2297(%rip), %rdx     # 0x127f41
cmoveq %rcx, %rdx
cmpb $0x2, %al
leaq 0xb2278(%rip), %rcx     # 0x127f2f
cmovneq %rdx, %rcx
jmp 0x75cc4
leaq 0xb648d(%rip), %rcx     # 0x12c151
leaq 0xb223e(%rip), %rsi     # 0x127f09
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rbp
decq %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
movl %r13d, %r9d
callq 0x76713
movq %rbp, %rdi
callq 0xf705c
leaq 0xc5398(%rip), %rsi     # 0x13b0a4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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 0xf6410
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x5, %r9d
callq 0xefbd7
movq %r13, %rdi
callq 0xf705c
leaq 0x9cb12(%rip), %rsi     # 0x112887
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, (%rbp)
callq 0xf6410
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 0x7665b
testl %eax, %eax
je 0x76527
movq %rbx, %rdi
callq 0xf705c
leaq 0xb1c3c(%rip), %rsi     # 0x128119
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rsp), %rsi
cmpq %r13, %rsi
jge 0x76527
addq %r12, %rsi
movq %r15, %rdi
callq 0xeead3
movzbl %al, %edx
testb %dl, %dl
leaq 0xb1c2a(%rip), %rax     # 0x128135
leaq 0xb1c2e(%rip), %rcx     # 0x128140
cmoveq %rax, %rcx
leaq 0xb1c0b(%rip), %rsi     # 0x128128
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6753
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
movl $0x100, %ecx            # imm = 0x100
cmpq %rcx, %r15
cmovlq %r15, %rcx
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl $0x1, %r8d
movl $0x5, %r9d
callq 0xef87c
movq %rax, %r14
cmpl $0x0, 0x34(%rax)
je 0x76642
movq 0x18(%r14), %rdi
callq 0xf705c
leaq 0xb1bad(%rip), %rsi     # 0x128145
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq (%r14), %r13
subq %r13, %r15
testq %r15, %r15
jle 0x76642
addq %rbp, %r13
leaq 0xb1b93(%rip), %rsi     # 0x128151
movq %rbx, %rdi
movq %r13, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x8(%r14), %rdi
leaq 0xb5465(%rip), %rsi     # 0x12ba3e
callq 0x181a0
testl %eax, %eax
je 0x76624
cmpl $0x2, (%rbx)
jl 0x76642
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe8bea
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x76642
leaq 0xc14b3(%rip), %rcx     # 0x137ade
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xefaca
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %r13
movq 0x40(%rsp), %r8
xorl %ebp, %ebp
movq %rbp, (%rsp)
movl $0x100, %ecx            # imm = 0x100
cmpq %rcx, %rax
cmovlq %rax, %rcx
testq %rcx, %rcx
cmovleq %rbp, %rcx
leal -0x1(%r15), %eax
cmpb $0x1, %al
ja 0x766c1
movq %r12, %rdi
movq %r14, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0xf1607
testl %eax, %eax
je 0x76702
movq 0x40(%rsp), %rax
movq (%rax), %rcx
addq $-0x2, %rcx
jmp 0x766e8
movq %rsp, %r8
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xefa77
testl %eax, %eax
je 0x76702
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 0x76713
movl $0x1, %ebp
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_O3/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 0x76769
cmpb $0x3, %bpl
ja 0x767e1
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
leaq 0x99fc8(%rip), %rdx     # 0x110711
movzbl %bpl, %eax
leaq 0xb11d0(%rip), %rcx     # 0x127924
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, 0x10(%rsp)
movl $0x5, %eax
jmp 0x76788
leaq 0x99fa1(%rip), %rdx     # 0x110711
jmp 0x767b7
movq %rdx, 0x10(%rsp)
movl $0x4, %eax
jmp 0x76788
movq %rdx, 0x10(%rsp)
movl $0x2, %eax
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 0xefc2a
movq %r15, %rdi
callq 0xf6461
movq 0x10(%rsp), %rdx
cmpb $0x1, %bpl
jne 0x767e1
cmpl $0x2, (%rbx)
jl 0x767e1
leaq 0xb178e(%rip), %rsi     # 0x127f57
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe87e4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x99f1a(%rip), %rdx     # 0x110711
cmpq $0x1, %r12
je 0x767bd
movq %r13, %rdi
movq %r14, %rsi
callq 0xeeb67
cmpl $0xfeff, %eax           # imm = 0xFEFF
je 0x7682b
cmpl $0xfffe, %eax           # imm = 0xFFFE
leaq 0x99ef6(%rip), %rdx     # 0x110711
jne 0x767bd
movl $0x3, %eax
leaq 0xa634c(%rip), %rcx     # 0x11cb75
jmp 0x76837
movl $0x4, %eax
leaq 0xadfae(%rip), %rcx     # 0x1247e5
movq %rcx, 0x10(%rsp)
leaq 0x2(%r14), %rsi
jmp 0x7678b
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x78, %esi
callq 0xe8b2b
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 0xf9e98
testq %rbp, %rbp
je 0x7689c
movq 0x10(%rbp), %rax
testq %rax, %rax
jne 0x768b2
xorl %eax, %eax
movq 0x8(%rsp), %rcx
cmpb $0x0, 0x1(%rcx)
leaq 0xb185e(%rip), %rcx     # 0x12810c
cmovneq %rcx, %rax
testq %rax, %rax
leaq 0xb1856(%rip), %rcx     # 0x128112
cmovneq %rax, %rcx
movq %r12, %r8
addq $0x6c, %r8
leaq 0xc424c(%rip), %rdx     # 0x13ab1a
leaq 0x10(%rsp), %rbp
movl $0x20, %esi
movq %rbp, %rdi
xorl %eax, %eax
callq 0xe8193
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8be2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xaa83a(%rip), %rax     # 0x121159
movq %rax, (%rsi)
leaq 0xb1cf1(%rip), %rax     # 0x12861a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x76944
movq %rax, 0x18(%rsi)
leaq 0x836(%rip), %rax       # 0x77175
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb13d7(%rip), %rax     # 0x12862e
movq %rax, (%rsi)
leaq 0xb1539(%rip), %rax     # 0x12879a
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x7727c
movq %rax, 0x18(%rsi)
leaq 0x10d(%rip), %rax       # 0x77384
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, (%r15)
movl $0x18, %esi
callq 0xe8b2b
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeebeb
movl %eax, (%r14)
leaq 0xb14cb(%rip), %rsi     # 0x128782
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl (%r14), %eax
leaq 0xadd0d(%rip), %rdx     # 0x124fda
cmpl $0x102, %eax            # imm = 0x102
jg 0x772e7
cmpl $0x1, %eax
je 0x7730b
cmpl $0x3, %eax
je 0x772fc
cmpl $0x101, %eax            # imm = 0x101
je 0x7730b
jmp 0x7735e
cmpl $0x203, %eax            # imm = 0x203
je 0x772fc
cmpl $0x201, %eax            # imm = 0x201
je 0x7730b
cmpl $0x103, %eax            # imm = 0x103
jne 0x7735e
movl $0x1, 0x4(%r14)
leaq 0xc32a2(%rip), %rdx     # 0x13a5ad
movq %rdx, 0x8(%r14)
leaq 0xb149c(%rip), %rsi     # 0x1287b2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xeb152
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x77479
testl %eax, %eax
je 0x7736f
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 0x7736f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x77479
jmp 0x7736f
leaq 0xb142f(%rip), %rsi     # 0x128794
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeead3
movl %eax, %r15d
movq 0x18(%r14), %rdi
movl $0x1, %esi
callq 0xeead3
leal -0x1(%r15), %ecx
testb $-0x3, %cl
jne 0x7746d
cmpb $0x2, %al
ja 0x7746d
movq 0x18(%r14), %rdi
movl $0x6, %esi
callq 0xeebc8
movq %rax, %r12
movq 0x18(%r14), %rdi
movl $0x8, %esi
callq 0xeebc8
movq %rax, %r13
movq 0x18(%r14), %rdi
movl $0xa, %esi
callq 0xeebc8
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 0x7746d
leal 0xf(%r12), %ecx
shrl $0x3, %ecx
andl $0x7e, %ecx
cmpq %rcx, %rax
jne 0x7746d
cmpb $0x3, %r15b
leaq 0xa5f60(%rip), %rax     # 0x11d393
leaq 0xa9d1f(%rip), %rsi     # 0x121159
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0xea491
cmpq $0x40, %r12
je 0x77452
cmpq $0x20, %r12
jne 0x77460
cmpq %r12, %r13
jne 0x77460
movl $0x64, %ebx
testl %eax, %eax
jne 0x7746d
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_O3/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 0xc2bb1(%rip), %rax     # 0x13a3f8
movq %rax, (%rsi)
leaq 0xb0fab(%rip), %rax     # 0x1287fc
movq %rax, 0x8(%rsi)
leaq 0x1b(%rip), %rax        # 0x77877
movq %rax, 0x18(%rsi)
leaq 0x118(%rip), %rax       # 0x7797f
movq %rax, 0x20(%rsi)
leaq 0x128(%rip), %rax       # 0x7799a
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x8, %esi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1075c0
movq %rax, %r15
movb $0x1, 0x5d(%rax)
movq $0x2, 0x48(%rax)
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x77b80
movl %eax, (%r14)
cmpl $0x4, %eax
jne 0x778c3
movq $0x4, 0x48(%r15)
leaq 0xc50f2(%rip), %rsi     # 0x13c9bc
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe9bd0
movb %al, 0x4(%r14)
leaq 0xb0f5e(%rip), %rsi     # 0x12883d
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x778fa
movq %rax, %rdi
callq 0xe9c2a
cltq
movq %rax, 0x48(%r15)
cmpl $0xa, (%r14)
jne 0x77917
leaq 0xb0f40(%rip), %rsi     # 0x128847
movq %rbx, %rdi
callq 0xeb125
movl $0x4, %r12d
jmp 0x7791a
xorl %r12d, %r12d
movq %r14, 0x10(%r15)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xeb220
movl %eax, 0x60(%r15)
leaq 0x30f(%rip), %rax       # 0x77c47
movq %rax, 0x20(%r15)
leaq 0x801(%rip), %rax       # 0x78144
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 0x1075e4
movq %r15, %rdi
callq 0x1075d3
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe8be2
// File: /workspace/github_c_makefile_star2_O3/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 0xb0e55(%rip), %rax     # 0x12881a
movq %rax, (%rsi)
leaq 0xb0e50(%rip), %rax     # 0x12881f
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x779ea
movq %rax, 0x18(%rsi)
leaq 0x6a(%rip), %rax        # 0x77a4f
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/iff.c
// Function: de_run_midi
static void de_run_midi(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_iffctx *ictx = NULL;

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

	ictx = fmtutil_create_iff_decoder(c);
	ictx->alignment = 1;
	ictx->userdata = (void*)d;
	ictx->handle_chunk_fn = my_midi_chunk_handler;
	ictx->f = c->infile;

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x8, %esi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1075c0
movq %rax, %r15
movq $0x1, 0x48(%rax)
movq %r14, 0x10(%rax)
leaq 0x844(%rip), %rax       # 0x78261
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movq 0x18(%rax), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1075e4
movq %r15, %rdi
callq 0x1075d3
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xe8be2