// File: tenup-coin[P]seeder/db.cpp
// Function: CAddrInfo::Update(bool)
void CAddrInfo::Update(bool good) {
  uint32_t now = time(NULL);
  if (ourLastTry == 0)
    ourLastTry = now - MIN_RETRY;
  int age = now - ourLastTry;
  lastTry = now;
  ourLastTry = now;
  total++;
  if (good)
  {
    success++;
    ourLastSuccess = now;
  }
  stat2H.Update(good, age, 3600*2);
  stat8H.Update(good, age, 3600*8);
  stat1D.Update(good, age, 3600*24);
  stat1W.Update(good, age, 3600*24*7);
  stat1M.Update(good, age, 3600*24*30);
  int ign = GetIgnoreTime();
  if (ign && (ignoreTill==0 || ignoreTill < ign+now)) ignoreTill = ign+now;
 //printf("%s: got %s result: success=%i/%i; 2H:%.2f%%-%.2f%%(%.2f) 8H:%.2f%%-%.2f%%(%.2f) 1D:%.2f%%-%.2f%%(%.2f) 1W:%.2f%%-%.2f%%(%.2f) \n", ToString(ip).c_str(), good ? "good" : "bad", success, total, 
 //100.0 * stat2H.reliability, 100.0 * (stat2H.reliability + 1.0 - stat2H.weight), stat2H.count,
 //100.0 * stat8H.reliability, 100.0 * (stat8H.reliability + 1.0 - stat8H.weight), stat8H.count,
 //100.0 * stat1D.reliability, 100.0 * (stat1D.reliability + 1.0 - stat1D.weight), stat1D.count,
 //100.0 * stat1W.reliability, 100.0 * (stat1W.reliability + 1.0 - stat1W.weight), stat1W.count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x44a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, -0x10(%rbp)
cmpq $0x0, 0x28(%rax)
jne 0x190b9
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x3e8, %ecx            # imm = 0x3E8
movl %ecx, %ecx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
subq 0x28(%rax), %rcx
movl %ecx, -0x14(%rbp)
movl -0x10(%rbp), %ecx
movq %rcx, 0x20(%rax)
movl -0x10(%rbp), %ecx
movq %rcx, 0x28(%rax)
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
testb $0x1, -0x9(%rbp)
je 0x19104
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movl -0x10(%rbp), %ecx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
addq $0x40, %rdi
movb -0x9(%rbp), %al
movslq -0x14(%rbp), %rdx
movsd 0x1a895(%rip), %xmm0    # 0x339b0
andb $0x1, %al
movzbl %al, %esi
callq 0x19fa0
movq -0x20(%rbp), %rdi
addq $0x4c, %rdi
movb -0x9(%rbp), %al
movslq -0x14(%rbp), %rdx
movsd 0x1a86c(%rip), %xmm0    # 0x339a8
andb $0x1, %al
movzbl %al, %esi
callq 0x19fa0
movq -0x20(%rbp), %rdi
addq $0x58, %rdi
movb -0x9(%rbp), %al
movslq -0x14(%rbp), %rdx
movsd 0x1a843(%rip), %xmm0    # 0x339a0
andb $0x1, %al
movzbl %al, %esi
callq 0x19fa0
movq -0x20(%rbp), %rdi
addq $0x64, %rdi
movb -0x9(%rbp), %al
movslq -0x14(%rbp), %rdx
movsd 0x1a81a(%rip), %xmm0    # 0x33998
andb $0x1, %al
movzbl %al, %esi
callq 0x19fa0
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
movb -0x9(%rbp), %al
movslq -0x14(%rbp), %rdx
movsd 0x1a7f1(%rip), %xmm0    # 0x33990
andb $0x1, %al
movzbl %al, %esi
callq 0x19fa0
movq -0x20(%rbp), %rdi
callq 0x1a0a0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x191eb
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x191db
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x18(%rbp), %ecx
addl -0x10(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jge 0x191eb
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x10(%rbp), %ecx
movl %ecx, %ecx
movq %rcx, 0x38(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)