// File: /workspace/github_cpp_makefile_star2_O3/jeffchan[P]blockchain-parser/main.cpp
// Function: BlockChainCommand::process()
bool process(void)
	{
		uint32_t argc;
		const char **argv = getInputString(argc);

		if ( argv )
		{
			if ( strcmp(argv[0],"scan") == 0 )
			{
				if ( mMode == CM_SCAN )
				{
					printf("Pausing block-chain scan at block #%d\r\n", mLastBlockScan );
					mMode = CM_NONE;
				}
				else
				{
					printf("Scanning block-chain re-started from block %d up to a maximum of %d blocks..\r\n", mLastBlockScan, mMaxBlock);
					mMode = CM_SCAN;
				}
			}
			else if ( strcmp(argv[0],"exit") == 0 ||  strcmp(argv[0],"bye") == 0 || strcmp(argv[0],"quit") == 0  )
			{
				mMode = CM_EXIT;
			}
			else if ( strcmp(argv[0],"stop_scan") == 0 )
			{
				if ( mFinishedScanning )
				{
					printf("Already finished scanning the block-chain headers.  Found %d blocks.\r\n", mLastBlockScan );
				}
				else
				{
					stopScanning();
				}
			}
			else if ( strcmp(argv[0],"help") == 0 )
			{
				help();
			}
			else if ( strcmp(argv[0],"max_blocks") == 0 )
			{
				if ( argc >= 2 )
				{
					mMaxBlock = atoi(argv[1]);
					if ( mMaxBlock < 1 ) mMaxBlock = 1;
					printf("Maximum block scan set to %d\r\n", mMaxBlock );
				}
			}
			else if ( strcmp(argv[0],"by_day") == 0 )
			{
				mStatResolution = SR_DAY;
				printf("Will accumulate statistics on a per-day basis.\r\n");
				if ( !mProcessTransactions )
				{
					printf("Note: You must enable 'statistics' for this to take effect.\r\n");
				}
			}
			else if ( strcmp(argv[0],"by_month") == 0 )
			{
				mStatResolution = SR_MONTH;
				printf("Will accumulate statistics on a monthly basis.\r\n");
				if ( !mProcessTransactions )
				{
					printf("Note: You must enable 'statistics' for this to take effect.\r\n");
				}
			}
			else if ( strcmp(argv[0],"by_year") == 0 )
			{
				mStatResolution = SR_YEAR;
				printf("Will accumulate statistics on an annual basis.\r\n");
				if ( !mProcessTransactions )
				{
					printf("Note: You must enable 'statistics' for this to take effect.\r\n");
				}
			}
			else if ( strcmp(argv[0],"record_addresses") == 0 )
			{
				mRecordAddresses = mRecordAddresses ? false : true;
				printf("record_addresses set to %s\r\n", mRecordAddresses ? "true" : "false");
			}
			else if ( strcmp(argv[0],"adr") == 0 )
			{
				if ( argc == 1 )
				{
					printf("You must supply an address to output.\r\n");
				}
				else
				{
					for (uint32_t i=1; i<argc; i++)
					{
						const char *adr = argv[i];
						mBlockChain->printAddress(adr);
					}
				}
			}
			else if ( strcmp(argv[0],"process") == 0 )
			{
				if ( mMode == CM_PROCESS )
				{
					printf("Pausing processing block-chain blocks at block #%d of %d\r\n", mProcessBlock, mBlockChain->getBlockCount() );
					mMode = CM_NONE;
				}
				else
				{
					if ( !mFinishedScanning )
					{
						stopScanning();
					}
					mProcessBlock = 0;
					mMode = CM_PROCESS;
					printf("Beginning processing of %d blocks : Gathering Statistics=%s\r\n", 
					mBlockChain->getBlockCount(), 
					mProcessTransactions ? "true":"false");
				}
			}
			else if ( strcmp(argv[0],"statistics") == 0 )
			{
				mProcessTransactions = mProcessTransactions ? false : true;
				if ( mProcessTransactions )
				{
					printf("Block Processing will gather statistics.\r\n");
					printf("*** WARNING : This will consume an enormous amount of memory! ***\r\n");
				}
				else
				{
					printf("Block processing will not gather statistics.\r\n");
				}
			}
			else if ( strcmp(argv[0],"load_record") == 0 )
			{
				if ( mAddresses )
				{
					mAddresses->release();
					mAddresses = NULL;
				}
				printf("Loading previously recorded addresses from file 'BlockChainAddresses.bin\r\n");
				mAddresses = createBlockChainAddresses("BlockChainAddresses.bin");
			}
			else if ( strcmp(argv[0],"min_balance") == 0 )
			{
				if ( argc == 1 )
				{
					printf("No minimum balance specified, defaulting to 1btc.\r\n");
				}
				else
				{
					mMinBalance = (uint32_t)atoi(argv[1]);
					if ( mMinBalance < 1 )
					{
						mMinBalance = 1;
					}
					else
					{
						if ( mMinBalance > 1000000 )
						{
							mMinBalance = 1000000;
						}
					}
					printf("Minimum balance set to %d bitcoins.\r\n", mMinBalance );
				}
			}
			else if ( strcmp(argv[0],"top_balance") == 0 )
			{
				uint32_t tcount = 100;
				if ( argc >= 2 )
				{
					tcount = atoi(argv[1]);
					if ( tcount < 1 )
					{
						tcount = 1;
					}
				}
				printf("Printing the most valuable %d bitcoin addresses with a balance of more than %d bitcoins.\r\n", tcount, mMinBalance );
				mBlockChain->printTopBalances(tcount,mMinBalance);
			}
			else if ( strcmp(argv[0],"oldest") == 0 )
			{
				uint32_t tcount = 100;
				if ( argc >= 2 )
				{
					tcount = atoi(argv[1]);
					if ( tcount < 1 )
					{
						tcount = 1;
					}
				}
				printf("Printing the %d oldest bitcoin addresses with a balance of more than %d bitcoins.\r\n", tcount, mMinBalance );
				mBlockChain->printOldest(tcount,mMinBalance);
			}
			else if ( strcmp(argv[0],"zombie") == 0 )
			{
				uint32_t zdays = 365;
				if ( argc >=2 )
				{
					zdays = atoi(argv[1]);
					if ( zdays < 1 )
					{
						zdays = 1;
					}
				}
				printf("Generating Zombie Count for addresses older than %d days with a balance of more than %d bitcoins.\r\n", zdays, mMinBalance );
				mBlockChain->zombieReport(zdays,mMinBalance);
			}
			else if ( strcmp(argv[0],"by_day") == 0 )
			{
				mStatResolution = SR_DAY;
				printf("Gathering statistics every day.\r\n");
			}
			else if ( strcmp(argv[0],"by_month") == 0 )
			{
				mStatResolution = SR_MONTH;
				printf("Gathering statistics every month.\r\n");
			}
			else if ( strcmp(argv[0],"by_year") == 0 )
			{
				mStatResolution = SR_YEAR;
				printf("Gathering statistics every year.\r\n");
			}
			else if ( strcmp(argv[0],"counts") == 0 )
			{
				mBlockChain->reportCounts();
			}
			else if ( strcmp(argv[0],"block") == 0 )
			{
				if ( argc == 1 )
				{
					if ( mCurrentBlock )
					{
						mBlockChain->printBlock(mCurrentBlock);
						mCurrentBlock = mBlockChain->readBlock(mCurrentBlock->blockIndex+1);
					}
				}
				else
				{
					for (uint32_t i=1; i<argc; i++)
					{
						uint32_t index = (uint32_t)atoi(argv[i]);
						mCurrentBlock = getBlock(index);
						if ( mCurrentBlock )
						{
							mBlockChain->printBlock(mCurrentBlock);
						}
					}
				}
			}
		}
		switch ( mMode )
		{
			case CM_PROCESS:
				if ( mProcessBlock < mBlockChain->getBlockCount() )
				{
					mCurrentBlock = mBlockChain->readBlock(mProcessBlock);
					if ( mCurrentBlock && mProcessTransactions )
					{

						if ( mLastTime == 0 )
						{
							mLastTime = mCurrentBlock->timeStamp;
							mSatoshiTime = mCurrentBlock->timeStamp;
						}
						else
						{
							uint32_t currentTime = mCurrentBlock->timeStamp;
							time_t tnow(currentTime);
							struct tm beg;
							beg = *localtime(&tnow);
							time_t tbefore(mLastTime);
							struct tm before;
							before = *localtime(&tbefore);
							bool getStats = false;
							switch ( mStatResolution )
							{
								case SR_DAY:
									if ( beg.tm_yday != before.tm_yday )
									{
										getStats = true;
									}
									break;
								case SR_MONTH:
									if ( beg.tm_mon != before.tm_mon )
									{
										getStats = true;
									}
									break;
								case SR_YEAR:
									if ( beg.tm_year != before.tm_year )
									{
										getStats = true;
									}
									break;
							}
							if ( getStats )
							{
								const char *months[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
								printf("Gathering statistics for %s %d, %d to %s %d, %d\r\n", 
									months[before.tm_mon], before.tm_mday, before.tm_year+1900,
									months[beg.tm_mon], beg.tm_mday, beg.tm_year+1900);
								mBlockChain->gatherStatistics(mLastTime,(uint32_t)zombieDate,mRecordAddresses);
								mLastTime = currentTime;
							}
						}
						mBlockChain->processTransactions(mCurrentBlock);  // process transactions into individual addresses
					}
					mProcessBlock++;
					if ( (mProcessBlock%10000) == 0 )
					{
						printf("Processed block #%d of %d total.\r\n", mProcessBlock, mBlockChain->getBlockCount() );
					}
				}
				else
				{
					printf("Finished processing all blocks in the blockchain.\r\n");
					mBlockChain->reportCounts();
					if ( mProcessTransactions )
					{
						printf("Gathering final statistics.\r\n");
						mBlockChain->gatherStatistics(mLastTime,(uint32_t)zombieDate,mRecordAddresses);
						printf("Saving statistics to file 'stats.csv\r\n");
						mBlockChain->saveStatistics(mRecordAddresses);
					}
					mMode = CM_NONE;
					mProcessBlock = 0;
				}
				break;
			case CM_SCAN:
				{
					bool ok = mBlockChain->readBlockHeaders(mMaxBlock,mLastBlockScan);
					if ( !ok )
					{
						mFinishedScanning = true;
						mMode = CM_NONE; // done scanning.
						mLastBlockScan = mBlockChain->buildBlockChain();
						printf("Finished scanning block headers. Built block-chain with %d blocks found..\r\n", mLastBlockScan);
						printf("To resolve transactions you must execute the 'process' command.\r\n");
						printf("To gather statistics so you can ouput balances of individual addresses, you must execute the 'statistics' command prior to running the process command.\r\n");
					}
				}
				break;
		}
		return mMode != CM_EXIT;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x15469
testq %rax, %rax
je 0x15aed
movq %rax, %r14
movq (%rax), %r15
leaq 0x4718(%rip), %rsi      # 0x19f05
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a1b
leaq 0x46ee(%rip), %rsi      # 0x19ef2
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a10
leaq 0x46dc(%rip), %rsi      # 0x19ef7
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a10
leaq 0x46c9(%rip), %rsi      # 0x19efb
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a10
leaq 0x46b7(%rip), %rsi      # 0x19f00
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a58
leaq 0x46f1(%rip), %rsi      # 0x19f51
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a6a
leaq 0x46df(%rip), %rsi      # 0x19f56
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15a7e
leaq 0x46f2(%rip), %rsi      # 0x19f80
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15aa8
leaq 0x46e2(%rip), %rsi      # 0x19f87
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15ab8
leaq 0x46d4(%rip), %rsi      # 0x19f90
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15ac8
leaq 0x46c5(%rip), %rsi      # 0x19f98
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15d30
leaq 0x46e7(%rip), %rsi      # 0x19fd1
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15d62
leaq 0x46d4(%rip), %rsi      # 0x19fd5
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15d7e
leaq 0x473e(%rip), %rsi      # 0x1a056
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15da8
leaq 0x4732(%rip), %rsi      # 0x1a061
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e3a
leaq 0x4727(%rip), %rsi      # 0x1a06d
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e8a
leaq 0x4742(%rip), %rsi      # 0x1a09f
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e9c
leaq 0x4792(%rip), %rsi      # 0x1a106
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15f10
leaq 0x47d6(%rip), %rsi      # 0x1a161
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15f5b
leaq 0x482a(%rip), %rsi      # 0x1a1cc
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15fbc
leaq 0x481a(%rip), %rsi      # 0x1a1d3
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
jne 0x15aed
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x15aed
cmpl $0x1, %eax
jne 0x15fcb
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x15aed
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rdi
movl 0x50(%rax), %esi
incl %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x20(%rbx)
jmp 0x15aed
movl $0x3, (%rbx)
jmp 0x15d10
movl 0x14(%rbx), %esi
cmpl $0x1, (%rbx)
jne 0x15a3c
leaq 0x4451(%rip), %rdi      # 0x19e7b
xorl %eax, %eax
callq 0x2050
movl $0x0, (%rbx)
jmp 0x15d10
movl 0x10(%rbx), %edx
leaq 0x445d(%rip), %rdi      # 0x19ea3
xorl %eax, %eax
callq 0x2050
movl $0x1, (%rbx)
jmp 0x15bac
cmpb $0x1, 0x5(%rbx)
jne 0x15a74
movl 0x14(%rbx), %esi
leaq 0x44a2(%rip), %rdi      # 0x19f0a
jmp 0x15a9f
movq %rbx, %rdi
callq 0x16046
jmp 0x15aed
movq %rbx, %rdi
callq 0x1615a
jmp 0x15aed
cmpl $0x2, -0x2c(%rbp)
jb 0x15aed
movq 0x8(%r14), %rdi
callq 0x2270
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x10(%rbx)
leaq 0x44c4(%rip), %rdi      # 0x19f61
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
jmp 0x15aed
movl $0x0, 0x8(%rbx)
leaq 0x4a54(%rip), %rdi      # 0x1a50a
jmp 0x15ad6
movl $0x1, 0x8(%rbx)
leaq 0x4a14(%rip), %rdi      # 0x1a4da
jmp 0x15ad6
movl $0x2, 0x8(%rbx)
leaq 0x49d4(%rip), %rdi      # 0x1a4aa
callq 0x2260
cmpb $0x0, 0x6(%rbx)
jne 0x15aed
leaq 0x4a52(%rip), %rdi      # 0x1a53a
callq 0x2260
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x15bac
cmpl $0x2, %eax
jne 0x15d10
movl 0xc(%rbx), %r14d
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
cmpl %eax, %r14d
jae 0x15c09
movq 0x28(%rbx), %rdi
movl 0xc(%rbx), %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x15cd8
cmpb $0x1, 0x6(%rbx)
jne 0x15cd8
cmpl $0x0, 0x30(%rbx)
movl 0x18(%rax), %r15d
je 0x15c6e
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
callq 0x20e0
movl 0xc(%rax), %ecx
movl %ecx, -0x30(%rbp)
movl 0x14(%rax), %r12d
movslq 0x10(%rax), %r13
movl 0x1c(%rax), %r14d
movl 0x30(%rbx), %eax
leaq -0x38(%rbp), %rdi
movq %rax, (%rdi)
callq 0x20e0
movl 0xc(%rax), %edx
movl 0x14(%rax), %ecx
movslq 0x10(%rax), %rsi
movl 0x8(%rbx), %edi
cmpl $0x2, %edi
je 0x15d25
cmpl $0x1, %edi
je 0x15c78
testl %edi, %edi
jne 0x15cc7
cmpl 0x1c(%rax), %r14d
jne 0x15c7d
jmp 0x15cc7
movq 0x28(%rbx), %rdi
movl 0x10(%rbx), %esi
leaq 0x14(%rbx), %rdx
movq (%rdi), %rax
callq *0x68(%rax)
testb %al, %al
jne 0x15d10
movb $0x1, 0x5(%rbx)
movl $0x0, (%rbx)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movl %eax, 0x14(%rbx)
leaq 0x464b(%rip), %rdi      # 0x1a22e
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
leaq 0x4984(%rip), %rdi      # 0x1a577
callq 0x2260
leaq 0x49b9(%rip), %rdi      # 0x1a5b8
callq 0x2260
jmp 0x15d10
leaq 0x4a41(%rip), %rdi      # 0x1a651
callq 0x2260
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpb $0x1, 0x6(%rbx)
jne 0x15c62
leaq 0x4a58(%rip), %rdi      # 0x1a684
callq 0x2260
movq 0x28(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x9542(%rip), %edx      # 0x1f180
movzbl 0x4(%rbx), %ecx
movq (%rdi), %rax
callq *0x38(%rax)
leaq 0x4a52(%rip), %rdi      # 0x1a6a1
callq 0x2260
movq 0x28(%rbx), %rdi
movzbl 0x4(%rbx), %esi
movq (%rdi), %rax
callq *0x50(%rax)
xorl %eax, %eax
movl %eax, (%rbx)
movl %eax, 0xc(%rbx)
jmp 0x15d10
movl %r15d, 0x30(%rbx)
movl %r15d, 0x34(%rbx)
jmp 0x15ccb
cmpl %esi, %r13d
je 0x15cc7
leaq 0x90dc(%rip), %rax      # 0x1ed60
movq (%rax,%rsi,8), %rsi
movl $0x76c, %edi            # imm = 0x76C
addl %edi, %ecx
movq (%rax,%r13,8), %r8
addl %edi, %r12d
movl %r12d, (%rsp)
leaq 0x4538(%rip), %rdi      # 0x1a1d9
movl -0x30(%rbp), %r9d
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x94c7(%rip), %edx      # 0x1f180
movzbl 0x4(%rbx), %ecx
movq (%rdi), %rax
callq *0x38(%rax)
movl %r15d, 0x30(%rbx)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rdi
movq (%rdi), %rcx
movq %rax, %rsi
callq *0x28(%rcx)
movl 0xc(%rbx), %r14d
incl %r14d
movl %r14d, 0xc(%rbx)
imull $0x3afb7e91, %r14d, %eax # imm = 0x3AFB7E91
rorl $0x4, %eax
cmpl $0x68db8, %eax          # imm = 0x68DB8
ja 0x15d10
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x4507(%rip), %rdi      # 0x1a20b
movl %r14d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
cmpl $0x3, (%rbx)
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %ecx, %r12d
jne 0x15c7d
jmp 0x15cc7
movb 0x4(%rbx), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x4(%rbx)
leaq 0x4289(%rip), %rcx      # 0x19fcb
leaq 0x427d(%rip), %rsi      # 0x19fc6
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x4253(%rip), %rdi      # 0x19fa9
xorl %eax, %eax
callq 0x2050
jmp 0x15aed
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x15aed
cmpl $0x1, %eax
jne 0x15dc7
leaq 0x470a(%rip), %rdi      # 0x1a483
jmp 0x15ae8
cmpl $0x2, (%rbx)
jne 0x15deb
movl 0xc(%rbx), %r14d
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x4246(%rip), %rdi      # 0x19fdd
movl %r14d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
jmp 0x15a31
movb 0x6(%rbx), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x6(%rbx)
testb %al, %al
je 0x15e72
leaq 0x4626(%rip), %rdi      # 0x1a3e8
jmp 0x15ae8
movl $0x1, %r15d
movq (%r14,%r15,8), %rsi
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
incq %r15
movl -0x2c(%rbp), %eax
cmpq %rax, %r15
jb 0x15dcd
jmp 0x15aed
cmpb $0x0, 0x5(%rbx)
jne 0x15df9
movq %rbx, %rdi
callq 0x1615a
movl $0x0, 0xc(%rbx)
movl $0x2, (%rbx)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x41b0(%rip), %rcx      # 0x19fc6
leaq 0x41ae(%rip), %rdx      # 0x19fcb
cmpb $0x0, 0x6(%rbx)
cmovneq %rcx, %rdx
leaq 0x41ec(%rip), %rdi      # 0x1a018
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
jmp 0x15aed
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x15e51
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x4546(%rip), %rdi      # 0x1a39e
callq 0x2260
leaq 0x2d4d(%rip), %rdi      # 0x18bb1
callq 0x11d10
movq %rax, 0x40(%rbx)
jmp 0x15aed
leaq 0x459d(%rip), %rdi      # 0x1a416
callq 0x2260
leaq 0x45bb(%rip), %rdi      # 0x1a440
jmp 0x15ae8
cmpl $0x1, -0x2c(%rbp)
jne 0x15ee7
leaq 0x44d4(%rip), %rdi      # 0x1a36b
jmp 0x15ae8
movl $0x64, %r15d
cmpl $0x2, -0x2c(%rbp)
jb 0x15ebb
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x41e6(%rip), %rdi      # 0x1a0ab
movl %r15d, %esi
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbx), %rdi
movl 0x38(%rbx), %edx
movq (%rdi), %rax
movl %r15d, %esi
callq *0x80(%rax)
jmp 0x15aed
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, 0x38(%rbx)
testl %eax, %eax
je 0x15fa6
movl $0xf4240, %ecx          # imm = 0xF4240
cmpl $0xf4241, %eax          # imm = 0xF4241
jae 0x15fab
jmp 0x15fb0
movl $0x64, %r15d
cmpl $0x2, -0x2c(%rbp)
jb 0x15f2f
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x41d4(%rip), %rdi      # 0x1a10d
movl %r15d, %esi
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbx), %rdi
movl 0x38(%rbx), %edx
movq (%rdi), %rax
movl %r15d, %esi
callq *0x88(%rax)
jmp 0x15aed
movl $0x16d, %r15d           # imm = 0x16D
cmpl $0x2, -0x2c(%rbp)
jb 0x15f7a
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x41e4(%rip), %rdi      # 0x1a168
movl %r15d, %esi
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbx), %rdi
movl 0x38(%rbx), %edx
movq (%rdi), %rax
movl %r15d, %esi
callq *0x90(%rax)
jmp 0x15aed
movl $0x1, %ecx
movl %ecx, 0x38(%rbx)
movl %ecx, %eax
leaq 0x40c2(%rip), %rdi      # 0x1a079
jmp 0x15a9d
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x15aed
movl $0x1, %r15d
movq (%r14,%r15,8), %rdi
callq 0x2270
movq 0x28(%rbx), %rdi
movq (%rdi), %rcx
movl %eax, %esi
callq *0x20(%rcx)
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x15ffc
movq 0x28(%rbx), %rdi
movq (%rdi), %rcx
movq %rax, %rsi
callq *0x10(%rcx)
incq %r15
movl -0x2c(%rbp), %eax
cmpq %rax, %r15
jb 0x15fd1
jmp 0x15aed