// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
callq 0x31d0
movq %rax, 0x8(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf3f7(%rip), %rsi      # 0x186c8
leaq 0xf3f8(%rip), %rdx      # 0x186d0
leaq 0x98(%rsp), %rdi
callq 0xb686
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0x96, %eax
jne 0x9494
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x930a
movq 0x17c95(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x17c7a(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xf36c(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
movq 0x98(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xf327(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x2d8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x2c8(%rsp), %rdi
callq 0x5a48
leaq 0x2b8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x2a8(%rsp), %rdi
callq 0x5a48
leaq 0x2c8(%rsp), %rsi
leaq 0x2a8(%rsp), %rdx
movq %r14, %rdi
callq 0x1030a
movq 0x2a8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9477
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x2c8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9494
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0xaf, %eax
jne 0x993c
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %r13
movq (%rcx,%r13,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x94a8
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r15, %r12
je 0x94f2
movq %r15, %r14
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
addq $0x20, %r14
cmpq %r12, %r14
jne 0x94dc
movq %r15, 0x18(%rsp)
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %r14
leaq 0x298(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x288(%rsp), %rdi
callq 0x5a48
leaq 0x50(%rsp), %rdi
leaq 0x288(%rsp), %rdx
movq %r14, %rsi
callq 0xfc44
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
leaq 0x50(%rsp), %r14
movups (%r14), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x10(%r14), %rcx
movq %rcx, 0x20(%rsp)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
callq 0xb544
movq %r14, %rdi
callq 0xb544
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x95a4
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
sarq $0x5, %rcx
cmpq $0x2, %rcx
jb 0xa9f8
movq 0x58(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0x96c5
movl $0x2, %r14d
xorl %ebp, %ebp
leaq 0x50(%rsp), %r15
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0x30(%rsp), %rdi
callq 0xb200
movslq %r14d, %rsi
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq %rsi, %rdx
jbe 0xa962
shlq $0x5, %rsi
addq %rsi, %rdi
callq 0x13c6c
movq %r15, %rdi
movq %rax, %rsi
callq 0xb200
movq 0x38(%rsp), %rdx
cmpq 0x58(%rsp), %rdx
jne 0x964d
testq %rdx, %rdx
je 0x9652
movq 0x50(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
sete %r12b
jmp 0x9655
xorl %r12d, %r12d
jmp 0x9655
movb $0x1, %r12b
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x9671
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x968d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %r12b, %r12b
je 0x96b1
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r12
cmpb $0x0, 0x10(%r12)
je 0x96ff
xorl %eax, %eax
testl %r14d, %r14d
setg %al
subl %eax, %r14d
incq %rbp
movq 0x58(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %rbp
jl 0x95d7
movq 0x38(%rbx), %rdi
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0xee75(%rip), %rdx      # 0x18555
xorl %eax, %eax
callq 0xbc4c
movq 0x178da(%rip), %rdi     # 0x20fc8
leaq 0xee76(%rip), %rsi      # 0x1856b
callq 0x3290
jmp 0xa9a5
movq 0x38(%rbx), %r14
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r12
leaq 0xebed(%rip), %rdx      # 0x18304
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %ecx
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %rax
movb $0x1, %cl
movb %cl, 0x10(%rax)
movq 0x40(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x20(%rax), %rax
movb %cl, 0x10(%rax)
movq 0x1787b(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x17860(%rip), %r14     # 0x20fc8
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r15
leaq 0xedbd(%rip), %rsi      # 0x1853f
movl $0x15, %edx
movq %rax, %rdi
callq 0x3310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x97b6
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x177d2(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xeec4(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
movq 0x98(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xee7f(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x278(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x268(%rsp), %rdi
callq 0x5a48
leaq 0x258(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x248(%rsp), %rdi
callq 0x5a48
leaq 0x268(%rsp), %rsi
leaq 0x248(%rsp), %rdx
movq %r14, %rdi
callq 0x1030a
movq 0x248(%rsp), %rdi
cmpq %r12, %rdi
je 0x991f
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x268(%rsp), %rdi
cmpq %r15, %rdi
je 0x993c
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0xe1, %eax
jl 0xa112
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x9975
movq $0x0, 0x78(%rsp)
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0xe1, %eax
jne 0x9f5a
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %r13
movq (%rcx,%r13,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x9989
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r15, %r12
je 0x99d3
movq %r15, %r14
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
addq $0x20, %r14
cmpq %r12, %r14
jne 0x99bd
movq %r15, 0x18(%rsp)
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %r14
leaq 0x238(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x228(%rsp), %rdi
callq 0x5a48
leaq 0x50(%rsp), %rdi
leaq 0x228(%rsp), %rdx
movq %r14, %rsi
callq 0xfc44
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
leaq 0x50(%rsp), %r14
movups (%r14), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x10(%r14), %rcx
movq %rcx, 0x20(%rsp)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
callq 0xb544
movq %r14, %rdi
callq 0xb544
movq 0x228(%rsp), %rdi
cmpq %r15, %rdi
je 0x9a85
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r13, 0xf8(%rsp)
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpq $0x41, %rax
jb 0x9c22
leaq 0x60(%rsp), %r12
movl $0x2, %ebp
movl $0x0, 0x94(%rsp)
leaq 0x30(%rsp), %r14
leaq 0x50(%rsp), %r15
movl $0x0, 0xb8(%rsp)
movq 0x58(%rbx), %rax
cmpl $0x0, 0x18(%rax)
je 0x9c12
xorl %eax, %eax
movq 0x48(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0xb200
movslq %ebp, %rsi
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq %rsi, %rdx
jbe 0xa954
shlq $0x5, %rsi
addq %rsi, %rdi
callq 0x13c6c
movq %r15, %rdi
movq %rax, %rsi
callq 0xb200
movq 0x38(%rsp), %rdx
cmpq 0x58(%rsp), %rdx
jne 0x9b59
testq %rdx, %rdx
je 0x9b5e
movq 0x50(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
sete %r13b
jmp 0x9b61
xorl %r13d, %r13d
jmp 0x9b61
movb $0x1, %r13b
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x9b78
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9b94
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %r13b, %r13b
je 0x9bbc
movq 0x48(%rbx), %rcx
movslq 0xb8(%rsp), %rax
movq (%rcx,%rax,8), %rcx
movq 0x50(%rcx), %rcx
cmpb $0x0, 0x10(%rcx)
je 0x9bdb
xorl %eax, %eax
testl %ebp, %ebp
setg %al
subl %eax, %ebp
movl 0xb8(%rsp), %eax
incl %eax
movl %eax, 0xb8(%rsp)
movq 0x58(%rbx), %rcx
cmpl 0x18(%rcx), %eax
jne 0x9ae3
jmp 0x9c12
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x9bf7
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x9c09
leaq 0x70(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xbac2
decl %ebp
incl 0x94(%rsp)
cmpl $0x2, 0x94(%rsp)
jne 0x9ac8
jmp 0x9c8f
movq 0x1739f(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x17384(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xeac9(%rip), %rsi      # 0x18724
movl $0x3c, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
cmpq $0x41, 0x100(%rsp)
jb 0xaa60
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
testl %edx, %edx
jle 0x9dd0
movb $0x1, %r13b
movq 0x17307(%rip), %r12     # 0x20fc8
xorl %r14d, %r14d
cmpq %r14, %rdx
jbe 0xa9c1
movq 0x38(%rbx), %rbp
movslq (%rax,%r14,4), %rax
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdi
movq (%rcx,%rax,8), %rax
movq 0x50(%rax), %r15
callq 0xc962
addq $0x8, %r15
movq %rbp, %rdi
movq %r15, %rsi
leaq 0xe609(%rip), %rdx      # 0x18304
movl %eax, %ecx
xorl %eax, %eax
callq 0xbc4c
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r14, %rdx
jbe 0xa9c1
movq 0x48(%rbx), %rcx
movslq (%rax,%r14,4), %rax
movq (%rcx,%rax,8), %rcx
movq 0x50(%rcx), %rcx
movb %r13b, 0x10(%rcx)
movq 0x40(%rbx), %rcx
movq (%rcx,%rax,8), %rax
movq 0x20(%rax), %rax
movb %r13b, 0x10(%rax)
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %rbp
movl $0x15, %edx
movq %rax, %rdi
leaq 0xe7c3(%rip), %rsi      # 0x1853f
callq 0x3310
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
incq %r14
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
subq %rax, %rcx
movq %rcx, %rdx
sarq $0x2, %rdx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x9cc4
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x9dd0
movq 0x171cf(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x171b4(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xe8a6(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
movq 0x98(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xe861(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x218(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x208(%rsp), %rdi
callq 0x5a48
leaq 0x1f8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0x5a48
leaq 0x208(%rsp), %rsi
leaq 0x1e8(%rsp), %rdx
movq %r14, %rdi
callq 0x1030a
movq 0x1e8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9f3d
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x208(%rsp), %rdi
cmpq %r15, %rdi
je 0x9f5a
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0x113, %eax            # imm = 0x113
jne 0xa0f8
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0x9f6e
movq 0x17031(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x17016(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xe708(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
movq 0x98(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xe6c3(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x1d8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x1c8(%rsp), %rdi
callq 0x5a48
leaq 0x1b8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0x5a48
leaq 0x1c8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
movq %r14, %rdi
callq 0x1030a
movq 0x1a8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa0db
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa0f8
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xa112
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0x11d, %eax            # imm = 0x11D
jne 0xa70c
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0xa126
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r15, %r12
je 0xa170
movq %r15, %r14
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
addq $0x20, %r14
cmpq %r12, %r14
jne 0xa15a
movq %r15, 0x18(%rsp)
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x198(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x188(%rsp), %rdi
callq 0x5a48
leaq 0x50(%rsp), %rdi
leaq 0x188(%rsp), %rdx
movq %r14, %rsi
callq 0xfc44
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
leaq 0x50(%rsp), %r14
movups (%r14), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x10(%r14), %rcx
movq %rcx, 0x20(%rsp)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
callq 0xb544
movq %r14, %rdi
callq 0xb544
movq 0x188(%rsp), %rdi
cmpq %r15, %rdi
je 0xa222
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x58(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0xa970
xorl %r13d, %r13d
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rcx
movq 0x50(%rcx), %rcx
cmpb $0x0, 0x10(%rcx)
jne 0xa4a2
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0x30(%rsp), %rdi
callq 0xb200
movq 0x10(%rsp), %rdi
cmpq %rdi, 0x18(%rsp)
je 0xa9af
callq 0x13c6c
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0xb200
movq 0x38(%rsp), %rdx
movb $0x1, %r14b
cmpq 0x58(%rsp), %rdx
jne 0xa2af
testq %rdx, %rdx
je 0xa2ac
movq 0x50(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
setne %r14b
jmp 0xa2af
xorl %r14d, %r14d
testb %r14b, %r14b
je 0xa3c4
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0x70(%rsp), %rdi
callq 0xb200
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0xa9d2
addq $0x20, %rdi
callq 0x13c6c
leaq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0xb200
movq 0x78(%rsp), %rdx
cmpq 0xc0(%rsp), %rdx
jne 0xa338
testq %rdx, %rdx
je 0xa3c4
movq 0xb8(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
je 0xa3c4
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0xd8(%rsp), %rdi
callq 0xb200
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jbe 0xa9e5
addq $0x40, %rdi
callq 0x13c6c
leaq 0x2e8(%rsp), %rdi
movq %rax, %rsi
callq 0xb200
movq 0xe0(%rsp), %rdx
movb $0x1, %r12b
cmpq 0x2f0(%rsp), %rdx
jne 0xa4bb
testq %rdx, %rdx
je 0xa3c7
movq 0x2e8(%rsp), %rsi
movq 0xd8(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
setne %r15b
jmp 0xa3ca
xorl %r12d, %r12d
xorl %r15d, %r15d
testb %r12b, %r12b
je 0xa419
movq 0x2e8(%rsp), %rdi
leaq 0x2f8(%rsp), %rax
cmpq %rax, %rdi
je 0xa3f4
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0xa419
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %r14b, %r14b
je 0xa465
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xa443
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xa465
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa481
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa49d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %r15b, %r15b
jne 0xa4c3
incq %r13
movq 0x58(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r13
jl 0xa233
jmp 0xa970
movb $0x1, %r15b
jmp 0xa3ca
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %r15
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r15
leaq 0xde1d(%rip), %rdx      # 0x18304
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %ecx
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rax
movb $0x1, %cl
movb %cl, 0x10(%rax)
movq 0x40(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x20(%rax), %rax
movb %cl, 0x10(%rax)
movq 0x16aab(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x16a90(%rip), %r14     # 0x20fc8
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r15
leaq 0xe0c1(%rip), %rsi      # 0x18613
movl $0x19, %edx
movq %rax, %rdi
callq 0x3310
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0xa586
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x16a02(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xe0f4(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r15
movq 0x98(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xe0af(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %r14
leaq 0x178(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x5a48
leaq 0x158(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x5a48
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
movq %r14, %rdi
callq 0x1030a
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0xa6ef
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x168(%rsp), %rdi
cmpq %r15, %rdi
je 0xa70c
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x58(%rbx), %rdi
callq 0xc962
cmpl $0x11d, %eax            # imm = 0x11D
jne 0xa913
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xdcd7(%rip), %rsi      # 0x18407
leaq 0xdcda(%rip), %rdx      # 0x18411
leaq 0x30(%rsp), %rdi
callq 0xb686
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe010(%rip), %rsi      # 0x18761
leaq 0xe015(%rip), %rdx      # 0x1876d
leaq 0x50(%rsp), %rdi
callq 0xb686
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rbp
movq (%rcx,%rbp,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0xa762
movq 0x1683d(%rip), %rdi     # 0x20fc8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x16822(%rip), %rdi     # 0x20fc8
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0xdf14(%rip), %rsi      # 0x186d1
movl $0x23, %edx
movq %rax, %rdi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq 0x38(%rbx), %r14
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %r13
movq 0x30(%rsp), %r15
movq 0x50(%rsp), %r12
movq 0x58(%rbx), %rdi
callq 0xc962
addq $0x8, %r13
leaq 0xded6(%rip), %rdx      # 0x186f5
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r12, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rbx
leaq 0x138(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x5a48
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x5a48
leaq 0x128(%rsp), %rsi
leaq 0x108(%rsp), %rdx
movq %rbx, %rdi
callq 0x1030a
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0xa8be
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
leaq 0x40(%rsp), %rbx
leaq 0x60(%rsp), %r14
je 0xa8e5
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0xa8fc
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa913
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x10(%rsp), %rdi
callq 0xb544
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xa942
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xde13(%rip), %rdi      # 0x1876e
xorl %eax, %eax
callq 0x3410
leaq 0xde05(%rip), %rdi      # 0x1876e
xorl %eax, %eax
callq 0x3410
movq 0x38(%rbx), %rdi
movq 0x48(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0xdca2(%rip), %rdx      # 0x1862d
xorl %eax, %eax
callq 0xbc4c
movq 0x1662f(%rip), %rdi     # 0x20fc8
leaq 0xdcb0(%rip), %rsi      # 0x18650
callq 0x3290
movl $0x1, %edi
callq 0x3370
leaq 0xddb8(%rip), %rdi      # 0x1876e
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3410
leaq 0xdda6(%rip), %rdi      # 0x1876e
movq %r14, %rsi
xorl %eax, %eax
callq 0x3410
leaq 0xdd95(%rip), %rdi      # 0x1876e
movl $0x1, %esi
xorl %eax, %eax
callq 0x3410
leaq 0xdd82(%rip), %rdi      # 0x1876e
movl $0x2, %esi
xorl %eax, %eax
callq 0x3410
movq 0x38(%rbx), %rdi
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0xdacf(%rip), %rdx      # 0x184e2
xorl %eax, %eax
callq 0xbc4c
movq 0x165a7(%rip), %rdi     # 0x20fc8
callq 0x3130
movq %rax, %rbx
leaq 0xda57(%rip), %rsi      # 0x18487
movl $0x5a, %edx
movq %rax, %rdi
callq 0x3310
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x31b0
movq %rax, %rdi
callq 0x3130
jmp 0xa9a5
movq 0x38(%rbx), %rdi
movq 0x48(%rbx), %rax
movq 0xf8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rax), %rsi
addq $0x8, %rsi
leaq 0xdb52(%rip), %rdx      # 0x185d5
xorl %eax, %eax
callq 0xbc4c
movq 0x16537(%rip), %rdi     # 0x20fc8
leaq 0xdb56(%rip), %rsi      # 0x185ee
callq 0x3290
jmp 0xa9a5
movq %rax, %rbx
movq 0x1e8(%rsp), %rdi
cmpq %r12, %rdi
je 0xaac7
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xaac7
movq %rax, %rbx
movq 0x208(%rsp), %rdi
cmpq %r15, %rdi
je 0xadb9
movq 0x218(%rsp), %rsi
jmp 0xadb1
movq %rax, %rbx
movq 0x1a8(%rsp), %rdi
cmpq %r12, %rdi
je 0xab0a
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xab0a
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r15, %rdi
je 0xadb9
movq 0x1d8(%rsp), %rsi
jmp 0xadb1
movq %rax, %rbx
movq 0x228(%rsp), %rdi
cmpq %r15, %rdi
je 0xadb9
movq 0x238(%rsp), %rsi
jmp 0xadb1
jmp 0xad72
jmp 0xad72
movq %rax, %rbx
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0xab78
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xab78
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r15, %rdi
je 0xadd3
movq 0x178(%rsp), %rsi
jmp 0xad90
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0xabbb
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xabbb
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r14, %rdi
je 0xad4c
movq 0x138(%rsp), %rsi
jmp 0xad44
jmp 0xad79
jmp 0xad95
movq %rax, %rbx
movq 0x188(%rsp), %rdi
cmpq %r15, %rdi
je 0xadd3
movq 0x198(%rsp), %rsi
jmp 0xad90
jmp 0xad95
movq %rax, %rbx
movq 0x248(%rsp), %rdi
cmpq %r12, %rdi
je 0xac2e
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xac2e
movq %rax, %rbx
movq 0x268(%rsp), %rdi
cmpq %r15, %rdi
je 0xadd3
movq 0x278(%rsp), %rsi
jmp 0xad90
movq %rax, %rbx
movq 0x2a8(%rsp), %rdi
cmpq %r12, %rdi
je 0xac71
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xac71
movq %rax, %rbx
movq 0x2c8(%rsp), %rdi
cmpq %r15, %rdi
je 0xadd3
movq 0x2d8(%rsp), %rsi
jmp 0xad90
movq %rax, %rbx
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0xadd3
movq 0x298(%rsp), %rsi
jmp 0xad90
jmp 0xad95
jmp 0xad95
jmp 0xacca
jmp 0xacd4
movq %rax, %rbx
jmp 0xacfc
jmp 0xad72
jmp 0xad27
movq %rax, %rbx
jmp 0xad4c
jmp 0xad72
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0xacfc
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xad2a
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xad2a
jmp 0xad79
jmp 0xad95
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xad4c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xad7c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xad7c
jmp 0xad79
jmp 0xad95
jmp 0xad79
jmp 0xad72
movq %rax, %rbx
jmp 0xadb9
jmp 0xad9a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xadd3
movq 0x40(%rsp), %rsi
incq %rsi
jmp 0xadce
movq %rax, %rbx
jmp 0xadd3
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xadb9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xadd3
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
leaq 0x10(%rsp), %rdi
callq 0xb544
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xae02
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0