// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
movq 0x30(%rdi), %rdi
movq 0x38(%r14), %rsi
movq %rsi, %rcx
subq %rdi, %rcx
movl 0x48(%r14), %eax
cmpq %rax, %rcx
je 0x560c
leaq 0x30(%r14), %rbx
addq %rax, %rdi
leaq 0x17075(%rip), %rdx     # 0x1c3b4
leaq 0x4(%rdx), %rcx
movq %rcx, (%rsp)
callq 0x6464
movq %rax, %r12
leaq 0x60(%rsp), %rdi
callq 0xa9e4
xorl %eax, %eax
cmpl $0xd1, 0x54(%r14)
setge %al
leaq 0x14(,%rax,4), %r15
movq 0x38(%r14), %rdx
movq %rdx, %rcx
subq %r12, %rcx
cmpq %r15, %rcx
jl 0x55e2
leaq 0x60(%rsp), %rbp
leaq 0xb0(%rsp), %r13
movl 0x48(%r14), %esi
addq 0x30(%r14), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x5d24
movl 0x48(%r14), %esi
addq 0x30(%r14), %rsi
addq %rsi, %r15
leaq 0x48(%rsp), %rdi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x5fc0
movq %r13, %rdi
callq 0xa9e4
movl 0x50(%r14), %edx
movl 0x54(%r14), %ecx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x65ec
movq %r13, %rdi
callq 0xaa84
testb %al, %al
je 0x541c
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0xaa3e
leaq 0x8(%rsp), %r12
movl 0xc0(%rsp), %r15d
cmpq $0x2000001, %r15        # imm = 0x2000001
jb 0x5432
movl $0x186a0, 0x98(%r14) # imm = 0x186A0
movl $0x1, %r12d
jmp 0x555d
movl $0x186a0, 0x98(%r14) # imm = 0x186A0
movl $0x1, %r12d
jmp 0x5571
movq 0x30(%r14), %rcx
movq 0x38(%r14), %rdx
movl 0x48(%r14), %esi
leaq (%rcx,%rsi), %rax
subq %rax, %rdx
cmpq %r15, %rdx
jae 0x546a
movl $0x2, %r12d
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5ffa
jmp 0x555d
movl 0x54(%r14), %r8d
cmpl $0xd1, %r8d
jl 0x54ef
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
testq %r15, %r15
leaq 0x16f43(%rip), %rcx     # 0x1c3d1
cmoveq %rcx, %rax
movq %rax, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x34d0
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movl $0x20, %esi
movq %rbp, %rdi
leaq 0x90(%rsp), %rdx
callq 0x34d0
movl 0x90(%rsp), %eax
movl $0x3, %r12d
cmpl 0xc4(%rsp), %eax
jne 0x555d
movq 0x30(%r14), %rcx
movl 0x48(%r14), %esi
movl 0x54(%r14), %r8d
leaq 0x8(%rsp), %r12
addq %rcx, %rsi
leaq (%rsi,%r15), %rdx
movl 0x50(%r14), %ecx
movq %rbp, %rdi
callq 0x6036
movq %rbx, %rdi
movl %r15d, %esi
callq 0x6084
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x706e
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x60f8
movl %eax, %r15d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5551
callq 0x33d0
movzbl %r15b, %r12d
movq %rbp, %rdi
callq 0x5042
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5571
callq 0x33d0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x5580
callq 0x33d0
movl %r12d, %eax
leaq 0xda7a(%rip), %rcx      # 0x13004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x48(%r14), %edi
movq 0x38(%r14), %rsi
addq 0x30(%r14), %rdi
leaq 0x16e0e(%rip), %rdx     # 0x1c3b4
movq (%rsp), %rcx
callq 0x6464
movq %rax, %r12
movq %rbp, %rdi
callq 0xa9e4
xorl %eax, %eax
cmpl $0xd1, 0x54(%r14)
setge %al
leaq 0x14(,%rax,4), %r15
movq 0x38(%r14), %rdx
movq %rdx, %rcx
subq %r12, %rcx
cmpq %r15, %rcx
jge 0x538e
movl 0x48(%r14), %esi
addq 0x30(%r14), %rsi
movq %rdx, %rcx
subq %rsi, %rcx
cmpq %r15, %rcx
jbe 0x560c
xorb $0x1, %al
movzbl %al, %eax
shll $0x2, %eax
orq $-0x18, %rax
addq %rax, %rdx
movq %rbx, %rdi
callq 0x5d24
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x560e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5649
callq 0x33d0
jmp 0x5649
jmp 0x5641
jmp 0x5641
movq %rax, %rbx
jmp 0x5653
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x5042
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x566e
callq 0x33d0
jmp 0x566e
jmp 0x566b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x567d
callq 0x33d0
movq %rbx, %rdi
callq 0x3650
nop