LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: test_root_block
static int test_root_block(deark *c, lctx *d, i64 blknum)
{
	i64 pos;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x33b10
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165470
cmpq $0x2, %rax
je 0x33ac5
movl $0x0, -0x4(%rbp)
jmp 0x33b04
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rsi
subq $0x4, %rsi
callq 0x165470
cmpq $0x1, %rax
je 0x33af1
movl $0x0, -0x4(%rbp)
jmp 0x33b04
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: claim_block
static int claim_block(deark *c, lctx *d, i64 blknum)
{
	if(blknum<0 || blknum>=d->num_blocks) {
		de_err(c, "Bad block number: %"I64_FMT, blknum);
		return 0;
	}
	if(!d->block_used_flags) {
		d->block_used_flags = de_malloc(c, d->num_blocks);
	}
	if(d->block_used_flags[blknum]) {
		de_err(c, "Attempt to reuse block #%"I64_FMT, blknum);
		return 0;
	}
	d->block_used_flags[blknum] = 1;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jl 0x33b59
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x33b78
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x16d0a1(%rip), %rsi    # 0x1a0c09
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x33be7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x33b9f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x15b780
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x33bd0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x16d05f(%rip), %rsi    # 0x1a0c1f
movb $0x0, %al
callq 0x15bfb0
movl $0x0, -0x4(%rbp)
jmp 0x33be7
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_protection_flags
static void read_protection_flags(deark *c, lctx *d, struct member_data *md, i64 pos)
{
	UI n;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x165470
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x16c828(%rip), %rsi    # 0x1a0cd2
movb $0x0, %al
callq 0x15b0d0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x34506
movq -0x18(%rbp), %rax
cmpb $0x0, 0x10(%rax)
jne 0x34506
movl -0x24(%rbp), %eax
andl $0xff0f, %eax           # imm = 0xFF0F
cmpl $0x0, %eax
je 0x34504
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x344f1
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movl 0x14(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0x34502
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movl 0x14(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x14(%rax)
jmp 0x34504
jmp 0x34506
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_ofs_timestamp
static void read_ofs_timestamp(deark *c, i64 pos1, struct de_timestamp *ts,
	const char *name)
{
	i64 pos = pos1;
	i64 days, mins, ticks;
	i64 ut;
	char timestamp_buf[64];

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x40(%rbp)
movq $0xf0c3f00, -0x48(%rbp) # imm = 0xF0C3F00
imulq $0x15180, -0x30(%rbp), %rax # imm = 0x15180
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
imulq $0x3c, -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movl $0x32, %ecx
cqto
idivq %rcx
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3460b
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x15d530
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movl $0x32, %ecx
cqto
idivq %rcx
cvtsi2sd %rdx, %xmm0
movsd 0x16c4ef(%rip), %xmm1   # 0x1a0ad8
divsd %xmm1, %xmm0
callq 0x15d5e0
movq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x15e130
jmp 0x34623
leaq -0x90(%rbp), %rdi
leaq 0x1680f4(%rip), %rsi    # 0x19c70d
movl $0x40, %edx
callq 0x15aa30
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
leaq -0x90(%rbp), %rax
leaq 0x16c6a6(%rip), %rsi    # 0x1a0ceb
movq %rax, (%rsp)
movb $0x0, %al
callq 0x15b0d0
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: do_hashtable
static void do_hashtable(deark *c, lctx *d, i64 pos1, i64 ht_size_in_longs)
{
	i64 k;
	i64 pos = pos1;
	int saved_indent_level;
	i64 used_count = 0;

	de_dbg_indent_save(c, &saved_indent_level);

	de_dbg(c, "hashtable at %"I64_FMT, pos1);
	de_dbg_indent(c, 1);

	for(k=0; k<ht_size_in_longs; k++) {
		i64 n;
		n = de_getu32be_p(&pos);
		if(n>0 || c->debug_level>=2) {
			de_dbg(c, "ht[%u]: %u", (UI)k, (UI)n);
		}
		if(n>0) {
			used_count++;
			de_dbg_indent(c, 1);
			do_file_list(c, d, n);
			de_dbg_indent(c, -1);
		}
	}
	de_dbg(c, "hash buckets in use: %d of %d", (int)used_count, (int)ht_size_in_longs);

	de_dbg_indent_restore(c, saved_indent_level);
}

// 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 -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x16c65e(%rip), %rsi    # 0x1a0d02
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x34765
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1654b0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jg 0x346f4
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x34712
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x48(%rbp), %rax
movl %eax, %ecx
leaq 0x16c608(%rip), %rsi    # 0x1a0d13
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x48(%rbp)
jle 0x34752
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x347a0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0x34754
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x346c1
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movl %eax, %ecx
leaq 0x16c5a2(%rip), %rsi    # 0x1a0d1e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x15b5a0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: do_file_list
static void do_file_list(deark *c, lctx *d, i64 blknum)
{
	i64 pos1;
	i64 next_in_chain;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);

	pos1 = blocknum_to_offset(d, blknum);
	de_dbg(c, "file list starting at blk#%"I64_FMT, blknum);
	de_dbg_indent(c, 1);

	while(1) {
		if(blknum<1) break;
		if(!do_header_block(c, d, blknum)) goto done;
		next_in_chain = de_getu32be(pos1+d->bsize-16);
		de_dbg(c, "next: %"I64_FMT, next_in_chain);
		blknum = next_in_chain;
		pos1 = blocknum_to_offset(d, blknum);
	}

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 %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x15b580
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x33b10
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x16c55b(%rip), %rsi    # 0x1a0d3c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
cmpq $0x1, -0x18(%rbp)
jge 0x347ff
jmp 0x34869
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33810
cmpl $0x0, %eax
jne 0x34817
jmp 0x3486b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rsi
subq $0x10, %rsi
callq 0x165470
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x16c513(%rip), %rsi    # 0x1a0d5a
movb $0x0, %al
callq 0x15b0d0
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x33b10
movq %rax, -0x20(%rbp)
jmp 0x347f6
jmp 0x3486b
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x15b5a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_blocks_table
static void read_blocks_table(deark *c, lctx *d, i64 pos, struct block_ptrs_tbl *bpt)
{
	i64 k;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x3493a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x165470
movq %rax, %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x34927
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x34927
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
leaq 0x16c4fb(%rip), %rsi    # 0x1a0e1b
movb $0x0, %al
callq 0x15b350
jmp 0x34929
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x348a0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_file_using_blocks_table
static void read_file_using_blocks_table(deark *c, lctx *d, struct member_data *md)
{
	i64 cur_ext_header_blk;

	if(md->tmpbpt.high_seq > md->tmpbpt.blocks_tbl_capacity) {
		on_adf_error(c, d, 30);
		goto done;
	}

	// Process the blocks table stored in the main file header
	if(!read_file_segment_from_blocks_tbl(c, d, md)) goto done;

	// Process the chain of extended header blocks
	if(md->first_ext_block) {
		cur_ext_header_blk = md->first_ext_block;
		while(1) {
			i64 next_ext_header_blk = 0;

			if(cur_ext_header_blk == 0) break;
			if(md->outf->len >= md->fsize) break;

			if(!read_file_segment_from_extension_block(c, d, md, cur_ext_header_blk,
				&next_ext_header_blk))
			{
				goto done;
			}
			cur_ext_header_blk = next_ext_header_blk;
		}
	}

	if(md->outf->len < md->fsize) {
		on_adf_error(c, d, 26);
		goto done;
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jle 0x3497d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1e, %edx
callq 0x34440
jmp 0x34a30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x34ac0
cmpl $0x0, %eax
jne 0x34998
jmp 0x34a30
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x34a04
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x349c0
jmp 0x34a02
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x349d8
jmp 0x34a02
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x28(%rbp), %r8
callq 0x34c00
cmpl $0x0, %eax
jne 0x349f8
jmp 0x34a30
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x349af
jmp 0x34a04
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x34a2e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1a, %edx
callq 0x34440
jmp 0x34a30
jmp 0x34a30
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_file_ofs_style
static void read_file_ofs_style(deark *c, lctx *d, struct member_data *md)
{
	i64 seq_num;

	md->next_block_to_read = md->first_data_block;
	seq_num = 1;
	while(1) {
		int ret;

		if(md->next_block_to_read==0) break;

		ret = do_file_ofs_data_block(c, d, md, seq_num, md->next_block_to_read);
		if(!ret) goto done;
		seq_num++;
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq $0x1, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x34a79
jmp 0x34aaf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x60(%rax), %r8
callq 0x34dc0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x34aa1
jmp 0x34ab1
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x34a6c
jmp 0x34ab1
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/amiga-dsk.c
// Function: read_file_segment_from_blocks_tbl
static int read_file_segment_from_blocks_tbl(deark *c, lctx *d, struct member_data *md)
{
	i64 nbytes_left_to_copy;
	i64 k;
	int retval = 0;

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

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

		if(nbytes_left_to_copy<1) break;

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

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

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

done:
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x50(%rcx), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x70(%rcx), %rax
jge 0x34be4
cmpq $0x1, -0x20(%rbp)
jge 0x34b19
jmp 0x34be4
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x78(%rcx), %rcx
subq $0x1, %rcx
subq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x33b30
cmpl $0x0, %eax
jne 0x34b57
jmp 0x34beb
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x33b10
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x34b95
movq -0x40(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
subq $0x18, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jle 0x34ba7
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rcx
callq 0x166070
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x34afb
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: de_module_binscii
void de_module_binscii(deark *c, struct deark_module_info *mi)
{
	mi->id = "binscii";
	mi->desc = "BinSCII";
	mi->run_fn = de_run_binscii;
	mi->identify_fn = de_identify_binscii;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16be61(%rip), %rcx    # 0x1a0f48
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x16be5b(%rip), %rcx    # 0x1a0f50
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x35120
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1cd(%rip), %rcx       # 0x352e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: de_identify_binscii
static int de_identify_binscii(deark *c)
{
	int has_ext;
	int ret;
	i64 foundpos;

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

	if(!has_ext) return 0;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x16bddf(%rip), %rsi    # 0x1a10d6
callq 0x15d180
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
jne 0x35321
movq -0x10(%rbp), %rdi
leaq 0x16bdc7(%rip), %rsi    # 0x1a10da
callq 0x15d180
cmpl $0x0, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x1f0135(%rip), %rdx    # 0x225470
xorl %eax, %eax
movl %eax, %esi
movl $0x12, %ecx
callq 0x166ab0
cmpl $0x0, %eax
jne 0x35366
movl -0x14(%rbp), %edx
movl $0x5a, %eax
movl $0x64, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x353b5
cmpl $0x0, -0x14(%rbp)
jne 0x35375
movl $0x0, -0x4(%rbp)
jmp 0x353b5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x1f00ec(%rip), %rsi    # 0x225470
movl $0x12, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x1000, %r8d           # imm = 0x1000
leaq -0x20(%rbp), %r9
callq 0x169370
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x353ae
movl $0x23, -0x4(%rbp)
jmp 0x353b5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: binscii_read_line_to_linebuf
static void binscii_read_line_to_linebuf(deark *c, struct binscii_ctx *d)
{
	UI num_leading_junk_bytes = 0;
	i64 new_linebuf_used;
	i64 k;

	de_zeromem(d->linebuf, BINSCII_LINE_MAXLEN);
	de_read(d->linebuf, d->pos, d->linebuf_used);

	for(k=0; k<d->linebuf_used; k++) {
		if(d->linebuf[k]<=0x20) {
			num_leading_junk_bytes++;
		}
		else {
			break;
		}
	}

	if(num_leading_junk_bytes==0) return;
	new_linebuf_used = d->linebuf_used - (i64)num_leading_junk_bytes;
	de_memmove((void*)&d->linebuf[0], (const void*)&d->linebuf[num_leading_junk_bytes],
		(size_t)new_linebuf_used);
	d->linebuf_used = new_linebuf_used;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x19140
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
callq 0x164d10
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jge 0x35455
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl 0x40(%rax,%rcx), %eax
cmpl $0x20, %eax
jg 0x35443
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x35445
jmp 0x35455
jmp 0x35447
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x35418
cmpl $0x0, -0x14(%rbp)
jne 0x3545d
jmp 0x3549a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movl -0x14(%rbp), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x19260
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: do_binscii_line
static void do_binscii_line(deark *c, struct binscii_ctx *d)
{
	switch(d->parse_state) {
	case BSC_NEUTRAL:
		if(!de_memcmp(d->linebuf, g_binscii_seg_sig, 18)) {
			de_zeromem(&d->cur_seg, sizeof(struct binscii_segment));
			d->cur_seg.pos = d->pos;
			de_crcobj_reset(d->crco_segdata);
			de_dbg(c, "segment at %"I64_FMT, d->cur_seg.pos);
			de_dbg_indent(c, 1);
			d->parse_state = BSC_READY_FOR_HEADER1;
			d->seg_count_total++;
		}
		break;
	case BSC_READY_FOR_HEADER1:
		do_binscii_header1(c, d);
		d->parse_state = BSC_READY_FOR_HEADER2;
		break;
	case BSC_READY_FOR_HEADER2:
		do_binscii_header2(c, d);
		d->parse_state = BSC_READY_FOR_DATA;
		break;
	case BSC_READY_FOR_DATA:
		do_binscii_data_line(c, d);
		break;
	case BSC_READY_FOR_CRC:
		do_binscii_crc_line(c, d);
		d->parse_state = BSC_NEUTRAL;
		de_dbg_indent(c, -1);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x355dc
movq -0x18(%rbp), %rax
leaq 0x16ba64(%rip), %rcx    # 0x1a0f34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
movq 0x1eff88(%rip), %rsi    # 0x225470
movl $0x12, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x35571
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
xorl %esi, %esi
movl $0x160, %edx            # imm = 0x160
callq 0x19140
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x15f250
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdx
leaq 0x19c439(%rip), %rsi    # 0x1d197d
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x355dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35690
movq -0x10(%rbp), %rax
movl $0x2, 0x8(%rax)
jmp 0x355dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x356e0
movq -0x10(%rbp), %rax
movl $0x3, 0x8(%rax)
jmp 0x355dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35cb0
jmp 0x355dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35dd0
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: binscii_close_cur_file
static void binscii_close_cur_file(deark *c, struct binscii_ctx *d)
{
	struct binscii_md *md;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x35617
jmp 0x35680
movq -0x8(%rbp), %rdi
leaq 0x16baa7(%rip), %rsi    # 0x1a10c9
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
je 0x3564e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35ef0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x1676a0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x171750
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: do_binscii_data_line
static void do_binscii_data_line(deark *c, struct binscii_ctx *d)
{
	i64 amt_to_write;

	if(!d->cur_md || !d->cur_md->outf) goto done;

	dbuf_empty(d->tmpdbuf);
	binscii_decode(c, d, d->linebuf, BINSCII_ENCODED_UNITS_PER_LINE, d->tmpdbuf);

	// CRC calculation includes padding bytes.
	de_crcobj_addslice(d->crco_segdata, d->tmpdbuf, 0, BINSCII_DECODED_BYTES_PER_LINE);

	amt_to_write = d->cur_md->orig_len - d->cur_md->nbytes_written;
	amt_to_write = de_min_int(amt_to_write, BINSCII_DECODED_BYTES_PER_LINE);
	dbuf_copy(d->tmpdbuf, 0, amt_to_write, d->cur_md->outf);

	d->cur_seg.nbytes_processed += BINSCII_DECODED_BYTES_PER_LINE;
	if(d->cur_seg.nbytes_processed >= d->cur_seg.segment_len) {
		d->parse_state = BSC_READY_FOR_CRC;
	}

	d->cur_md->nbytes_written += amt_to_write;

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x35cd8
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
jne 0x35cdd
jmp 0x35dc2
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x169310
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x40, %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %r8
movl $0x10, %ecx
callq 0x35f20
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x30, %ecx
callq 0x15f500
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x30, %esi
callq 0x15ccf0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x166070
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rcx
addq $0x30, %rcx
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x108(%rcx), %rax
jl 0x35daf
movq -0x10(%rbp), %rax
movl $0x4, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: do_binscii_crc_line
static void do_binscii_crc_line(deark *c, struct binscii_ctx *d)
{
	u32 crc_reported, crc_calc;

	if(!d->cur_md) goto done;

	// For a CRC line, we expect linebuf_used==4.
	if(d->linebuf_used<4 || d->linebuf_used>=BINSCII_ENCODED_BYTES_PER_LINE) {
		binscii_set_generic_error(c, d);
		goto done;
	}

	dbuf_empty(d->tmpdbuf);
	binscii_decode(c, d, d->linebuf, 1, d->tmpdbuf);
	crc_reported = (u32)dbuf_getu16le(d->tmpdbuf, 0);
	de_dbg(c, "segment data crc (reported): 0x%04x", (UI)crc_reported);

	crc_calc = de_crcobj_getval(d->crco_segdata);
	de_dbg(c, "segment data crc (calculated): 0x%04x", (UI)crc_calc);

	if(crc_calc!=crc_reported) {
		de_err(c, "Data CRC check failed for segment at %"I64_FMT, d->cur_seg.pos);
		d->errflag = 1;
		goto done;
	}

	if(d->cur_md->nbytes_written >= d->cur_md->orig_len) {
		binscii_close_cur_file(c, d);
	}

done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x35def
jmp 0x35eea
movq -0x10(%rbp), %rax
cmpq $0x4, 0x38(%rax)
jl 0x35e05
movq -0x10(%rbp), %rax
cmpq $0x40, 0x38(%rax)
jl 0x35e17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35ef0
jmp 0x35eea
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x169310
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x40, %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %r8
movl $0x1, %ecx
callq 0x35f20
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165280
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x16b1ee(%rip), %rsi    # 0x1a1056
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x15f340
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq 0x16b1ed(%rip), %rsi    # 0x1a107a
movb $0x0, %al
callq 0x15b0d0
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x35ec3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdx
leaq 0x16b1ee(%rip), %rsi    # 0x1a10a0
movb $0x0, %al
callq 0x15bfb0
movq -0x10(%rbp), %rax
movb $0x1, 0xc(%rax)
jmp 0x35eea
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
jl 0x35ee8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x355f0
jmp 0x35eea
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: binscii_decode
static void binscii_decode(deark *c, struct binscii_ctx *d, const u8 *src,
	i64 num_units, dbuf *outf)
{
	i64 i;
	u8 ib[4];

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

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

// Assembly:
pushq %rbp
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)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x35ffc
movl $0x0, -0x38(%rbp)
cmpl $0x4, -0x38(%rbp)
jae 0x35f94
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
shlq $0x2, %rdx
movl -0x38(%rbp), %esi
addq %rsi, %rdx
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
movb 0x120(%rax,%rcx), %cl
movl -0x38(%rbp), %eax
movb %cl, -0x34(%rbp,%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x35f59
movq -0x28(%rbp), %rdi
movzbl -0x31(%rbp), %eax
shll $0x2, %eax
movzbl -0x32(%rbp), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movzbl %al, %esi
callq 0x168380
movq -0x28(%rbp), %rdi
movzbl -0x32(%rbp), %eax
andl $0xf, %eax
shll $0x4, %eax
movzbl -0x33(%rbp), %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movzbl %al, %esi
callq 0x168380
movq -0x28(%rbp), %rdi
movzbl -0x33(%rbp), %eax
andl $0x3, %eax
shll $0x6, %eax
movzbl -0x34(%rbp), %ecx
orl %ecx, %eax
movzbl %al, %esi
callq 0x168380
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x35f44
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/binscii.c
// Function: binscii_create_output_file
static void binscii_create_output_file(deark *c, struct binscii_ctx *d)
{
	de_finfo *fi = NULL;

	if(!d->cur_md) {
		binscii_set_generic_error(c, d);
		goto done;
	}
	if(d->cur_md->outf) {
		binscii_set_generic_error(c, d);
		goto done;
	}

	fi = de_finfo_create(c);
	if(d->cur_md->fn) {
		de_finfo_set_name_from_ucstring(c, fi, d->cur_md->fn, 0);
		fi->original_filename_flag = 1;
	}
	fi->timestamp[DE_TIMESTAMPIDX_MODIFY] = d->cur_md->mod_time;
	fi->timestamp[DE_TIMESTAMPIDX_CREATE] = d->cur_md->create_time;

	d->cur_md->outf = dbuf_create_output_file(c, NULL, fi, 0);
	dbuf_enable_wbuffer(d->cur_md->outf);

done:
	de_finfo_destroy(c, fi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x360c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35ef0
jmp 0x36188
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x360e4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35ef0
jmp 0x36188
movq -0x8(%rbp), %rdi
callq 0x15d230
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x36121
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdx
xorl %ecx, %ecx
callq 0x15d2c0
movq -0x18(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x30(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x38(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x40(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
callq 0x166c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rdi
callq 0x167b90
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15d260
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: de_module_jpeg2000
void de_module_jpeg2000(deark *c, struct deark_module_info *mi)
{
	mi->id = "jpeg2000";
	mi->desc = "JPEG 2000 image";
	mi->desc2 = "resources only";
	mi->run_fn = de_run_bmff;
	mi->identify_fn = de_identify_jpeg2000;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16b009(%rip), %rcx    # 0x1a11c0
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x16b004(%rip), %rcx    # 0x1a11c9
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x16b005(%rip), %rcx    # 0x1a11d9
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x1d(%rip), %rcx        # 0x36200
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ee(%rip), %rcx       # 0x363e0
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: de_module_bmff
void de_module_bmff(deark *c, struct deark_module_info *mi)
{
	mi->id = "bmff";
	mi->desc = "ISO Base Media File Format";
	mi->desc2 = "MP4, QuickTime, etc.";
	mi->id_alias[0] = "mp4";
	mi->run_fn = de_run_bmff;
	mi->identify_fn = de_identify_bmff;
	mi->help_fn = de_help_bmff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x16ada1(%rip), %rcx    # 0x1a11e8
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x16ad98(%rip), %rcx    # 0x1a11ed
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x16ada4(%rip), %rcx    # 0x1a1208
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
leaq 0x16adaa(%rip), %rcx    # 0x1a121d
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
leaq -0x282(%rip), %rcx      # 0x36200
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1f(%rip), %rcx        # 0x364b0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0xc0(%rip), %rcx        # 0x36560
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: de_identify_bmff
static int de_identify_bmff(deark *c)
{
	u32 first_boxtype;

	first_boxtype = (u32)de_getu32be(4);
	if(first_boxtype==BOX_ftyp) return 80;
	if(first_boxtype==BOX_mdat) return 35;
	if(first_boxtype==BOX_moov) return 35;
	if(first_boxtype==BOX_skip) return 10;
	if(first_boxtype==BOX_wide) return 10;
	if(first_boxtype==BOX_pnot) return 10;
	if(first_boxtype==BOX_free) return 9;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x165470
movl %eax, -0x14(%rbp)
cmpl $0x66747970, -0x14(%rbp) # imm = 0x66747970
jne 0x364e3
movl $0x50, -0x4(%rbp)
jmp 0x36556
cmpl $0x6d646174, -0x14(%rbp) # imm = 0x6D646174
jne 0x364f5
movl $0x23, -0x4(%rbp)
jmp 0x36556
cmpl $0x6d6f6f76, -0x14(%rbp) # imm = 0x6D6F6F76
jne 0x36507
movl $0x23, -0x4(%rbp)
jmp 0x36556
cmpl $0x736b6970, -0x14(%rbp) # imm = 0x736B6970
jne 0x36519
movl $0xa, -0x4(%rbp)
jmp 0x36556
cmpl $0x77696465, -0x14(%rbp) # imm = 0x77696465
jne 0x3652b
movl $0xa, -0x4(%rbp)
jmp 0x36556
cmpl $0x706e6f74, -0x14(%rbp) # imm = 0x706E6F74
jne 0x3653d
movl $0xa, -0x4(%rbp)
jmp 0x36556
cmpl $0x66726565, -0x14(%rbp) # imm = 0x66726565
jne 0x3654f
movl $0x9, -0x4(%rbp)
jmp 0x36556
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: my_box_identify_fn
static void my_box_identify_fn(deark *c, struct de_boxesctx *bctx)
{
	const struct box_type_info *bti;
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;
	struct de_boxdata *par = curbox->parent;
	struct de_boxdata *gpar = NULL;
	int is_ilst_child = 0;

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

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

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x75756964, 0xc(%rax)  # imm = 0x75756964
je 0x365ed
movq -0x28(%rbp), %rax
leaq 0x181644(%rip), %rcx    # 0x1b7c2d
movq %rcx, 0x50(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x365ff
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x36613
movq -0x30(%rbp), %rax
cmpl $0x696c7374, 0xc(%rax)  # imm = 0x696C7374
je 0x36627
cmpq $0x0, -0x38(%rbp)
je 0x3662e
movq -0x38(%rbp), %rax
cmpl $0x696c7374, 0xc(%rax)  # imm = 0x696C7374
jne 0x3662e
movl $0x1, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x3664e
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rax
movl 0xc(%rax), %edx
callq 0x36830
movq %rax, -0x18(%rbp)
jmp 0x3666d
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
callq 0x368a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3669d
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3669b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
jmp 0x3669d
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: my_box_handler
static int my_box_handler(deark *c, struct de_boxesctx *bctx)
{
	const struct box_type_info *bti;
	lctx *d = (lctx*)bctx->userdata;
	struct de_boxdata *curbox = bctx->curbox;

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

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

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

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

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x36788
movq -0x30(%rbp), %rax
addq $0x14, %rax
movq 0x1eed94(%rip), %rcx    # 0x225488
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x3671f
movq -0x30(%rbp), %rax
movl $0x1, 0x5c(%rax)
jmp 0x3677c
movq -0x30(%rbp), %rax
addq $0x14, %rax
movq 0x1eed52(%rip), %rcx    # 0x225480
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x36765
movq -0x30(%rbp), %rax
movl $0x1, 0x5c(%rax)
movq -0x30(%rbp), %rax
movq $0x8, 0x70(%rax)
jmp 0x3677a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x174080
movl %eax, -0x4(%rbp)
jmp 0x3681a
jmp 0x3677c
movl $0x1, -0x4(%rbp)
jmp 0x3681a
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x367b7
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x367b7
movq -0x30(%rbp), %rax
movl $0x1, 0x5c(%rax)
jmp 0x367eb
movq -0x28(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
je 0x367e9
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x367e9
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x696c7374, 0xc(%rax)  # imm = 0x696C7374
jne 0x367e9
movq -0x30(%rbp), %rax
movl $0x1, 0x5c(%rax)
jmp 0x367eb
cmpq $0x0, -0x20(%rbp)
je 0x36813
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x36813
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: find_ilst_box_type_info
static const struct box_type_info *find_ilst_box_type_info(deark *c, lctx *d,
	u32 boxtype)
{
	size_t k;

	for(k=0; k<DE_ARRAYCOUNT(ilst_box_type_info_arr); k++) {
		if(ilst_box_type_info_arr[k].boxtype != boxtype) continue;
		return &ilst_box_type_info_arr[k];
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0xa, -0x28(%rbp)
jae 0x3688f
movq -0x28(%rbp), %rcx
leaq 0x1dde97(%rip), %rax    # 0x2146f0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
je 0x36869
jmp 0x36881
movq -0x28(%rbp), %rcx
leaq 0x1dde7c(%rip), %rax    # 0x2146f0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x36897
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x36847
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmff.c
// Function: find_box_type_info
static const struct box_type_info *find_box_type_info(deark *c, lctx *d,
	u32 boxtype, int level)
{
	size_t k;
	u32 mask = 0;

	if(d->is_bmff) mask |= 0x00000001;
	if(d->is_mj2) mask |= 0x000000008;
	if(d->is_jp2_jpx_jpm) mask |= 0x00010000;
	if(d->is_jumbf) mask |= 0x00040000;
	if(d->is_heif) mask |= 0x00080000;

	for(k=0; k<DE_ARRAYCOUNT(box_type_info_arr); k++) {
		if(box_type_info_arr[k].boxtype != boxtype) continue;
		if(level==0 && (box_type_info_arr[k].flags2 & 0x2)) {
			// Critical box. Always match.
			return &box_type_info_arr[k];
		}
		if((box_type_info_arr[k].flags1 & mask)==0) continue;
		return &box_type_info_arr[k];
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0x368cc
movl -0x2c(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x368df
movl -0x2c(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x5(%rax)
je 0x368f4
movl -0x2c(%rbp), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0xa(%rax)
je 0x36909
movl -0x2c(%rbp), %eax
orl $0x40000, %eax          # imm = 0x40000
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x9(%rax)
je 0x3691e
movl -0x2c(%rbp), %eax
orl $0x80000, %eax          # imm = 0x80000
movl %eax, -0x2c(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x78, -0x28(%rbp)
jae 0x369cf
movq -0x28(%rbp), %rcx
leaq 0x1ddef4(%rip), %rax    # 0x214830
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
je 0x3694c
jmp 0x369be
cmpl $0x0, -0x20(%rbp)
jne 0x36987
movq -0x28(%rbp), %rcx
leaq 0x1dded3(%rip), %rax    # 0x214830
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x36987
movq -0x28(%rbp), %rcx
leaq 0x1ddeb6(%rip), %rax    # 0x214830
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x369d7
movq -0x28(%rbp), %rcx
leaq 0x1dde9e(%rip), %rax    # 0x214830
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl -0x2c(%rbp), %eax
cmpl $0x0, %eax
jne 0x369a6
jmp 0x369be
movq -0x28(%rbp), %rcx
leaq 0x1dde7f(%rip), %rax    # 0x214830
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x369d7
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x36926
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)