LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BitcoinTransactionFactory::getBlock(unsigned int, unsigned int&) const
Transaction * getBlock(uint32_t index,uint32_t &tcount) const
	{
		Transaction *ret = NULL;
		assert( index < mBlockCount );
		if ( index < mBlockCount )
		{
			ret = mBlocks[index];
			if ( (index+1) == mBlockCount )
			{
				tcount = (uint32_t)(&mTransactions[mTransactionCount] - ret);
			}
			else
			{
				tcount = (uint32_t)(mBlocks[index+1] - ret);
			}
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x2000038(%rcx), %eax
jae 0x1f670
jmp 0x1f68f
leaq 0x124cb(%rip), %rdi     # 0x31b42
leaq 0x115d2(%rip), %rsi     # 0x30c50
movl $0xb9a, %edx            # imm = 0xB9A
leaq 0x124cc(%rip), %rcx     # 0x31b56
callq 0x20c0
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x2000038(%rcx), %eax
jae 0x1f71b
movq -0x28(%rbp), %rcx
movq 0x2000040(%rcx), %rax
movl -0xc(%rbp), %edx
movq (%rax,%rdx,8), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
cmpl 0x2000038(%rcx), %eax
jne 0x1f6ef
movq -0x28(%rbp), %rcx
movq 0x2000020(%rcx), %rax
movl 0x2000010(%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1f719
movq -0x28(%rbp), %rax
movq 0x2000040(%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1f71b
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BitcoinAddress::getDaysSinceLastUsed() const
uint32_t getDaysSinceLastUsed(void) const
	{
		time_t currentTime;
		time(&currentTime); // get the current time.
		uint32_t lastUsed = mLastInputTime; // the last time we sent money (not received because anyone can send us money).
		if ( mLastInputTime == 0 ) // if it has never had a spend.. then we use the time of first receive..
		{
			lastUsed = mFirstOutputTime;
		}
		double seconds = difftime(currentTime,time_t(lastUsed));
		double minutes = seconds/60;
		double hours = minutes/60;
		uint32_t days = (uint32_t) (hours/24);
		return days;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2120
movq -0x40(%rbp), %rax
movl 0x14(%rax), %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x0, 0x14(%rax)
jne 0x21b47
movq -0x40(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x20a0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0xf0d9(%rip), %xmm1     # 0x30c40
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0xf0bd(%rip), %xmm1     # 0x30c48
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: SortByAge::compare(void**, void**)
virtual int32_t compare(void **p1,void **p2) 
	{
		BitcoinAddress **ba1 = (BitcoinAddress **)p1;
		BitcoinAddress **ba2 = (BitcoinAddress **)p2;
		BitcoinAddress *a1 = *ba1;
		BitcoinAddress *a2 = *ba2;
		uint32_t age1 = a1->getDaysSinceLastUsed();
		uint32_t age2 = a2->getDaysSinceLastUsed();
		if ( age1 == age2 ) return 0;
		return age1 > age2 ? -1 : 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x21b10
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rdi
callq 0x21b10
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x21c93
movl $0x0, -0x4(%rbp)
jmp 0x21cab
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %esi
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %esi, %edx
cmoval %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BitcoinTransactionFactory::printAddress(char const*)
void printAddress(const char *adr)
	{
		BitcoinAddress ba;
		uint8_t output[25];
		if ( BLOCKCHAIN_BITCOIN_ADDRESS::bitcoinAsciiToAddress(adr,output) )
		{
			memcpy(&ba.mWord0,&output[1],20);
			BitcoinAddress *found = mAddresses.find(ba);
			if ( found )
			{
				printAddress(found);
			}
			else
			{
				printf("Failed to locate address: %s\r\n", adr );
			}
		}
		else
		{
			printf("Failed to decode address: %s\r\n", adr );
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1d2f0
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x19660
testb $0x1, %al
jne 0x229ea
jmp 0x22a4a
movq -0x90(%rbp), %rdi
movq -0x7f(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x77(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x6f(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x1cf50
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x22a36
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x1ed70
jmp 0x22a48
movq -0x10(%rbp), %rsi
leaq 0xfdf6(%rip), %rdi      # 0x32837
movb $0x0, %al
callq 0x2050
jmp 0x22a5c
movq -0x10(%rbp), %rsi
leaq 0xfe01(%rip), %rdi      # 0x32856
movb $0x0, %al
callq 0x2050
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::processBlockData(void const*, unsigned int, unsigned int&)
bool processBlockData(const void *blockData,uint32_t blockLength,uint32_t &transactionIndex)
	{
		bool ret = true;
		mBlockData = (const uint8_t *)blockData;
		mBlockRead = mBlockData;	// Set the block-read scan pointer.
		mBlockEnd = &mBlockData[blockLength]; // Mark the end of block pointer
		blockFormatVersion = readU32();	// Read the format version
		previousBlockHash = readHash();  // get the address of the hash
		merkleRoot = readHash();	// Get the address of the merkle root hash
		timeStamp = readU32();	// Get the timestamp
		bits = readU32();	// Get the bits field
		nonce = readU32();	// Get the 'nonce' random number.
		transactionCount = readVariableLengthInteger();	// Read the number of transactions
		if ( transactionCount < MAX_BLOCK_TRANSACTION )
		{
			transactions = mTransactions;	// Assign the transactions buffer pointer
			for (uint32_t i=0; i<transactionCount; i++)
			{
				gTransactionIndex = i;
				BlockChain::BlockTransaction &b = transactions[i];
				if ( !readTransation(b,transactionIndex,i) )	// Read the transaction; if it failed; then abort processing the block chain
				{
					ret = false;
					break;
				}
			}
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movb $0x1, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x90(%rdi)
movq 0x90(%rdi), %rax
movq %rax, 0x80(%rdi)
movq 0x90(%rdi), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, 0x88(%rdi)
callq 0x23650
movq -0x38(%rbp), %rdi
movl %eax, 0x4(%rdi)
callq 0x236d0
movq -0x38(%rbp), %rdi
movq %rax, 0x8(%rdi)
callq 0x236d0
movq -0x38(%rbp), %rdi
movq %rax, 0x10(%rdi)
callq 0x23650
movq -0x38(%rbp), %rdi
movl %eax, 0x18(%rdi)
callq 0x23650
movq -0x38(%rbp), %rdi
movl %eax, 0x1c(%rdi)
callq 0x23650
movq -0x38(%rbp), %rdi
movl %eax, 0x20(%rdi)
callq 0x23750
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
cmpl $0x2000, 0x24(%rax)     # imm = 0x2000
jae 0x2343e
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x98, %rcx
movq %rcx, 0x28(%rax)
movl $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x24(%rcx), %eax
jae 0x2343c
movq -0x38(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, 0x163e5(%rip)     # 0x397e8
movq 0x28(%rdi), %rax
movl -0x28(%rbp), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
callq 0x237f0
testb $0x1, %al
jne 0x2342f
movb $0x0, -0x21(%rbp)
jmp 0x2343c
jmp 0x23431
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x233ea
jmp 0x2343e
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readU32()
inline uint32_t readU32(void)
	{
		assert( (mBlockRead+sizeof(uint32_t)) <= mBlockEnd );
		uint32_t ret = *(uint32_t *)mBlockRead;
		mBlockRead+=sizeof(uint32_t);
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x80(%rcx), %rax
addq $0x4, %rax
cmpq 0x88(%rcx), %rax
ja 0x2367a
jmp 0x23699
leaq 0xf424(%rip), %rdi      # 0x32aa5
leaq 0xd5c8(%rip), %rsi      # 0x30c50
movl $0x7ee, %edx            # imm = 0x7EE
leaq 0xf43c(%rip), %rcx      # 0x32ad0
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0xc(%rbp)
movq 0x80(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x80(%rax)
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readHash()
inline const uint8_t *readHash(void)
	{
		const uint8_t *ret = mBlockRead;
		assert( (mBlockRead+32) <= mBlockEnd );
		mBlockRead+=32;
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x80(%rcx), %rax
movq %rax, -0x10(%rbp)
movq 0x80(%rcx), %rax
addq $0x20, %rax
cmpq 0x88(%rcx), %rax
ja 0x23705
jmp 0x23724
leaq 0xf3e2(%rip), %rdi      # 0x32aee
leaq 0xd53d(%rip), %rsi      # 0x30c50
movl $0x801, %edx            # imm = 0x801
leaq 0xf3ec(%rip), %rcx      # 0x32b0b
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readVariableLengthInteger()
inline uint32_t readVariableLengthInteger(void)
	{
		uint32_t ret = 0;

		uint8_t v = readU8();
		if ( v < 0xFD ) // If it's less than 0xFD use this value as the unsigned integer
		{
			ret = (uint32_t)v;
		}
		else
		{
			uint16_t v = readU16();
			if ( v < 0xFFFF )
			{
				ret = (uint32_t)v;
			}
			else
			{
				uint32_t v = readU32();
				if ( v < 0xFFFFFFFF )
				{
					ret = (uint32_t)v;
				}
				else
				{
					assert(0); // never expect to actually encounter a 64bit integer in the block-chain stream; it's outside of any reasonable expected value
					uint64_t v = readU64();
					ret = (uint32_t)v;
				}
			}
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
callq 0x23b20
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
cmpl $0xfd, %eax
jge 0x23787
movzbl -0xd(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x237e5
movq -0x28(%rbp), %rdi
callq 0x23ba0
movw %ax, -0x10(%rbp)
movzwl -0x10(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jge 0x237a8
movzwl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x237e3
movq -0x28(%rbp), %rdi
callq 0x23650
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jae 0x237c2
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x237e1
leaq 0xdae8(%rip), %rdi      # 0x312b1
leaq 0xd480(%rip), %rsi      # 0x30c50
movl $0x821, %edx            # imm = 0x821
leaq 0xf354(%rip), %rcx      # 0x32b30
callq 0x20c0
jmp 0x237e3
jmp 0x237e5
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readU8()
inline uint8_t readU8(void)
	{
		assert( (mBlockRead+sizeof(uint8_t)) <= mBlockEnd );
		uint8_t ret = *(uint8_t *)mBlockRead;
		mBlockRead+=sizeof(uint8_t);
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x80(%rcx), %rax
addq $0x1, %rax
cmpq 0x88(%rcx), %rax
ja 0x23b4a
jmp 0x23b69
leaq 0xf00f(%rip), %rdi      # 0x32b60
leaq 0xd0f8(%rip), %rsi      # 0x30c50
movl $0x7dc, %edx            # imm = 0x7DC
leaq 0xf026(%rip), %rcx      # 0x32b8a
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
movb (%rcx), %cl
movb %cl, -0x9(%rbp)
movq 0x80(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x80(%rax)
movb -0x9(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readU16()
inline uint16_t readU16(void)
	{
		assert( (mBlockRead+sizeof(uint16_t)) <= mBlockEnd );
		uint16_t ret = *(uint16_t *)mBlockRead;
		mBlockRead+=sizeof(uint16_t);
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x80(%rcx), %rax
addq $0x2, %rax
cmpq 0x88(%rcx), %rax
ja 0x23bca
jmp 0x23be9
leaq 0xefd5(%rip), %rdi      # 0x32ba6
leaq 0xd078(%rip), %rsi      # 0x30c50
movl $0x7e5, %edx            # imm = 0x7E5
leaq 0xefed(%rip), %rcx      # 0x32bd1
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
movw (%rcx), %cx
movw %cx, -0xa(%rbp)
movq 0x80(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x80(%rax)
movw -0xa(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readInput(BlockChain::BlockInput&)
bool readInput(BlockChain::BlockInput &input)
	{
		bool ret = true;

		input.transactionHash = readHash();	// read the transaction hash
		input.transactionIndex = readU32();	// read the transaction index
		input.responseScriptLength = readVariableLengthInteger();	// read the length of the script
		assert( input.responseScriptLength < MAX_REASONABLE_SCRIPT_LENGTH );
		if ( input.responseScriptLength < MAX_REASONABLE_SCRIPT_LENGTH )
		{
			input.responseScript = input.responseScriptLength ? getReadBufferAdvance(input.responseScriptLength) : NULL;	// get the script buffer pointer; and advance the read location
			input.sequenceNumber = readU32();
		}
		else
		{
			ret = false;
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movb $0x1, -0x11(%rbp)
callq 0x236d0
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
callq 0x23650
movq -0x20(%rbp), %rdi
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
callq 0x23750
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x2000, 0xc(%rax)      # imm = 0x2000
jae 0x23c7e
jmp 0x23c9d
leaq 0xf0c3(%rip), %rdi      # 0x32d48
leaq 0xcfc4(%rip), %rsi      # 0x30c50
movl $0x83b, %edx            # imm = 0x83B
leaq 0xf0ea(%rip), %rcx      # 0x32d82
callq 0x20c0
movq -0x10(%rbp), %rax
cmpl $0x2000, 0xc(%rax)      # imm = 0x2000
jae 0x23cf2
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x23cca
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x24120
movq %rax, -0x28(%rbp)
jmp 0x23cd2
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x23cd2
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
callq 0x23650
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x23cf6
movb $0x0, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::getReadBufferAdvance(unsigned int)
inline const uint8_t * getReadBufferAdvance(uint32_t readLength)
	{
		const uint8_t *ret = mBlockRead;
		mBlockRead+=readLength;
		assert( mBlockRead <= mBlockEnd );
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %edx
movq 0x80(%rcx), %rax
movl %edx, %edx
addq %rdx, %rax
movq %rax, 0x80(%rcx)
movq 0x80(%rcx), %rax
cmpq 0x88(%rcx), %rax
ja 0x24166
jmp 0x24185
leaq 0xec49(%rip), %rdi      # 0x32db6
leaq 0xcadc(%rip), %rsi      # 0x30c50
movl $0x82f, %edx            # imm = 0x82F
leaq 0xec4e(%rip), %rcx      # 0x32dce
callq 0x20c0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::readU64()
inline uint64_t readU64(void)
	{
		assert( (mBlockRead+sizeof(uint64_t)) <= mBlockEnd );
		uint64_t ret = *(uint64_t *)mBlockRead;
		mBlockRead+=sizeof(uint64_t);
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x80(%rcx), %rax
addq $0x8, %rax
cmpq 0x88(%rcx), %rax
ja 0x241ba
jmp 0x241d9
leaq 0xedc9(%rip), %rdi      # 0x32f8a
leaq 0xca88(%rip), %rsi      # 0x30c50
movl $0x7f7, %edx            # imm = 0x7F7
leaq 0xede1(%rip), %rcx      # 0x32fb5
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rcx
movq (%rcx), %rcx
movq %rcx, -0x10(%rbp)
movq 0x80(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jeffchan[P]blockchain-parser/BlockChain.cpp
// Function: BlockImpl::processTransactionData(void const*, unsigned int)
const BlockChain::BlockTransaction *processTransactionData(const void *transactionData,uint32_t transactionLength)
	{
		uint32_t transactionIndex=0;
		BlockChain::BlockTransaction *ret = &mTransactions[0];
		mBlockData = (const uint8_t *)transactionData;
		mBlockRead = mBlockData;	// Set the block-read scan pointer.
		mBlockEnd = &mBlockData[transactionLength]; // Mark the end of block pointer
		if ( !readTransation(*ret,transactionIndex,0) )	// Read the transaction; if it failed; then abort processing the block chain
		{
			ret = NULL;
		}
		return ret;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x0, -0x18(%rbp)
movq %rdi, %rax
addq $0x98, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x90(%rdi)
movq 0x90(%rdi), %rax
movq %rax, 0x80(%rdi)
movq 0x90(%rdi), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, 0x88(%rdi)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x237f0
testb $0x1, %al
jne 0x24483
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jeffchan[P]blockchain-parser/BlockChainAddresses.cpp
// Function: BlockChainAddressesImpl::Row::Row()
Row(void)
		{
			mStartTime = 0;
			mAddressCount = 0;
			mChangeAddressCount = 0;
			mDeleteAddressCount = 0;
			mNewAddresses = NULL;
			mChangedAddresses = NULL;
			mDeletedAddresses = NULL;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, 0x4(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0xc(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: jeffchan[P]blockchain-parser/keyboard.cpp
// Function: kbhit()
static int kbhit(void)
{
	struct timeval timeout;
	fd_set read_handles;
	int status;

	raw();
/* check stdin (fd 0) for activity */
	FD_ZERO(&read_handles);
	FD_SET(0, &read_handles);
	timeout.tv_sec = timeout.tv_usec = 0;
	status = select(0 + 1, &read_handles, NULL, NULL, &timeout);
	if(status < 0)
	{
		printf("select() failed in kbhit()\n");
		exit(1);
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
callq 0x2ea70
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpq $0x10, %rax
jae 0x2e71a
movq -0xa0(%rbp), %rax
movl -0x98(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x2e6e8
jmp 0x2e71c
movq -0x90(%rbp), %rax
orq $0x1, %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x1, %edi
leaq -0x90(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x10(%rbp), %r8
movq %rcx, %rdx
callq 0x2130
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
jge 0x2e781
leaq 0x4b83(%rip), %rdi      # 0x332f3
movb $0x0, %al
callq 0x2050
movl $0x1, %edi
callq 0x21b0
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
// File: jeffchan[P]blockchain-parser/keyboard.cpp
// Function: getKey()
int  getKey(void) 	  // returns a key
{
	int ret = getch();
	if ( ret == 0 )
	{
		ret = getch()+256;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x2e7c0
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x2e7b3
callq 0x2e7c0
addl $0x100, %eax            # imm = 0x100
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jeffchan[P]blockchain-parser/keyboard.cpp
// Function: getch()
static int getch(void)
{
	unsigned char temp;

	raw();
/* stdin = fd 0 */
	if(read(0, &temp, 1) != 1)
		return 0;
	return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x2ea70
xorl %edi, %edi
leaq -0x5(%rbp), %rsi
movl $0x1, %edx
callq 0x2210
cmpq $0x1, %rax
je 0x2e7ec
movl $0x0, -0x4(%rbp)
jmp 0x2e7f3
movzbl -0x5(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jeffchan[P]blockchain-parser/keyboard.cpp
// Function: raw()
static void raw(void)
{
	static char init;
/**/
	struct termios new_kbd_mode;

	if(init)
		return;
/* put keyboard (stdin, actually) in raw, unbuffered mode */
	tcgetattr(0, &g_old_kbd_mode);
	memcpy(&new_kbd_mode, &g_old_kbd_mode, sizeof(struct termios));

	//new_kbd_mode.c_lflag &= ~(ICANON | ECHO);
	new_kbd_mode.c_lflag &= ~(ICANON | ECHO);
	new_kbd_mode.c_lflag|=ECHO;

	new_kbd_mode.c_cc[VTIME] = 0;
	new_kbd_mode.c_cc[VMIN] = 1;
	tcsetattr(0, TCSANOW, &new_kbd_mode);
/* when we exit, go back to normal, "cooked" mode */
	atexit(cooked);

	init = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
cmpb $0x0, 0xb081(%rip)      # 0x39b00
je 0x2ea83
jmp 0x2eae0
xorl %edi, %edi
leaq 0xb078(%rip), %rsi      # 0x39b04
callq 0x2180
leaq -0x3c(%rbp), %rdi
leaq 0xb068(%rip), %rsi      # 0x39b04
movl $0x3c, %edx
callq 0x20f0
movl -0x30(%rbp), %eax
andl $-0xb, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x30(%rbp)
movb $0x0, -0x26(%rbp)
movb $0x1, -0x25(%rbp)
xorl %esi, %esi
leaq -0x3c(%rbp), %rdx
movl %esi, %edi
callq 0x21c0
leaq 0x1c(%rip), %rdi        # 0x2eaf0
callq 0x2fc60
movb $0x1, 0xb020(%rip)      # 0x39b00
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jeffchan[P]blockchain-parser/main.cpp
// Function: main
int main(int argc,const char **argv)
{
	const char *dataPath = ".";
	if ( argc < 2 )
	{
		printf("Using local test FILE.\r\n");
	}
	else
	{
		dataPath = argv[1];
	}

	BlockChainCommand bc(dataPath);

	while ( bc.process() );


	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1d9c(%rip), %rax      # 0x308c9
movq %rax, -0x18(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x2eb47
leaq 0x47d1(%rip), %rdi      # 0x3330f
movb $0x0, %al
callq 0x2050
jmp 0x2eb53
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x2ebc0
leaq -0x60(%rbp), %rdi
callq 0x2ecb0
movb %al, -0x6d(%rbp)
jmp 0x2eb6e
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x2eb77
jmp 0x2eb90
jmp 0x2eb60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2fa00
jmp 0x2eba9
movl $0x0, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2fa00
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x2260
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: jeffchan[P]blockchain-parser/main.cpp
// Function: BlockChainCommand::BlockChainCommand(char const*)
BlockChainCommand(const char *dataPath)
	{
		mBlockChain = createBlockChain(dataPath);	// Create the block-chain parser using this root path
		mStatResolution = SR_YEAR;
		mMaxBlock = 500000;
		printf("Welcome to the BlockChain command parser.  Written by John W. Ratcliff on January 4, 2014 : TipJar: 1BT66EoaGySkbY9J6MugvQRhMMXDwPxPya\r\n");
		printf("Registered DataDirectory: %s to scan for the blockchain.\r\n", dataPath );
		printf("\r\n");
		mProcessTransactions = false;
		mProcessBlock = 0;
		mLastBlockScan = 0;
		mLastBlockPrint = 0;
		mFinishedScanning = false;
		mCurrentBlock = NULL;
		mLastTime = 0;
		mSatoshiTime = 0;
		mMinBalance = 1;
		mRecordAddresses = false;
		mAddresses = NULL;
		mMode = CM_NONE;

		if ( mBlockChain )
		{
			help();
		}
		else
		{
			printf("Failed to open file: blk00000.dat in directory: %s\r\n", dataPath );
			mMode = CM_EXIT;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19b80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movl $0x2, 0x8(%rax)
movl $0x7a120, 0x10(%rax)    # imm = 0x7A120
leaq 0x4727(%rip), %rdi      # 0x33328
movb $0x0, %al
callq 0x2050
movq -0x10(%rbp), %rsi
leaq 0x479e(%rip), %rdi      # 0x333b1
movb $0x0, %al
callq 0x2050
leaq 0x27fb(%rip), %rdi      # 0x3141c
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rax
movb $0x0, 0x6(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x14(%rax)
movl $0x0, 0x18(%rax)
movb $0x0, 0x5(%rax)
movq $0x0, 0x20(%rax)
movl $0x0, 0x30(%rax)
movl $0x0, 0x34(%rax)
movl $0x1, 0x38(%rax)
movb $0x0, 0x4(%rax)
movq $0x0, 0x40(%rax)
movl $0x0, (%rax)
cmpq $0x0, 0x28(%rax)
je 0x2ec8a
movq -0x18(%rbp), %rdi
callq 0x2fa70
jmp 0x2eca6
movq -0x10(%rbp), %rsi
leaq 0x4757(%rip), %rdi      # 0x333ec
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jeffchan[P]blockchain-parser/main.cpp
// Function: BlockChainCommand::~BlockChainCommand()
~BlockChainCommand(void)
	{
		if ( mAddresses )
		{
			mAddresses->release();
		}
		if ( mBlockChain )
		{
			mBlockChain->release();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x40(%rax)
je 0x2fa30
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x2fa2e
jmp 0x2fa30
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2fa53
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
movq 0x98(%rax), %rax
callq *%rax
jmp 0x2fa51
jmp 0x2fa53
addq $0x10, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xef70
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: jeffchan[P]blockchain-parser/main.cpp
// Function: BlockChainCommand::stopScanning()
void stopScanning(void)
	{
		mFinishedScanning = true;
		mMode = CM_NONE; // done scanning.
		mLastBlockScan = mBlockChain->buildBlockChain();
		mCurrentBlock = mBlockChain->readBlock(0);
		printf("Stopped scanning block headers early. Built block-chain with %d blocks found..\r\n", mLastBlockScan);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x1, 0x5(%rax)
movl $0x0, (%rax)
movq 0x28(%rax), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq 0x28(%rax), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x20(%rax)
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl 0x14(%rax), %esi
leaq 0x4612(%rip), %rdi      # 0x34224
movb $0x0, %al
callq 0x2050
addq $0x10, %rsp
popq %rbp
retq
nop
// File: iZhangHui[P]CppPrimer/CH11_AssociativeContainers/examples/unorderedWordCount.cc
// Function: main
int main()
{
	// count occurrences, but the words won't be in alphabetical order
	unordered_map<string, size_t> word_count;
	string word;
	while (cin >> word)
		++word_count[word]; // fetch and increment the counter for word

	for (const auto& w : word_count) // for each element in the map
		// print the results
		cout <<  w.first << " occurs " << w.second
			 << ((w.second > 1) ? " times" : " time") << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2770
leaq -0x60(%rbp), %rdi
callq 0x2190
movq 0x7b45(%rip), %rdi      # 0x9fe0
leaq -0x60(%rbp), %rsi
callq 0x2160
movq %rax, -0x98(%rbp)
jmp 0x24ad
movq -0x98(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2150
movb %al, -0x99(%rbp)
jmp 0x24cb
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x24d7
jmp 0x2523
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2790
movq %rax, -0xa8(%rbp)
jmp 0x24ed
movq -0xa8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x2494
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x20b0
leaq -0x40(%rbp), %rdi
callq 0x28b0
jmp 0x2649
leaq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x27c0
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0x27f0
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2820
testb $0x1, %al
jne 0x2561
jmp 0x2624
leaq -0x80(%rbp), %rdi
callq 0x2850
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rsi
movq 0x7a51(%rip), %rdi      # 0x9fd0
callq 0x2100
movq %rax, -0xb0(%rbp)
jmp 0x258d
movq -0xb0(%rbp), %rdi
leaq 0x3a6d(%rip), %rsi      # 0x6008
callq 0x2110
movq %rax, -0xb8(%rbp)
jmp 0x25a9
movq -0xb8(%rbp), %rdi
movq -0x90(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x2040
movq %rax, -0xc0(%rbp)
jmp 0x25c9
movq -0xc0(%rbp), %rdi
movq -0x90(%rbp), %rax
movq 0x20(%rax), %rax
subq $0x2, %rax
leaq 0x3a2b(%rip), %rax      # 0x6011
leaq 0x3a2b(%rip), %rsi      # 0x6018
cmovaeq %rax, %rsi
callq 0x2110
movq %rax, -0xc8(%rbp)
jmp 0x25ff
movq -0xc8(%rbp), %rdi
movq 0x79b3(%rip), %rsi      # 0x9fc0
callq 0x2140
jmp 0x2614
jmp 0x2616
leaq -0x80(%rbp), %rdi
callq 0x2880
jmp 0x2548
movl $0x0, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x20b0
leaq -0x40(%rbp), %rdi
callq 0x28b0
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x21e0
nopw %cs:(%rax,%rax)
// File: qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::sql_pool()
void WebServer::sql_pool()
{
    //初始化数据库连接池
    m_connPool = connection_pool::GetInstance();
    m_connPool->init("localhost", m_user, m_passWord, m_databaseName, 3306, m_sql_num, m_close_log);

    //初始化数据库读取表
    users->initmysql_result(m_connPool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x9de0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq 0x30(%rax), %rax
movq %rax, -0xb0(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x3720
movq -0xa8(%rbp), %rdx
leaq 0x2f8f(%rip), %rsi      # 0xe465
leaq -0x28(%rbp), %rdi
callq 0x3ea0
jmp 0xb4e1
movq -0xb8(%rbp), %rsi
addq $0x38, %rsi
leaq -0x60(%rbp), %rdi
callq 0x31a0
jmp 0xb4f7
movq -0xb8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x80(%rbp), %rdi
callq 0x31a0
jmp 0xb50d
movq -0xb8(%rbp), %rsi
addq $0x78, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x31a0
jmp 0xb526
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl 0x14(%rax), %edx
movl 0x98(%rax), %ecx
movq %rsp, %rax
movl %edx, 0x8(%rax)
movl %ecx, (%rax)
leaq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq -0xa0(%rbp), %r8
movl $0xcea, %r9d            # imm = 0xCEA
callq 0x9e70
jmp 0xb565
leaq -0xa0(%rbp), %rdi
callq 0x32c0
leaq -0x80(%rbp), %rdi
callq 0x32c0
leaq -0x60(%rbp), %rdi
callq 0x32c0
leaq -0x28(%rbp), %rdi
callq 0x32c0
leaq -0x29(%rbp), %rdi
callq 0x34a0
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x30(%rax), %rsi
callq 0x49a0
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xb61d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xb614
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xb60b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xb602
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x32c0
leaq -0x80(%rbp), %rdi
callq 0x32c0
leaq -0x60(%rbp), %rdi
callq 0x32c0
leaq -0x28(%rbp), %rdi
callq 0x32c0
leaq -0x29(%rbp), %rdi
callq 0x34a0
movq -0x38(%rbp), %rdi
callq 0x3710
nop
// File: qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::adjust_timer(util_timer*)
void WebServer::adjust_timer(util_timer *timer)
{
    time_t cur = time(NULL);
    timer->expire = cur + 3 * TIMESLOT;
    utils.m_timer_lst.adjust_timer(timer);

    LOG_INFO("%s", "adjust timer once");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x3420
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
addq $0xf, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x1d588, %rdi          # imm = 0x1D588
movq -0x10(%rbp), %rsi
callq 0x43e0
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl 0x14(%rcx), %eax
jne 0xbd42
callq 0x6d90
movq %rax, %rdi
movl $0x1, %esi
leaq 0x2571(%rip), %rdx      # 0xe298
leaq 0x27a0(%rip), %rcx      # 0xe4ce
movb $0x0, %al
callq 0x92a0
callq 0x6d90
movq %rax, %rdi
callq 0x9810
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::deal_timer(util_timer*, int)
void WebServer::deal_timer(util_timer *timer, int sockfd)
{
    timer->cb_func(&users_timer[sockfd]);
    if (timer)
    {
        utils.m_timer_lst.del_timer(timer);
    }

    LOG_INFO("close fd %d", users_timer[sockfd].sockfd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x1d580(%rcx), %rdi
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rdi
callq *%rax
cmpq $0x0, -0x10(%rbp)
je 0xbda2
movq -0x20(%rbp), %rdi
addq $0x1d588, %rdi          # imm = 0x1D588
movq -0x10(%rbp), %rsi
callq 0x44b0
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl 0x14(%rcx), %eax
jne 0xbdee
callq 0x6d90
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x1d580(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movl $0x1, %esi
leaq 0x2706(%rip), %rdx      # 0xe4e0
movb $0x0, %al
callq 0x92a0
callq 0x6d90
movq %rax, %rdi
callq 0x9810
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: TNanukem[P]chip8-emulator/chip8.cpp
// Function: chip8::initialize()
void chip8::initialize(){

	// Clears the memory of the system
	for(int i = 0; i < 4096; i++){
		memory[i] = 0;
	}

	// Clears all registers and the stack
	for(int i = 0; i < 16; i++){
		v[i] = 0;
		stack[i] = 0;
        keyboard[i] = 0;
	}

	// Clears the display
	for(int i = 0; i < 2048; i++){
		display[i] = 0;
	}

	// Uploads the fontset to the Memory
	for(int i = 0; i < 80; i++){
		memory[i] = chip8_fontset[i];
	}

	opcode = 0;
	pc = 0x200;
	sp = 0;
	I = 0;

	soundTimer = 0;
	delayTimer = 0;

	drawFlag = 1;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x1000, -0xc(%rbp)     # imm = 0x1000
jge 0x2678
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb $0x0, 0x2(%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2657
movl $0x0, -0x10(%rbp)
cmpl $0x10, -0x10(%rbp)
jge 0x26ba
movq -0x20(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb $0x0, 0x1002(%rax,%rcx)
movslq -0x10(%rbp), %rcx
movw $0x0, 0x301a(%rax,%rcx,2)
movslq -0x10(%rbp), %rcx
movb $0x0, 0x303c(%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x267f
movl $0x0, -0x14(%rbp)
cmpl $0x800, -0x14(%rbp)     # imm = 0x800
jge 0x26e8
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl $0x0, 0x1018(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x26c1
movl $0x0, -0x18(%rbp)
cmpl $0x50, -0x18(%rbp)
jge 0x271a
movq -0x20(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0x6b4c(%rip), %rcx      # 0x9250
movb (%rcx,%rdx), %dl
movslq -0x18(%rbp), %rcx
movb %dl, 0x2(%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x26ef
movq -0x20(%rbp), %rax
movw $0x0, (%rax)
movw $0x200, 0x1014(%rax)    # imm = 0x200
movw $0x0, 0x303a(%rax)
movw $0x0, 0x1012(%rax)
movb $0x0, 0x3019(%rax)
movb $0x0, 0x3018(%rax)
movb $0x1, 0x304c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: TNanukem[P]chip8-emulator/chip8.cpp
// Function: chip8::loadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool chip8::loadGame(std::string game){
    //printf("Loading the game....\n");
	FILE *gameP = fopen(game.c_str(), "rb");
	if(gameP == NULL){
        //printf("ERROR! Game file not found!\n");
		return false;
	}

	// Finds the size of the game
	fseek(gameP, 0, SEEK_END);
	long int gameSize = ftell(gameP);
	fseek(gameP, 0, SEEK_SET);

	// Reads the data from the game into the buffer
	char *buffer = (char*) malloc(sizeof(char)*gameSize);
	if(buffer == NULL){
		return false;
	}
	fread(buffer, 1, gameSize, gameP);

	// Writes the data on the memory
	for(int i = 0; i < gameSize; i++){
		memory[i + 512] = buffer[i];
        //printf("Memory[%d] = %d\n", i+512,memory[i+512]);
	}

	fclose(gameP);
	free(buffer);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x2130
movq %rax, %rdi
leaq 0x38ae(%rip), %rsi      # 0x6040
callq 0x22e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x27ab
movb $0x0, -0x1(%rbp)
jmp 0x285e
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x22b0
movq -0x20(%rbp), %rdi
callq 0x2030
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x22b0
movq -0x28(%rbp), %rdi
shlq $0x0, %rdi
callq 0x2340
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x27f7
movb $0x0, -0x1(%rbp)
jmp 0x285e
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x2380
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x2848
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movb (%rcx,%rdx), %dl
movl -0x34(%rbp), %ecx
addl $0x200, %ecx            # imm = 0x200
movslq %ecx, %rcx
movb %dl, 0x2(%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2814
movq -0x20(%rbp), %rdi
callq 0x2260
movq -0x30(%rbp), %rdi
callq 0x22f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayInit()
void display::displayInit(){

    if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
		printf("Error! Unable to initialize the SDL!\n");

	// Creates the screen
	screen = SDL_CreateWindow("CHIP-8 Emulator", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1024, 512, SDL_WINDOW_SHOWN);
	if(screen == NULL)
		printf("Error! Unable to create the screen!\n");

	// Creates the render
	render = SDL_CreateRenderer(screen, -1, SDL_RENDERER_ACCELERATED);
	if(render == NULL)
		printf("Error! Unable to create the render!\n");

	SDL_SetRenderDrawColor(render, 0xFF, 0xFF, 0xFF, 0xFF);

	// Creates the Texture
	texture = SDL_CreateTexture(render, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, 64, 32);
	if(texture == NULL)
		printf("Error! Unable to create the texture!\n");

	// Delay to see possible errors
	SDL_Delay(1000);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0xf231, %edi           # imm = 0xF231
callq 0x2250
cmpl $0x0, %eax
jge 0x38a1
leaq 0x27a9(%rip), %rdi      # 0x6043
movb $0x0, %al
callq 0x2080
leaq 0x27c1(%rip), %rdi      # 0x6069
movl $0x1fff0000, %edx       # imm = 0x1FFF0000
movl $0x400, %ecx            # imm = 0x400
movl $0x200, %r8d            # imm = 0x200
movl $0x4, %r9d
movl %edx, %esi
callq 0x2090
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, (%rax)
jne 0x38e3
leaq 0x279d(%rip), %rdi      # 0x6079
movb $0x0, %al
callq 0x2080
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x2, %edx
callq 0x2060
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x8(%rax)
jne 0x3919
leaq 0x278c(%rip), %rdi      # 0x609e
movb $0x0, %al
callq 0x2080
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0xff, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x2360
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x16362004, %esi       # imm = 0x16362004
xorl %edx, %edx
movl $0x40, %ecx
movl $0x20, %r8d
callq 0x2410
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x10(%rax)
jne 0x3974
leaq 0x2756(%rip), %rdi      # 0x60c3
movb $0x0, %al
callq 0x2080
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x21f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayDraw(unsigned int*)
void display::displayDraw(uint32_t *disp){
    // Saves the display pixels on the buffer
	uint32_t pixel;
    uint32_t pixels[32*64];

    for(int i = 0; i < 2048; i++){
        pixel = disp[i];
        pixels[i] = (0x00FFFFFF * pixel) | 0xFF000000;
    }

    // Updates the screen
    SDL_UpdateTexture(texture, NULL, pixels, 64 * sizeof(uint32_t));
    SDL_RenderCopy(render, texture, NULL, NULL);
    SDL_RenderPresent(render);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2030, %rsp           # imm = 0x2030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2030(%rbp)
movl $0x0, -0x2024(%rbp)
cmpl $0x800, -0x2024(%rbp)   # imm = 0x800
jge 0x3a31
movq -0x10(%rbp), %rax
movslq -0x2024(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
imull $0xffffff, -0x14(%rbp), %ecx # imm = 0xFFFFFF
orl $0xff000000, %ecx       # imm = 0xFF000000
movslq -0x2024(%rbp), %rax
movl %ecx, -0x2020(%rbp,%rax,4)
movl -0x2024(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2024(%rbp)
jmp 0x39e8
movq -0x2030(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x2020(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
movl $0x100, %ecx            # imm = 0x100
callq 0x2200
movq -0x2030(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x22c0
movq -0x2030(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x20b0
addq $0x2030, %rsp           # imm = 0x2030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayDestroy()
void display::displayDestroy(){
    SDL_DestroyTexture(texture);
    SDL_DestroyRenderer(render);
    SDL_DestroyWindow(screen);
    SDL_Quit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x10(%rax), %rdi
callq 0x21e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2120
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
callq 0x20a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: TNanukem[P]chip8-emulator/emulator.cpp
// Function: emulator::saveGame(unsigned char, chip8*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void emulator::saveGame(uint8_t SaveStateSlot, chip8 *Chip8, std::string game){
	FILE* saveGame;

	std::string extension = std::string("_") + std::to_string(SaveStateSlot)
							+ std::string(".sav");
	game.append(extension);

	saveGame = fopen(game.c_str(),"wb");

	fwrite(Chip8, sizeof(chip8), 1, saveGame);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rcx, -0xf8(%rbp)
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x23f0
movq -0xf0(%rbp), %rdx
leaq 0x25db(%rip), %rsi      # 0x6100
leaq -0x88(%rbp), %rdi
callq 0x49b0
jmp 0x3b33
movzbl -0x9(%rbp), %esi
leaq -0xc0(%rbp), %rdi
callq 0x4a60
jmp 0x3b45
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x48e0
jmp 0x3b5e
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x23f0
movq -0x100(%rbp), %rdx
leaq 0x2583(%rip), %rsi      # 0x6102
leaq -0xe0(%rbp), %rdi
callq 0x49b0
jmp 0x3b8d
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x48e0
jmp 0x3ba3
leaq -0xe0(%rbp), %rdi
callq 0x2190
leaq -0xe1(%rbp), %rdi
callq 0x2280
leaq -0x68(%rbp), %rdi
callq 0x2190
leaq -0xc0(%rbp), %rdi
callq 0x2190
leaq -0x88(%rbp), %rdi
callq 0x2190
leaq -0x89(%rbp), %rdi
callq 0x2280
movq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2450
jmp 0x3bfa
movq -0xf8(%rbp), %rdi
callq 0x2130
movq %rax, %rdi
leaq 0x24f7(%rip), %rsi      # 0x6107
callq 0x22e0
movq %rax, -0x108(%rbp)
jmp 0x3c1e
movq -0x108(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl $0x3050, %esi           # imm = 0x3050
movl $0x1, %edx
callq 0x2440
jmp 0x3c42
leaq -0x48(%rbp), %rdi
callq 0x2190
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x3cf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x3ce6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x3cda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x3cc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x2190
leaq -0xe1(%rbp), %rdi
callq 0x2280
leaq -0x68(%rbp), %rdi
callq 0x2190
leaq -0xc0(%rbp), %rdi
callq 0x2190
leaq -0x88(%rbp), %rdi
callq 0x2190
leaq -0x89(%rbp), %rdi
callq 0x2280
jmp 0x3d1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2190
movq -0x98(%rbp), %rdi
callq 0x23e0
nopw (%rax,%rax)