// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/arj.c
// Function: do_header_or_member
static int do_header_or_member(deark *c, lctx *d, i64 pos1, int expecting_archive_hdr,
	i64 *pbytes_consumed)
{
	i64 pos = pos1;
	i64 basic_hdr_size;
	i64 first_hdr_size;
	i64 first_hdr_endpos;
	i64 extra_data_len;
	i64 nbytes_avail;
	i64 n;
	i64 basic_hdr_endpos;
	i64 bytes_consumed;
	u32 basic_hdr_crc_reported;
	u32 basic_hdr_crc_calc;
	struct member_data *md = NULL;
	de_ucstring *flags_descr = NULL;
	int retval = 0;
	int saved_indent_level;
	u8 b;
	char namebuf[32];
	char tmpbuf[64];

	de_dbg_indent_save(c, &saved_indent_level);
	md = de_malloc(c, sizeof(struct member_data));

	md->hdr_id = (UI)dbuf_getu16le_p(d->inf, &pos);
	if(md->hdr_id!=0xea60) {
		de_err(c, "ARJ data not found at %"I64_FMT, pos1);
		goto done;
	}

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

	basic_hdr_size = dbuf_getu16le_p(d->inf, &pos);
	de_dbg(c, "basic header size: %"I64_FMT, basic_hdr_size);
	if(basic_hdr_size==0) {
		md->objtype = ARJ_OBJTYPE_EOA;
	}
	else {
		// Skip ahead to read some fields that can affect fields that appear
		// before them.
		md->archiver_ver_num = dbuf_getbyte(d->inf, pos1+5);
		md->file_type = dbuf_getbyte(d->inf, pos1+10);

		if(md->file_type==ARJ_FILETYPE_MAINHDR) {
			md->objtype = ARJ_OBJTYPE_MAINHDR;
		}
		else if(md->file_type==ARJ_FILETYPE_CHAPTERLABEL) {
			md->objtype = ARJ_OBJTYPE_CHAPTERLABEL;
		}
		else if(md->file_type<=4) {
			md->objtype = ARJ_OBJTYPE_MEMBERFILE;
		}
		else if(md->file_type==9 && md->archiver_ver_num==51) {
			md->objtype = ARJ_OBJTYPE_MEMBERFILE; // ARJZ with -t9 option
		}
		else {
			md->objtype = ARJ_OBJTYPE_UNKNOWN;
		}
	}
	de_dbg(c, "block type: %s", get_objtype_name(md->objtype));

	if(basic_hdr_size==0) {
		*pbytes_consumed = 4;
		retval = 2;
		goto done;
	}

	if(basic_hdr_size>ARJ_MAX_BASIC_HEADER_SIZE) {
		de_err(c, "Bad header size");
		goto done;
	}

	de_dbg(c, "basic header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	de_dbg(c, "first header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);

	basic_hdr_endpos = pos1 + 4 + basic_hdr_size;
	first_hdr_size = (i64)dbuf_getbyte_p(d->inf, &pos);
	de_dbg(c, "first header size: %"I64_FMT, first_hdr_size);
	first_hdr_endpos = pos1 + 4 + first_hdr_size;
	pos++; // md->archiver_ver_num, already read
	de_dbg(c, "archiver version: %u (%s)", (UI)md->archiver_ver_num,
		get_archiver_ver_name(md->archiver_ver_num, namebuf, sizeof(namebuf)));

	// Note:
	//  ver>=100 used by ARJ32 roughly corresponds to that number minus 91.
	//  ver=51 used by ARJZ probably corresponds to ver=6 or 7.
	md->supports_ANSIPAGE_flag = (u8)((md->archiver_ver_num>=9 && md->archiver_ver_num<=49) ||
		md->archiver_ver_num>=100);
	md->supports_chapters = (u8)((md->archiver_ver_num>=8 && md->archiver_ver_num<=49) ||
		md->archiver_ver_num>=100);
	md->has_encrver_field = md->supports_chapters;
	md->has_flags2_field = (u8)((md->archiver_ver_num>=11 && md->archiver_ver_num<=49) ||
		md->archiver_ver_num>=102);
	md->has_arch_mtime_field = (u8)(md->archiver_ver_num>=6);

	md->min_ver_to_extract = dbuf_getbyte_p(d->inf, &pos);
	de_dbg(c, "min ver to extract: %u", (UI)md->min_ver_to_extract);

	md->os = dbuf_getbyte_p(d->inf, &pos);
	de_dbg(c, "host OS: %u (%s)", (UI)md->os, get_host_os_name(md->os));

	if((md->os==ARJ_OS_UNIX || md->os==ARJ_OS_NEXT) &&
		(md->archiver_ver_num>=11 && md->archiver_ver_num<=49))
	{
		// Ref: Open Source ARJ, resource/en/readme.txt
		md->unix_timestamp_format = 1;
	}

	md->flags = dbuf_getbyte_p(d->inf, &pos);
	flags_descr = ucstring_create(c);
	get_flags_descr(md, md->flags, flags_descr);
	de_dbg(c, "flags: 0x%02x (%s)", (UI)md->flags, ucstring_getpsz_d(flags_descr));
	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		if(md->supports_ANSIPAGE_flag && (md->flags & 0x02)) {
			d->cv->ansipage_flag = 1;
		}
		if(md->flags & 0x40) {
			d->cv->is_secured = 1;
		}
		else if((!md->supports_ANSIPAGE_flag) && (md->flags & 0x02)) {
			d->cv->is_old_secured = 1;
		}
		if(md->flags & 0x08) {
			d->cv->arjprot_flag = 1;
		}
	}
	else if(md->objtype==ARJ_OBJTYPE_MEMBERFILE) {
		if(md->flags & 0x04) { // "VOLUME"
			md->cont_on_next_vol = 1;
		}
		if(md->flags & 0x08) { // "EXTFILE"
			// Note: ARJ's -jx option can be used to create files that use this flag,
			// but aren't actually part of a multi-volume archive. But -jx is mainly
			// intended to be used in conjuction with constructing/repairing multi-
			// volume archives.
			md->cont_from_prev_vol = 1;
		}
	}

	// Now we have enough information to choose a character encoding.
	md->input_encoding = d->input_encoding;
	if(md->input_encoding==DE_ENCODING_UNKNOWN) {
		if(d->cv->ansipage_flag) {
			md->input_encoding = DE_ENCODING_WINDOWS1252;
		}
		else {
			md->input_encoding = DE_ENCODING_CP437;
		}
	}

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		b = dbuf_getbyte_p(d->inf, &pos);
		if(d->cv->is_secured) {
			de_dbg(c, "security version: %u", (UI)b);
		}
	}
	else {
		md->method = dbuf_getbyte_p(d->inf, &pos);
		de_dbg(c, "cmpr method: %u", (UI)md->method);
	}

	pos++; // file_type already read
	de_dbg(c, "file type: %u (%s)", (UI)md->file_type, get_file_type_name(md, md->file_type));
	if(expecting_archive_hdr && md->file_type!=ARJ_FILETYPE_MAINHDR) {
		de_err(c, "Invalid or missing archive header");
		goto done;
	}
	if(md->objtype==ARJ_OBJTYPE_UNKNOWN) {
		de_err(c, "Unknown file type: %u", (UI)md->file_type);
		// (try to continue)
	}

	md->reserved1 = dbuf_getbyte_p(d->inf, &pos);
	de_dbg(c, "reserved: 0x%02x", (UI)md->reserved1);

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		read_arj_datetime(c, d, md, pos, &md->tmstamp[DE_TIMESTAMPIDX_CREATE], "archive creation");
		pos += 4;
	}
	else if(md->objtype==ARJ_OBJTYPE_CHAPTERLABEL) {
		read_arj_datetime(c, d, md, pos,  &md->tmstamp[DE_TIMESTAMPIDX_CREATE], "creation");
		pos += 4;
	}
	else {
		read_arj_datetime(c, d, md, pos, &md->tmstamp[DE_TIMESTAMPIDX_MODIFY], "mod");
		pos += 4;
	}

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		md->cmpr_len = 0;
		if(d->cv->is_old_secured) {
			n = dbuf_getu32le_p(d->inf, &pos);
			de_dbg(c, "archive size: %"I64_FMT, n); // This is a guess
		}
		else if(md->has_arch_mtime_field) {
			read_arj_datetime(c, d, md, pos, &md->tmstamp[DE_TIMESTAMPIDX_MODIFY], "archive mod");
			pos += 4;
		}
		else {
			pos += 4;
		}
	}
	else {
		// Assume this field always exists, except for the main header and EOA.
		// We need it just to parse the file.
		md->cmpr_len = dbuf_getu32le_p(d->inf, &pos);
		de_dbg(c, "compressed size: %"I64_FMT, md->cmpr_len);
	}

	if(md->objtype==ARJ_OBJTYPE_MAINHDR && d->cv->is_old_secured) {
		// This is a guess
		de_dbg(c, "security data: %s",
			de_render_hexbytes_from_dbuf(d->inf, pos, 12, tmpbuf, sizeof(tmpbuf)));
		pos += 12;
		goto at_offset_32;
	}

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		n = dbuf_getu32le_p(d->inf, &pos);
		if(d->cv->is_secured) {
			de_dbg(c, "archive size: %"I64_FMT, n);
		}
	}
	else if(md->objtype==ARJ_OBJTYPE_MEMBERFILE) {
		md->orig_len = dbuf_getu32le_p(d->inf, &pos);
		de_dbg(c, "original size: %"I64_FMT, md->orig_len);
	}
	else {
		pos += 4;
	}

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		n = dbuf_getu32le_p(d->inf, &pos);
		if(d->cv->is_secured) {
			d->cv->security_envelope_pos = n;
			de_dbg(c, "security envelope pos: %"I64_FMT, d->cv->security_envelope_pos);
		}
		else if(d->cv->arjprot_flag) {
			d->cv->arjprot_pos = n; // This is a guess
			de_dbg(c, "ARJPROT data pos: %"I64_FMT, d->cv->arjprot_pos);
		}
	}
	else {
		md->crc_reported = (u32)dbuf_getu32le_p(d->inf, &pos);
		de_dbg(c, "crc (reported): 0x%08x", (UI)md->crc_reported);
	}

	n = dbuf_getu16le_p(d->inf, &pos);
	de_dbg(c, "filespec pos in filename: %d", (int)n);

	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		n = dbuf_getu16le_p(d->inf, &pos);
		if(d->cv->is_secured) {
			d->cv->security_envelope_len = n;
			de_dbg(c, "security envelope len: %"I64_FMT, d->cv->security_envelope_len);
		}
	}
	else {
		de_ucstring *mode_descr;

		md->file_mode = (UI)dbuf_getu16le_p(d->inf, &pos);
		mode_descr = ucstring_create(c);
		if(md->os==ARJ_OS_DOS || md->os==ARJ_OS_OS2 || md->os==ARJ_OS_WIN95 || md->os==ARJ_OS_WIN32) {
			de_describe_dos_attribs(c, md->file_mode, mode_descr, 0);
		}
		else if(md->os==ARJ_OS_UNIX || md->os==ARJ_OS_NEXT) {
			ucstring_printf(mode_descr, DE_ENCODING_LATIN1, "octal %03o", md->file_mode);
			if((md->file_mode)&0111) {
				md->is_executable = 1;
			}
			else {
				md->is_nonexecutable = 1;
			}
		}
		else {
			ucstring_append_char(mode_descr, '?');
		}

		de_dbg(c, "access mode: 0x%02x (%s)", md->file_mode, ucstring_getpsz_d(mode_descr));
		ucstring_destroy(mode_descr);
	}

at_offset_32:

	b = dbuf_getbyte_p(d->inf, &pos); // first chapter / encryption ver / host data (byte1) / unused
	if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
		if(md->has_encrver_field) {
			de_dbg(c, "encryption ver: %u", (UI)b);
			// We expect the GARBLED flag to be set in the main header when this field
			// is meaningful, but I don't think ARJ requires that.
			d->cv->encryption_ver = b;
		}
	}
	else {
		if(md->supports_chapters) {
			de_dbg(c, "first chapter: %u", (UI)b);
		}
	}

	b = dbuf_getbyte_p(d->inf, &pos); // last chapter / host data (byte2) / unused
	if(md->supports_chapters) {
		de_dbg(c, "last chapter: %u", (UI)b);
	}

	extra_data_len = first_hdr_endpos - pos;
	de_dbg(c, "extra data at %"I64_FMT", len=%"I64_FMT, pos, extra_data_len);
	if(extra_data_len>0) {
		de_dbg_indent(c, 1);

		if(md->objtype==ARJ_OBJTYPE_MAINHDR) {
			if(extra_data_len>=1) {
				b = dbuf_getbyte_p(d->inf, &pos);
				if(md->flags & 0x08) {
					de_dbg(c, "protection factor: %u", (UI)b);
				}
			}
			if(extra_data_len>=2) {
				b = dbuf_getbyte_p(d->inf, &pos);
				if(md->has_flags2_field) {
					de_dbg(c, "flags (2nd set): 0x%02x", (UI)b);
				}
			}
		}
		else if(md->objtype==ARJ_OBJTYPE_MEMBERFILE) {
			if(extra_data_len>=4) {
				md->extfile_pos = dbuf_getu32le_p(d->inf, &pos);
				de_dbg(c, "ext. file pos: %"I64_FMT, md->extfile_pos);
			}
			if(extra_data_len>=12) {
				read_arj_datetime(c, d, md, pos, &md->tmstamp[DE_TIMESTAMPIDX_ACCESS], "access");
				pos += 4;
				read_arj_datetime(c, d, md, pos, &md->tmstamp[DE_TIMESTAMPIDX_CREATE], "create");
				pos += 4;
			}
			if(extra_data_len>=16) {
				n = dbuf_getu32le_p(d->inf, &pos);
				de_dbg(c, "ext. orig size: %"I64_FMT, n);
			}
		}

		de_dbg_indent(c, -1);
	}

	de_dbg_indent(c, -1);
	pos = first_hdr_endpos; // Now at the offset of the filename field
	nbytes_avail = basic_hdr_endpos - pos;
	de_dbg(c, "filename/comment area at %"I64_FMT", len=%"I64_FMT, pos, nbytes_avail);
	de_dbg_indent(c, 1);
	md->name_srd = dbuf_read_string(d->inf, pos, nbytes_avail, 256, DE_CONVFLAG_STOP_AT_NUL,
		md->input_encoding);
	if(!(md->flags & 0x10)) {
		// "PATHSYM" flag missing, need to convert '\' to '/'
		fixup_path(md->name_srd->str);
	}
	de_dbg(c, "filename: \"%s\"", ucstring_getpsz_d(md->name_srd->str));

	if(md->name_srd->found_nul) {
		pos += md->name_srd->bytes_consumed;
		nbytes_avail = basic_hdr_endpos - pos;
		handle_comment(c, d, md, pos, nbytes_avail);
	}
	de_dbg_indent(c, -1);

	de_dbg_indent(c, -1);
	pos = basic_hdr_endpos; // Now at the offset just after the 'comment' field
	basic_hdr_crc_reported = (u32)dbuf_getu32le_p(d->inf, &pos);
	de_dbg(c, "basic hdr crc (reported): 0x%08x", (UI)basic_hdr_crc_reported);

	de_crcobj_reset(d->crco);
	de_crcobj_addslice(d->crco, d->inf, pos1+4, basic_hdr_size);
	basic_hdr_crc_calc = de_crcobj_getval(d->crco);
	de_dbg(c, "basic hdr crc (calculated): 0x%08x", (UI)basic_hdr_crc_calc);
	if(basic_hdr_crc_calc != basic_hdr_crc_reported) {
		de_warn(c, "Header CRC check failed");
	}

	if(!do_extended_headers(c, d, md, pos, &bytes_consumed)) {
		de_err(c, "Bad extended headers - can't continue");
		goto done;
	}
	pos += bytes_consumed;

	md->is_dir = (md->file_type==ARJ_FILETYPE_DIR);

	md->cmpr_pos = pos;
	if(md->objtype==ARJ_OBJTYPE_MEMBERFILE) {
		de_dbg(c, "compressed data at %"I64_FMT, md->cmpr_pos);
		de_dbg_indent(c, 1);
		extract_member_file(c, d, md);
		de_dbg_indent(c, -1);
	}
	pos += md->cmpr_len;

	*pbytes_consumed = pos - pos1;
	retval = 1;

done:
	ucstring_destroy(flags_descr);
	if(md) {
		de_destroy_stringreaderdata(c, md->name_srd);
		de_free(c, md);
	}
	de_dbg_indent_restore(c, saved_indent_level);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %r8, %r15
movl %ecx, 0x28(%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rdx, (%r14)
leaq 0x54(%rsp), %rsi
callq 0xe8a1c
movl $0xa0, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r13
movq (%rbp), %rdi
movq %r14, %rsi
callq 0xeebeb
movl %eax, 0x4(%r13)
cmpl $0xea60, %eax           # imm = 0xEA60
jne 0x3671e
movq %r15, 0x60(%rsp)
leaq 0xfad24(%rip), %rsi     # 0x1313bd
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq (%rbp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeebeb
movq %rax, %r15
leaq 0xe19a8(%rip), %rsi     # 0x118073
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
testq %r15, %r15
je 0x3673c
movq (%rbp), %rdi
leaq 0x5(%r12), %rsi
callq 0xeead3
movb %al, 0xd(%r13)
movq (%rbp), %rdi
leaq 0xa(%r12), %rsi
callq 0xeead3
movb %al, 0x13(%r13)
cmpb $0x2, %al
je 0x36775
movzbl %al, %ecx
cmpl $0x5, %ecx
jne 0x36783
leaq 0xe1cd9(%rip), %rdx     # 0x1183ed
movl $0x66, %ecx
jmp 0x367ac
leaq 0xe1934(%rip), %rsi     # 0x118059
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9295
xorl %r12d, %r12d
jmp 0x3794b
movl $0x68, 0x8(%r13)
leaq 0xe193f(%rip), %rsi     # 0x11808a
leaq 0xe1ca9(%rip), %rdx     # 0x1183fb
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x60(%rsp), %rax
movq $0x4, (%rax)
movl $0x2, %r12d
jmp 0x3794b
leaq 0xe2043(%rip), %rdx     # 0x1187bf
movl $0x64, %ecx
jmp 0x367ac
cmpb $0x5, %al
jae 0x36795
leaq 0xe1c53(%rip), %rdx     # 0x1183e1
movl $0x65, %ecx
jmp 0x367ac
leaq 0xf59b5(%rip), %rdx     # 0x12c151
movl $0x67, %ecx
cmpb $0x9, %al
jne 0x367ac
cmpb $0x33, 0xd(%r13)
je 0x36787
movq %r12, 0x30(%rsp)
movl %ecx, 0x8(%r13)
leaq 0xe18ce(%rip), %rsi     # 0x11808a
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0xa29, %r15            # imm = 0xA29
jl 0x367ea
leaq 0xe18c0(%rip), %rsi     # 0x118099
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
xorl %ebp, %ebp
jmp 0x3794b
leaq 0x10(%rsp), %r14
movq (%r14), %rdx
leaq 0xe18b0(%rip), %rsi     # 0x1180a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq (%r14), %rdx
leaq 0xe18a3(%rip), %rsi     # 0x1180bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbp, 0x18(%rsp)
movq (%rbp), %rdi
movq %r14, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe1885(%rip), %rsi     # 0x1180d1
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
movq %rdx, 0x48(%rsp)
xorl %eax, %eax
callq 0xe8617
incq (%r14)
movzbl 0xd(%r13), %r12d
leal -0x1(%r12), %eax
cmpb $0xa, %al
ja 0x368a6
leal -0x1(%r12), %eax
leaq 0xe1faf(%rip), %rdx     # 0x11882c
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0xe1c02(%rip), %rdx     # 0x11848d
leaq 0xa0(%rsp), %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0xe8193
movq 0x18(%rsp), %rbx
jmp 0x3690c
leal -0x64(%r12), %eax
cmpb $0x2, %al
movq 0x18(%rsp), %rbx
ja 0x368e4
leal -0x64(%r12), %eax
leaq 0xe1f98(%rip), %rdx     # 0x118858
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0xe1bc6(%rip), %rdx     # 0x118494
leaq 0xa0(%rsp), %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0xe8193
jmp 0x3690c
cmpl $0x33, %r12d
jne 0x368f3
leaq 0xe1bac(%rip), %rsi     # 0x11849d
jmp 0x368fa
leaq 0xf5857(%rip), %rsi     # 0x12c151
leaq 0xa0(%rsp), %rdi
movl $0x20, %edx
callq 0xe8219
leaq 0xe17d5(%rip), %rsi     # 0x1180e8
leaq 0xa0(%rsp), %rcx
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movb 0xd(%r13), %al
leal -0x9(%rax), %ecx
cmpb $0x29, %cl
setb %cl
cmpb $0x64, %al
setae %dl
orb %dl, %cl
movb %cl, 0x15(%r13)
leal -0x8(%rax), %ecx
cmpb $0x2a, %cl
setb %cl
orb %dl, %cl
movb %cl, 0x16(%r13)
movb %cl, 0x17(%r13)
leal -0xb(%rax), %ecx
cmpb $0x27, %cl
setb %cl
cmpb $0x66, %al
setae %dl
orb %cl, %dl
movb %dl, 0x18(%r13)
cmpb $0x6, %al
setae 0x19(%r13)
movq (%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xeeb4b
movb %al, 0xe(%r13)
movzbl %al, %edx
leaq 0xe1771(%rip), %rsi     # 0x118102
movq %rbp, %rdi
xorl %eax, %eax
callq 0xe8617
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xeeb4b
movb %al, 0xf(%r13)
movzbl %al, %edx
cmpb $0xb, %dl
ja 0x369c4
movl %edx, %eax
leaq 0xe1ea9(%rip), %rsi     # 0x118864
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x369cb
leaq 0xf5786(%rip), %rcx     # 0x12c151
movq 0x30(%rsp), %r12
leaq 0xe1742(%rip), %rsi     # 0x118119
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movzbl 0xf(%r13), %eax
cmpl $0x8, %eax
movq 0x18(%rsp), %rcx
je 0x369fa
cmpl $0x2, %eax
jne 0x36a09
movb 0xd(%r13), %al
addb $-0xb, %al
cmpb $0x26, %al
ja 0x36a09
movb $0x1, 0x10(%r13)
movq (%rcx), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
movb %al, 0x11(%r13)
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rbp
movb 0x11(%r13), %r14b
testb $0x1, %r14b
je 0x36a41
leaq 0xe1aa4(%rip), %rsi     # 0x1184da
movq %rbp, %rdi
callq 0xf7105
decb %r14b
testb $0x2, %r14b
je 0x36a71
cmpl $0x64, 0x8(%r13)
jne 0x36a71
cmpb $0x0, 0x15(%r13)
leaq 0xe1a91(%rip), %rax     # 0x1184eb
leaq 0xe1a81(%rip), %rsi     # 0x1184e2
cmoveq %rax, %rsi
movq %rbp, %rdi
callq 0xf7105
addb $-0x2, %r14b
testb $0x4, %r14b
je 0x36a8a
leaq 0xe1a79(%rip), %rsi     # 0x1184f7
movq %rbp, %rdi
callq 0xf7105
addb $-0x4, %r14b
testb $0x8, %r14b
je 0x36ab3
cmpl $0x64, 0x8(%r13)
leaq 0xe1a62(%rip), %rax     # 0x1184fe
leaq 0xe1a63(%rip), %rsi     # 0x118506
cmoveq %rax, %rsi
movq %rbp, %rdi
callq 0xf7105
addb $-0x8, %r14b
testb $0x10, %r14b
je 0x36acc
leaq 0xe1a4e(%rip), %rsi     # 0x11850e
movq %rbp, %rdi
callq 0xf7105
addb $-0x10, %r14b
testb $0x40, %r14b
je 0x36aec
cmpl $0x64, 0x8(%r13)
jne 0x36aec
leaq 0xe1a0f(%rip), %rsi     # 0x1184ef
movq %rbp, %rdi
callq 0xf7105
addb $-0x40, %r14b
testb %r14b, %r14b
jns 0x36b0b
cmpl $0x64, 0x8(%r13)
jne 0x36b10
leaq 0xe1a17(%rip), %rsi     # 0x118516
movq %rbp, %rdi
callq 0xf7105
andb $0x7f, %r14b
testb %r14b, %r14b
je 0x36b25
movzbl %r14b, %edx
leaq 0x10e1e0(%rip), %rsi    # 0x144cfb
movq %rbp, %rdi
xorl %eax, %eax
callq 0xf7132
movzbl 0x11(%r13), %r14d
movq %rbp, %rdi
callq 0xf70f6
leaq 0xf778f(%rip), %rsi     # 0x12e2c8
movq %rbx, %rdi
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movl 0x8(%r13), %r14d
cmpl $0x65, %r14d
je 0x36b9f
cmpl $0x64, %r14d
jne 0x36bd3
movb 0x11(%r13), %al
movb 0x15(%r13), %cl
testb %cl, %cl
sete %dl
testb $0x2, %al
sete %sil
orb %dl, %sil
jne 0x36b7e
movq 0x18(%rsp), %rdx
movq 0x8(%rdx), %rdx
movb $0x1, 0x18(%rdx)
testb $0x40, %al
jne 0x36bb5
testb %cl, %cl
setne %cl
testb $0x2, %al
sete %dl
orb %cl, %dl
jne 0x36bc2
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x1, 0x1a(%rcx)
jmp 0x36bc2
movb 0x11(%r13), %al
testb $0x4, %al
je 0x36bac
movb $0x1, 0x1a(%r13)
movq %r13, %rcx
testb $0x8, %al
jne 0x36bcf
jmp 0x36bd3
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x1, 0x19(%rcx)
testb $0x8, %al
je 0x36bd3
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movb $0x1, 0x1b(%rcx)
movq 0x18(%rsp), %rbx
movl 0x10(%rbx), %eax
movl %eax, (%r13)
testl %eax, %eax
jne 0x36bfb
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x18(%rax)
sete %cl
leal 0x9(,%rcx,4), %eax
movl %eax, (%r13)
movq (%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
cmpl $0x64, %r14d
jne 0x36c26
movq 0x8(%rbx), %rcx
cmpb $0x0, 0x19(%rcx)
movl 0x28(%rsp), %r14d
je 0x36c45
leaq 0xe1506(%rip), %rsi     # 0x11812a
jmp 0x36c36
movb %al, 0x12(%r13)
leaq 0xe150e(%rip), %rsi     # 0x11813f
movl 0x28(%rsp), %r14d
movzbl %al, %edx
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0xe8617
incq 0x10(%rsp)
movzbl 0x13(%r13), %edx
cmpl $0x5, %edx
ja 0x36c66
movl %edx, %eax
leaq 0xe1c37(%rip), %rsi     # 0x118894
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x36c6d
leaq 0xf54e4(%rip), %rcx     # 0x12c151
leaq 0xe14db(%rip), %rsi     # 0x11814f
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0xe8617
testl %r14d, %r14d
je 0x36c8c
cmpb $0x2, 0x13(%r13)
jne 0x36cf6
cmpl $0x67, 0x8(%r13)
jne 0x36cab
movzbl 0x13(%r13), %edx
leaq 0xe14e5(%rip), %rsi     # 0x118184
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0xe9295
movq (%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xeeb4b
movb %al, 0x14(%r13)
movzbl %al, %edx
leaq 0xe14d1(%rip), %rsi     # 0x11819a
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x8(%r13), %eax
movq (%r14), %rcx
cmpl $0x66, %eax
je 0x36d14
cmpl $0x64, %eax
jne 0x36d21
leaq 0x58(%r13), %r8
leaq 0xe14b7(%rip), %r9      # 0x1181ab
jmp 0x36d2c
leaq 0xe1465(%rip), %rsi     # 0x118162
xorl %r12d, %r12d
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x3794b
leaq 0x58(%r13), %r8
leaq 0xe1494(%rip), %r9      # 0x1181b3
jmp 0x36d2c
leaq 0x48(%r13), %r8
leaq 0xe14aa(%rip), %r9      # 0x1181d6
movq %rbx, %rdi
movq 0x18(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x37c76
movq 0x10(%rsp), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rsp)
cmpl $0x64, 0x8(%r13)
jne 0x36d80
movq $0x0, 0x30(%r13)
movq 0x8(%r14), %rax
cmpb $0x0, 0x1a(%rax)
je 0x36e8c
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
leaq 0xe143e(%rip), %rsi     # 0x1181bc
jmp 0x36d98
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
movq %rax, 0x30(%r13)
leaq 0xe7603(%rip), %rsi     # 0x11e39b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movl 0x8(%r13), %eax
cmpl $0x65, %eax
movq %rbp, 0x38(%rsp)
je 0x36e09
cmpl $0x64, %eax
jne 0x36e60
movq (%r14), %rdi
movq 0x8(%r14), %rax
cmpb $0x0, 0x1a(%rax)
je 0x36ebb
movq 0x10(%rsp), %rsi
leaq 0x120(%rsp), %rcx
movl $0xc, %edx
movl $0x40, %r8d
callq 0xe8abc
leaq 0xe13e9(%rip), %rsi     # 0x1181da
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0xc, 0x10(%rsp)
jmp 0x37036
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
movq %rax, 0x38(%r13)
leaq 0xe13cb(%rip), %rsi     # 0x1181ec
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpl $0x64, 0x8(%r13)
jne 0x36e66
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
movq 0x8(%r14), %rcx
cmpb $0x0, 0x19(%rcx)
je 0x36edf
movq %rax, 0x20(%rcx)
leaq 0xe13a4(%rip), %rsi     # 0x1181ff
jmp 0x36ef0
addq $0x4, 0x10(%rsp)
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
movl %eax, 0x24(%r13)
leaq 0x10d3e7(%rip), %rsi    # 0x144265
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
jmp 0x36efd
cmpb $0x0, 0x19(%r13)
je 0x36fe0
leaq 0x48(%r13), %r8
leaq 0xe132c(%rip), %r9      # 0x1181ce
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x37c76
addq $0x4, 0x10(%rsp)
jmp 0x36da5
leaq 0x10(%rsp), %rsi
callq 0xeed83
movq 0x8(%r14), %rcx
cmpb $0x0, 0x19(%rcx)
je 0x36e2e
leaq 0xe12e2(%rip), %rsi     # 0x1181bc
jmp 0x36e21
cmpb $0x0, 0x1b(%rcx)
je 0x36efd
movq %rax, 0x30(%rcx)
leaq 0xe132a(%rip), %rsi     # 0x11821a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq (%r14), %rdi
movq %rbx, %r12
movq %r14, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xeebeb
leaq 0xe1316(%rip), %rsi     # 0x118230
movq %r12, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl 0x8(%r13), %ebp
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xeebeb
cmpl $0x64, %ebp
jne 0x36f70
movq 0x8(%rbx), %rcx
cmpb $0x0, 0x19(%rcx)
movq %rbx, %r14
movq %r12, %rbx
movq 0x30(%rsp), %r12
je 0x37036
movq %rax, 0x28(%rcx)
leaq 0xe12ef(%rip), %rsi     # 0x11824d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x37036
movl %eax, 0x20(%r13)
movq %r12, %rdi
callq 0xf6410
movq %rax, %r12
movzbl 0xf(%r13), %eax
cmpl $0xb, %eax
movq %rbx, %r14
ja 0x36fee
movl $0xc21, %ecx            # imm = 0xC21
btl %eax, %ecx
jae 0x36fae
movl 0x20(%r13), %esi
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xeaae1
jmp 0x37007
movl $0x104, %ecx            # imm = 0x104
btl %eax, %ecx
jae 0x36fee
movl 0x20(%r13), %ecx
leaq 0xe12a5(%rip), %rdx     # 0x118268
movq %r12, %rdi
movl $0x5, %esi
xorl %eax, %eax
callq 0xf6653
testb $0x49, 0x20(%r13)
je 0x36ffd
movb $0x1, 0x1d(%r13)
jmp 0x37002
addq $0x4, %rcx
movq %rcx, 0x10(%rsp)
jmp 0x36da5
movq %r12, %rdi
movl $0x3f, %esi
callq 0xf6542
jmp 0x37002
movb $0x1, 0x1e(%r13)
movq 0x20(%rsp), %rbx
movl 0x20(%r13), %ebp
movq %r12, %rdi
callq 0xf70f6
leaq 0xe1259(%rip), %rsi     # 0x118273
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
callq 0xf6753
movq 0x30(%rsp), %r12
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
movl %eax, %ebp
cmpl $0x64, 0x8(%r13)
jne 0x37072
cmpb $0x0, 0x17(%r13)
je 0x3708e
movzbl %bpl, %edx
leaq 0xe122e(%rip), %rsi     # 0x11828c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x8(%r14), %rax
movb %bpl, 0x1c(%rax)
jmp 0x3708e
cmpb $0x0, 0x16(%r13)
je 0x3708e
movzbl %bpl, %edx
leaq 0xe121b(%rip), %rsi     # 0x11829f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x48(%rsp), %rax
leaq (%r12,%rax), %rbp
addq $0x4, %rbp
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
cmpb $0x0, 0x16(%r13)
je 0x370c3
movzbl %al, %edx
leaq 0xe11f8(%rip), %rsi     # 0x1182b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rsp), %r14
leaq 0xe11f3(%rip), %rsi     # 0x1182c2
movq %rbp, %rcx
subq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbp, %r12
subq %r14, %r12
jle 0x37240
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0x8(%r13), %eax
cmpl $0x65, %eax
je 0x37179
cmpl $0x64, %eax
movq 0x18(%rsp), %rbx
jne 0x3722e
movq (%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
testb $0x8, 0x11(%r13)
je 0x3713c
movzbl %al, %edx
leaq 0xe11ad(%rip), %rsi     # 0x1182dd
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0x1, %r12
je 0x3722e
movq (%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
cmpb $0x0, 0x18(%r13)
je 0x3722e
movzbl %al, %edx
leaq 0xe118b(%rip), %rsi     # 0x1182f3
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x3722e
cmpq $0x4, %r12
movq 0x18(%rsp), %r14
jb 0x3722e
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
movq %rax, 0x28(%r13)
leaq 0xe116b(%rip), %rsi     # 0x11830b
movq 0x20(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpq $0xc, %r12
jb 0x3722e
movq 0x10(%rsp), %rcx
leaq 0x68(%r13), %r8
leaq 0xde487(%rip), %r9      # 0x11564c
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x37c76
movq 0x10(%rsp), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rsp)
leaq 0x58(%r13), %r8
leaq 0xe112d(%rip), %r9      # 0x11831e
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x37c76
addq $0x4, 0x10(%rsp)
cmpq $0x10, %r12
jb 0x3722e
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeed83
leaq 0xe1106(%rip), %rsi     # 0x118325
movq 0x20(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbp, 0x10(%rsp)
movq %r15, %r14
subq 0x48(%rsp), %r14
leaq 0xe10d8(%rip), %rsi     # 0x118339
movq %rbx, %rdi
movq %rbp, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
movl (%r13), %r9d
movl $0x100, %ecx            # imm = 0x100
movq %r14, %rdx
movl $0x1, %r8d
callq 0xef87c
movq %rax, 0x98(%r13)
movq %r13, 0x40(%rsp)
testb $0x10, 0x11(%r13)
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %r12
jne 0x372e2
movq 0x10(%rdi), %rax
testq %rax, %rax
jle 0x372e2
movq 0x8(%rdi), %rcx
xorl %edx, %edx
cmpl $0x5c, (%rcx,%rdx,4)
jne 0x372da
movl $0x2f, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x372cd
leaq 0x4(%r12), %rbp
leaq (%r15,%r12), %r13
addq $0x4, %r13
callq 0xf70f6
leaq 0x104a53(%rip), %rsi    # 0x13bd4e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x40(%rsp), %rax
movq 0x98(%rax), %rax
cmpl $0x0, 0x34(%rax)
je 0x37413
movq %r15, 0x28(%rsp)
movq %rbp, %r15
movq 0x10(%rsp), %r14
addq (%rax), %r14
movq %r14, 0x10(%rsp)
movq %r13, %rbp
subq %r14, %rbp
cmpq $0x2, %rbp
jge 0x37347
xorl %r12d, %r12d
jmp 0x373f3
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rax
movzbl (%rax), %r9d
orl $0x300, %r9d            # imm = 0x300
movq %r14, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0xefbd7
cmpq $0x0, 0x10(%r12)
jle 0x373f3
movq %r12, %rdi
callq 0xf70f6
leaq 0xdd4eb(%rip), %rsi     # 0x114880
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpl $0x2, 0x90(%rbx)
movq %r15, %rbp
jl 0x373f9
movq 0x40(%rsp), %rax
cmpl $0x64, 0x8(%rax)
leaq 0xe1172(%rip), %rax     # 0x118533
leaq 0xe116a(%rip), %rsi     # 0x118532
cmoveq %rax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xefda1
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0xf6da2
jmp 0x373f9
xorl %r14d, %r14d
movq %r15, %rbp
movq 0x28(%rsp), %r15
movq %r14, %rdi
callq 0xf052b
movq %r12, %rdi
callq 0xf6753
movq 0x30(%rsp), %r12
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
leaq 0x10(%rsp), %rsi
movq %r13, (%rsi)
movq 0x18(%rsp), %rbx
movq (%rbx), %rdi
callq 0xeed83
movq %rax, %r14
leaq 0xe0f13(%rip), %rsi     # 0x11835f
movq 0x20(%rsp), %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x20(%rbx), %rdi
callq 0xeb7fe
movq (%rbx), %rsi
movq 0x20(%rbx), %rdi
movq %rbp, %rdx
movq %r15, %rcx
callq 0xeb944
movq 0x20(%rbx), %rdi
movq 0x20(%rsp), %rbx
callq 0xeb865
movl %eax, %ebp
leaq 0xe0ef3(%rip), %rsi     # 0x118380
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
cmpl %r14d, %ebp
je 0x374af
leaq 0xe0efe(%rip), %rsi     # 0x1183a3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8faa
movq 0x10(%rsp), %r15
leaq 0xc0(%rsp), %r14
movq %r15, (%r14)
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
leaq 0xe1073(%rip), %rsi     # 0x118546
movq %rbx, %rdi
movq %r15, 0x58(%rsp)
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rsp), %r13
movq (%r13), %rdi
movq %r14, %rsi
callq 0xeebeb
testq %rax, %rax
je 0x3764a
movq %rax, %r15
leaq 0xc0(%rsp), %rbx
movq 0x58(%rsp), %r14
xorl %edx, %edx
movq 0x20(%rsp), %r12
movq %r12, %rdi
leaq 0xe1029(%rip), %rsi     # 0x118556
movl %edx, 0x28(%rsp)
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0xe8617
movq %r12, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0xc0(%rsp), %r14
leaq (%r14,%r15), %rax
addq $0x4, %rax
movq (%r13), %rcx
cmpq 0x18(%rcx), %rax
jg 0x376f9
leaq (%r14,%r15), %r12
movq 0x20(%r13), %rdi
callq 0xeb7fe
movq (%r13), %rsi
movq 0x20(%r13), %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0xeb944
movq 0x20(%r13), %rdi
callq 0xeb865
movl %eax, 0x48(%rsp)
movq %r12, 0xc0(%rsp)
movq (%r13), %rdi
movq %rbx, %rsi
callq 0xeed83
movq %rax, %r12
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0xe0fb7(%rip), %rsi     # 0x118573
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
leaq 0xe0fc2(%rip), %rsi     # 0x118592
movl 0x48(%rsp), %ebp
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
cmpl %r12d, %ebp
movq 0x30(%rsp), %r12
jne 0x376f9
movq (%r13), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe8bea
movl 0x28(%rsp), %r15d
incl %r15d
movq %rbp, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0xc0(%rsp), %r14
movq (%r13), %rdi
movq %rbx, %rsi
callq 0xeebeb
movl %r15d, %edx
movq %rax, %r15
testq %rax, %rax
jne 0x3751e
movq 0xc0(%rsp), %rdx
leaq 0xe0ee6(%rip), %rsi     # 0x11853f
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0xc0(%rsp), %r14
movl 0x68(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
subq 0x58(%rsp), %r14
addq 0x10(%rsp), %r14
movq %r14, 0x10(%rsp)
movq 0x40(%rsp), %r13
cmpb $0x3, 0x13(%r13)
sete 0x1c(%r13)
movq %r14, 0x40(%r13)
cmpl $0x65, 0x8(%r13)
jne 0x3773b
leaq 0xfab7c(%rip), %rsi     # 0x13222c
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpl $0x65, 0x8(%r13)
movq 0x38(%rsp), %rbp
jne 0x37745
movq 0x98(%r13), %rax
testq %rax, %rax
movq 0x18(%rsp), %r14
je 0x378f4
cmpb $0x0, 0x1c(%r13)
je 0x3774f
xorl %ecx, %ecx
jmp 0x37757
movl 0x68(%rsp), %esi
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0xe8a25
leaq 0xe0caa(%rip), %rsi     # 0x1183bb
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq 0x38(%rsp), %rdi
callq 0xf6753
movq 0x40(%rsp), %r13
testq %r13, %r13
jne 0x37953
jmp 0x3796d
movq 0x38(%rsp), %rbp
jmp 0x37931
movq 0x18(%rsp), %r14
jmp 0x378f7
cmpq $0x0, 0x38(%r13)
setne %cl
cmpb $0x9, 0x13(%r13)
jne 0x37783
movq 0x18(%rax), %rdi
callq 0xf70f6
leaq 0xe0e45(%rip), %rsi     # 0x1185b3
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
jmp 0x378f7
testb $0x1, 0x11(%r13)
sete %dl
movl %ecx, %esi
xorb $0x1, %sil
orb %dl, %sil
jne 0x377d5
movq 0x18(%rax), %rdi
callq 0xf70f6
movq 0x8(%r14), %rcx
cmpb $0x2, 0x1c(%rcx)
leaq 0xe0e40(%rip), %rdx     # 0x1185ee
leaq 0xe0e41(%rip), %rcx     # 0x1185f6
cmovaeq %rdx, %rcx
leaq 0xe0e0d(%rip), %rsi     # 0x1185cd
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
jmp 0x378f7
testb %cl, %cl
je 0x3780a
cmpb $0x5, 0x12(%r13)
jb 0x3780a
movq 0x18(%rax), %rdi
callq 0xf70f6
movzbl 0x12(%r13), %ecx
leaq 0xe0e07(%rip), %rsi     # 0x1185fc
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
jmp 0x378f7
movq 0x28(%r14), %rcx
movb 0x1b(%r13), %dl
testq %rcx, %rcx
je 0x3783d
testb %dl, %dl
je 0x37828
movq 0x28(%r13), %rax
movb $0x1, %bpl
cmpq 0x18(%rcx), %rax
je 0x3788c
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x3658f
movb $0x1, %bpl
jmp 0x3788c
movb $0x1, %bpl
testb %dl, %dl
je 0x3788c
movb 0x14(%r14), %r14b
movq 0x18(%rax), %rdi
callq 0xf70f6
testb %r14b, %r14b
je 0x37871
leaq 0xe0e06(%rip), %rsi     # 0x118663
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
movb $0x1, 0xc(%r13)
jmp 0x37887
leaq 0xe0e17(%rip), %rsi     # 0x11868f
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8faa
movq 0x18(%rsp), %r14
cmpq $0x0, 0x28(%r14)
jne 0x378d7
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x3658f
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, 0x28(%r14)
movq %rbx, %rdi
callq 0xf6410
movq 0x28(%r14), %rcx
movq %rax, 0x8(%rcx)
movq 0x98(%r13), %rcx
movq 0x18(%rcx), %rsi
movq %rax, %rdi
callq 0xf6509
testb %bpl, %bpl
jne 0x378e4
movq 0x28(%r14), %rax
movb $0x1, 0x10(%rax)
cmpb $0x0, 0xc(%r13)
movq 0x38(%rsp), %rbp
je 0x379fa
xorl %r15d, %r15d
cmpb $0x0, 0xc(%r13)
je 0x3798e
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3658f
testq %r15, %r15
je 0x3791f
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea50e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x10(%rsp), %r14
addq 0x30(%r13), %r14
movq %r14, 0x10(%rsp)
subq %r12, %r14
movq 0x60(%rsp), %rax
movq %r14, (%rax)
movl $0x1, %r12d
movq %rbp, %rdi
callq 0xf6753
movq 0x98(%r13), %rsi
movq %rbx, %rdi
callq 0xefaca
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe8be2
movl 0x54(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movl %r12d, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%r14), %rax
testq %rax, %rax
je 0x3790f
cmpb $0x0, 0x1a(%r13)
jne 0x3790f
movl 0x14(%rax), %edx
cmpl $0x2, %edx
jl 0x37902
leaq 0xe0c6e(%rip), %rsi     # 0x118627
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x28(%r14), %rax
movq 0x20(%rax), %rdx
leaq 0xe0c67(%rip), %rsi     # 0x118639
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x28(%r14), %rax
movq 0x18(%rax), %rdx
leaq 0xe0c63(%rip), %rsi     # 0x11864e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x37902
movq 0x28(%r14), %rax
movdqu 0x30(%r13), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu 0x18(%rax), %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0x18(%rax)
incl 0x14(%rax)
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movq 0x98(%r13), %rax
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xea53f
movb $0x1, 0x8(%r15)
movb 0x1c(%r13), %al
movb %al, 0x9(%r15)
cmpb $0x4, 0x13(%r13)
sete %cl
sete 0xa(%r15)
testb %al, %al
setne %al
orb %cl, %al
testb $0x1, %al
jne 0x37a81
movl $0x2, %eax
cmpb $0x0, 0x1d(%r13)
jne 0x37a7d
movl $0x1, %eax
cmpb $0x0, 0x1e(%r13)
je 0x37a81
orl %eax, 0x14(%r15)
movl $0x48, %eax
movdqu (%r13,%rax), %xmm0
movdqu %xmm0, -0x30(%r15,%rax)
addq $0x10, %rax
cmpq $0x98, %rax
jne 0x37a86
movq 0x28(%r14), %rax
cmpq $0x0, (%rax)
jne 0x37ac8
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xefda1
movq 0x28(%r14), %rcx
movq %rax, (%rcx)
movq %rax, %rdi
callq 0xf0855
cmpb $0x0, 0x1c(%r13)
jne 0x378f7
leaq 0x68(%rsp), %r14
leaq 0x88(%rsp), %r12
leaq 0xc0(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xfa1dc
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, (%r14)
movq 0x40(%r13), %rax
movq %rax, 0x8(%r14)
movq 0x30(%r13), %rax
movq %rax, 0x10(%r14)
movq 0x18(%rsp), %r14
movq 0x28(%r14), %rax
movq (%rax), %rax
movq %rax, (%r12)
movb $0x1, 0x8(%r12)
movq 0x38(%r13), %rax
movq %rax, 0x10(%r12)
movq 0x20(%r14), %rdi
callq 0xeb7fe
movq 0x20(%r14), %rdx
movq 0x28(%r14), %rax
movq (%rax), %rdi
leaq 0xb9906(%rip), %rsi     # 0xf1451
callq 0xf1412
cmpq $0x0, 0x38(%r13)
je 0x37bcb
movb 0x12(%r13), %al
testb %al, %al
je 0x37b85
cmpb $0x3, %al
ja 0x37ba7
leaq 0x68(%rsp), %rdx
leaq 0x88(%rsp), %rcx
leaq 0xc0(%rsp), %r8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x37d48
jmp 0x37bcb
leaq 0x68(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0xfa510
jmp 0x37bcb
cmpb $0x4, %al
jne 0x37bcb
leaq 0x68(%rsp), %rdx
leaq 0x88(%rsp), %rcx
leaq 0xc0(%rsp), %r8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x37df3
movq 0x88(%rsp), %rdi
callq 0xf08ba
cmpl $0x0, 0xc0(%rsp)
movq 0x30(%rsp), %r12
je 0x37c24
movq 0x98(%r13), %rax
movq 0x18(%rax), %rdi
callq 0xf70f6
movq %rax, %r14
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0xfa1a4
leaq 0xdc60c(%rip), %rsi     # 0x11421d
movq %rbx, %rdi
movq %r14, %rdx
movq 0x18(%rsp), %r14
movq %rax, %rcx
jmp 0x377c9
movq 0x20(%r14), %rdi
callq 0xeb865
movl %eax, %ebp
leaq 0xe0754(%rip), %rsi     # 0x11838a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
cmpl 0x24(%r13), %ebp
je 0x37c6c
movq 0x98(%r13), %rax
movq 0x18(%rax), %rdi
callq 0xf70f6
leaq 0xdcfe8(%rip), %rsi     # 0x114c47
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
movq 0x38(%rsp), %rbp
jmp 0x378f7