// File: /workspace/github_cpp_makefile_star2_O1/tenup-coin[P]seeder/./db.h
// Function: void CAddrDb::Serialize<CAutoFile>(CAutoFile&, int, int) const
SHARED_CRITICAL_BLOCK(cs) {
      if (fWrite) {
        CAddrDb *db = const_cast<CAddrDb*>(this);
        int n = ourId.size() + unkId.size();
        READWRITE(n);
        for (std::deque<int>::const_iterator it = ourId.begin(); it != ourId.end(); it++) {
          std::map<int, CAddrInfo>::iterator ci = db->idToInfo.find(*it);
          READWRITE((*ci).second);
        }
        for (std::set<int>::const_iterator it = unkId.begin(); it != unkId.end(); it++) {
          std::map<int, CAddrInfo>::iterator ci = db->idToInfo.find(*it);
          READWRITE((*ci).second);
        }
      } else {
        CAddrDb *db = const_cast<CAddrDb*>(this);
        db->nId = 0;
        int n;
        READWRITE(n);
        for (int i=0; i<n; i++) {
          CAddrInfo info;
          READWRITE(info);
          if (!info.GetBanTime()) {
            int id = db->nId++;
            db->idToInfo[id] = info;
            db->ipToId[info.ip] = id;
            if (info.ourLastTry) {
              db->ourId.push_back(id);
              if (info.IsGood()) db->goodId.insert(id);
            } else {
              db->unkId.insert(id);
            }
          }
        }
        db->nDirty++;
      }
      READWRITE(banned);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
movl $0x4, %edx
callq 0x118d6
movq %rbx, %rdi
callq 0x33b0
movq 0xe8(%rbx), %rax
movl 0xc8(%rbx), %ecx
movl %eax, %edx
subl %ecx, %edx
shrl $0x3, %edx
cmpq $0x1, %rax
adcl $-0x1, %edx
shll $0x7, %edx
movq 0xc0(%rbx), %rax
movq 0xd0(%rbx), %rcx
subq 0xd8(%rbx), %rcx
shrq $0x2, %rcx
addl %edx, %ecx
subq 0xb0(%rbx), %rax
addl 0x118(%rbx), %ecx
shrq $0x2, %rax
addl %ecx, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
movl $0x4, %edx
callq 0x118d6
movq 0xb0(%rbx), %r15
cmpq 0xd0(%rbx), %r15
je 0x11818
movq 0xc0(%rbx), %rbp
movq 0xc8(%rbx), %r12
leaq 0x48(%rbx), %r13
movq 0x50(%rbx), %rcx
movq %r13, %rax
testq %rcx, %rcx
je 0x117cf
movl (%r15), %edx
movq %r13, %rax
xorl %esi, %esi
cmpl %edx, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x117b8
movq %r13, %rdi
cmpq %r13, %rax
je 0x117e4
movl (%r15), %ecx
cmpl 0x20(%rax), %ecx
cmovlq %r13, %rax
movq %rax, %rdi
addq $0x28, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11a06
addq $0x4, %r15
cmpq %rbp, %r15
jne 0x1180f
movq 0x8(%r12), %r15
addq $0x8, %r12
leaq 0x200(%r15), %rbp
cmpq 0xd0(%rbx), %r15
jne 0x117a6
movq 0x108(%rbx), %r15
leaq 0xf8(%rbx), %r12
cmpq %r12, %r15
je 0x11891
leaq 0x48(%rbx), %r13
movq 0x50(%rbx), %rcx
movq %r13, %rax
testq %rcx, %rcx
je 0x11859
movl 0x20(%r15), %edx
movq %r13, %rax
xorl %esi, %esi
cmpl %edx, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x11842
movq %r13, %rdi
cmpq %r13, %rax
je 0x1186f
movl 0x20(%r15), %ecx
cmpl 0x20(%rax), %ecx
cmovlq %r13, %rax
movq %rax, %rdi
addq $0x28, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11a06
movq %r15, %rdi
callq 0x3450
movq %rax, %r15
cmpq %r12, %rax
jne 0x1182f
leaq 0x158(%rbx), %rsi
movq %r14, %rdi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11d67
movq %rbx, %rdi
callq 0x34f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x118c3
jmp 0x118c3
jmp 0x118c3
movq %rax, %r14
movq %rbx, %rdi
callq 0x34f0
movq %r14, %rdi
callq 0x3650