// File: tenup-coin[P]seeder/./db.h
// Function: void CAddrDb::Unserialize<CAutoFile>(CAutoFile&, int, int)
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
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
movb $0x0, -0x1a(%rbp)
movb $0x0, -0x1b(%rbp)
movb $0x1, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
leaq -0x24(%rbp), %rsi
callq 0x2fb50
movq -0x138(%rbp), %rsi
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %edx
callq 0x26bd0
leaq -0x30(%rbp), %rdi
callq 0x26c10
testb $0x1, %al
jne 0x2f89e
jmp 0x2fb21
movq -0x138(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
leaq -0x3c(%rbp), %rsi
callq 0x2fb50
movl %eax, -0x13c(%rbp)
jmp 0x2f8cf
movl -0x13c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x2fade
leaq -0x100(%rbp), %rdi
callq 0x1ac90
jmp 0x2f8fc
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
leaq -0x100(%rbp), %rsi
callq 0x2fb90
movl %eax, -0x140(%rbp)
jmp 0x2f91a
movl -0x140(%rbp), %ecx
movl -0x20(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x1a9a0
movl %eax, -0x144(%rbp)
jmp 0x2f93c
movl -0x144(%rbp), %eax
cmpl $0x0, %eax
jne 0x2fac4
movq -0x38(%rbp), %rcx
movl 0x38(%rcx), %eax
movl %eax, %edx
incl %edx
movl %edx, 0x38(%rcx)
movl %eax, -0x108(%rbp)
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
leaq -0x108(%rbp), %rsi
callq 0x1a370
movq %rax, -0x150(%rbp)
jmp 0x2f97c
movq -0x150(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x1ad50
jmp 0x2f991
movl -0x108(%rbp), %eax
movl %eax, -0x15c(%rbp)
movq -0x38(%rbp), %rdi
addq $0x70, %rdi
leaq -0x100(%rbp), %rsi
callq 0x1a580
movq %rax, -0x158(%rbp)
jmp 0x2f9ba
movq -0x158(%rbp), %rax
movl -0x15c(%rbp), %ecx
movl %ecx, (%rax)
cmpq $0x0, -0xd8(%rbp)
je 0x2fa82
movq -0x38(%rbp), %rdi
addq $0xa0, %rdi
leaq -0x108(%rbp), %rsi
callq 0x1a4c0
jmp 0x2f9f0
leaq -0x100(%rbp), %rdi
callq 0x1a6c0
movb %al, -0x15d(%rbp)
jmp 0x2fa04
movb -0x15d(%rbp), %al
testb $0x1, %al
jne 0x2fa10
jmp 0x2fa80
movq -0x38(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
leaq -0x108(%rbp), %rsi
callq 0x1a950
movb %dl, -0x169(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x2fa36
movb -0x169(%rbp), %al
movq -0x168(%rbp), %rcx
movq %rcx, -0x118(%rbp)
movb %al, -0x110(%rbp)
jmp 0x2fa80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x2fb33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x1ada0
jmp 0x2fb33
jmp 0x2fac2
movq -0x38(%rbp), %rdi
addq $0xf0, %rdi
leaq -0x108(%rbp), %rsi
callq 0x1a950
movb %dl, -0x179(%rbp)
movq %rax, -0x178(%rbp)
jmp 0x2faa8
movb -0x179(%rbp), %al
movq -0x178(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movb %al, -0x120(%rbp)
jmp 0x2fac4
leaq -0x100(%rbp), %rdi
callq 0x1ada0
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x2f8e2
movq -0x138(%rbp), %rsi
movq -0x38(%rbp), %rax
movl 0x150(%rax), %ecx
incl %ecx
movl %ecx, 0x150(%rax)
movq -0x10(%rbp), %rdi
addq $0x158, %rsi            # imm = 0x158
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
callq 0x2fbd0
movl %eax, -0x180(%rbp)
jmp 0x2fb15
movl -0x180(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x26cb0
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x26cb0
movq -0x48(%rbp), %rdi
callq 0x47f0
nopw %cs:(%rax,%rax)
nop