LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %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
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movl %eax, %ecx
leaq 0x168aaa(%rip), %rsi    # 0x1a1fd9
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x165470
cmpl $0xff4fff51, %eax       # imm = 0xFF4FFF51
je 0x39566
movq -0x8(%rbp), %rdi
leaq 0x168a9f(%rip), %rsi    # 0x1a1ffc
movb $0x0, %al
callq 0x15b0d0
jmp 0x39592
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdx
leaq 0x168a81(%rip), %rcx    # 0x1a2006
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x166be0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %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, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x395e1
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x395ee
leaq 0x185f70(%rip), %rax    # 0x1bf558
movq %rax, -0x38(%rbp)
jmp 0x395ee
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x28(%rbp)
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), %r8
movl $0x1f4, %ecx            # imm = 0x1F4
xorl %r9d, %r9d
movl $0x2, (%rsp)
callq 0x166a40
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x172650
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq %rax, %rcx
leaq 0x17e5a8(%rip), %rsi    # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rdi
callq 0x171750
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_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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
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
movq 0x38(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x72657363, 0xc(%rax)  # imm = 0x72657363
jne 0x396c9
leaq 0x18851c(%rip), %rax    # 0x1c1bdf
movq %rax, -0x50(%rbp)
jmp 0x396d4
leaq 0x16893a(%rip), %rax    # 0x1a200a
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq $0xa, 0x40(%rax)
jge 0x396e4
jmp 0x397da
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165210
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165210
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165210
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165210
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165170
movsbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x165170
movsbl %al, %eax
movl %eax, -0x40(%rbp)
leaq -0x100(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x3c(%rbp), %r8d
movl $0xa0, %esi
callq 0x3a320
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq -0x100(%rbp), %rcx
leaq 0x168879(%rip), %rsi    # 0x1a2012
movb $0x0, %al
callq 0x15b0d0
leaq -0x100(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x40(%rbp), %r8d
movl $0xa0, %esi
callq 0x3a320
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq -0x100(%rbp), %rcx
leaq 0x168856(%rip), %rsi    # 0x1a2029
movb $0x0, %al
callq 0x15b0d0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %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 -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165210
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x1685df(%rip), %rsi    # 0x1a2184
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x39c50
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq -0x20(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x20(%rbp), %rdx
addq 0x40(%rdx), %rcx
cmpq %rcx, %rax
jle 0x39be1
jmp 0x39c50
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x10, %ecx
callq 0x164d10
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x90(%rbp), %rdx
movl $0x32, %ecx
callq 0x173ee0
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
leaq -0x90(%rbp), %rcx
leaq 0x16856c(%rip), %rsi    # 0x1a2198
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x39bb4
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
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, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0xc, 0x40(%rax)
jge 0x39d19
jmp 0x39d7f
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 -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x15bba0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x4d344120, %eax       # imm = 0x4D344120
je 0x39e75
jmp 0x39db2
movl -0x18(%rbp), %eax
subl $0x68656963, %eax       # imm = 0x68656963
je 0x39e7f
jmp 0x39dc2
movl -0x18(%rbp), %eax
subl $0x69736f6d, %eax       # imm = 0x69736F6D
je 0x39e75
jmp 0x39dd2
movl -0x18(%rbp), %eax
subl $0x6a703220, %eax       # imm = 0x6A703220
je 0x39e35
jmp 0x39dde
movl -0x18(%rbp), %eax
subl $0x6a706d20, %eax       # imm = 0x6A706D20
je 0x39e51
jmp 0x39dea
movl -0x18(%rbp), %eax
subl $0x6a707820, %eax       # imm = 0x6A707820
je 0x39e3f
jmp 0x39df6
movl -0x18(%rbp), %eax
subl $0x6d696631, %eax       # imm = 0x6D696631
je 0x39e7f
jmp 0x39e02
movl -0x18(%rbp), %eax
subl $0x6d6a3273, %eax       # imm = 0x6D6A3273
je 0x39e63
jmp 0x39e0e
movl -0x18(%rbp), %eax
subl $0x6d6a7032, %eax       # imm = 0x6D6A7032
je 0x39e63
jmp 0x39e1a
movl -0x18(%rbp), %eax
addl $0x928fcbcf, %eax       # imm = 0x928FCBCF
subl $0x2, %eax
jb 0x39e75
jmp 0x39e29
movl -0x18(%rbp), %eax
subl $0x71742020, %eax       # imm = 0x71742020
je 0x39e75
jmp 0x39e89
movq -0x10(%rbp), %rax
movb $0x1, 0x5(%rax)
jmp 0x39ea0
movq -0x10(%rbp), %rax
movb $0x1, 0x6(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x5(%rax)
jmp 0x39ea0
movq -0x10(%rbp), %rax
movb $0x1, 0x7(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x5(%rax)
jmp 0x39ea0
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0x39ea0
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x39ea0
movq -0x10(%rbp), %rax
movb $0x1, 0x9(%rax)
jmp 0x39ea0
movl -0x14(%rbp), %eax
shrl $0x10, %eax
cmpl $0x3367, %eax           # imm = 0x3367
jne 0x39e9e
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x39ea0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: do_read_version_and_flags
static void do_read_version_and_flags(deark *c, lctx *d, struct de_boxesctx *bctx,
	u8 *version, u32 *flags, int dbgflag)
{
	u8 version1;
	u32 flags1;
	u32 n;
	struct de_boxdata *curbox = bctx->curbox;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x165470
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
shrl $0x18, %eax
movb %al, -0x2d(%rbp)
movl -0x38(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x39f27
movq -0x8(%rbp), %rdi
movzbl -0x2d(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq 0x167a60(%rip), %rsi    # 0x1a1980
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x20(%rbp)
je 0x39f37
movb -0x2d(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x39f47
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x28(%rbp)
jg 0x39f98
jmp 0x3a089
movq -0x50(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x50(%rbp), %rcx
addq 0x40(%rcx), %rax
subq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jge 0x39fc7
jmp 0x3a089
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x15ccf0
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x3a05d
cmpq $0x8, -0x30(%rbp)
jne 0x3a018
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x58(%rbp), %rsi
callq 0x165730
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
jmp 0x3a02d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq 0x10(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq 0x18(%rbp), %r8
movq -0x60(%rbp), %r9
leaq 0x167951(%rip), %rsi    # 0x1a1999
movb $0x0, %al
callq 0x15b0d0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x39fe4
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x3a089
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
subq -0x40(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq -0x58(%rbp), %r8
leaq 0x167927(%rip), %rsi    # 0x1a19a9
movb $0x0, %al
callq 0x15b0d0
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: extract_exif_item
static void extract_exif_item(deark *c, lctx *d, dbuf *f)
{
	i64 dpos, dlen;
	u8 b0,b1;

	if(!d->exif_item_id_known) return;
	if(d->exif_item_offs<=0) return;
	if(d->exif_item_len<24) return;
	// I'm just guessing the format of this item. It seems to start with 10
	// bytes of header info.
	dpos = d->exif_item_offs+10;
	dlen = d->exif_item_len-10;
	b0 = dbuf_getbyte(f, dpos);
	b1 = dbuf_getbyte(f, dpos+1);
	if(!((b0=='M' && b1=='M') || (b0=='I' && b1=='I'))) {
		return;
	}
	de_dbg(c, "Exif item segment at %"I64_FMT", size=%"I64_FMT, dpos, dlen);
	de_dbg_indent(c, 1);
	fmtutil_handle_exif(c, dpos, dlen);
	de_dbg_indent(c, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x18(%rax)
jne 0x3a0b3
jmp 0x3a184
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jg 0x3a0c3
jmp 0x3a184
movq -0x10(%rbp), %rax
cmpq $0x18, 0x28(%rax)
jge 0x3a0d3
jmp 0x3a184
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0xa, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
subq $0xa, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x165060
movb %al, -0x2a(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0x4d, %eax
jne 0x3a129
movzbl -0x2a(%rbp), %eax
cmpl $0x4d, %eax
je 0x3a13d
movzbl -0x29(%rbp), %eax
cmpl $0x49, %eax
jne 0x3a13b
movzbl -0x2a(%rbp), %eax
cmpl $0x49, %eax
je 0x3a13d
jmp 0x3a184
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x167978(%rip), %rsi    # 0x1a1ac8
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1736c0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: get_channel_type_name
static const char *get_channel_type_name(i64 t)
{
	const char *name;
	switch(t) {
	case 0: name = "colour image data for associated color"; break;
	case 1: name = "opacity"; break;
	case 2: name = "premultiplied opacity"; break;
	case 65535: name = "not specified"; break;
	default: name = "?";
	}
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testq %rax, %rax
je 0x3a1cd
jmp 0x3a1a7
movq -0x18(%rbp), %rax
subq $0x1, %rax
je 0x3a1da
jmp 0x3a1b3
movq -0x18(%rbp), %rax
subq $0x2, %rax
je 0x3a1e7
jmp 0x3a1bf
movq -0x18(%rbp), %rax
subq $0xffff, %rax           # imm = 0xFFFF
je 0x3a1f4
jmp 0x3a201
leaq 0x167c19(%rip), %rax    # 0x1a1ded
movq %rax, -0x10(%rbp)
jmp 0x3a20c
leaq 0x167c41(%rip), %rax    # 0x1a1e22
movq %rax, -0x10(%rbp)
jmp 0x3a20c
leaq 0x167c26(%rip), %rax    # 0x1a1e14
movq %rax, -0x10(%rbp)
jmp 0x3a20c
leaq 0x167c2f(%rip), %rax    # 0x1a1e2a
movq %rax, -0x10(%rbp)
jmp 0x3a20c
leaq 0x17da25(%rip), %rax    # 0x1b7c2d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: get_jpeg2000_cmpr_name
static const char *get_jpeg2000_cmpr_name(deark *c, lctx *d, u8 ct)
{
	const char *name = NULL;

	if(ct==7) { name="JPEG 2000"; goto done; }
	if(d->is_jpx) {
		switch(ct) {
		case 0: name="uncompressed"; break;
		case 1: name="MH"; break;
		case 2: name="MR"; break;
		case 3: name="MMR"; break;
		case 4: name="JBIG bi-level"; break;
		case 5: name="JPEG"; break;
		case 6: name="JPEG-LS"; break;
		case 8: name="JBIG2"; break;
		case 9: name="JBIG"; break;
		}
	}
	// TODO: JPM
done:
	if(!name) name="?";
	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x3a252
leaq 0x167d6b(%rip), %rax    # 0x1a1fb4
movq %rax, -0x20(%rbp)
jmp 0x3a2fd
movq -0x10(%rbp), %rax
cmpb $0x0, 0x6(%rax)
je 0x3a2fb
movzbl -0x11(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x9, %rax
ja 0x3a2f9
movq -0x28(%rbp), %rax
leaq 0x166ee7(%rip), %rcx    # 0x1a1164
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x19bbab(%rip), %rax    # 0x1d5e38
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x167d24(%rip), %rax    # 0x1a1fbe
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x167d1b(%rip), %rax    # 0x1a1fc2
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x167d0d(%rip), %rax    # 0x1a1fc1
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x167d04(%rip), %rax    # 0x1a1fc5
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x164369(%rip), %rax    # 0x19e637
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x17cee9(%rip), %rax    # 0x1b71c4
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x167ceb(%rip), %rax    # 0x1a1fd3
movq %rax, -0x20(%rbp)
jmp 0x3a2f9
leaq 0x190841(%rip), %rax    # 0x1cab36
movq %rax, -0x20(%rbp)
jmp 0x3a2fb
jmp 0x3a2fd
cmpq $0x0, -0x20(%rbp)
jne 0x3a30f
leaq 0x17d922(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3a3d5
cmpl $-0xc, -0x24(%rbp)
jl 0x3a3d5
cmpl $0xc, -0x24(%rbp)
jg 0x3a3d5
cvtsi2sdq -0x18(%rbp), %xmm0
cvtsi2sdq -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movl -0x24(%rbp), %edi
callq 0x3a420
movaps %xmm0, %xmm1
movsd -0xa8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd 0x166e17(%rip), %xmm0   # 0x1a11b0
mulsd -0x98(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
leaq -0x90(%rbp), %rdi
movsd -0x98(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
movl $0x64, %esi
leaq 0x167c74(%rip), %rdx    # 0x1a2040
movb $0x2, %al
callq 0x15a980
jmp 0x3a3dc
movb $0x0, -0x90(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
leaq -0x90(%rbp), %rax
leaq 0x167c5e(%rip), %rdx    # 0x1a205c
movq %rax, (%rsp)
movb $0x0, %al
callq 0x15a980
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: limited_pow10
static double limited_pow10(int e)
{
	if(e < -POW10_MAX_E || e > POW10_MAX_E) return 0.0;
	if(e < 0) {
		return 1.0 / (double)limited_ipow10(e);
	}
	return (double)limited_ipow10(e);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0xc(%rbp)
cmpl $-0xc, -0xc(%rbp)
jl 0x3a437
cmpl $0xc, -0xc(%rbp)
jle 0x3a441
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3a479
cmpl $0x0, -0xc(%rbp)
jge 0x3a467
movl -0xc(%rbp), %edi
callq 0x3a490
cvtsi2sd %rax, %xmm1
movsd 0x166d5c(%rip), %xmm0   # 0x1a11b8
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3a479
movl -0xc(%rbp), %edi
callq 0x3a490
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: limited_ipow10
static i64 limited_ipow10(int e)
{
	i64 n = 1;

	if(e < 0 || e > POW10_MAX_E) return 1;
	while(e>0) {
		n *= 10;
		e--;
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq $0x1, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x3a4ab
cmpl $0xc, -0xc(%rbp)
jle 0x3a4b5
movq $0x1, -0x8(%rbp)
jmp 0x3a4d9
jmp 0x3a4b7
cmpl $0x0, -0xc(%rbp)
jle 0x3a4d1
imulq $0xa, -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3a4b7
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: get_rreq_sf_name
static const char *get_rreq_sf_name(UI n)
{
	static const u8 ids[11] = {1, 2, 5, 8, 12, 18, 19, 20, 31, 45, 46};
	static const char *names[11] = { "no extensions", "has layers",
		"cmpr=JPEG 2000/15444-1", "no opacity", "contiguous",
		"layers not req'd", "discrete layers", "1 codestream per layer",
		"scaling not req'd", "sRGB", "sRGB-gray" };
	size_t i;

	for(i=0; i<DE_ARRAYCOUNT(ids); i++) {
		if((UI)ids[i]==n) return names[i];
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0xb, -0x18(%rbp)
jae 0x3a52f
movq -0x18(%rbp), %rcx
leaq 0x166c8b(%rip), %rax    # 0x1a118c
movzbl (%rax,%rcx), %eax
cmpl -0xc(%rbp), %eax
jne 0x3a51f
movq -0x18(%rbp), %rcx
leaq 0x1eaf7b(%rip), %rax    # 0x225490
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x3a53a
jmp 0x3a521
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3a4ef
leaq 0x17d6f7(%rip), %rax    # 0x1b7c2d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x167dbd(%rip), %rcx    # 0x1a2314
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x167dba(%rip), %rcx    # 0x1a231f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x3a590
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0xdd(%rip), %rcx        # 0x3a660
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_run_apple2_dsk
static void de_run_apple2_dsk(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->secsize = 256;
	d->ntracks = 35;
	d->sectors_per_track = 16;
	d->sector_list_sector_capacity = 122;

	do_read_VTOC(c, d, 17, 0);
	d->sector_used_flags = de_malloc(c, d->ntracks * d->sectors_per_track);
	do_read_catalog(c, d);

	if(d) {
		de_free(c, d->sector_used_flags);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x30, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x100, (%rax)          # imm = 0x100
movq -0x18(%rbp), %rax
movq $0x23, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x10, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x7a, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x11, %edx
xorl %ecx, %ecx
callq 0x3a900
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
imulq 0x10(%rax), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ab20
cmpq $0x0, -0x18(%rbp)
je 0x3a653
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x22ffe, 0x18(%rax)    # imm = 0x22FFE
jl 0x3a690
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x23002, 0x18(%rax)    # imm = 0x23002
jle 0x3a699
movl $0x0, -0x4(%rbp)
jmp 0x3a6f8
movq -0x10(%rbp), %rdi
movl $0x11000, %esi          # imm = 0x11000
callq 0x3b860
cmpl $0x0, %eax
jne 0x3a6b5
movl $0x0, -0x4(%rbp)
jmp 0x3a6f8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x167f5d(%rip), %rdx    # 0x1a2625
movl $0x6, %ecx
callq 0x166ab0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x3a6f1
movl $0x64, -0x4(%rbp)
jmp 0x3a6f8
movl $0x3c, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x167c13(%rip), %rcx    # 0x1a233a
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x167c09(%rip), %rcx    # 0x1a233e
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x167c10(%rip), %rcx    # 0x1a2354
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x1d(%rip), %rcx        # 0x3a770
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3e(%rip), %rcx        # 0x3a7a0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: de_identify_woz
static int de_identify_woz(deark *c)
{
	if(dbuf_memcmp(c->infile, 0, "WOZ", 3))
		return 0;
	if(dbuf_memcmp(c->infile, 4, "\xff\x0a\x0d\x0a", 4))
		return 0;
	return 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x16804e(%rip), %rdx    # 0x1a280d
movl $0x3, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x3a7d7
movl $0x0, -0x4(%rbp)
jmp 0x3a808
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %ecx
leaq 0x16802a(%rip), %rdx    # 0x1a2815
movq %rcx, %rsi
callq 0x166ab0
cmpl $0x0, %eax
je 0x3a801
movl $0x0, -0x4(%rbp)
jmp 0x3a808
movl $0x64, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x167b2b(%rip), %rcx    # 0x1a2362
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x167b22(%rip), %rcx    # 0x1a2367
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x167b00(%rip), %rcx    # 0x1a2354
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x1d(%rip), %rcx        # 0x3a880
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x3e(%rip), %rcx        # 0x3a8b0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_read_catalog
static void do_read_catalog(deark *c, lctx *d)
{
	UI tr, se;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	tr = d->catalog_tr;
	se = d->catalog_se;

	de_dbg(c, "catalog");
	de_dbg_indent(c, 1);

	while(1) {
		UI next_tr = 0;
		UI next_se = 0;

		if(!do_catalog_sector(c, d, tr, se, &next_tr, &next_se)) goto done;
		if(next_tr==0 && next_se==0) goto done;
		tr = next_tr;
		se = next_se;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x16af83(%rip), %rsi    # 0x1a5adf
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x20(%rbp), %r8
leaq -0x24(%rbp), %r9
callq 0x3ac00
cmpl $0x0, %eax
jne 0x3aba1
jmp 0x3abbd
cmpl $0x0, -0x20(%rbp)
jne 0x3abaf
cmpl $0x0, -0x24(%rbp)
jne 0x3abaf
jmp 0x3abbd
movl -0x20(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3ab71
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: do_catalog_sector
static int do_catalog_sector(deark *c, lctx *d, UI tr, UI se, UI *pnext_tr, UI *pnext_se)
{
	i64 pos1;
	i64 i;
	int retval = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	pos1 = trksec_to_offset(d, tr, se);
	de_dbg(c, "catalog sector: %u,%u (%"I64_FMT")", tr, se, pos1);
	de_dbg_indent(c, 1);
	if(!claim_sector(c, d, tr, se)) goto done;
	*pnext_tr = (UI)de_getbyte(pos1+1);
	*pnext_se = (UI)de_getbyte(pos1+2);
	de_dbg(c, "next sector: %u,%u", *pnext_tr, *pnext_se);

	for(i=0; i<7; i++) {
		do_file_entry(c, d, pos1+11+i*35);
	}

	retval = 1;

done:
	de_dbg_indent_restore(c, saved_indent_level);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x3abd0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %r8
leaq 0x1677b6(%rip), %rsi    # 0x1a2410
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0x3ad40
cmpl $0x0, %eax
jne 0x3ac8c
jmp 0x3ad27
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x165060
movzbl %al, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
addq $0x2, %rsi
callq 0x165060
movzbl %al, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
leaq 0x16774d(%rip), %rsi    # 0x1a242c
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x38(%rbp)
cmpq $0x7, -0x38(%rbp)
jge 0x3ad20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0xb, %rdx
imulq $0x23, -0x38(%rbp), %rax
addq %rax, %rdx
callq 0x3ae00
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3acee
movl $0x1, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x15b5a0
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jg 0x3ad70
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jle 0x3ad91
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq 0x1676be(%rip), %rsi    # 0x1a243f
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x3adf1
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
imulq 0x10(%rcx), %rax
movl -0x20(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x3adda
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq 0x16768a(%rip), %rsi    # 0x1a2454
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x3adf1
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: get_filetype_name
static const char *get_filetype_name(u8 n)
{
	const char *name = NULL;

	switch(n) {
	case A2_FILETYPE_TEXT: name="text"; break;
	case A2_FILETYPE_IBASIC: name="Integer BASIC"; break;
	case A2_FILETYPE_ABASIC: name="Applesoft BASIC"; break;
	case A2_FILETYPE_BINARY: name="binary"; break;
	case 0x08: name="S type"; break;
	case 0x10: name="R type"; break;
	case 0x20: name="A type"; break;
	case 0x40: name="B type"; break;
	}
	return name?name:"?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x40, %rax
ja 0x3b15a
movq -0x18(%rbp), %rax
leaq 0x167125(%rip), %rcx    # 0x1a2210
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x17d6dc(%rip), %rax    # 0x1b87d7
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673cf(%rip), %rax    # 0x1a24d7
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673d0(%rip), %rax    # 0x1a24e5
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x190ed6(%rip), %rax    # 0x1cbff8
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673c6(%rip), %rax    # 0x1a24f5
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673c0(%rip), %rax    # 0x1a24fc
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673ba(%rip), %rax    # 0x1a2503
movq %rax, -0x10(%rbp)
jmp 0x3b15a
leaq 0x1673b4(%rip), %rax    # 0x1a250a
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3b16b
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3b178
leaq 0x17cabb(%rip), %rax    # 0x1b7c2d
movq %rax, -0x20(%rbp)
jmp 0x3b178
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: a2_read_filename
static void a2_read_filename(lctx *d, dbuf *inf, i64 pos, de_ucstring *fn)
{
	UI i;
	u8 namebuf[30];

	dbuf_read(inf, namebuf, pos, 30);
	for(i=0; i<30; i++) {
		namebuf[i] &= 63;
		if(namebuf[i] < 32) namebuf[i] += 64;
	}
	ucstring_append_bytes(fn, namebuf, 30, 0x0, DE_ENCODING_LATIN1);
	ucstring_strip_trailing_spaces(fn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x1e, %ecx
callq 0x164d10
movl $0x0, -0x24(%rbp)
cmpl $0x1e, -0x24(%rbp)
jae 0x3b1f3
movl -0x24(%rbp), %eax
movzbl -0x50(%rbp,%rax), %ecx
andl $0x3f, %ecx
movb %cl, -0x50(%rbp,%rax)
movl -0x24(%rbp), %eax
movzbl -0x50(%rbp,%rax), %eax
cmpl $0x20, %eax
jge 0x3b1e6
movl -0x24(%rbp), %eax
movzbl -0x50(%rbp,%rax), %ecx
addl $0x40, %ecx
movb %cl, -0x50(%rbp,%rax)
jmp 0x3b1e8
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3b1b5
movq -0x20(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x1e, %edx
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0x171fa0
movq -0x20(%rbp), %rdi
callq 0x171360
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: get_max_file_size
static i64 get_max_file_size(deark *c, lctx *d, struct member_data *md)
{
	i64 first_secpos;
	i64 len;

	if(md->num_data_sectors < 1) return 0;
	switch(md->file_type) {
	case A2_FILETYPE_IBASIC:
	case A2_FILETYPE_ABASIC:
	case A2_FILETYPE_BINARY:
		break;
	default:
		return d->secsize * md->num_data_sectors;
	}

	first_secpos = trksec_to_offset(d, md->sector_list[0].tr, md->sector_list[0].se);

	if(md->file_type==A2_FILETYPE_BINARY) {
		len = de_getu16le(first_secpos+2);
		return 4 + len;
	}

	// BASIC
	len = de_getu16le(first_secpos);
	return 2 + len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jge 0x3b79c
movq $0x0, -0x8(%rbp)
jmp 0x3b84b
movq -0x20(%rbp), %rax
movzbl 0x19(%rax), %eax
movl %eax, -0x34(%rbp)
decl %eax
subl $0x2, %eax
jb 0x3b7ba
jmp 0x3b7b0
movl -0x34(%rbp), %eax
subl $0x4, %eax
jne 0x3b7bc
jmp 0x3b7ba
jmp 0x3b7d2
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
imulq 0x10(%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x3b84b
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movzbl (%rax), %esi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x1(%rax), %edx
callq 0x3abd0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x19(%rax), %eax
cmpl $0x4, %eax
jne 0x3b82a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x2, %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
jmp 0x3b84b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165280
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: test_VTOC
static int test_VTOC(deark *c, i64 vtocpos)
{
	u8 x;
	UI n;

	x = de_getbyte(vtocpos+39); // items per sector list sector
	if(x != 122) return 0;
	x = de_getbyte(vtocpos+52); // #tracks
	if(x != 35) return 0;
	x = de_getbyte(vtocpos+53); // sec/track
	if(x != 16) return 0;
	n = (UI)de_getu16le(vtocpos+54); // bytes/sec
	if(n != 256) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x27, %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x7a, %eax
je 0x3b89d
movl $0x0, -0x4(%rbp)
jmp 0x3b922
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x34, %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x23, %eax
je 0x3b8c7
movl $0x0, -0x4(%rbp)
jmp 0x3b922
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x35, %rsi
callq 0x165060
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x10, %eax
je 0x3b8f1
movl $0x0, -0x4(%rbp)
jmp 0x3b922
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x36, %rsi
callq 0x165280
movl %eax, -0x20(%rbp)
cmpl $0x100, -0x20(%rbp)     # imm = 0x100
je 0x3b91b
movl $0x0, -0x4(%rbp)
jmp 0x3b922
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x4d455441, %eax       # imm = 0x4D455441
je 0x3bbb8
jmp 0x3bb7a
movl -0x14(%rbp), %eax
subl $0x544d4150, %eax       # imm = 0x544D4150
je 0x3bb9e
jmp 0x3bb86
movl -0x14(%rbp), %eax
subl $0x54524b53, %eax       # imm = 0x54524B53
je 0x3bbab
jmp 0x3bb92
movl -0x14(%rbp), %eax
subl $0x57524954, %eax       # imm = 0x57524954
je 0x3bbc5
jmp 0x3bbd0
leaq 0x166abb(%rip), %rax    # 0x1a2660
movq %rax, -0x10(%rbp)
jmp 0x3bbd0
leaq 0x166ab8(%rip), %rax    # 0x1a266a
movq %rax, -0x10(%rbp)
jmp 0x3bbd0
leaq 0x177521(%rip), %rax    # 0x1b30e0
movq %rax, -0x10(%rbp)
jmp 0x3bbd0
leaq 0x166aae(%rip), %rax    # 0x1a267a
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3bbea
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq %rcx, 0x58(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x494e464f, %eax       # imm = 0x494E464F
je 0x3bc3d
jmp 0x3bc31
movl -0x14(%rbp), %eax
subl $0x4d455441, %eax       # imm = 0x4D455441
je 0x3bc65
jmp 0x3bc8b
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdx
callq 0x3bd40
jmp 0x3bc8b
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdx
callq 0x3bf80
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/apple2-dsk.c
// Function: my_woz_chunk_handler
static int my_woz_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;

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

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x494e464f, %eax       # imm = 0x494E464F
je 0x3bcdd
jmp 0x3bcd1
movl -0x14(%rbp), %eax
subl $0x4d455441, %eax       # imm = 0x4D455441
je 0x3bd05
jmp 0x3bd2b
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdx
callq 0x3c1e0
jmp 0x3bd2b
movq -0x8(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdx
callq 0x3bf80
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)