// File: /workspace/github_cpp_makefile_star2_O3/splatlab[P]debgr/main.cc
// Function: main
int main(int argc, char *argv[])
{
	QF cf, last_cf, first_cf, exact_cf;
	QFi cfi;
	QF local_qfs[50];
	int mode = atoi(argv[1]);
	int qbits = atoi(argv[2]);
	int qbits_aux = atoi(argv[3]);
	int numthreads = atoi(argv[4]);
	int num_hash_bits = qbits+8;	  // we use 8 bits for remainders in the main QF
	int num_hash_bits_exact = 2*K;	  // for exact k-mer counting
	int num_hash_bits_aux = 2*(K-1);  // for exact counting.
	string first_ext(".first");
	string last_ext(".last");
	string exact_ext(".exact");
	string ser_ext(".ser");
	string log_ext(".log");
	string cluster_ext(".cluster");
	string freq_ext(".freq");
	struct timeval start1, start2, end1, end2;
	struct timezone tzp;
	uint32_t OVERHEAD_SIZE = 65535;

	for (int i = 5; i < argc; i++) {
		auto* fr = new reader;
		if (getFileReader(mode, argv[i], fr)) {
			file_pointer* fp = new file_pointer;
			fp->mode = mode;
			fp->freader.reset(fr);
			fp->part_buffer = new char[OVERHEAD_SIZE];
			ip_files.push(fp);
			num_files++;
		} else {
			delete fr;
		}
	}

	string ds_file = string(argv[5]) + ser_ext;
	string ds_file_first = string(argv[5]) + first_ext;
	string ds_file_last = string(argv[5]) + last_ext;
	string ds_file_exact = string(argv[5]) + exact_ext;
	string log_file = string(argv[5]) + log_ext;
	string cluster_file = string(argv[5]) + cluster_ext;
	//string freq_file = string(argv[5]) + freq_ext;
	
	uint32_t seed = time(NULL);
	//Initialize the main  QF and aux QFs
	qf_init(&cf, (1ULL<<qbits), num_hash_bits, 0, true, "", seed);
	qf_init(&exact_cf, (1ULL<<qbits), num_hash_bits_exact, 0, true, "", seed);
	qf_init(&first_cf, (1ULL<<qbits_aux), num_hash_bits_aux, 0, true, "", seed);
	qf_init(&last_cf, (1ULL<<qbits_aux), num_hash_bits_aux, 0, true, "", seed);

	boost::thread_group prod_threads;

	for (int i = 0; i < numthreads; i++) {
		qf_init(&local_qfs[i], (1ULL << QBITS_LOCAL_QF), num_hash_bits, 0, true,
						"", seed);
		flush_object* obj = (flush_object*)malloc(sizeof(flush_object));
		obj->local_qf = &local_qfs[i];
		obj->main_qf = &cf;
		obj->first_qf = &first_cf;
		obj->last_qf = &last_cf;
		obj->exact_qf = &exact_cf;
		prod_threads.add_thread(new boost::thread(fastq_to_uint64kmers_prod,
																							obj));
	}

	cout << "Reading from the fastq file and inserting in the QF" << endl;
	gettimeofday(&start1, &tzp);
	prod_threads.join_all();
	qf_serialize(&cf, ds_file.c_str());
	qf_serialize(&exact_cf, ds_file_exact.c_str());
	qf_serialize(&first_cf, ds_file_first.c_str());
	qf_serialize(&last_cf, ds_file_last.c_str());
	gettimeofday(&end1, &tzp);
	print_time_elapsed("", &start1, &end1);

	cout << "Calc freq distribution: " << endl;
	//ofstream freq_file;
	//freq_file.open(freq_file.c_str());
	uint64_t max_cnt = 0;
	qf_iterator(&cf, &cfi, 0);
	gettimeofday(&start2, &tzp);
	do {
		uint64_t key = 0, value = 0, count = 0;
		qfi_get(&cfi, &key, &value, &count);
		//freq_file << key << " " << count << endl;
		if (max_cnt < count)
			max_cnt = count;
	} while (!qfi_next(&cfi));
	gettimeofday(&end2, &tzp);
	print_time_elapsed("", &start2, &end2);

	cout << "Maximum freq: " << max_cnt << endl;
	//freq_file.close();

	cout << "Num distinct elem: " << cf.metadata->ndistinct_elts << endl;
	cout << "Total num elems: " << cf.metadata->nelts << endl;

	//to validate the invertible hashing and exact QF
	qf_iterator(&exact_cf, &cfi, 0);
	do {
		uint64_t key = 0, value = 0, count = 0;
		qfi_get(&cfi, &key, &value, &count);
		//cout << int_to_str_node(HashUtil::hash_64i(key, BITMASK(2*K))) << endl;
	} while (!qfi_next(&cfi));
	cout << "Exact: Num distinct elem: " << exact_cf.metadata->ndistinct_elts << endl;
	cout << "Exact: Total num elems: " << exact_cf.metadata->nelts << endl;

	//to validate the invertible hashing and exact QF
	qf_iterator(&first_cf, &cfi, 0);
	do {
		uint64_t key = 0, value = 0, count = 0;
		qfi_get(&cfi, &key, &value, &count);
		//cout << int_to_str_node(HashUtil::hash_64i(key, BITMASK(2*K))) << endl;
	} while (!qfi_next(&cfi));
	cout << "First: Num distinct elem: " << first_cf.metadata->ndistinct_elts << endl;
	cout << "First: Total num elems: " << first_cf.metadata->nelts << endl;

	//to validate the invertible hashing and exact QF
	qf_iterator(&last_cf, &cfi, 0);
	do {
		uint64_t key = 0, value = 0, count = 0;
		qfi_get(&cfi, &key, &value, &count);
		//cout << int_to_str_node(HashUtil::hash_64i(key, BITMASK(2*K))) << endl;
	} while (!qfi_next(&cfi));
	cout << "Last: Num distinct elem: " << last_cf.metadata->ndistinct_elts << endl;
	cout << "Last: Total num elems: " << last_cf.metadata->nelts << endl;

#ifdef LOG_WAIT_TIME
	ofstream wait_time_log;
	wait_time_log.open(log_file.c_str());
	wait_time_log << "Id\tTotalTimeSingle\tTotalTimeSpinning\tNumLocks\tNumSingleAttempt\tPercentageSpinningTimes"
		<< endl;
	for (uint32_t i=0; i<cf.num_locks; i++)
		wait_time_log << i << "\t" << cf.wait_times[i].total_time_single << "\t\t\t" 
			<< cf.wait_times[i].total_time_spinning << "\t\t\t" 
			<< cf.wait_times[i].locks_taken << "\t\t\t" 
			<< cf.wait_times[i].locks_acquired_single_attempt << "\t\t\t"
			<< ((double)(cf.wait_times[i].locks_taken
									 -cf.wait_times[i].locks_acquired_single_attempt)
					/(double)cf.wait_times[i].locks_taken)*100
			<< endl;
	wait_time_log.close();
#endif

#ifdef LOG_CLUSTER_LENGTH
	ofstream cluster_len_log;
	cluster_len_log.open(cluster_file.c_str());
	cluster_len_log << "StartingIndex\tLength" << endl;
	for (uint32_t i = 0; i < cfi.num_clusters; i++)
		cluster_len_log << cfi.c_info[i].start_index << "\t\t" << 
			cfi.c_info[i].length << endl;
	cluster_len_log.close();

#endif

	//destroy the QF and reclaim the memory
	qf_destroy(&cf, true);
	qf_destroy(&first_cf, true);
	qf_destroy(&last_cf, true);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8f8, %rsp            # imm = 0x8F8
movq %rsi, %r15
movl %edi, %r13d
movq 0x8(%rsi), %rdi
callq 0x4550
movl %eax, %r12d
movq 0x10(%r15), %rdi
callq 0x4550
movl %eax, 0x8c(%rsp)
movq 0x18(%r15), %rdi
callq 0x4550
movl %eax, 0x94(%rsp)
movq 0x20(%r15), %rdi
callq 0x4550
movl %eax, 0x90(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9732(%rip), %rsi      # 0xf080
leaq 0x9731(%rip), %rdx      # 0xf086
leaq 0x10(%rsp), %rdi
callq 0x91ca
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9718(%rip), %rsi      # 0xf087
leaq 0x9716(%rip), %rdx      # 0xf08c
leaq 0x30(%rsp), %rdi
callq 0x91ca
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x96fd(%rip), %rsi      # 0xf08d
leaq 0x96fc(%rip), %rdx      # 0xf093
leaq 0x50(%rsp), %rdi
callq 0x91ca
leaq 0x1d0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x96e0(%rip), %rsi      # 0xf094
leaq 0x96dd(%rip), %rdx      # 0xf098
leaq 0x1c0(%rsp), %rdi
callq 0x91ca
leaq 0x1b0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x96be(%rip), %rsi      # 0xf099
leaq 0x96bb(%rip), %rdx      # 0xf09d
leaq 0x1a0(%rsp), %rdi
callq 0x91ca
leaq 0x190(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x969c(%rip), %rsi      # 0xf09e
leaq 0x969d(%rip), %rdx      # 0xf0a6
leaq 0x180(%rsp), %rdi
callq 0x91ca
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x967e(%rip), %rsi      # 0xf0a7
leaq 0x967c(%rip), %rdx      # 0xf0ac
leaq 0x160(%rsp), %rdi
callq 0x91ca
cmpl $0x6, %r13d
jl 0x5ae0
movl %r13d, %ebx
movl $0x5, %r13d
movl $0x20, %edi
callq 0x4350
movq %rax, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq (%r15,%r13,8), %rsi
movl %r12d, %edi
movq %rax, %rdx
callq 0x5832
testb %al, %al
je 0x5acc
movl $0x30, %edi
callq 0x4350
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x2f0(%rsp)
movl %r12d, 0x18(%rax)
movq %rbp, (%rax)
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x4040
movq %rax, 0x10(%r14)
leaq 0xf8d2(%rip), %rdi      # 0x15388
leaq 0x2f0(%rsp), %rsi
callq 0x984c
lock
incl 0xf956(%rip)            # 0x15420
jmp 0x5ad4
movq %rbp, %rdi
callq 0x4310
incq %r13
cmpq %r13, %rbx
jne 0x5a50
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x4130
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0x130(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5b46
movq %rdx, 0x120(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x130(%rsp)
jmp 0x5b4c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x128(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x300(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x5b7d
callq 0x4310
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x4130
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0xf0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5bdd
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x5be3
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xe8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5c10
callq 0x4310
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x4130
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0xd0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c70
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x5c76
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5ca3
callq 0x4310
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x4130
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0xb0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5d03
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x5d09
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d36
callq 0x4310
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x4130
movq 0x1a0(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0x110(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5d9c
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x5da2
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x108(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5dcf
callq 0x4310
movq 0x28(%r15), %rsi
leaq 0x2f0(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x4130
movq 0x180(%rsp), %rsi
movq 0x188(%rsp), %rdx
leaq 0x2f0(%rsp), %rdi
callq 0x40e0
leaq 0x150(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5e32
movq %rdx, 0x140(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x150(%rsp)
jmp 0x5e38
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl 0x8c(%rsp), %ebp
addl $0x8, %ebp
movq 0x8(%rax), %rdx
movq %rdx, 0x148(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x5e6f
callq 0x4310
xorl %edi, %edi
callq 0x4300
movq %rax, %r15
movl $0x1, %r14d
movl 0x8c(%rsp), %ecx
shlq %cl, %r14
movslq %ebp, %rdx
movl %r15d, (%rsp)
leaq 0x9ae2(%rip), %r9       # 0xf979
leaq 0x210(%rsp), %rdi
movq %r14, %rsi
movq %rdx, %rbx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xa2cc
movl %r15d, (%rsp)
leaq 0x9abc(%rip), %r9       # 0xf979
leaq 0x228(%rsp), %rdi
movl $0x38, %edx
movq %r14, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xa2cc
movl $0x1, %r14d
movl 0x94(%rsp), %ecx
shlq %cl, %r14
movl %r15d, (%rsp)
leaq 0x9a84(%rip), %r9       # 0xf979
leaq 0x1e0(%rsp), %rdi
movl $0x36, %edx
movq %r14, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xa2cc
movl %r15d, (%rsp)
leaq 0x9a5c(%rip), %r9       # 0xf979
leaq 0x1f8(%rsp), %rdi
movl $0x36, %edx
movq %r14, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xa2cc
leaq 0x2f0(%rsp), %rdi
callq 0x70ea
movl 0x90(%rsp), %eax
testl %eax, %eax
jle 0x6003
movl %eax, %r14d
leaq 0x440(%rsp), %r12
movl %r15d, (%rsp)
movl $0x10000, %esi          # imm = 0x10000
movq %r12, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
leaq 0x99fa(%rip), %r9       # 0xf979
callq 0xa2cc
movl $0x38, %edi
callq 0x4480
movq %rax, %rbp
movq %r12, 0x10(%rax)
leaq 0x210(%rsp), %rax
movq %rax, 0x18(%rbp)
leaq 0x1e0(%rsp), %rax
movq %rax, (%rbp)
leaq 0x1f8(%rsp), %rax
movq %rax, 0x8(%rbp)
leaq 0x228(%rsp), %rax
movq %rax, 0x20(%rbp)
movl $0x10, %edi
callq 0x4350
movq %rax, %r13
movq %rax, %rdi
leaq 0xbbf(%rip), %rsi       # 0x6b9b
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x7198
leaq 0x2f0(%rsp), %rdi
movq %r13, %rsi
callq 0x7134
addq $0x18, %r12
decq %r14
jne 0x5f61
movq 0xefbe(%rip), %rbx      # 0x14fc8
leaq 0x909c(%rip), %rsi      # 0xf0ad
movl $0x33, %edx
movq %rbx, %rdi
callq 0x43d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq 0xef8c(%rip), %rdi      # 0x14fc8
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x2e0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x45a0
leaq 0x2f0(%rsp), %rdi
callq 0x721a
movq 0x120(%rsp), %rsi
leaq 0x210(%rsp), %rdi
callq 0xa6e5
movq 0xa0(%rsp), %rsi
leaq 0x228(%rsp), %rdi
callq 0xa6e5
movq 0xe0(%rsp), %rsi
leaq 0x1e0(%rsp), %rdi
callq 0xa6e5
movq 0xc0(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0xa6e5
leaq 0x2c0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x45a0
leaq 0x2a0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9892(%rip), %rdx      # 0xf979
leaq 0x290(%rsp), %rdi
movq %rdx, %rsi
callq 0x91ca
leaq 0x290(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0x2c0(%rsp), %rdx
callq 0x4b90
movq 0x290(%rsp), %rdi
cmpq %r14, %rdi
je 0x6126
callq 0x4310
movq 0xee9b(%rip), %rbx      # 0x14fc8
leaq 0x8fad(%rip), %rsi      # 0xf0e1
movl $0x18, %edx
movq %rbx, %rdi
callq 0x43d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq 0xee69(%rip), %rdi      # 0x14fc8
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x210(%rsp), %rdi
leaq 0x240(%rsp), %rsi
xorl %edx, %edx
callq 0xcde6
leaq 0x2d0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x45a0
xorl %ebp, %ebp
leaq 0x240(%rsp), %r14
leaq 0x80(%rsp), %r12
leaq 0x70(%rsp), %r13
xorl %ebx, %ebx
movq %rbp, 0x78(%rsp)
movq %rbp, 0x80(%rsp)
movq %rbp, 0x70(%rsp)
movq %r14, %rdi
leaq 0x78(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xd057
movq 0x70(%rsp), %r15
movq %r14, %rdi
callq 0xd0e9
cmpq %r15, %rbx
cmovbeq %r15, %rbx
testl %eax, %eax
je 0x61b1
leaq 0x2b0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x45a0
leaq 0x280(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9763(%rip), %rdx      # 0xf979
leaq 0x270(%rsp), %rdi
movq %rdx, %rsi
callq 0x91ca
leaq 0x270(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
leaq 0x2b0(%rsp), %rdx
callq 0x4b90
movq 0x270(%rsp), %rdi
cmpq %r14, %rdi
je 0x6255
callq 0x4310
movq 0xed6c(%rip), %rdi      # 0x14fc8
leaq 0x8e97(%rip), %rsi      # 0xf0fa
movl $0xe, %edx
callq 0x43d0
movq 0xed54(%rip), %rdi      # 0x14fc8
movq %rbx, %rsi
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
movq 0xed1b(%rip), %rdi      # 0x14fc8
leaq 0x8e5c(%rip), %rsi      # 0xf110
movl $0x13, %edx
callq 0x43d0
movq 0x218(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0xecf7(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
movq 0xecc1(%rip), %rdi      # 0x14fc8
leaq 0x8e1d(%rip), %rsi      # 0xf12b
movl $0x11, %edx
callq 0x43d0
movq 0x218(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0xec9d(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x228(%rsp), %rdi
leaq 0x240(%rsp), %rsi
xorl %edx, %edx
callq 0xcde6
xorl %r13d, %r13d
leaq 0x240(%rsp), %rbx
leaq 0x78(%rsp), %r14
leaq 0x80(%rsp), %r15
leaq 0x70(%rsp), %r12
movq %r13, 0x78(%rsp)
movq %r13, 0x80(%rsp)
movq %r13, 0x70(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xd057
movq %rbx, %rdi
callq 0xd0e9
testl %eax, %eax
je 0x638e
movq 0xec04(%rip), %rdi      # 0x14fc8
leaq 0x8d3e(%rip), %rsi      # 0xf109
movl $0x1a, %edx
callq 0x43d0
movq 0x230(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0xebe0(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
movq 0xebaa(%rip), %rdi      # 0x14fc8
leaq 0x8cff(%rip), %rsi      # 0xf124
movl $0x18, %edx
callq 0x43d0
movq 0x230(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0xeb86(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x1e0(%rsp), %rdi
leaq 0x240(%rsp), %rsi
xorl %edx, %edx
callq 0xcde6
xorl %r13d, %r13d
leaq 0x240(%rsp), %rbx
leaq 0x78(%rsp), %r14
leaq 0x80(%rsp), %r15
leaq 0x70(%rsp), %r12
movq %r13, 0x78(%rsp)
movq %r13, 0x80(%rsp)
movq %r13, 0x70(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xd057
movq %rbx, %rdi
callq 0xd0e9
testl %eax, %eax
je 0x64a5
movq 0xeaed(%rip), %rdi      # 0x14fc8
leaq 0x8c5b(%rip), %rsi      # 0xf13d
movl $0x1a, %edx
callq 0x43d0
movq 0x1e8(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0xeac9(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
movq 0xea93(%rip), %rdi      # 0x14fc8
leaq 0x8c1c(%rip), %rsi      # 0xf158
movl $0x18, %edx
callq 0x43d0
movq 0x1e8(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0xea6f(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x1f8(%rsp), %rdi
leaq 0x240(%rsp), %rsi
xorl %edx, %edx
callq 0xcde6
xorl %r13d, %r13d
leaq 0x240(%rsp), %rbx
leaq 0x78(%rsp), %r14
leaq 0x80(%rsp), %r15
leaq 0x70(%rsp), %r12
movq %r13, 0x78(%rsp)
movq %r13, 0x80(%rsp)
movq %r13, 0x70(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xd057
movq %rbx, %rdi
callq 0xd0e9
testl %eax, %eax
je 0x65bc
movq 0xe9d6(%rip), %rdi      # 0x14fc8
leaq 0x8b78(%rip), %rsi      # 0xf171
movl $0x19, %edx
callq 0x43d0
movq 0x200(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0xe9b2(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
movq 0xe97c(%rip), %rdi      # 0x14fc8
leaq 0x8b38(%rip), %rsi      # 0xf18b
movl $0x17, %edx
callq 0x43d0
movq 0x200(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0xe958(%rip), %rdi      # 0x14fc8
callq 0x4200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4060
movq %rax, %rdi
callq 0x4210
leaq 0x210(%rsp), %rdi
movl $0x1, %esi
callq 0xa5a6
leaq 0x1e0(%rsp), %rdi
movl $0x1, %esi
callq 0xa5a6
leaq 0x1f8(%rsp), %rdi
movl $0x1, %esi
callq 0xa5a6
leaq 0x2f0(%rsp), %rdi
callq 0x72f2
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x66fc
callq 0x4310
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
leaq 0x20(%rsp), %rbx
leaq 0x40(%rsp), %r14
leaq 0x60(%rsp), %r15
je 0x6725
callq 0x4310
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x673f
callq 0x4310
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6759
callq 0x4310
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x6773
callq 0x4310
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x678d
callq 0x4310
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x67a7
callq 0x4310
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x67c1
callq 0x4310
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
cmpq %rax, %rdi
je 0x67db
callq 0x4310
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x67f5
callq 0x4310
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x6804
callq 0x4310
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x6813
callq 0x4310
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6822
callq 0x4310
xorl %eax, %eax
addq $0x8f8, %rsp            # imm = 0x8F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x270(%rsp), %rdi
jmp 0x6853
jmp 0x6a43
movq %rax, %rbx
movq 0x290(%rsp), %rdi
cmpq %r14, %rdi
jne 0x6a11
jmp 0x6a46
jmp 0x6a43
jmp 0x69f3
movq %rax, %rbx
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x6885
callq 0x4310
jmp 0x6885
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6a7c
movq %rax, %rbx
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x68b3
callq 0x4310
jmp 0x68b3
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6a96
movq %rax, %rbx
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x68e1
callq 0x4310
jmp 0x68e1
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6ab0
movq %rax, %rbx
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x690f
callq 0x4310
jmp 0x690f
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6aca
movq %rax, %rbx
movq 0x2f0(%rsp), %rdi
cmpq %r14, %rdi
je 0x693d
callq 0x4310
jmp 0x693d
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6ae4
movq %rax, %rbx
leaq 0x300(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a2d
callq 0x4310
jmp 0x6a2d
jmp 0x6a2a
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6b18
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6b32
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6b4c
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6b66
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
jmp 0x6b75
movq %rax, %rbx
leaq 0x20(%rsp), %r14
jmp 0x6b84
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6a62
jmp 0x6a43
jmp 0x6a43
movq %rax, %rbx
movq %r13, %rdi
callq 0x4310
jmp 0x6a46
jmp 0x6a2a
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
jmp 0x6a43
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
jmp 0x6afe
jmp 0x6a43
movq %rax, %rbx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
leaq 0x2f0(%rsp), %rdi
callq 0x72f2
leaq 0x150(%rsp), %rax
movq 0x140(%rsp), %rdi
cmpq %rax, %rdi
je 0x6a7c
callq 0x4310
leaq 0x110(%rsp), %rax
movq 0x100(%rsp), %rdi
cmpq %rax, %rdi
je 0x6a96
callq 0x4310
leaq 0xb0(%rsp), %rax
movq 0xa0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6ab0
callq 0x4310
leaq 0xd0(%rsp), %rax
movq 0xc0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6aca
callq 0x4310
leaq 0xf0(%rsp), %rax
movq 0xe0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6ae4
callq 0x4310
leaq 0x130(%rsp), %rax
movq 0x120(%rsp), %rdi
cmpq %rax, %rdi
je 0x6afe
callq 0x4310
leaq 0x170(%rsp), %rax
movq 0x160(%rsp), %rdi
cmpq %rax, %rdi
je 0x6b18
callq 0x4310
leaq 0x190(%rsp), %rax
movq 0x180(%rsp), %rdi
cmpq %rax, %rdi
je 0x6b32
callq 0x4310
leaq 0x1b0(%rsp), %rax
movq 0x1a0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6b4c
callq 0x4310
leaq 0x1d0(%rsp), %rax
movq 0x1c0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6b66
callq 0x4310
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x6b75
callq 0x4310
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x6b84
callq 0x4310
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x6b93
callq 0x4310
movq %rbx, %rdi
callq 0x4600