// File: tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::updateTest()
void Application::updateTest() {
	// Step 0. Key to be updated
	// This key is used for all update tests
	map<string, string>::iterator it = testKVPairs.begin();
	it++;
	string newValue = "newValue";
	int number;
	vector<Node> replicas;
	int replicaIdToFail = TERTIARY;
	int nodeToFail;
	bool failedOneNode = false;

	/**
	 * Test 1: Test if value is updated 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 update operation
		cout<<endl<<"Updating a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "UPDATE OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), newValue.c_str(), par->getcurrtime());
		mp2[number]->clientUpdate(it->first, newValue);
	}

	/** end of test 1 **/

	/**
	 * Test 2: FAIL ONE REPLICA. Test if value is updated 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 quorum replicas are not found then exit
		if ( replicas.size() < RF-1 ) {
			log->LOG(&mp2[number]->getMemberNode()->addr, "Could not find at least quorum replicas for this key. Exiting!!! size of replicas vector: %d", replicas.size());
			cout<<endl<<"Could not find at least quorum replicas for this key. Exiting!!! size of replicas vector: "<<replicas.size()<<endl;
			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 update
		cout<<endl<<"Updating a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "UPDATE OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), newValue.c_str(), par->getcurrtime());
		mp2[number]->clientUpdate(it->first, newValue);

		failedOneNode = false;
	}

	/** end of test 2 **/

	/**
	 * Test 3 part 1: Fail two replicas. Test if value is updated correctly in quorum number of nodes after TWO OF THE REPLICAS ARE FAILED
	 */
	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
			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. Exiting test case !! "<<endl;
			}
			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<<"Could not fail two nodes. Exiting!!!";
				exit(1);
			}

			number = findARandomNodeThatIsAlive();

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

		/**
		 * TEST 3 part 2: After failing two replicas and waiting for STABILIZE_TIME, issue an update
		 */
		// 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 update
			cout<<endl<<"Updating a valid key.... ... .. . ."<<endl;
			log->LOG(&mp2[number]->getMemberNode()->addr, "UPDATE OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), newValue.c_str(), par->getcurrtime());
			// This update should be successful
			mp2[number]->clientUpdate(it->first, newValue);
		}
	}

	/** 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 update operation
		cout<<endl<<"Updating a valid key.... ... .. . ."<<endl;
		log->LOG(&mp2[number]->getMemberNode()->addr, "UPDATE OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), newValue.c_str(), par->getcurrtime());
		// This read should fail since at least quorum nodes are not alive
		mp2[number]->clientUpdate(it->first, newValue);
	}

	/** end of test 4 **/

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

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

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

	/** end of test 5 **/

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
addq $0x60, %rdi
callq 0x14ef0
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x14fd0
movq %rax, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x498(%rbp)
callq 0x45c0
movq -0x498(%rbp), %rdx
leaq 0x19e2c(%rip), %rsi     # 0x2c720
leaq -0x38(%rbp), %rdi
callq 0x7790
jmp 0x128ff
leaq -0x39(%rbp), %rdi
callq 0x43b0
leaq -0x68(%rbp), %rdi
callq 0x15010
movq -0x4a0(%rbp), %rax
movl $0x2, -0x6c(%rbp)
movb $0x0, -0x71(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x4a4(%rbp)
jmp 0x12934
movl -0x4a4(%rbp), %eax
cmpl $0x96, %eax
jne 0x12b41
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x4a8(%rbp)
jmp 0x12959
movl -0x4a8(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x2b657(%rip), %rdi     # 0x3dfc0
movq 0x2b638(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x4b0(%rbp)
jmp 0x1297e
movq -0x4b0(%rbp), %rdi
leaq 0x19d9d(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x4b8(%rbp)
jmp 0x1299a
movq -0x4b8(%rbp), %rdi
movq 0x2b600(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x129af
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x4c8(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x4c0(%rbp)
jmp 0x129db
movq -0x4c0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x4e8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq %rax, -0x4e0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x4d8(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x4cc(%rbp)
jmp 0x12a30
movl -0x4cc(%rbp), %r9d
movq -0x4d8(%rbp), %r8
movq -0x4e0(%rbp), %rcx
movq -0x4e8(%rbp), %rsi
movq -0x4c8(%rbp), %rdi
leaq 0x19cf3(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x12a63
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x4f0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x4160
jmp 0x12a97
leaq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4160
jmp 0x12aa9
movq -0x4f0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x1f7e0
jmp 0x12ac5
leaq -0xb8(%rbp), %rdi
callq 0x4200
leaq -0x98(%rbp), %rdi
callq 0x4200
jmp 0x12b41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x43b0
jmp 0x146c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x146af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x4200
leaq -0x98(%rbp), %rdi
callq 0x4200
jmp 0x146af
movq -0x4a0(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x4f4(%rbp)
jmp 0x12b59
movl -0x4f4(%rbp), %eax
cmpl $0xaf, %eax
jne 0x131ef
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x4f8(%rbp)
jmp 0x12b7e
movl -0x4f8(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x15030
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x500(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x4160
jmp 0x12bc4
movq -0x500(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x1f030
jmp 0x12be0
leaq -0x68(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x15050
leaq -0xd0(%rbp), %rdi
callq 0x15080
leaq -0xf0(%rbp), %rdi
callq 0x4200
leaq -0x68(%rbp), %rdi
callq 0x150e0
cmpq $0x2, %rax
jae 0x12d18
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x510(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x508(%rbp)
jmp 0x12c47
movq -0x508(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x518(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x150e0
movq -0x510(%rbp), %rdi
movq -0x518(%rbp), %rsi
movq %rax, %rcx
leaq 0x198c0(%rip), %rdx     # 0x2c53a
xorl %eax, %eax
callq 0x17ae0
jmp 0x12c83
movq 0x2b336(%rip), %rdi     # 0x3dfc0
movq 0x2b317(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x520(%rbp)
jmp 0x12c9f
movq -0x520(%rbp), %rdi
leaq 0x19832(%rip), %rsi     # 0x2c4df
callq 0x4330
movq %rax, -0x528(%rbp)
jmp 0x12cbb
leaq -0x68(%rbp), %rdi
callq 0x150e0
movq -0x528(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, -0x530(%rbp)
jmp 0x12cdc
movq -0x530(%rbp), %rdi
movq 0x2b2be(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x12cf1
movl $0x1, %edi
callq 0x4430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x4200
jmp 0x146af
movl $0x0, -0xf4(%rbp)
movq -0x4a0(%rbp), %rcx
movl -0xf4(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x12e82
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xf4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x538(%rbp)
jmp 0x12d60
movq -0x538(%rbp), %rsi
addq $0x8, %rsi
leaq -0x118(%rbp), %rdi
callq 0x14b50
jmp 0x12d79
movslq -0x6c(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x15100
movq %rax, -0x540(%rbp)
jmp 0x12d8f
movq -0x540(%rbp), %rdi
callq 0x26330
movq %rax, -0x548(%rbp)
jmp 0x12da4
movq -0x548(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x14b50
jmp 0x12db9
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xb250
movb %al, -0x549(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x4200
leaq -0x118(%rbp), %rdi
callq 0x4200
movb -0x549(%rbp), %al
testb $0x1, %al
jne 0x12df6
jmp 0x12e6c
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xf4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x558(%rbp)
jmp 0x12e1a
movq -0x558(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x12e53
movl -0xf4(%rbp), %eax
movl %eax, -0x70(%rbp)
movb $0x1, -0x71(%rbp)
jmp 0x12e82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x4200
jmp 0x146af
cmpl $0x0, -0x6c(%rbp)
jle 0x12e64
movl -0x6c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x12e68
movb $0x0, -0x71(%rbp)
jmp 0x12e6a
jmp 0x12e6c
jmp 0x12e6e
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0x12d22
testb $0x1, -0x71(%rbp)
je 0x12fad
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x568(%rbp)
movq 0x48(%rax), %rax
movslq -0x70(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x560(%rbp)
jmp 0x12eb8
movq -0x4a0(%rbp), %rax
movq -0x560(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x578(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x56c(%rbp)
jmp 0x12ee2
movl -0x56c(%rbp), %ecx
movq -0x578(%rbp), %rsi
movq -0x568(%rbp), %rdi
leaq 0x1945f(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x12f06
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x70(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x580(%rbp)
jmp 0x12f27
movq -0x4a0(%rbp), %rax
movq -0x580(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movslq -0x70(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x588(%rbp)
jmp 0x12f53
movq -0x588(%rbp), %rax
movb $0x1, 0x10(%rax)
movq 0x2b05b(%rip), %rdi     # 0x3dfc0
movq 0x2b03c(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x590(%rbp)
jmp 0x12f7a
movq -0x590(%rbp), %rdi
leaq 0x1960f(%rip), %rsi     # 0x2c597
callq 0x4330
movq %rax, -0x598(%rbp)
jmp 0x12f96
movq -0x598(%rbp), %rdi
movq 0x2b004(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x12fab
jmp 0x1301a
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x5a8(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x5a0(%rbp)
jmp 0x12fd9
movq -0x5a8(%rbp), %rdi
movq -0x5a0(%rbp), %rsi
addq $0x8, %rsi
leaq 0x195bb(%rip), %rdx     # 0x2c5ad
xorl %eax, %eax
callq 0x17ae0
jmp 0x12ffb
movq 0x2afbe(%rip), %rdi     # 0x3dfc0
leaq 0x195ba(%rip), %rsi     # 0x2c5c3
callq 0x4330
jmp 0x13010
movl $0x1, %edi
callq 0x4430
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x5ac(%rbp)
jmp 0x1302e
movl -0x5ac(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x2af82(%rip), %rdi     # 0x3dfc0
movq 0x2af63(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x5b8(%rbp)
jmp 0x13053
movq -0x5b8(%rbp), %rdi
leaq 0x196c8(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x5c0(%rbp)
jmp 0x1306f
movq -0x5c0(%rbp), %rdi
movq 0x2af2b(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x13084
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x5d0(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x5c8(%rbp)
jmp 0x130b0
movq -0x5c8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x5f0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq %rax, -0x5e8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x5e0(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x5d4(%rbp)
jmp 0x13105
movl -0x5d4(%rbp), %r9d
movq -0x5e0(%rbp), %r8
movq -0x5e8(%rbp), %rcx
movq -0x5f0(%rbp), %rsi
movq -0x5d0(%rbp), %rdi
leaq 0x1961e(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x13138
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x5f8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x158(%rbp), %rdi
callq 0x4160
jmp 0x1316c
leaq -0x178(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4160
jmp 0x1317e
movq -0x5f8(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x178(%rbp), %rdx
callq 0x1f7e0
jmp 0x1319a
leaq -0x178(%rbp), %rdi
callq 0x4200
leaq -0x158(%rbp), %rdi
callq 0x4200
movb $0x0, -0x71(%rbp)
jmp 0x131ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x131de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x4200
leaq -0x158(%rbp), %rdi
callq 0x4200
jmp 0x146af
movq -0x4a0(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x5fc(%rbp)
jmp 0x13207
movl -0x5fc(%rbp), %eax
cmpl $0xe1, %eax
jl 0x13b93
leaq -0x190(%rbp), %rdi
movq %rdi, -0x608(%rbp)
callq 0x15140
movq -0x608(%rbp), %rdi
callq 0x15160
movq -0x4a0(%rbp), %rax
movl $0x0, -0x194(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x600(%rbp)
jmp 0x13259
movl -0x600(%rbp), %eax
cmpl $0xe1, %eax
jne 0x1397d
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x60c(%rbp)
jmp 0x1327e
movl -0x60c(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x15030
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x618(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x4160
jmp 0x132c4
movq -0x618(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rdx
callq 0x1f030
jmp 0x132e0
leaq -0x68(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x15050
leaq -0x1b0(%rbp), %rdi
callq 0x15080
leaq -0x1d0(%rbp), %rdi
callq 0x4200
leaq -0x68(%rbp), %rdi
callq 0x150e0
cmpq $0x2, %rax
jbe 0x134e9
movl $0x2, -0x6c(%rbp)
cmpl $0x2, -0x194(%rbp)
je 0x134e7
movl $0x0, -0x1d4(%rbp)
movq -0x4a0(%rbp), %rcx
movl -0x1d4(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
je 0x134e2
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x1d4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x620(%rbp)
jmp 0x13377
movq -0x620(%rbp), %rsi
addq $0x8, %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x14b50
jmp 0x13390
movslq -0x6c(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x15100
movq %rax, -0x628(%rbp)
jmp 0x133a6
movq -0x628(%rbp), %rdi
callq 0x26330
movq %rax, -0x630(%rbp)
jmp 0x133bb
movq -0x630(%rbp), %rsi
leaq -0x218(%rbp), %rdi
callq 0x14b50
jmp 0x133d0
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0xb250
movb %al, -0x631(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x4200
leaq -0x1f8(%rbp), %rdi
callq 0x4200
movb -0x631(%rbp), %al
testb $0x1, %al
jne 0x13410
jmp 0x134ce
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x1d4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x640(%rbp)
jmp 0x13434
movq -0x640(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x134bb
leaq -0x190(%rbp), %rdi
leaq -0x1d4(%rbp), %rsi
callq 0x15180
jmp 0x13456
movl -0x6c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x6c(%rbp)
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x134e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x13b82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x4200
jmp 0x13b82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x4200
jmp 0x13b82
cmpl $0x0, -0x6c(%rbp)
jle 0x134ca
movl -0x6c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x134cc
jmp 0x134ce
movl -0x1d4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d4(%rbp)
jmp 0x13339
jmp 0x13322
jmp 0x13538
movq 0x2aad0(%rip), %rdi     # 0x3dfc0
movq 0x2aab1(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x648(%rbp)
jmp 0x13505
movq -0x648(%rbp), %rdi
leaq 0x19269(%rip), %rsi     # 0x2c77c
callq 0x4330
movq %rax, -0x650(%rbp)
jmp 0x13521
movq -0x650(%rbp), %rdi
movq 0x2aa79(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x13536
jmp 0x13538
cmpl $0x2, -0x194(%rbp)
jne 0x1373f
movl $0x0, -0x21c(%rbp)
movl -0x21c(%rbp), %eax
movl %eax, -0x654(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x15200
movq %rax, %rcx
movl -0x654(%rbp), %eax
cmpl %ecx, %eax
jge 0x1373d
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x670(%rbp)
movq 0x48(%rax), %rax
movq %rax, -0x668(%rbp)
movslq -0x21c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x15220
movq %rax, -0x660(%rbp)
jmp 0x135b1
movq -0x668(%rbp), %rax
movq -0x660(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x678(%rbp)
jmp 0x135d4
movq -0x4a0(%rbp), %rax
movq -0x678(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x688(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x67c(%rbp)
jmp 0x135fe
movl -0x67c(%rbp), %ecx
movq -0x688(%rbp), %rsi
movq -0x670(%rbp), %rdi
leaq 0x18d43(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x13622
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x698(%rbp)
movslq -0x21c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x15220
movq %rax, -0x690(%rbp)
jmp 0x13650
movq -0x698(%rbp), %rax
movq -0x690(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6a0(%rbp)
jmp 0x13673
movq -0x4a0(%rbp), %rax
movq -0x6a0(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movq %rax, -0x6b0(%rbp)
movslq -0x21c(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x15220
movq %rax, -0x6a8(%rbp)
jmp 0x136ac
movq -0x6b0(%rbp), %rax
movq -0x6a8(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x6b8(%rbp)
jmp 0x136cf
movq -0x6b8(%rbp), %rax
movb $0x1, 0x10(%rax)
movq 0x2a8df(%rip), %rdi     # 0x3dfc0
movq 0x2a8c0(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x6c0(%rbp)
jmp 0x136f6
movq -0x6c0(%rbp), %rdi
leaq 0x18e93(%rip), %rsi     # 0x2c597
callq 0x4330
movq %rax, -0x6c8(%rbp)
jmp 0x13712
movq -0x6c8(%rbp), %rdi
movq 0x2a888(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x13727
jmp 0x13729
movl -0x21c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x21c(%rbp)
jmp 0x1354f
jmp 0x137ac
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x6d8(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6d0(%rbp)
jmp 0x1376b
movq -0x6d8(%rbp), %rdi
movq -0x6d0(%rbp), %rsi
addq $0x8, %rsi
leaq 0x18ea9(%rip), %rdx     # 0x2c62d
xorl %eax, %eax
callq 0x17ae0
jmp 0x1378d
movq 0x2a82c(%rip), %rdi     # 0x3dfc0
leaq 0x18eab(%rip), %rsi     # 0x2c646
callq 0x4330
jmp 0x137a2
movl $0x1, %edi
callq 0x4430
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x6dc(%rbp)
jmp 0x137c0
movl -0x6dc(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x2a7f0(%rip), %rdi     # 0x3dfc0
movq 0x2a7d1(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x6e8(%rbp)
jmp 0x137e5
movq -0x6e8(%rbp), %rdi
leaq 0x18f36(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x6f0(%rbp)
jmp 0x13801
movq -0x6f0(%rbp), %rdi
movq 0x2a799(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x13816
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x700(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x6f8(%rbp)
jmp 0x13842
movq -0x6f8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x720(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq %rax, -0x718(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x710(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x704(%rbp)
jmp 0x13897
movl -0x704(%rbp), %r9d
movq -0x710(%rbp), %r8
movq -0x718(%rbp), %rcx
movq -0x720(%rbp), %rsi
movq -0x700(%rbp), %rdi
leaq 0x18e8c(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x138ca
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x728(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x240(%rbp), %rdi
callq 0x4160
jmp 0x138fe
leaq -0x260(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4160
jmp 0x13910
movq -0x728(%rbp), %rdi
leaq -0x240(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0x1f7e0
jmp 0x1392c
leaq -0x260(%rbp), %rdi
callq 0x4200
leaq -0x240(%rbp), %rdi
callq 0x4200
jmp 0x1397d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1396c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x4200
leaq -0x240(%rbp), %rdi
callq 0x4200
jmp 0x13b82
movq -0x4a0(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x72c(%rbp)
jmp 0x13995
movl -0x72c(%rbp), %eax
cmpl $0x113, %eax            # imm = 0x113
jne 0x13b74
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x730(%rbp)
jmp 0x139ba
movl -0x730(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x2a5f6(%rip), %rdi     # 0x3dfc0
movq 0x2a5d7(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x738(%rbp)
jmp 0x139df
movq -0x738(%rbp), %rdi
leaq 0x18d3c(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x740(%rbp)
jmp 0x139fb
movq -0x740(%rbp), %rdi
movq 0x2a59f(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x13a10
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x750(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x748(%rbp)
jmp 0x13a3c
movq -0x748(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x770(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq %rax, -0x768(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x760(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x754(%rbp)
jmp 0x13a91
movl -0x754(%rbp), %r9d
movq -0x760(%rbp), %r8
movq -0x768(%rbp), %rcx
movq -0x770(%rbp), %rsi
movq -0x750(%rbp), %rdi
leaq 0x18c92(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x13ac4
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x778(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x280(%rbp), %rdi
callq 0x4160
jmp 0x13af8
leaq -0x2a0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4160
jmp 0x13b0a
movq -0x778(%rbp), %rdi
leaq -0x280(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
callq 0x1f7e0
jmp 0x13b26
leaq -0x2a0(%rbp), %rdi
callq 0x4200
leaq -0x280(%rbp), %rdi
callq 0x4200
jmp 0x13b74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x13b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x4200
leaq -0x280(%rbp), %rdi
callq 0x4200
jmp 0x13b82
leaq -0x190(%rbp), %rdi
callq 0x15260
jmp 0x13b93
leaq -0x190(%rbp), %rdi
callq 0x15260
jmp 0x146af
movq -0x4a0(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x77c(%rbp)
jmp 0x13bab
movl -0x77c(%rbp), %eax
cmpl $0x11d, %eax            # imm = 0x11D
jne 0x143b3
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x780(%rbp)
jmp 0x13bd0
movl -0x780(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x15030
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x788(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x2d8(%rbp), %rdi
callq 0x4160
jmp 0x13c16
movq -0x788(%rbp), %rsi
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rdx
callq 0x1f030
jmp 0x13c32
leaq -0x68(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x15050
leaq -0x2b8(%rbp), %rdi
callq 0x15080
leaq -0x2d8(%rbp), %rdi
callq 0x4200
movl $0x0, -0x2dc(%rbp)
movq -0x4a0(%rbp), %rcx
movl -0x2dc(%rbp), %eax
movq 0x58(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x1416f
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x790(%rbp)
jmp 0x13ca2
movq -0x790(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x14159
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movb $0x0, -0x341(%rbp)
movb $0x0, -0x369(%rbp)
movb $0x0, -0x391(%rbp)
movb $0x0, -0x3b9(%rbp)
callq 0x14b10
movq %rax, -0x798(%rbp)
jmp 0x13cf3
movq -0x798(%rbp), %rsi
addq $0x8, %rsi
leaq -0x300(%rbp), %rdi
callq 0x14b50
jmp 0x13d0c
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x15100
movq %rax, -0x7a0(%rbp)
jmp 0x13d22
movq -0x7a0(%rbp), %rdi
callq 0x26330
movq %rax, -0x7a8(%rbp)
jmp 0x13d37
movq -0x7a8(%rbp), %rsi
leaq -0x320(%rbp), %rdi
callq 0x14b50
jmp 0x13d4c
leaq -0x300(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x152c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7a9(%rbp)
jne 0x13d73
jmp 0x13ecb
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x7b8(%rbp)
jmp 0x13d97
movq -0x7b8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x340(%rbp), %rdi
callq 0x14b50
jmp 0x13db0
movb $0x1, -0x341(%rbp)
leaq -0x68(%rbp), %rdi
movl $0x1, %esi
callq 0x15100
movq %rax, -0x7c0(%rbp)
jmp 0x13dce
movq -0x7c0(%rbp), %rdi
callq 0x26330
movq %rax, -0x7c8(%rbp)
jmp 0x13de3
movq -0x7c8(%rbp), %rsi
leaq -0x368(%rbp), %rdi
callq 0x14b50
jmp 0x13df8
movb $0x1, -0x369(%rbp)
leaq -0x340(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x152c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7a9(%rbp)
jne 0x13e26
jmp 0x13ecb
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x7d0(%rbp)
jmp 0x13e4a
movq -0x7d0(%rbp), %rsi
addq $0x8, %rsi
leaq -0x390(%rbp), %rdi
callq 0x14b50
jmp 0x13e63
movb $0x1, -0x391(%rbp)
leaq -0x68(%rbp), %rdi
movl $0x2, %esi
callq 0x15100
movq %rax, -0x7d8(%rbp)
jmp 0x13e81
movq -0x7d8(%rbp), %rdi
callq 0x26330
movq %rax, -0x7e0(%rbp)
jmp 0x13e96
movq -0x7e0(%rbp), %rsi
leaq -0x3b8(%rbp), %rdi
callq 0x14b50
jmp 0x13eab
movb $0x1, -0x3b9(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x152c0
movb %al, -0x7a9(%rbp)
movb -0x7a9(%rbp), %al
movb %al, -0x7e1(%rbp)
testb $0x1, -0x3b9(%rbp)
jne 0x13ee2
jmp 0x13eee
leaq -0x3b8(%rbp), %rdi
callq 0x4200
testb $0x1, -0x391(%rbp)
jne 0x13ef9
jmp 0x13f05
leaq -0x390(%rbp), %rdi
callq 0x4200
testb $0x1, -0x369(%rbp)
jne 0x13f10
jmp 0x13f1c
leaq -0x368(%rbp), %rdi
callq 0x4200
testb $0x1, -0x341(%rbp)
jne 0x13f27
jmp 0x13f33
leaq -0x340(%rbp), %rdi
callq 0x4200
leaq -0x320(%rbp), %rdi
callq 0x4200
leaq -0x300(%rbp), %rdi
callq 0x4200
movb -0x7e1(%rbp), %al
testb $0x1, %al
jne 0x13f5a
jmp 0x14157
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x7f8(%rbp)
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x7f0(%rbp)
jmp 0x13f89
movq -0x4a0(%rbp), %rax
movq -0x7f0(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x808(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x7fc(%rbp)
jmp 0x13fb3
movl -0x7fc(%rbp), %ecx
movq -0x808(%rbp), %rsi
movq -0x7f8(%rbp), %rdi
leaq 0x1838e(%rip), %rdx     # 0x2c35c
xorl %eax, %eax
callq 0x17ae0
jmp 0x13fd7
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x810(%rbp)
jmp 0x13ffb
movq -0x4a0(%rbp), %rax
movq -0x810(%rbp), %rcx
movb $0x1, 0x10(%rcx)
movq 0x40(%rax), %rax
movslq -0x2dc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14af0
movq %rax, -0x818(%rbp)
jmp 0x1402a
movq -0x818(%rbp), %rax
movb $0x1, 0x10(%rax)
movb $0x1, -0x71(%rbp)
movq 0x29f80(%rip), %rdi     # 0x3dfc0
movq 0x29f61(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x820(%rbp)
jmp 0x14055
movq -0x820(%rbp), %rdi
leaq 0x18608(%rip), %rsi     # 0x2c66b
callq 0x4330
movq %rax, -0x828(%rbp)
jmp 0x14071
movq -0x828(%rbp), %rdi
movq 0x29f29(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x14086
jmp 0x1416f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x4200
jmp 0x146af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x14146
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1413a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x14121
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x14108
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x391(%rbp)
jne 0x140fa
jmp 0x14106
leaq -0x390(%rbp), %rdi
callq 0x4200
jmp 0x14108
testb $0x1, -0x369(%rbp)
jne 0x14113
jmp 0x1411f
leaq -0x368(%rbp), %rdi
callq 0x4200
jmp 0x14121
testb $0x1, -0x341(%rbp)
jne 0x1412c
jmp 0x14138
leaq -0x340(%rbp), %rdi
callq 0x4200
jmp 0x1413a
leaq -0x320(%rbp), %rdi
callq 0x4200
leaq -0x300(%rbp), %rdi
callq 0x4200
jmp 0x146af
jmp 0x14159
jmp 0x1415b
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
jmp 0x13c64
testb $0x1, -0x71(%rbp)
jne 0x141e2
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x838(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x830(%rbp)
jmp 0x141a1
movq -0x838(%rbp), %rdi
movq -0x830(%rbp), %rsi
addq $0x8, %rsi
leaq 0x184cb(%rip), %rdx     # 0x2c685
xorl %eax, %eax
callq 0x17ae0
jmp 0x141c3
movq 0x29df6(%rip), %rdi     # 0x3dfc0
leaq 0x184d7(%rip), %rsi     # 0x2c6a8
callq 0x4330
jmp 0x141d8
movl $0x1, %edi
callq 0x4430
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x83c(%rbp)
jmp 0x141f6
movl -0x83c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x29dba(%rip), %rdi     # 0x3dfc0
movq 0x29d9b(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x848(%rbp)
jmp 0x1421b
movq -0x848(%rbp), %rdi
leaq 0x18500(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x850(%rbp)
jmp 0x14237
movq -0x850(%rbp), %rdi
movq 0x29d63(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x1424c
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x860(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x858(%rbp)
jmp 0x14278
movq -0x858(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x880(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rdi
callq 0x4150
movq %rax, -0x878(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x870(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x864(%rbp)
jmp 0x142cd
movl -0x864(%rbp), %r9d
movq -0x870(%rbp), %r8
movq -0x878(%rbp), %rcx
movq -0x880(%rbp), %rsi
movq -0x860(%rbp), %rdi
leaq 0x18456(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x14300
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x888(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x14f80
movq %rax, %rsi
leaq -0x3e0(%rbp), %rdi
callq 0x4160
jmp 0x14334
leaq -0x400(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4160
jmp 0x14346
movq -0x888(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
leaq -0x400(%rbp), %rdx
callq 0x1f7e0
jmp 0x14362
leaq -0x400(%rbp), %rdi
callq 0x4200
leaq -0x3e0(%rbp), %rdi
callq 0x4200
jmp 0x143b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x143a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x4200
leaq -0x3e0(%rbp), %rdi
callq 0x4200
jmp 0x146af
movq -0x4a0(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x88c(%rbp)
jmp 0x143cb
movl -0x88c(%rbp), %eax
cmpl $0x11d, %eax            # imm = 0x11D
jne 0x14694
leaq -0x421(%rbp), %rdi
movq %rdi, -0x898(%rbp)
callq 0x45c0
movq -0x898(%rbp), %rdx
leaq 0x18062(%rip), %rsi     # 0x2c45f
leaq -0x420(%rbp), %rdi
callq 0x7790
jmp 0x1440b
leaq -0x421(%rbp), %rdi
callq 0x43b0
leaq -0x449(%rbp), %rdi
movq %rdi, -0x8a0(%rbp)
callq 0x45c0
movq -0x8a0(%rbp), %rdx
leaq 0x18381(%rip), %rsi     # 0x2c7b9
leaq -0x448(%rbp), %rdi
callq 0x7790
jmp 0x14446
leaq -0x449(%rbp), %rdi
callq 0x43b0
movq -0x4a0(%rbp), %rdi
callq 0x148d0
movl %eax, -0x8a4(%rbp)
jmp 0x14466
movl -0x8a4(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x29b4a(%rip), %rdi     # 0x3dfc0
movq 0x29b2b(%rip), %rsi     # 0x3dfa8
callq 0x4390
movq %rax, -0x8b0(%rbp)
jmp 0x1448b
movq -0x8b0(%rbp), %rdi
leaq 0x18290(%rip), %rsi     # 0x2c729
callq 0x4330
movq %rax, -0x8b8(%rbp)
jmp 0x144a7
movq -0x8b8(%rbp), %rdi
movq 0x29af3(%rip), %rsi     # 0x3dfa8
callq 0x4390
jmp 0x144bc
movq -0x4a0(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x8c8(%rbp)
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x14b10
movq %rax, -0x8c0(%rbp)
jmp 0x144e8
movq -0x8c0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8e8(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x4150
movq %rax, -0x8e0(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x4a0(%rbp), %rax
movq %rcx, -0x8d8(%rbp)
movq 0x58(%rax), %rdi
callq 0x18c60
movl %eax, -0x8cc(%rbp)
jmp 0x1453b
movl -0x8cc(%rbp), %r9d
movq -0x8d8(%rbp), %r8
movq -0x8e0(%rbp), %rcx
movq -0x8e8(%rbp), %rsi
movq -0x8c8(%rbp), %rdi
leaq 0x181e8(%rip), %rdx     # 0x2c74d
xorl %eax, %eax
callq 0x17ae0
jmp 0x1456e
movq -0x4a0(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8f0(%rbp)
leaq -0x470(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x4160
jmp 0x1459d
leaq -0x490(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0x4160
jmp 0x145b2
movq -0x8f0(%rbp), %rdi
leaq -0x470(%rbp), %rsi
leaq -0x490(%rbp), %rdx
callq 0x1f7e0
jmp 0x145ce
leaq -0x490(%rbp), %rdi
callq 0x4200
leaq -0x470(%rbp), %rdi
callq 0x4200
leaq -0x448(%rbp), %rdi
callq 0x4200
leaq -0x420(%rbp), %rdi
callq 0x4200
jmp 0x14694
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x421(%rbp), %rdi
callq 0x43b0
jmp 0x146af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x449(%rbp), %rdi
callq 0x43b0
jmp 0x14686
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1467a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1466e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x490(%rbp), %rdi
callq 0x4200
leaq -0x470(%rbp), %rdi
callq 0x4200
leaq -0x448(%rbp), %rdi
callq 0x4200
leaq -0x420(%rbp), %rdi
callq 0x4200
jmp 0x146af
leaq -0x68(%rbp), %rdi
callq 0x15080
leaq -0x38(%rbp), %rdi
callq 0x4200
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x15080
leaq -0x38(%rbp), %rdi
callq 0x4200
movq -0x48(%rbp), %rdi
callq 0x45b0
nopw (%rax,%rax)