LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 $0x10, %rsp
movq 0x28(%rdx), %r13
cmpq $0x4, 0x40(%r13)
jl 0x2c681
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%r13), %r15
movq 0x10(%rdx), %rdi
movq %r15, %rsi
callq 0xeed0d
movq %rax, %r12
movl %r12d, %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
movl %r12d, %edx
shrl $0x18, %edx
leaq 0xe95aa(%rip), %rsi     # 0x115b38
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
andl $0xff000000, %r12d      # imm = 0xFF000000
movq 0x40(%r13), %rcx
cmpq $0x1000000, %r12        # imm = 0x1000000
jne 0x2c5bc
movl $0x14, %eax
cmpq $0x60, %rcx
jge 0x2c5cb
jmp 0x2c681
movl $0xc, %eax
cmpq $0x54, %rcx
jl 0x2c681
addq %r15, %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xeed31
leaq 0xe9746(%rip), %rsi     # 0x115d2f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq (%r15), %rax
leaq 0x4(%rax), %rcx
cmpl $0x1000000, %r12d       # imm = 0x1000000
cmovneq %rax, %rcx
addq $0x14, %rcx
movq %rcx, (%r15)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xeeb91
cvtsi2sd %rax, %xmm0
mulsd 0xe8d39(%rip), %xmm0    # 0x115360
leaq 0xe96ef(%rip), %rsi     # 0x115d1d
movq %rbx, %rdi
movb $0x1, %al
callq 0xe8617
movq (%r15), %rsi
addq $0x26, %rsi
movq %rsi, (%r15)
movq 0x10(%r14), %rdi
callq 0xf8078
movsd %xmm0, (%rsp)
movq (%r15), %rsi
addq $0x4, %rsi
movq %rsi, (%r15)
movq 0x10(%r14), %rdi
callq 0xf8078
movapd %xmm0, %xmm1
addq $0x4, (%r15)
leaq 0xe9828(%rip), %rsi     # 0x115e9a
movq %rbx, %rdi
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0xe8617
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rdx, %r12
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
movq 0x28(%rdx), %rbp
movq 0x38(%rbp), %r15
movq %r15, %rsi
callq 0xeed0d
movq %rax, %r13
movl %r13d, %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
movl %r13d, %edx
shrl $0x18, %edx
leaq 0xe946b(%rip), %rsi     # 0x115b38
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
testb $0x1, %r13b
jne 0x2c740
leaq 0x4(%r15), %r13
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
movq 0x10(%r12), %rdi
movq 0x38(%rbp), %rax
movq 0x40(%rbp), %rcx
subq %r15, %rax
leaq (%rax,%rcx), %rdx
addq $-0x4, %rdx
movl $0x2, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r13, %rsi
movq %r14, %r8
movl $0x1, %r9d
callq 0xefc2a
movq %r14, %rdi
callq 0xf70f6
leaq 0xe977e(%rip), %rsi     # 0x115eb1
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x28(%rdx), %rax
cmpq $0xc, 0x40(%rax)
jl 0x2c828
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%rax), %r15
movq 0x10(%rdx), %rdi
movq %r15, %rsi
callq 0xeed0d
movq %rax, %r12
movl %r12d, %ebp
andl $0xffffff, %ebp         # imm = 0xFFFFFF
movl %r12d, %edx
shrl $0x18, %edx
leaq 0xe9398(%rip), %rsi     # 0x115b38
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe8617
addq $0x4, %r15
movq %r15, 0x18(%rsp)
shrq $0x18, %r12
testb %r12b, %r12b
setne %al
cmpl $0x1, %ebp
setne %cl
orb %al, %cl
jne 0x2c828
movq 0x10(%r14), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xeeb91
leaq 0xe96da(%rip), %rsi     # 0x115ebb
xorl %r12d, %r12d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xeeb91
movl %eax, 0xc(%rsp,%r12,4)
incq %r12
cmpq $0x3, %r12
jne 0x2c7f0
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x14(%rsp), %r8d
leaq 0xe96ae(%rip), %rsi     # 0x115ecc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe9698(%rip), %rsi     # 0x115ee0
xorl %edx, %edx
movl $0x1, %ecx
callq 0xefda1
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdi
callq 0xf0d35
movq 0x10(%rbx), %rdi
movq 0x38(%r15), %rsi
movq 0x40(%r15), %rdx
movq %r14, %rcx
callq 0xef481
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xf052b
// File: /workspace/github_c_makefile_star2_O3/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 0x2c92e
cmpl $0x0, 0x10(%rax)
je 0x2c92e
movdqu 0x14(%rax), %xmm0
pcmpeqb 0xe8a9a(%rip), %xmm0    # 0x115350
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x2c92e
cmpq $0x14, 0x40(%r13)
jl 0x2c92e
movq %rdx, %rbx
movq %rdi, %r14
movq 0x38(%r13), %r15
addq $0x10, %r15
movq 0x10(%rdx), %rdi
leaq 0xe7cc8(%rip), %rdx     # 0x1145a9
movl $0x3, %ecx
movq %r15, %rsi
callq 0xefc85
testl %eax, %eax
jne 0x2c92e
movq 0x10(%rbx), %rdi
movq 0x38(%r13), %rsi
addq $0xc, %rsi
callq 0xeed0d
movq %rax, %r12
leaq 0xe95d8(%rip), %rsi     # 0x115ee5
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
leaq (%r12,%r15), %rax
movq 0x40(%r13), %rcx
addq 0x38(%r13), %rcx
cmpq %rcx, %rax
jle 0x2c938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rdi
leaq 0xfea54(%rip), %rcx     # 0x12b397
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xefd48
// File: /workspace/github_c_makefile_star2_O3/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 0x2ca09
cmpl $0x0, 0x10(%rax)
je 0x2ca09
movdqu 0x14(%rax), %xmm0
pcmpeqb 0xe89af(%rip), %xmm0    # 0x115340
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x2ca09
cmpq $0x14, 0x40(%r13)
jl 0x2ca09
movq %rdx, %rbx
movq %rdi, %r14
movq 0x38(%r13), %r15
addq $0x10, %r15
movq 0x10(%rdx), %rdi
leaq 0xe7bed(%rip), %rdx     # 0x1145a9
movl $0x3, %ecx
movq %r15, %rsi
callq 0xefc85
testl %eax, %eax
jne 0x2ca09
movq 0x10(%rbx), %rdi
movq 0x38(%r13), %rsi
addq $0x8, %rsi
callq 0xeed0d
movq %rax, %r12
leaq 0xe94fd(%rip), %rsi     # 0x115ee5
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
leaq (%r12,%r15), %rax
movq 0x40(%r13), %rcx
addq 0x38(%r13), %rcx
cmpq %rcx, %rax
jle 0x2ca13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rdi
leaq 0x106e8e(%rip), %rcx    # 0x1338ac
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xefd48
// File: /workspace/github_c_makefile_star2_O3/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, %rsi
movq %rax, (%rsi)
movq 0x10(%rdx), %rdi
callq 0xeeb91
movq %rax, %r15
leaq 0xe94b0(%rip), %rsi     # 0x115f1d
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
testq %r15, %r15
jle 0x2cb81
movq %rsp, %r13
xorl %r12d, %r12d
movq (%rsp), %rcx
leaq 0x6(%rcx), %rax
movq 0x40(%rbp), %rdx
addq 0x38(%rbp), %rdx
cmpq %rdx, %rax
jg 0x2cb81
movq %r14, %rdi
leaq 0xe9494(%rip), %rsi     # 0x115f40
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb91
movq %r14, %rdi
leaq 0xe9486(%rip), %rsi     # 0x115f5f
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb91
cmpq $0x1, %rax
jg 0x2cb0f
leaq 0xe94aa(%rip), %rcx     # 0x115fa5
testq %rax, %rax
je 0x2cb36
cmpq $0x1, %rax
jne 0x2cb26
leaq 0xe94cd(%rip), %rcx     # 0x115fda
jmp 0x2cb36
cmpq $0x2, %rax
je 0x2cb2f
cmpq $0xffff, %rax           # imm = 0xFFFF
jne 0x2cb26
leaq 0xe94be(%rip), %rcx     # 0x115fe2
jmp 0x2cb36
leaq 0xff624(%rip), %rcx     # 0x12c151
jmp 0x2cb36
leaq 0xe9496(%rip), %rcx     # 0x115fcc
movq %r14, %rdi
leaq 0xe9431(%rip), %rsi     # 0x115f71
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb91
movq %r14, %rdi
leaq 0xe9428(%rip), %rsi     # 0x115f87
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %r12
cmpq %r12, %r15
jne 0x2ca89
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0x2cbbd
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 0xeeb4b
movl %eax, %ebp
movzbl %al, %r15d
leal -0x1(%r15), %eax
cmpb $0x3, %al
ja 0x2cbf0
movzbl %al, %eax
leaq 0xe989d(%rip), %rdx     # 0x116484
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
jmp 0x2cbf7
leaq 0xff55a(%rip), %rcx     # 0x12c151
leaq 0xe942f(%rip), %rsi     # 0x11602d
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe9427(%rip), %rsi     # 0x11604b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe9416(%rip), %rsi     # 0x11605a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpl $0x1, %r15d
jne 0x2cc85
cmpq $0x7, 0x40(%r13)
jl 0x2cbae
movq 0x10(%r14), %rdi
movq %rsp, %rsi
callq 0xeed31
leal -0x10(%rax), %ecx
cmpl $0x2, %ecx
ja 0x2ccc1
movl %ecx, %ecx
leaq 0xe9818(%rip), %rdx     # 0x116494
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmp 0x2ccc8
andb $-0x2, %bpl
cmpb $0x2, %bpl
jne 0x2cbae
movq 0x10(%r14), %rdi
movq 0x38(%r13), %rsi
movq 0x40(%r13), %rdx
addq $0x3, %rsi
addq $-0x3, %rdx
leaq 0xe8eef(%rip), %rcx     # 0x115b9d
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
jmp 0x2cbae
leaq 0xff489(%rip), %rcx     # 0x12c151
leaq 0xe93c0(%rip), %rsi     # 0x11608f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
jmp 0x2cbae
// File: /workspace/github_c_makefile_star2_O3/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 0xeeb67
movq %rax, %r14
leaq 0xe93ac(%rip), %rsi     # 0x1160af
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
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_O3/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 0x2ceb6
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xeed31
movq %rax, %r13
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xe8f88
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeeb91
leaq 0xe9333(%rip), %rsi     # 0x1160cd
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %ebp
cmpb $-0x1, %bpl
je 0x2cdf1
movl %ebp, %ecx
andl $0x7f, %ecx
incl %ecx
testb %bpl, %bpl
leaq 0xe6903(%rip), %rax     # 0x1136cf
leaq 0x1182dd(%rip), %r8     # 0x1450b0
cmovnsq %rax, %r8
leaq 0xe9310(%rip), %rdx     # 0x1160ee
leaq 0x10(%rsp), %rdi
movl $0x50, %esi
xorl %eax, %eax
callq 0xe8193
jmp 0x2ce07
leaq 0xe92ee(%rip), %rsi     # 0x1160e6
leaq 0x10(%rsp), %rdi
movl $0x50, %edx
callq 0xe8219
leaq 0xe92f8(%rip), %rsi     # 0x116106
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xeeb4b
movzbl %al, %edx
cmpb $0x7, %dl
jne 0x2ce3e
leaq 0xe9330(%rip), %rcx     # 0x11616c
jmp 0x2ce60
cmpb $0x0, 0x6(%r15)
leaq 0xff307(%rip), %rcx     # 0x12c151
je 0x2ce60
cmpb $0x9, %al
ja 0x2ce60
movl %edx, %eax
leaq 0xe9647(%rip), %rsi     # 0x1164a0
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0xe92c0(%rip), %rsi     # 0x116127
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe92b5(%rip), %rsi     # 0x116141
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe92b4(%rip), %rsi     # 0x116160
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0xe92ae(%rip), %rsi     # 0x116191
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r14), %rdi
movq 0x38(%r15), %rsi
callq 0xeed0d
cmpl $0xff4fff51, %eax       # imm = 0xFF4FFF51
jne 0x2cf21
movq 0x10(%r14), %rdi
movq 0x38(%r15), %rsi
movq 0x40(%r15), %rdx
leaq 0xe92ad(%rip), %rcx     # 0x1161be
xorl %r8d, %r8d
xorl %r9d, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0xefd48
leaq 0xe928c(%rip), %rsi     # 0x1161b4
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
// File: /workspace/github_c_makefile_star2_O3/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 0x106bb5(%rip), %r14    # 0x133b11
cmovneq %rax, %r14
callq 0xf6410
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 0xefc2a
movq %r15, %rdi
callq 0xf70f6
leaq 0xff18f(%rip), %rsi     # 0x12c12a
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/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 0x2d0c6
movq %rdx, %r15
movq %rdi, %rbx
cmpl $0x72657363, 0xc(%rax)  # imm = 0x72657363
leaq 0x1092e0(%rip), %rax    # 0x1362dd
leaq 0xe91be(%rip), %r14     # 0x1161c2
cmoveq %rax, %r14
movq 0x10(%rdx), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0xeeb91
movq %rax, 0x8(%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xeeb91
movq %rax, %r13
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xeeb91
movq %rax, 0x10(%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xeeb91
movq %rax, (%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xeeb4b
movsbl %al, %ebp
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xeeb4b
movsbl %al, %r15d
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x2d6d9
leaq 0xe913f(%rip), %rsi     # 0x1161ca
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq (%rsp), %rdx
movl %r15d, %ecx
callq 0x2d6d9
leaq 0xe912b(%rip), %rsi     # 0x1161e1
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8617
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0xeeb91
movq %rax, %r15
leaq 0xe8f59(%rip), %rsi     # 0x11633c
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
testq %r15, %r15
jle 0x2d469
movq (%rsp), %rdx
leaq 0x10(%rsp), %r12
leaq 0x20(%rsp), %r13
xorl %ebp, %ebp
leaq 0x10(%rdx), %rax
movq 0x40(%rbx), %rcx
addq 0x38(%rbx), %rcx
cmpq %rcx, %rax
jg 0x2d469
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x10, %ecx
movq %r12, %rsi
callq 0xee8d4
movl $0x32, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xf808d
movq %r14, %rdi
leaq 0xe8f07(%rip), %rsi     # 0x116350
movl %ebp, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0xe8617
movq (%rsp), %rdx
addq $0x10, %rdx
movq %rdx, (%rsp)
incq %rbp
cmpq %rbp, %r15
jne 0x2d405
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0x2d547
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq 0x38(%rax), %r15
movq 0x10(%rdx), %rdi
movq %r15, %rsi
callq 0xeed0d
movl %eax, %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
shrl $0x18, %eax
leaq 0xe863c(%rip), %rsi     # 0x115b38
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x4, %r15
movq %rsp, %r12
movq %r15, (%r12)
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %r15
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xe8f88
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0x6d696630, %esi       # imm = 0x6D696630
jg 0x2d572
cmpl $0x6a70321f, %esi       # imm = 0x6A70321F
jg 0x2d59b
cmpl $0x4d344120, %esi       # imm = 0x4D344120
je 0x2d5db
cmpl $0x68656963, %esi       # imm = 0x68656963
je 0x2d5e0
cmpl $0x69736f6d, %esi       # imm = 0x69736F6D
je 0x2d5db
jmp 0x2d5cd
cmpl $0x6d703430, %esi       # imm = 0x6D703430
jg 0x2d5ba
cmpl $0x6d696631, %esi       # imm = 0x6D696631
je 0x2d5e0
cmpl $0x6d6a3273, %esi       # imm = 0x6D6A3273
je 0x2d592
cmpl $0x6d6a7032, %esi       # imm = 0x6D6A7032
jne 0x2d5cd
movb $0x1, %al
movb %al, 0x4(%rdi)
movb %al, 0x8(%rdi)
retq
cmpl $0x6a703220, %esi       # imm = 0x6A703220
je 0x2d5e5
cmpl $0x6a706d20, %esi       # imm = 0x6A706D20
je 0x2d5ea
cmpl $0x6a707820, %esi       # imm = 0x6A707820
jne 0x2d5cd
movw $0x101, 0x5(%rdi)       # imm = 0x101
retq
leal -0x6d703431(%rsi), %eax
cmpl $0x2, %eax
jb 0x2d5db
cmpl $0x71742020, %esi       # imm = 0x71742020
je 0x2d5db
andl $0xffff0000, %esi       # imm = 0xFFFF0000
cmpl $0x33670000, %esi       # imm = 0x33670000
jne 0x2d5e4
movb $0x1, 0x4(%rdi)
retq
movb $0x1, 0x9(%rdi)
retq
movb $0x1, 0x5(%rdi)
retq
movb $0x1, %al
movb %al, 0x7(%rdi)
movb %al, 0x5(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
testq %r8, %r8
jle 0x2d6ca
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 0x2d6ca
movq %rdi, %r14
movq 0x10(%rsi), %rsi
movq %r8, 0x10(%rsp)
movq %r8, %rdi
callq 0xe9c3b
movq %rax, %rbp
testq %rax, %rax
jle 0x2d6a5
leaq 0xe84fa(%rip), %r13     # 0x115b51
xorl %ebx, %ebx
movq 0x10(%r12), %rdi
cmpq $0x8, %r15
jne 0x2d676
movq 0x8(%rsp), %rsi
callq 0xeee96
addq $0x8, 0x8(%rsp)
jmp 0x2d680
leaq 0x8(%rsp), %rsi
callq 0xeed31
movq %r14, %rdi
movq %r13, %rsi
movq 0x50(%rsp), %rdx
movq %rbx, %rcx
movq 0x58(%rsp), %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xe8617
incq %rbx
cmpq %rbx, %rbp
jne 0x2d659
movq 0x10(%rsp), %rdx
subq %rbp, %rdx
jle 0x2d6ca
movq 0x8(%rsp), %r8
leaq 0xe84a6(%rip), %rsi     # 0x115b61
movq %r14, %rdi
movq 0x50(%rsp), %rcx
xorl %eax, %eax
callq 0xe8617
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/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 0x2d734
cvtsi2sd %r15, %xmm0
cvtsi2sd %r14, %xmm1
divsd %xmm1, %xmm0
testl %ebx, %ebx
jle 0x2d73b
leal 0x1(%rbx), %ecx
movl $0x1, %eax
addq %rax, %rax
leaq (%rax,%rax,4), %rax
decl %ecx
cmpl $0x1, %ecx
ja 0x2d71c
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
jmp 0x2d743
movb $0x0, 0x10(%rsp)
jmp 0x2d76b
movsd 0xe7c25(%rip), %xmm1    # 0x115368
mulsd %xmm1, %xmm0
movsd 0xe7c21(%rip), %xmm1    # 0x115370
mulsd %xmm0, %xmm1
leaq 0xe8a9e(%rip), %rdx     # 0x1161f8
leaq 0x10(%rsp), %rdi
movl $0x64, %esi
movb $0x2, %al
callq 0xe8193
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0xe8a99(%rip), %rdx     # 0x116214
movl $0xa0, %esi
movq %r12, %rdi
movq %r15, %rcx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0xe8193
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xe8d51(%rip), %rax     # 0x1164f8
movq %rax, (%rsi)
leaq 0xe8d52(%rip), %rax     # 0x116503
movq %rax, 0x8(%rsi)
leaq 0x10(%rip), %rax        # 0x2d7cc
movq %rax, 0x18(%rsi)
leaq 0x9d5(%rip), %rax       # 0x2e19c
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_identify_apple2_dsk
static int de_identify_apple2_dsk(deark *c)
{
	int has_sig;

	if(c->infile->len<143358 || c->infile->len>143362) return 0;
	if(!test_VTOC(c, 17*16*256)) return 0;
	has_sig = !dbuf_memcmp(c->infile, 0, (const u8*)"\x01\xa5\x27\xc9\x09\xd0", 6);
	if(has_sig) return 100;
	return 60;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq $-0x23003, %rax         # imm = 0xFFFDCFFD
addq 0x18(%rdi), %rax
xorl %ebx, %ebx
cmpq $-0x5, %rax
jb 0x2e227
movl $0x11027, %esi          # imm = 0x11027
callq 0xeead3
cmpb $0x7a, %al
jne 0x2e227
movq 0x18(%r14), %rdi
movl $0x11034, %esi          # imm = 0x11034
callq 0xeead3
cmpb $0x23, %al
jne 0x2e227
movq 0x18(%r14), %rdi
movl $0x11035, %esi          # imm = 0x11035
callq 0xeead3
cmpb $0x10, %al
jne 0x2e227
movq 0x18(%r14), %rdi
movl $0x11036, %esi          # imm = 0x11036
callq 0xeebc8
cmpl $0x100, %eax            # imm = 0x100
jne 0x2e227
movq 0x18(%r14), %rdi
leaq 0xe85fd(%rip), %rdx     # 0x116809
movl $0x6, %ecx
xorl %esi, %esi
callq 0xefc85
testl %eax, %eax
movl $0x64, %eax
movl $0x3c, %ebx
cmovel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_module_woz
void de_module_woz(deark *c, struct deark_module_info *mi)
{
	mi->id = "woz";
	mi->desc = "WOZ floppy disk image";
	mi->desc2 = "metadata only";
	mi->run_fn = de_run_woz;
	mi->identify_fn = de_identify_woz;
}

// Assembly:
leaq 0xe82e6(%rip), %rax     # 0x11651e
movq %rax, (%rsi)
leaq 0xe82e0(%rip), %rax     # 0x116522
movq %rax, 0x8(%rsi)
leaq 0xe82eb(%rip), %rax     # 0x116538
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x2e268
movq %rax, 0x18(%rsi)
leaq 0xc(%rip), %rax         # 0x2e26f
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_module_moof
void de_module_moof(deark *c, struct deark_module_info *mi)
{
	mi->id = "moof";
	mi->desc = "MOOF floppy disk image";
	mi->desc2 = "metadata only";
	mi->run_fn = de_run_moof;
	mi->identify_fn = de_identify_moof;
}

// Assembly:
leaq 0xe827c(%rip), %rax     # 0x116546
movq %rax, (%rsi)
leaq 0xe8277(%rip), %rax     # 0x11654b
movq %rax, 0x8(%rsi)
leaq 0xe8259(%rip), %rax     # 0x116538
movq %rax, 0x10(%rsi)
leaq 0x10(%rip), %rax        # 0x2e2fa
movq %rax, 0x18(%rsi)
leaq 0xc(%rip), %rax         # 0x2e301
movq %rax, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: claim_sector
static int claim_sector(deark *c, lctx *d, UI tr, UI se)
{
	i64 idx;

	if((i64)tr>d->ntracks || (i64)se>d->sectors_per_track) {
		de_err(c, "Bad sector ID: %u,%u", tr, se);
		return 0;
	}
	idx = (i64)tr * d->sectors_per_track + (i64)se;
	if(d->sector_used_flags[idx]) {
		de_err(c, "Attempt to reuse sector: %u,%u", tr, se);
		return 0;
	}
	d->sector_used_flags[idx] = 1;
	return 1;
}

// Assembly:
pushq %rbx
movl %edx, %r8d
cmpq %r8, 0x8(%rsi)
jl 0x2e33c
movl %ecx, %eax
movq 0x10(%rsi), %r9
cmpq %rax, %r9
jge 0x2e350
leaq 0xe82e0(%rip), %rsi     # 0x116623
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe9295
movl %ebx, %eax
popq %rbx
retq
imulq %r8, %r9
addq 0x28(%rsi), %r9
cmpb $0x0, (%rax,%r9)
je 0x2e368
leaq 0xe82d2(%rip), %rsi     # 0x116638
jmp 0x2e343
movb $0x1, (%r9,%rax)
movl $0x1, %ebx
jmp 0x2e34c
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_run_wozmoof
static void do_run_wozmoof(deark *c, de_module_params *mparams, u8 fmt)
{
	struct wozmoofctx_struct *d = NULL;
	struct de_iffctx *ictx = NULL;
	u32 crc;
	i64 pos = 0;

	// WOZ/MOOF has a 12-byte header, then sequence of chunks that are basically the
	// same format as RIFF.
	d = de_malloc(c, sizeof(struct wozmoofctx_struct));
	d->fmt = fmt;
	ictx = fmtutil_create_iff_decoder(c);

	ictx->userdata = (void*)d;
	ictx->preprocess_chunk_fn = my_preprocess_wozmoof_chunk_fn;
	if(d->fmt==FMT_MOOF) {
		ictx->handle_chunk_fn = my_moof_chunk_handler;
	}
	else {
		ictx->handle_chunk_fn = my_woz_chunk_handler;
	}
	ictx->f = c->infile;
	ictx->is_le = 1;
	ictx->reversed_4cc = 0;

	if(ictx->f->len<12) goto done;
	de_dbg(c, "header at %d", (int)pos);
	de_dbg_indent(c, 1);
	if(d->fmt==FMT_WOZ) {
		pos += 3; // "WOZ" part of signature
		d->wozver = dbuf_getbyte_p(ictx->f, &pos);
		de_dbg(c, "format version: '%c'", de_byte_to_printable_char(d->wozver));
		if(d->wozver<'1' || d->wozver>'2') {
			de_err(c, "Unsupported WOZ format version");
			goto done;
		}
	}
	else {
		pos += 4;
	}
	pos += 4; // rest of signature
	crc = (u32)dbuf_getu32le_p(ictx->f, &pos);
	de_dbg(c, "crc: 0x%08x", (unsigned int)crc);
	de_dbg_indent(c, -1);

	fmtutil_read_iff_format(ictx, pos, ictx->f->len-pos);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
movl $0x2, %esi
callq 0xe8b2b
movq %rax, %r14
movb %bpl, (%rax)
movq %rbx, %rdi
callq 0x1075c0
movq %rax, %r15
movq %r14, 0x10(%rax)
leaq 0x130(%rip), %rax       # 0x2e4e4
movq %rax, 0x28(%r15)
cmpb $0x1, (%r14)
leaq 0x17f(%rip), %rax       # 0x2e542
leaq 0x36b(%rip), %rcx       # 0x2e735
cmoveq %rax, %rcx
movq %rcx, 0x20(%r15)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r15)
movl $0x1, 0x58(%r15)
movb $0x0, 0x5c(%r15)
cmpq $0xc, 0x18(%rax)
jl 0x2e4c4
leaq 0x10b2f5(%rip), %rsi    # 0x1396ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0x8, %eax
cmpb $0x0, (%r14)
jne 0x2e478
leaq 0x8(%rsp), %rsi
movq $0x3, (%rsi)
movq 0x18(%r15), %rdi
callq 0xeeb4b
movb %al, 0x1(%r14)
movzbl %al, %edi
callq 0xec9b9
movsbl %al, %edx
leaq 0xe83c8(%rip), %rsi     # 0x116810
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movb 0x1(%r14), %al
addb $-0x33, %al
cmpb $-0x2, %al
jae 0x2e46f
leaq 0xe83c2(%rip), %rsi     # 0x116825
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x2e4c4
movq 0x8(%rsp), %rax
addq $0x4, %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xeed83
leaq 0x11718a(%rip), %rsi    # 0x14561e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq (%r12), %rsi
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
subq %rsi, %rdx
movq %r15, %rdi
callq 0x1075e4
movq %r15, %rdi
callq 0x1075d3
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: my_preprocess_wozmoof_chunk_fn
static int my_preprocess_wozmoof_chunk_fn(struct de_iffctx *ictx)
{
	const char *name = NULL;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_TMAP: name = "track map"; break;
	case CODE_TRKS: name = "data for tracks"; break;
	case CODE_META: name = "metadata"; break;
	case CODE_WRIT: name = "disk writing instructions"; break;
	}

	if(name) {
		ictx->chunkctx->chunk_name = name;
	}
	return 1;
}

// Assembly:
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x54524b52, %ecx       # imm = 0x54524B52
jg 0x2e50f
cmpl $0x4d455441, %ecx       # imm = 0x4D455441
je 0x2e528
cmpl $0x544d4150, %ecx       # imm = 0x544D4150
jne 0x2e53c
leaq 0xe8337(%rip), %rcx     # 0x116844
jmp 0x2e538
cmpl $0x57524954, %ecx       # imm = 0x57524954
je 0x2e531
cmpl $0x54524b53, %ecx       # imm = 0x54524B53
jne 0x2e53c
leaq 0xe8328(%rip), %rcx     # 0x11684e
jmp 0x2e538
leaq 0xf9409(%rip), %rcx     # 0x127938
jmp 0x2e538
leaq 0xe8326(%rip), %rcx     # 0x11685e
movq %rcx, 0x58(%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: my_moof_chunk_handler
static int my_moof_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_INFO:
		ictx->handled = 1;
		do_moof_INFO(c, ictx, ictx->chunkctx);
		break;
	case CODE_META:
		ictx->handled = 1;
		do_wozmoof_META(c, ictx, ictx->chunkctx);
		break;
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x128(%rdi), %rdx
movl 0x4(%rdx), %eax
cmpl $0x4d455441, %eax       # imm = 0x4D455441
je 0x2e5d9
cmpl $0x494e464f, %eax       # imm = 0x494E464F
jne 0x2e724
movl $0x1, 0x130(%r14)
movq 0x40(%rdx), %rax
movq 0x48(%rdx), %rcx
movq %rax, (%rsp)
cmpq $0x2c, %rcx
jl 0x2e724
movq 0x18(%r14), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe82d2(%rip), %rsi     # 0x116878
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leal -0x1(%rdx), %eax
cmpb $0x2, %al
ja 0x2e5f4
movzbl %al, %eax
leaq 0xe7f1c(%rip), %rsi     # 0x1164ec
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x2e5fb
movl $0x1, 0x130(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e9a8
jmp 0x2e724
leaq 0xfdb56(%rip), %rcx     # 0x12c151
leaq 0xe828d(%rip), %rsi     # 0x11688f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe827d(%rip), %rsi     # 0x1168a2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe8271(%rip), %rsi     # 0x1168b6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe8262(%rip), %rsi     # 0x1168c7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
movq 0x18(%r14), %rdi
movq (%r15), %rsi
movl $0x20, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xefbd7
movq %r12, %rdi
callq 0xf64a0
movq %r12, %rdi
callq 0xf705c
leaq 0xe8230(%rip), %rsi     # 0x1168de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x21, (%r15)
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeebeb
leaq 0xe821a(%rip), %rsi     # 0x1168ec
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeebeb
leaq 0xe8214(%rip), %rsi     # 0x116905
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeebeb
leaq 0xe8204(%rip), %rsi     # 0x116914
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
callq 0xf6753
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_wozmoof_META
static void do_wozmoof_META(deark *c, struct de_iffctx *ictx,
	const struct de_iffchunkctx *chunkctx)
{
	i64 k;
	int reading_val;
	de_ucstring *s = NULL;
	de_ucstring *name = NULL;
	de_ucstring *val = NULL;

	// Read the entire metadata string.
	s = ucstring_create(c);
	dbuf_read_to_ucstring_n(ictx->f, chunkctx->dpos, chunkctx->dlen,
		65536, s, 0, DE_ENCODING_UTF8);

	// Parse out the individual metadata items
	name = ucstring_create(c);
	val = ucstring_create(c);
	reading_val = 0;

	for(k=0; k<s->len; k++) {
		i32 ch = s->str[k];

		if(ch==0x0a) { // End of item
			do_wozmoof_print_metadata_item(c, name, val);
			ucstring_empty(name);
			ucstring_empty(val);
			reading_val = 0;
		}
		else if(ch==0x09 && !reading_val) { // Name/value separator
			reading_val = 1;
		}
		else { // A non-special character
			if(reading_val) {
				ucstring_append_char(val, ch);
			}
			else {
				ucstring_append_char(name, ch);
			}
		}
	}
	do_wozmoof_print_metadata_item(c, name, val);

	ucstring_destroy(s);
	ucstring_destroy(name);
	ucstring_destroy(val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0xf6410
movq %rax, %rbx
movq 0x18(%r12), %rdi
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movl $0x2, (%rsp)
xorl %ebp, %ebp
movl $0x10000, %ecx          # imm = 0x10000
movq %rax, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r14, %rdi
callq 0xf6410
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0xf6410
movq %rax, %r12
cmpq $0x0, 0x10(%rbx)
jle 0x2ea77
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movl (%rax,%r13,4), %esi
cmpl $0xa, %esi
jne 0x2ea44
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2eaad
movq %r15, %rdi
callq 0xf6423
movq %r12, %rdi
callq 0xf6423
xorl %r14d, %r14d
jmp 0x2ea5f
movl $0x1, %r14d
testl %ebp, %ebp
jne 0x2ea53
cmpl $0x9, %esi
je 0x2ea5f
testl %ebp, %ebp
je 0x2ea6d
movq %r12, %rdi
callq 0xf6542
incq %r13
movl %r14d, %ebp
cmpq 0x10(%rbx), %r13
jl 0x2ea12
jmp 0x2ea77
movq %r15, %rdi
callq 0xf6542
jmp 0x2ea3f
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2eaad
movq %rbx, %rdi
callq 0xf6753
movq %r15, %rdi
callq 0xf6753
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf6753
// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_wozmoof_print_metadata_item
static void do_wozmoof_print_metadata_item(deark *c, de_ucstring *name, de_ucstring *val)
{
	if(name->len==0 && val->len==0) return;
	de_dbg(c, "item: \"%s\" = \"%s\"",
		ucstring_getpsz_d(name),
		ucstring_getpsz_d(val));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
jne 0x2eac6
cmpq $0x0, 0x10(%r14)
je 0x2eaf5
movq %rsi, %rdi
callq 0xf70f6
movq %rax, %r15
movq %r14, %rdi
callq 0xf70f6
leaq 0xe7e83(%rip), %rsi     # 0x116963
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xe8617
popq %rbx
popq %r14
popq %r15
retq
nop