// File: /workspace/github_cpp_makefile_star2_O3/tenup-coin[P]seeder/main.cpp
// Function: ThreadCrawler
void* ThreadCrawler(void* data) {
  int *nThreads=(int*)data;
  do {
    std::vector<CServiceResult> ips;
    int wait = 5;
    db.GetMany(ips, 16, wait);
    int64 now = time(NULL);
    if (ips.empty()) {
      wait *= 1000;
      wait += rand() % (500 * *nThreads);
      Sleep(wait);
      continue;
    }
    vector<CAddress> addr;
    for (int i=0; i<ips.size(); i++) {
      CServiceResult &res = ips[i];
      res.nBanTime = 0;
      res.nClientV = 0;
      res.nHeight = 0;
      res.strClientV = "";
      bool getaddr = res.ourLastSuccess + 3600 < now;
      res.fGood = TestNode(res.service,res.nBanTime,res.nClientV,res.strClientV,res.nHeight,getaddr ? &addr : NULL);
    }
    db.ResultMany(ips);
    db.Add(addr);
  } while(1);
  return nullptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
leaq 0xf19e(%rip), %r15      # 0x1c488
leaq 0x10(%rsp), %r12
leaq 0x30(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x5, 0xc(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x10, %edx
leaq 0xc(%rsp), %rcx
callq 0xe528
xorl %edi, %edi
callq 0x33c0
movq 0x10(%rsp), %r14
cmpq 0x18(%rsp), %r14
je 0xd428
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl $0x20, %r15d
xorl %ebp, %ebp
leaq (%r14,%r15), %r12
movq $0x0, -0xc(%r14,%r15)
movl $0x0, -0x4(%r14,%r15)
movq 0x8(%r14,%r15), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x63c9(%rip), %rcx      # 0x13745
xorl %r8d, %r8d
callq 0x35c0
leaq (%r14,%r15), %rdi
addq $-0x20, %rdi
leaq -0xc(%r14,%r15), %rsi
leaq -0x4(%r14,%r15), %rdx
leaq (%r14,%r15), %r8
addq $-0x8, %r8
movq 0x28(%r8), %rax
movl $0xe10, %ecx            # imm = 0xE10
addq %rcx, %rax
cmpq %rbx, %rax
movl $0x0, %r9d
cmovlq %r13, %r9
movq %r12, %rcx
callq 0x4bd0
movb %al, -0xe(%r14,%r15)
incq %rbp
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rax
addq $0x48, %r15
cmpq %rbp, %rax
ja 0xd355
leaq 0xf08e(%rip), %r15      # 0x1c488
movq %r15, %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0xe604
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xe712
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd48d
callq 0x33d0
jmp 0xd48d
imull $0x3e8, 0xc(%rsp), %eax # imm = 0x3E8
movl %eax, 0xc(%rsp)
callq 0x30c0
movq 0x50(%rsp), %rcx
imull $0x1f4, (%rcx), %ecx    # imm = 0x1F4
cltd
idivl %ecx
addl 0xc(%rsp), %edx
movl %edx, 0xc(%rsp)
movslq %edx, %rax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
movq %rcx, 0x30(%rsp)
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %eax
imull $0xf4240, %eax, %eax    # imm = 0xF4240
cltq
movq %rax, 0x38(%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0x3100
movq %r12, %rdi
callq 0xe79c
jmp 0xd2f4
jmp 0xd49c
movq %rax, %rbx
jmp 0xd4b7
jmp 0xd4a5
jmp 0xd4a5
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd4b7
callq 0x33d0
leaq 0x10(%rsp), %rdi
callq 0xe79c
movq %rbx, %rdi
callq 0x3650