// File: tenup-coin[P]seeder/bitcoin.cpp
// Function: CNode::ProcessMessages()
bool ProcessMessages() {
    if (vRecv.empty()) return false;
    do {
      CDataStream::iterator pstart = search(vRecv.begin(), vRecv.end(), BEGIN(pchMessageStart), END(pchMessageStart));
      int nHeaderSize = vRecv.GetSerializeSize(CMessageHeader());
      if (vRecv.end() - pstart < nHeaderSize) {
        if (vRecv.size() > nHeaderSize) {
          vRecv.erase(vRecv.begin(), vRecv.end() - nHeaderSize);
        }
        break;
      }
      vRecv.erase(vRecv.begin(), pstart);
      vector<char> vHeaderSave(vRecv.begin(), vRecv.begin() + nHeaderSize);
      CMessageHeader hdr;
      vRecv >> hdr;
      if (!hdr.IsValid()) { 
         //printf("%s: BAD (invalid header)\n", ToString(you).c_str());
        ban = 100000; return true;
      }
      string strCommand = hdr.GetCommand();
      unsigned int nMessageSize = hdr.nMessageSize;
      if (nMessageSize > MAX_SIZE) { 
         //printf("%s: BAD (message too large)\n", ToString(you).c_str());
        ban = 100000;
        return true; 
      }
      if (nMessageSize > vRecv.size()) {
        vRecv.insert(vRecv.begin(), vHeaderSave.begin(), vHeaderSave.end());
        break;
      }
      if (vRecv.GetVersion() >= 209) {
        uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize);
        unsigned int nChecksum = 0;
        memcpy(&nChecksum, &hash, sizeof(nChecksum));
        if (nChecksum != hdr.nChecksum) continue;
      }
      CDataStream vMsg(vRecv.begin(), vRecv.begin() + nMessageSize, vRecv.nType, vRecv.nVersion);
      vRecv.ignore(nMessageSize);
      if (ProcessMessage(strCommand, vMsg))
        return true;
      //printf("%s: done processing %s\n", ToString(you).c_str(), strCommand.c_str());
    } while(1);
    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
addq $0x30, %rdi
callq 0xa300
testb $0x1, %al
jne 0x7999
jmp 0x79a2
movb $0x0, -0x1(%rbp)
jmp 0x7fee
jmp 0x79a4
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
callq 0xa1f0
movq -0x1f0(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x30, %rdi
callq 0xa230
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq 0x42ad5(%rip), %rdx     # 0x4a4b0
movq %rdx, %rcx
addq $0x4, %rcx
callq 0xb0b0
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
movq %rcx, -0x18(%rbp)
addq $0x30, %rax
movq %rax, -0x1f8(%rbp)
leaq -0x44(%rbp), %rdi
callq 0x18590
movq -0x1f8(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0xb110
movq -0x1f0(%rbp), %rdi
movl %eax, -0x2c(%rbp)
addq $0x30, %rdi
callq 0xa230
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x8e70
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x7ac3
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
callq 0x78d0
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x7abe
movq -0x1f0(%rbp), %rdi
movq %rdi, %rax
addq $0x30, %rax
movq %rax, -0x200(%rbp)
addq $0x30, %rdi
callq 0xa1f0
movq -0x1f0(%rbp), %rdi
movq %rax, -0x58(%rbp)
addq $0x30, %rdi
callq 0xa230
movq %rax, -0x68(%rbp)
movslq -0x2c(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0xb140
movq -0x200(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0xa330
movq %rax, -0x70(%rbp)
jmp 0x7fc2
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x210(%rbp)
callq 0xa1f0
movq -0x210(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xa330
movq -0x210(%rbp), %rdi
movq %rax, -0x88(%rbp)
callq 0xa1f0
movq -0x210(%rbp), %rdi
movq %rax, -0xa8(%rbp)
callq 0xa1f0
movq %rax, -0xb8(%rbp)
movslq -0x2c(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x88b0
movq %rax, -0xb0(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x4800
movq -0x208(%rbp), %rcx
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0xb180
jmp 0x7b74
leaq -0xb9(%rbp), %rdi
callq 0x4520
leaq -0xe4(%rbp), %rdi
callq 0x18590
jmp 0x7b8e
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
leaq -0xe4(%rbp), %rsi
callq 0xb200
jmp 0x7ba7
leaq -0xe4(%rbp), %rdi
callq 0x18740
movb %al, -0x211(%rbp)
jmp 0x7bbb
movb -0x211(%rbp), %al
testb $0x1, %al
jne 0x7c25
jmp 0x7bc7
movq -0x1f0(%rbp), %rax
movl $0x186a0, 0x98(%rax)    # imm = 0x186A0
movb $0x1, -0x1(%rbp)
movl $0x1, -0xe8(%rbp)
jmp 0x7f84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0xb9(%rbp), %rdi
callq 0x4520
jmp 0x7ffc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x7fe0
leaq -0x108(%rbp), %rdi
leaq -0xe4(%rbp), %rsi
callq 0x18630
jmp 0x7c3a
movl -0xd4(%rbp), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x2000000, -0x10c(%rbp) # imm = 0x2000000
jbe 0x7c76
movq -0x1f0(%rbp), %rax
movl $0x186a0, 0x98(%rax)    # imm = 0x186A0
movb $0x1, -0x1(%rbp)
movl $0x1, -0xe8(%rbp)
jmp 0x7f78
movq -0x1f0(%rbp), %rdi
movl -0x10c(%rbp), %eax
movq %rax, -0x220(%rbp)
addq $0x30, %rdi
callq 0x78d0
movq %rax, %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
jbe 0x7d60
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x228(%rbp)
callq 0xa1f0
movq %rax, -0x118(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0xb360
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xb390
movq -0x230(%rbp), %rdi
callq 0xb3d0
movq %rax, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xb390
movq -0x228(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdx
movq -0x130(%rbp), %rcx
callq 0xb240
jmp 0x7d3a
movl $0x2, -0xe8(%rbp)
jmp 0x7f78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x7fd4
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
callq 0xa130
cmpl $0xd1, %eax
jl 0x7e18
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x238(%rbp)
callq 0xa1f0
movq -0x238(%rbp), %rdi
movq %rax, -0x160(%rbp)
callq 0xa1f0
movq %rax, -0x170(%rbp)
movl -0x10c(%rbp), %eax
movl %eax, %esi
leaq -0x170(%rbp), %rdi
callq 0x88b0
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rsi
movq -0x168(%rbp), %rdx
leaq -0x158(%rbp), %rdi
callq 0xa150
jmp 0x7de3
movl $0x0, -0x174(%rbp)
movl -0x158(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0x174(%rbp), %eax
cmpl -0xd0(%rbp), %eax
je 0x7e16
movl $0x3, -0xe8(%rbp)
jmp 0x7f78
jmp 0x7e18
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x240(%rbp)
callq 0xa1f0
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x8770
movq -0x240(%rbp), %rdi
callq 0xa1f0
movq %rax, -0x1c8(%rbp)
movl -0x10c(%rbp), %eax
movl %eax, %esi
leaq -0x1c8(%rbp), %rdi
callq 0x88b0
movq %rax, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x8770
movq -0x1f0(%rbp), %rax
movl 0x50(%rax), %ecx
movl 0x54(%rax), %r8d
movq -0x1a8(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
leaq -0x1a0(%rbp), %rdi
callq 0xb400
jmp 0x7eb4
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
movl -0x10c(%rbp), %esi
callq 0xb4b0
jmp 0x7ecc
leaq -0x1e8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x4200
jmp 0x7ee1
movq -0x1f0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0xb590
movb %al, -0x241(%rbp)
jmp 0x7f03
leaq -0x1e8(%rbp), %rdi
callq 0x42f0
movb -0x241(%rbp), %al
testb $0x1, %al
jne 0x7f1b
jmp 0x7f62
movb $0x1, -0x1(%rbp)
movl $0x1, -0xe8(%rbp)
jmp 0x7f6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x7fc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x42f0
jmp 0x7fc8
movl $0x0, -0xe8(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x7120
leaq -0x108(%rbp), %rdi
callq 0x42f0
leaq -0xa0(%rbp), %rdi
callq 0xba60
movl -0xe8(%rbp), %eax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
leaq 0x2b059(%rip), %rcx     # 0x33004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x7fb6
movb $0x1, %al
testb $0x1, %al
jne 0x79a4
jmp 0x7fc2
movb $0x0, -0x1(%rbp)
jmp 0x7fee
leaq -0x1a0(%rbp), %rdi
callq 0x7120
leaq -0x108(%rbp), %rdi
callq 0x42f0
leaq -0xa0(%rbp), %rdi
callq 0xba60
jmp 0x7ffc
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0xc8(%rbp), %rdi
callq 0x47f0
nopl (%rax,%rax)