// File: /workspace/github_cpp_makefile_star2_O1/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 0xefb2(%rip), %r14      # 0x1c488
leaq 0x10(%rsp), %r15
leaq 0x30(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x5, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl $0x10, %edx
leaq 0xc(%rsp), %rcx
callq 0xe720
xorl %edi, %edi
callq 0x33c0
movq %rax, %rbx
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0xd624
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %r14
cmpq %r14, 0x18(%rsp)
je 0xd5ef
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 0x61cd(%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 0x4c50
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 0xd551
leaq 0xee92(%rip), %r14      # 0x1c488
movq %r14, %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0xe7fc
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xe90a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd689
callq 0x33d0
jmp 0xd689
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 %r15, %rdi
callq 0xe994
jmp 0xd4e0
jmp 0xd698
movq %rax, %rbx
jmp 0xd6b3
jmp 0xd6a1
jmp 0xd6a1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd6b3
callq 0x33d0
leaq 0x10(%rsp), %rdi
callq 0xe994
movq %rbx, %rdi
callq 0x3650