// File: /workspace/github_cpp_makefile_star2_O1/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/LSH/lsh_main.cc
// Function: main
int main(int argc, char* argv[]) {
	// first step: parse the arguments
	char* input_file = NULL, *query_file = NULL, *output_file = NULL;
	int k, L, n_neighbors, radius;
	double sum1 = 0, sum2 = 0;
	
	// parse the comand line arguments given
	parse_lsh_args(argc, argv, &input_file, &output_file, &query_file,
	&k, &L, &n_neighbors, &radius);
	// parse the dataset in order to get a vector of our feature vector
	vector<vector<double>> feature_vectors = parse_input(input_file);

	// parse the query set in order to find all of the queries that the user wants to ask
	vector<vector<double>> query_vectors = parse_input(query_file);

	// make sure that there is at least one element in the dataset and the queryset
	assert(feature_vectors.size() && query_vectors.size());
	
	// create the output file that we are going to use to print the LSH results
	ofstream output;
	output.open(output_file);

	// lsh initialization values that we've learned from our dataset
	int n_points = feature_vectors.size();
	int space_dimension = feature_vectors.at(1).size();

	// defalt lsh values, that we've learned for theory
	uint64_t m = pow(2,32) - 5;
	uint32_t M = 256;
	uint32_t w = our_math::compute_w_value(feature_vectors, 1000);
	uint32_t c = 1; 
	int correct_computed = 0;
	// initialize our LSH class with the deature vectors and the aprropriate given values
	LSH<double> lsh_instant(L, m, M, n_points, k, space_dimension, w, feature_vectors);

	// initialize our brute force class, in order to find the true distance of the query and its neighbors
	BruteForce<double> bf_instant(n_points, space_dimension, feature_vectors);

	// run all the queries with LSH
	for (uint64_t i = 0; i < query_vectors.size(); i++) {
		// output the query number in the file
		output << "Query: " << i << endl;

		auto k_start = std::chrono::high_resolution_clock::now();
		// run the k-nearest neighbor algorithm, in order to obtain n neighbors
		list<pair<int,double>> kNNs = lsh_instant.kNearestNeighbour(query_vectors.at(i), n_neighbors);
		auto k_end = std::chrono::high_resolution_clock::now();

		duration<double> knn_time_span = duration_cast<duration<double>>(k_end - k_start);  
		
		auto b_start = std::chrono::high_resolution_clock::now();
		// run the brute force algorithm, in order to obtain the true nearest neighbors
		list<pair<int, double>> kBF = bf_instant.kNeighboursBF(query_vectors.at(i), n_neighbors);
		auto b_end = std::chrono::high_resolution_clock::now();

		duration<double> bf_time_span = duration_cast<duration<double>>(b_end - b_start);  

		// denote the number of neighbor we are dealing with
		int k_value = 0;

		// itterate the list of results of the knn
		list<pair<int,double>>::iterator knn_it = kNNs.begin();
		list<pair<int,double>>::iterator bf_it = kBF.begin();

		for (; knn_it != kNNs.end() && bf_it != kBF.end() ; knn_it++, bf_it++) {
			// hold the results of the knn here
			auto knn_tuple = knn_it;
			auto bf_tuple = bf_it;
			// output the findings of kNN
			output << "Nearest neighbor-" << k_value + 1 << ": " << knn_tuple->first << endl;
			// by the LSH
			output << "DistanceLSH:" << knn_tuple->second << endl;
			// and by brute force
			output << "DistanceTrue:" << bf_tuple->second << endl;
			if (knn_tuple->second == bf_tuple->second) {
				correct_computed++;
			}

			k_value++;
		}
		
		// Print the time elapsed while computing the neighbors with kNN and BF
		output << "tLSH: " << knn_time_span.count() << endl;
		output << "tTrue: " << bf_time_span.count() << endl;
		sum1 += knn_time_span.count();
		sum2 += bf_time_span.count();

		// RUn the Range Search algorithm
		list<pair<int, double>> range_search = lsh_instant.RangeSearch(query_vectors.at(i), radius, c);

		// print in the output file all of our findings
		output << "R-near neighbors:" << endl;
		for (list<pair<int,double>>::iterator it = range_search.begin(); it != range_search.end(); it++) {
			output << it->first << endl;
		}
		
		output << "\n\n\n";
	}
	cout << "mean lsh time " << sum1 / query_vectors.size() << endl;
	cout << "mean bf time " << sum2 / query_vectors.size() << endl;
	cout << "corectly computed neighbours " << correct_computed  << " out of " << n_neighbors * query_vectors.size() << endl;

	output.close();
	
	free(input_file);
	free(query_file);
	free(output_file);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
xorl %eax, %eax
leaq 0xa8(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x88(%rsp), %r8
movq %rax, (%r8)
leaq 0x80(%rsp), %rcx
movq %rax, (%rcx)
subq $0x8, %rsp
leaq 0x4c(%rsp), %rax
leaq 0x14(%rsp), %r10
leaq 0x50(%rsp), %r11
leaq 0x54(%rsp), %r9
movq %rbx, %rdx
pushq %rax
pushq %r10
pushq %r11
callq 0x27d9
addq $0x20, %rsp
movq (%rbx), %rsi
leaq 0x1b0(%rsp), %rdi
leaq 0x238(%rsp), %rdx
callq 0x20c0
leaq 0x50(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x25dc
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39a5
callq 0x2200
movq 0x88(%rsp), %rsi
leaq 0x190(%rsp), %rdi
leaq 0x238(%rsp), %rdx
callq 0x20c0
leaq 0x10(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x25dc
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39ea
callq 0x2200
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x43dd
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x43dd
leaq 0x238(%rsp), %rdi
callq 0x2390
movq 0x80(%rsp), %rsi
leaq 0x238(%rsp), %rdi
movl $0x10, %edx
callq 0x2040
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rbx
subq %rax, %rbx
sarq $0x3, %rbx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rbx
cmpq $0x1, %rbx
jbe 0x43fc
movq 0x20(%rax), %r15
subq 0x18(%rax), %r15
leaq 0xf8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4796
leaq 0xf8(%rsp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x45c7
movsd %xmm0, 0x28(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x3528
movl 0x48(%rsp), %r14d
movl 0x4c(%rsp), %ebp
leaq 0x178(%rsp), %r12
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0x4796
shrq $0x3, %r15
cvttsd2si 0x28(%rsp), %rax
subq $0x8, %rsp
leaq 0x1d8(%rsp), %rdi
movl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
movl %r14d, %esi
movl $0x100, %ecx            # imm = 0x100
movl %ebx, %r8d
movl %ebp, %r9d
pushq %r12
pushq %rax
pushq %r15
callq 0x4828
addq $0x20, %rsp
leaq 0x178(%rsp), %rdi
callq 0x3528
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4796
leaq 0x160(%rsp), %rdi
movl %ebx, -0x8(%rdi)
movl %r15d, -0x4(%rdi)
leaq 0xe0(%rsp), %rsi
callq 0x4796
leaq 0xe0(%rsp), %rdi
callq 0x3528
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x410b
movq $0x0, (%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0xc8(%rsp), %r14
leaq 0xb0(%rsp), %r12
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x7, %edx
leaq 0x238(%rsp), %rdi
leaq 0x373c(%rip), %rsi      # 0x72c7
callq 0x2240
leaq 0x238(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2160
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
callq 0x2050
movq %rax, %r13
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq (%rsp), %rsi
cmpq %rsi, %rdx
jbe 0x43bd
leaq (%rsi,%rsi,2), %rcx
movq %rcx, 0x78(%rsp)
leaq (%rax,%rcx,8), %rsi
leaq 0x140(%rsp), %rbx
movq %rbx, %rdi
callq 0x3810
movl 0xc(%rsp), %ecx
movq %r14, %rdi
leaq 0x1d0(%rsp), %rsi
movq %rbx, %rdx
callq 0x4d00
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x3c45
callq 0x2200
callq 0x2050
subq %r13, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x3586(%rip), %xmm0     # 0x71e0
movsd %xmm0, 0x70(%rsp)
callq 0x2050
movq %rax, %r13
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq (%rsp), %rdx
jbe 0x43ab
movq 0x78(%rsp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
callq 0x3810
movl 0xc(%rsp), %ecx
movq %r12, %rdi
leaq 0x158(%rsp), %rsi
movq %rbx, %rdx
callq 0x5122
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x3cd3
callq 0x2200
callq 0x2050
subq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x34f5(%rip), %xmm0     # 0x71e0
movsd %xmm0, 0x68(%rsp)
movq 0xc8(%rsp), %r15
movq 0xb0(%rsp), %rbp
cmpq %r14, %r15
setne %al
cmpq %r12, %rbp
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x3e70
movl $0x1, %r13d
movl $0x11, %edx
leaq 0x238(%rsp), %rdi
leaq 0x359d(%rip), %rsi      # 0x72cf
callq 0x2240
leaq 0x238(%rsp), %rdi
movl %r13d, %esi
callq 0x23b0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x35a7(%rip), %rsi      # 0x7300
callq 0x2240
movl 0x10(%r15), %esi
movq %rbx, %rdi
callq 0x23b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0xc, %edx
leaq 0x238(%rsp), %rdi
leaq 0x3539(%rip), %rsi      # 0x72e1
callq 0x2240
movsd 0x18(%r15), %xmm0
leaq 0x238(%rsp), %rdi
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0xd, %edx
leaq 0x238(%rsp), %rdi
leaq 0x34f0(%rip), %rsi      # 0x72ee
callq 0x2240
movsd 0x18(%rbp), %xmm0
leaq 0x238(%rsp), %rdi
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movsd 0x18(%r15), %xmm0
xorl %eax, %eax
ucomisd 0x18(%rbp), %xmm0
sete %al
addl %eax, 0x28(%rsp)
movq (%r15), %r15
movq (%rbp), %rbp
cmpq %r12, %rbp
setne %al
cmpq %r14, %r15
je 0x3e70
incl %r13d
testb %al, %al
jne 0x3d1e
movl $0x6, %edx
leaq 0x238(%rsp), %rdi
leaq 0x3478(%rip), %rsi      # 0x72fc
callq 0x2240
leaq 0x238(%rsp), %rdi
movsd 0x70(%rsp), %xmm0
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0x7, %edx
leaq 0x238(%rsp), %rdi
leaq 0x3429(%rip), %rsi      # 0x7303
callq 0x2240
leaq 0x238(%rsp), %rdi
movsd 0x68(%rsp), %xmm0
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq (%rsp), %rdx
jbe 0x43cb
movq 0x78(%rsp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
callq 0x3810
xorps %xmm0, %xmm0
cvtsi2sdl 0x44(%rsp), %xmm0
leaq 0x90(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x541c
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x3f96
callq 0x2200
movl $0x11, %edx
leaq 0x238(%rsp), %rdi
leaq 0x3361(%rip), %rsi      # 0x730b
callq 0x2240
movq 0x238(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x238(%rsp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
leaq 0x238(%rsp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movsd 0x38(%rsp), %xmm0
addsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x30(%rsp), %xmm0
addsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x90(%rsp), %r15
movq (%r15), %r15
leaq 0x90(%rsp), %rax
cmpq %rax, %r15
je 0x4061
movl 0x10(%r15), %esi
leaq 0x238(%rsp), %rdi
callq 0x23b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
jmp 0x4014
movl $0x3, %edx
leaq 0x238(%rsp), %rdi
leaq 0x32a8(%rip), %rsi      # 0x731d
callq 0x2240
movq 0x90(%rsp), %rdi
leaq 0x90(%rsp), %r15
cmpq %r15, %rdi
je 0x409f
movq (%rdi), %rbx
callq 0x2200
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x408f
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x40bc
movq (%rdi), %rbx
callq 0x2200
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x40ac
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x40d9
movq (%rdi), %rbx
callq 0x2200
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x40c9
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movq (%rsp), %rdx
incq %rdx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rdx, (%rsp)
cmpq %rax, %rdx
jb 0x3b77
jmp 0x4123
xorpd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
movsd %xmm0, 0x38(%rsp)
movq 0x5eae(%rip), %rdi      # 0x9fd8
leaq 0x31f0(%rip), %rsi      # 0x7321
movl $0xe, %edx
callq 0x2240
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, %xmm0
punpckldq 0x309c(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x30a4(%rip), %xmm0     # 0x7210
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x5e4f(%rip), %rdi      # 0x9fd8
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x5e19(%rip), %rdi      # 0x9fd8
leaq 0x316a(%rip), %rsi      # 0x7330
movl $0xd, %edx
callq 0x2240
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, %xmm0
punpckldq 0x3007(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x300f(%rip), %xmm0     # 0x7210
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x5dba(%rip), %rdi      # 0x9fd8
callq 0x2310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x5d84(%rip), %rdi      # 0x9fd8
leaq 0x30e3(%rip), %rsi      # 0x733e
movl $0x1d, %edx
callq 0x2240
movq 0x5d6c(%rip), %rdi      # 0x9fd8
movl 0x28(%rsp), %esi
callq 0x23b0
movq %rax, %rbx
leaq 0x30dd(%rip), %rsi      # 0x735c
movl $0x8, %edx
movq %rax, %rdi
callq 0x2240
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rsi
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq 0x238(%rsp), %rdi
callq 0x22a0
movq 0xa8(%rsp), %rdi
callq 0x2250
movq 0x88(%rsp), %rdi
callq 0x2250
movq 0x80(%rsp), %rdi
callq 0x2250
leaq 0x160(%rsp), %rdi
callq 0x3528
leaq 0x220(%rsp), %rdi
callq 0x3528
leaq 0x208(%rsp), %rdi
callq 0x5af8
leaq 0x1f0(%rsp), %rdi
callq 0x6ba8
movq 0x5c7e(%rip), %rax      # 0x9fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x240(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x238(%rsp,%rcx)
callq 0x21c0
leaq 0x330(%rsp), %rdi
callq 0x20a0
leaq 0x10(%rsp), %rdi
callq 0x3528
leaq 0x50(%rsp), %rdi
callq 0x3528
xorl %eax, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2fb3(%rip), %rdi      # 0x7365
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x22e0
leaq 0x2fa1(%rip), %rdi      # 0x7365
xorl %eax, %eax
callq 0x22e0
leaq 0x2f93(%rip), %rdi      # 0x7365
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x22e0
leaq 0x2e84(%rip), %rdi      # 0x7268
leaq 0x2eac(%rip), %rsi      # 0x7297
leaq 0x2ebe(%rip), %rcx      # 0x72b0
movl $0x25, %edx
callq 0x2150
leaq 0x2f62(%rip), %rdi      # 0x7365
movl $0x1, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22e0
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x458c
movq %rax, %rbx
jmp 0x4591
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x4444
jmp 0x4452
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3528
jmp 0x459e
jmp 0x4452
jmp 0x4452
movq %rax, %rbx
jmp 0x459e
movq %rax, %rbx
jmp 0x45ab
movq %rax, %rbx
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45b5
callq 0x2200
jmp 0x45b5
movq %rax, %rbx
jmp 0x45b5
movq %rax, %rbx
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45bf
callq 0x2200
jmp 0x45bf
movq %rax, %rbx
jmp 0x45bf
jmp 0x451b
jmp 0x4547
jmp 0x4547
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x454a
callq 0x2200
jmp 0x454a
jmp 0x451b
jmp 0x451b
movq %rax, %rbx
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x4584
callq 0x2200
jmp 0x4584
jmp 0x44fd
movq %rax, %rbx
jmp 0x4567
movq %rax, %rbx
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x4567
callq 0x2200
jmp 0x4567
jmp 0x4522
movq %rax, %rbx
jmp 0x4584
jmp 0x4547
movq %rax, %rbx
leaq 0x90(%rsp), %r15
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x454a
movq (%rdi), %r13
callq 0x2200
movq %r13, %rdi
cmpq %r15, %r13
jne 0x4535
jmp 0x454a
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x4567
movq (%rdi), %r15
callq 0x2200
movq %r15, %rdi
cmpq %r12, %r15
jne 0x4557
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4584
movq (%rdi), %r15
callq 0x2200
movq %r15, %rdi
cmpq %r14, %r15
jne 0x4574
leaq 0x160(%rsp), %rdi
callq 0x3528
leaq 0x1d0(%rsp), %rdi
callq 0x56f0
leaq 0x238(%rsp), %rdi
callq 0x22d0
leaq 0x10(%rsp), %rdi
callq 0x3528
leaq 0x50(%rsp), %rdi
callq 0x3528
movq %rbx, %rdi
callq 0x23c0