LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: get_ilst_type_name
static const char *get_ilst_type_name(unsigned int ns, unsigned int wkt)
{
	const char *name = NULL;

	if(ns!=0) goto done;

	switch(wkt) {
	case 0: name="binary"; break;
	case 1: name="UTF-8"; break;
	case 2: name="UTF-16"; break;
	case 3: name="S/JIS"; break;
	case 4: name="UTF-8 sort key"; break;
	case 5: name="UTF-16 sort key"; break;
	case 13: name="JPEG"; break;
	case 14: name="PNG"; break;
	case 21: name="signed int"; break;
	case 22: name="unsigned int"; break;
	case 23: name="float32"; break;
	case 24: name="float64"; break;
	case 27: name="BMP"; break;
	case 28: name="metadata atom"; break;
	}
done:
	if(!name) name="?";
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x36c7d
jmp 0x36d64
movl -0x8(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x1c, %rax
ja 0x36d62
movq -0x18(%rbp), %rax
leaq 0x16a447(%rip), %rcx    # 0x1a10e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x19534f(%rip), %rax    # 0x1cbff8
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x178f30(%rip), %rax    # 0x1afbe9
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5f6(%rip), %rax    # 0x1a12bf
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5ed(%rip), %rax    # 0x1a12c6
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5e3(%rip), %rax    # 0x1a12cc
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5e5(%rip), %rax    # 0x1a12db
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x167934(%rip), %rax    # 0x19e637
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x18c25d(%rip), %rax    # 0x1c2f6d
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5d0(%rip), %rax    # 0x1a12ed
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5c1(%rip), %rax    # 0x1a12eb
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5c1(%rip), %rax    # 0x1a12f8
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5bc(%rip), %rax    # 0x1a1300
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x178339(%rip), %rax    # 0x1af08a
movq %rax, -0x10(%rbp)
jmp 0x36d62
leaq 0x16a5aa(%rip), %rax    # 0x1a1308
movq %rax, -0x10(%rbp)
jmp 0x36d64
cmpq $0x0, -0x10(%rbp)
jne 0x36d76
leaq 0x180ebb(%rip), %rax    # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq $0x4, 0x40(%rax)
jge 0x36db0
jmp 0x36f13
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rsi
leaq -0x60(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
addq $0x10, %rdx
leaq 0x16ab2e(%rip), %rsi    # 0x1a191b
movb $0x0, %al
callq 0x15b0d0
movq -0x68(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x36e11
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
callq 0x39d90
movq -0x68(%rbp), %rax
cmpq $0x8, 0x40(%rax)
jge 0x36e21
jmp 0x36f13
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x4, %rsi
callq 0x165470
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0x16aade(%rip), %rsi    # 0x1a192d
movb $0x0, %al
callq 0x15b0d0
movq -0x68(%rbp), %rax
cmpq $0xc, 0x40(%rax)
jge 0x36e66
jmp 0x36f13
movq -0x68(%rbp), %rax
movq 0x40(%rax), %rax
subq $0x8, %rax
movl $0x4, %ecx
cqto
idivq %rcx
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x36f11
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x68(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x8, %rsi
movq -0x20(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
leaq -0x60(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
cmpl $0x0, -0x5c(%rbp)
jne 0x36eca
jmp 0x36f00
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
addq $0x10, %rdx
leaq 0x16aa62(%rip), %rsi    # 0x1a193f
movb $0x0, %al
callq 0x15b0d0
movq -0x68(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x36efe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x5c(%rbp), %edx
callq 0x39d90
jmp 0x36f00
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x36e88
jmp 0x36f13
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x36f4c
jmp 0x36f8c
movq -0x28(%rbp), %rax
cmpq $0x4, 0x40(%rax)
jge 0x36f59
jmp 0x36f8c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x165470
movl %eax, -0x1c(%rbp)
cmpl $0xd0a870a, -0x1c(%rbp) # imm = 0xD0A870A
jne 0x36f8c
movq -0x8(%rbp), %rdi
leaq 0x16a9d1(%rip), %rsi    # 0x1a1956
movb $0x0, %al
callq 0x15b0d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x37006
cmpl $0x0, -0x20(%rbp)
je 0x3700b
jmp 0x37090
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl 0xc(%rax), %edx
movl $0x4, %eax
movl $0x8, %ecx
cmpl $0x636f3634, %edx       # imm = 0x636F3634
cmovel %ecx, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x16a91b(%rip), %rsi    # 0x1a1970
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
leaq 0x1997b8(%rip), %r10    # 0x1d0833
leaq 0x16a2cf(%rip), %rax    # 0x1a1351
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x39f50
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x4, 0x40(%rax)
jge 0x370dc
jmp 0x3716a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
addq $0x10, %rdx
leaq 0x16a8c7(%rip), %rsi    # 0x1a19d3
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
cmpl $0x72494343, -0x54(%rbp) # imm = 0x72494343
je 0x37131
cmpl $0x70726f66, -0x54(%rbp) # imm = 0x70726F66
jne 0x37168
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x20(%rbp), %rax
addq 0x40(%rax), %rdx
subq -0x28(%rbp), %rdx
leaq 0x16a88d(%rip), %rcx    # 0x1a19e5
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
jmp 0x3716a
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x21(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x39eb0
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x16a7fb(%rip), %rsi    # 0x1a19e9
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
movl $0x1, 0x60(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
subq 0x38(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x70(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x4, 0x40(%rax)
jge 0x37274
jmp 0x373a3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
movq %r8, %rcx
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x18, 0x40(%rax)
jge 0x372af
jmp 0x373a3
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
addq $0x10, %rdx
leaq 0x16a712(%rip), %rsi    # 0x1a19fd
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x19, 0x40(%rax)
jge 0x3731a
jmp 0x373a3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x165060
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x37335
jmp 0x373a3
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x28(%rbp), %rax
addq 0x40(%rax), %rdx
subq -0x30(%rbp), %rdx
movq -0x20(%rbp), %r8
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x1, %r9d
movl $0x2, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172650
movq -0x68(%rbp), %rdi
movq %rax, %rdx
leaq 0x16a674(%rip), %rsi    # 0x1a1a10
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x21(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x39eb0
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jne 0x37438
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165210
movq %rax, -0x20(%rbp)
jmp 0x3744d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x180b8a(%rip), %rsi    # 0x1b7fe8
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
movl $0x1, 0x60(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
subq 0x38(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x70(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x2, %eax
je 0x3798e
movzbl -0x19(%rbp), %eax
cmpl $0x3, %eax
jne 0x37a63
movzbl -0x19(%rbp), %eax
cmpl $0x2, %eax
jne 0x379ad
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movl %eax, -0x3c(%rbp)
jmp 0x379c1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %edx
leaq 0x16a0ad(%rip), %rsi    # 0x1a1a7c
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x16a0ef(%rip), %rsi    # 0x1a1aeb
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
leaq -0x6c(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x6c(%rbp), %rdx
addq $0x10, %rdx
leaq 0x16a0c0(%rip), %rsi    # 0x1a1aff
movb $0x0, %al
callq 0x15b0d0
cmpl $0x45786966, -0x68(%rbp) # imm = 0x45786966
jne 0x37a61
movq -0x10(%rbp), %rax
movb $0x1, 0x18(%rax)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x37a63
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x4, 0x40(%rax)
jge 0x37b00
jmp 0x37c38
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0x37b52
movq -0x48(%rbp), %rax
cmpq $0x24, 0x40(%rax)
jge 0x37b50
jmp 0x37c38
jmp 0x37b64
movq -0x48(%rbp), %rax
cmpq $0x18, 0x40(%rax)
jge 0x37b62
jmp 0x37c38
jmp 0x37b64
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0x37b7b
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
jmp 0x37b87
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x169f62(%rip), %rsi    # 0x1a1b0f
movb $0x0, %al
callq 0x15b0d0
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jne 0x37be0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165730
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x37bf5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x38(%rbp)
jle 0x37c13
cvtsi2sdq -0x30(%rbp), %xmm0
cvtsi2sdq -0x38(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x37c1b
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
movsd -0x40(%rbp), %xmm0
leaq 0x169f02(%rip), %rsi    # 0x1a1b33
movb $0x1, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x8, 0x40(%rax)
jl 0x37c90
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x38(%rax), %rsi
addq $0x4, %rsi
callq 0x165470
movl %eax, -0x1c(%rbp)
cmpl $0x68646c72, -0x1c(%rbp) # imm = 0x68646C72
jne 0x37c8e
jmp 0x37ca1
jmp 0x37c90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x37a70
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x8, 0x40(%rax)
jge 0x37f29
jmp 0x37f8e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x37f63
cmpl $0x0, -0x20(%rbp)
je 0x37f65
jmp 0x37f8e
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x165210
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x169bfd(%rip), %rsi    # 0x1a1b84
movb $0x0, %al
callq 0x15b0d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq $0x8, 0x40(%rax)
jge 0x38170
jmp 0x382a8
movq -0x70(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
je 0x381b5
jmp 0x382a8
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x169a1e(%rip), %rsi    # 0x1a1bf9
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq -0x70(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x70(%rbp), %rdx
addq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jl 0x38204
jmp 0x382a8
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165470
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
leaq 0x1699f2(%rip), %rsi    # 0x1a1c22
movb $0x0, %al
callq 0x15b0d0
cmpq $0x10, -0x38(%rbp)
jge 0x38240
jmp 0x382a8
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
leaq -0x68(%rbp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x169860
movq -0x8(%rbp), %rdi
leaq -0x68(%rbp), %rdx
addq $0x10, %rdx
leaq 0x1699c7(%rip), %rsi    # 0x1a1c49
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x381e2
addq $0x70, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x38316
cmpl $0x0, -0x20(%rbp)
je 0x38318
jmp 0x3837b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x169632(%rip), %rsi    # 0x1a1970
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x4, %r9d
leaq 0x1984cd(%rip), %r10    # 0x1d0833
leaq 0x1698ee(%rip), %rax    # 0x1a1c5b
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x39f50
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x383f6
cmpl $0x0, -0x20(%rbp)
je 0x383fb
jmp 0x38494
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x169848(%rip), %rsi    # 0x1a1c69
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq 0x16982b(%rip), %rsi    # 0x1a1c79
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x38(%rbp)
je 0x3845e
jmp 0x38494
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r8
movl $0x4, %r9d
leaq 0x1691a0(%rip), %r10    # 0x1a161f
leaq 0x169804(%rip), %rax    # 0x1a1c8a
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x39f50
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x38506
cmpl $0x0, -0x20(%rbp)
je 0x3850b
jmp 0x38617
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq 0x16943f(%rip), %rsi    # 0x1a1970
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x28(%rbp), %rcx
addq 0x40(%rcx), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq -0x38(%rbp), %rax
jge 0x38569
jmp 0x38617
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x15ccf0
movq %rax, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x385ed
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rax
movl %eax, %edx
movq -0x58(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %eax, %r8d
leaq 0x1696bd(%rip), %rsi    # 0x1a1c95
movb $0x0, %al
callq 0x15b0d0
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x38586
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x38617
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
leaq 0x1695bd(%rip), %rsi    # 0x1a1bcd
movb $0x0, %al
callq 0x15b0d0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq -0x34(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38a43
jmp 0x38ab1
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x28(%rbp), %rax
addq 0x40(%rax), %rdx
subq -0x30(%rbp), %rdx
movq -0x20(%rbp), %r8
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x1, %r9d
movl $0x2, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172650
movq -0x40(%rbp), %rdi
movq %rax, %rdx
leaq 0x16924f(%rip), %rsi    # 0x1a1cf9
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x171750
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq $0xc, 0x40(%rax)
jge 0x38afc
jmp 0x38bb5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x19(%rbp), %rcx
leaq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x39eb0
movq -0x48(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x38b36
cmpl $0x1, -0x20(%rbp)
je 0x38b38
jmp 0x38bb5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x165210
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %edx
leaq 0x1691a9(%rip), %rsi    # 0x1a1d03
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x28(%rbp)
cmpq $0x3, -0x28(%rbp)
jae 0x38b99
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x165210
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x34(%rbp,%rax,4)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x38b69
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
leaq 0x169166(%rip), %rsi    # 0x1a1d14
movb $0x0, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x169135(%rip), %rsi    # 0x1a1d28
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x166c60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x1685f0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x28(%rbp), %rcx
callq 0x166070
movq -0x28(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x38c7f
jmp 0x38d87
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x38c91
jmp 0x38d87
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq $0x14, %rax
movq 0x1ec7dd(%rip), %rcx    # 0x225480
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x38cc6
jmp 0x38d87
movq -0x20(%rbp), %rax
cmpq $0x14, 0x40(%rax)
jge 0x38cd6
jmp 0x38d87
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x167695(%rip), %rdx    # 0x1a038e
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x38d0a
jmp 0x38d87
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0xc, %rsi
callq 0x165470
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x168ff3(%rip), %rsi    # 0x1a1d2d
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x20(%rbp), %rdx
addq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jle 0x38d60
jmp 0x38d87
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq 0x17e045(%rip), %rcx    # 0x1b6dbc
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x38dbf
jmp 0x38ec7
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x38dd1
jmp 0x38ec7
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq $0x14, %rax
movq 0x1ec6a5(%rip), %rcx    # 0x225488
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x38e06
jmp 0x38ec7
movq -0x20(%rbp), %rax
cmpq $0x14, 0x40(%rax)
jge 0x38e16
jmp 0x38ec7
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x167555(%rip), %rdx    # 0x1a038e
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x38e4a
jmp 0x38ec7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x8, %rsi
callq 0x165470
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x168eb3(%rip), %rsi    # 0x1a1d2d
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x20(%rbp), %rdx
addq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jle 0x38ea0
jmp 0x38ec7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq 0x18643c(%rip), %rcx    # 0x1bf2f3
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x168e43(%rip), %rsi    # 0x1a1d65
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x39049
movq -0x30(%rbp), %rax
addq $0x6, %rax
movq -0x28(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x28(%rbp), %rdx
addq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jle 0x38f61
jmp 0x39049
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
leaq 0x168e12(%rip), %rsi    # 0x1a1d88
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq 0x168df6(%rip), %rsi    # 0x1a1da7
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rdi
callq 0x3a190
movq -0x60(%rbp), %rdi
movl -0x54(%rbp), %edx
movq %rax, %rcx
leaq 0x168dc3(%rip), %rsi    # 0x1a1db9
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x165210
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rax
movl %eax, %edx
leaq 0x168dac(%rip), %rsi    # 0x1a1dcf
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x38f31
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x168c3d(%rip), %rsi    # 0x1a1ef7
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
movl $0x1, 0x60(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
movq $0x2, 0x70(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)