// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BitcoinTransactionFactory::gatherStatistics(unsigned int, unsigned int, bool)
void gatherStatistics(uint32_t stime,uint32_t zombieDate,bool recordAddresses)
	{
		gatherAddresses();

		assert( mStatCount < MAX_STAT_COUNT );
		StatRow &row = mStatistics[mStatCount];
		row.mTime = stime;

		time_t currentTime;
		time(&currentTime); // get the current time.

		for (uint32_t i=0; i<mAddresses.size(); i++) // print one in every 10,000 addresses (just for testing right now)
		{
			BitcoinAddress *ba = mAddresses.getKey(i);
			uint64_t balance = ba->mTotalReceived-ba->mTotalSent;
			StatSize s = getStatSize(balance);
			row.mCount++;
			row.mValue+=balance;

			row.mStats[s].mCount++;
			row.mStats[s].mValue+=balance;

			uint32_t lastUsed = ba->mLastInputTime; // the last time we sent money (not received because anyone can send us money).
			if ( ba->mLastInputTime == 0 ) // if it has never had a spend.. then we use the time of first receive..
			{
				lastUsed = ba->mFirstOutputTime;
			}

			if ( lastUsed < zombieDate )
			{
				row.mZombieTotal+=balance;
				row.mZombieCount++;
			}

		}

		if ( recordAddresses )
		{
			// First compute how many bitcoin addresses have a balance over a minimum bitcoin size (we will start with just one)
			uint32_t plotCount = 0;

			for (uint32_t i=0; i<mAddresses.size(); i++) 
			{
				BitcoinAddress *ba = mAddresses.getKey(i);
				uint64_t balance = ba->mTotalReceived-ba->mTotalSent;
				if ( balance >= ONE_BTC )
				{
					plotCount++;
				}
			}

			printf("Gathering Address Delta's for %s addresses containing more than one bitcoin\r\n", formatNumber(plotCount) );

			if ( plotCount )
			{
				BitcoinAddress **sortPointers = new BitcoinAddress*[plotCount];
				uint32_t plotCount = 0;
				for (uint32_t i=0; i<mAddresses.size(); i++) // print one in every 10,000 addresses (just for testing right now)
				{
					BitcoinAddress *ba = mAddresses.getKey(i);
					uint64_t balance = ba->mTotalReceived-ba->mTotalSent;
					if ( balance >= ONE_BTC )
					{
						sortPointers[plotCount] = ba;
						plotCount++;
					}
				}

				uint32_t reportCount = plotCount;

				row.mAddresses = new StatAddress[reportCount];
				row.mAddressCount = reportCount;

				SortByBalance sb(sortPointers,plotCount);

				for (uint32_t i=0; i<reportCount; i++)
				{
					BitcoinAddress *ba = sortPointers[i];
					StatAddress &sa = row.mAddresses[i];
					sa.mAddress = mAddresses.getIndex(ba)+1;
					sa.mLastTime = ba->getLastUsedTime();
					sa.mFirstTime = ba->mFirstOutputTime;
					sa.mTotalReceived = (uint32_t)(ba->mTotalReceived/ONE_MBTC);
					sa.mTotalSent = (uint32_t)(ba->mTotalSent/ONE_MBTC);
					sa.mTransactionCount = (uint8_t) (ba->mTransactionCount > 255 ? 255 : ba->mTransactionCount);
					uint32_t inputCount = ba->getInputCount();
					uint32_t outputCount = ba->getOutputCount();
					sa.mInputCount = (uint8_t) (inputCount > 255 ? 255 : inputCount);
					sa.mOutputCount = (uint8_t) (outputCount > 255 ? 255 : outputCount);
				}

				if ( mStatCount >= 1 )
				{
					// build the delta!
					StatRow &previousRow = mStatistics[mStatCount-1];
					//
					uint32_t *addressIndex = new uint32_t[mAddresses.size()];	// convert from master address list to used by statistics address list table

					memset(addressIndex,0,sizeof(uint32_t)*mAddresses.size());

					for (uint32_t i=0; i<previousRow.mAddressCount; i++)
					{
						StatAddress &sa = previousRow.mAddresses[i];
						addressIndex[sa.mAddress-1] = i+1; // make this address as being used by the previous row
					}

					uint32_t changeCount=0;
					uint32_t newCount=0;
					uint32_t deleteCount=0;
					uint32_t sameCount=0;
					uint32_t riseFromTheDeadCount=0;
					uint32_t riseFromTheDeadAmount=0;

					for (uint32_t i=0; i<row.mAddressCount; i++)
					{
						StatAddress &na = row.mAddresses[i];	// get the current row address
						uint32_t aindex = na.mAddress-1; // get the array index for this address

						if ( addressIndex[aindex] ) // did the previous row use this address?
						{
							uint32_t pindex = addressIndex[aindex]-1; // get the array index in the previous row so we can do a compare.

							addressIndex[aindex] = 0xFFFFFFFF; // make it as processed.

							StatAddress &oa = previousRow.mAddresses[pindex];

							if ( na == oa )
							{
								sameCount++; // no changes...
							}
							else
							{
								// ok.. if it previously existed but there has been a change, was it a zombie change?
								if ( oa.mLastTime < zombieDate && na.mLastTime >= zombieDate )
								{
									riseFromTheDeadCount++;
									riseFromTheDeadAmount+=oa.getBalance(); // how much bitcoin rose from the dead.
								}
								changeCount++;
							}
						}
						else
						{
							newCount++;
						}
					}

					for (uint32_t i=0; i<mAddresses.size(); i++)
					{
						if ( addressIndex[i] && addressIndex[i] != 0xFFFFFFFF )
						{
							deleteCount++;
						}
					}

					row.mNewAddressCount = newCount;
					row.mDeleteAddressCount = deleteCount;
					row.mChangeAddressCount = changeCount;
					row.mSameAddressCount = sameCount;
					row.mRiseFromDeadAmount = riseFromTheDeadAmount;
					row.mRiseFromDeadCount = riseFromTheDeadCount;


					if ( newCount )
					{
						row.mNewAddresses = new StatAddress[newCount];
					}

					if ( changeCount )
					{
						row.mChangedAddresses = new StatAddress[changeCount];
					}
					// Assign an array index to each address used by the previous row
					memset(addressIndex,0,sizeof(uint32_t)*mAddresses.size());
					for (uint32_t i=0; i<previousRow.mAddressCount; i++)
					{
						StatAddress &sa = previousRow.mAddresses[i];
						addressIndex[sa.mAddress-1] = i+1;
					}

					newCount = 0;
					changeCount = 0;
					sameCount = 0;

					for (uint32_t i=0; i<row.mAddressCount; i++)
					{
						StatAddress &na = row.mAddresses[i];
						uint32_t aindex = na.mAddress-1;

						if ( addressIndex[aindex] ) // did the previous row have this address.
						{
							uint32_t pindex = addressIndex[aindex]-1;
							addressIndex[aindex] = 0xFFFFFFFF; // make it as processed.
							StatAddress &oa = previousRow.mAddresses[pindex];
							if ( na == oa )
							{
								sameCount++;
							}
							else
							{
								row.mChangedAddresses[changeCount] = na;
								changeCount++;
							}
						}
						else
						{
							row.mNewAddresses[newCount] = na;
							newCount++;
						}
					}

					if ( deleteCount ) 
					{
						row.mDeletedAddresses = new uint32_t[deleteCount];
						deleteCount = 0;
						for (uint32_t i=0; i<mAddresses.size(); i++)
						{
							if ( addressIndex[i] && addressIndex[i] != 0xFFFFFFFF )
							{
								row.mDeletedAddresses[deleteCount] = i+1;
								deleteCount++;
							}
						}
					}

					delete []addressIndex;

					printf("Found %s new addresses, %s changed addresses, and %s deleted addresses\r\n",
						formatNumber(newCount),
						formatNumber(changeCount),
						formatNumber(deleteCount));

					if ( mStatCount >= 2 )
					{
						StatRow &oldRow = mStatistics[mStatCount-2];
						delete []oldRow.mAddresses;
						oldRow.mAddresses = NULL;
						oldRow.mAddressCount = 0;
					}
				}
				delete []sortPointers;
			}
		}
		mStatCount++;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x1d3e0
movq -0x160(%rbp), %rax
cmpl $0x88e, 0x2000050(%rax) # imm = 0x88E
jae 0x1da71
jmp 0x1da90
leaq 0x13def(%rip), %rdi     # 0x31867
leaq 0x131d1(%rip), %rsi     # 0x30c50
movl $0xe56, %edx            # imm = 0xE56
leaq 0x13df8(%rip), %rcx     # 0x31883
callq 0x20c0
movq -0x160(%rbp), %rcx
movq %rcx, %rax
addq $0x2000058, %rax        # imm = 0x2000058
movl 0x2000050(%rcx), %ecx
imulq $0x190, %rcx, %rcx      # imm = 0x190
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
leaq -0x28(%rbp), %rdi
callq 0x2120
movl $0x0, -0x2c(%rbp)
movq -0x160(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, -0x164(%rbp)
callq 0x1d960
movl %eax, %ecx
movl -0x164(%rbp), %eax
cmpl %ecx, %eax
jae 0x1dbd2
movq -0x160(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x1d360
movq -0x160(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x38(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x1e9e0
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rax
movl -0x44(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
addq $0x20, %rax
movl -0x44(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x1db9f
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x1dbc2
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x1dbc4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1dace
testb $0x1, -0x11(%rbp)
je 0x1e9a8
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x160(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, -0x168(%rbp)
callq 0x1d960
movl %eax, %ecx
movl -0x168(%rbp), %eax
cmpl %ecx, %eax
jae 0x1dc52
movq -0x160(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x1d360
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x58(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x60(%rbp)
cmpq $0x5f5e100, -0x60(%rbp) # imm = 0x5F5E100
jb 0x1dc45
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1dc47
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1dbea
movl -0x4c(%rbp), %edi
callq 0x19c20
movq %rax, %rsi
leaq 0x13c6a(%rip), %rdi     # 0x318ce
movb $0x0, %al
callq 0x2050
cmpl $0x0, -0x4c(%rbp)
je 0x1e9a6
movl -0x4c(%rbp), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movq -0x160(%rbp), %rdi
movl -0x70(%rbp), %eax
movl %eax, -0x16c(%rbp)
callq 0x1d960
movl %eax, %ecx
movl -0x16c(%rbp), %eax
cmpl %ecx, %eax
jae 0x1dd22
movq -0x160(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x1d360
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x78(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x80(%rbp)
cmpq $0x5f5e100, -0x80(%rbp) # imm = 0x5F5E100
jb 0x1dd15
movq -0x78(%rbp), %rdx
movq -0x68(%rbp), %rax
movl -0x6c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x1dd17
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1dcab
movl -0x6c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq %rax, -0x180(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x188(%rbp)
callq 0x2040
movq %rax, %rcx
movq -0x180(%rbp), %rax
movq %rcx, -0x178(%rbp)
cmpq $0x0, %rax
je 0x1ddd0
movq -0x178(%rbp), %rax
movq -0x180(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x198(%rbp)
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x1ea50
jmp 0x1ddb2
movq -0x198(%rbp), %rcx
movq -0x1a0(%rbp), %rax
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x190(%rbp)
jne 0x1dd9d
movq -0x178(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x158(%rax)
movl -0x84(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x150(%rax)
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
leaq -0xa0(%rbp), %rdi
callq 0x1ea90
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x84(%rbp), %eax
jae 0x1dff3
movq -0x160(%rbp), %rdi
movq -0x68(%rbp), %rax
movl -0xa4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rax
movq 0x158(%rax), %rax
movl -0xa4(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rsi
callq 0x1d0d0
movl %eax, %ecx
addl $0x1, %ecx
movq -0xb8(%rbp), %rax
movl %ecx, (%rax)
movq -0xb0(%rbp), %rdi
callq 0x1eae0
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0xb0(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0xb8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rax
movl $0x186a0, %ecx          # imm = 0x186A0
xorl %edx, %edx
divq %rcx
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xb0(%rbp), %rax
movq 0x20(%rax), %rax
movl $0x186a0, %ecx          # imm = 0x186A0
xorl %edx, %edx
divq %rcx
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xb0(%rbp), %rax
cmpl $0xff, 0x3c(%rax)
jbe 0x1df01
movl $0xff, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x1df11
movq -0xb0(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x14(%rax)
movq -0xb0(%rbp), %rdi
callq 0x1eb10
movl %eax, -0xbc(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x1eb30
movl %eax, -0xc0(%rbp)
cmpl $0xff, -0xbc(%rbp)
jbe 0x1df60
movl $0xff, %eax
movl %eax, -0x1a8(%rbp)
jmp 0x1df6c
movl -0xbc(%rbp), %eax
movl %eax, -0x1a8(%rbp)
movl -0x1a8(%rbp), %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x15(%rax)
cmpl $0xff, -0xc0(%rbp)
jbe 0x1df97
movl $0xff, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x1dfa3
movl -0xc0(%rbp), %eax
movl %eax, -0x1ac(%rbp)
movl -0x1ac(%rbp), %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x16(%rax)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x1de0f
movq -0x188(%rbp), %rsi
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
callq 0x2280
jmp 0x1e9c7
movq -0x160(%rbp), %rax
cmpl $0x1, 0x2000050(%rax)
jb 0x1e987
movq -0x160(%rbp), %rdi
movq %rdi, %rax
addq $0x2000058, %rax        # imm = 0x2000058
movl 0x2000050(%rdi), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x190, %rcx, %rcx      # imm = 0x190
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
callq 0x1d960
movl %eax, %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq -0x160(%rbp), %rdi
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
callq 0x1d960
movq -0x1b8(%rbp), %rdi
movl %eax, %eax
movl %eax, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x20b0
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movq -0xc8(%rbp), %rcx
cmpl 0x150(%rcx), %eax
jae 0x1e105
movq -0xc8(%rbp), %rax
movq 0x158(%rax), %rax
movl -0xd4(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movl -0xd4(%rbp), %edx
addl $0x1, %edx
movq -0xd0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x1e09c
movl $0x0, -0xe4(%rbp)
movl $0x0, -0xe8(%rbp)
movl $0x0, -0xec(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movl $0x0, -0xf8(%rbp)
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x150(%rcx), %eax
jae 0x1e29d
movq -0x20(%rbp), %rax
movq 0x158(%rax), %rax
movl -0xfc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x10c(%rbp)
movq -0xd0(%rbp), %rax
movl -0x10c(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x1e278
movq -0xd0(%rbp), %rax
movl -0x10c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0x110(%rbp)
movq -0xd0(%rbp), %rax
movl -0x10c(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0xc8(%rbp), %rax
movq 0x158(%rax), %rax
movl -0x110(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x108(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0x1eb50
testb $0x1, %al
jne 0x1e211
jmp 0x1e222
movl -0xf0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf0(%rbp)
jmp 0x1e276
movq -0x118(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x10(%rbp), %eax
jae 0x1e267
movq -0x108(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x10(%rbp), %eax
jb 0x1e267
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
movq -0x118(%rbp), %rdi
callq 0x1ec20
addl -0xf8(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x1e287
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x1e289
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x1e14b
movl $0x0, -0x11c(%rbp)
movq -0x160(%rbp), %rdi
movl -0x11c(%rbp), %eax
movl %eax, -0x1bc(%rbp)
callq 0x1d960
movl %eax, %ecx
movl -0x1bc(%rbp), %eax
cmpl %ecx, %eax
jae 0x1e313
movq -0xd0(%rbp), %rax
movl -0x11c(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x1e300
movq -0xd0(%rbp), %rax
movl -0x11c(%rbp), %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x1e300
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x1e302
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x1e2a7
movl -0xe8(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x160(%rax)
movl -0xec(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x164(%rax)
movl -0xe4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x168(%rax)
movl -0xf0(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x16c(%rax)
movl -0xf8(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x174(%rax)
movl -0xf4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x170(%rax)
cmpl $0x0, -0xe8(%rbp)
je 0x1e463
movl -0xe8(%rbp), %eax
movq %rax, -0x1d0(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x2040
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
movq %rcx, -0x1c8(%rbp)
cmpq $0x0, %rax
je 0x1e425
movq -0x1c8(%rbp), %rax
movq -0x1d0(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x1e8(%rbp)
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x1ea50
jmp 0x1e407
movq -0x1e8(%rbp), %rcx
movq -0x1f0(%rbp), %rax
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x1e0(%rbp)
jne 0x1e3f2
movq -0x1c8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x178(%rax)
jmp 0x1e463
movq -0x1d8(%rbp), %rsi
movq -0x1c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
callq 0x2280
jmp 0x1e9c7
cmpl $0x0, -0xe4(%rbp)
je 0x1e553
movl -0xe4(%rbp), %eax
movq %rax, -0x200(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x208(%rbp)
callq 0x2040
movq %rax, %rcx
movq -0x200(%rbp), %rax
movq %rcx, -0x1f8(%rbp)
cmpq $0x0, %rax
je 0x1e515
movq -0x1f8(%rbp), %rax
movq -0x200(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x218(%rbp)
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x1ea50
jmp 0x1e4f7
movq -0x218(%rbp), %rcx
movq -0x220(%rbp), %rax
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x210(%rbp)
jne 0x1e4e2
movq -0x1f8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x180(%rax)
jmp 0x1e553
movq -0x208(%rbp), %rsi
movq -0x1f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
callq 0x2280
jmp 0x1e9c7
movq -0x160(%rbp), %rdi
movq -0xd0(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0x1d960
movq -0x228(%rbp), %rdi
movl %eax, %eax
movl %eax, %edx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x20b0
movl $0x0, -0x120(%rbp)
movl -0x120(%rbp), %eax
movq -0xc8(%rbp), %rcx
cmpl 0x150(%rcx), %eax
jae 0x1e5f6
movq -0xc8(%rbp), %rax
movq 0x158(%rax), %rax
movl -0x120(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movl -0x120(%rbp), %edx
addl $0x1, %edx
movq -0xd0(%rbp), %rax
movq -0x128(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x120(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x120(%rbp)
jmp 0x1e58d
movl $0x0, -0xe8(%rbp)
movl $0x0, -0xe4(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x150(%rcx), %eax
jae 0x1e7ad
movq -0x20(%rbp), %rax
movq 0x158(%rax), %rax
movl -0x12c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x13c(%rbp)
movq -0xd0(%rbp), %rax
movl -0x13c(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x1e747
movq -0xd0(%rbp), %rax
movl -0x13c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0x140(%rbp)
movq -0xd0(%rbp), %rax
movl -0x13c(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0xc8(%rbp), %rax
movq 0x158(%rax), %rax
movl -0x140(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
movq -0x138(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x1eb50
testb $0x1, %al
jne 0x1e6e4
jmp 0x1e6f5
movl -0xf0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf0(%rbp)
jmp 0x1e745
movq -0x138(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x180(%rax), %rax
movl -0xe4(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %edx
movl %edx, 0x10(%rax)
movw 0x14(%rcx), %dx
movw %dx, 0x14(%rax)
movb 0x16(%rcx), %cl
movb %cl, 0x16(%rax)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x1e797
movq -0x138(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x178(%rax), %rax
movl -0xe8(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %edx
movl %edx, 0x10(%rax)
movw 0x14(%rcx), %dx
movw %dx, 0x14(%rax)
movb 0x16(%rcx), %cl
movb %cl, 0x16(%rax)
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x1e799
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x1e61e
cmpl $0x0, -0xec(%rbp)
je 0x1e891
movl -0xec(%rbp), %eax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2040
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x188(%rax)
movl $0x0, -0xec(%rbp)
movl $0x0, -0x14c(%rbp)
movq -0x160(%rbp), %rdi
movl -0x14c(%rbp), %eax
movl %eax, -0x22c(%rbp)
callq 0x1d960
movl %eax, %ecx
movl -0x22c(%rbp), %eax
cmpl %ecx, %eax
jae 0x1e88f
movq -0xd0(%rbp), %rax
movl -0x14c(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x1e879
movq -0xd0(%rbp), %rax
movl -0x14c(%rbp), %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x1e879
movl -0x14c(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rax
movq 0x188(%rax), %rax
movl -0xec(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x1e87b
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x1e803
jmp 0x1e891
movq -0xd0(%rbp), %rax
movq %rax, -0x238(%rbp)
cmpq $0x0, %rax
je 0x1e8b1
movq -0x238(%rbp), %rdi
callq 0x21d0
movl -0xe8(%rbp), %edi
callq 0x19c20
movq %rax, -0x248(%rbp)
movl -0xe4(%rbp), %edi
callq 0x19c20
movq %rax, -0x240(%rbp)
movl -0xec(%rbp), %edi
callq 0x19c20
movq -0x248(%rbp), %rsi
movq -0x240(%rbp), %rdx
movq %rax, %rcx
leaq 0x13024(%rip), %rdi     # 0x3191c
movb $0x0, %al
callq 0x2050
movq -0x160(%rbp), %rax
cmpl $0x2, 0x2000050(%rax)
jb 0x1e985
movq -0x160(%rbp), %rcx
movq %rcx, %rax
addq $0x2000058, %rax        # imm = 0x2000058
movl 0x2000050(%rcx), %ecx
subl $0x2, %ecx
movl %ecx, %ecx
imulq $0x190, %rcx, %rcx      # imm = 0x190
addq %rcx, %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, -0x250(%rbp)
cmpq $0x0, %rax
je 0x1e962
movq -0x250(%rbp), %rdi
callq 0x21d0
movq -0x158(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x158(%rbp), %rax
movl $0x0, 0x150(%rax)
jmp 0x1e987
movq -0x68(%rbp), %rax
movq %rax, -0x258(%rbp)
cmpq $0x0, %rax
je 0x1e9a4
movq -0x258(%rbp), %rdi
callq 0x21d0
jmp 0x1e9a6
jmp 0x1e9a8
movq -0x160(%rbp), %rax
movl 0x2000050(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2000050(%rax)
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x2260
nopw %cs:(%rax,%rax)
nopl (%rax)