// File: /workspace/github_cpp_makefile_star2_O3/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 0x1165c
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 0x1165c
movq 0xb0(%rbx), %r15
cmpq 0xd0(%rbx), %r15
je 0x115a1
movq 0xc0(%rbx), %rbp
movq 0xc8(%rbx), %r12
leaq 0x48(%rbx), %r13
movq 0x50(%rbx), %rdx
movq %r13, %rdi
testq %rdx, %rdx
je 0x1156d
movl (%r15), %ecx
movq %r13, %rax
xorl %esi, %esi
cmpl %ecx, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rax
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x11544
movq %r13, %rdi
cmpq %r13, %rax
je 0x1156d
cmpl 0x20(%rax), %ecx
cmovlq %r13, %rax
movq %rax, %rdi
addq $0x28, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11778
addq $0x4, %r15
cmpq %rbp, %r15
jne 0x11598
movq 0x8(%r12), %r15
addq $0x8, %r12
leaq 0x200(%r15), %rbp
cmpq 0xd0(%rbx), %r15
jne 0x11532
movq 0x108(%rbx), %r15
leaq 0xf8(%rbx), %r12
cmpq %r12, %r15
je 0x11616
leaq 0x48(%rbx), %r13
movq 0x50(%rbx), %rdx
movq %r13, %rdi
testq %rdx, %rdx
je 0x115f4
movl 0x20(%r15), %ecx
movq %r13, %rax
xorl %esi, %esi
cmpl %ecx, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rax
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x115cb
movq %r13, %rdi
cmpq %r13, %rax
je 0x115f4
cmpl 0x20(%rax), %ecx
cmovlq %r13, %rax
movq %rax, %rdi
addq $0x28, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11778
movq %r15, %rdi
callq 0x3450
movq %rax, %r15
cmpq %r12, %rax
jne 0x115b8
leaq 0x158(%rbx), %rsi
movq %r14, %rdi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11ad9
movq %rbx, %rdi
callq 0x34f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11648
jmp 0x11648
jmp 0x11648
movq %rax, %r14
movq %rbx, %rdi
callq 0x34f0
movq %r14, %rdi
callq 0x3650
nop