LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/arc.c
// Function: decompressor_squeezed
static void decompressor_squeezed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_type1 = fmtutil_huff_squeeze_codectype1;
	tlp.codec2 = dfilter_rle90_codec;
	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;
	de_dfilter_decompress_two_layer(c, &tlp);
}

// Assembly:
subq $0x58, %rsp
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rsi
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x38(%rsi)
andq $0x0, 0x48(%rsi)
movups %xmm0, 0x8(%rsi)
leaq 0xc7c99(%rip), %rax     # 0xef6f7
movq %rax, (%rsi)
leaq 0xc73db(%rip), %rax     # 0xeee43
movq %rax, 0x18(%rsi)
movq %rcx, 0x28(%rsi)
movq %r8, 0x30(%rsi)
movq %r9, 0x38(%rsi)
callq 0xef577
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/arc.c
// Function: decompressor_crunched6
static void decompressor_crunched6(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_ARC5;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_pushable = dfilter_lzw_codec;
	tlp.codec1_private_params = (void*)&delzwp;

	tlp.codec2 = dfilter_rle90_codec;

	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;

	de_dfilter_decompress_two_layer(c, &tlp);
}

// Assembly:
subq $0x78, %rsp
xorps %xmm0, %xmm0
leaq 0xc(%rsp), %rax
movups %xmm0, 0x4(%rax)
movl $0x7, (%rax)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
leaq 0xce985(%rip), %rdx     # 0xf6467
movq %rdx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
leaq 0xc7352(%rip), %rax     # 0xeee43
movq %rax, 0x18(%rsi)
movq %rcx, 0x28(%rsi)
movq %r8, 0x30(%rsi)
movq %r9, 0x38(%rsi)
callq 0xef577
addq $0x78, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/arc.c
// Function: decompressor_squashed
static void decompressor_squashed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri, struct de_dfilter_out_params *dcmpro,
	struct de_dfilter_results *dres)
{
	struct de_lzw_params delzwp;

	de_zeromem(&delzwp, sizeof(struct de_lzw_params));
	delzwp.fmt = DE_LZWFMT_UNIXCOMPRESS;
	delzwp.max_code_size = 13;
	fmtutil_decompress_lzw(c, dcmpri, dcmpro, dres, &delzwp);
}

// Assembly:
subq $0x18, %rsp
movq %r8, %rdx
xorps %xmm0, %xmm0
leaq 0x4(%rsp), %r8
movups %xmm0, 0x4(%r8)
movl $0x1, (%r8)
movl $0xd, 0xc(%r8)
movq %rcx, %rsi
movq %r9, %rcx
callq 0xf644c
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/arc.c
// Function: decompressor_trimmed
static void decompressor_trimmed(deark *c, lctx *d, struct member_data *md,
	struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres)
{
	struct de_dcmpr_two_layer_params tlp;
	struct de_lh1_params lh1p;

	de_zeromem(&lh1p, sizeof(struct de_lh1_params));
	lh1p.is_arc_trimmed = 1;
	lh1p.history_fill_val = 0x00;

	de_zeromem(&tlp, sizeof(struct de_dcmpr_two_layer_params));
	tlp.codec1_pushable = dfilter_lh1_codec;
	tlp.codec1_private_params = (void*)&lh1p;

	tlp.codec2 = dfilter_rle90_codec;

	tlp.dcmpri = dcmpri;
	tlp.dcmpro = dcmpro;
	tlp.dres = dres;

	de_dfilter_decompress_two_layer(c, &tlp);
}

// Assembly:
subq $0x68, %rsp
leaq 0x8(%rsp), %rax
andl $0x0, (%rax)
movb $0x1, 0x2(%rax)
movb $0x0, 0x4(%rax)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
leaq 0xd236b(%rip), %rdx     # 0xf9f49
movq %rdx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
leaq 0xc7256(%rip), %rax     # 0xeee43
movq %rax, 0x18(%rsi)
movq %rcx, 0x28(%rsi)
movq %r8, 0x30(%rsi)
movq %r9, 0x38(%rsi)
callq 0xef577
addq $0x68, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: de_module_amiga_adf
void de_module_amiga_adf(deark *c, struct deark_module_info *mi)
{
	mi->id = "amiga_adf";
	mi->desc = "Amiga disk image";
	mi->run_fn = de_run_amiga_adf;
	mi->identify_fn = de_identify_amiga_adf;
}

// Assembly:
leaq 0xdfe81(%rip), %rax     # 0x107cb0
movq %rax, (%rsi)
leaq 0xdfe81(%rip), %rax     # 0x107cba
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x27e54
movq %rax, 0x18(%rsi)
leaq 0x283(%rip), %rax       # 0x280d2
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: de_identify_amiga_adf
static int de_identify_amiga_adf(deark *c)
{
	int has_size;
	int has_ext;

	if(dbuf_memcmp(c->infile, 0, "DOS", 3)) return 0;
	if(de_getbyte(3)>0x05) return 0;
	has_ext = de_input_file_has_ext(c, "adf");
	has_size = (c->infile->len==901120 || c->infile->len==1802240);
	if(has_ext && has_size) return 100;
	if(has_size) return 90;
	if(has_ext) return 60;
	return 20;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
leaq 0x10e4d7(%rip), %rdx    # 0x1365bb
xorl %ebx, %ebx
pushq $0x3
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
jne 0x2815e
movq 0x18(%r14), %rdi
pushq $0x3
popq %rsi
callq 0xe3eb4
cmpb $0x5, %al
ja 0x2815e
leaq 0x115877(%rip), %rsi    # 0x13d982
movq %r14, %rdi
callq 0xdfcd5
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rcx
cmpq $0xdc000, %rcx          # imm = 0xDC000
sete %dl
cmpq $0x1b8000, %rcx         # imm = 0x1B8000
sete %sil
testl %eax, %eax
je 0x2813e
orb %sil, %dl
je 0x2813e
pushq $0x64
popq %rbx
jmp 0x2815e
pushq $0x5a
popq %rbx
cmpq $0xdc000, %rcx          # imm = 0xDC000
je 0x2815e
cmpq $0x1b8000, %rcx         # imm = 0x1B8000
je 0x2815e
testl %eax, %eax
pushq $0x3c
popq %rax
pushq $0x14
popq %rbx
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: test_root_block
static int test_root_block(deark *c, lctx *d, i64 blknum)
{
	i64 pos;

	pos = blocknum_to_offset(d, blknum);
	if(de_getu32be(pos) != ADF_T_HEADER) return 0;
	if(de_getu32be(pos+d->bsize-4) != ADF_ST_ROOT) return 0;
	d->root_block = blknum;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq 0x8(%rsi), %r15
imulq %rdx, %r15
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xe404f
xorl %ebp, %ebp
cmpq $0x2, %rax
jne 0x28f62
movq 0x18(%r12), %rdi
movq 0x8(%r14), %rax
leaq (%r15,%rax), %rsi
addq $-0x4, %rsi
callq 0xe404f
cmpq $0x1, %rax
jne 0x28f62
movq %rbx, 0x10(%r14)
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: claim_block
static int claim_block(deark *c, lctx *d, i64 blknum)
{
	if(blknum<0 || blknum>=d->num_blocks) {
		de_err(c, "Bad block number: %"I64_FMT, blknum);
		return 0;
	}
	if(!d->block_used_flags) {
		d->block_used_flags = de_malloc(c, d->num_blocks);
	}
	if(d->block_used_flags[blknum]) {
		de_err(c, "Attempt to reuse block #%"I64_FMT, blknum);
		return 0;
	}
	d->block_used_flags[blknum] = 1;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
js 0x28faf
movq %rsi, %r15
movq 0x18(%rsi), %rsi
cmpq %rbx, %rsi
jle 0x28faf
movq 0x28(%r15), %rax
testq %rax, %rax
jne 0x28fa0
movq %r14, %rdi
callq 0xdecaf
movq %rax, 0x28(%r15)
cmpb $0x0, (%rax,%rbx)
je 0x28fd2
leaq 0xdee42(%rip), %rsi     # 0x107def
jmp 0x28fb6
leaq 0xdee23(%rip), %rsi     # 0x107dd9
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xdf2a5
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, (%rax,%rbx)
pushq $0x1
popq %rbp
jmp 0x28fc5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_protection_flags
static void read_protection_flags(deark *c, lctx *d, struct member_data *md, i64 pos)
{
	UI n;

	n = (UI)de_getu32be(pos);
	de_dbg(c, "protection flags: 0x%08x", n);
	if(md->fi && !md->is_dir) {
		// Some disks use the 0x2 bit to mean "non executable", but I don't think
		// there's a good way to tell *which* disks.
		if((n & 0x0000ff0f)!=0) { // If these flags seem to be used...
			if(n & 0x00000002) {
				md->fi->mode_flags |= DE_MODEFLAG_NONEXE;
			}
			else {
				md->fi->mode_flags |= DE_MODEFLAG_EXE;
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
callq 0xe404f
movq %rax, %r14
leaq 0xdeea6(%rip), %rsi     # 0x107ea2
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x29030
testw $0xff0f, %r14w          # imm = 0xFF0F
je 0x29030
cmpb $0x0, 0x10(%rbx)
jne 0x29030
andl $0x2, %r14d
xorl %ecx, %ecx
cmpl $0x1, %r14d
adcl $0x1, %ecx
orl %ecx, 0x14(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_ofs_timestamp
static void read_ofs_timestamp(deark *c, i64 pos1, struct de_timestamp *ts,
	const char *name)
{
	i64 pos = pos1;
	i64 days, mins, ticks;
	i64 ut;
	char timestamp_buf[64];

	ts->is_valid = 0;
	days = de_getu32be_p(&pos);
	mins = de_getu32be_p(&pos);
	ticks = de_getu32be_p(&pos);
	ut = (6*365 + 2*366) * 86400; // 1970-01-01 to 1978-01-01
	ut += days * 86400;
	ut += mins * 60;
	ut += ticks / 50;

	if(days!=0) {
		de_unix_time_to_timestamp(ut, ts, 0);
		de_timestamp_set_subsec(ts, (double)(ticks%50) / 50.0);
		de_timestamp_to_string(ts, timestamp_buf, sizeof(timestamp_buf), 0);
	}
	else {
		de_strlcpy(timestamp_buf, "none", sizeof(timestamp_buf));
	}

	de_dbg(c, "%s: [%"I64_FMT",%"I64_FMT",%"I64_FMT"] (%s)",
		name, days, mins, ticks, timestamp_buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, %rbp
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %rsi, (%r13)
movb $0x0, (%rdx)
movq 0x18(%rdi), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %r15
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %r12
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %r13
testq %r15, %r15
je 0x290f5
pushq $0x32
popq %rcx
movq %r13, %rax
cqto
idivq %rcx
movq %r13, 0x10(%rsp)
movq %rbx, %r13
movq %rdx, %rbx
imulq $0x15180, %r15, %rcx    # imm = 0x15180
imulq $0x3c, %r12, %rdx
addq %rcx, %rdx
leaq (%rax,%rdx), %rdi
addq $0xf0c3f00, %rdi        # imm = 0xF0C3F00
movq %rbp, %rsi
xorl %edx, %edx
callq 0xe002e
cvtsi2sd %rbx, %xmm0
movq %r13, %rbx
movq 0x10(%rsp), %r13
divsd 0xdebcf(%rip), %xmm0    # 0x107ca8
movq %rbp, %rdi
callq 0xe0071
leaq 0x20(%rsp), %rsi
pushq $0x40
popq %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
callq 0xe0644
jmp 0x29109
leaq 0xda615(%rip), %rsi     # 0x103711
leaq 0x20(%rsp), %rdi
pushq $0x40
popq %rdx
callq 0xde492
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0xdeda2(%rip), %rsi     # 0x107ebb
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0xde896
addq $0x68, %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/amiga-dsk.c
// Function: read_blocks_table
static void read_blocks_table(deark *c, lctx *d, i64 pos, struct block_ptrs_tbl *bpt)
{
	i64 k;

	for(k=0; k<bpt->blocks_tbl_capacity; k++) {
		bpt->blocks_tbl[k] = de_getu32be(pos + 4*k);
		if(c->debug_level>=2 && bpt->blocks_tbl[k]!=0) {
			de_dbg2(c, "blktbl[%d]: %u", (int)k, (UI)bpt->blocks_tbl[k]);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xdee94(%rip), %r12     # 0x107feb
xorl %r13d, %r13d
cmpq 0x8(%rbx), %r13
jge 0x291a0
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xe404f
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
cmpl $0x2, (%r15)
setl %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x29197
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde9f1
incq %r13
addq $0x4, %r14
jmp 0x2915a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_file_segment_from_blocks_tbl
static int read_file_segment_from_blocks_tbl(deark *c, lctx *d, struct member_data *md)
{
	i64 nbytes_left_to_copy;
	i64 k;
	int retval = 0;

	nbytes_left_to_copy = md->fsize - md->outf->len;

	for(k=0; k<md->tmpbpt.high_seq; k++) {
		i64 blknum;
		i64 blkpos;
		i64 nbytes_to_copy;

		if(nbytes_left_to_copy<1) break;

		blknum = md->tmpbpt.blocks_tbl[md->tmpbpt.blocks_tbl_capacity-1-k];
		if(!claim_block(c, d, blknum)) {
			goto done;
		}

		blkpos = blocknum_to_offset(d, blknum);
		nbytes_to_copy = d->bsize;
		if(!d->is_ffs) {
			// TODO: If we allow this, it might be better to call
			// do_file_ofs_data_block(), somehow.
			blkpos += 24;
			nbytes_to_copy -= 24;
		}

		if(nbytes_to_copy > nbytes_left_to_copy) {
			nbytes_to_copy = nbytes_left_to_copy;
		}
		dbuf_copy(c->infile, blkpos, nbytes_to_copy, md->outf);
		nbytes_left_to_copy -= nbytes_to_copy;
	}
	retval = 1;

done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rsi, (%rsp)
movq 0x18(%rdx), %rbp
movq 0x50(%rdx), %rax
subq 0x18(%rax), %rbp
movq %rdi, 0x8(%rsp)
pushq $-0x8
popq %r15
xorl %ebx, %ebx
movq 0x8(%rsp), %r14
cmpq 0x70(%r13), %rbx
jge 0x29259
testq %rbp, %rbp
jle 0x29259
movq %rbp, 0x10(%rsp)
movq 0x78(%r13), %rax
shlq $0x3, %rax
addq 0x80(%r13), %rax
movq (%r15,%rax), %r12
movq %r14, %rdi
movq (%rsp), %rbp
movq %rbp, %rsi
movq %r12, %rdx
callq 0x28f6d
testl %eax, %eax
je 0x2925e
movq 0x8(%rbp), %rax
imulq %rax, %r12
leaq 0x18(%r12), %rsi
cmpb $0x0, (%rbp)
cmovneq %r12, %rsi
leaq -0x18(%rax), %r12
cmovneq %rax, %r12
movq 0x10(%rsp), %rbp
cmpq %rbp, %r12
cmovgeq %rbp, %r12
movq 0x18(%r14), %rdi
movq 0x50(%r13), %rcx
movq %r12, %rdx
callq 0xe45f4
subq %r12, %rbp
incq %rbx
addq $-0x8, %r15
jmp 0x291db
pushq $0x1
popq %rax
jmp 0x29260
xorl %eax, %eax
addq $0x18, %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/binscii.c
// Function: de_module_binscii
void de_module_binscii(deark *c, struct deark_module_info *mi)
{
	mi->id = "binscii";
	mi->desc = "BinSCII";
	mi->run_fn = de_run_binscii;
	mi->identify_fn = de_identify_binscii;
}

// Assembly:
leaq 0xdeea1(%rip), %rax     # 0x108118
movq %rax, (%rsi)
leaq 0xdee9f(%rip), %rax     # 0x108120
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2929c
movq %rax, 0x18(%rsi)
leaq 0x8b2(%rip), %rax       # 0x29b49
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binscii.c
// Function: de_identify_binscii
static int de_identify_binscii(deark *c)
{
	int has_ext;
	int ret;
	i64 foundpos;

	has_ext = de_input_file_has_ext(c, "bsc") ||
		de_input_file_has_ext(c, "bsq");
	if(!dbuf_memcmp(c->infile, 0, g_binscii_seg_sig, 18)) {
		return has_ext?100:90;
	}

	if(!has_ext) return 0;

	ret = dbuf_search(c->infile, g_binscii_seg_sig, 18, 0, 4096, &foundpos);
	if(ret) {
		// TODO? We could do better, by making sure the string starts at the
		// beginning of a line, etc.
		return 35;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xde74b(%rip), %rsi     # 0x1082a6
callq 0xdfcd5
movb $0x1, %bpl
testl %eax, %eax
jne 0x29b7c
leaq 0xde73c(%rip), %rsi     # 0x1082aa
movq %rbx, %rdi
callq 0xdfcd5
testl %eax, %eax
setne %bpl
movq 0x18(%rbx), %rdi
leaq 0xde5cd(%rip), %rdx     # 0x108154
xorl %r14d, %r14d
pushq $0x12
popq %rcx
xorl %esi, %esi
callq 0xe4d48
testl %eax, %eax
je 0x29bc9
testb %bpl, %bpl
je 0x29bd7
movq 0x18(%rbx), %rdi
leaq 0xde5ac(%rip), %rsi     # 0x108154
pushq $0x12
popq %rdx
leaq 0x8(%rsp), %r9
movl $0x1000, %r8d           # imm = 0x1000
xorl %ecx, %ecx
callq 0xe62f1
testl %eax, %eax
pushq $0x23
popq %r14
cmovel %eax, %r14d
jmp 0x29bd7
testb %bpl, %bpl
pushq $0x64
popq %rax
pushq $0x5a
popq %r14
cmovnel %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binscii.c
// Function: binscii_close_cur_file
static void binscii_close_cur_file(deark *c, struct binscii_ctx *d)
{
	struct binscii_md *md;

	md = d->cur_md;
	if(!d->cur_md) return;
	de_dbg(c, "closing file");
	if(d->cur_md->orig_len != d->cur_md->nbytes_written) {
		binscii_set_generic_error(c, d);
	}
	dbuf_close(md->outf);
	ucstring_destroy(md->fn);
	de_free(c, md);
	d->cur_md = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %r14
testq %r14, %r14
je 0x29c3e
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xde69c(%rip), %rsi     # 0x108299
xorl %eax, %eax
callq 0xde896
movq (%rbx), %rax
movq 0x8(%rax), %rcx
cmpq 0x10(%rax), %rcx
je 0x29c1d
cmpb $0x0, 0xc(%rbx)
jne 0x29c1d
movw $0x101, 0xc(%rbx)       # imm = 0x101
movq 0x20(%r14), %rdi
callq 0xe5591
movq 0x18(%r14), %rdi
callq 0xeaf3c
movq %r15, %rdi
movq %r14, %rsi
callq 0xded32
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binscii.c
// Function: binscii_decode
static void binscii_decode(deark *c, struct binscii_ctx *d, const u8 *src,
	i64 num_units, dbuf *outf)
{
	i64 i;
	u8 ib[4];

	for(i=0; i<num_units; i++) {
		UI j;

		for(j=0; j<4; j++) {
			ib[j] = d->cur_seg.bmap[(UI)src[i*4+j]];
		}
		dbuf_writebyte(outf, (ib[3]<<2)|(ib[2]>>4));
		dbuf_writebyte(outf, ((ib[2]&0x0f)<<4)|(ib[1]>>2));
		dbuf_writebyte(outf, ((ib[1]&0x03)<<6)|ib[0]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
testq %rdx, %rdx
cmovleq %r13, %rdx
movq %rdx, 0x10(%rsp)
cmpq 0x10(%rsp), %r13
je 0x29ce8
xorl %eax, %eax
cmpq $0x4, %rax
je 0x29c8f
movzbl (%r15,%rax), %ecx
movb 0x120(%r12,%rcx), %cl
movb %cl, 0xc(%rsp,%rax)
incq %rax
jmp 0x29c73
movb 0xe(%rsp), %bpl
movb 0xf(%rsp), %al
shlb $0x2, %al
movl %ebp, %ecx
shrb $0x4, %cl
orb %al, %cl
movzbl %cl, %esi
movq %rbx, %rdi
callq 0xe5bc5
shlb $0x4, %bpl
movb 0xd(%rsp), %r14b
movl %r14d, %eax
shrb $0x2, %al
orb %bpl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0xe5bc5
shlb $0x6, %r14b
orb 0xc(%rsp), %r14b
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0xe5bc5
incq %r13
addq $0x4, %r15
jmp 0x29c6a
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/bmff.c
// Function: de_module_jpeg2000
void de_module_jpeg2000(deark *c, struct deark_module_info *mi)
{
	mi->id = "jpeg2000";
	mi->desc = "JPEG 2000 image";
	mi->desc2 = "resources only";
	mi->run_fn = de_run_bmff;
	mi->identify_fn = de_identify_jpeg2000;
}

// Assembly:
leaq 0xde5a5(%rip), %rax     # 0x1082e8
movq %rax, (%rsi)
leaq 0xde5a4(%rip), %rax     # 0x1082f1
movq %rax, 0x8(%rsi)
leaq 0xde5a9(%rip), %rax     # 0x108301
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x29d73
movq %rax, 0x18(%rsi)
leaq 0x152(%rip), %rax       # 0x29ec0
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: de_run_bmff
static void de_run_bmff(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_boxesctx *bctx = NULL;
	int skip_autodetect = 0;
	const char *s;

	d = de_malloc(c, sizeof(lctx));
	bctx = de_malloc(c, sizeof(struct de_boxesctx));

	if(de_havemodcode(c, mparams, 'T')) {
		d->is_jumbf = 1;
		skip_autodetect = 1;
	}
	if(de_havemodcode(c, mparams, 'X')) {
		d->is_jpx = 1;
		d->is_jp2_jpx_jpm = 1;
		skip_autodetect = 1;
	}
	if(de_havemodcode(c, mparams, 'B')) {
		d->is_bmff = 1;
		skip_autodetect = 1;
	}

	if(!skip_autodetect) {
		u32 first_boxtype;
		// Try to detect old QuickTime files that don't have an ftyp box.
		first_boxtype = (u32)de_getu32be(4);
		if(first_boxtype==BOX_mdat || first_boxtype==BOX_moov ||
			first_boxtype==BOX_free || first_boxtype==BOX_wide ||
			first_boxtype==BOX_skip || first_boxtype==BOX_pnot)
		{
			d->is_bmff = 1;
		}
	}

	s = de_get_ext_option(c, "bmff:maxentries");
	if(s) {
		d->max_entries_to_print = de_atoi64(s);
	}
	else {
		d->max_entries_to_print = 32;
	}
	if(d->max_entries_to_print<0) {
		d->max_entries_to_print = 0;
	}

	bctx->userdata = (void*)d;
	bctx->f = c->infile;
	bctx->identify_box_fn = my_box_identify_fn;
	bctx->handle_box_fn = my_box_handler;

	fmtutil_read_boxes_format(c, bctx);

	de_free(c, bctx);
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x30
popq %r15
movq %r15, %rsi
callq 0xdecaf
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdecaf
movq %rax, %r15
pushq $0x54
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdfcf4
testl %eax, %eax
je 0x29dba
pushq $0x1
popq %rbp
movb $0x1, 0xa(%r14)
jmp 0x29dbc
xorl %ebp, %ebp
pushq $0x58
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdfcf4
testl %eax, %eax
je 0x29dd8
movw $0x101, 0x5(%r14)       # imm = 0x101
pushq $0x1
popq %rbp
pushq $0x42
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdfcf4
testl %eax, %eax
je 0x29df1
movb $0x1, 0x4(%r14)
jmp 0x29df5
testl %ebp, %ebp
je 0x29e6d
leaq 0xde54d(%rip), %rsi     # 0x108349
movq %rbx, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x29e1c
movq %rax, %rdi
callq 0xdfb3b
xorl %ecx, %ecx
testq %rax, %rax
cmovgq %rax, %rcx
jmp 0x29e1f
pushq $0x20
popq %rcx
movq %rcx, 0x10(%r14)
movq %r14, (%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%r15)
leaq 0x15b(%rip), %rax       # 0x29f90
movq %rax, 0x18(%r15)
leaq 0x248(%rip), %rax       # 0x2a088
movq %rax, 0x20(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xeca38
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xded32
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe404f
cmpl $0x66726565, %eax       # imm = 0x66726565
je 0x29dea
cmpl $0x6d646174, %eax       # imm = 0x6D646174
je 0x29dea
cmpl $0x6d6f6f76, %eax       # imm = 0x6D6F6F76
je 0x29dea
cmpl $0x706e6f74, %eax       # imm = 0x706E6F74
je 0x29dea
cmpl $0x77696465, %eax       # imm = 0x77696465
je 0x29dea
cmpl $0x736b6970, %eax       # imm = 0x736B6970
je 0x29dea
jmp 0x29df5
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: de_module_bmff
void de_module_bmff(deark *c, struct deark_module_info *mi)
{
	mi->id = "bmff";
	mi->desc = "ISO Base Media File Format";
	mi->desc2 = "MP4, QuickTime, etc.";
	mi->id_alias[0] = "mp4";
	mi->run_fn = de_run_bmff;
	mi->identify_fn = de_identify_bmff;
	mi->help_fn = de_help_bmff;
}

// Assembly:
leaq 0xde427(%rip), %rax     # 0x108310
movq %rax, (%rsi)
leaq 0xde422(%rip), %rax     # 0x108315
movq %rax, 0x8(%rsi)
leaq 0xde432(%rip), %rax     # 0x108330
movq %rax, 0x10(%rsi)
leaq 0xde43c(%rip), %rax     # 0x108345
movq %rax, 0x38(%rsi)
leaq -0x1a1(%rip), %rax      # 0x29d73
movq %rax, 0x18(%rsi)
leaq 0x10(%rip), %rax        # 0x29f2f
movq %rax, 0x20(%rsi)
leaq 0x58(%rip), %rax        # 0x29f82
movq %rax, 0x28(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: my_box_identify_fn
static void my_box_identify_fn(deark *c, struct de_boxesctx *bctx)
{
	const struct box_type_info *bti;
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;
	struct de_boxdata *par = curbox->parent;
	struct de_boxdata *gpar = NULL;
	int is_ilst_child = 0;

	if(curbox->boxtype != BOX_uuid) {
		curbox->box_name = "?";
	}

	if(par) {
		gpar = par->parent;
	}

	if((par && (par->boxtype==BOX_ilst)) ||
		(gpar && (gpar->boxtype==BOX_ilst)) )
	{
		is_ilst_child = 1;
	}

	if(is_ilst_child) {
		bti = find_ilst_box_type_info(c, d, curbox->boxtype);
	}
	else {
		bti = find_box_type_info(c, d, curbox->boxtype, curbox->level);
	}

	if(bti) {
		// So that we don't have to run "find" again in my_box_handler(),
		// record it here.
		curbox->box_userdata = (void*)bti;

		if(bti->name) {
			curbox->box_name = bti->name;
		}
	}
	// TODO: Do we need special handling of 'data' boxes?
}

// Assembly:
movq (%rsi), %rdi
movq 0x28(%rsi), %rax
movq (%rax), %rdx
movl 0xc(%rax), %ecx
cmpl $0x75756964, %ecx       # imm = 0x75756964
je 0x29fb0
leaq 0xf4f35(%rip), %rsi     # 0x11eee1
movq %rsi, 0x50(%rax)
testq %rdx, %rdx
je 0x29ffb
cmpl $0x696c7374, 0xc(%rdx)  # imm = 0x696C7374
je 0x29fcf
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x29ffb
cmpl $0x696c7374, 0xc(%rdx)  # imm = 0x696C7374
jne 0x29ffb
xorl %esi, %esi
leaq 0x157468(%rip), %rdx    # 0x181440
leaq 0x20(%rsi), %rdi
cmpq $0x160, %rdi            # imm = 0x160
je 0x2a087
cmpl %ecx, (%rsi,%rdx)
movq %rdi, %rsi
jne 0x29fd8
leaq (%rdi,%rdx), %rsi
addq $-0x20, %rsi
jmp 0x2a076
movl 0x8(%rax), %edx
xorl %esi, %esi
cmpb $0x0, 0x4(%rdi)
setne %sil
leal 0x8(%rsi), %r8d
cmpb $0x0, 0x8(%rdi)
cmovel %esi, %r8d
cmpb $0x0, 0x5(%rdi)
leal 0x10000(%r8), %esi
cmovel %r8d, %esi
leal 0x40000(%rsi), %r9d
cmpb $0x0, 0xa(%rdi)
cmovel %esi, %r9d
movl %r9d, %r8d
orl $0x80000, %r8d          # imm = 0x80000
cmpb $0x0, 0x9(%rdi)
cmovel %r9d, %r8d
xorl %edi, %edi
leaq 0x157533(%rip), %rsi    # 0x181580
cmpq $0xf00, %rdi            # imm = 0xF00
je 0x2a087
cmpl %ecx, (%rdi,%rsi)
jne 0x2a06d
testl %edx, %edx
jne 0x2a066
testb $0x2, 0x8(%rdi,%rsi)
jne 0x2a073
testl %r8d, 0x4(%rdi,%rsi)
jne 0x2a073
addq $0x20, %rdi
jmp 0x2a04d
addq %rdi, %rsi
movq %rsi, 0x48(%rax)
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x2a087
movq %rcx, 0x50(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: my_box_handler
static int my_box_handler(deark *c, struct de_boxesctx *bctx)
{
	const struct box_type_info *bti;
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->is_uuid) {
		if(!de_memcmp(curbox->uuid, g_uuid_cr3_85c0, 16)) {
			curbox->is_superbox = 1;
		}
		else if(!de_memcmp(curbox->uuid, g_uuid_cr3_eaf4, 16)) {
			curbox->is_superbox = 1;
			curbox->extra_bytes_before_children = 8;
		}
		else {
			return fmtutil_default_box_handler(c, bctx);
		}
		return 1;
	}

	bti = (const struct box_type_info *)curbox->box_userdata;

	if(bti && (bti->flags2 & 0x1)) {
		curbox->is_superbox = 1;
	}
	else if(d->is_bmff && curbox->parent && (curbox->parent->boxtype==BOX_ilst)) {
		curbox->is_superbox = 1;
	}

	if(bti && bti->hfn) {
		bti->hfn(c, d, bctx);
	}

	return 1;
}

// Assembly:
movq %rsi, %rdx
movq 0x28(%rsi), %rax
cmpl $0x0, 0x10(%rax)
je 0x2a0d2
movdqu 0x14(%rax), %xmm0
pcmpeqb 0xde20e(%rip), %xmm0    # 0x1082b0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x2a10a
leaq 0x14(%rax), %rcx
movdqu (%rcx), %xmm0
pcmpeqb 0xde202(%rip), %xmm0    # 0x1082c0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x2a113
movq %rdx, %rsi
jmp 0xec8a2
movq (%rdx), %rsi
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0x2a0e4
testb $0x1, 0x8(%rcx)
jne 0x2a124
cmpb $0x0, 0x4(%rsi)
je 0x2a103
movq (%rax), %r8
testq %r8, %r8
je 0x2a103
cmpl $0x696c7374, 0xc(%r8)   # imm = 0x696C7374
jne 0x2a103
movl $0x1, 0x5c(%rax)
testq %rcx, %rcx
jne 0x2a12b
jmp 0x2a13b
movl $0x1, 0x5c(%rax)
jmp 0x2a13b
movl $0x1, 0x5c(%rax)
movq $0x8, 0x70(%rax)
jmp 0x2a13b
movl $0x1, 0x5c(%rax)
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x2a13b
pushq %rax
callq *%rax
addq $0x8, %rsp
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_ftyp
static void do_box_ftyp(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 i;
	i64 mver;
	i64 num_compat_brands;
	struct de_fourcc brand4cc;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->payload_len<4) goto done;
	dbuf_read_fourcc(bctx->f, curbox->payload_pos, &brand4cc, 4, 0x0);
	d->major_brand = brand4cc.id;
	de_dbg(c, "major brand: '%s'", brand4cc.id_dbgstr);
	if(curbox->level==0)
		apply_brand(c, d, d->major_brand);

	if(curbox->payload_len<8) goto done;
	mver = dbuf_getu32be(bctx->f, curbox->payload_pos+4);
	de_dbg(c, "minor version: %u", (unsigned int)mver);

	if(curbox->payload_len<12) goto done;
	num_compat_brands = (curbox->payload_len - 8)/4;

	for(i=0; i<num_compat_brands; i++) {
		dbuf_read_fourcc(bctx->f, curbox->payload_pos + 8 + i*4, &brand4cc, 4, 0x0);
		if(brand4cc.id==0) continue; // Placeholder. Ignore.
		de_dbg(c, "compatible brand: '%s'", brand4cc.id_dbgstr);
		if(curbox->level==0)
			apply_brand(c, d, brand4cc.id);
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, (%rsp)
movq 0x28(%rdx), %r14
cmpq $0x4, 0x40(%r14)
jl 0x2a437
movq %rdx, %rbx
movq %rdi, %r15
movq 0x10(%rdx), %rdi
movq 0x38(%r14), %rsi
leaq 0x8(%rsp), %r12
pushq $0x4
popq %rcx
movq %r12, %rdx
xorl %r8d, %r8d
callq 0xe657c
movl 0x4(%r12), %eax
movq (%rsp), %rcx
movl %eax, (%rcx)
leaq 0x18(%rsp), %rdx
leaq 0xde65d(%rip), %rsi     # 0x108a43
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
cmpl $0x0, 0x8(%r14)
jne 0x2a402
movq (%rsp), %rdi
movl (%rdi), %esi
callq 0x2c709
cmpq $0x8, 0x40(%r14)
jl 0x2a437
movq 0x10(%rbx), %rdi
movq 0x38(%r14), %rsi
addq $0x4, %rsi
callq 0xe404f
leaq 0xde634(%rip), %rsi     # 0x108a55
movq %r15, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x40(%r14), %r12
cmpq $0xc, %r12
jge 0x2a446
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $-0x8, %r12
shrq $0x2, %r12
pushq $0x8
popq %r13
pushq $0x4
popq %rbp
subq $0x1, %r12
jb 0x2a437
movq 0x10(%rbx), %rdi
movq 0x38(%r14), %rsi
addq %r13, %rsi
leaq 0x8(%rsp), %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0xe657c
cmpl $0x0, 0xc(%rsp)
je 0x2a4a6
movq %r15, %rdi
leaq 0xde5e1(%rip), %rsi     # 0x108a67
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0xde896
cmpl $0x0, 0x8(%r14)
jne 0x2a4a6
movl 0xc(%rsp), %esi
movq (%rsp), %rdi
callq 0x2c709
addq $0x4, %r13
jmp 0x2a455
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_jP
static void do_box_jP(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u32 n;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->level!=0) return;
	if(curbox->payload_len<4) return;
	n = (u32)dbuf_getu32be(bctx->f, curbox->payload_pos);
	if(n==0x0d0a870a) {
		de_dbg(c, "found JPEG 2000 signature");
	}
}

// Assembly:
pushq %rbx
movq 0x28(%rdx), %rax
cmpl $0x0, 0x8(%rax)
jne 0x2a4e7
cmpq $0x4, 0x40(%rax)
jl 0x2a4e7
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
movq 0x38(%rax), %rsi
callq 0xe404f
cmpl $0xd0a870a, %eax        # imm = 0xD0A870A
jne 0x2a4e7
leaq 0xde5a2(%rip), %rsi     # 0x108a7e
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0xde896
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_stco
static void do_box_stco(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 e_count;
	i64 e_size;

	do_read_version_and_flags(c, d, bctx, &version, &flags, 1);
	pos += 4;
	if(version!=0 || flags!=0) return;

	e_size = (bctx->curbox->boxtype == BOX_co64) ? 8 : 4;
	e_count = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "entry count: %u", (unsigned int)e_count);

	do_simple_int_table(c, d, bctx, pos, e_count, e_size, "entry", "chunk offset");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdx), %rax
movq 0x38(%rax), %r13
leaq 0xb(%rsp), %r12
leaq 0xc(%rsp), %rcx
movq %rdx, %rsi
movq %r12, %rdx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x10(%rsp)
cmpb $0x0, (%r12)
jne 0x2a59e
cmpl $0x0, 0xc(%rsp)
jne 0x2a59e
movq 0x10(%rbx), %rdi
movq 0x28(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x636f3634, 0xc(%rax)  # imm = 0x636F3634
sete %cl
leaq 0x4(,%rcx,4), %r12
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xe4071
movq %rax, %rbp
leaq 0xde531(%rip), %rsi     # 0x108a98
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq (%r13), %rcx
leaq 0xddefb(%rip), %rax     # 0x108479
leaq 0x10d33e(%rip), %r10    # 0x1378c3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %r8
movq %r12, %r9
pushq %rax
pushq %r10
callq 0x2c804
popq %rax
popq %rcx
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/bmff.c
// Function: do_box_colr_bmff
static void do_box_colr_bmff(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	struct de_fourcc ct4cc; // colour_type

	if(curbox->payload_len<4) goto done;

	dbuf_read_fourcc(bctx->f, pos, &ct4cc, 4, 0x0);
	de_dbg(c, "colour type: '%s'", ct4cc.id_dbgstr);
	pos += 4;

	if(ct4cc.id==CODE_rICC || ct4cc.id==CODE_prof) {
		dbuf_create_file_from_slice(bctx->f, pos,
			curbox->payload_pos+curbox->payload_len-pos,
			"icc", NULL, DE_CREATEFLAG_IS_AUX);
	}

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jl 0x2a641
movq %rdx, %r14
movq %rdi, %r15
movq 0x38(%r13), %rbx
movq 0x10(%rdx), %rdi
movq %rsp, %rdx
pushq $0x4
popq %rcx
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0xe657c
leaq 0x10(%rsp), %r12
leaq 0xde50b(%rip), %rsi     # 0x108afb
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movl -0xc(%r12), %eax
cmpl $0x72494343, %eax       # imm = 0x72494343
je 0x2a610
cmpl $0x70726f66, %eax       # imm = 0x70726F66
jne 0x2a641
movq 0x10(%r14), %rdi
movq 0x38(%r13), %rax
movq 0x40(%r13), %rcx
subq %rbx, %rax
addq $0x4, %rbx
leaq (%rax,%rcx), %rdx
addq $-0x4, %rdx
leaq 0xde4db(%rip), %rcx     # 0x108b0d
pushq $0x1
popq %r9
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0xe4e0b
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_dref
static void do_box_dref(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 nitems;
	u8 version;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;

	do_read_version_and_flags(c, d, bctx, &version, NULL, 1);
	pos += 4;

	nitems = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "number of items: %u", (unsigned int)nitems);

	curbox->num_children_is_known = 1;
	curbox->num_children = nitems;
	curbox->extra_bytes_before_children = pos - curbox->payload_pos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %r12
movq 0x38(%r12), %r13
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2c79e
addq $0x4, %r13
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbx
leaq 0xde475(%rip), %rsi     # 0x108b11
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xde896
movl $0x1, 0x60(%r12)
movq %rbx, 0x68(%r12)
movq (%r15), %rax
subq 0x38(%r12), %rax
movq %rax, 0x70(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_hdlr
static void do_box_hdlr(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	de_ucstring *s = NULL;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	struct de_fourcc tmp4cc;

	if(curbox->payload_len<4) goto done;
	do_read_version_and_flags(c, d, bctx, NULL, NULL, 1);
	pos += 4;
	if(curbox->payload_len<24) goto done;
	pos += 4; // "Predefined"

	dbuf_read_fourcc(bctx->f, pos, &tmp4cc, 4, 0x0);
	de_dbg(c, "handler type: '%s'", tmp4cc.id_dbgstr);
	pos += 4;

	pos += 12; // reserved
	if(curbox->payload_len<25) goto done;
	if(dbuf_getbyte(bctx->f, pos) == 0x00) goto done;

	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(bctx->f, pos, curbox->payload_pos + curbox->payload_len - pos,
		DE_DBG_MAX_STRLEN, s, DE_CONVFLAG_STOP_AT_NUL, DE_ENCODING_UTF8);
	de_dbg(c, "metadata type name: \"%s\"", ucstring_getpsz_d(s));

done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jge 0x2a6f2
xorl %r14d, %r14d
jmp 0x2a7bb
movq %rdx, %r15
movq %rdi, %rbx
movq 0x38(%r13), %rbp
xorl %r14d, %r14d
movq %rdx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2c79e
cmpq $0x18, 0x40(%r13)
jl 0x2a7bb
leaq 0x8(%rbp), %rsi
movq 0x10(%r15), %rdi
leaq 0x8(%rsp), %rdx
pushq $0x4
popq %rcx
xorl %r14d, %r14d
xorl %r8d, %r8d
callq 0xe657c
leaq 0x18(%rsp), %rdx
leaq 0xde3e8(%rip), %rsi     # 0x108b25
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpq $0x19, 0x40(%r13)
jl 0x2a7bb
leaq 0x18(%rbp), %r12
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3eb4
testb %al, %al
je 0x2a6ea
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r14
movq 0x10(%r15), %rdi
movq 0x38(%r13), %rax
movq 0x40(%r13), %rcx
subq %rbp, %rax
leaq (%rax,%rcx), %rdx
addq $-0x18, %rdx
movl $0x2, (%rsp)
pushq $0x1
popq %r9
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r12, %rsi
movq %r14, %r8
callq 0xe4ced
movq %r14, %rdi
callq 0xeb877
leaq 0xde38a(%rip), %rsi     # 0x108b38
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r14, %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/bmff.c
// Function: do_box_iinf
static void do_box_iinf(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 nitems;
	u8 version;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;

	do_read_version_and_flags(c, d, bctx, &version, NULL, 1);
	pos += 4;

	if(version==0) {
		nitems = dbuf_getu16be_p(bctx->f, &pos);
	}
	else {
		nitems = dbuf_getu32be_p(bctx->f, &pos);
	}
	de_dbg(c, "number of items: %d", (int)nitems);

	curbox->num_children_is_known = 1;
	curbox->num_children = nitems;
	curbox->extra_bytes_before_children = pos - curbox->payload_pos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x28(%rdx), %r12
movq 0x38(%r12), %r13
leaq 0x7(%rsp), %r15
movq %rdx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x8(%rsp)
cmpb $0x0, (%r15)
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %rsi
je 0x2a81f
callq 0xe4071
jmp 0x2a824
callq 0xe3f6e
movq %rax, %r14
leaq 0xf4a6e(%rip), %rsi     # 0x11f29c
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
movl $0x1, 0x60(%r12)
movq %r14, 0x68(%r12)
movq 0x8(%rsp), %rax
subq 0x38(%r12), %rax
movq %rax, 0x70(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_infe
static void do_box_infe(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 n;
	unsigned int item_id;

	do_read_version_and_flags(c, d, bctx, &version, NULL, 1);
	pos += 4;

	if(version==2 || version==3) {
		struct de_fourcc itemtype4cc;

		if(version==2) {
			item_id = (unsigned int)dbuf_getu16be_p(bctx->f, &pos);
		}
		else {
			item_id = (unsigned int)dbuf_getu32be_p(bctx->f, &pos);
		}
		de_dbg(c, "item id: %u", item_id);

		n = dbuf_getu16be_p(bctx->f, &pos);
		de_dbg(c, "item protection: %u", (unsigned int)n);

		dbuf_read_fourcc(bctx->f, pos, &itemtype4cc, 4, 0x0);
		pos += 4;
		de_dbg(c, "item type: '%s'", itemtype4cc.id_dbgstr);

		if(itemtype4cc.id==CODE_Exif) {
			d->exif_item_id_known = 1;
			d->exif_item_id = item_id;
		}

		// TODO: string item_name
		// TODO: sometimes there are additional strings after item_name
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %rax
movq 0x38(%rax), %r13
leaq 0x7(%rsp), %r12
movq %rdx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x8(%rsp)
movb (%r12), %al
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x2, %cl
jne 0x2adf9
movq 0x10(%r15), %rdi
leaq 0x8(%rsp), %rsi
cmpb $0x2, %al
jne 0x2ad71
callq 0xe3f6e
jmp 0x2ad76
callq 0xe4071
movq %rax, %r12
leaq 0xdde24(%rip), %rsi     # 0x108ba4
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0xe3f6e
leaq 0xdde6e(%rip), %rsi     # 0x108c13
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %rdi
movq (%r13), %rsi
leaq 0x10(%rsp), %rdx
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
addq $0x4, (%r13)
leaq 0x20(%rsp), %r15
leaq 0xdde4d(%rip), %rsi     # 0x108c27
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
cmpl $0x45786966, -0xc(%r15) # imm = 0x45786966
jne 0x2adf9
movb $0x1, 0x18(%rbx)
movl %r12d, 0x1c(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_mdhd
static void do_box_mdhd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	i64 pos;
	i64 n;
	i64 timescale;
	double nd;
	struct de_boxdata *curbox = bctx->curbox;

	// TODO: Share code with do_box_mvhd()?
	if(curbox->payload_len<4) return;

	pos = curbox->payload_pos;
	do_read_version_and_flags(c, d, bctx, &version, &flags, 1);
	pos+=4;

	if(version==1) {
		if(curbox->payload_len<36) return;
	}
	else {
		if(curbox->payload_len<24) return;
	}

	// creation time, mod time
	if(version==1)
		pos += 8 + 8;
	else
		pos += 4 + 4;

	timescale = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "timescale: %d time units per second", (int)timescale);

	// duration
	if(version==1) {
		n = dbuf_geti64be(bctx->f, pos);
		pos += 8;
	}
	else {
		n = dbuf_getu32be_p(bctx->f, &pos);
	}
	if(timescale>0)
		nd = (double)n / (double)timescale;
	else
		nd = 0.0;
	de_dbg(c, "duration: %d time units (%.2f seconds)", (int)n, nd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jl 0x2af00
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%r13), %r12
leaq 0xf(%rsp), %r15
leaq 0x1c(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
cmpb $0x1, (%r15)
movq 0x40(%r13), %rax
jne 0x2ae75
cmpq $0x24, %rax
jl 0x2af00
pushq $0x14
jmp 0x2ae81
cmpq $0x18, %rax
jl 0x2af00
pushq $0xc
popq %rax
addq %r12, %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq 0x10(%r14), %rdi
callq 0xe4071
movq %rax, %r15
leaq 0xddd97(%rip), %rsi     # 0x108c37
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpb $0x1, 0xf(%rsp)
movq 0x10(%r14), %rdi
jne 0x2aeca
movq 0x10(%rsp), %rsi
callq 0xe4143
addq $0x8, 0x10(%rsp)
jmp 0x2aed4
leaq 0x10(%rsp), %rsi
callq 0xe4071
testq %r15, %r15
jg 0x2aedf
xorpd %xmm0, %xmm0
jmp 0x2aeed
cvtsi2sd %rax, %xmm0
cvtsi2sd %r15, %xmm1
divsd %xmm1, %xmm0
leaq 0xddd67(%rip), %rsi     # 0x108c5b
movq %rbx, %rdi
movl %eax, %edx
movb $0x1, %al
callq 0xde896
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_meta
static void do_box_meta(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	if(bctx->curbox->payload_len>=8) {
		// The QuickTime spec says 'meta' is not a full box, but in newer files
		// it is. I don't know how you're supposed to know, but sniffing for
		// "hdlr" should be good enough.
		u32 n = (u32)dbuf_getu32be(bctx->f, bctx->curbox->payload_pos+4);
		if(n==BOX_hdlr) {
			return;
		}
	}

	do_box_full_superbox(c, d, bctx);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %rax
cmpq $0x8, 0x40(%rax)
jl 0x2af43
movq 0x10(%rbx), %rdi
movq 0x38(%rax), %rsi
addq $0x4, %rsi
callq 0xe404f
cmpl $0x68646c72, %eax       # imm = 0x68646C72
jne 0x2af43
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2ae07
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_mvhd
static void do_box_mvhd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	i64 pos;
	i64 n;
	i64 timescale;
	double nd;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->payload_len<4) return;

	pos = curbox->payload_pos;
	do_read_version_and_flags(c, d, bctx, &version, &flags, 1);
	pos+=4;

	if(version==1) {
		if(curbox->payload_len<112) return;
	}
	else {
		if(curbox->payload_len<100) return;
	}

	// creation time, mod time
	if(version==1)
		pos += 8 + 8;
	else
		pos += 4 + 4;

	timescale = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "timescale: %d time units per second", (int)timescale);

	// duration
	if(version==1) {
		n = dbuf_geti64be(bctx->f, pos);
		pos += 8;
	}
	else {
		n = dbuf_getu32be_p(bctx->f, &pos);
	}
	if(timescale>0)
		nd = (double)n / (double)timescale;
	else
		nd = 0.0;
	de_dbg(c, "duration: %d time units (%.2f seconds)", (int)n, nd);

	nd = dbuf_fmtutil_read_fixed_16_16(bctx->f, pos);
	pos += 4; // rate
	de_dbg(c, "rate: %.3f", nd);

	n = dbuf_getu16be_p(bctx->f, &pos);
	de_dbg(c, "volume: %.3f", ((double)n)/256.0);

	pos += 2; // reserved
	pos += 4*2; // reserved
	pos += 4*9; // matrix
	pos += 4*6; // pre_defined

	n = dbuf_getu32be(bctx->f, pos);
	de_dbg(c, "next track id: %d", (int)n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jl 0x2b0a9
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%r13), %r12
leaq 0xf(%rsp), %r15
leaq 0x1c(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
cmpb $0x1, (%r15)
movq 0x40(%r13), %rax
jne 0x2afa8
cmpq $0x70, %rax
jl 0x2b0a9
pushq $0x14
jmp 0x2afb4
cmpq $0x64, %rax
jl 0x2b0a9
pushq $0xc
popq %rax
addq %r12, %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq 0x10(%r14), %rdi
callq 0xe4071
movq %rax, %r15
leaq 0xddc64(%rip), %rsi     # 0x108c37
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpb $0x1, 0xf(%rsp)
movq 0x10(%r14), %rdi
jne 0x2affd
movq 0x10(%rsp), %rsi
callq 0xe4143
addq $0x8, 0x10(%rsp)
jmp 0x2b007
leaq 0x10(%rsp), %rsi
callq 0xe4071
testq %r15, %r15
jg 0x2b012
xorpd %xmm0, %xmm0
jmp 0x2b020
cvtsi2sd %rax, %xmm0
cvtsi2sd %r15, %xmm1
divsd %xmm1, %xmm0
leaq 0xddc34(%rip), %rsi     # 0x108c5b
movq %rbx, %rdi
movl %eax, %edx
movb $0x1, %al
callq 0xde896
movq 0x10(%r14), %rdi
leaq 0x10(%rsp), %r15
movq (%r15), %rsi
callq 0xec7b0
addq $0x4, (%r15)
leaq 0xddc33(%rip), %rsi     # 0x108c82
movq %rbx, %rdi
movb $0x1, %al
callq 0xde896
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe3f6e
cvtsi2sd %rax, %xmm0
mulsd 0xdd25e(%rip), %xmm0    # 0x1082d0
leaq 0xddc14(%rip), %rsi     # 0x108c8d
movq %rbx, %rdi
movb $0x1, %al
callq 0xde896
movq (%r15), %rsi
addq $0x46, %rsi
movq %rsi, (%r15)
movq 0x10(%r14), %rdi
callq 0xe404f
leaq 0xddbfd(%rip), %rsi     # 0x108c9a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_smhd
static void do_box_smhd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	unsigned int n;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;

	if(curbox->payload_len<8) return;
	do_read_version_and_flags(c, d, bctx, &version, &flags, 1);
	pos += 4;
	if(version!=0 || flags!=0x0) return;

	n = (unsigned int)dbuf_getu16be_p(bctx->f, &pos);
	de_dbg(c, "balance: %u", n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x28(%rdx), %rax
cmpq $0x8, 0x40(%rax)
jl 0x2b123
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%rax), %r12
leaq 0xb(%rsp), %r15
leaq 0xc(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %r12
movq %r12, 0x10(%rsp)
cmpb $0x0, (%r15)
jne 0x2b123
cmpl $0x0, 0xc(%rsp)
jne 0x2b123
movq 0x10(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe3f6e
leaq 0xddb95(%rip), %rsi     # 0x108cac
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq