// File: CoinBlack[P]blackcoin-seeder/db.cpp
// Function: CAddrDb::Add_(CAddress const&, bool)
void CAddrDb::Add_(const CAddress &addr, bool force) {
  if (!force && !addr.IsRoutable())
    return;
  CService ipp(addr);
  if (banned.count(ipp)) {
    time_t bantime = banned[ipp];
    if (force || (bantime < time(NULL) && addr.nTime > bantime))
      banned.erase(ipp);
    else
      return;
  }
  if (ipToId.count(ipp)) {
    CAddrInfo &ai = idToInfo[ipToId[ipp]];
    if (addr.nTime > ai.lastTry) ai.lastTry = addr.nTime;
    // Do not update ai.nServices (data from VERSION from the peer itself is better than random ADDR rumours).
    if (force) {
      ai.ignoreTill = 0;
    }
    return;
  }
  CAddrInfo ai;
  ai.ip = ipp;
  ai.services = addr.nServices;
  ai.lastTry = addr.nTime;
  ai.ourLastTry = 0;
  ai.total = 0;
  ai.success = 0;
  int id = nId++;
  idToInfo[id] = ai;
  ipToId[ipp] = id;
//  printf("%s: added\n", ToString(ipp).c_str(), ipToId[ipp]);
  unkId.insert(id);
  nDirty++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x19d9d
movq -0x10(%rbp), %rdi
callq 0x140b0
testb $0x1, %al
jne 0x19d9d
jmp 0x1a00b
movq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x24(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x1c(%rbp)
movw 0x10(%rax), %ax
movw %ax, -0x14(%rbp)
addq $0x158, %rdi            # imm = 0x158
leaq -0x24(%rbp), %rsi
callq 0x1b1f0
cmpq $0x0, %rax
je 0x19e49
movq -0x120(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x24(%rbp), %rsi
callq 0x1b0b0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x19e29
movq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x4490
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jge 0x19e42
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
cmpq -0x30(%rbp), %rax
jle 0x19e42
movq -0x120(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x24(%rbp), %rsi
callq 0x1ac50
jmp 0x19e47
jmp 0x1a00b
jmp 0x19e49
movq -0x120(%rbp), %rdi
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1aae0
cmpq $0x0, %rax
je 0x19ed1
movq -0x120(%rbp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x130(%rbp)
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1ab40
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x1a930
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x38(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jle 0x19eba
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
testb $0x1, -0x11(%rbp)
je 0x19ecc
movq -0x38(%rbp), %rax
movq $0x0, 0x38(%rax)
jmp 0x1a00b
leaq -0xf0(%rbp), %rdi
callq 0x1b250
movq -0x120(%rbp), %rdi
movw -0x14(%rbp), %ax
movw %ax, -0xe0(%rbp)
movups -0x24(%rbp), %xmm0
movaps %xmm0, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq %rax, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x68(%rbp)
movl 0x38(%rdi), %eax
movl %eax, %ecx
incl %ecx
movl %ecx, 0x38(%rdi)
movl %eax, -0xf4(%rbp)
addq $0x40, %rdi
leaq -0xf4(%rbp), %rsi
callq 0x1a930
movq %rax, -0x138(%rbp)
jmp 0x19f59
movq -0x138(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1b310
jmp 0x19f6e
movq -0x120(%rbp), %rdi
movl -0xf4(%rbp), %eax
movl %eax, -0x144(%rbp)
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1ab40
movq %rax, -0x140(%rbp)
jmp 0x19f97
movq -0x120(%rbp), %rdi
movq -0x140(%rbp), %rax
movl -0x144(%rbp), %ecx
movl %ecx, (%rax)
addq $0xf0, %rdi
leaq -0xf4(%rbp), %rsi
callq 0x1af10
movb %dl, -0x151(%rbp)
movq %rax, -0x150(%rbp)
jmp 0x19fcf
movq -0x120(%rbp), %rax
movb -0x151(%rbp), %cl
movq -0x150(%rbp), %rdx
movq %rdx, -0x118(%rbp)
movb %cl, -0x110(%rbp)
movl 0x150(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x150(%rax)
leaq -0xf0(%rbp), %rdi
callq 0x1b360
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x1b360
movq -0x100(%rbp), %rdi
callq 0x4840
nop