LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_stsc
static void do_box_stsc(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, e_to_print;
	i64 bytesleft;
	i64 k;

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

	e_count = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "entry count: %u", (unsigned int)e_count);

	bytesleft = curbox->payload_pos + curbox->payload_len - pos;
	if(bytesleft/12 < e_count) return;

	e_to_print = de_min_int(e_count, d->max_entries_to_print);

	for(k=0; k<e_to_print; k++) {
		i64 first_chunk, spc, sdi;
		first_chunk = dbuf_getu32be_p(bctx->f, &pos);
		spc = dbuf_getu32be_p(bctx->f, &pos);
		sdi = dbuf_getu32be_p(bctx->f, &pos);
		de_dbg(c, "entry[%d]: first chunk=%d, samples/chunk=%d, descr. index=%d",
			(int)k, (int)first_chunk, (int)spc, (int)sdi);
	}
	if(e_to_print < e_count) {
		de_dbg(c, "[%d more entry(s) omitted, starting at %"I64_FMT"]",
			(int)(e_count-e_to_print), pos);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq 0x28(%rdx), %rbx
movq 0x38(%rbx), %r13
leaq 0xf(%rsp), %r15
leaq 0x24(%rsp), %rcx
movq %rdi, 0x10(%rsp)
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x18(%rsp)
cmpb $0x0, (%r15)
jne 0x2b271
cmpl $0x0, 0x24(%rsp)
jne 0x2b271
movq 0x10(%r14), %rdi
leaq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0xe4071
movq %rax, %r15
leaq 0xdd8fa(%rip), %rsi     # 0x108a98
movq 0x10(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x40(%rbx), %rax
addq 0x38(%rbx), %rax
subq (%r13), %rax
pushq $0xc
popq %rcx
cqto
idivq %rcx
cmpq %r15, %rax
jl 0x2b271
movq 0x10(%r12), %rsi
movq %r15, 0x30(%rsp)
movq %r15, %rdi
callq 0xdfb45
testq %rax, %rax
movl $0x0, %ebx
movq %rax, 0x28(%rsp)
cmovgq %rax, %rbx
leaq 0x18(%rsp), %r13
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x2b248
movq 0x10(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %r15
movq 0x10(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %rbp
movq 0x10(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq 0x10(%rsp), %rdi
leaq 0xdda88(%rip), %rsi     # 0x108cb8
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0xde896
incq %r12
jmp 0x2b1f5
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rax
cmpq %rax, %rdx
jle 0x2b271
subl %eax, %edx
movq 0x18(%rsp), %rcx
leaq 0xdda90(%rip), %rsi     # 0x108cf5
movq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0xde896
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_stsd
static void do_box_stsd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	i64 pos;
	i64 num_entries;
	i64 entry_size;
	struct de_fourcc fmt4cc;
	struct de_boxdata *curbox = bctx->curbox;

	if(curbox->payload_len<8) return;

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

	num_entries = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "number of sample description entries: %d", (int)num_entries);

	while(1) {
		if(pos + 16 >= curbox->payload_pos + curbox->payload_len) break;
		entry_size = dbuf_getu32be(bctx->f, pos);
		de_dbg(c, "sample description entry at %d, len=%d", (int)pos, (int)entry_size);
		if(entry_size<16) break;

		de_dbg_indent(c, 1);
		dbuf_read_fourcc(bctx->f, pos+4, &fmt4cc, 4, 0x0);
		de_dbg(c, "data format: '%s'", fmt4cc.id_dbgstr);
		de_dbg_indent(c, -1);

		pos += entry_size;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x28(%rdx), %rbp
cmpq $0x8, 0x40(%rbp)
jl 0x2b2c7
movq %rdx, %rbx
movq %rdi, %r14
movq 0x38(%rbp), %r12
leaq 0x7(%rsp), %r15
leaq 0x14(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %r12
movq %r12, 0x8(%rsp)
cmpb $0x0, (%r15)
je 0x2b2d6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xe4071
leaq 0xdda33(%rip), %rsi     # 0x108d21
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq (%r15), %r15
leaq 0xdda6d(%rip), %r13     # 0x108d71
pushq $-0x1
popq %r12
leaq 0x10(%r15), %rax
movq 0x40(%rbp), %rcx
addq 0x38(%rbp), %rcx
cmpq %rcx, %rax
jge 0x2b2c7
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xe404f
movq %rax, %r15
movl 0x8(%rsp), %edx
movq %r14, %rdi
leaq 0xdda14(%rip), %rsi     # 0x108d4a
movl %r15d, %ecx
xorl %eax, %eax
callq 0xde896
cmpq $0x10, %r15
jl 0x2b2c7
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x10(%rbx), %rdi
movq 0x8(%rsp), %rsi
addq $0x4, %rsi
leaq 0x18(%rsp), %rdx
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
movq %r14, %rdi
movq %r13, %rsi
leaq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
movl %r12d, %esi
callq 0xdeba7
addq 0x8(%rsp), %r15
movq %r15, 0x8(%rsp)
jmp 0x2b308
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_stss
static void do_box_stss(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;

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

	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, 4, "entry", "sample number");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdx), %rax
movq 0x38(%rax), %r13
leaq 0x3(%rsp), %r12
leaq 0x4(%rsp), %rcx
movq %rdx, %rsi
movq %r12, %rdx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x8(%rsp)
cmpb $0x0, (%r12)
jne 0x2b438
cmpl $0x0, 0x4(%rsp)
jne 0x2b438
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xe4071
movq %rax, %r13
leaq 0xdd699(%rip), %rsi     # 0x108a98
movq %r15, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq (%r12), %rcx
leaq 0xdd96c(%rip), %rax     # 0x108d83
leaq 0x10c4a5(%rip), %r10    # 0x1378c3
pushq $0x4
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %r8
pushq %rax
pushq %r10
callq 0x2c804
popq %rax
popq %rcx
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_stsz
static void do_box_stsz(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 s_size, s_count;

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

	s_size = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "sample size: %u", (unsigned int)s_size);
	s_count = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "sample count: %u", (unsigned int)s_count);

	if(s_size!=0) goto done;

	do_simple_int_table(c, d, bctx, pos, s_count, 4, "sample", "entry size");

done:
	;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdx), %rax
movq 0x38(%rax), %r13
leaq 0x3(%rsp), %r12
leaq 0x4(%rsp), %rcx
movq %rdx, %rsi
movq %r12, %rdx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x8(%rsp)
cmpb $0x0, (%r12)
jne 0x2b511
cmpl $0x0, 0x4(%rsp)
jne 0x2b511
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xe4071
movq %rax, %r13
leaq 0xdd8e2(%rip), %rsi     # 0x108d91
movq %r15, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0xe4071
movq %rax, %r12
leaq 0xdd8cf(%rip), %rsi     # 0x108da1
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
testq %r13, %r13
jne 0x2b511
movq 0x8(%rsp), %rcx
leaq 0xdd8c2(%rip), %rax     # 0x108db2
leaq 0xdd250(%rip), %r10     # 0x108747
pushq $0x4
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
pushq %rax
pushq %r10
callq 0x2c804
popq %rax
popq %rcx
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_stts
static void do_box_stts(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, e_to_print;
	i64 bytesleft;
	i64 k;

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

	e_count = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "entry count: %u", (unsigned int)e_count);

	bytesleft = curbox->payload_pos + curbox->payload_len - pos;
	if(bytesleft/8 < e_count) return;

	e_to_print = de_min_int(e_count, d->max_entries_to_print);

	for(k=0; k<e_to_print; k++) {
		i64 s_count, s_delta;
		s_count = dbuf_getu32be_p(bctx->f, &pos);
		s_delta = dbuf_getu32be_p(bctx->f, &pos);
		de_dbg(c, "entry[%d]: sample count=%d, delta=%d", (int)k,
			(int)s_count, (int)s_delta);
	}
	if(e_to_print < e_count) {
		de_dbg(c, "[%d more entry(s) omitted, starting at %"I64_FMT"]",
			(int)(e_count-e_to_print), pos);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x28(%rdx), %rbp
movq 0x38(%rbp), %r13
leaq 0x7(%rsp), %r15
leaq 0x14(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %r13
movq %r13, 0x8(%rsp)
cmpb $0x0, (%r15)
jne 0x2b647
cmpl $0x0, 0x14(%rsp)
jne 0x2b647
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0xe4071
movq %rax, %r15
leaq 0xdd50c(%rip), %rsi     # 0x108a98
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x40(%rbp), %rax
addq 0x38(%rbp), %rax
subq (%r13), %rax
pushq $0x8
popq %rcx
cqto
idivq %rcx
cmpq %r15, %rax
jl 0x2b647
movq 0x10(%r12), %rsi
movq %r15, 0x20(%rsp)
movq %r15, %rdi
callq 0xdfb45
testq %rax, %rax
movl $0x0, %ebp
movq %rax, 0x18(%rsp)
cmovgq %rax, %rbp
leaq 0x8(%rsp), %r13
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x2b620
movq 0x10(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rax, %r15
movq 0x10(%r14), %rdi
movq %r13, %rsi
callq 0xe4071
movq %rbx, %rdi
leaq 0xdd7b2(%rip), %rsi     # 0x108dbd
movl %r12d, %edx
movl %r15d, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0xde896
incq %r12
jmp 0x2b5e1
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rax
cmpq %rax, %rdx
jle 0x2b647
subl %eax, %edx
movq 0x8(%rsp), %rcx
leaq 0xdd6b8(%rip), %rsi     # 0x108cf5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
addq $0x28, %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_ctts
static void do_box_ctts(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, e_to_print;
	i64 bytesleft;
	i64 k;

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

	e_count = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg(c, "entry count: %u", (unsigned int)e_count);

	bytesleft = curbox->payload_pos + curbox->payload_len - pos;
	if(bytesleft < e_count*8) return;

	e_to_print = e_count;
	if(e_to_print > d->max_entries_to_print) {
		e_to_print = d->max_entries_to_print;
	}

	for(k=0; k<e_to_print; k++) {
		i64 s_count, s_offset;
		s_count = dbuf_getu32be_p(bctx->f, &pos);
		if(version==0) {
			s_offset = dbuf_getu32be_p(bctx->f, &pos);
		}
		else {
			s_offset = dbuf_geti32be(bctx->f, pos); pos += 4;
		}
		de_dbg(c, "entry[%d]: sample count=%"I64_FMT", offset=%"I64_FMT,
			(int)k, s_count, s_offset);
	}
	if(e_to_print < e_count) {
		de_dbg(c, "[%d more entry(s) omitted, starting at %"I64_FMT"]",
			(int)(e_count-e_to_print), pos);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x28(%rdx), %r13
movq 0x38(%r13), %rbp
leaq 0x7(%rsp), %r15
leaq 0x14(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %rbp
movq %rbp, 0x8(%rsp)
cmpb $0x1, (%r15)
ja 0x2b78f
cmpl $0x0, 0x14(%rsp)
jne 0x2b78f
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbp
leaq 0xdd3d5(%rip), %rsi     # 0x108a98
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq 0x40(%r13), %rax
addq 0x38(%r13), %rax
subq (%r15), %rax
leaq (,%rbp,8), %rcx
cmpq %rcx, %rax
jl 0x2b78f
movq 0x10(%r12), %r13
cmpq %r13, %rbp
movq %r13, 0x18(%rsp)
movq %rbp, 0x20(%rsp)
cmovlq %rbp, %r13
xorl %eax, %eax
testq %r13, %r13
cmovleq %rax, %r13
leaq 0x8(%rsp), %r12
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x2b768
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xe4071
movq %rax, %r15
cmpb $0x0, 0x7(%rsp)
movq 0x10(%r14), %rdi
je 0x2b742
movq 0x8(%rsp), %rsi
callq 0xe40e8
addq $0x4, 0x8(%rsp)
jmp 0x2b74a
movq %r12, %rsi
callq 0xe4071
movq %rbx, %rdi
leaq 0xdd68e(%rip), %rsi     # 0x108de2
movl %ebp, %edx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xde896
incq %rbp
jmp 0x2b711
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rax
cmpq %rax, %rdx
jle 0x2b78f
subl %eax, %edx
movq 0x8(%rsp), %rcx
leaq 0xdd570(%rip), %rsi     # 0x108cf5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
addq $0x28, %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_tkhd
static void do_box_tkhd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	i64 pos;
	double w, h;
	i64 n;
	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<96) return;
	}
	else {
		if(curbox->payload_len<84) return;
	}

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

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

	pos += 4; // reserved

	// duration
	if(version==1)
		pos += 8;
	else
		pos += 4;

	pos += 4*2; // reserved
	pos += 2; // layer
	pos += 2; // alternate group

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

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

	w = dbuf_fmtutil_read_fixed_16_16(bctx->f, pos);
	pos += 4;
	h = dbuf_fmtutil_read_fixed_16_16(bctx->f, pos);
	pos += 4;
	de_dbg(c, "dimensions: %.1f"DE_CHAR_TIMES"%.1f", w, h);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jl 0x2b8b4
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%r13), %r12
leaq 0x7(%rsp), %r15
leaq 0x14(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
cmpb $0x1, (%r15)
movq 0x40(%r13), %rax
jne 0x2b7f1
cmpq $0x60, %rax
jl 0x2b8b4
pushq $0x14
jmp 0x2b7fd
cmpq $0x54, %rax
jl 0x2b8b4
pushq $0xc
popq %rax
addq %r12, %rax
leaq 0x18(%rsp), %r15
movq %rax, (%r15)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
leaq 0xdd483(%rip), %rsi     # 0x108c9f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq (%r15), %rax
leaq 0x4(%rax), %rcx
cmpb $0x1, 0x7(%rsp)
cmovneq %rax, %rcx
addq $0x14, %rcx
movq %rcx, (%r15)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe3f6e
cvtsi2sd %rax, %xmm0
mulsd 0xdca78(%rip), %xmm0    # 0x1082d0
leaq 0xdd42e(%rip), %rsi     # 0x108c8d
movq %rbx, %rdi
movb $0x1, %al
callq 0xde896
movq (%r15), %rsi
addq $0x26, %rsi
movq %rsi, (%r15)
movq 0x10(%r14), %rdi
callq 0xec7b0
movsd %xmm0, 0x8(%rsp)
movq (%r15), %rsi
addq $0x4, %rsi
movq %rsi, (%r15)
movq 0x10(%r14), %rdi
callq 0xec7b0
movapd %xmm0, %xmm1
addq $0x4, (%r15)
leaq 0xdd566(%rip), %rsi     # 0x108e0a
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %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_url
static void do_box_url(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	de_ucstring *s = NULL;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	u32 flags = 0;

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

	// "If the self-contained flag is set, [...] no string is present".
	// But there is no flag named "self-contained".
	// I assume it is flag 0x1.
	if(flags&0x000001) 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, "URL: \"%s\"", ucstring_getpsz_d(s));
done:
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movq 0x28(%rdx), %rbp
movq 0x38(%rbp), %r13
leaq 0x14(%rsp), %r12
andl $0x0, (%r12)
xorl %r14d, %r14d
movq %rdx, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x2c79e
testb $0x1, (%r12)
jne 0x2b95c
leaq 0x4(%r13), %r12
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r14
movq 0x10(%r15), %rdi
movq 0x38(%rbp), %rax
movq 0x40(%rbp), %rcx
subq %r13, %rax
leaq (%rax,%rcx), %rdx
addq $-0x4, %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 0xdd4d2(%rip), %rsi     # 0x108e21
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
callq 0xeaf3c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_vmhd
static void do_box_vmhd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 version;
	u32 flags;
	size_t k;
	unsigned int clr[3];
	unsigned int graphicsmode;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;

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

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

	for(k=0; k<3; k++) {
		clr[k] = (unsigned int)dbuf_getu16be_p(bctx->f, &pos);
	}
	de_dbg(c, "opcolor: (%d,%d,%d)", (int)clr[0], (int)clr[1], (int)clr[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x28(%rdx), %rax
cmpq $0xc, 0x40(%rax)
jl 0x2ba23
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%rax), %r12
leaq 0xf(%rsp), %r15
leaq 0x10(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2c79e
addq $0x4, %r12
movq %r12, 0x20(%rsp)
cmpb $0x0, (%r15)
jne 0x2ba23
cmpl $0x1, 0x10(%rsp)
jne 0x2ba23
movq 0x10(%r14), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0xe3f6e
leaq 0xdd451(%rip), %rsi     # 0x108e2b
xorl %r12d, %r12d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x3, %r12
je 0x2ba05
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe3f6e
movl %eax, 0x14(%rsp,%r12,4)
incq %r12
jmp 0x2b9e9
movl 0x14(%rsp), %edx
movl 0x18(%rsp), %ecx
movl 0x1c(%rsp), %r8d
leaq 0xdd423(%rip), %rsi     # 0x108e3c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_PICT
static void do_box_PICT(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	dbuf *outf = NULL;

	outf = dbuf_create_output_file(c, "pict", NULL, DE_CREATEFLAG_IS_AUX);
	dbuf_write_zeroes(outf, 512);
	dbuf_copy(bctx->f, curbox->payload_pos, curbox->payload_len, outf);
	dbuf_close(outf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq 0x28(%rdx), %r15
leaq 0xdd40e(%rip), %rsi     # 0x108e50
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0xe4e62
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdi
callq 0xe5d20
movq 0x10(%rbx), %rdi
movq 0x38(%r15), %rsi
movq 0x40(%r15), %rdx
movq %r14, %rcx
callq 0xe45f4
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xe5591
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_PRVW
static void do_box_PRVW(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	i64 img_pos;
	i64 img_len;

	if(!curbox->parent) return;
	if(!curbox->parent->is_uuid) return;
	if(de_memcmp(curbox->parent->uuid, g_uuid_cr3_eaf4, 16)) return;
	if(curbox->payload_len<20) return;
	img_pos= curbox->payload_pos+16;
	if(dbuf_memcmp(bctx->f, img_pos, "\xff\xd8\xff", 3)) return;
	img_len = dbuf_getu32be(bctx->f, curbox->payload_pos+12);
	de_dbg(c, "image at %"I64_FMT", len=%"I64_FMT, img_pos, img_len);
	if(img_pos+img_len > curbox->payload_pos+curbox->payload_len) return;
	dbuf_create_file_from_slice(bctx->f, img_pos, img_len, "preview.jpg", NULL,
		DE_CREATEFLAG_IS_AUX);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x28(%rdx), %r13
movq (%r13), %rax
testq %rax, %rax
je 0x2bb24
cmpl $0x0, 0x10(%rax)
je 0x2bb24
movdqu 0x14(%rax), %xmm0
pcmpeqb 0xdc812(%rip), %xmm0    # 0x1082c0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x2bb24
cmpq $0x14, 0x40(%r13)
jl 0x2bb24
movq %rdx, %rbx
movq %rdi, %r14
movq 0x38(%r13), %r15
addq $0x10, %r15
movq 0x10(%rdx), %rdi
leaq 0xdba70(%rip), %rdx     # 0x107549
pushq $0x3
popq %rcx
movq %r15, %rsi
callq 0xe4d48
testl %eax, %eax
jne 0x2bb24
movq 0x10(%rbx), %rdi
movq 0x38(%r13), %rsi
addq $0xc, %rsi
callq 0xe404f
movq %rax, %r12
leaq 0xdd352(%rip), %rsi     # 0x108e55
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
leaq (%r12,%r15), %rax
movq 0x40(%r13), %rcx
addq 0x38(%r13), %rcx
cmpq %rcx, %rax
jle 0x2bb2e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rdi
leaq 0xf25ee(%rip), %rcx     # 0x11e127
pushq $0x1
popq %r9
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe4e0b
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_THMB
static void do_box_THMB(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	i64 img_pos;
	i64 img_len;

	if(!curbox->parent) return;
	if(!curbox->parent->is_uuid) return;
	if(de_memcmp(curbox->parent->uuid, g_uuid_cr3_85c0, 16)) return;
	if(curbox->payload_len<20) return;
	img_pos= curbox->payload_pos+16;
	if(dbuf_memcmp(bctx->f, img_pos, "\xff\xd8\xff", 3)) return;
	img_len = dbuf_getu32be(bctx->f, curbox->payload_pos+8);
	de_dbg(c, "image at %"I64_FMT", len=%"I64_FMT, img_pos, img_len);
	if(img_pos+img_len > curbox->payload_pos+curbox->payload_len) return;
	dbuf_create_file_from_slice(bctx->f, img_pos, img_len, "thumb.jpg", NULL,
		DE_CREATEFLAG_IS_AUX);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x28(%rdx), %r13
movq (%r13), %rax
testq %rax, %rax
je 0x2bbfb
cmpl $0x0, 0x10(%rax)
je 0x2bbfb
movdqu 0x14(%rax), %xmm0
pcmpeqb 0xdc72b(%rip), %xmm0    # 0x1082b0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x2bbfb
cmpq $0x14, 0x40(%r13)
jl 0x2bbfb
movq %rdx, %rbx
movq %rdi, %r14
movq 0x38(%r13), %r15
addq $0x10, %r15
movq 0x10(%rdx), %rdi
leaq 0xdb999(%rip), %rdx     # 0x107549
pushq $0x3
popq %rcx
movq %r15, %rsi
callq 0xe4d48
testl %eax, %eax
jne 0x2bbfb
movq 0x10(%rbx), %rdi
movq 0x38(%r13), %rsi
addq $0x8, %rsi
callq 0xe404f
movq %rax, %r12
leaq 0xdd27b(%rip), %rsi     # 0x108e55
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
leaq (%r12,%r15), %rax
movq 0x40(%r13), %rcx
addq 0x38(%r13), %rcx
cmpq %rcx, %rax
jle 0x2bc05
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rdi
leaq 0xfa9c4(%rip), %rcx     # 0x1265d4
pushq $0x1
popq %r9
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe4e0b
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_cdef
static void do_box_cdef(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 ndescs;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 k;

	ndescs = dbuf_getu16be_p(bctx->f, &pos);
	de_dbg(c, "number of channel descriptions: %d", (int)ndescs);

	for(k=0; k<ndescs; k++) {
		i64 idx, typ, asoc;

		if(pos+6 > curbox->payload_pos + curbox->payload_len) break;
		de_dbg(c, "channel description[%d] at %"I64_FMT, (int)k, pos);
		de_dbg_indent(c, 1);
		idx = dbuf_getu16be_p(bctx->f, &pos);
		de_dbg(c, "channel index: %d", (int)idx);
		typ = dbuf_getu16be_p(bctx->f, &pos);
		de_dbg(c, "channel type: %d (%s)", (int)typ, get_channel_type_name(typ));
		asoc = dbuf_getu16be_p(bctx->f, &pos);
		de_dbg(c, "index of associated color: %d", (int)asoc);
		de_dbg_indent(c, -1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %rbp
movq 0x38(%rbp), %rax
movq %rsp, %r15
movq %rax, (%r15)
movq 0x10(%rdx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, %r12
leaq 0xdd22d(%rip), %rsi     # 0x108e8d
xorl %r13d, %r13d
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
testq %r12, %r12
cmovleq %r13, %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x2bd6d
movq (%rsp), %rcx
leaq 0x6(%rcx), %rax
movq 0x40(%rbp), %rdx
addq 0x38(%rbp), %rdx
cmpq %rdx, %rax
jg 0x2bd6d
movq %r14, %rdi
leaq 0xdd20a(%rip), %rsi     # 0x108eb0
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %r14, %rdi
leaq 0xdd1fe(%rip), %rsi     # 0x108ecf
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
leaq 0xdd228(%rip), %rcx     # 0x108f15
testq %rax, %rax
je 0x2bd28
cmpq $0xffff, %rax           # imm = 0xFFFF
je 0x2bd0f
cmpq $0x2, %rax
je 0x2bd18
cmpq $0x1, %rax
jne 0x2bd21
leaq 0xdd23d(%rip), %rcx     # 0x108f4a
jmp 0x2bd28
leaq 0xdd23c(%rip), %rcx     # 0x108f52
jmp 0x2bd28
leaq 0xdd21d(%rip), %rcx     # 0x108f3c
jmp 0x2bd28
leaq 0xf31b9(%rip), %rcx     # 0x11eee1
movq %r14, %rdi
leaq 0xdd1af(%rip), %rsi     # 0x108ee1
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %r14, %rdi
leaq 0xdd1a6(%rip), %rsi     # 0x108ef7
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %r13
jmp 0x2bc7a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_colr_jp2
static void do_box_colr_jp2(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	u8 meth;
	u8 n;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	const char *s;

	if(curbox->payload_len<3) goto done;
	meth = dbuf_getbyte_p(bctx->f, &pos);
	switch(meth) {
	case 1: s="enumerated"; break;
	case 2: s="ICC profile (restricted)"; break;
	case 3: s="ICC profile (any)"; break; // JPX only
	case 4: s="vendor"; break; // JPX only
	default: s="?";
	}
	de_dbg(c, "specification method: %d (%s)", (int)meth, s);

	n = dbuf_getbyte_p(bctx->f, &pos);
	de_dbg(c, "precedence: %u", (UI)n);
	n = dbuf_getbyte_p(bctx->f, &pos);
	de_dbg(c, "approximation code: %u", (UI)n);

	if(meth==1) {
		unsigned int enumcs;
		if(curbox->payload_len<7) goto done;
		enumcs = (unsigned int)dbuf_getu32be_p(bctx->f, &pos);
		switch(enumcs) {
			// TODO: There are lots more valid values for JPX.
		case 16: s="sRGB"; break;
		case 17: s="sRGB-like grayscale"; break;
		case 18: s="sYCC"; break;
		default: s="?";
		}
		de_dbg(c, "enumerated colourspace: %u (%s)", enumcs, s);
	}
	else if(meth==2 || meth==3) {
		dbuf_create_file_from_slice(bctx->f,
			curbox->payload_pos+3, curbox->payload_len-3,
			"icc", NULL, DE_CREATEFLAG_IS_AUX);
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdx), %r13
movq 0x38(%r13), %rax
movq %rax, (%rsp)
cmpq $0x3, 0x40(%r13)
jge 0x2bda9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
movq %rsp, %rsi
callq 0xe3f2a
movl %eax, %ebp
movzbl %al, %r15d
leal -0x1(%r15), %eax
cmpb $0x3, %al
ja 0x2bddc
movzbl %al, %eax
leaq 0xdd621(%rip), %rdx     # 0x1093f4
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
jmp 0x2bde3
leaq 0xf30fe(%rip), %rcx     # 0x11eee1
leaq 0xdd1b3(%rip), %rsi     # 0x108f9d
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdd1ab(%rip), %rsi     # 0x108fbb
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdd19a(%rip), %rsi     # 0x108fca
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpl $0x1, %r15d
jne 0x2be71
cmpq $0x7, 0x40(%r13)
jl 0x2bd9a
movq 0x10(%r14), %rdi
movq %rsp, %rsi
callq 0xe4071
leal -0x10(%rax), %ecx
cmpl $0x2, %ecx
ja 0x2beab
movl %ecx, %ecx
leaq 0xdd59c(%rip), %rdx     # 0x109404
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmp 0x2beb2
andb $-0x2, %bpl
cmpb $0x2, %bpl
jne 0x2bd9a
movq 0x10(%r14), %rdi
movq 0x38(%r13), %rsi
movq 0x40(%r13), %rdx
addq $0x3, %rsi
addq $-0x3, %rdx
leaq 0xdcc73(%rip), %rcx     # 0x108b0d
pushq $0x1
popq %r9
xorl %r8d, %r8d
callq 0xe4e0b
jmp 0x2bd9a
leaq 0xf302f(%rip), %rcx     # 0x11eee1
leaq 0xdd146(%rip), %rsi     # 0x108fff
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
jmp 0x2bd9a
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_dtbl
static void do_box_dtbl(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 ndr;
	struct de_boxdata *curbox = bctx->curbox;

	ndr = dbuf_getu16be(bctx->f, curbox->payload_pos);
	de_dbg(c, "number of data references: %d", (int)ndr);

	curbox->num_children_is_known = 1;
	curbox->num_children = ndr;
	curbox->extra_bytes_before_children = 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
movq 0x28(%rdx), %r15
movq 0x38(%r15), %rsi
callq 0xe3f46
movq %rax, %r14
leaq 0xdd132(%rip), %rsi     # 0x10901f
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
movl $0x1, 0x60(%r15)
movq %r14, 0x68(%r15)
movq $0x2, 0x70(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_ihdr
static void do_box_ihdr(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 w, h, n;
	u8 b;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	char tmps[80];

	if(curbox->payload_len<14) return;
	h = dbuf_getu32be_p(bctx->f, &pos);
	w = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg_dimensions(c, w, h);

	n = dbuf_getu16be_p(bctx->f, &pos);
	de_dbg(c, "number of components: %d", (int)n);

	b = dbuf_getbyte_p(bctx->f, &pos);
	if(b==255) {
		de_strlcpy(tmps, "various", sizeof(tmps));
	}
	else {
		de_snprintf(tmps, sizeof(tmps), "%u bits/comp., %ssigned",
			(unsigned int)(1+(b&0x7f)), (b&0x80)?"":"un");
	}
	de_dbg(c, "bits-per-component code: %u (%s)", (unsigned int)b, tmps);

	b = dbuf_getbyte_p(bctx->f, &pos);
	de_dbg(c, "compression type: %u (%s)", (unsigned int)b,
		get_jpeg2000_cmpr_name(c, d, b));

	b = dbuf_getbyte_p(bctx->f, &pos);
	de_dbg(c, "colorspace-is-unknown flag: %d", (int)b);
	b = dbuf_getbyte_p(bctx->f, &pos);
	de_dbg(c, "has-IPR: %d", (int)b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq 0x28(%rdx), %rax
movq 0x38(%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq $0xe, 0x40(%rax)
jl 0x2c09c
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xe4071
movq %rax, %r13
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xe4071
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xdf038
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xe3f6e
leaq 0xdd0b9(%rip), %rsi     # 0x10903d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %ebp
cmpb $-0x1, %bpl
je 0x2bfd9
movl %ebp, %ecx
andl $0x7f, %ecx
incl %ecx
testb %bpl, %bpl
leaq 0xda6b9(%rip), %rax     # 0x10666f
leaq 0x10bca3(%rip), %r8     # 0x137c60
cmovnsq %rax, %r8
leaq 0xdd096(%rip), %rdx     # 0x10905e
leaq 0x10(%rsp), %rdi
pushq $0x50
popq %rsi
xorl %eax, %eax
callq 0xde40c
jmp 0x2bfed
leaq 0xdd076(%rip), %rsi     # 0x109056
leaq 0x10(%rsp), %rdi
pushq $0x50
popq %rdx
callq 0xde492
leaq 0xdd082(%rip), %rsi     # 0x109076
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe3f2a
movzbl %al, %edx
cmpb $0x7, %dl
jne 0x2c024
leaq 0xdd0ba(%rip), %rcx     # 0x1090dc
jmp 0x2c046
cmpb $0x0, 0x6(%r15)
leaq 0xf2eb1(%rip), %rcx     # 0x11eee1
je 0x2c046
cmpb $0x9, %al
ja 0x2c046
movl %edx, %eax
leaq 0xdd3d1(%rip), %rsi     # 0x109410
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0xdd04a(%rip), %rsi     # 0x109097
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdd03f(%rip), %rsi     # 0x1090b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdd03e(%rip), %rsi     # 0x1090d0
movq %rbx, %rdi
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/bmff.c
// Function: do_box_jp2c
static void do_box_jp2c(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;

	de_dbg(c, "JPEG 2000 codestream at %d, len=%d",
		(int)curbox->payload_pos, (int)curbox->payload_len);

	// I think this box is used regardless of the compression format, so make
	// sure it seems to be in "JPEG 2000" format.
	// This is a hack -- we could track the compression method instead.
	if((u32)dbuf_getu32be(bctx->f, curbox->payload_pos) != 0xff4fff51U) {
		de_dbg(c, "[non-J2C]");
		return;
	}

	dbuf_create_file_from_slice(bctx->f, curbox->payload_pos, curbox->payload_len,
		"j2c", NULL, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x28(%rdx), %r15
movl 0x38(%r15), %edx
movl 0x40(%r15), %ecx
leaq 0xdd038(%rip), %rsi     # 0x109101
xorl %eax, %eax
callq 0xde896
movq 0x10(%r14), %rdi
movq 0x38(%r15), %rsi
callq 0xe404f
cmpl $0xff4fff51, %eax       # imm = 0xFF4FFF51
jne 0x2c107
movq 0x10(%r14), %rdi
movq 0x38(%r15), %rsi
movq 0x40(%r15), %rdx
leaq 0xdd037(%rip), %rcx     # 0x10912e
xorl %r8d, %r8d
xorl %r9d, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0xe4e0b
leaq 0xdd016(%rip), %rsi     # 0x109124
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xde896
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_justtext
static void do_box_justtext(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	de_ucstring *s = NULL;
	const char *name;

	name = curbox->box_name ? curbox->box_name : "value";
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(bctx->f, curbox->payload_pos, curbox->payload_len,
		DE_DBG_MAX_STRLEN, s, 0, DE_ENCODING_UTF8);
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz_d(s));
	ucstring_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rdi, %rbx
movq 0x28(%rdx), %r13
movq 0x50(%r13), %rax
testq %rax, %rax
leaq 0xfa6f7(%rip), %r14     # 0x126839
cmovneq %rax, %r14
callq 0xeac74
movq %rax, %r15
movq 0x10(%r12), %rdi
movq 0x38(%r13), %rsi
movq 0x40(%r13), %rdx
movl $0x2, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %rax, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r15, %rdi
callq 0xeb877
leaq 0xf2d39(%rip), %rsi     # 0x11eeba
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xeaf3c
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_box_resc_resd
static void do_box_resc_resd(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	i64 vn, vd, hn, hd;
	int ve, he;
	struct de_boxdata *curbox = bctx->curbox;
	const char *name;
	i64 pos = curbox->payload_pos;
	char res_buf[160];

	if(curbox->boxtype==BOX_resc)
		name = "capture";
	else
		name = "display";

	if(curbox->payload_len<10) return;
	vn = dbuf_getu16be_p(bctx->f, &pos);
	vd = dbuf_getu16be_p(bctx->f, &pos);
	hn = dbuf_getu16be_p(bctx->f, &pos);
	hd = dbuf_getu16be_p(bctx->f, &pos);
	ve = (int)(signed char)dbuf_getbyte_p(bctx->f, &pos);
	he = (int)(signed char)dbuf_getbyte_p(bctx->f, &pos);
	format_jp2_res(res_buf, sizeof(res_buf), vn, vd, ve);
	de_dbg(c, "vert. %s grid res.: %s", name, res_buf);
	format_jp2_res(res_buf, sizeof(res_buf), hn, hd, he);
	de_dbg(c, "horz. %s grid res.: %s", name, res_buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq 0x28(%rdx), %rax
movq 0x38(%rax), %rcx
movq %rcx, 0x18(%rsp)
cmpq $0xa, 0x40(%rax)
jl 0x2c2ac
movq %rdx, %r15
movq %rdi, %rbx
cmpl $0x72657363, 0xc(%rax)  # imm = 0x72657363
leaq 0xfcdfa(%rip), %rax     # 0x128fdd
leaq 0xdcf48(%rip), %r14     # 0x109132
cmoveq %rax, %r14
movq 0x10(%rdx), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0xe3f6e
movq %rax, 0x8(%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3f6e
movq %rax, %r13
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3f6e
movq %rax, 0x10(%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3f6e
movq %rax, (%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3f2a
movsbl %al, %ebp
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xe3f2a
movsbl %al, %r15d
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x2c8f2
leaq 0xdcec9(%rip), %rsi     # 0x10913a
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq (%rsp), %rdx
movl %r15d, %ecx
callq 0x2c8f2
leaq 0xdceb5(%rip), %rsi     # 0x109151
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
addq $0xc8, %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_ulst
static void do_box_ulst(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 nuuids;
	i64 k;
	u8 ubuf[16];
	char uuid_string[50];

	nuuids = dbuf_getu16be_p(bctx->f, &pos);
	de_dbg(c, "number of UUIDs: %d", (int)nuuids);

	for(k=0; k<nuuids; k++) {
		if(pos+16 > curbox->payload_pos + curbox->payload_len) break;
		dbuf_read(bctx->f, ubuf, pos, 16);
		fmtutil_render_uuid(c, ubuf, uuid_string, sizeof(uuid_string));
		de_dbg(c, "UUID[%d]: {%s}", (int)k, uuid_string);
		pos += 16;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq 0x28(%rdx), %rbx
movq 0x38(%rbx), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsp)
movq 0x10(%rdx), %rdi
callq 0xe3f6e
movq %rax, %r15
leaq 0xdcce5(%rip), %rsi     # 0x1092ac
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
testq %r15, %r15
cmovleq %r12, %r15
leaq 0x10(%rsp), %r12
leaq 0x20(%rsp), %rbp
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x2c64b
movq (%rsp), %rdx
leaq 0x10(%rdx), %rax
movq 0x40(%rbx), %rcx
addq 0x38(%rbx), %rcx
cmpq %rcx, %rax
jg 0x2c64b
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq %r12, %rsi
pushq $0x10
popq %rcx
callq 0xe3cb7
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
pushq $0x32
popq %rcx
callq 0xec7c5
movq %r14, %rdi
leaq 0xdcc8c(%rip), %rsi     # 0x1092c0
movl %r13d, %edx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xde896
addq $0x10, (%rsp)
incq %r13
jmp 0x2c5eb
addq $0x58, %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_ispe
static void do_box_ispe(deark *c, lctx *d, struct de_boxesctx *bctx)
{
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = curbox->payload_pos;
	i64 w, h;

	if(curbox->payload_len<12) return;
	do_read_version_and_flags(c, d, bctx, NULL, NULL, 1);
	pos += 4;
	w = dbuf_getu32be_p(bctx->f, &pos);
	h = dbuf_getu32be_p(bctx->f, &pos);
	de_dbg_dimensions(c, w, h);
}

// Assembly:
movq 0x28(%rdx), %rax
cmpq $0xc, 0x40(%rax)
jl 0x2c708
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%rax), %r12
movq %rdx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2c79e
addq $0x4, %r12
movq %rsp, %r15
movq %r12, (%r15)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %r12
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xdf038
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: apply_brand
static void apply_brand(deark *c, lctx *d, u32 brand_id)
{
	switch(brand_id) {
	case BRAND_jp2:
		d->is_jp2_jpx_jpm = 1;
		break;
	case BRAND_jpx:
		d->is_jpx = 1;
		d->is_jp2_jpx_jpm = 1;
		break;
	case BRAND_jpm:
		d->is_jpm = 1;
		d->is_jp2_jpx_jpm = 1;
		break;
	case BRAND_mjp2:
	case BRAND_mj2s:
		d->is_bmff = 1;
		d->is_mj2 = 1;
		break;
	case BRAND_isom:
	case BRAND_mp41:
	case BRAND_mp42:
	case BRAND_M4A:
	case BRAND_qt:
		d->is_bmff = 1;
		break;
	case BRAND_mif1:
	case BRAND_heic:
		d->is_heif = 1;
		break;
	default:
		if((brand_id>>16) == 0x3367) { // "3g??"
			d->is_bmff = 1;
		}
	}
}

// Assembly:
leal -0x6d703431(%rsi), %eax
cmpl $0x2, %eax
jb 0x2c799
cmpl $0x4d344120, %esi       # imm = 0x4D344120
je 0x2c799
cmpl $0x68656963, %esi       # imm = 0x68656963
je 0x2c776
cmpl $0x69736f6d, %esi       # imm = 0x69736F6D
je 0x2c799
cmpl $0x71742020, %esi       # imm = 0x71742020
je 0x2c799
cmpl $0x6a706d20, %esi       # imm = 0x6A706D20
je 0x2c77b
cmpl $0x6a707820, %esi       # imm = 0x6A707820
je 0x2c784
cmpl $0x6d696631, %esi       # imm = 0x6D696631
je 0x2c776
cmpl $0x6d6a3273, %esi       # imm = 0x6D6A3273
je 0x2c76d
cmpl $0x6d6a7032, %esi       # imm = 0x6D6A7032
je 0x2c76d
cmpl $0x6a703220, %esi       # imm = 0x6A703220
jne 0x2c78b
movb $0x1, 0x5(%rdi)
retq
movb $0x1, %al
movb %al, 0x4(%rdi)
movb %al, 0x8(%rdi)
retq
movb $0x1, 0x9(%rdi)
retq
movb $0x1, %al
movb %al, 0x7(%rdi)
movb %al, 0x5(%rdi)
retq
movw $0x101, 0x5(%rdi)       # imm = 0x101
retq
andl $0xffff0000, %esi       # imm = 0xFFFF0000
cmpl $0x33670000, %esi       # imm = 0x33670000
jne 0x2c79d
movb $0x1, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/bmff.c
// Function: do_read_version_and_flags
static void do_read_version_and_flags(deark *c, lctx *d, struct de_boxesctx *bctx,
	u8 *version, u32 *flags, int dbgflag)
{
	u8 version1;
	u32 flags1;
	u32 n;
	struct de_boxdata *curbox = bctx->curbox;

	n = (u32)dbuf_getu32be(bctx->f, curbox->payload_pos);
	version1 = (u8)(n>>24);
	flags1 = n&0x00ffffff;
	if(dbgflag) {
		de_dbg(c, "version=%d, flags=0x%06x", (int)version1, (unsigned int)flags1);
	}
	if(version) *version = version1;
	if(flags) *flags = flags1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
movq 0x10(%rsi), %rdi
movq 0x28(%rsi), %rax
movq 0x38(%rax), %rsi
callq 0xe404f
movq %rax, %r15
movq %rax, %r13
shrq $0x18, %r13
andl $0xffffff, %r15d        # imm = 0xFFFFFF
movzbl %r13b, %edx
leaq 0xdc2cb(%rip), %rsi     # 0x108aa8
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0xde896
testq %r14, %r14
je 0x2c7f2
movb %r13b, (%r14)
testq %rbx, %rbx
je 0x2c7fa
movl %r15d, (%rbx)
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_simple_int_table
static void do_simple_int_table(deark *c, lctx *d, struct de_boxesctx *bctx,
	i64 pos1, i64 e_count, i64 e_size,
	const char *s1, const char *s2)
{
	i64 bytesleft;
	i64 e_to_print;
	i64 k;
	struct de_boxdata *curbox = bctx->curbox;
	i64 pos = pos1;

	if(e_count<=0) return;
	bytesleft = curbox->payload_pos + curbox->payload_len - pos;
	if(bytesleft < e_size*e_count) return;

	e_to_print = de_min_int(e_count, d->max_entries_to_print);

	for(k=0; k<e_to_print; k++) {
		i64 n;

		if(e_size==8) {
			n = dbuf_geti64be(bctx->f, pos); pos += 8;
		}
		else {
			n = dbuf_getu32be_p(bctx->f, &pos);
		}

		de_dbg(c, "%s[%"I64_FMT"]: %s=%"I64_FMT, s1, k, s2, n);
	}
	if(e_to_print < e_count) {
		de_dbg(c, "[%"I64_FMT" more %s(s) omitted, starting at %"I64_FMT"]",
			e_count-e_to_print, s1, pos);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x28(%rdx), %rax
movq %rcx, (%rsp)
testq %r8, %r8
jle 0x2c8e3
movq %r9, %r15
movq %rdx, %r12
movq 0x38(%rax), %rdx
subq %rcx, %rdx
addq 0x40(%rax), %rdx
movq %r9, %rax
imulq %r8, %rax
cmpq %rax, %rdx
jl 0x2c8e3
movq %rdi, %r14
movq 0x10(%rsi), %rsi
movq %r8, 0x10(%rsp)
movq %r8, %rdi
callq 0xdfb45
testq %rax, %rax
movl $0x0, %ebp
movq %rax, 0x8(%rsp)
cmovgq %rax, %rbp
leaq 0xdc251(%rip), %rbx     # 0x108ac1
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x2c8bd
movq 0x10(%r12), %rdi
cmpq $0x8, %r15
jne 0x2c893
movq (%rsp), %rsi
callq 0xe4143
addq $0x8, (%rsp)
jmp 0x2c89b
movq %rsp, %rsi
callq 0xe4071
movq %r14, %rdi
movq %rbx, %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rcx
movq 0x58(%rsp), %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xde896
incq %r13
jmp 0x2c873
movq 0x10(%rsp), %rdx
subq 0x8(%rsp), %rdx
jle 0x2c8e3
movq (%rsp), %r8
leaq 0xdc1fd(%rip), %rsi     # 0x108ad1
movq %r14, %rdi
movq 0x50(%rsp), %rcx
xorl %eax, %eax
callq 0xde896
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: format_jp2_res
static void format_jp2_res(char *buf, size_t buflen,
	i64 num, i64 denom, int exponent)
{
	char descr[100];

	if(denom != 0 && exponent >= -POW10_MAX_E && exponent <= POW10_MAX_E) {
		double dpm, dpi;

		dpm = ((double)num / (double)denom) * limited_pow10(exponent);
		dpi = dpm * 0.0254;
		de_snprintf(descr, sizeof(descr),  " = %f points/meter (%f dpi)", dpm, dpi);
	}
	else {
		descr[0] = '\0';
	}
	de_snprintf(buf, buflen, "(%"I64_FMT",%"I64_FMT",%d)%s",
		num, denom, exponent, descr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %rdx, %rdx
sete %al
leal 0xc(%rbx), %ecx
cmpl $0x19, %ecx
setae %cl
orb %al, %cl
jne 0x2c946
cvtsi2sd %r15, %xmm0
cvtsi2sd %r14, %xmm2
movsd 0xdb9ab(%rip), %xmm1    # 0x1082d8
movapd %xmm1, %xmm3
testl %ebx, %ebx
js 0x2c952
pushq $0x1
popq %rax
movl %ebx, %ecx
testl %ecx, %ecx
jle 0x2c94d
imulq $0xa, %rax, %rax
decl %ecx
jmp 0x2c93a
movb $0x0, 0x10(%rsp)
jmp 0x2c988
cvtsi2sd %rax, %xmm3
divsd %xmm2, %xmm0
testl %ebx, %ebx
jns 0x2c962
divsd %xmm3, %xmm1
movapd %xmm1, %xmm3
mulsd %xmm3, %xmm0
movsd 0xdb972(%rip), %xmm1    # 0x1082e0
mulsd %xmm0, %xmm1
leaq 0xdc7ef(%rip), %rdx     # 0x109168
leaq 0x10(%rsp), %rdi
pushq $0x64
popq %rsi
movb $0x2, %al
callq 0xde40c
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0xdc7ec(%rip), %rdx     # 0x109184
movl $0xa0, %esi
movq %r12, %rdi
movq %r15, %rcx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0xde40c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_module_apple2_dsk
void de_module_apple2_dsk(deark *c, struct deark_module_info *mi)
{
	mi->id = "apple2_dsk";
	mi->desc = "Apple II floppy disk image";
	mi->run_fn = de_run_apple2_dsk;
	mi->identify_fn = de_identify_apple2_dsk;
}

// Assembly:
leaq 0xdcaa5(%rip), %rax     # 0x109468
movq %rax, (%rsi)
leaq 0xdcaa6(%rip), %rax     # 0x109473
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2c9e8
movq %rax, 0x18(%rsi)
leaq 0x926(%rip), %rax       # 0x2d309
movq %rax, 0x20(%rsi)
retq