// File: /workspace/github_cpp_makefile_star2_O1/ADAPTLab[P]MuDBSCAN/partition.cpp
// Function: get_extra_points(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int*, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, vectorc*, vectorc*, int*)
void get_extra_points(vector< vector<double> >& objects, int* num_points, vector< vector<double> >& remote_objects, vectorc* remote_PrIDs, vectorc* remote_Indices, int* remote_number)
{

#ifdef _DEBUG_GP
	MPI_Barrier(MPI_COMM_WORLD);
	double end, start = MPI_Wtime();
#endif

	int k, rank, nproc, i, j;
	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
	MPI_Comm_size(MPI_COMM_WORLD, &nproc);

#ifdef _DEBUG
	if(rank == proc_of_interest) cout << "extra point time part 0 strating " << endl;
#endif

	interval* local_box = new interval[DIMENSION];
	compute_local_bounding_box(objects, num_points, local_box);
	double eps = EPS;

	for(i = 0; i < DIMENSION; i++)
	{
		local_box[i].upper += eps;
		local_box[i].lower -= eps; 
	}

	interval* gather_local_box = new interval[DIMENSION * nproc];

	MPI_Allgather(local_box, sizeof(interval) * DIMENSION, MPI_BYTE, gather_local_box,
			sizeof(interval) * DIMENSION, MPI_BYTE, MPI_COMM_WORLD);

	bool if_inside, overlap;
	int count = 0, gcount;

	vector <double> empty;
	vector <vector <double> > send_buf;
	vector <vector <double> > recv_buf;
	send_buf.resize(nproc, empty);
	recv_buf.resize(nproc, empty);

	vector <int> empty_i;
	vector <vector <int> > send_buf_ind;
	vector <vector <int> > recv_buf_ind;
	send_buf_ind.resize(nproc, empty_i);
	recv_buf_ind.resize(nproc, empty_i);

#ifdef _DEBUG_GP
	MPI_Barrier(MPI_COMM_WORLD);
	end = MPI_Wtime();
#ifdef _DEBUG
	if(rank == proc_of_interest) cout << "extra point time part 1: " << end - start << endl;	
#endif
	start = end;
#endif

	for(k = 0; k < nproc; k++)
	{
		if (k == rank) // self
			continue;

		overlap = true;
		for(j = 0; j < DIMENSION; j++)
		{
			if(gather_local_box[rank * DIMENSION + j].lower < gather_local_box[k * DIMENSION +j].lower)
			{
				if(gather_local_box[rank * DIMENSION + j].upper - gather_local_box[k * DIMENSION + j].lower < eps)	
				{
					overlap = false;
					break;
				}
			}
			else
			{
				if(gather_local_box[k * DIMENSION + j].upper - gather_local_box[rank * DIMENSION + j].lower < eps)
				{
					overlap = false;
					break;
				}
			}
		}

		if(overlap == false)
			continue;

		// printf("EXTRA POINTS \t %d\n", send_buf[0].size());
		for(i = 0; i < *num_points; i++)
		{
			if_inside = true;
			for(j = 0; j < DIMENSION; j++)
			{
				if(objects[i][j] < gather_local_box[k * DIMENSION + j].lower || 
						objects[i][j] > gather_local_box[k * DIMENSION + j].upper)
				{
					if_inside = false;
					break;
				}
			}

			if(if_inside == true)
			{

				for(j = 0; j < DIMENSION; j++)
				{
					// printf("%lf ", objects[i][j]);
					send_buf[k].push_back(objects[i][j]);
				}

				// printf("\t%d\n", rank);
				send_buf_ind[k].push_back(i);
				count++;
			}
		}
	}

#ifdef _DEBUG_GP
	MPI_Barrier(MPI_COMM_WORLD);
	end = MPI_Wtime();
#ifdef _DEBUG
	if(rank == proc_of_interest) cout << "extra point time part 2: " << end - start << endl;        
#endif
	start = end;
#endif

	vector <int> send_buf_size, recv_buf_size;
	send_buf_size.resize(nproc, 0);
	recv_buf_size.resize(nproc, 0);

	for(i = 0; i < nproc; i++)
		send_buf_size[i] = send_buf[i].size();

	MPI_Alltoall(&send_buf_size[0], 1, MPI_INT, &recv_buf_size[0], 1, MPI_INT, MPI_COMM_WORLD);

	int tag = 200, send_count, recv_count;
	MPI_Request req_send[2 * nproc], req_recv[2 * nproc];
	MPI_Status stat_send[2 * nproc], stat_recv;

	recv_count = 0;
	for(i = 0; i < nproc; i++)
	{
		if(recv_buf_size[i] > 0)
		{
			recv_buf[i].resize(recv_buf_size[i], 0);
			recv_buf_ind[i].resize(recv_buf_size[i] / DIMENSION, -1);

			MPI_Irecv(&recv_buf[i][0], recv_buf_size[i], MPI_DOUBLE, i, tag, MPI_COMM_WORLD, &req_recv[recv_count++]);
			MPI_Irecv(&recv_buf_ind[i][0], recv_buf_size[i] / DIMENSION, MPI_INT, i, tag + 1, MPI_COMM_WORLD, &req_recv[recv_count++]);
		}
	}

	send_count = 0;

	for(i = 0; i < nproc; i++)
	{
		if(send_buf_size[i] > 0)
		{
			MPI_Isend(&send_buf[i][0], send_buf_size[i], MPI_DOUBLE, i, tag, MPI_COMM_WORLD, &req_send[send_count++]);
			MPI_Isend(&send_buf_ind[i][0], send_buf_size[i] / DIMENSION, MPI_INT, i, tag + 1, MPI_COMM_WORLD, &req_send[send_count++]);
		}
	}

	int rtag, rsource, rpos;


	for(i = 0; i < recv_count; i++)
	{
		MPI_Waitany(recv_count, &req_recv[0], &rpos, &stat_recv);

		rtag = stat_recv.MPI_TAG;
		rsource = stat_recv.MPI_SOURCE;

		if(rtag == tag)
		{
			// #if _GET_EXTRA_POINT_STAT == 0  // WHY THIS IS HERE??????????????????????????????????????????????????????????????
			addPoints(rsource, recv_buf_size[rsource], DIMENSION, recv_buf[rsource], remote_objects, remote_PrIDs, remote_number);
			// #endif
			recv_buf[rsource].clear();
		}
		else if(rtag == tag + 1)
		{
			// postpond this computation and call update points later
			// processing immediately might lead to invalid computation
		}
	}	

	if(send_count > 0)
		MPI_Waitall(send_count, &req_send[0], &stat_send[0]);

#ifdef _DEBUG_GP
	MPI_Barrier(MPI_COMM_WORLD);
	end = MPI_Wtime();
#ifdef _DEBUG
	if(rank == proc_of_interest) cout << "extra point time part 3: " << end - start << endl;        
#endif
	start = end;
#endif

	updatePoints(recv_buf_ind, remote_Indices, remote_PrIDs, *remote_number);

	MPI_Reduce(&count, &gcount, 1, MPI_INT, MPI_SUM, proc_of_interest, MPI_COMM_WORLD);

#ifdef _DEBUG
	if(rank == proc_of_interest)
	{
		cout << "Total extra point " << gcount << endl;
		cout << "Extra point per processor " << gcount/nproc << endl;
	}
#endif

#ifdef _DEBUG_GP
	MPI_Barrier(MPI_COMM_WORLD);
	end = MPI_Wtime();
#ifdef _DEBUG

	if(rank == proc_of_interest) cout << "extra point time part 4: " << end - start << endl;        
#endif
	start = end;
#endif


	empty.clear();
	send_buf.clear();
	recv_buf.clear();
	send_buf_size.clear();
	recv_buf_size.clear();
	send_buf_ind.clear();
	recv_buf_ind.clear();

	delete [] gather_local_box;
	delete [] local_box;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r9, -0x118(%rbp)
movq %r8, -0x170(%rbp)
movq %rcx, -0x120(%rbp)
movq %rdx, -0x178(%rbp)
movq %rsi, %r13
movq %rdi, %rbx
movq 0xc5ff(%rip), %r14      # 0x16fa8
leaq -0x9c(%rbp), %rsi
movq %r14, %rdi
callq 0x33e0
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x32e0
leaq 0xc999(%rip), %rax      # 0x17364
movslq (%rax), %r15
movq %r15, %rdi
shlq $0x4, %rdi
testq %r15, %r15
movq $-0x1, %r14
cmovsq %r14, %rdi
callq 0x3030
movq %rax, %r12
movq %rbx, %rdi
movq %r13, -0x40(%rbp)
movq %r13, %rsi
movq %rax, %rdx
callq 0x986f
leaq 0xc954(%rip), %rax      # 0x17358
movsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
testq %r15, %r15
movq %r12, -0x110(%rbp)
jle 0xaa54
addq $0x8, %r12
xorl %eax, %eax
movsd -0x38(%rbp), %xmm1
movsd (%r12), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r12)
movsd -0x8(%r12), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%r12)
incq %rax
addq $0x10, %r12
cmpq %rax, %r15
jne 0xaa24
jmp 0xaa56
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
movslq -0x30(%rbp), %rax
imulq %r15, %rax
movq %rax, %rdi
shlq $0x4, %rdi
testl %eax, %eax
cmovsq %r14, %rdi
callq 0x3030
shll $0x4, %r15d
subq $0x8, %rsp
movq 0xc516(%rip), %rdx      # 0x16f98
movq -0x110(%rbp), %rdi
movl %r15d, %esi
movq %rax, -0x108(%rbp)
movq %rax, %rcx
movl %r15d, %r8d
movq %rdx, %r9
pushq 0xc506(%rip)            # 0x16fa8
callq 0x3060
addq $0x10, %rsp
movl $0x0, -0x44(%rbp)
xorl %eax, %eax
leaq -0x160(%rbp), %rdx
movq %rax, 0x10(%rdx)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rdx)
leaq -0x100(%rbp), %rdi
movq %rax, 0x10(%rdi)
movapd %xmm0, (%rdi)
movq %rax, -0x80(%rbp)
movapd %xmm0, -0x90(%rbp)
movslq -0x30(%rbp), %rsi
callq 0xb608
movslq -0x30(%rbp), %rsi
leaq -0x90(%rbp), %rdi
leaq -0x160(%rbp), %rdx
callq 0xb608
xorpd %xmm0, %xmm0
leaq -0x1b0(%rbp), %rdx
movapd %xmm0, (%rdx)
xorl %eax, %eax
movq %rax, 0x10(%rdx)
leaq -0x140(%rbp), %rdi
movq %rax, 0x10(%rdi)
movapd %xmm0, (%rdi)
movq %rax, -0xb0(%rbp)
movapd %xmm0, -0xc0(%rbp)
movslq -0x30(%rbp), %rsi
callq 0xb68a
movslq -0x30(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
leaq -0x1b0(%rbp), %rdx
callq 0xb68a
movl -0x30(%rbp), %eax
testl %eax, %eax
jle 0xad3b
movq -0x108(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
movl -0x9c(%rbp), %ecx
cmpq %rcx, %r13
je 0xad2b
leaq 0xc7dc(%rip), %rax      # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0xac03
imull %eax, %ecx
movslq %ecx, %rcx
movl %eax, %edx
imull %r13d, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
movq -0x50(%rbp), %rsi
addq %rsi, %rdx
shlq $0x4, %rcx
addq %rsi, %rcx
shlq $0x4, %rax
xorl %esi, %esi
movsd -0x8(%rcx,%rsi), %xmm0
movsd -0x8(%rdx,%rsi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xabe2
movsd (%rcx,%rsi), %xmm0
subsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xabfa
jmp 0xad2b
movsd (%rdx,%rsi), %xmm1
subsd %xmm0, %xmm1
movsd -0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0xad2b
addq $0x10, %rsi
cmpq %rsi, %rax
jne 0xabb7
movl $0x0, -0x2c(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, (%rax)
jle 0xad2b
xorl %ecx, %ecx
leaq (,%r13,2), %r14
addq %r13, %r14
leaq 0xc739(%rip), %rax      # 0x17364
movslq (%rax), %rax
testq %rax, %rax
jle 0xac81
movslq %ecx, %rcx
movq (%rbx), %rdx
leaq (%rcx,%rcx,2), %rcx
movq (%rdx,%rcx,8), %rcx
movl %r13d, %edx
imull %eax, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq -0x50(%rbp), %rdx
shlq $0x3, %rax
xorl %esi, %esi
movsd (%rcx,%rsi), %xmm0
movsd -0x8(%rdx,%rsi,2), %xmm1
ucomisd %xmm0, %xmm1
ja 0xad17
ucomisd (%rdx,%rsi,2), %xmm0
ja 0xad17
addq $0x8, %rsi
cmpq %rsi, %rax
jne 0xac58
leaq 0xc6dc(%rip), %rax      # 0x17364
cmpl $0x0, (%rax)
jle 0xace7
xorl %r12d, %r12d
xorl %r15d, %r15d
movq -0x100(%rbp), %rax
leaq (%rax,%r14,8), %rdi
movslq -0x2c(%rbp), %rax
movq (%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdx
addq %r12, %rdx
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xaccc
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xacd1
callq 0xbd84
incq %r15
leaq 0xc689(%rip), %rax      # 0x17364
movslq (%rax), %rax
addq $0x8, %r12
cmpq %rax, %r15
jl 0xac93
movq -0x140(%rbp), %rax
leaq (%rax,%r14,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xad0b
movl -0x2c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xad14
leaq -0x2c(%rbp), %rdx
callq 0x50ac
incl -0x44(%rbp)
movl -0x2c(%rbp), %ecx
incl %ecx
movl %ecx, -0x2c(%rbp)
movq -0x40(%rbp), %rax
cmpl (%rax), %ecx
jl 0xac24
incq %r13
movslq -0x30(%rbp), %rax
cmpq %rax, %r13
jl 0xab72
xorpd %xmm0, %xmm0
leaq -0xe0(%rbp), %rdi
movapd %xmm0, (%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rcx, -0x60(%rbp)
movapd %xmm0, -0x70(%rbp)
movslq %eax, %rsi
leaq -0x198(%rbp), %rdx
movl $0x0, (%rdx)
callq 0xb594
movslq -0x30(%rbp), %rsi
leaq -0x198(%rbp), %rdx
movl $0x0, (%rdx)
leaq -0x70(%rbp), %rdi
callq 0xb594
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x30(%rbp)
jle 0xadc9
movq -0x100(%rbp), %rax
xorl %edx, %edx
movq -0xe0(%rbp), %rcx
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rsi
movq 0x8(%rax,%rsi,8), %rdi
subq (%rax,%rsi,8), %rdi
shrq $0x3, %rdi
movl %edi, (%rcx,%rdx,4)
movl -0x2c(%rbp), %edx
incl %edx
movl %edx, -0x2c(%rbp)
cmpl -0x30(%rbp), %edx
jl 0xada5
movq -0xe0(%rbp), %rdi
movq -0x70(%rbp), %rcx
subq $0x8, %rsp
movq 0xc1f1(%rip), %rdx      # 0x16fd0
movl $0x1, %esi
movl $0x1, %r8d
movq %rdx, %r9
pushq 0xc1b5(%rip)            # 0x16fa8
callq 0x3170
addq $0x10, %rsp
movq %rsp, -0x50(%rbp)
movl -0x30(%rbp), %eax
addl %eax, %eax
movq %rsp, %rcx
shlq $0x3, %rax
subq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
movl -0x30(%rbp), %eax
addl %eax, %eax
movq %rsp, %rcx
shlq $0x3, %rax
subq %rax, %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, %rsp
movq %rsp, %rcx
leaq (%rax,%rax,2), %rax
subq %rax, %rcx
movq %rcx, -0x168(%rbp)
movq %rcx, %rsp
movl $0x0, -0x2c(%rbp)
xorl %r14d, %r14d
cmpl $0x0, -0x30(%rbp)
movl $0x0, %r12d
jle 0xaf7d
xorl %r12d, %r12d
leaq -0x98(%rbp), %r13
movq 0xc13d(%rip), %rbx      # 0x16fa8
xorl %eax, %eax
cltq
movq -0x70(%rbp), %rcx
movslq (%rcx,%rax,4), %rsi
testq %rsi, %rsi
jle 0xaf6c
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq -0x90(%rbp), %rdi
movq $0x0, -0x98(%rbp)
movq %r13, %rdx
callq 0xb5ce
movslq -0x2c(%rbp), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq -0xc0(%rbp), %rdi
movq -0x70(%rbp), %rcx
movl (%rcx,%rax,4), %eax
cltd
leaq 0xc4a0(%rip), %rcx      # 0x17364
idivl (%rcx)
movslq %eax, %rsi
movl $0xffffffff, -0x98(%rbp) # imm = 0xFFFFFFFF
movq %r13, %rdx
callq 0xb594
movslq -0x2c(%rbp), %rcx
movq -0x90(%rbp), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rdi
movq -0x70(%rbp), %rax
movl (%rax,%rcx,4), %esi
movslq %r12d, %rax
movq -0x40(%rbp), %rdx
leaq (%rdx,%rax,8), %r15
subq $0x8, %rsp
movq 0xc0ad(%rip), %rdx      # 0x16fb8
movl $0xc8, %r8d
movq %rbx, %r9
pushq %r15
callq 0x33c0
addq $0x10, %rsp
movslq -0x2c(%rbp), %rcx
movq -0xc0(%rbp), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rdi
movq -0x70(%rbp), %rax
movl (%rax,%rcx,4), %eax
cltd
leaq 0xc423(%rip), %rsi      # 0x17364
idivl (%rsi)
addq $0x8, %r15
subq $0x8, %rsp
movl %eax, %esi
movq 0xc07c(%rip), %rdx      # 0x16fd0
movl $0xc9, %r8d
movq %rbx, %r9
pushq %r15
callq 0x33c0
addq $0x10, %rsp
addl $0x2, %r12d
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl -0x30(%rbp), %eax
jl 0xae6d
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x30(%rbp)
jle 0xb04c
xorl %r14d, %r14d
movq 0xc020(%rip), %r13      # 0x16fb8
movq 0xc009(%rip), %rbx      # 0x16fa8
xorl %eax, %eax
movslq %eax, %rcx
movq -0xe0(%rbp), %rax
movl (%rax,%rcx,4), %esi
testl %esi, %esi
jle 0xb03b
movq -0x100(%rbp), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rdi
movslq %r14d, %rax
movq -0x38(%rbp), %rdx
leaq (%rdx,%rax,8), %r15
subq $0x8, %rsp
movq %r13, %rdx
movl $0xc8, %r8d
movq %rbx, %r9
pushq %r15
callq 0x3130
addq $0x10, %rsp
movslq -0x2c(%rbp), %rcx
movq -0x140(%rbp), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rdi
movq -0xe0(%rbp), %rax
movl (%rax,%rcx,4), %eax
cltd
leaq 0xc354(%rip), %rsi      # 0x17364
idivl (%rsi)
addq $0x8, %r15
subq $0x8, %rsp
movl %eax, %esi
movq 0xbfad(%rip), %rdx      # 0x16fd0
movl $0xc9, %r8d
movq %rbx, %r9
pushq %r15
callq 0x3130
addq $0x10, %rsp
addl $0x2, %r14d
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl -0x30(%rbp), %eax
jl 0xafa1
movl $0x0, -0x2c(%rbp)
testl %r12d, %r12d
jle 0xb100
leaq -0x98(%rbp), %r13
leaq -0x198(%rbp), %r15
movl %r12d, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x3390
cmpl $0xc8, -0x194(%rbp)
jne 0xb0ef
movl -0x198(%rbp), %eax
movslq %eax, %rdi
movq -0x70(%rbp), %rax
movl (%rax,%rdi,4), %esi
leaq 0xc2c5(%rip), %rax      # 0x17364
movl (%rax), %edx
leaq (%rdi,%rdi,2), %rbx
leaq (,%rbx,8), %rcx
addq -0x90(%rbp), %rcx
subq $0x8, %rsp
movq -0x178(%rbp), %r8
movq -0x120(%rbp), %r9
pushq -0x118(%rbp)
callq 0xa7b3
addq $0x10, %rsp
movq -0x90(%rbp), %rcx
movq (%rcx,%rbx,8), %rax
cmpq %rax, 0x8(%rcx,%rbx,8)
je 0xb0ef
leaq (%rcx,%rbx,8), %rcx
movq %rax, 0x8(%rcx)
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl %r12d, %eax
jl 0xb06a
testl %r14d, %r14d
jle 0xb118
movl %r14d, %edi
movq -0x38(%rbp), %rsi
movq -0x168(%rbp), %rdx
callq 0x3320
movq -0x118(%rbp), %rax
movl (%rax), %ecx
leaq -0xc0(%rbp), %rdi
movq -0x170(%rbp), %rsi
movq -0x120(%rbp), %rdx
callq 0xa8e2
subq $0x8, %rsp
movq 0xbe8a(%rip), %rcx      # 0x16fd0
movq 0xbe43(%rip), %r8       # 0x16f90
leaq -0x44(%rbp), %rdi
leaq -0x17c(%rbp), %rsi
movl $0x1, %edx
xorl %r9d, %r9d
pushq 0xbe42(%rip)            # 0x16fa8
callq 0x3380
addq $0x10, %rsp
movq -0x160(%rbp), %rax
cmpq %rax, -0x158(%rbp)
je 0xb186
movq %rax, -0x158(%rbp)
movq -0x100(%rbp), %rbx
movq -0xf8(%rbp), %r14
cmpq %rbx, %r14
je 0xb1b9
movq %rbx, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0xb1a9
callq 0x3270
addq $0x18, %r15
cmpq %r14, %r15
jne 0xb19c
movq %rbx, -0xf8(%rbp)
movq -0x90(%rbp), %rbx
movq -0x88(%rbp), %r14
cmpq %rbx, %r14
je 0xb1ec
movq %rbx, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0xb1dc
callq 0x3270
addq $0x18, %r15
cmpq %r14, %r15
jne 0xb1cf
movq %rbx, -0x88(%rbp)
movq -0xe0(%rbp), %rax
cmpq %rax, -0xd8(%rbp)
je 0xb203
movq %rax, -0xd8(%rbp)
movq -0x70(%rbp), %rax
cmpq %rax, -0x68(%rbp)
je 0xb211
movq %rax, -0x68(%rbp)
movq -0x140(%rbp), %rbx
movq -0x138(%rbp), %r14
cmpq %rbx, %r14
je 0xb244
movq %rbx, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0xb234
callq 0x3270
addq $0x18, %r15
cmpq %r14, %r15
jne 0xb227
movq %rbx, -0x138(%rbp)
movq -0xc0(%rbp), %rbx
movq -0xb8(%rbp), %r14
cmpq %rbx, %r14
je 0xb277
movq %rbx, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0xb267
callq 0x3270
addq $0x18, %r15
cmpq %r14, %r15
jne 0xb25a
movq %rbx, -0xb8(%rbp)
movq -0x108(%rbp), %rdi
callq 0x3370
movq -0x110(%rbp), %rdi
callq 0x3370
movq -0x50(%rbp), %rsp
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0xb2a1
callq 0x3270
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0xb2b2
callq 0x3270
leaq -0xc0(%rbp), %rdi
callq 0xb70c
leaq -0x140(%rbp), %rdi
callq 0xb70c
movq -0x1b0(%rbp), %rdi
testq %rdi, %rdi
je 0xb2db
callq 0x3270
leaq -0x90(%rbp), %rdi
callq 0x41f2
leaq -0x100(%rbp), %rdi
callq 0x41f2
movq -0x160(%rbp), %rdi
testq %rdi, %rdi
je 0xb304
callq 0x3270
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb32c
jmp 0xb32c
jmp 0xb32c
jmp 0xb350
movq %rax, %rbx
jmp 0xb37c
jmp 0xb32c
jmp 0xb32c
jmp 0xb32c
jmp 0xb32c
jmp 0xb32c
jmp 0xb350
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0xb33d
callq 0x3270
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0xb353
callq 0x3270
jmp 0xb353
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0xb70c
leaq -0x140(%rbp), %rdi
callq 0xb70c
movq -0x1b0(%rbp), %rdi
testq %rdi, %rdi
je 0xb37c
callq 0x3270
leaq -0x90(%rbp), %rdi
callq 0x41f2
leaq -0x100(%rbp), %rdi
callq 0x41f2
movq -0x160(%rbp), %rdi
testq %rdi, %rdi
je 0xb3a5
callq 0x3270
movq %rbx, %rdi
callq 0x34c0
nop