// File: ridgelab[P]Kmer-SSR/src/Arguments.cpp
// Function: Arguments::processArgs(int, char**)
void Arguments::processArgs(int argc, char* argv[])
{
	// parse arguments
	string alphabet_str = "A,C,G,T";         // -a:
	string min_seq_len_str = "100";            // -l:
	string max_seq_len_str = "500000000";    // -L: // 500,000,000 (500 million)
	string min_nucleotides_str = "16";        // -n:
	string max_nucleotides_str = "10000";    // -N:
	string period_s = "4-8";                 // -p:
	string max_task_queue_size_str = "1000"; // -Q:
	string min_repeats_str = "2";            // -r:
	string max_repeats_str = "1000";         // -R:
	string enumerated_ssrs_str = "";         // -s:
	string threads_str = "1";                // -t:
	
	int c;

	if (argc > 1)
	{
		// search for -v
		while ( (c = getopt(argc,argv,"+:v")) != -1 )
		{
			switch (c)
			{
				case 'v':
					this->version_displayed = true;
					cerr << "Version: " << this->version << endl;
					return;
				case ':': break;
				case '?': break;
				default: break;
			}
		}
		
		optind = 1; // reset optind to search for -h

		// search for -h
		while ( (c = getopt(argc,argv,"+:h")) != -1 )
		{
			switch (c)
			{
				case 'h':
					this->help_displayed = true;
					cerr << this->usage_message << endl << endl << this->help_message << endl << endl;
					return;
				case ':': break;
				case '?': break;
				default: break;
			}
		}

		optind = 1; // reset optind to search for everything else
	
		// search for everything else
		while ( (c = getopt(argc,argv,"a:AbBdegGhi:l:L:n:N:o:p:Q:r:R:s:t:v")) != -1 )
		{
			switch (c)
			{
				case 'a': alphabet_str = optarg; break;
				case 'A': this->allow_non_atomic = true; break;
				case 'b': this->bzipped2_input = true; break;
				case 'B': this->bzipped2_output = true; break;
				case 'd': this->display_progress_bar = false; break;
				case 'e': this->exhaustive = true; break;
				case 'g': this->gzipped_input = true; break;
				case 'G': this->gzipped_output = true; break;
				case 'h': break;
				case 'i': this->input_file_name = optarg; break;
				case 'l': min_seq_len_str = optarg; break;
				case 'L': max_seq_len_str = optarg; break;
				case 'n': min_nucleotides_str = optarg; break;
				case 'N': max_nucleotides_str = optarg; break;
				case 'o': this->output_file_name = optarg; break;
				case 'p': period_s = optarg; break;
				case 'Q': max_task_queue_size_str = optarg; break;
				case 'r': min_repeats_str = optarg; break;
				case 'R': max_repeats_str = optarg; break;
				case 's': enumerated_ssrs_str = optarg; break;
				case 't': threads_str = optarg; break;
				case 'v': break;
				case '?':
					if (optopt == 'c')
					{
						fprintf(stderr,"Option -%c requires an argument. Run with -h for help.\n",optopt);
						this->help_displayed = true;
					}
					else if (isprint(optopt))
					{
						fprintf(stderr,"Unknown option `-%c'. Run with -h for help.\n",optopt);
						this->help_displayed = true;
					}
					else
					{
						fprintf(stderr,"Unknown option character `\\x%x'. Run with -h for help.\n",optopt);
						this->help_displayed = true;
					}
					return;
				default:
					cout << "abort, c: " << (char) c << endl;
					abort();
			}
		}
	}
	else if (argc == 1)
	{
		cerr << "Note: you are receiving input from STDIN and sending output to STDOUT\n" << endl;
	}

	// check for positional parameters (which is an error)
	if (optind < argc)
	{
		string error = "ERROR: You may not supply any positional parameters. Offenders:";

		for (uint32_t i = optind; i < (uint32_t) argc; i++)
		{
			error += " " + string(argv[i]);
		}

		throw error;
	}

	// assign member variables now that we've parsed the arguments
	this->threads = parsePositiveIntegerArgument(threads_str);
	this->addToAlphabet(alphabet_str);
	this->min_sequence_length = parsePositiveIntegerArgument(min_seq_len_str);
	this->max_sequence_length = parsePositiveIntegerArgument(max_seq_len_str);
	this->min_nucleotides = parsePositiveIntegerArgument(min_nucleotides_str);
	this->max_nucleotides = parsePositiveIntegerArgument(max_nucleotides_str);
	this->min_repeats = parsePositiveIntegerArgument(min_repeats_str);
	this->max_repeats = parsePositiveIntegerArgument(max_repeats_str);
	this->max_task_queue_size = parsePositiveIntegerArgument(max_task_queue_size_str);
	this->addToEnumeratedSSRs(enumerated_ssrs_str);
	this->addToPeriods(period_s);

	// adjust arguments for speed reasons
	this->adjustMinSequenceLength();

	// sanity check
	this->sanityCheckArguments();

	this->autoDetectCompressedInput();
	this->autoDetectCompressedOutput();
	this->display_progress_bar = this->input_file_name != "/dev/stdin" ? this->display_progress_bar : false; // if stdin..we can't determine size of data
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3c8(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x4700
movq -0x3c0(%rbp), %rdx
leaq 0x98ca(%rip), %rsi      # 0x22229
leaq -0x38(%rbp), %rdi
callq 0x6da0
jmp 0x1896a
leaq -0x39(%rbp), %rdi
callq 0x4410
leaq -0x71(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x4700
movq -0x3d0(%rbp), %rdx
leaq 0x98a0(%rip), %rsi      # 0x22231
leaq -0x70(%rbp), %rdi
callq 0x6da0
jmp 0x1899c
leaq -0x71(%rbp), %rdi
callq 0x4410
leaq -0x99(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x4700
movq -0x3d8(%rbp), %rdx
leaq 0x986f(%rip), %rsi      # 0x22235
leaq -0x98(%rbp), %rdi
callq 0x6da0
jmp 0x189d4
leaq -0x99(%rbp), %rdi
callq 0x4410
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x4700
movq -0x3e0(%rbp), %rdx
leaq 0x983e(%rip), %rsi      # 0x2223f
leaq -0xc0(%rbp), %rdi
callq 0x6da0
jmp 0x18a0f
leaq -0xc1(%rbp), %rdi
callq 0x4410
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x4700
movq -0x3e8(%rbp), %rdx
leaq 0x9806(%rip), %rsi      # 0x22242
leaq -0xe8(%rbp), %rdi
callq 0x6da0
jmp 0x18a4a
leaq -0xe9(%rbp), %rdi
callq 0x4410
leaq -0x111(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x4700
movq -0x3f0(%rbp), %rdx
leaq 0x97d1(%rip), %rsi      # 0x22248
leaq -0x110(%rbp), %rdi
callq 0x6da0
jmp 0x18a85
leaq -0x111(%rbp), %rdi
callq 0x4410
leaq -0x139(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x4700
movq -0x3f8(%rbp), %rdx
leaq 0x979a(%rip), %rsi      # 0x2224c
leaq -0x138(%rbp), %rdi
callq 0x6da0
jmp 0x18ac0
leaq -0x139(%rbp), %rdi
callq 0x4410
leaq -0x161(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x4700
movq -0x400(%rbp), %rdx
leaq 0x98d2(%rip), %rsi      # 0x223bf
leaq -0x160(%rbp), %rdi
callq 0x6da0
jmp 0x18afb
leaq -0x161(%rbp), %rdi
callq 0x4410
leaq -0x189(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x4700
movq -0x408(%rbp), %rdx
leaq 0x9724(%rip), %rsi      # 0x2224c
leaq -0x188(%rbp), %rdi
callq 0x6da0
jmp 0x18b36
leaq -0x189(%rbp), %rdi
callq 0x4410
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x4700
movq -0x410(%rbp), %rdx
leaq 0x852d(%rip), %rsi      # 0x21090
leaq -0x1b0(%rbp), %rdi
callq 0x6da0
jmp 0x18b71
leaq -0x1b1(%rbp), %rdi
callq 0x4410
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x4700
movq -0x418(%rbp), %rdx
leaq 0x96b3(%rip), %rsi      # 0x22251
leaq -0x1d8(%rbp), %rdi
callq 0x6da0
jmp 0x18bac
leaq -0x1d9(%rbp), %rdi
callq 0x4410
cmpl $0x1, -0xc(%rbp)
jle 0x19281
jmp 0x18bc4
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
leaq 0x9681(%rip), %rdx      # 0x22253
callq 0x40d0
movl %eax, -0x1e0(%rbp)
cmpl $-0x1, %eax
je 0x18de8
movl -0x1e0(%rbp), %eax
movl %eax, -0x41c(%rbp)
subl $0x3a, %eax
je 0x18ddd
jmp 0x18bfd
movl -0x41c(%rbp), %eax
subl $0x3f, %eax
je 0x18ddf
jmp 0x18c0e
movl -0x41c(%rbp), %eax
subl $0x76, %eax
je 0x18d5b
jmp 0x18de1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x4410
jmp 0x19a78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x4410
jmp 0x19a6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x4410
jmp 0x19a66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x4410
jmp 0x19a5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe9(%rbp), %rdi
callq 0x4410
jmp 0x19a4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x111(%rbp), %rdi
callq 0x4410
jmp 0x19a42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x139(%rbp), %rdi
callq 0x4410
jmp 0x19a36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x161(%rbp), %rdi
callq 0x4410
jmp 0x19a2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x189(%rbp), %rdi
callq 0x4410
jmp 0x19a1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1b1(%rbp), %rdi
callq 0x4410
jmp 0x19a12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d9(%rbp), %rdi
callq 0x4410
jmp 0x19a06
movq -0x3c8(%rbp), %rax
movb $0x1, 0xcc(%rax)
movq 0x19280(%rip), %rdi     # 0x31ff0
leaq 0x94e0(%rip), %rsi      # 0x22257
callq 0x4390
movq %rax, -0x428(%rbp)
jmp 0x18d85
movq -0x428(%rbp), %rdi
movq -0x3c8(%rbp), %rsi
addq $0xd0, %rsi
callq 0x4340
movq %rax, -0x430(%rbp)
jmp 0x18da8
movq -0x430(%rbp), %rdi
movq 0x191da(%rip), %rsi     # 0x31f90
callq 0x43e0
jmp 0x18dbd
movl $0x1, -0x1e4(%rbp)
jmp 0x19845
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x199fa
jmp 0x18de3
jmp 0x18de3
jmp 0x18de3
jmp 0x18bc4
movq 0x191e1(%rip), %rax     # 0x31fd0
movl $0x1, (%rax)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
leaq 0x945e(%rip), %rdx      # 0x22261
callq 0x40d0
movl %eax, -0x1e0(%rbp)
cmpl $-0x1, %eax
je 0x18f17
movl -0x1e0(%rbp), %eax
movl %eax, -0x434(%rbp)
subl $0x3a, %eax
je 0x18f0c
jmp 0x18e2e
movl -0x434(%rbp), %eax
subl $0x3f, %eax
je 0x18f0e
jmp 0x18e3f
movl -0x434(%rbp), %eax
subl $0x68, %eax
jne 0x18f10
jmp 0x18e50
movq -0x3c8(%rbp), %rsi
movb $0x1, 0x50(%rsi)
addq $0x10, %rsi
movq 0x1918a(%rip), %rdi     # 0x31ff0
callq 0x4340
movq %rax, -0x440(%rbp)
jmp 0x18e74
movq -0x440(%rbp), %rdi
movq 0x1910e(%rip), %rsi     # 0x31f90
callq 0x43e0
movq %rax, -0x448(%rbp)
jmp 0x18e90
movq -0x448(%rbp), %rdi
movq 0x190f2(%rip), %rsi     # 0x31f90
callq 0x43e0
movq %rax, -0x450(%rbp)
jmp 0x18eac
movq -0x450(%rbp), %rdi
movq -0x3c8(%rbp), %rsi
addq $0x30, %rsi
callq 0x4340
movq %rax, -0x458(%rbp)
jmp 0x18ecc
movq -0x458(%rbp), %rdi
movq 0x190b6(%rip), %rsi     # 0x31f90
callq 0x43e0
movq %rax, -0x460(%rbp)
jmp 0x18ee8
movq -0x460(%rbp), %rdi
movq 0x1909a(%rip), %rsi     # 0x31f90
callq 0x43e0
jmp 0x18efd
movl $0x1, -0x1e4(%rbp)
jmp 0x19845
jmp 0x18f12
jmp 0x18f12
jmp 0x18f12
jmp 0x18df5
movq 0x190b2(%rip), %rax     # 0x31fd0
movl $0x1, (%rax)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
leaq 0x9333(%rip), %rdx      # 0x22265
callq 0x40d0
movl %eax, -0x1e0(%rbp)
cmpl $-0x1, %eax
je 0x1927f
movl -0x1e0(%rbp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, -0x468(%rbp)
subl $0x37, %eax
ja 0x19228
movq -0x468(%rbp), %rax
leaq 0x837d(%rip), %rcx      # 0x212ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x19019(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4550
jmp 0x18f8d
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0x8(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0x9(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0xa(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x0, 0xb(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0xc(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0xd(%rax)
jmp 0x1927a
movq -0x3c8(%rbp), %rax
movb $0x1, 0xe(%rax)
jmp 0x1927a
jmp 0x1927a
movq -0x3c8(%rbp), %rdi
movq 0x18f83(%rip), %rax     # 0x31f98
movq (%rax), %rsi
addq $0x58, %rdi
callq 0x4550
jmp 0x19023
jmp 0x1927a
movq 0x18f69(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x70(%rbp), %rdi
callq 0x4550
jmp 0x1903d
jmp 0x1927a
movq 0x18f4f(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x98(%rbp), %rdi
callq 0x4550
jmp 0x1905a
jmp 0x1927a
movq 0x18f32(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x4550
jmp 0x19077
jmp 0x1927a
movq 0x18f15(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x4550
jmp 0x19094
jmp 0x1927a
movq -0x3c8(%rbp), %rdi
movq 0x18ef1(%rip), %rax     # 0x31f98
movq (%rax), %rsi
addq $0x88, %rdi
callq 0x4550
jmp 0x190b8
jmp 0x1927a
movq 0x18ed4(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x110(%rbp), %rdi
callq 0x4550
jmp 0x190d5
jmp 0x1927a
movq 0x18eb7(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x138(%rbp), %rdi
callq 0x4550
jmp 0x190f2
jmp 0x1927a
movq 0x18e9a(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x160(%rbp), %rdi
callq 0x4550
jmp 0x1910f
jmp 0x1927a
movq 0x18e7d(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x188(%rbp), %rdi
callq 0x4550
jmp 0x1912c
jmp 0x1927a
movq 0x18e60(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x4550
jmp 0x19149
jmp 0x1927a
movq 0x18e43(%rip), %rax     # 0x31f98
movq (%rax), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x4550
jmp 0x19166
jmp 0x1927a
jmp 0x1927a
movq 0x18e41(%rip), %rax     # 0x31fb8
cmpl $0x63, (%rax)
jne 0x191aa
movq 0x18e45(%rip), %rax     # 0x31fc8
movq (%rax), %rdi
movq 0x18e2b(%rip), %rax     # 0x31fb8
movl (%rax), %edx
leaq 0x90f3(%rip), %rsi      # 0x22289
movb $0x0, %al
callq 0x4590
movq -0x3c8(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x19219
movq 0x18e07(%rip), %rax     # 0x31fb8
movl (%rax), %edi
callq 0x46f0
cmpl $0x0, %eax
je 0x191eb
movq 0x18e04(%rip), %rax     # 0x31fc8
movq (%rax), %rdi
movq 0x18dea(%rip), %rax     # 0x31fb8
movl (%rax), %edx
leaq 0x90ea(%rip), %rsi      # 0x222c1
movb $0x0, %al
callq 0x4590
movq -0x3c8(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x19217
movq 0x18dd6(%rip), %rax     # 0x31fc8
movq (%rax), %rdi
movq 0x18dbc(%rip), %rax     # 0x31fb8
movl (%rax), %edx
leaq 0x90e9(%rip), %rsi      # 0x222ee
movb $0x0, %al
callq 0x4590
movq -0x3c8(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x19219
movl $0x1, -0x1e4(%rbp)
jmp 0x19845
movq 0x18d91(%rip), %rdi     # 0x31fc0
leaq 0x90f0(%rip), %rsi      # 0x22326
callq 0x4390
movq %rax, -0x470(%rbp)
jmp 0x19244
movq -0x470(%rbp), %rdi
movsbl -0x1e0(%rbp), %esi
callq 0x4470
movq %rax, -0x478(%rbp)
jmp 0x19260
movq -0x478(%rbp), %rdi
movq 0x18d22(%rip), %rsi     # 0x31f90
callq 0x43e0
jmp 0x19275
callq 0x41d0
jmp 0x18f24
jmp 0x192bc
cmpl $0x1, -0xc(%rbp)
jne 0x192ba
movq 0x18d62(%rip), %rdi     # 0x31ff0
leaq 0x909c(%rip), %rsi      # 0x22331
callq 0x4390
movq %rax, -0x480(%rbp)
jmp 0x192a3
movq -0x480(%rbp), %rdi
movq 0x18cdf(%rip), %rsi     # 0x31f90
callq 0x43e0
jmp 0x192b8
jmp 0x192ba
jmp 0x192bc
movq 0x18d0d(%rip), %rax     # 0x31fd0
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x1949b
leaq -0x209(%rbp), %rdi
movq %rdi, -0x488(%rbp)
callq 0x4700
movq -0x488(%rbp), %rdx
leaq 0x9089(%rip), %rsi      # 0x22378
leaq -0x208(%rbp), %rdi
callq 0x6da0
jmp 0x192fd
leaq -0x209(%rbp), %rdi
callq 0x4410
movq 0x18cc0(%rip), %rax     # 0x31fd0
movl (%rax), %eax
movl %eax, -0x210(%rbp)
movl -0x210(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x1943f
movq -0x18(%rbp), %rax
movl -0x210(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x498(%rbp)
leaq -0x251(%rbp), %rdi
movq %rdi, -0x490(%rbp)
callq 0x4700
movq -0x498(%rbp), %rsi
movq -0x490(%rbp), %rdx
leaq -0x250(%rbp), %rdi
callq 0x6da0
jmp 0x1936b
leaq 0x7d04(%rip), %rsi      # 0x21076
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rdx
callq 0x1b8a0
jmp 0x19387
leaq -0x208(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x44f0
jmp 0x1939c
leaq -0x230(%rbp), %rdi
callq 0x4788
leaq -0x250(%rbp), %rdi
callq 0x4788
leaq -0x251(%rbp), %rdi
callq 0x4410
movl -0x210(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x210(%rbp)
jmp 0x19318
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x209(%rbp), %rdi
callq 0x4410
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x19431
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x19425
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x4788
leaq -0x250(%rbp), %rdi
callq 0x4788
leaq -0x251(%rbp), %rdi
callq 0x4410
jmp 0x1948a
movl $0x20, %edi
callq 0x41a0
movq %rax, %rdi
movq %rdi, -0x4a0(%rbp)
leaq -0x208(%rbp), %rsi
callq 0x4200
movq -0x4a0(%rbp), %rdi
leaq 0x188fb(%rip), %rsi     # 0x31d68
movq 0x18b34(%rip), %rdx     # 0x31fa8
callq 0x46a0
jmp 0x19a81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x4788
jmp 0x199fa
leaq -0x278(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x4170
jmp 0x194b0
movq -0x3c8(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4a4(%rbp)
jmp 0x194cb
movq -0x3c8(%rbp), %rax
movl -0x4a4(%rbp), %ecx
movl %ecx, 0xc8(%rax)
leaq -0x278(%rbp), %rdi
callq 0x4788
leaq -0x298(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4170
jmp 0x194fc
movq -0x3c8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x1a110
jmp 0x19511
leaq -0x298(%rbp), %rdi
callq 0x4788
leaq -0x2b8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4170
jmp 0x1952f
movq -0x3c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4a8(%rbp)
jmp 0x1954a
movq -0x3c8(%rbp), %rax
movl -0x4a8(%rbp), %ecx
movl %ecx, 0x78(%rax)
leaq -0x2b8(%rbp), %rdi
callq 0x4788
leaq -0x2d8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4170
jmp 0x1957b
movq -0x3c8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4ac(%rbp)
jmp 0x19596
movq -0x3c8(%rbp), %rax
movl -0x4ac(%rbp), %ecx
movl %ecx, 0x7c(%rax)
leaq -0x2d8(%rbp), %rdi
callq 0x4788
leaq -0x2f8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4170
jmp 0x195c7
movq -0x3c8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4b0(%rbp)
jmp 0x195e2
movq -0x3c8(%rbp), %rax
movl -0x4b0(%rbp), %ecx
movl %ecx, 0x80(%rax)
leaq -0x2f8(%rbp), %rdi
callq 0x4788
leaq -0x318(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x4170
jmp 0x19616
movq -0x3c8(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4b4(%rbp)
jmp 0x19631
movq -0x3c8(%rbp), %rax
movl -0x4b4(%rbp), %ecx
movl %ecx, 0x84(%rax)
leaq -0x318(%rbp), %rdi
callq 0x4788
leaq -0x338(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x4170
jmp 0x19665
movq -0x3c8(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4b8(%rbp)
jmp 0x19680
movq -0x3c8(%rbp), %rax
movl -0x4b8(%rbp), %ecx
movl %ecx, 0xb4(%rax)
leaq -0x338(%rbp), %rdi
callq 0x4788
leaq -0x358(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x4170
jmp 0x196b4
movq -0x3c8(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4bc(%rbp)
jmp 0x196cf
movq -0x3c8(%rbp), %rax
movl -0x4bc(%rbp), %ecx
movl %ecx, 0xb8(%rax)
leaq -0x358(%rbp), %rdi
callq 0x4788
leaq -0x378(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x4170
jmp 0x19703
movq -0x3c8(%rbp), %rdi
leaq -0x378(%rbp), %rsi
callq 0x1a070
movl %eax, -0x4c0(%rbp)
jmp 0x1971e
movq -0x3c8(%rbp), %rax
movl -0x4c0(%rbp), %ecx
movl %ecx, 0xb0(%rax)
leaq -0x378(%rbp), %rdi
callq 0x4788
leaq -0x398(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4170
jmp 0x19752
movq -0x3c8(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x1a310
jmp 0x19767
leaq -0x398(%rbp), %rdi
callq 0x4788
leaq -0x3b8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4170
jmp 0x19788
movq -0x3c8(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x1a690
jmp 0x1979d
leaq -0x3b8(%rbp), %rdi
callq 0x4788
movq -0x3c8(%rbp), %rdi
callq 0x1ac00
jmp 0x197b7
movq -0x3c8(%rbp), %rdi
callq 0x1ac80
jmp 0x197c5
movq -0x3c8(%rbp), %rdi
callq 0x1ad40
jmp 0x197d3
movq -0x3c8(%rbp), %rdi
callq 0x1af40
jmp 0x197e1
movq -0x3c8(%rbp), %rdi
addq $0x58, %rdi
leaq 0x7a07(%rip), %rsi      # 0x211fa
callq 0x1b8f0
movb %al, -0x4c1(%rbp)
jmp 0x19800
movb -0x4c1(%rbp), %al
testb $0x1, %al
jne 0x1980c
jmp 0x1981e
movq -0x3c8(%rbp), %rax
movb 0xb(%rax), %al
movb %al, -0x4c2(%rbp)
jmp 0x19828
xorl %eax, %eax
movb %al, -0x4c2(%rbp)
jmp 0x19828
movq -0x3c8(%rbp), %rax
movb -0x4c2(%rbp), %cl
andb $0x1, %cl
movb %cl, 0xb(%rax)
movl $0x0, -0x1e4(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x4788
leaq -0x1b0(%rbp), %rdi
callq 0x4788
leaq -0x188(%rbp), %rdi
callq 0x4788
leaq -0x160(%rbp), %rdi
callq 0x4788
leaq -0x138(%rbp), %rdi
callq 0x4788
leaq -0x110(%rbp), %rdi
callq 0x4788
leaq -0xe8(%rbp), %rdi
callq 0x4788
leaq -0xc0(%rbp), %rdi
callq 0x4788
leaq -0x98(%rbp), %rdi
callq 0x4788
leaq -0x70(%rbp), %rdi
callq 0x4788
leaq -0x38(%rbp), %rdi
callq 0x4788
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x4788
jmp 0x199fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x4788
leaq -0x1d8(%rbp), %rdi
callq 0x4788
leaq -0x1b0(%rbp), %rdi
callq 0x4788
leaq -0x188(%rbp), %rdi
callq 0x4788
leaq -0x160(%rbp), %rdi
callq 0x4788
leaq -0x138(%rbp), %rdi
callq 0x4788
leaq -0x110(%rbp), %rdi
callq 0x4788
leaq -0xe8(%rbp), %rdi
callq 0x4788
leaq -0xc0(%rbp), %rdi
callq 0x4788
leaq -0x98(%rbp), %rdi
callq 0x4788
leaq -0x70(%rbp), %rdi
callq 0x4788
leaq -0x38(%rbp), %rdi
callq 0x4788
movq -0x48(%rbp), %rdi
callq 0x46e0
nopw %cs:(%rax,%rax)