// File: /workspace/github_cpp_makefile_star2_O1/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 0x1553b
testq %rax, %rax
je 0x15afc
movq %rax, %r14
movq (%rax), %r15
leaq 0x4654(%rip), %rsi      # 0x19f05
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15ac7
leaq 0x462a(%rip), %rsi      # 0x19ef2
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15abf
leaq 0x4618(%rip), %rsi      # 0x19ef7
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15abf
leaq 0x4605(%rip), %rsi      # 0x19efb
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15abf
leaq 0x45f3(%rip), %rsi      # 0x19f00
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15c77
leaq 0x462d(%rip), %rsi      # 0x19f51
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15c89
leaq 0x461b(%rip), %rsi      # 0x19f56
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15cb0
leaq 0x462e(%rip), %rsi      # 0x19f80
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15ce1
leaq 0x461e(%rip), %rsi      # 0x19f87
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15da8
leaq 0x4610(%rip), %rsi      # 0x19f90
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15db8
leaq 0x4601(%rip), %rsi      # 0x19f98
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15de6
leaq 0x4623(%rip), %rsi      # 0x19fd1
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e18
leaq 0x4610(%rip), %rsi      # 0x19fd5
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e27
leaq 0x467a(%rip), %rsi      # 0x1a056
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15e7f
leaq 0x466e(%rip), %rsi      # 0x1a061
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15eed
leaq 0x4663(%rip), %rsi      # 0x1a06d
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15f3d
leaq 0x467e(%rip), %rsi      # 0x1a09f
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15f4f
leaq 0x46ce(%rip), %rsi      # 0x1a106
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x15fc3
leaq 0x4712(%rip), %rsi      # 0x1a161
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x1600e
leaq 0x4766(%rip), %rsi      # 0x1a1cc
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
je 0x16070
leaq 0x4756(%rip), %rsi      # 0x1a1d3
movq %r15, %rdi
callq 0x2220
testl %eax, %eax
jne 0x15afc
cmpl $0x1, -0x2c(%rbp)
jne 0x1607f
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x15afc
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 0x15afc
movl $0x3, (%rbx)
jmp 0x15afc
movl 0x14(%rbx), %esi
cmpl $0x1, (%rbx)
jne 0x15ae5
leaq 0x43a5(%rip), %rdi      # 0x19e7b
xorl %eax, %eax
callq 0x2050
movl $0x0, (%rbx)
jmp 0x15afc
movl 0x10(%rbx), %edx
leaq 0x43b4(%rip), %rdi      # 0x19ea3
xorl %eax, %eax
callq 0x2050
movl $0x1, (%rbx)
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x15bb5
cmpl $0x2, %eax
jne 0x15d93
movl 0xc(%rbx), %r14d
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
cmpl %eax, %r14d
jae 0x15c12
movq 0x28(%rbx), %rdi
movl 0xc(%rbx), %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x15d5b
cmpb $0x1, 0x6(%rbx)
jne 0x15d5b
cmpl $0x0, 0x30(%rbx)
movl 0x18(%rax), %r15d
je 0x15c96
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
callq 0x20d0
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 0x20d0
movl 0xc(%rax), %edx
movl 0x14(%rax), %ecx
movslq 0x10(%rax), %rsi
movl 0x8(%rbx), %edi
cmpl $0x2, %edi
je 0x15cf9
cmpl $0x1, %edi
je 0x15cf4
testl %edi, %edi
jne 0x15d4d
cmpl 0x1c(%rax), %r14d
jmp 0x15cfc
movq 0x28(%rbx), %rdi
movl 0x10(%rbx), %esi
leaq 0x14(%rbx), %rdx
movq (%rdi), %rax
callq *0x68(%rax)
testb %al, %al
jne 0x15d93
movb $0x1, 0x5(%rbx)
movl $0x0, (%rbx)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movl %eax, 0x14(%rbx)
leaq 0x4642(%rip), %rdi      # 0x1a22e
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
leaq 0x497b(%rip), %rdi      # 0x1a577
callq 0x2260
leaq 0x49b0(%rip), %rdi      # 0x1a5b8
callq 0x2260
jmp 0x15d93
leaq 0x4a38(%rip), %rdi      # 0x1a651
callq 0x2260
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpb $0x1, 0x6(%rbx)
jne 0x15c6b
leaq 0x4a4f(%rip), %rdi      # 0x1a684
callq 0x2260
movq 0x28(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x9539(%rip), %edx      # 0x1f180
movzbl 0x4(%rbx), %ecx
movq (%rdi), %rax
callq *0x38(%rax)
leaq 0x4a49(%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 0x15d93
cmpb $0x1, 0x5(%rbx)
jne 0x15ca3
movl 0x14(%rbx), %esi
leaq 0x4283(%rip), %rdi      # 0x19f0a
jmp 0x15cd5
movq %rbx, %rdi
callq 0x16104
jmp 0x15afc
movl %r15d, 0x30(%rbx)
movl %r15d, 0x34(%rbx)
jmp 0x15d4d
movq %rbx, %rdi
callq 0x16218
jmp 0x15afc
cmpl $0x2, -0x2c(%rbp)
jb 0x15afc
movq 0x8(%r14), %rdi
callq 0x2270
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x10(%rbx)
leaq 0x428e(%rip), %rdi      # 0x19f61
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
jmp 0x15afc
movl $0x0, 0x8(%rbx)
leaq 0x481b(%rip), %rdi      # 0x1a50a
jmp 0x15dc6
cmpl %esi, %r13d
jmp 0x15cfc
cmpl %ecx, %r12d
setne %al
testb %al, %al
je 0x15d4d
leaq 0x9056(%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 0x44b2(%rip), %rdi      # 0x1a1d9
movl -0x30(%rbp), %r9d
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbx), %rdi
movl 0x30(%rbx), %esi
movl 0x9441(%rip), %edx      # 0x1f180
movzbl 0x4(%rbx), %ecx
movq (%rdi), %rax
callq *0x38(%rax)
movl %r15d, 0x30(%rbx)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
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 0x15d93
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x4484(%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
movl $0x1, 0x8(%rbx)
leaq 0x4724(%rip), %rdi      # 0x1a4da
jmp 0x15dc6
movl $0x2, 0x8(%rbx)
leaq 0x46e4(%rip), %rdi      # 0x1a4aa
callq 0x2260
cmpb $0x0, 0x6(%rbx)
jne 0x15afc
leaq 0x475e(%rip), %rdi      # 0x1a53a
callq 0x2260
jmp 0x15afc
movb 0x4(%rbx), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x4(%rbx)
leaq 0x41d3(%rip), %rcx      # 0x19fcb
leaq 0x41c7(%rip), %rsi      # 0x19fc6
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x419d(%rip), %rdi      # 0x19fa9
xorl %eax, %eax
callq 0x2050
jmp 0x15afc
cmpl $0x1, -0x2c(%rbp)
jne 0x15e51
leaq 0x465e(%rip), %rdi      # 0x1a483
jmp 0x15ddc
cmpl $0x2, (%rbx)
jne 0x15e9e
movl 0xc(%rbx), %r14d
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x419d(%rip), %rdi      # 0x19fdd
movl %r14d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2050
jmp 0x15add
cmpl $0x2, -0x2c(%rbp)
jb 0x15afc
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 0x15e61
jmp 0x15afc
movb 0x6(%rbx), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x6(%rbx)
testb %al, %al
je 0x15f25
leaq 0x454f(%rip), %rdi      # 0x1a3e8
jmp 0x15ddc
cmpb $0x0, 0x5(%rbx)
jne 0x15eac
movq %rbx, %rdi
callq 0x16218
movl $0x0, 0xc(%rbx)
movl $0x2, (%rbx)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
leaq 0x40fd(%rip), %rcx      # 0x19fc6
leaq 0x40fb(%rip), %rdx      # 0x19fcb
cmpb $0x0, 0x6(%rbx)
cmovneq %rcx, %rdx
leaq 0x4139(%rip), %rdi      # 0x1a018
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
jmp 0x15afc
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x15f04
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x4493(%rip), %rdi      # 0x1a39e
callq 0x2260
leaq 0x2c9a(%rip), %rdi      # 0x18bb1
callq 0x11dd8
movq %rax, 0x40(%rbx)
jmp 0x15afc
leaq 0x44ea(%rip), %rdi      # 0x1a416
callq 0x2260
leaq 0x4508(%rip), %rdi      # 0x1a440
jmp 0x15ddc
cmpl $0x1, -0x2c(%rbp)
jne 0x15f9a
leaq 0x4421(%rip), %rdi      # 0x1a36b
jmp 0x15ddc
movl $0x64, %r15d
cmpl $0x2, -0x2c(%rbp)
jb 0x15f6e
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x4133(%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 0x15afc
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, 0x38(%rbx)
testl %eax, %eax
je 0x16059
movl $0xf4240, %ecx          # imm = 0xF4240
cmpl $0xf4241, %eax          # imm = 0xF4241
jae 0x1605e
jmp 0x16061
movl $0x64, %r15d
cmpl $0x2, -0x2c(%rbp)
jb 0x15fe2
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x4121(%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 0x15afc
movl $0x16d, %r15d           # imm = 0x16D
cmpl $0x2, -0x2c(%rbp)
jb 0x1602d
movq 0x8(%r14), %rdi
callq 0x2270
movl %eax, %r15d
cmpl $0x1, %eax
adcl $0x0, %r15d
movl 0x38(%rbx), %edx
leaq 0x4131(%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 0x15afc
movl $0x1, %ecx
movl %ecx, 0x38(%rbx)
movl 0x38(%rbx), %esi
leaq 0x400e(%rip), %rdi      # 0x1a079
jmp 0x15cd5
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x15afc
cmpl $0x2, -0x2c(%rbp)
jb 0x15afc
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 0x160ba
movq 0x28(%rbx), %rdi
movq (%rdi), %rcx
movq %rax, %rsi
callq *0x10(%rcx)
incq %r15
movl -0x2c(%rbp), %eax
cmpq %rax, %r15
jb 0x1608f
jmp 0x15afc