// File: richardposner[P]BioNetFit2/src/code/Pheromones.cpp
// Function: Pheromones::sendToSwarm(int, int, int, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int)
void Pheromones::sendToSwarm(int senderID, signed int receiverID, int tag, bool block, std::vector<std::string> &message, int messageID) {
	// Using MPI
	if (swarm_->options.useCluster) {
		std::vector<int> receivers;

		// Find out rank, size
		int world_rank;
		MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
		int world_size;
		MPI_Comm_size(MPI_COMM_WORLD, &world_size);


		// Construct the swarmMessage
		swarmMessage smessage;
		smessage.sender = senderID;


		// Sending to the entire swarm
		if (receiverID == -1) {
			//std::cout << "sending to entire swarm because receiver is -1" << std::endl;

			// TODO: Replace this exchange with a world_->sendrecv()
			smessage.tag = toString(GET_RUNNING_PARTICLES);
			if (swarm_->options.verbosity>=3) {
				std::cout << "trying to get list of running particles.." << std::endl;
			// First we need to get a list of all running particles from the master
			}

			std::string serializedMessage = serializeSwarmMessage(smessage);
			if (swarm_->options.verbosity>=3) {
				cout << "RRR sending serializedMessage GET RUNNING PARTICLES 11 = " << serializedMessage << endl;
			}
			//world_->send(0, GET_RUNNING_PARTICLES, serializedMessage);
			MPI_Send(serializedMessage.c_str(), serializedMessage.length(), MPI_CHAR, 0, GET_RUNNING_PARTICLES, MPI_COMM_WORLD);

			//std::cout << "trying to receive list of running particles.." << std::endl;
			//usleep(10000);

			// This swarmMessage will hold the list of running particles received from master
			MPI_Status status;

			int count;
			MPI_Probe(0, 0, MPI_COMM_WORLD, &status);
			MPI_Get_count(&status, MPI_INT, &count);
			char *buffer = new char[count + 1];
			MPI_Recv(buffer, count, MPI_CHAR, 0, SEND_RUNNING_PARTICLES, MPI_COMM_WORLD, &status);
			buffer[count] = '\0';
			if (swarm_->options.verbosity>=3) {
				std::cout << "received list of running particles = " << buffer << std::endl;
			}
			swarmMessage rsmessage = deserializeSwarmMessage(std::string(buffer));
			delete [] buffer;

			//for (auto p: runningParticles) 
			for (auto p = rsmessage.message.begin(); p != rsmessage.message.end(); ++p) {
			    if (swarm_->options.verbosity>=3) {

			    	std::cout << "adding receiver: " << *p << std::endl;
			    }
				receivers.push_back(stoi(*p));
			}

		}
		else {
		    if (swarm_->options.verbosity>=3) {

		    	cout << "RRR sendToSwarm senderID: " << senderID << " receiverID: " << receiverID << " tag: " << tag << endl;

				std::cout << "Sending tag " << tag << " to: " << receiverID << std::endl;
		    }
			// If we're not sending to the entire swarm, put only the target pID into the receivers list
			receivers.push_back(receiverID);
		}

		smessage.tag = toString(tag);

		//for (auto m: mpiMessage) 
		for (auto m = message.begin(); m != message.end(); ++m) {
			//std::cout << "adding: " << *m << std::endl;
			smessage.message.push_back(*m);
		}

		std::string smString(serializeSwarmMessage(smessage));
		if (swarm_->options.verbosity>=3) {
			cout << "send message is smString = '" << smString << "'" << endl;
		}
		// Loop through receivers and perform the send operation
		for (std::vector<int>::iterator i = receivers.begin(); i != receivers.end(); ++i) {
			// Blocking send
		    int world_size;
		    MPI_Comm_size(MPI_COMM_WORLD, &world_size);

			if(receiverID < world_size){

				//usleep(10000);


				if (block) {
				    if (swarm_->options.verbosity>=3) {

				    	std::cout << "attempting a block send from " << senderID << " to " << receiverID << std::endl;
				    }
					try{
						MPI_Send(smString.c_str(), smString.length(), MPI_CHAR, receiverID, tag, MPI_COMM_WORLD);




					} catch (interprocess_exception& e) {
						cout << e.what( ) << std::endl;
			    	}
				    if (swarm_->options.verbosity>=3) {

				    	std::cout << "block send from " << senderID << " to " << receiverID << " succeeded" << std::endl;
				    }
				}
				// Non-blocking send
				else {
					if (swarm_->options.verbosity>=3) {
						std::cout << "attempting a non-block send from " << senderID << " to " << receiverID << std::endl;
					}

					int result = MPI_Send(smString.c_str(), smString.length(), MPI_CHAR, receiverID, tag, MPI_COMM_WORLD);
					if (swarm_->options.verbosity>=3) {
						if (result == MPI_SUCCESS){
							std::cout << "Rank " <<  world_rank << " sent message to " << receiverID << " tag: " << tag << " message: " << smString.c_str() << std::endl;
						}else{
							cout << "ERROR MESSAGE NOT SENT!!!" << endl;
						}
						std::cout << "non-block send from " << senderID << " to " << receiverID << " succeeded" << std::endl;
					}
					//recvStatus_ = recvRequest_.wait();
					//std::cout << "tag: " << recvStatus_.tag() << std::endl;
					//std::cout << "error: " << recvStatus_.error() << std::endl;
				}
			}
		}
	}else {
		// Using IPC
		std::vector<int> receivers;

		// Construct the swarmMessage
		swarmMessage smessage;
		smessage.sender = senderID;

		int nPar = 0; //Raquel: added a counter for debugging

		// Sending to the entire swarm
		if (receiverID == -1) {
			//std::cout << "sending to entire swarm because receiver is -1" << std::endl;
			// First we need to get a list of all running particles from the master

			// Set tag to tell master we need a list of running particles
			smessage.tag = toString(GET_RUNNING_PARTICLES);
			//std::cout << "trying to get list of running particles.." << std::endl;

			// Serialize the message
			std::string serializedMessage = serializeSwarmMessage(smessage);
			if (serializedMessage.length() > MAX_SWARM_MESSAGE_SIZE) {
				std::cout << "ERROR: Serialized Message length: " << serializedMessage.length() << " greater than MAX_SWARM_MESSAGE_SIZE" << std::endl;
				std::abort();
			}

			smq_[0]->send(serializedMessage.c_str(), serializedMessage.length(), 0);

			//std::cout << "trying to receive list of running particles.." << std::endl;

			// This swarmMessage will hold the list of running particles received from master

			message_queue::size_type recvd_size;

			// Receive and de-serialize the message
			char buffer[MAX_SWARM_MESSAGE_SIZE + 1];
			unsigned int priority;

			smq_[0]->receive(buffer, sizeof(buffer), recvd_size, priority);

			buffer[recvd_size] = '\0';
			swarmMessage rsmessage = deserializeSwarmMessage(buffer);

			//std::cout << "received list of running particles.." << std::endl;

			//for (auto p: runningParticles) 
			for (auto p = rsmessage.message.begin(); p != rsmessage.message.end(); ++p) {
				//std::cout << "adding receiver: " << *p << std::endl;
				receivers.push_back(stoi(*p));
				nPar++; //Raquel: added a counter for debugging

			}

			cout << "RAQUEL: Found " << nPar << " particles running." << endl; //Raquel: added for debugging

		}
		else {
			//std::cout << "Sending to: " << receiverID << std::endl;
			// If we're not sending to the entire swarm, put only the target pID into the receivers list
			receivers.push_back(receiverID);
		}

		// Set the message tag as specified by the sender
		smessage.tag = toString(tag);

		// Add the message array to the swarmMessage
		//for (auto m: mpiMessage) 
		for (auto m = message.begin(); m != message.end(); ++m) {
			//std::cout << senderID << " adding: " << *m << std::endl;
			smessage.message.push_back(*m);
		}

		// Set a random messageID
		if (messageID == -1) {
			messageID = rand();
		}

		smessage.id = messageID;

		// Serialize the swarmMessage
		std::string serializedMessage = serializeSwarmMessage(smessage);
		if (serializedMessage.length() > MAX_SWARM_MESSAGE_SIZE) {
			std::cout << "ERROR: Serialized Message length: " << serializedMessage.length() << " greater than MAX_SWARM_MESSAGE_SIZE" << std::endl;
			abort();
		}

		// Loop through receivers and perform the send operation
		for (std::vector<int>::iterator i = receivers.begin(); i != receivers.end(); ++i) {
			std::cout << "### " << senderID << " sending " << smessage.tag << " to " << *i	<< ". ser: " << serializedMessage << std::endl;
			//smq_[*i]->send(serializedMessage.data(), serializedMessage.size(), 0);
			//Raquel: added for debbuging
			bool sendAttempt2 = smq_[*i]->try_send(serializedMessage.data(), serializedMessage.size(), 0);


			if (sendAttempt2 == false){
				cout << "RAQUEL: queue was full when message was sent" << endl;

			}else{ cout << "RAQUEL: sending success" << endl; }
			
			//std::cout << "sent" << std::endl;
			if (block) {
				bool foundMessage = true;
				while (foundMessage) {
					//usleep(150000);
					//std::cout << senderID << "loop" << std::endl;

					// TODO: This non-erasing recvMessage might slow down the receiver finding the message since it
					// requires a re-send every time we check

					// If we're blocking, we need to repeatedly check to see if the message still exists in the queue
					if (recvMessage(senderID, receiverID, tag, false, univMessageReceiver, false, messageID)) {
						foundMessage = true;
					}
					else {
						foundMessage = false;
					}
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb90, %rsp            # imm = 0xB90
movb %r8b, %al
movl 0x10(%rbp), %r8d
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x888(%rbp)
movq 0x50(%rax), %rax
testb $0x1, 0x1631(%rax)
je 0xce336
leaq -0x38(%rbp), %rdi
callq 0xd07e0
movq 0x207a1c(%rip), %rdi    # 0x2d4f90
leaq -0x3c(%rbp), %rsi
callq 0x311b0
jmp 0xcd57f
movq 0x207a0a(%rip), %rdi    # 0x2d4f90
leaq -0x50(%rbp), %rsi
callq 0x30f90
jmp 0xcd591
leaq -0x90(%rbp), %rdi
callq 0xd0800
movl -0xc(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0xcda89
leaq -0xb0(%rbp), %rdi
movl $0xb, %esi
callq 0x17ce40
jmp 0xcd5c0
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x2fd80
leaq -0xb0(%rbp), %rdi
callq 0x311e8
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcd648
movq 0x207956(%rip), %rdi    # 0x2d4f50
leaq 0x110ccd(%rip), %rsi    # 0x1de2ce
callq 0x2ff50
movq %rax, -0x890(%rbp)
jmp 0xcd60f
movq -0x890(%rbp), %rdi
movq 0x2079ab(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcd624
jmp 0xcd648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xce328
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xce31c
leaq -0x110(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xd0830
jmp 0xcd65d
movq -0x888(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
leaq -0x110(%rbp), %rdx
callq 0xcec50
jmp 0xcd679
leaq -0x110(%rbp), %rdi
callq 0xc1f00
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcd716
movq 0x2078b0(%rip), %rdi    # 0x2d4f50
leaq 0x110c51(%rip), %rsi    # 0x1de2f8
callq 0x2ff50
movq %rax, -0x898(%rbp)
jmp 0xcd6b5
movq -0x898(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x2f780
movq %rax, -0x8a0(%rbp)
jmp 0xcd6d1
movq -0x8a0(%rbp), %rdi
movq 0x2078e9(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcd6e6
jmp 0xcd716
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc1f00
jmp 0xce31c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xcda78
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x8b0(%rbp)
callq 0x2f290
movq -0x8b0(%rbp), %rdi
movq %rax, -0x8a8(%rbp)
callq 0x2ff30
movq -0x8a8(%rbp), %rdi
movl %eax, %esi
movq 0x2077d4(%rip), %rdx    # 0x2d4f20
movq 0x20783d(%rip), %r9     # 0x2d4f90
xorl %ecx, %ecx
movl $0xb, %r8d
callq 0x30100
jmp 0xcd762
movq 0x207827(%rip), %rdx    # 0x2d4f90
xorl %esi, %esi
leaq -0x128(%rbp), %rcx
movl %esi, %edi
callq 0x2fdf0
jmp 0xcd77b
movq 0x207826(%rip), %rsi    # 0x2d4fa8
leaq -0x128(%rbp), %rdi
leaq -0x12c(%rbp), %rdx
callq 0x2f390
jmp 0xcd797
movl -0x12c(%rbp), %eax
incl %eax
movslq %eax, %rdi
callq 0x2fb80
movq %rax, -0x8b8(%rbp)
jmp 0xcd7b0
movq -0x8b8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
movl -0x12c(%rbp), %esi
movq %rsp, %rax
leaq -0x128(%rbp), %rcx
movq %rcx, (%rax)
movq 0x207741(%rip), %rdx    # 0x2d4f20
movq 0x2077aa(%rip), %r9     # 0x2d4f90
xorl %ecx, %ecx
movl $0xc, %r8d
callq 0x30410
jmp 0xcd7f5
movq -0x888(%rbp), %rax
movq -0x138(%rbp), %rcx
movslq -0x12c(%rbp), %rdx
movb $0x0, (%rcx,%rdx)
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcd86a
movq 0x20772e(%rip), %rdi    # 0x2d4f50
leaq 0x110b09(%rip), %rsi    # 0x1de332
callq 0x2ff50
movq %rax, -0x8c0(%rbp)
jmp 0xcd837
movq -0x8c0(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x2ff50
movq %rax, -0x8c8(%rbp)
jmp 0xcd853
movq -0x8c8(%rbp), %rdi
movq 0x207767(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcd868
jmp 0xcd86a
movq -0x138(%rbp), %rax
movq %rax, -0x8d8(%rbp)
leaq -0x199(%rbp), %rdi
movq %rdi, -0x8d0(%rbp)
callq 0x30a70
movq -0x8d8(%rbp), %rsi
movq -0x8d0(%rbp), %rdx
leaq -0x198(%rbp), %rdi
callq 0x44470
jmp 0xcd8a7
movq -0x888(%rbp), %rsi
leaq -0x178(%rbp), %rdi
leaq -0x198(%rbp), %rdx
callq 0xced70
jmp 0xcd8c3
leaq -0x198(%rbp), %rdi
callq 0x311e8
leaq -0x199(%rbp), %rdi
callq 0x311c0
movq -0x138(%rbp), %rax
movq %rax, -0x8e0(%rbp)
cmpq $0x0, %rax
je 0xcd8fb
movq -0x8e0(%rbp), %rdi
callq 0x2f910
leaq -0x178(%rbp), %rdi
addq $0x28, %rdi
callq 0x458f0
movq %rax, -0x1a8(%rbp)
leaq -0x178(%rbp), %rdi
addq $0x28, %rdi
callq 0x45920
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0xcd945
jmp 0xcda5b
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcda05
movq 0x2075ec(%rip), %rdi    # 0x2d4f50
leaq 0x1109ed(%rip), %rsi    # 0x1de358
callq 0x2ff50
movq %rax, -0x8e8(%rbp)
jmp 0xcd979
leaq -0x1a8(%rbp), %rdi
callq 0x8aed0
movq -0x8e8(%rbp), %rdi
movq %rax, %rsi
callq 0x2f780
movq %rax, -0x8f0(%rbp)
jmp 0xcd99d
movq -0x8f0(%rbp), %rdi
movq 0x20761d(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcd9b2
jmp 0xcda05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xcd9da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x311e8
leaq -0x199(%rbp), %rdi
callq 0x311c0
jmp 0xcda78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0xc1f00
jmp 0xcda78
leaq -0x1a8(%rbp), %rdi
callq 0x8aed0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x44520
movl %eax, -0x8f4(%rbp)
jmp 0xcda2a
movl -0x8f4(%rbp), %eax
movl %eax, -0x1b4(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x1b4(%rbp), %rsi
callq 0xd08a0
jmp 0xcda48
jmp 0xcda4a
leaq -0x1a8(%rbp), %rdi
callq 0x8aef0
jmp 0xcd912
leaq -0x178(%rbp), %rdi
callq 0xc1f00
leaq -0xd0(%rbp), %rdi
callq 0x311e8
jmp 0xcdbe2
leaq -0xd0(%rbp), %rdi
callq 0x311e8
jmp 0xce31c
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcdbd1
movq 0x2074a8(%rip), %rdi    # 0x2d4f50
leaq 0x1108bb(%rip), %rsi    # 0x1de36a
callq 0x2ff50
movq %rax, -0x900(%rbp)
jmp 0xcdabd
movq -0x900(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0x908(%rbp)
jmp 0xcdad5
movq -0x908(%rbp), %rdi
leaq 0x1108a2(%rip), %rsi    # 0x1de385
callq 0x2ff50
movq %rax, -0x910(%rbp)
jmp 0xcdaf1
movq -0x910(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0x918(%rbp)
jmp 0xcdb09
movq -0x918(%rbp), %rdi
leaq 0x11087c(%rip), %rsi    # 0x1de393
callq 0x2ff50
movq %rax, -0x920(%rbp)
jmp 0xcdb25
movq -0x920(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2f800
movq %rax, -0x928(%rbp)
jmp 0xcdb3d
movq -0x928(%rbp), %rdi
movq 0x20747d(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcdb52
movq 0x2073f7(%rip), %rdi    # 0x2d4f50
leaq 0x11083a(%rip), %rsi    # 0x1de39a
callq 0x2ff50
movq %rax, -0x930(%rbp)
jmp 0xcdb6e
movq -0x930(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2f800
movq %rax, -0x938(%rbp)
jmp 0xcdb86
movq -0x938(%rbp), %rdi
leaq 0x110813(%rip), %rsi    # 0x1de3a7
callq 0x2ff50
movq %rax, -0x940(%rbp)
jmp 0xcdba2
movq -0x940(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0x948(%rbp)
jmp 0xcdbba
movq -0x948(%rbp), %rdi
movq 0x207400(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcdbcf
jmp 0xcdbd1
leaq -0x38(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xd08d0
jmp 0xcdbe0
jmp 0xcdbe2
movl -0x14(%rbp), %esi
leaq -0x1d8(%rbp), %rdi
callq 0x17ce40
jmp 0xcdbf3
leaq -0x90(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x2fd80
leaq -0x1d8(%rbp), %rdi
callq 0x311e8
movq -0x20(%rbp), %rdi
callq 0x458f0
movq %rax, -0x1e0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x45920
movq %rax, -0x1e8(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0xcdc4b
jmp 0xcdc83
leaq -0x68(%rbp), %rax
movq %rax, -0x950(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x8aed0
movq -0x950(%rbp), %rdi
movq %rax, %rsi
callq 0x45280
jmp 0xcdc73
jmp 0xcdc75
leaq -0x1e0(%rbp), %rdi
callq 0x8aef0
jmp 0xcdc22
leaq -0x248(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xd0830
jmp 0xcdc98
movq -0x888(%rbp), %rsi
leaq -0x208(%rbp), %rdi
leaq -0x248(%rbp), %rdx
callq 0xcec50
jmp 0xcdcb4
leaq -0x248(%rbp), %rdi
callq 0xc1f00
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcdd71
movq 0x207271(%rip), %rdi    # 0x2d4f50
leaq 0x1106c7(%rip), %rsi    # 0x1de3ad
callq 0x2ff50
movq %rax, -0x958(%rbp)
jmp 0xcdcf4
movq -0x958(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x2f780
movq %rax, -0x960(%rbp)
jmp 0xcdd10
movq -0x960(%rbp), %rdi
leaq 0x1083f7(%rip), %rsi    # 0x1d6115
callq 0x2ff50
movq %rax, -0x968(%rbp)
jmp 0xcdd2c
movq -0x968(%rbp), %rdi
movq 0x20728e(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcdd41
jmp 0xcdd71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0xc1f00
jmp 0xce31c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xce310
leaq -0x38(%rbp), %rdi
callq 0xd0940
movq %rax, -0x250(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd09b0
movq %rax, -0x258(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0xd0970
testb $0x1, %al
jne 0xcddad
jmp 0xce2ea
movq 0x2071dc(%rip), %rdi    # 0x2d4f90
leaq -0x25c(%rbp), %rsi
callq 0x30f90
jmp 0xcddc2
movl -0x10(%rbp), %eax
cmpl -0x25c(%rbp), %eax
jge 0xce2d7
testb $0x1, -0x15(%rbp)
je 0xcdffd
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcde6e
movq 0x20715a(%rip), %rdi    # 0x2d4f50
leaq 0x1105cd(%rip), %rsi    # 0x1de3ca
callq 0x2ff50
movq %rax, -0x970(%rbp)
jmp 0xcde0b
movq -0x970(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0x978(%rbp)
jmp 0xcde23
movq -0x978(%rbp), %rdi
leaq 0x115a53(%rip), %rsi    # 0x1e3884
callq 0x2ff50
movq %rax, -0x980(%rbp)
jmp 0xcde3f
movq -0x980(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0x988(%rbp)
jmp 0xcde57
movq -0x988(%rbp), %rdi
movq 0x207163(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcde6c
jmp 0xcde6e
leaq -0x208(%rbp), %rdi
movq %rdi, -0x998(%rbp)
callq 0x2f290
movq -0x998(%rbp), %rdi
movq %rax, -0x990(%rbp)
callq 0x2ff30
movq -0x990(%rbp), %rdi
movl %eax, %esi
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
movq 0x207075(%rip), %rdx    # 0x2d4f20
movq 0x2070de(%rip), %r9     # 0x2d4f90
callq 0x30100
jmp 0xcdeb9
jmp 0xcdf2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xce310
movq -0x48(%rbp), %rdi
callq 0x2f160
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x20704f(%rip), %rdi    # 0x2d4f50
callq 0x2ff50
movq %rax, -0x9a0(%rbp)
jmp 0xcdf0f
movq -0x9a0(%rbp), %rdi
movq 0x2070ab(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcdf24
callq 0x304d0
jmp 0xcdf2b
jmp 0xcdf2d
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcdff8
movq 0x207004(%rip), %rdi    # 0x2d4f50
leaq 0x110484(%rip), %rsi    # 0x1de3d7
callq 0x2ff50
movq %rax, -0x9a8(%rbp)
jmp 0xcdf61
movq -0x9a8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0x9b0(%rbp)
jmp 0xcdf79
movq -0x9b0(%rbp), %rdi
leaq 0x1158fd(%rip), %rsi    # 0x1e3884
callq 0x2ff50
movq %rax, -0x9b8(%rbp)
jmp 0xcdf95
movq -0x9b8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0x9c0(%rbp)
jmp 0xcdfad
movq -0x9c0(%rbp), %rdi
leaq 0x11042d(%rip), %rsi    # 0x1de3e8
callq 0x2ff50
movq %rax, -0x9c8(%rbp)
jmp 0xcdfc9
movq -0x9c8(%rbp), %rdi
movq 0x206ff1(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcdfde
jmp 0xcdff8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x304d0
jmp 0xcdff3
jmp 0xce310
jmp 0xce2d5
movq -0x888(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xce090
movq 0x206f38(%rip), %rdi    # 0x2d4f50
leaq 0x1103d4(%rip), %rsi    # 0x1de3f3
callq 0x2ff50
movq %rax, -0x9d0(%rbp)
jmp 0xce02d
movq -0x9d0(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0x9d8(%rbp)
jmp 0xce045
movq -0x9d8(%rbp), %rdi
leaq 0x115831(%rip), %rsi    # 0x1e3884
callq 0x2ff50
movq %rax, -0x9e0(%rbp)
jmp 0xce061
movq -0x9e0(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0x9e8(%rbp)
jmp 0xce079
movq -0x9e8(%rbp), %rdi
movq 0x206f41(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce08e
jmp 0xce090
leaq -0x208(%rbp), %rdi
movq %rdi, -0xa00(%rbp)
callq 0x2f290
movq -0xa00(%rbp), %rdi
movq %rax, -0x9f8(%rbp)
callq 0x2ff30
movq -0x9f8(%rbp), %rdi
movl %eax, %esi
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
movq 0x206e53(%rip), %rdx    # 0x2d4f20
movq 0x206ebc(%rip), %r9     # 0x2d4f90
callq 0x30100
movl %eax, -0x9ec(%rbp)
jmp 0xce0e1
movq -0x888(%rbp), %rax
movl -0x9ec(%rbp), %ecx
movl %ecx, -0x26c(%rbp)
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xce2d3
cmpl $0x0, -0x26c(%rbp)
jne 0xce205
movq 0x206e37(%rip), %rdi    # 0x2d4f50
leaq 0x1102f5(%rip), %rsi    # 0x1de415
callq 0x2ff50
movq %rax, -0xa08(%rbp)
jmp 0xce12e
movq -0xa08(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x2f800
movq %rax, -0xa10(%rbp)
jmp 0xce146
movq -0xa10(%rbp), %rdi
leaq 0x1102c7(%rip), %rsi    # 0x1de41b
callq 0x2ff50
movq %rax, -0xa18(%rbp)
jmp 0xce162
movq -0xa18(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0xa20(%rbp)
jmp 0xce17a
movq -0xa20(%rbp), %rdi
leaq 0x11020b(%rip), %rsi    # 0x1de393
callq 0x2ff50
movq %rax, -0xa28(%rbp)
jmp 0xce196
movq -0xa28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2f800
movq %rax, -0xa30(%rbp)
jmp 0xce1ae
movq -0xa30(%rbp), %rdi
leaq 0x110271(%rip), %rsi    # 0x1de42d
callq 0x2ff50
movq %rax, -0xa38(%rbp)
jmp 0xce1ca
leaq -0x208(%rbp), %rdi
callq 0x2f290
movq -0xa38(%rbp), %rdi
movq %rax, %rsi
callq 0x2ff50
movq %rax, -0xa40(%rbp)
jmp 0xce1ee
movq -0xa40(%rbp), %rdi
movq 0x206dcc(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce203
jmp 0xce238
movq 0x206d44(%rip), %rdi    # 0x2d4f50
leaq 0x110225(%rip), %rsi    # 0x1de438
callq 0x2ff50
movq %rax, -0xa48(%rbp)
jmp 0xce221
movq -0xa48(%rbp), %rdi
movq 0x206d99(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce236
jmp 0xce238
movq 0x206d11(%rip), %rdi    # 0x2d4f50
leaq 0x1101ba(%rip), %rsi    # 0x1de400
callq 0x2ff50
movq %rax, -0xa50(%rbp)
jmp 0xce254
movq -0xa50(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0xa58(%rbp)
jmp 0xce26c
movq -0xa58(%rbp), %rdi
leaq 0x11560a(%rip), %rsi    # 0x1e3884
callq 0x2ff50
movq %rax, -0xa60(%rbp)
jmp 0xce288
movq -0xa60(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x2f800
movq %rax, -0xa68(%rbp)
jmp 0xce2a0
movq -0xa68(%rbp), %rdi
leaq 0x11013a(%rip), %rsi    # 0x1de3e8
callq 0x2ff50
movq %rax, -0xa70(%rbp)
jmp 0xce2bc
movq -0xa70(%rbp), %rdi
movq 0x206cfe(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce2d1
jmp 0xce2d3
jmp 0xce2d5
jmp 0xce2d7
jmp 0xce2d9
leaq -0x250(%rbp), %rdi
callq 0xd09e0
jmp 0xcdd81
leaq -0x208(%rbp), %rdi
callq 0x311e8
leaq -0x90(%rbp), %rdi
callq 0xc1f00
leaq -0x38(%rbp), %rdi
callq 0xd0a00
jmp 0xcec2d
leaq -0x208(%rbp), %rdi
callq 0x311e8
leaq -0x90(%rbp), %rdi
callq 0xc1f00
leaq -0x38(%rbp), %rdi
callq 0xd0a00
jmp 0xcec36
leaq -0x288(%rbp), %rdi
callq 0xd07e0
leaq -0x2c8(%rbp), %rdi
callq 0xd0800
movl -0xc(%rbp), %eax
movl %eax, -0x2a4(%rbp)
movl $0x0, -0x2cc(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0xce75e
leaq -0x2f0(%rbp), %rdi
movl $0xb, %esi
callq 0x17ce40
jmp 0xce37e
leaq -0x2c8(%rbp), %rdi
movq %rdi, -0xa78(%rbp)
leaq -0x2f0(%rbp), %rsi
movq %rsi, -0xa80(%rbp)
callq 0x2fd80
movq -0xa80(%rbp), %rdi
callq 0x311e8
movq -0xa78(%rbp), %rsi
leaq -0x350(%rbp), %rdi
callq 0xd0830
jmp 0xce3c0
movq -0x888(%rbp), %rsi
leaq -0x310(%rbp), %rdi
leaq -0x350(%rbp), %rdx
callq 0xcec50
jmp 0xce3dc
leaq -0x350(%rbp), %rdi
callq 0xc1f00
leaq -0x310(%rbp), %rdi
callq 0x2ff30
cmpq $0x3e8, %rax            # imm = 0x3E8
jbe 0xce4b5
movq 0x206b49(%rip), %rdi    # 0x2d4f50
leaq 0x110044(%rip), %rsi    # 0x1de452
callq 0x2ff50
movq %rax, -0xa88(%rbp)
jmp 0xce41c
leaq -0x310(%rbp), %rdi
callq 0x2ff30
movq -0xa88(%rbp), %rdi
movq %rax, %rsi
callq 0x30cf0
movq %rax, -0xa90(%rbp)
jmp 0xce440
movq -0xa90(%rbp), %rdi
leaq 0x110027(%rip), %rsi    # 0x1de475
callq 0x2ff50
movq %rax, -0xa98(%rbp)
jmp 0xce45c
movq -0xa98(%rbp), %rdi
movq 0x206b5e(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce471
callq 0x303b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xcec13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x350(%rbp), %rdi
callq 0xc1f00
jmp 0xcec13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xce74d
movq -0x888(%rbp), %rdi
addq $0x68, %rdi
xorl %eax, %eax
movl %eax, -0xa9c(%rbp)
movl %eax, %esi
callq 0xd0a60
movq (%rax), %rax
movq %rax, -0xab0(%rbp)
leaq -0x310(%rbp), %rdi
movq %rdi, -0xab8(%rbp)
callq 0x2f290
movq -0xab8(%rbp), %rdi
movq %rax, -0xaa8(%rbp)
callq 0x2ff30
movq -0xab0(%rbp), %rdi
movq -0xaa8(%rbp), %rsi
movl -0xa9c(%rbp), %ecx
movq %rax, %rdx
callq 0xd0a80
jmp 0xce51d
movq -0x888(%rbp), %rdi
addq $0x68, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd0a60
movq (%rax), %rdi
leaq -0x750(%rbp), %rsi
movl $0x3e9, %edx            # imm = 0x3E9
leaq -0x358(%rbp), %rcx
leaq -0x754(%rbp), %r8
callq 0xd0ae0
jmp 0xce555
movq -0x358(%rbp), %rax
movb $0x0, -0x750(%rbp,%rax)
leaq -0x7b9(%rbp), %rdi
movq %rdi, -0xac0(%rbp)
callq 0x30a70
movq -0xac0(%rbp), %rdx
leaq -0x7b8(%rbp), %rdi
leaq -0x750(%rbp), %rsi
callq 0x44470
jmp 0xce593
movq -0x888(%rbp), %rsi
leaq -0x798(%rbp), %rdi
leaq -0x7b8(%rbp), %rdx
callq 0xced70
jmp 0xce5af
leaq -0x7b8(%rbp), %rdi
callq 0x311e8
leaq -0x7b9(%rbp), %rdi
callq 0x311c0
leaq -0x798(%rbp), %rdi
addq $0x28, %rdi
callq 0x458f0
movq %rax, -0x7c8(%rbp)
leaq -0x798(%rbp), %rdi
addq $0x28, %rdi
callq 0x45920
movq %rax, -0x7d0(%rbp)
leaq -0x7c8(%rbp), %rdi
leaq -0x7d0(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0xce611
jmp 0xce6cb
leaq -0x7c8(%rbp), %rdi
callq 0x8aed0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x44520
movl %eax, -0xac4(%rbp)
jmp 0xce636
movl -0xac4(%rbp), %eax
movl %eax, -0x7d4(%rbp)
leaq -0x288(%rbp), %rdi
leaq -0x7d4(%rbp), %rsi
callq 0xd08a0
jmp 0xce657
movl -0x2cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2cc(%rbp)
leaq -0x7c8(%rbp), %rdi
callq 0x8aef0
jmp 0xce5de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xce69d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x7b8(%rbp), %rdi
callq 0x311e8
leaq -0x7b9(%rbp), %rdi
callq 0x311c0
jmp 0xce74d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x798(%rbp), %rdi
callq 0xc1f00
jmp 0xce74d
movq 0x20687e(%rip), %rdi    # 0x2d4f50
leaq 0x10fdc1(%rip), %rsi    # 0x1de49a
callq 0x2ff50
movq %rax, -0xad0(%rbp)
jmp 0xce6e7
movq -0xad0(%rbp), %rdi
movl -0x2cc(%rbp), %esi
callq 0x2f800
movq %rax, -0xad8(%rbp)
jmp 0xce702
movq -0xad8(%rbp), %rdi
leaq 0x10fd99(%rip), %rsi    # 0x1de4a9
callq 0x2ff50
movq %rax, -0xae0(%rbp)
jmp 0xce71e
movq -0xae0(%rbp), %rdi
movq 0x20689c(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce733
leaq -0x798(%rbp), %rdi
callq 0xc1f00
leaq -0x310(%rbp), %rdi
callq 0x311e8
jmp 0xce772
leaq -0x310(%rbp), %rdi
callq 0x311e8
jmp 0xcec13
leaq -0x288(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xd08d0
jmp 0xce770
jmp 0xce772
movl -0x14(%rbp), %esi
leaq -0x7f8(%rbp), %rdi
callq 0x17ce40
jmp 0xce783
leaq -0x2c8(%rbp), %rdi
leaq -0x7f8(%rbp), %rsi
callq 0x2fd80
leaq -0x7f8(%rbp), %rdi
callq 0x311e8
movq -0x20(%rbp), %rdi
callq 0x458f0
movq %rax, -0x800(%rbp)
movq -0x20(%rbp), %rdi
callq 0x45920
movq %rax, -0x808(%rbp)
leaq -0x800(%rbp), %rdi
leaq -0x808(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0xce7db
jmp 0xce816
leaq -0x2a0(%rbp), %rax
movq %rax, -0xae8(%rbp)
leaq -0x800(%rbp), %rdi
callq 0x8aed0
movq -0xae8(%rbp), %rdi
movq %rax, %rsi
callq 0x45280
jmp 0xce806
jmp 0xce808
leaq -0x800(%rbp), %rdi
callq 0x8aef0
jmp 0xce7b2
cmpl $-0x1, 0x10(%rbp)
jne 0xce824
callq 0x30b00
movl %eax, 0x10(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x2a8(%rbp)
leaq -0x868(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0xd0830
jmp 0xce842
movq -0x888(%rbp), %rsi
leaq -0x828(%rbp), %rdi
leaq -0x868(%rbp), %rdx
callq 0xcec50
jmp 0xce85e
leaq -0x868(%rbp), %rdi
callq 0xc1f00
leaq -0x828(%rbp), %rdi
callq 0x2ff30
cmpq $0x3e8, %rax            # imm = 0x3E8
jbe 0xce932
movq 0x2066c7(%rip), %rdi    # 0x2d4f50
leaq 0x10fbc2(%rip), %rsi    # 0x1de452
callq 0x2ff50
movq %rax, -0xaf0(%rbp)
jmp 0xce89e
leaq -0x828(%rbp), %rdi
callq 0x2ff30
movq -0xaf0(%rbp), %rdi
movq %rax, %rsi
callq 0x30cf0
movq %rax, -0xaf8(%rbp)
jmp 0xce8c2
movq -0xaf8(%rbp), %rdi
leaq 0x10fba5(%rip), %rsi    # 0x1de475
callq 0x2ff50
movq %rax, -0xb00(%rbp)
jmp 0xce8de
movq -0xb00(%rbp), %rdi
movq 0x2066dc(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xce8f3
callq 0x303b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x868(%rbp), %rdi
callq 0xc1f00
jmp 0xcec13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x828(%rbp), %rdi
callq 0x311e8
jmp 0xcec13
leaq -0x288(%rbp), %rdi
callq 0xd0940
movq %rax, -0x870(%rbp)
leaq -0x288(%rbp), %rdi
callq 0xd09b0
movq %rax, -0x878(%rbp)
leaq -0x870(%rbp), %rdi
leaq -0x878(%rbp), %rsi
callq 0xd0970
testb $0x1, %al
jne 0xce974
jmp 0xcebed
movq 0x2065d5(%rip), %rdi    # 0x2d4f50
leaq 0x10fb3b(%rip), %rsi    # 0x1de4bd
callq 0x2ff50
movq %rax, -0xb08(%rbp)
jmp 0xce990
movq -0xb08(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2f800
movq %rax, -0xb10(%rbp)
jmp 0xce9a8
movq -0xb10(%rbp), %rdi
leaq 0x10fb0c(%rip), %rsi    # 0x1de4c2
callq 0x2ff50
movq %rax, -0xb18(%rbp)
jmp 0xce9c4
movq -0xb18(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x2f780
movq %rax, -0xb20(%rbp)
jmp 0xce9e0
movq -0xb20(%rbp), %rdi
leaq 0x114e96(%rip), %rsi    # 0x1e3884
callq 0x2ff50
movq %rax, -0xb28(%rbp)
jmp 0xce9fc
leaq -0x870(%rbp), %rdi
callq 0xd0b60
movq -0xb28(%rbp), %rdi
movl (%rax), %esi
callq 0x2f800
movq %rax, -0xb30(%rbp)
jmp 0xcea1f
movq -0xb30(%rbp), %rdi
leaq 0x10fa9f(%rip), %rsi    # 0x1de4cc
callq 0x2ff50
movq %rax, -0xb38(%rbp)
jmp 0xcea3b
movq -0xb38(%rbp), %rdi
leaq -0x828(%rbp), %rsi
callq 0x2f780
movq %rax, -0xb40(%rbp)
jmp 0xcea57
movq -0xb40(%rbp), %rdi
movq 0x206563(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcea6c
movq -0x888(%rbp), %rax
addq $0x68, %rax
movq %rax, -0xb68(%rbp)
leaq -0x870(%rbp), %rdi
callq 0xd0b60
movq -0xb68(%rbp), %rdi
movslq (%rax), %rsi
callq 0xd0a60
movq (%rax), %rax
movq %rax, -0xb58(%rbp)
leaq -0x828(%rbp), %rdi
movq %rdi, -0xb60(%rbp)
callq 0x2f240
movq -0xb60(%rbp), %rdi
movq %rax, -0xb50(%rbp)
callq 0x2f720
movq -0xb58(%rbp), %rdi
movq -0xb50(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xd0b80
movb %al, -0xb41(%rbp)
jmp 0xceae9
movb -0xb41(%rbp), %al
andb $0x1, %al
movb %al, -0x879(%rbp)
movb -0x879(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xceb3a
movq 0x206442(%rip), %rdi    # 0x2d4f50
leaq 0x10f9bf(%rip), %rsi    # 0x1de4d4
callq 0x2ff50
movq %rax, -0xb70(%rbp)
jmp 0xceb23
movq -0xb70(%rbp), %rdi
movq 0x206497(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xceb38
jmp 0xceb6d
movq 0x20640f(%rip), %rdi    # 0x2d4f50
leaq 0x10f9b9(%rip), %rsi    # 0x1de501
callq 0x2ff50
movq %rax, -0xb78(%rbp)
jmp 0xceb56
movq -0xb78(%rbp), %rdi
movq 0x206464(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xceb6b
jmp 0xceb6d
testb $0x1, -0x15(%rbp)
je 0xcebda
movb $0x1, -0x87a(%rbp)
testb $0x1, -0x87a(%rbp)
je 0xcebd8
movq -0x888(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movq %rdi, %r9
addq $0x18, %r9
movl 0x10(%rbp), %r8d
movq %rsp, %rax
movl %r8d, 0x8(%rax)
movl $0x0, (%rax)
xorl %r8d, %r8d
callq 0xcefc0
movl %eax, -0xb7c(%rbp)
jmp 0xcebbb
movl -0xb7c(%rbp), %eax
cmpl $0x0, %eax
je 0xcebcf
movb $0x1, -0x87a(%rbp)
jmp 0xcebd6
movb $0x0, -0x87a(%rbp)
jmp 0xceb7a
jmp 0xcebda
jmp 0xcebdc
leaq -0x870(%rbp), %rdi
callq 0xd09e0
jmp 0xce945
leaq -0x828(%rbp), %rdi
callq 0x311e8
leaq -0x2c8(%rbp), %rdi
callq 0xc1f00
leaq -0x288(%rbp), %rdi
callq 0xd0a00
jmp 0xcec2d
leaq -0x2c8(%rbp), %rdi
callq 0xc1f00
leaq -0x288(%rbp), %rdi
callq 0xd0a00
jmp 0xcec36
addq $0xb90, %rsp            # imm = 0xB90
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x30170
movq %rax, %rdi
callq 0x43490
nopw (%rax,%rax)