// File: tenup-coin[P]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.services != addr.nServices)
    {
      ai.lastTry = addr.nTime;
      ai.services |= addr.nServices;
      //printf("%s: updated\n", ToString(addr).c_str());
    }
    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 0x197ed
movq -0x10(%rbp), %rdi
callq 0x13b40
testb $0x1, %al
jne 0x197ed
jmp 0x19a85
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 0x1ac30
cmpq $0x0, %rax
je 0x19899
movq -0x120(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x24(%rbp), %rsi
callq 0x1aaf0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x19879
movq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x44a0
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jge 0x19892
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
cmpq -0x30(%rbp), %rax
jle 0x19892
movq -0x120(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x24(%rbp), %rsi
callq 0x1a690
jmp 0x19897
jmp 0x19a85
jmp 0x19899
movq -0x120(%rbp), %rdi
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1a520
cmpq $0x0, %rax
je 0x1994b
movq -0x120(%rbp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x130(%rbp)
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1a580
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x1a370
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x38(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jg 0x1990f
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x19934
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x38(%rbp), %rax
orq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
testb $0x1, -0x11(%rbp)
je 0x19946
movq -0x38(%rbp), %rax
movq $0x0, 0x38(%rax)
jmp 0x19a85
leaq -0xf0(%rbp), %rdi
callq 0x1ac90
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 0x1a370
movq %rax, -0x138(%rbp)
jmp 0x199d3
movq -0x138(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1ad50
jmp 0x199e8
movq -0x120(%rbp), %rdi
movl -0xf4(%rbp), %eax
movl %eax, -0x144(%rbp)
addq $0x70, %rdi
leaq -0x24(%rbp), %rsi
callq 0x1a580
movq %rax, -0x140(%rbp)
jmp 0x19a11
movq -0x120(%rbp), %rdi
movq -0x140(%rbp), %rax
movl -0x144(%rbp), %ecx
movl %ecx, (%rax)
addq $0xf0, %rdi
leaq -0xf4(%rbp), %rsi
callq 0x1a950
movb %dl, -0x151(%rbp)
movq %rax, -0x150(%rbp)
jmp 0x19a49
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 0x1ada0
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 0x1ada0
movq -0x100(%rbp), %rdi
callq 0x47f0
nopl (%rax,%rax)