// File: /workspace/github_c_makefile_star2_O1/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, %r12
movl %ecx, 0x18(%rsp)
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r13
leaq 0x8(%rsp), %r14
movq %rdx, (%r14)
leaq 0x44(%rsp), %rsi
callq 0xe958c
movl $0xa0, %esi
movq %r13, %rdi
callq 0xe969b
movq %rax, %r15
movq (%rbp), %rdi
movq %r14, %rsi
callq 0xef1ed
movl %eax, 0x4(%r15)
cmpl $0xea60, %eax           # imm = 0xEA60
jne 0x368ab
movq %r12, 0x50(%rsp)
leaq 0xfa856(%rip), %rsi     # 0x13107d
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%rbp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef1ed
movq %rax, %r12
leaq 0xe16e2(%rip), %rsi     # 0x117f3b
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
testq %r12, %r12
movq %rbx, 0x38(%rsp)
je 0x368c7
movq (%rbp), %rdi
leaq 0x5(%rbx), %rsi
callq 0xef0d5
movb %al, 0xd(%r15)
movq %rbp, %r14
movq (%rbp), %rdi
leaq 0xa(%rbx), %rsi
callq 0xef0d5
movb %al, 0x13(%r15)
cmpb $0x2, %al
je 0x368ce
movzbl %al, %ecx
cmpl $0x5, %ecx
movq %r14, %rbp
jne 0x368d8
movl $0x66, %ecx
jmp 0x368f1
leaq 0xe166f(%rip), %rsi     # 0x117f21
xorl %r12d, %r12d
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x36949
movl $0x68, %ecx
jmp 0x368f1
movl $0x64, %ecx
movq %r14, %rbp
jmp 0x368f1
movl $0x65, %ecx
cmpb $0x5, %al
jb 0x368f1
cmpb $0x9, %al
jne 0x368ec
cmpb $0x33, 0xd(%r15)
je 0x368f1
movl $0x67, %ecx
movl %ecx, 0x8(%r15)
addl $-0x64, %ecx
cmpl $0x4, %ecx
ja 0x3690f
movl %ecx, %eax
leaq 0xe1e56(%rip), %rcx     # 0x11875c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmp 0x36916
leaq 0xf5553(%rip), %rdx     # 0x12be69
leaq 0xe1635(%rip), %rsi     # 0x117f52
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
testq %r12, %r12
je 0x36950
cmpq $0xa29, %r12            # imm = 0xA29
jl 0x36969
leaq 0xe1625(%rip), %rsi     # 0x117f61
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9df7
xorl %ebp, %ebp
jmp 0x37a69
movq 0x50(%rsp), %rax
movq $0x4, (%rax)
movl $0x2, %ebp
xorl %r12d, %r12d
jmp 0x37a69
leaq 0x8(%rsp), %r14
movq (%r14), %rdx
leaq 0xe15f9(%rip), %rsi     # 0x117f71
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%r14), %rdx
leaq 0xe15ec(%rip), %rsi     # 0x117f85
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%rbp), %rdi
movq %r14, %rsi
callq 0xef14d
movzbl %al, %edx
leaq 0xe15d3(%rip), %rsi     # 0x117f99
movq %r13, %rdi
movq %rdx, 0x28(%rsp)
xorl %eax, %eax
callq 0xe9226
incq (%r14)
movq %r15, 0x20(%rsp)
movzbl 0xd(%r15), %r15d
leal -0x1(%r15), %eax
cmpb $0xa, %al
ja 0x36a05
leal -0x1(%r15), %eax
leaq 0xe1cff(%rip), %rdx     # 0x1186f4
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0xe1952(%rip), %rdx     # 0x118355
jmp 0x36a26
leal -0x64(%r15), %eax
cmpb $0x2, %al
ja 0x36a3c
leal -0x64(%r15), %eax
leaq 0xe1d08(%rip), %rdx     # 0x118720
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0xe1936(%rip), %rdx     # 0x11835c
leaq 0xa0(%rsp), %rdi
movl $0x20, %esi
xorl %eax, %eax
callq 0xe8d67
jmp 0x36a64
cmpl $0x33, %r15d
jne 0x36a4b
leaq 0xe191c(%rip), %rsi     # 0x118365
jmp 0x36a52
leaq 0xf5417(%rip), %rsi     # 0x12be69
leaq 0xa0(%rsp), %rdi
movl $0x20, %edx
callq 0xe8ded
leaq 0xe1545(%rip), %rsi     # 0x117fb0
leaq 0xa0(%rsp), %rcx
movq %r13, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x20(%rsp), %r15
movb 0xd(%r15), %al
leal -0x9(%rax), %ecx
cmpb $0x29, %cl
setb %cl
cmpb $0x64, %al
setae %dl
orb %dl, %cl
movb %cl, 0x15(%r15)
leal -0x8(%rax), %ecx
cmpb $0x2a, %cl
setb %cl
orb %dl, %cl
movb %cl, 0x16(%r15)
movb %cl, 0x17(%r15)
leal -0xb(%rax), %ecx
cmpb $0x27, %cl
setb %cl
cmpb $0x66, %al
setae %dl
orb %cl, %dl
movb %dl, 0x18(%r15)
cmpb $0x6, %al
setae 0x19(%r15)
movq (%rbp), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xef14d
movb %al, 0xe(%r15)
movzbl %al, %edx
leaq 0xe14e0(%rip), %rsi     # 0x117fca
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq (%rbp), %rdi
movq %r14, %rsi
callq 0xef14d
movb %al, 0xf(%r15)
movzbl %al, %edx
cmpb $0xb, %dl
ja 0x36b1e
movl %edx, %eax
leaq 0xe1c17(%rip), %rsi     # 0x11872c
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x36b25
leaq 0xf5344(%rip), %rcx     # 0x12be69
movq %r12, 0x30(%rsp)
leaq 0xe14b0(%rip), %rsi     # 0x117fe1
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movzbl 0xf(%r15), %eax
cmpl $0x8, %eax
je 0x36b4a
cmpl $0x2, %eax
jne 0x36b59
movb 0xd(%r15), %al
addb $-0xb, %al
cmpb $0x26, %al
ja 0x36b59
movb $0x1, 0x10(%r15)
movq %rbp, 0x10(%rsp)
movq (%rbp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movb %al, 0x11(%r15)
movq %r13, %rdi
callq 0xf6870
movq %rax, %r12
movb 0x11(%r15), %bl
testb $0x1, %bl
je 0x36b95
leaq 0xe1817(%rip), %rsi     # 0x1183a2
movq %r12, %rdi
callq 0xf7566
decb %bl
testb $0x2, %bl
je 0x36bc3
cmpl $0x64, 0x8(%r15)
jne 0x36bc3
cmpb $0x0, 0x15(%r15)
leaq 0xe1806(%rip), %rax     # 0x1183b3
leaq 0xe17f6(%rip), %rsi     # 0x1183aa
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0xf7566
addb $-0x2, %bl
testb $0x4, %bl
je 0x36bda
leaq 0xe17f0(%rip), %rsi     # 0x1183bf
movq %r12, %rdi
callq 0xf7566
addb $-0x4, %bl
testb $0x8, %bl
je 0x36c01
cmpl $0x64, 0x8(%r15)
leaq 0xe17db(%rip), %rax     # 0x1183c6
leaq 0xe17dc(%rip), %rsi     # 0x1183ce
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0xf7566
addb $-0x8, %bl
testb $0x10, %bl
je 0x36c18
leaq 0xe17c9(%rip), %rsi     # 0x1183d6
movq %r12, %rdi
callq 0xf7566
addb $-0x10, %bl
testb $0x40, %bl
je 0x36c36
cmpl $0x64, 0x8(%r15)
jne 0x36c36
leaq 0xe178c(%rip), %rsi     # 0x1183b7
movq %r12, %rdi
callq 0xf7566
addb $-0x40, %bl
testb %bl, %bl
jns 0x36c53
cmpl $0x64, 0x8(%r15)
jne 0x36c53
leaq 0xe1796(%rip), %rsi     # 0x1183de
movq %r12, %rdi
callq 0xf7566
andb $0x7f, %bl
testb %bl, %bl
je 0x36c6b
movzbl %bl, %edx
leaq 0x10dbba(%rip), %rsi    # 0x14481b
movq %r12, %rdi
xorl %eax, %eax
callq 0xf7593
movzbl 0x11(%r15), %r14d
movq %r12, %rdi
callq 0xf7557
leaq 0xf7351(%rip), %rsi     # 0x12dfd0
movq %r13, %rdi
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movl 0x8(%r15), %ebx
cmpl $0x65, %ebx
je 0x36cdf
cmpl $0x64, %ebx
jne 0x36d13
movb 0x15(%r15), %cl
testb %cl, %cl
je 0x36cb9
testb $0x2, 0x11(%r15)
je 0x36cb9
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movb $0x1, 0x18(%rax)
movzbl 0x11(%r15), %eax
testb $0x40, %al
jne 0x36cf5
testb %cl, %cl
setne %cl
testb $0x2, %al
sete %dl
orb %cl, %dl
jne 0x36d02
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x1, 0x1a(%rcx)
jmp 0x36d02
movb 0x11(%r15), %al
testb $0x4, %al
je 0x36cec
movb $0x1, 0x1a(%r15)
movq %r15, %rcx
testb $0x8, %al
jne 0x36d0f
jmp 0x36d13
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x1, 0x19(%rcx)
testb $0x8, %al
je 0x36d13
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movb $0x1, 0x1b(%rcx)
movq 0x10(%rsp), %r14
movl 0x10(%r14), %eax
movl %eax, (%r15)
testl %eax, %eax
jne 0x36d3a
movq 0x8(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x18(%rax)
sete %cl
leal 0x9(,%rcx,4), %eax
movl %eax, (%r15)
movq (%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
cmpl $0x64, %ebx
jne 0x36d62
movq 0x8(%r14), %rcx
cmpb $0x0, 0x19(%rcx)
movq %r14, %rbx
je 0x36d7d
leaq 0xe1292(%rip), %rsi     # 0x117ff2
jmp 0x36d70
movb %al, 0x12(%r15)
leaq 0xe129a(%rip), %rsi     # 0x118007
movq %r14, %rbx
movzbl %al, %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
incq 0x8(%rsp)
movzbl 0x13(%r15), %edx
cmpl $0x5, %edx
ja 0x36d9e
movl %edx, %eax
leaq 0xe19db(%rip), %rsi     # 0x118770
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x36da5
leaq 0xf50c4(%rip), %rcx     # 0x12be69
leaq 0xe126b(%rip), %rsi     # 0x118017
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
cmpl $0x0, 0x18(%rsp)
je 0x36dc4
cmpb $0x2, 0x13(%r15)
jne 0x36e27
cmpl $0x67, 0x8(%r15)
jne 0x36de1
movzbl 0x13(%r15), %edx
leaq 0xe1275(%rip), %rsi     # 0x11804c
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9df7
movq (%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xef14d
movb %al, 0x14(%r15)
movzbl %al, %edx
leaq 0xe1263(%rip), %rsi     # 0x118062
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movl 0x8(%r15), %eax
movq (%r14), %rcx
cmpl $0x66, %eax
je 0x36e3f
cmpl $0x64, %eax
jne 0x36e4c
leaq 0x58(%r15), %r8
leaq 0xe124e(%rip), %r9      # 0x118073
jmp 0x36e57
leaq 0xe11fc(%rip), %rsi     # 0x11802a
xorl %ebp, %ebp
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x37a69
leaq 0x58(%r15), %r8
leaq 0xe1231(%rip), %r9      # 0x11807b
jmp 0x36e57
leaq 0x48(%r15), %r8
leaq 0xe1247(%rip), %r9      # 0x11809e
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x37d85
addq $0x4, 0x8(%rsp)
cmpl $0x64, 0x8(%r15)
jne 0x36e9e
movq $0x0, 0x30(%r15)
movq 0x8(%rbx), %rax
cmpb $0x0, 0x1a(%rax)
je 0x36f27
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
leaq 0xe11e8(%rip), %rsi     # 0x118084
jmp 0x36eb6
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
movq %rax, 0x30(%r15)
leaq 0xe73d5(%rip), %rsi     # 0x11e28b
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movl 0x8(%r15), %eax
cmpl $0x65, %eax
movq %r12, 0x48(%rsp)
je 0x36f95
cmpl $0x64, %eax
jne 0x36fbc
movq 0x8(%rbx), %rcx
cmpb $0x0, 0x1a(%rcx)
je 0x36f5b
movq (%rbx), %rdi
movq 0x8(%rsp), %rsi
leaq 0x120(%rsp), %rcx
movl $0xc, %edx
movl $0x40, %r8d
callq 0xe962c
leaq 0xe1193(%rip), %rsi     # 0x1180a2
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq $0xc, 0x8(%rsp)
jmp 0x37182
cmpb $0x0, 0x19(%r15)
movq 0x8(%rsp), %rcx
je 0x37133
leaq 0x48(%r15), %r8
leaq 0xe1154(%rip), %r9      # 0x118096
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x37d85
addq $0x4, 0x8(%rsp)
jmp 0x36ec3
cmpl $0x65, %eax
je 0x36f95
cmpl $0x64, %eax
jne 0x36fbc
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
movq 0x8(%rbx), %rcx
cmpb $0x0, 0x19(%rcx)
movq %rbx, %r14
je 0x36fc5
leaq 0xe10fe(%rip), %rsi     # 0x118084
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x36fc5
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
movq %rax, 0x38(%r15)
leaq 0xe1107(%rip), %rsi     # 0x1180b4
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x36fc2
addq $0x4, 0x8(%rsp)
movq %rbx, %r14
movl 0x8(%r15), %ebx
movq (%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
cmpl $0x64, %ebx
jne 0x37006
movq 0x8(%r14), %rcx
cmpb $0x0, 0x19(%rcx)
movq %r14, %rbx
je 0x370d2
movq %rax, 0x20(%rcx)
leaq 0xe10d0(%rip), %rsi     # 0x1180c7
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x37020
movl %eax, 0x24(%r15)
leaq 0x10cd74(%rip), %rsi    # 0x143d85
movq %r13, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rbx
movq %r15, %rbp
movq (%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0xef1ed
leaq 0xe10be(%rip), %rsi     # 0x1180f8
movq %r13, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %r15
movl 0x8(%rbp), %ebx
movq (%r15), %rdi
movq %r14, %rsi
callq 0xef1ed
cmpl $0x64, %ebx
jne 0x3708d
movq 0x8(%r15), %rcx
cmpb $0x0, 0x19(%rcx)
movq %r15, %rbx
movq %rbp, %r15
je 0x37182
movq %rax, 0x28(%rcx)
leaq 0xe109a(%rip), %rsi     # 0x118115
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x37182
movl %eax, 0x20(%rbp)
movq %r13, %rdi
callq 0xf6870
movq %rax, %r14
movq %rbp, %r12
movzbl 0xf(%rbp), %eax
cmpl $0xb, %eax
movq %r15, %rbx
ja 0x37141
movl $0xc21, %ecx            # imm = 0xC21
btl %eax, %ecx
jae 0x370fc
movq %r12, %r15
movl 0x20(%r12), %esi
movq %r13, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xeb03c
jmp 0x37158
cmpb $0x0, 0x1b(%rcx)
movq %r15, %rbp
je 0x37023
movq %rax, 0x30(%rcx)
leaq 0xe0ff8(%rip), %rsi     # 0x1180e2
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x37023
movl $0x104, %ecx            # imm = 0x104
btl %eax, %ecx
jae 0x37141
movq %r12, %r15
movl 0x20(%r12), %ecx
leaq 0xe101b(%rip), %rdx     # 0x118130
movq %r14, %rdi
movl $0x5, %esi
xorl %eax, %eax
callq 0xf6ab0
testb $0x49, 0x20(%r12)
je 0x37153
movb $0x1, 0x1d(%r15)
jmp 0x37158
addq $0x4, %rcx
movq %rcx, 0x8(%rsp)
jmp 0x36ec3
movq %r14, %rdi
movl $0x3f, %esi
callq 0xf69a2
movq %r12, %r15
jmp 0x37158
movb $0x1, 0x1e(%r15)
movl 0x20(%r15), %ebp
movq %r14, %rdi
callq 0xf7557
leaq 0xe0fd0(%rip), %rsi     # 0x11813b
movq %r13, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
callq 0xf6bb0
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
movl %eax, %ebp
cmpl $0x64, 0x8(%r15)
jne 0x371be
cmpb $0x0, 0x17(%r15)
je 0x371da
movzbl %bpl, %edx
leaq 0xe0faa(%rip), %rsi     # 0x118154
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x8(%rbx), %rax
movb %bpl, 0x1c(%rax)
jmp 0x371da
cmpb $0x0, 0x16(%r15)
je 0x371da
movzbl %bpl, %edx
leaq 0xe0f97(%rip), %rsi     # 0x118167
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
leaq (%rax,%rcx), %rbp
addq $0x4, %rbp
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
cmpb $0x0, 0x16(%r15)
je 0x37214
movzbl %al, %edx
leaq 0xe0f6f(%rip), %rsi     # 0x118179
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x8(%rsp), %r14
leaq 0xe0f6a(%rip), %rsi     # 0x11818a
movq %rbp, %rcx
subq %r14, %rcx
movq %r13, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbp, %rbx
subq %r14, %rbx
jle 0x3738a
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movl 0x8(%r15), %eax
cmpl $0x65, %eax
je 0x372cb
cmpl $0x64, %eax
jne 0x3737d
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
testb $0x8, 0x11(%r15)
je 0x3728b
movzbl %al, %edx
leaq 0xe0f24(%rip), %rsi     # 0x1181a5
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
cmpq $0x1, %rbx
je 0x3737d
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef14d
cmpb $0x0, 0x18(%r15)
je 0x3737d
movzbl %al, %edx
leaq 0xe0eff(%rip), %rsi     # 0x1181bb
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
jmp 0x3737d
cmpq $0x4, %rbx
jl 0x372fb
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
movq %rax, 0x28(%r15)
leaq 0xe0ee5(%rip), %rsi     # 0x1181d3
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpq $0xc, %rbx
jl 0x37351
movq 0x8(%rsp), %rcx
leaq 0x68(%r15), %r8
leaq 0xde28b(%rip), %r9      # 0x11559c
movq %r13, %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x37d85
movq 0x8(%rsp), %rcx
addq $0x4, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x58(%r15), %r8
leaq 0xe0ea9(%rip), %r9      # 0x1181e6
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x37d85
addq $0x4, 0x8(%rsp)
cmpq $0x10, %rbx
jl 0x3737d
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0xef3a0
leaq 0xe0e7d(%rip), %rsi     # 0x1181ed
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbp, 0x8(%rsp)
movq 0x30(%rsp), %r14
subq 0x28(%rsp), %r14
leaq 0xe0e54(%rip), %rsi     # 0x118201
movq %r13, %rdi
movq %rbp, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
movl (%r15), %r9d
movl $0x100, %ecx            # imm = 0x100
movq %r14, %rdx
movl $0x1, %r8d
callq 0xefe67
movq %rax, 0x98(%r15)
testb $0x10, 0x11(%r15)
jne 0x37423
movq 0x18(%rax), %rdx
movq 0x10(%rdx), %rcx
testq %rcx, %rcx
jle 0x37423
movq 0x8(%rdx), %rdx
xorl %esi, %esi
cmpl $0x5c, (%rdx,%rsi,4)
jne 0x3741b
movl $0x2f, (%rdx,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x3740e
movq 0x38(%rsp), %rcx
leaq 0x4(%rcx), %rbp
movq 0x30(%rsp), %rdx
leaq (%rdx,%rcx), %rbx
addq $0x4, %rbx
movq 0x18(%rax), %rdi
callq 0xf7557
leaq 0x10458b(%rip), %rsi    # 0x13b9d4
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x98(%r15), %rax
cmpl $0x0, 0x34(%rax)
je 0x37558
movq %rbp, 0x18(%rsp)
movq 0x8(%rsp), %r15
addq (%rax), %r15
movq %r15, 0x8(%rsp)
movq %rbx, %rbp
subq %r15, %rbp
cmpq $0x2, %rbp
jge 0x3748d
xorl %r14d, %r14d
jmp 0x3753b
movq %r13, %rdi
callq 0xf6870
movq %rax, %r14
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rax
movzbl (%rax), %r9d
orl $0x300, %r9d            # imm = 0x300
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movl $0x1, %r8d
callq 0xf01b0
cmpq $0x0, 0x10(%r14)
jle 0x3753b
movq %r14, %rdi
callq 0xf7557
leaq 0xdd2cb(%rip), %rsi     # 0x1147a5
xorl %r15d, %r15d
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpl $0x2, 0x90(%r13)
movq 0x18(%rsp), %rbp
jl 0x37543
movq 0x20(%rsp), %rax
cmpl $0x64, 0x8(%rax)
leaq 0xe0ef2(%rip), %rax     # 0x1183fb
leaq 0xe0eea(%rip), %rsi     # 0x1183fa
cmoveq %rax, %rsi
movq %r13, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0xf71f7
jmp 0x37543
xorl %r15d, %r15d
movq 0x18(%rsp), %rbp
movq %r15, %rdi
callq 0xf0b13
movq %r14, %rdi
callq 0xf6bb0
movq 0x20(%rsp), %r15
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq 0x10(%rsp), %rbx
movq (%rbx), %rdi
callq 0xef3a0
movq %rax, %r14
leaq 0xe0c96(%rip), %rsi     # 0x118227
movq $0x0, 0x28(%rsp)
movq %r13, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x20(%rbx), %rdi
callq 0xebdc3
movq (%rbx), %rsi
movq 0x20(%rbx), %rdi
movq %rbp, %rdx
movq 0x30(%rsp), %rcx
callq 0xebf09
movq 0x20(%rbx), %rdi
callq 0xebe2a
movl %eax, %ebp
leaq 0xe0c72(%rip), %rsi     # 0x118248
movq %r13, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
cmpl %r14d, %ebp
je 0x375f8
leaq 0xe0c7d(%rip), %rsi     # 0x11826b
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9b27
movq 0x8(%rsp), %r14
leaq 0xc0(%rsp), %rax
movq %r14, (%rax)
leaq 0x80(%rsp), %rsi
movq %r13, %rdi
callq 0xe958c
leaq 0xe0def(%rip), %rsi     # 0x11840e
movq %r13, %rdi
movq %r14, 0x60(%rsp)
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movl $0x0, 0x18(%rsp)
movq %r13, 0x58(%rsp)
movq 0xc0(%rsp), %r12
movq (%rbx), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xef1ed
testq %rax, %rax
je 0x37771
movq %rax, %r14
xorl %ebp, %ebp
movq %r13, %rdi
leaq 0xe0da3(%rip), %rsi     # 0x11841e
movl 0x18(%rsp), %edx
movq %r12, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0xc0(%rsp), %r12
leaq (%r12,%r14), %rax
addq $0x4, %rax
movq (%rbx), %rcx
cmpq 0x18(%rcx), %rax
jg 0x377a8
movq %rbx, %r15
movq %r14, %rbx
addq %r12, %rbx
movq 0x20(%r15), %rdi
callq 0xebdc3
movq (%r15), %rsi
movq 0x20(%r15), %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0xebf09
movq 0x20(%r15), %rdi
callq 0xebe2a
movl %eax, 0x30(%rsp)
movq %rbx, 0xc0(%rsp)
movq (%r15), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xef3a0
movq %rax, %rbx
xorl %ebp, %ebp
movq %r13, %rdi
leaq 0xe0d2d(%rip), %rsi     # 0x11843b
movl %ebx, %edx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
leaq 0xe0d39(%rip), %rsi     # 0x11845a
movl 0x30(%rsp), %r13d
movl %r13d, %edx
xorl %eax, %eax
callq 0xe9226
cmpl %ebx, %r13d
jne 0x37798
movq (%r15), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq 0x58(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %r9d, %r9d
callq 0xe975a
incl 0x18(%rsp)
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movb $0x1, %bpl
jmp 0x3779d
movq 0xc0(%rsp), %rdx
xorl %ebp, %ebp
movq %r13, %rdi
leaq 0xe0c82(%rip), %rsi     # 0x118407
xorl %eax, %eax
callq 0xe9226
movl $0x1, %eax
movq %rax, 0x28(%rsp)
jmp 0x377a8
movq 0x58(%rsp), %r13
movq 0x20(%rsp), %rax
movq %r15, %rbx
movq %rax, %r15
testb %bpl, %bpl
jne 0x3764b
movq 0xc0(%rsp), %r14
movl 0x80(%rsp), %esi
movq %r13, %rdi
callq 0xe9595
cmpl $0x0, 0x28(%rsp)
je 0x37841
subq 0x60(%rsp), %r14
addq 0x8(%rsp), %r14
movq %r14, 0x8(%rsp)
cmpb $0x3, 0x13(%r15)
sete 0x1c(%r15)
movq %r14, 0x40(%r15)
cmpl $0x65, 0x8(%r15)
jne 0x37a44
leaq 0xfa6aa(%rip), %rsi     # 0x131ea8
xorl %r12d, %r12d
movq %r13, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
movl $0x1, %esi
callq 0xe9585
cmpl $0x65, 0x8(%r15)
jne 0x37a0f
movq 0x98(%r15), %rax
testq %rax, %rax
je 0x37a0c
cmpb $0x0, 0x1c(%r15)
je 0x37859
xorl %ecx, %ecx
jmp 0x37861
leaq 0xe0a3b(%rip), %rsi     # 0x118283
xorl %ebp, %ebp
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x37a64
cmpq $0x0, 0x38(%r15)
setne %cl
cmpb $0x9, 0x13(%r15)
jne 0x3788d
movq 0x18(%rax), %rdi
callq 0xf7557
leaq 0xe0c03(%rip), %rsi     # 0x11847b
xorl %r12d, %r12d
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x37a0f
testb $0x1, 0x11(%r15)
sete %dl
movl %ecx, %esi
xorb $0x1, %sil
orb %dl, %sil
jne 0x378df
movq 0x18(%rax), %rdi
callq 0xf7557
movq 0x8(%rbx), %rcx
cmpb $0x2, 0x1c(%rcx)
leaq 0xe0bfe(%rip), %rdx     # 0x1184b6
leaq 0xe0bff(%rip), %rcx     # 0x1184be
cmovaeq %rdx, %rcx
leaq 0xe0bcb(%rip), %rsi     # 0x118495
xorl %r12d, %r12d
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x37a0f
testb %cl, %cl
je 0x37914
cmpb $0x5, 0x12(%r15)
jb 0x37914
movq 0x18(%rax), %rdi
callq 0xf7557
movzbl 0x12(%r15), %ecx
leaq 0xe0bc5(%rip), %rsi     # 0x1184c4
xorl %r12d, %r12d
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x37a0f
movq 0x28(%rbx), %rcx
movb 0x1b(%r15), %dl
testq %rcx, %rcx
je 0x3794d
testb %dl, %dl
setne %al
je 0x37933
movq 0x28(%r15), %rax
cmpq 0x18(%rcx), %rax
sete %al
movb $0x1, %bl
testb %al, %al
jne 0x3799b
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x3671d
jmp 0x3799b
movb $0x1, %bl
testb %dl, %dl
je 0x3799b
movq 0x10(%rsp), %rcx
movb 0x14(%rcx), %bpl
movq 0x18(%rax), %rdi
callq 0xf7557
testb %bpl, %bpl
je 0x37985
leaq 0xe0bba(%rip), %rsi     # 0x11852b
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0xc(%r15)
jmp 0x3799b
leaq 0xe0bcb(%rip), %rsi     # 0x118557
xorl %ebx, %ebx
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9b27
movq 0x10(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x379f0
movq %r13, %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq 0x3671d
movl $0x28, %esi
movq %r13, %rdi
callq 0xe969b
movq %rax, 0x28(%r14)
movq %r13, %rdi
callq 0xf6870
movq 0x28(%r14), %rcx
movq %rax, 0x8(%rcx)
movq 0x98(%r15), %rcx
movq 0x18(%rcx), %rsi
movq %rax, %rdi
callq 0xf6969
testb %bl, %bl
movq 0x10(%rsp), %rbx
jne 0x37a01
movq 0x28(%rbx), %rax
movb $0x1, 0x10(%rax)
cmpb $0x0, 0xc(%r15)
je 0x37b1c
xorl %r12d, %r12d
cmpb $0x0, 0xc(%r15)
je 0x37ab0
movq %r13, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3671d
testq %r12, %r12
je 0x37a37
movq %r13, %rdi
movq %r12, %rsi
callq 0xea9b3
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x8(%rsp), %rax
addq 0x30(%r15), %rax
movq %rax, 0x8(%rsp)
subq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
movl $0x1, %ebp
movq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0xf6bb0
testq %r15, %r15
je 0x37a90
movq 0x98(%r15), %rsi
movq %r13, %rdi
callq 0xf00aa
movq %r13, %rdi
movq %r15, %rsi
callq 0xe9752
movl 0x44(%rsp), %esi
movq %r13, %rdi
callq 0xe9595
movl %ebp, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x37a27
cmpb $0x0, 0x1a(%r15)
jne 0x37a27
movl 0x14(%rax), %edx
cmpl $0x2, %edx
jl 0x37a1a
leaq 0xe0a14(%rip), %rsi     # 0x1184ef
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x28(%rbx), %rax
movq 0x20(%rax), %rdx
leaq 0xe0a0d(%rip), %rsi     # 0x118501
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x28(%rbx), %rax
movq 0x18(%rax), %rdx
leaq 0xe0a09(%rip), %rsi     # 0x118516
movq %r13, %rdi
xorl %eax, %eax
callq 0xe9226
jmp 0x37a1a
movq 0x30(%r15), %rax
movq 0x28(%rbx), %rcx
addq %rax, 0x20(%rcx)
movq 0x38(%r15), %rax
addq %rax, 0x18(%rcx)
incl 0x14(%rcx)
movq %r13, %rdi
callq 0xea9a9
movq %rax, %r12
movq 0x98(%r15), %rax
movq 0x18(%rax), %rdx
movq %r13, %rdi
movq %r12, %rsi
movl $0x1, %ecx
callq 0xea9e4
movb $0x1, 0x8(%r12)
movb 0x1c(%r15), %al
movb %al, 0x9(%r12)
cmpb $0x4, 0x13(%r15)
sete %cl
sete 0xa(%r12)
testb %al, %al
setne %al
orb %cl, %al
testb $0x1, %al
jne 0x37b9e
movl $0x2, %eax
cmpb $0x0, 0x1d(%r15)
jne 0x37b99
movl $0x1, %eax
cmpb $0x0, 0x1e(%r15)
je 0x37b9e
orl %eax, 0x14(%r12)
movl $0x48, %eax
movups (%r15,%rax), %xmm0
movups %xmm0, -0x30(%r12,%rax)
addq $0x10, %rax
cmpq $0x98, %rax
jne 0x37ba3
movq 0x28(%rbx), %rax
cmpq $0x0, (%rax)
jne 0x37be2
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xf037a
movq 0x28(%rbx), %rcx
movq %rax, (%rcx)
movq %rax, %rdi
callq 0xf0e3f
cmpb $0x0, 0x1c(%r15)
jne 0x37a0f
leaq 0x80(%rsp), %rbx
leaq 0x68(%rsp), %r14
leaq 0xc0(%rsp), %rcx
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xfa6e0
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rbx)
movq 0x40(%r15), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%r15), %rax
movq %rax, 0x10(%rbx)
movq 0x10(%rsp), %rbx
movq 0x28(%rbx), %rax
movq (%rax), %rax
movq %rax, (%r14)
movb $0x1, 0x8(%r14)
movq 0x38(%r15), %rax
movq %rax, 0x10(%r14)
movq 0x20(%rbx), %rdi
callq 0xebdc3
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rax
movq (%rax), %rdi
leaq 0xb9def(%rip), %rsi     # 0xf1a51
callq 0xf1a12
cmpq $0x0, 0x38(%r15)
je 0x37ce2
movb 0x12(%r15), %al
testb %al, %al
je 0x37c9c
cmpb $0x3, %al
ja 0x37cbe
leaq 0x80(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0xc0(%rsp), %r8
movq %r13, %rdi
movq %r15, %rsi
callq 0x37e57
jmp 0x37ce2
leaq 0x80(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
movq %r13, %rdi
xorl %r8d, %r8d
callq 0xfaa08
jmp 0x37ce2
cmpb $0x4, %al
jne 0x37ce2
leaq 0x80(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0xc0(%rsp), %r8
movq %r13, %rdi
movq %r15, %rsi
callq 0x37f08
movq 0x68(%rsp), %rdi
callq 0xf0ea4
cmpl $0x0, 0xc0(%rsp)
je 0x37d33
movq 0x98(%r15), %rax
movq 0x18(%rax), %rdi
callq 0xf7557
movq %rax, %rbx
leaq 0xc0(%rsp), %rsi
movq %r13, %rdi
callq 0xfa6a8
leaq 0xdc44d(%rip), %rsi     # 0x11416d
movq %r13, %rdi
movq %rbx, %rdx
movq 0x10(%rsp), %rbx
movq %rax, %rcx
jmp 0x378d3
movq 0x20(%rbx), %rdi
callq 0xebe2a
movl %eax, %ebx
leaq 0xe050d(%rip), %rsi     # 0x118252
movq %r13, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
cmpl 0x24(%r15), %ebx
je 0x37d7b
movq 0x98(%r15), %rax
movq 0x18(%rax), %rdi
callq 0xf7557
leaq 0xdcdfe(%rip), %rsi     # 0x114b6c
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
movq 0x10(%rsp), %rbx
jmp 0x37a0f