// File: auton1[P]viterbi/entry_filters.cpp
// Function: entry::filter_sites_by_overlap_positions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void entry::filter_sites_by_overlap_positions(const string &positions_overlap_file, const string &exclude_positions_overlap_file)
{
	// Filter sites by overlapping with a user defined file containing a list of positions
	if (passed_filters == false)
		return;

	if ((positions_overlap_file == "") && (exclude_positions_overlap_file == ""))
		return;

	int idx;
	if (keep_positions.empty() && positions_overlap_file != "")
	{
		string chr;
		int pos1;
		unsigned int N_chr=chr_to_idx.size();
		stringstream ss;
		string line;
		unsigned int gzMAX_LINE_LEN = 1024*1024;
		char *gz_readbuffer = new char[gzMAX_LINE_LEN];

		gzFile gz_in = gzopen(positions_overlap_file.c_str(), "rb");
		if (gz_in == NULL)
			LOG.error("Could not open Positions file: " + positions_overlap_file);

		while (!gzeof(gz_in))
		{
			line = "";
			bool again = true;
			while (again == true)
			{
				gzgets(gz_in, gz_readbuffer, gzMAX_LINE_LEN);
				line.append(gz_readbuffer);
				if (strlen(gz_readbuffer) != gzMAX_LINE_LEN-1)
					again = false;
			}
			if (line[0] == '#')
				continue;
			line.erase( line.find_last_not_of(" \t\n\r") + 1);	// Trim whitespace at end of line (required in gzipped case!)

			ss.clear();
			ss.str(line);
			ss >> chr >> pos1;

			if (chr_to_idx.find(chr) == chr_to_idx.end())
			{
				N_chr++;
				chr_to_idx[chr] = (N_chr-1);
				keep_positions.resize(N_chr);
			}

			idx = chr_to_idx[chr];
			keep_positions[idx].insert(pos1);
		}
		gzclose(gz_in);
		delete [] gz_readbuffer;
	}
	if (exclude_positions.empty() && exclude_positions_overlap_file != "")
	{
		string chr;
		int pos1;
		unsigned int N_chr=0;
		stringstream ss;
		string line;
		unsigned int gzMAX_LINE_LEN = 1024*1024;
		char *gz_readbuffer = new char[gzMAX_LINE_LEN];

		gzFile gz_in = gzopen(exclude_positions_overlap_file.c_str(), "rb");
		if (gz_in == NULL)
			LOG.error("Could not open Positions file: " + exclude_positions_overlap_file);

		while (!gzeof(gz_in))
		{
			line = "";
			bool again = true;
			while (again == true)
			{
				gzgets(gz_in, gz_readbuffer, gzMAX_LINE_LEN);
				line.append(gz_readbuffer);
				if (strlen(gz_readbuffer) != gzMAX_LINE_LEN-1)
					again = false;
			}
			if (line[0] == '#')
				continue;
			line.erase( line.find_last_not_of(" \t\n\r") + 1);	// Trim whitespace at end of line (required in gzipped case!)

			ss.clear();
			ss.str(line);
			ss >> chr >> pos1;

			if (chr_to_idx.find(chr) == chr_to_idx.end())
			{
				N_chr++;
				chr_to_idx[chr] = (N_chr-1);
				exclude_positions.resize(N_chr);
			}

			idx = chr_to_idx[chr];
			exclude_positions[idx].insert(pos1);
		}
		gzclose(gz_in);
		delete [] gz_readbuffer;
	}

	parse_basic_entry();

	if (!keep_positions.empty())
	{	// Check to see if position is in keep list
			if (chr_to_idx.find(CHROM) == chr_to_idx.end())
				passed_filters = false;
			else
			{
				idx = chr_to_idx[CHROM];
				bool found=false;

				for (unsigned int ui=POS; ui<(POS+REF.size()); ui++)
					if (keep_positions[idx].find(ui) != keep_positions[idx].end())
					{
						found = true;
						break;
					}

				if (found == false)
					passed_filters = false;
			}
	}
	if (!exclude_positions.empty())
	{	// Check to see if position is in exclude list
		if (chr_to_idx.find(CHROM) != chr_to_idx.end())
		{
			idx = chr_to_idx[CHROM];
			bool found=false;

			for (unsigned int ui=POS; ui<(POS+REF.size()); ui++)
				if (exclude_positions[idx].find(ui) != exclude_positions[idx].end())
					found = true;

				if (found == true)
					passed_filters = false;
		}
	}
}

// Assembly:
subq $0x5f8, %rsp            # imm = 0x5F8
movq %rdi, 0x5f0(%rsp)
movq %rsi, 0x5e8(%rsp)
movq %rdx, 0x5e0(%rsp)
movq 0x5f0(%rsp), %rax
movq %rax, 0x100(%rsp)
movb 0xc(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x5adb1
jmp 0x5bb02
movq 0x5e8(%rsp), %rdi
leaq 0x1af69(%rip), %rsi     # 0x75d29
callq 0xea20
testb $0x1, %al
jne 0x5adcb
jmp 0x5adea
movq 0x5e0(%rsp), %rdi
leaq 0x1af4f(%rip), %rsi     # 0x75d29
callq 0xea20
testb $0x1, %al
jne 0x5ade5
jmp 0x5adea
jmp 0x5bb02
leaq 0x3968f(%rip), %rdi     # 0x94480
callq 0x5edf0
testb $0x1, %al
jne 0x5adff
jmp 0x5b2e1
movq 0x5e8(%rsp), %rdi
leaq 0x1af1b(%rip), %rsi     # 0x75d29
callq 0x30930
testb $0x1, %al
jne 0x5ae1c
jmp 0x5b2e1
leaq 0x5b8(%rsp), %rdi
callq 0x67e0
leaq 0x39680(%rip), %rdi     # 0x944b0
callq 0x5ee40
movl %eax, 0x5b0(%rsp)
leaq 0x428(%rsp), %rdi
callq 0x6360
jmp 0x5ae4b
leaq 0x3f8(%rsp), %rdi
callq 0x67e0
movl $0x100000, 0x3f4(%rsp) # imm = 0x100000
movl 0x3f4(%rsp), %eax
movl %eax, %edi
callq 0x6030
movq %rax, 0xf8(%rsp)
jmp 0x5ae7b
movq 0xf8(%rsp), %rax
movq %rax, 0x3e8(%rsp)
movq 0x5e8(%rsp), %rdi
callq 0x61a0
movq %rax, %rdi
leaq 0x195eb(%rip), %rsi     # 0x7448d
callq 0x6860
movq %rax, 0xf0(%rsp)
jmp 0x5aeb1
movq 0xf0(%rsp), %rax
movq %rax, 0x3e0(%rsp)
cmpq $0x0, 0x3e0(%rsp)
jne 0x5af70
movq 0x5e8(%rsp), %rdx
leaq 0x1add8(%rip), %rsi     # 0x75cb7
leaq 0x3c0(%rsp), %rdi
callq 0xe8d0
jmp 0x5aeee
leaq 0x3870b(%rip), %rdi     # 0x93600
leaq 0x3c0(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x5af09
leaq 0x3c0(%rsp), %rdi
callq 0x6b50
jmp 0x5af70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x5b2cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x5b2b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x3c0(%rsp), %rdi
callq 0x6b50
jmp 0x5b2b5
jmp 0x5af72
movq 0x3e0(%rsp), %rdi
callq 0x6140
movl %eax, 0xec(%rsp)
jmp 0x5af88
movl 0xec(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5afa0
jmp 0x5b25a
leaq 0x1ad82(%rip), %rsi     # 0x75d29
leaq 0x3f8(%rsp), %rdi
callq 0x67b0
jmp 0x5afb6
movb $0x1, 0x3bf(%rsp)
movb 0x3bf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x5b02c
movq 0x3e0(%rsp), %rdi
movq 0x3e8(%rsp), %rsi
movl 0x3f4(%rsp), %edx
callq 0x6980
jmp 0x5afed
movq 0x3e8(%rsp), %rsi
leaq 0x3f8(%rsp), %rdi
callq 0x6ac0
jmp 0x5b004
movq 0x3e8(%rsp), %rdi
callq 0x61d0
movl 0x3f4(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x5b02a
movb $0x0, 0x3bf(%rsp)
jmp 0x5afbe
xorl %eax, %eax
movl %eax, %esi
leaq 0x3f8(%rsp), %rdi
callq 0x6b20
movq %rax, 0xe0(%rsp)
jmp 0x5b047
movq 0xe0(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x5b05c
jmp 0x5af72
leaq 0x1961a(%rip), %rsi     # 0x7467d
leaq 0x3f8(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
movq $-0x1, %rdx
movq %rdx, 0xd8(%rsp)
callq 0x6a30
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rdx
movq %rax, %rsi
incq %rsi
callq 0x60f0
jmp 0x5b0a4
movq 0x428(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x428(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x6950
jmp 0x5b0c1
leaq 0x428(%rsp), %rdi
leaq 0x3f8(%rsp), %rsi
callq 0x6650
jmp 0x5b0d8
leaq 0x428(%rsp), %rdi
leaq 0x5b8(%rsp), %rsi
callq 0x6720
movq %rax, 0xc8(%rsp)
jmp 0x5b0f7
movq 0xc8(%rsp), %rdi
leaq 0x5b4(%rsp), %rsi
callq 0x62b0
jmp 0x5b10e
leaq 0x3939b(%rip), %rdi     # 0x944b0
leaq 0x5b8(%rsp), %rsi
callq 0x310f0
movq %rax, 0xc0(%rsp)
jmp 0x5b12c
movq 0xc0(%rsp), %rax
movq %rax, 0x3b0(%rsp)
leaq 0x3936d(%rip), %rdi     # 0x944b0
callq 0x31120
movq %rax, 0x3a8(%rsp)
leaq 0x3b0(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
callq 0x32ab0
testb $0x1, %al
jne 0x5b16b
jmp 0x5b1d3
movl 0x5b0(%rsp), %eax
incl %eax
movl %eax, 0x5b0(%rsp)
movl 0x5b0(%rsp), %eax
decl %eax
movl %eax, 0xb4(%rsp)
leaq 0x3931e(%rip), %rdi     # 0x944b0
leaq 0x5b8(%rsp), %rsi
callq 0x30fe0
movq %rax, 0xb8(%rsp)
jmp 0x5b1a9
movq 0xb8(%rsp), %rax
movl 0xb4(%rsp), %ecx
movl %ecx, (%rax)
movl 0x5b0(%rsp), %eax
movl %eax, %esi
leaq 0x392b6(%rip), %rdi     # 0x94480
callq 0x5ee50
jmp 0x5b1d1
jmp 0x5b1d3
leaq 0x392d6(%rip), %rdi     # 0x944b0
leaq 0x5b8(%rsp), %rsi
callq 0x30fe0
movq %rax, 0xa8(%rsp)
jmp 0x5b1f1
movq 0xa8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x5dc(%rsp)
movslq 0x5dc(%rsp), %rsi
leaq 0x3926f(%rip), %rdi     # 0x94480
callq 0x5eef0
movq %rax, %rdi
leaq 0x5b4(%rsp), %rsi
callq 0x5ef10
movb %dl, 0x9f(%rsp)
movq %rax, 0xa0(%rsp)
jmp 0x5b237
movb 0x9f(%rsp), %al
movq 0xa0(%rsp), %rcx
movq %rcx, 0x398(%rsp)
movb %al, 0x3a0(%rsp)
jmp 0x5af72
movq 0x3e0(%rsp), %rdi
callq 0x6940
jmp 0x5b269
movq 0x3e8(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpq $0x0, %rax
je 0x5b28c
movq 0x90(%rsp), %rdi
callq 0x6750
leaq 0x3f8(%rsp), %rdi
callq 0x6b50
leaq 0x428(%rsp), %rdi
callq 0x63c0
leaq 0x5b8(%rsp), %rdi
callq 0x6b50
jmp 0x5b2e1
leaq 0x3f8(%rsp), %rdi
callq 0x6b50
leaq 0x428(%rsp), %rdi
callq 0x63c0
leaq 0x5b8(%rsp), %rdi
callq 0x6b50
jmp 0x5bb0a
leaq 0x391b0(%rip), %rdi     # 0x94498
callq 0x5edf0
testb $0x1, %al
jne 0x5b2f6
jmp 0x5b788
movq 0x5e0(%rsp), %rdi
leaq 0x1aa24(%rip), %rsi     # 0x75d29
callq 0x30930
testb $0x1, %al
jne 0x5b313
jmp 0x5b788
leaq 0x378(%rsp), %rdi
callq 0x67e0
movl $0x0, 0x370(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x6360
jmp 0x5b33a
leaq 0x1c8(%rsp), %rdi
callq 0x67e0
movl $0x100000, 0x1c4(%rsp) # imm = 0x100000
movl 0x1c4(%rsp), %eax
movl %eax, %edi
callq 0x6030
movq %rax, 0x88(%rsp)
jmp 0x5b36a
movq 0x88(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movq 0x5e0(%rsp), %rdi
callq 0x61a0
movq %rax, %rdi
leaq 0x190fc(%rip), %rsi     # 0x7448d
callq 0x6860
movq %rax, 0x80(%rsp)
jmp 0x5b3a0
movq 0x80(%rsp), %rax
movq %rax, 0x1b0(%rsp)
cmpq $0x0, 0x1b0(%rsp)
jne 0x5b45f
movq 0x5e0(%rsp), %rdx
leaq 0x1a8e9(%rip), %rsi     # 0x75cb7
leaq 0x190(%rsp), %rdi
callq 0xe8d0
jmp 0x5b3dd
leaq 0x3821c(%rip), %rdi     # 0x93600
leaq 0x190(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x5b3f8
leaq 0x190(%rsp), %rdi
callq 0x6b50
jmp 0x5b45f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x5b776
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x5b75c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x6b50
jmp 0x5b75c
jmp 0x5b461
movq 0x1b0(%rsp), %rdi
callq 0x6140
movl %eax, 0x7c(%rsp)
jmp 0x5b474
movl 0x7c(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5b489
jmp 0x5b707
leaq 0x1a899(%rip), %rsi     # 0x75d29
leaq 0x1c8(%rsp), %rdi
callq 0x67b0
jmp 0x5b49f
movb $0x1, 0x18f(%rsp)
movb 0x18f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x5b515
movq 0x1b0(%rsp), %rdi
movq 0x1b8(%rsp), %rsi
movl 0x1c4(%rsp), %edx
callq 0x6980
jmp 0x5b4d6
movq 0x1b8(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x6ac0
jmp 0x5b4ed
movq 0x1b8(%rsp), %rdi
callq 0x61d0
movl 0x1c4(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x5b513
movb $0x0, 0x18f(%rsp)
jmp 0x5b4a7
xorl %eax, %eax
movl %eax, %esi
leaq 0x1c8(%rsp), %rdi
callq 0x6b20
movq %rax, 0x70(%rsp)
jmp 0x5b52d
movq 0x70(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x5b53f
jmp 0x5b461
leaq 0x19137(%rip), %rsi     # 0x7467d
leaq 0x1c8(%rsp), %rdi
movq %rdi, 0x60(%rsp)
movq $-0x1, %rdx
movq %rdx, 0x68(%rsp)
callq 0x6a30
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rdx
movq %rax, %rsi
incq %rsi
callq 0x60f0
jmp 0x5b57b
movq 0x1e8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x1e8(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x6950
jmp 0x5b598
leaq 0x1e8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x6650
jmp 0x5b5af
leaq 0x1e8(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0x6720
movq %rax, 0x58(%rsp)
jmp 0x5b5cb
movq 0x58(%rsp), %rdi
leaq 0x374(%rsp), %rsi
callq 0x62b0
jmp 0x5b5df
leaq 0x38eca(%rip), %rdi     # 0x944b0
leaq 0x378(%rsp), %rsi
callq 0x310f0
movq %rax, 0x50(%rsp)
jmp 0x5b5fa
movq 0x50(%rsp), %rax
movq %rax, 0x180(%rsp)
leaq 0x38ea2(%rip), %rdi     # 0x944b0
callq 0x31120
movq %rax, 0x178(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x32ab0
testb $0x1, %al
jne 0x5b636
jmp 0x5b692
movl 0x370(%rsp), %eax
incl %eax
movl %eax, 0x370(%rsp)
movl 0x370(%rsp), %eax
decl %eax
movl %eax, 0x44(%rsp)
leaq 0x38e56(%rip), %rdi     # 0x944b0
leaq 0x378(%rsp), %rsi
callq 0x30fe0
movq %rax, 0x48(%rsp)
jmp 0x5b66e
movq 0x48(%rsp), %rax
movl 0x44(%rsp), %ecx
movl %ecx, (%rax)
movl 0x370(%rsp), %eax
movl %eax, %esi
leaq 0x38e0f(%rip), %rdi     # 0x94498
callq 0x5ee50
jmp 0x5b690
jmp 0x5b692
leaq 0x38e17(%rip), %rdi     # 0x944b0
leaq 0x378(%rsp), %rsi
callq 0x30fe0
movq %rax, 0x38(%rsp)
jmp 0x5b6ad
movq 0x38(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x5dc(%rsp)
movslq 0x5dc(%rsp), %rsi
leaq 0x38dce(%rip), %rdi     # 0x94498
callq 0x5eef0
movq %rax, %rdi
leaq 0x374(%rsp), %rsi
callq 0x5ef10
movb %dl, 0x2f(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x5b6ea
movb 0x2f(%rsp), %al
movq 0x30(%rsp), %rcx
movq %rcx, 0x168(%rsp)
movb %al, 0x170(%rsp)
jmp 0x5b461
movq 0x1b0(%rsp), %rdi
callq 0x6940
jmp 0x5b716
movq 0x1b8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x5b733
movq 0x20(%rsp), %rdi
callq 0x6750
leaq 0x1c8(%rsp), %rdi
callq 0x6b50
leaq 0x1e8(%rsp), %rdi
callq 0x63c0
leaq 0x378(%rsp), %rdi
callq 0x6b50
jmp 0x5b788
leaq 0x1c8(%rsp), %rdi
callq 0x6b50
leaq 0x1e8(%rsp), %rdi
callq 0x63c0
leaq 0x378(%rsp), %rdi
callq 0x6b50
jmp 0x5bb0a
movq 0x100(%rsp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq *0x10(%rax)
leaq 0x38cdd(%rip), %rdi     # 0x94480
callq 0x5edf0
testb $0x1, %al
jne 0x5b958
movq 0x100(%rsp), %rsi
addq $0x3e0, %rsi            # imm = 0x3E0
leaq 0x38cea(%rip), %rdi     # 0x944b0
callq 0x310f0
movq %rax, 0x160(%rsp)
leaq 0x38cd6(%rip), %rdi     # 0x944b0
callq 0x31120
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x32ab0
testb $0x1, %al
jne 0x5b802
jmp 0x5b813
movq 0x100(%rsp), %rax
movb $0x0, 0xc(%rax)
jmp 0x5b956
movq 0x100(%rsp), %rsi
addq $0x3e0, %rsi            # imm = 0x3E0
leaq 0x38c87(%rip), %rdi     # 0x944b0
callq 0x30fe0
movq %rax, %rcx
movq 0x100(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0x5dc(%rsp)
movb $0x0, 0x157(%rsp)
movl 0x400(%rax), %eax
movl %eax, 0x150(%rsp)
movq 0x100(%rsp), %rdi
movl 0x150(%rsp), %eax
movq %rax, 0x18(%rsp)
movslq 0x400(%rdi), %rax
movq %rax, 0x10(%rsp)
addq $0x428, %rdi            # imm = 0x428
callq 0x6350
movq 0x10(%rsp), %rcx
movq %rax, %rdx
movq 0x18(%rsp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x5b937
movslq 0x5dc(%rsp), %rsi
leaq 0x38bd5(%rip), %rdi     # 0x94480
callq 0x5eef0
movq %rax, %rdi
movl 0x150(%rsp), %eax
movl %eax, 0x144(%rsp)
leaq 0x144(%rsp), %rsi
callq 0x5ef90
movq %rax, 0x148(%rsp)
movslq 0x5dc(%rsp), %rsi
leaq 0x38b9b(%rip), %rdi     # 0x94480
callq 0x5eef0
movq %rax, %rdi
callq 0x5efd0
movq %rax, 0x138(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x5ef70
testb $0x1, %al
jne 0x5b915
jmp 0x5b91f
movb $0x1, 0x157(%rsp)
jmp 0x5b937
jmp 0x5b921
movl 0x150(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x150(%rsp)
jmp 0x5b857
movb 0x157(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x5b954
movq 0x100(%rsp), %rax
movb $0x0, 0xc(%rax)
jmp 0x5b956
jmp 0x5b958
leaq 0x38b39(%rip), %rdi     # 0x94498
callq 0x5edf0
testb $0x1, %al
jne 0x5bb02
movq 0x100(%rsp), %rsi
addq $0x3e0, %rsi            # imm = 0x3E0
leaq 0x38b2e(%rip), %rdi     # 0x944b0
callq 0x310f0
movq %rax, 0x130(%rsp)
leaq 0x38b1a(%rip), %rdi     # 0x944b0
callq 0x31120
movq %rax, 0x128(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x310d0
testb $0x1, %al
jne 0x5b9c1
jmp 0x5bb00
movq 0x100(%rsp), %rsi
addq $0x3e0, %rsi            # imm = 0x3E0
leaq 0x38ad9(%rip), %rdi     # 0x944b0
callq 0x30fe0
movq %rax, %rcx
movq 0x100(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0x5dc(%rsp)
movb $0x0, 0x127(%rsp)
movl 0x400(%rax), %eax
movl %eax, 0x120(%rsp)
movq 0x100(%rsp), %rdi
movl 0x120(%rsp), %eax
movq %rax, 0x8(%rsp)
movslq 0x400(%rdi), %rax
movq %rax, (%rsp)
addq $0x428, %rdi            # imm = 0x428
callq 0x6350
movq (%rsp), %rcx
movq %rax, %rdx
movq 0x8(%rsp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x5bae1
movslq 0x5dc(%rsp), %rsi
leaq 0x38a41(%rip), %rdi     # 0x94498
callq 0x5eef0
movq %rax, %rdi
movl 0x120(%rsp), %eax
movl %eax, 0x114(%rsp)
leaq 0x114(%rsp), %rsi
callq 0x5ef90
movq %rax, 0x118(%rsp)
movslq 0x5dc(%rsp), %rsi
leaq 0x38a07(%rip), %rdi     # 0x94498
callq 0x5eef0
movq %rax, %rdi
callq 0x5efd0
movq %rax, 0x108(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x5ef70
testb $0x1, %al
jne 0x5bac1
jmp 0x5bac9
movb $0x1, 0x127(%rsp)
jmp 0x5bacb
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0x5ba05
movb 0x127(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x5bafe
movq 0x100(%rsp), %rax
movb $0x0, 0xc(%rax)
jmp 0x5bb00
jmp 0x5bb02
addq $0x5f8, %rsp            # imm = 0x5F8
retq
movq 0x420(%rsp), %rdi
callq 0x69e0
nopw (%rax,%rax)