// File: tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::readTest()
void Application::readTest() {

	// Step 0. Key to be read
	// This key is used for all read tests
	map<string, string>::iterator it = testKVPairs.begin();
	int number;
	vector<Node> replicas;
	int replicaIdToFail = TERTIARY;
	int nodeToFail;
	bool failedOneNode = false;

	/**
 	 * Test 1: Test if value of a single read operation is read correctly in quorum number of nodes
 	 */
	if ( par->getcurrtime() == TEST_TIME ) {
		// Step 1.a. Find a node that is alive
		number = findARandomNodeThatIsAlive();

		// Step 1.b Do a read operation
		cout<<endl<<"Reading a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
		mp2[number]->clientRead(it->first);
	}

	/** end of test1 **/

	/**
	 * Test 2: FAIL ONE REPLICA. Test if value is read correctly in quorum number of nodes after ONE OF THE REPLICAS IS FAILED
	 */
	if ( par->getcurrtime() == (TEST_TIME + FIRST_FAIL_TIME) ) {
		// Step 2.a Find a node that is alive and assign it as number
		number = findARandomNodeThatIsAlive();

		// Step 2.b Find the replicas of this key
		replicas.clear();
		replicas = mp2[number]->findNodes(it->first);
		// if less than quorum replicas are found then exit
		if ( replicas.size() < (RF-1) ) {
			cout<<endl<<"Could not find at least quorum replicas for this key. Exiting!!! size of replicas vector: "<<replicas.size()<<endl;
			log->LOG(&mp2[number]->getMemberNode()->addr, "Could not find at least quorum replicas for this key. Exiting!!! size of replicas vector: %d", replicas.size());
			exit(1);
		}

		// Step 2.c Fail a replica
		for ( int i = 0; i < par->EN_GPSZ; i++ ) {
			if ( mp2[i]->getMemberNode()->addr.getAddress() == replicas.at(replicaIdToFail).getAddress()->getAddress() ) {
				if ( !mp2[i]->getMemberNode()->bFailed ) {
					nodeToFail = i;
					failedOneNode = true;
					break;
				}
				else {
					// Since we fail at most two nodes, one of the replicas must be alive
					if ( replicaIdToFail > 0 ) {
						replicaIdToFail--;
					}
					else {
						failedOneNode = false;
					}
				}
			}
		}
		if ( failedOneNode ) {
			log->LOG(&mp2[nodeToFail]->getMemberNode()->addr, "Node failed at time=%d", par->getcurrtime());
			mp2[nodeToFail]->getMemberNode()->bFailed = true;
			mp1[nodeToFail]->getMemberNode()->bFailed = true;
			cout<<endl<<"Failed a replica node"<<endl;
		}
		else {
			// The code can never reach here
			log->LOG(&mp2[number]->getMemberNode()->addr, "Could not fail a node");
			cout<<"Could not fail a node. Exiting!!!";
			exit(1);
		}

		number = findARandomNodeThatIsAlive();

		// Step 2.d Issue a read
		cout<<endl<<"Reading a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
		mp2[number]->clientRead(it->first);

		failedOneNode = false;
	}

	/** end of test 2 **/

	/**
	 * Test 3 part 1: Fail two replicas. Test if value is read correctly in quorum number of nodes after TWO OF THE REPLICAS ARE FAILED
	 */
	// Wait for STABILIZE_TIME and fail two replicas
	if ( par->getcurrtime() >= (TEST_TIME + FIRST_FAIL_TIME + STABILIZE_TIME) ) {
		vector<int> nodesToFail;
		nodesToFail.clear();
		int count = 0;

		if ( par->getcurrtime() == (TEST_TIME + FIRST_FAIL_TIME + STABILIZE_TIME) ) {
			// Step 3.a. Find a node that is alive
			number = findARandomNodeThatIsAlive();

			// Get the keys replicas
			replicas.clear();
			replicas = mp2[number]->findNodes(it->first);

			// Step 3.b. Fail two replicas
			//cout<<"REPLICAS SIZE: "<<replicas.size();
			if ( replicas.size() > 2 ) {
				replicaIdToFail = TERTIARY;
				while ( count != 2 ) {
					int i = 0;
					while ( i != par->EN_GPSZ ) {
						if ( mp2[i]->getMemberNode()->addr.getAddress() == replicas.at(replicaIdToFail).getAddress()->getAddress() ) {
							if ( !mp2[i]->getMemberNode()->bFailed ) {
								nodesToFail.emplace_back(i);
								replicaIdToFail--;
								count++;
								break;
							}
							else {
								// Since we fail at most two nodes, one of the replicas must be alive
								if ( replicaIdToFail > 0 ) {
									replicaIdToFail--;
								}
							}
						}
						i++;
					}
				}
			}
			else {
				// If the code reaches here. Test your stabilization protocol
				cout<<endl<<"Not enough replicas to fail two nodes. Number of replicas of this key: " <<replicas.size() <<". Exiting test case !! "<<endl;
				exit(1);
			}
			if ( count == 2 ) {
				for ( int i = 0; i < (int)nodesToFail.size(); i++ ) {
					// Fail a node
					log->LOG(&mp2[nodesToFail.at(i)]->getMemberNode()->addr, "Node failed at time=%d", par->getcurrtime());
					mp2[nodesToFail.at(i)]->getMemberNode()->bFailed = true;
					mp1[nodesToFail.at(i)]->getMemberNode()->bFailed = true;
					cout<<endl<<"Failed a replica node"<<endl;
				}
			}
			else {
				// The code can never reach here
				log->LOG(&mp2[number]->getMemberNode()->addr, "Could not fail two nodes");
				//cout<<"COUNT: " <<count;
				cout<<"Could not fail two nodes. Exiting!!!";
				exit(1);
			}

			number = findARandomNodeThatIsAlive();

			// Step 3.c Issue a read
			cout<<endl<<"Reading a valid key.... ... .. . ."<<endl;
			log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
			// This read should fail since at least quorum nodes are not alive
			mp2[number]->clientRead(it->first);
		}

		/**
		 * TEST 3 part 2: After failing two replicas and waiting for STABILIZE_TIME, issue a read
		 */
		// Step 3.d Wait for stabilization protocol to kick in
		if ( par->getcurrtime() == (TEST_TIME + FIRST_FAIL_TIME + STABILIZE_TIME + STABILIZE_TIME) ) {
			number = findARandomNodeThatIsAlive();
			// Step 3.e Issue a read
			cout<<endl<<"Reading a valid key.... ... .. . ."<<endl;
			log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
			// This read should be successful
			mp2[number]->clientRead(it->first);
		}
	}

	/** end of test 3 **/

	/**
	 * Test 4: FAIL A NON-REPLICA. Test if value is read correctly in quorum number of nodes after a NON-REPLICA IS FAILED
	 */
	if ( par->getcurrtime() == (TEST_TIME + FIRST_FAIL_TIME + STABILIZE_TIME + STABILIZE_TIME + LAST_FAIL_TIME ) ) {
		// Step 4.a. Find a node that is alive
		number = findARandomNodeThatIsAlive();

		// Step 4.b Find a non - replica for this key
		replicas.clear();
		replicas = mp2[number]->findNodes(it->first);
		for ( int i = 0; i < par->EN_GPSZ; i++ ) {
			if ( !mp2[i]->getMemberNode()->bFailed ) {
				if ( mp2[i]->getMemberNode()->addr.getAddress() != replicas.at(PRIMARY).getAddress()->getAddress() &&
					 mp2[i]->getMemberNode()->addr.getAddress() != replicas.at(SECONDARY).getAddress()->getAddress() &&
					 mp2[i]->getMemberNode()->addr.getAddress() != replicas.at(TERTIARY).getAddress()->getAddress() ) {
					// Step 4.c Fail a non-replica node
					log->LOG(&mp2[i]->getMemberNode()->addr, "Node failed at time=%d", par->getcurrtime());
					mp2[i]->getMemberNode()->bFailed = true;
					mp1[i]->getMemberNode()->bFailed = true;
					failedOneNode = true;
					cout<<endl<<"Failed a non-replica node"<<endl;
					break;
				}
			}
		}
		if ( !failedOneNode ) {
			// The code can never reach here
			log->LOG(&mp2[number]->getMemberNode()->addr, "Could not fail a node(non-replica)");
			cout<<"Could not fail a node(non-replica). Exiting!!!";
			exit(1);
		}

		number = findARandomNodeThatIsAlive();

		// Step 4.d Issue a read operation
		cout<<endl<<"Reading a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
		// This read should fail since at least quorum nodes are not alive
		mp2[number]->clientRead(it->first);
	}

	/** end of test 4 **/

	/**
	 * Test 5: Read a non-existent key.
	 */
	if ( par->getcurrtime() == (TEST_TIME + FIRST_FAIL_TIME + STABILIZE_TIME + STABILIZE_TIME + LAST_FAIL_TIME ) ) {
		string invalidKey = "invalidKey";

		// Step 5.a Find a node that is alive
		number = findARandomNodeThatIsAlive();

		// Step 5.b Issue a read operation
		cout<<endl<<"Reading an invalid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "READ OPERATION KEY: %s at time: %d", invalidKey.c_str(), par->getcurrtime());
		// This read should fail since at least quorum nodes are not alive
		mp2[number]->clientRead(invalidKey);
	}

	/** end of test 5 **/

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x810, %rsp            # imm = 0x810
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x390(%rbp)
addq $0x60, %rdi
callq 0x14ef0
movq %rax, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15010
movq -0x390(%rbp), %rax
movl $0x2, -0x34(%rbp)
movb $0x0, -0x39(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x384(%rbp)
jmp 0x10c93
movl -0x384(%rbp), %eax
cmpl $0x96, %eax
jne 0x10e51
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x394(%rbp)
jmp 0x10cb8
movl -0x394(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2d2f8(%rip), %rdi     # 0x3dfc0
movq 0x2d2d9(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x3a0(%rbp)
jmp 0x10cdd
movq -0x3a0(%rbp), %rdi
leaq 0x1b7a4(%rip), %rsi     # 0x2c48f
callq 0x4330
movq %rax, -0x3a8(%rbp)
jmp 0x10cf9
movq -0x3a8(%rbp), %rdi
movq 0x2d2a1(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x10d0e
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x3b8(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x3b0(%rbp)
jmp 0x10d3a
movq -0x3b0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x3e0(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq -0x3d8(%rbp), %rdi
movq %rax, -0x3d0(%rbp)
callq 0x14f80
movq %rax, %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x3c8(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x3bc(%rbp)
jmp 0x10da5
movl -0x3bc(%rbp), %r9d
movq -0x3c8(%rbp), %r8
movq -0x3d0(%rbp), %rcx
movq -0x3e0(%rbp), %rsi
movq -0x3b8(%rbp), %rdi
leaq 0x1b6e3(%rip), %rdx     # 0x2c4b2
xorl %eax, %eax
callq 0x17ae0
jmp 0x10dd8
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x3e8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0x4160
jmp 0x10e09
movq -0x3e8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1f4d0
jmp 0x10e1b
leaq -0x70(%rbp), %rdi
callq 0x4200
jmp 0x10e51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1288b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4200
jmp 0x1288b
movq -0x390(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x3ec(%rbp)
jmp 0x10e69
movl -0x3ec(%rbp), %eax
cmpl $0xaf, %eax
jne 0x114d6
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x3f0(%rbp)
jmp 0x10e8e
movl -0x3f0(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15030
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x3f8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x4160
jmp 0x10ed4
movq -0x3f8(%rbp), %rsi
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x1f030
jmp 0x10ef0
leaq -0x30(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x15050
leaq -0x88(%rbp), %rdi
callq 0x15080
leaq -0xa8(%rbp), %rdi
callq 0x4200
leaq -0x30(%rbp), %rdi
callq 0x150e0
cmpq $0x2, %rax
jae 0x11028
movq 0x2d08e(%rip), %rdi     # 0x3dfc0
movq 0x2d06f(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x400(%rbp)
jmp 0x10f47
movq -0x400(%rbp), %rdi
leaq 0x1b58a(%rip), %rsi     # 0x2c4df
callq 0x4330
movq %rax, -0x408(%rbp)
jmp 0x10f63
leaq -0x30(%rbp), %rdi
callq 0x150e0
movq -0x408(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, -0x410(%rbp)
jmp 0x10f84
movq -0x410(%rbp), %rdi
movq 0x2d016(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x10f99
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x420(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x418(%rbp)
jmp 0x10fc5
movq -0x418(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x428(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x150e0
movq -0x420(%rbp), %rdi
movq -0x428(%rbp), %rsi
movq %rax, %rcx
leaq 0x1b542(%rip), %rdx     # 0x2c53a
xorl %eax, %eax
callq 0x17ae0
jmp 0x11001
movl $0x1, %edi
callq 0x4430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4200
jmp 0x1288b
movl $0x0, -0xac(%rbp)
movq -0x390(%rbp), %rcx
movl -0xac(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x11192
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x430(%rbp)
jmp 0x11070
movq -0x430(%rbp), %rsi
addq $0x8, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x14b50
jmp 0x11089
movslq -0x34(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x15100
movq %rax, -0x438(%rbp)
jmp 0x1109f
movq -0x438(%rbp), %rdi
callq 0x26330
movq %rax, -0x440(%rbp)
jmp 0x110b4
movq -0x440(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x14b50
jmp 0x110c9
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xb250
movb %al, -0x441(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x4200
leaq -0xd0(%rbp), %rdi
callq 0x4200
movb -0x441(%rbp), %al
testb $0x1, %al
jne 0x11106
jmp 0x1117c
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x450(%rbp)
jmp 0x1112a
movq -0x450(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x11163
movl -0xac(%rbp), %eax
movl %eax, -0x38(%rbp)
movb $0x1, -0x39(%rbp)
jmp 0x11192
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4200
jmp 0x1288b
cmpl $0x0, -0x34(%rbp)
jle 0x11174
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x11178
movb $0x0, -0x39(%rbp)
jmp 0x1117a
jmp 0x1117c
jmp 0x1117e
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x11032
testb $0x1, -0x39(%rbp)
je 0x112bd
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x460(%rbp)
movq 0x48(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x458(%rbp)
jmp 0x111c8
movq -0x390(%rbp), %rax
movq -0x458(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x470(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x464(%rbp)
jmp 0x111f2
movl -0x464(%rbp), %ecx
movq -0x470(%rbp), %rsi
movq -0x460(%rbp), %rdi
leaq 0x1b14f(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x11216
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x478(%rbp)
jmp 0x11237
movq -0x390(%rbp), %rax
movq -0x478(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x480(%rbp)
jmp 0x11263
movq -0x480(%rbp), %rax
movb $0x1, 0x10(%rax)
movq 0x2cd4b(%rip), %rdi     # 0x3dfc0
movq 0x2cd2c(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x488(%rbp)
jmp 0x1128a
movq -0x488(%rbp), %rdi
leaq 0x1b2ff(%rip), %rsi     # 0x2c597
callq 0x4330
movq %rax, -0x490(%rbp)
jmp 0x112a6
movq -0x490(%rbp), %rdi
movq 0x2ccf4(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x112bb
jmp 0x1132a
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x4a0(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x498(%rbp)
jmp 0x112e9
movq -0x4a0(%rbp), %rdi
movq -0x498(%rbp), %rsi
addq $0x8, %rsi
leaq 0x1b2ab(%rip), %rdx     # 0x2c5ad
xorl %eax, %eax
callq 0x17ae0
jmp 0x1130b
movq 0x2ccae(%rip), %rdi     # 0x3dfc0
leaq 0x1b2aa(%rip), %rsi     # 0x2c5c3
callq 0x4330
jmp 0x11320
movl $0x1, %edi
callq 0x4430
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x4a4(%rbp)
jmp 0x1133e
movl -0x4a4(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2cc72(%rip), %rdi     # 0x3dfc0
movq 0x2cc53(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x4b0(%rbp)
jmp 0x11363
movq -0x4b0(%rbp), %rdi
leaq 0x1b11e(%rip), %rsi     # 0x2c48f
callq 0x4330
movq %rax, -0x4b8(%rbp)
jmp 0x1137f
movq -0x4b8(%rbp), %rdi
movq 0x2cc1b(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x11394
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x4c8(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x4c0(%rbp)
jmp 0x113c0
movq -0x4c0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x4f0(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq -0x4e8(%rbp), %rdi
movq %rax, -0x4e0(%rbp)
callq 0x14f80
movq %rax, %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x4d8(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x4cc(%rbp)
jmp 0x1142b
movl -0x4cc(%rbp), %r9d
movq -0x4d8(%rbp), %r8
movq -0x4e0(%rbp), %rcx
movq -0x4f0(%rbp), %rsi
movq -0x4c8(%rbp), %rdi
leaq 0x1b05d(%rip), %rdx     # 0x2c4b2
xorl %eax, %eax
callq 0x17ae0
jmp 0x1145e
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x4f8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x110(%rbp), %rdi
callq 0x4160
jmp 0x11492
movq -0x4f8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x1f4d0
jmp 0x114a7
leaq -0x110(%rbp), %rdi
callq 0x4200
movb $0x0, -0x39(%rbp)
jmp 0x114d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4200
jmp 0x1288b
movq -0x390(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x4fc(%rbp)
jmp 0x114ee
movl -0x4fc(%rbp), %eax
cmpl $0xe1, %eax
jl 0x11e70
leaq -0x128(%rbp), %rdi
movq %rdi, -0x508(%rbp)
callq 0x15140
movq -0x508(%rbp), %rdi
callq 0x15160
movq -0x390(%rbp), %rax
movl $0x0, -0x12c(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x500(%rbp)
jmp 0x11540
movl -0x500(%rbp), %eax
cmpl $0xe1, %eax
jne 0x11c83
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x50c(%rbp)
jmp 0x11565
movl -0x50c(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15030
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x518(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x168(%rbp), %rdi
callq 0x4160
jmp 0x115ab
movq -0x518(%rbp), %rsi
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rdx
callq 0x1f030
jmp 0x115c7
leaq -0x30(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x15050
leaq -0x148(%rbp), %rdi
callq 0x15080
leaq -0x168(%rbp), %rdi
callq 0x4200
leaq -0x30(%rbp), %rdi
callq 0x150e0
cmpq $0x2, %rax
jbe 0x117d3
movl $0x2, -0x34(%rbp)
cmpl $0x2, -0x12c(%rbp)
je 0x117ce
movl $0x0, -0x16c(%rbp)
movq -0x390(%rbp), %rcx
movl -0x16c(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
je 0x117c9
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x16c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x520(%rbp)
jmp 0x1165e
movq -0x520(%rbp), %rsi
addq $0x8, %rsi
leaq -0x190(%rbp), %rdi
callq 0x14b50
jmp 0x11677
movslq -0x34(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x15100
movq %rax, -0x528(%rbp)
jmp 0x1168d
movq -0x528(%rbp), %rdi
callq 0x26330
movq %rax, -0x530(%rbp)
jmp 0x116a2
movq -0x530(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x14b50
jmp 0x116b7
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb250
movb %al, -0x531(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x4200
leaq -0x190(%rbp), %rdi
callq 0x4200
movb -0x531(%rbp), %al
testb $0x1, %al
jne 0x116f7
jmp 0x117b5
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x16c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x540(%rbp)
jmp 0x1171b
movq -0x540(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x117a2
leaq -0x128(%rbp), %rdi
leaq -0x16c(%rbp), %rsi
callq 0x15180
jmp 0x1173d
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x117c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x11e5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x4200
jmp 0x11e5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4200
jmp 0x11e5f
cmpl $0x0, -0x34(%rbp)
jle 0x117b1
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x117b3
jmp 0x117b5
movl -0x16c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x16c(%rbp)
jmp 0x11620
jmp 0x11609
jmp 0x11867
movq 0x2c7e6(%rip), %rdi     # 0x3dfc0
movq 0x2c7c7(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x548(%rbp)
jmp 0x117ef
movq -0x548(%rbp), %rdi
leaq 0x1ade8(%rip), %rsi     # 0x2c5e5
callq 0x4330
movq %rax, -0x550(%rbp)
jmp 0x1180b
leaq -0x30(%rbp), %rdi
callq 0x150e0
movq -0x550(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, -0x558(%rbp)
jmp 0x1182c
movq -0x558(%rbp), %rdi
leaq 0x1af67(%rip), %rsi     # 0x2c7a1
callq 0x4330
movq %rax, -0x560(%rbp)
jmp 0x11848
movq -0x560(%rbp), %rdi
movq 0x2c752(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x1185d
movl $0x1, %edi
callq 0x4430
cmpl $0x2, -0x12c(%rbp)
jne 0x11a6e
movl $0x0, -0x1b4(%rbp)
movl -0x1b4(%rbp), %eax
movl %eax, -0x564(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x15200
movq %rax, %rcx
movl -0x564(%rbp), %eax
cmpl %ecx, %eax
jge 0x11a6c
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x580(%rbp)
movq 0x48(%rax), %rax
movq %rax, -0x578(%rbp)
movslq -0x1b4(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x15220
movq %rax, -0x570(%rbp)
jmp 0x118e0
movq -0x578(%rbp), %rax
movq -0x570(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x588(%rbp)
jmp 0x11903
movq -0x390(%rbp), %rax
movq -0x588(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x598(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x58c(%rbp)
jmp 0x1192d
movl -0x58c(%rbp), %ecx
movq -0x598(%rbp), %rsi
movq -0x580(%rbp), %rdi
leaq 0x1aa14(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x11951
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x5a8(%rbp)
movslq -0x1b4(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x15220
movq %rax, -0x5a0(%rbp)
jmp 0x1197f
movq -0x5a8(%rbp), %rax
movq -0x5a0(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x5b0(%rbp)
jmp 0x119a2
movq -0x390(%rbp), %rax
movq -0x5b0(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movq %rax, -0x5c0(%rbp)
movslq -0x1b4(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x15220
movq %rax, -0x5b8(%rbp)
jmp 0x119db
movq -0x5c0(%rbp), %rax
movq -0x5b8(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x5c8(%rbp)
jmp 0x119fe
movq -0x5c8(%rbp), %rax
movb $0x1, 0x10(%rax)
movq 0x2c5b0(%rip), %rdi     # 0x3dfc0
movq 0x2c591(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x5d0(%rbp)
jmp 0x11a25
movq -0x5d0(%rbp), %rdi
leaq 0x1ab64(%rip), %rsi     # 0x2c597
callq 0x4330
movq %rax, -0x5d8(%rbp)
jmp 0x11a41
movq -0x5d8(%rbp), %rdi
movq 0x2c559(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x11a56
jmp 0x11a58
movl -0x1b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
jmp 0x1187e
jmp 0x11adb
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x5e8(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x5e0(%rbp)
jmp 0x11a9a
movq -0x5e8(%rbp), %rdi
movq -0x5e0(%rbp), %rsi
addq $0x8, %rsi
leaq 0x1ab7a(%rip), %rdx     # 0x2c62d
xorl %eax, %eax
callq 0x17ae0
jmp 0x11abc
movq 0x2c4fd(%rip), %rdi     # 0x3dfc0
leaq 0x1ab7c(%rip), %rsi     # 0x2c646
callq 0x4330
jmp 0x11ad1
movl $0x1, %edi
callq 0x4430
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x5ec(%rbp)
jmp 0x11aef
movl -0x5ec(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2c4c1(%rip), %rdi     # 0x3dfc0
movq 0x2c4a2(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x5f8(%rbp)
jmp 0x11b14
movq -0x5f8(%rbp), %rdi
leaq 0x1a96d(%rip), %rsi     # 0x2c48f
callq 0x4330
movq %rax, -0x600(%rbp)
jmp 0x11b30
movq -0x600(%rbp), %rdi
movq 0x2c46a(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x11b45
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x610(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x608(%rbp)
jmp 0x11b71
movq -0x608(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x638(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x630(%rbp)
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq -0x630(%rbp), %rdi
movq %rax, -0x628(%rbp)
callq 0x14f80
movq %rax, %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x620(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x614(%rbp)
jmp 0x11bdc
movl -0x614(%rbp), %r9d
movq -0x620(%rbp), %r8
movq -0x628(%rbp), %rcx
movq -0x638(%rbp), %rsi
movq -0x610(%rbp), %rdi
leaq 0x1a8ac(%rip), %rdx     # 0x2c4b2
xorl %eax, %eax
callq 0x17ae0
jmp 0x11c0f
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x640(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x4160
jmp 0x11c43
movq -0x640(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1f4d0
jmp 0x11c58
leaq -0x1d8(%rbp), %rdi
callq 0x4200
jmp 0x11c83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x4200
jmp 0x11e5f
movq -0x390(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x644(%rbp)
jmp 0x11c9b
movl -0x644(%rbp), %eax
cmpl $0x113, %eax            # imm = 0x113
jne 0x11e51
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x648(%rbp)
jmp 0x11cc0
movl -0x648(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2c2f0(%rip), %rdi     # 0x3dfc0
movq 0x2c2d1(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x650(%rbp)
jmp 0x11ce5
movq -0x650(%rbp), %rdi
leaq 0x1a79c(%rip), %rsi     # 0x2c48f
callq 0x4330
movq %rax, -0x658(%rbp)
jmp 0x11d01
movq -0x658(%rbp), %rdi
movq 0x2c299(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x11d16
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x668(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x660(%rbp)
jmp 0x11d42
movq -0x660(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x690(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x688(%rbp)
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq -0x688(%rbp), %rdi
movq %rax, -0x680(%rbp)
callq 0x14f80
movq %rax, %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x678(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x66c(%rbp)
jmp 0x11dad
movl -0x66c(%rbp), %r9d
movq -0x678(%rbp), %r8
movq -0x680(%rbp), %rcx
movq -0x690(%rbp), %rsi
movq -0x668(%rbp), %rdi
leaq 0x1a6db(%rip), %rdx     # 0x2c4b2
xorl %eax, %eax
callq 0x17ae0
jmp 0x11de0
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x698(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x4160
jmp 0x11e14
movq -0x698(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x1f4d0
jmp 0x11e29
leaq -0x1f8(%rbp), %rdi
callq 0x4200
jmp 0x11e51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x4200
jmp 0x11e5f
leaq -0x128(%rbp), %rdi
callq 0x15260
jmp 0x11e70
leaq -0x128(%rbp), %rdi
callq 0x15260
jmp 0x1288b
movq -0x390(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x69c(%rbp)
jmp 0x11e88
movl -0x69c(%rbp), %eax
cmpl $0x11d, %eax            # imm = 0x11D
jne 0x12667
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x6a0(%rbp)
jmp 0x11ead
movl -0x6a0(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x15030
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x6a8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x230(%rbp), %rdi
callq 0x4160
jmp 0x11ef3
movq -0x6a8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rdx
callq 0x1f030
jmp 0x11f0f
leaq -0x30(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x15050
leaq -0x210(%rbp), %rdi
callq 0x15080
leaq -0x230(%rbp), %rdi
callq 0x4200
movl $0x0, -0x234(%rbp)
movq -0x390(%rbp), %rcx
movl -0x234(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x1244c
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6b0(%rbp)
jmp 0x11f7f
movq -0x6b0(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x12436
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movb $0x0, -0x299(%rbp)
movb $0x0, -0x2c1(%rbp)
movb $0x0, -0x2e9(%rbp)
movb $0x0, -0x311(%rbp)
callq 0x14b10
movq %rax, -0x6b8(%rbp)
jmp 0x11fd0
movq -0x6b8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x258(%rbp), %rdi
callq 0x14b50
jmp 0x11fe9
xorl %eax, %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x15100
movq %rax, -0x6c0(%rbp)
jmp 0x11fff
movq -0x6c0(%rbp), %rdi
callq 0x26330
movq %rax, -0x6c8(%rbp)
jmp 0x12014
movq -0x6c8(%rbp), %rsi
leaq -0x278(%rbp), %rdi
callq 0x14b50
jmp 0x12029
leaq -0x258(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x152c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x6c9(%rbp)
jne 0x12050
jmp 0x121a8
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6d8(%rbp)
jmp 0x12074
movq -0x6d8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x298(%rbp), %rdi
callq 0x14b50
jmp 0x1208d
movb $0x1, -0x299(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x15100
movq %rax, -0x6e0(%rbp)
jmp 0x120ab
movq -0x6e0(%rbp), %rdi
callq 0x26330
movq %rax, -0x6e8(%rbp)
jmp 0x120c0
movq -0x6e8(%rbp), %rsi
leaq -0x2c0(%rbp), %rdi
callq 0x14b50
jmp 0x120d5
movb $0x1, -0x2c1(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x152c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x6c9(%rbp)
jne 0x12103
jmp 0x121a8
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6f0(%rbp)
jmp 0x12127
movq -0x6f0(%rbp), %rsi
addq $0x8, %rsi
leaq -0x2e8(%rbp), %rdi
callq 0x14b50
jmp 0x12140
movb $0x1, -0x2e9(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
callq 0x15100
movq %rax, -0x6f8(%rbp)
jmp 0x1215e
movq -0x6f8(%rbp), %rdi
callq 0x26330
movq %rax, -0x700(%rbp)
jmp 0x12173
movq -0x700(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq 0x14b50
jmp 0x12188
movb $0x1, -0x311(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x152c0
movb %al, -0x6c9(%rbp)
movb -0x6c9(%rbp), %al
movb %al, -0x701(%rbp)
testb $0x1, -0x311(%rbp)
jne 0x121bf
jmp 0x121cb
leaq -0x310(%rbp), %rdi
callq 0x4200
testb $0x1, -0x2e9(%rbp)
jne 0x121d6
jmp 0x121e2
leaq -0x2e8(%rbp), %rdi
callq 0x4200
testb $0x1, -0x2c1(%rbp)
jne 0x121ed
jmp 0x121f9
leaq -0x2c0(%rbp), %rdi
callq 0x4200
testb $0x1, -0x299(%rbp)
jne 0x12204
jmp 0x12210
leaq -0x298(%rbp), %rdi
callq 0x4200
leaq -0x278(%rbp), %rdi
callq 0x4200
leaq -0x258(%rbp), %rdi
callq 0x4200
movb -0x701(%rbp), %al
testb $0x1, %al
jne 0x12237
jmp 0x12434
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x718(%rbp)
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x710(%rbp)
jmp 0x12266
movq -0x390(%rbp), %rax
movq -0x710(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x728(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x71c(%rbp)
jmp 0x12290
movl -0x71c(%rbp), %ecx
movq -0x728(%rbp), %rsi
movq -0x718(%rbp), %rdi
leaq 0x1a0b1(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x122b4
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x730(%rbp)
jmp 0x122d8
movq -0x390(%rbp), %rax
movq -0x730(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movslq -0x234(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x738(%rbp)
jmp 0x12307
movq -0x738(%rbp), %rax
movb $0x1, 0x10(%rax)
movb $0x1, -0x39(%rbp)
movq 0x2bca3(%rip), %rdi     # 0x3dfc0
movq 0x2bc84(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x740(%rbp)
jmp 0x12332
movq -0x740(%rbp), %rdi
leaq 0x1a32b(%rip), %rsi     # 0x2c66b
callq 0x4330
movq %rax, -0x748(%rbp)
jmp 0x1234e
movq -0x748(%rbp), %rdi
movq 0x2bc4c(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x12363
jmp 0x1244c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x4200
jmp 0x1288b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12423
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12417
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x123fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x123e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x2e9(%rbp)
jne 0x123d7
jmp 0x123e3
leaq -0x2e8(%rbp), %rdi
callq 0x4200
jmp 0x123e5
testb $0x1, -0x2c1(%rbp)
jne 0x123f0
jmp 0x123fc
leaq -0x2c0(%rbp), %rdi
callq 0x4200
jmp 0x123fe
testb $0x1, -0x299(%rbp)
jne 0x12409
jmp 0x12415
leaq -0x298(%rbp), %rdi
callq 0x4200
jmp 0x12417
leaq -0x278(%rbp), %rdi
callq 0x4200
leaq -0x258(%rbp), %rdi
callq 0x4200
jmp 0x1288b
jmp 0x12436
jmp 0x12438
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x11f41
testb $0x1, -0x39(%rbp)
jne 0x124bf
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x758(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x750(%rbp)
jmp 0x1247e
movq -0x758(%rbp), %rdi
movq -0x750(%rbp), %rsi
addq $0x8, %rsi
leaq 0x1a1ee(%rip), %rdx     # 0x2c685
xorl %eax, %eax
callq 0x17ae0
jmp 0x124a0
movq 0x2bb19(%rip), %rdi     # 0x3dfc0
leaq 0x1a1fa(%rip), %rsi     # 0x2c6a8
callq 0x4330
jmp 0x124b5
movl $0x1, %edi
callq 0x4430
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x75c(%rbp)
jmp 0x124d3
movl -0x75c(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2badd(%rip), %rdi     # 0x3dfc0
movq 0x2babe(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x768(%rbp)
jmp 0x124f8
movq -0x768(%rbp), %rdi
leaq 0x19f89(%rip), %rsi     # 0x2c48f
callq 0x4330
movq %rax, -0x770(%rbp)
jmp 0x12514
movq -0x770(%rbp), %rdi
movq 0x2ba86(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x12529
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x780(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x778(%rbp)
jmp 0x12555
movq -0x778(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x7a8(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x7a0(%rbp)
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq -0x7a0(%rbp), %rdi
movq %rax, -0x798(%rbp)
callq 0x14f80
movq %rax, %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x790(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x784(%rbp)
jmp 0x125c0
movl -0x784(%rbp), %r9d
movq -0x790(%rbp), %r8
movq -0x798(%rbp), %rcx
movq -0x7a8(%rbp), %rsi
movq -0x780(%rbp), %rdi
leaq 0x19ec8(%rip), %rdx     # 0x2c4b2
xorl %eax, %eax
callq 0x17ae0
jmp 0x125f3
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x7b0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x338(%rbp), %rdi
callq 0x4160
jmp 0x12627
movq -0x7b0(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x1f4d0
jmp 0x1263c
leaq -0x338(%rbp), %rdi
callq 0x4200
jmp 0x12667
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x4200
jmp 0x1288b
movq -0x390(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x7b4(%rbp)
jmp 0x1267f
movl -0x7b4(%rbp), %eax
cmpl $0x11d, %eax            # imm = 0x11D
jne 0x12879
leaq -0x359(%rbp), %rdi
movq %rdi, -0x7c0(%rbp)
callq 0x45c0
movq -0x7c0(%rbp), %rdx
leaq 0x19dae(%rip), %rsi     # 0x2c45f
leaq -0x358(%rbp), %rdi
callq 0x7790
jmp 0x126bf
leaq -0x359(%rbp), %rdi
callq 0x43b0
movq -0x390(%rbp), %rdi
callq 0x148d0
movl %eax, -0x7c4(%rbp)
jmp 0x126df
movl -0x7c4(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x2b8d1(%rip), %rdi     # 0x3dfc0
movq 0x2b8b2(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x7d0(%rbp)
jmp 0x12704
movq -0x7d0(%rbp), %rdi
leaq 0x19fc5(%rip), %rsi     # 0x2c6d7
callq 0x4330
movq %rax, -0x7d8(%rbp)
jmp 0x12720
movq -0x7d8(%rbp), %rdi
movq 0x2b87a(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x12735
movq -0x390(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x7e8(%rbp)
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x7e0(%rbp)
jmp 0x12761
movq -0x7e0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x800(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x390(%rbp), %rax
movq %rcx, -0x7f8(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x7ec(%rbp)
jmp 0x127a1
movl -0x7ec(%rbp), %r8d
movq -0x7f8(%rbp), %rcx
movq -0x800(%rbp), %rsi
movq -0x7e8(%rbp), %rdi
leaq 0x19f39(%rip), %rdx     # 0x2c6fd
xorl %eax, %eax
callq 0x17ae0
jmp 0x127cd
movq -0x390(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x808(%rbp)
leaq -0x380(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x4160
jmp 0x127fc
movq -0x808(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x1f4d0
jmp 0x12811
leaq -0x380(%rbp), %rdi
callq 0x4200
leaq -0x358(%rbp), %rdi
callq 0x4200
jmp 0x12879
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x359(%rbp), %rdi
callq 0x43b0
jmp 0x1288b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1286b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x4200
leaq -0x358(%rbp), %rdi
callq 0x4200
jmp 0x1288b
leaq -0x30(%rbp), %rdi
callq 0x15080
addq $0x810, %rsp            # imm = 0x810
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x15080
movq -0x48(%rbp), %rdi
callq 0x45b0
nopl (%rax)