// File: /workspace/github_cpp_makefile_star2_O1/davidgfnet[P]tadns/tadns.cc
// Function: createResolver(char const**, unsigned int)
DNSResolverIface * createResolver(const char **dns_servers, unsigned atimeout) {
#ifdef _WIN32
    { WSADATA data; WSAStartup(MAKEWORD(2,2), &data); }
#endif /* _WIN32 */

    std::list<struct sockaddr_storage> serverbundle;

    if (!dns_servers) {
        #ifdef TADNS_DONT_USE_OS_DNS_SERVERS
            return (NULL);
        #else
        serverbundle = getdnsip();
        if (!serverbundle.size())
            return (NULL);
        #endif
    }
    else {
        while (*dns_servers != NULL) {
            struct sockaddr_storage addr;
            if (parseAddr(*dns_servers++, &addr))
                serverbundle.push_back(addr);
        }
    }

    DNSResolver *dns = new DNSResolver(serverbundle, atimeout);

    return (dns);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movl %esi, %ebp
leaq 0x8(%rsp), %r12
movq %r12, 0x8(%r12)
movq %r12, (%r12)
movq $0x0, 0x10(%r12)
testq %rdi, %rdi
je 0x4438
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x454f
addq $0x8, %r14
leaq 0xd0(%rsp), %rbx
leaq 0x8(%rsp), %r15
movq %rbx, %rsi
callq 0x432c
testb %al, %al
je 0x4427
movl $0x90, %edi
callq 0x32a0
movq %rax, %rdi
addq $0x10, %rdi
movl $0x10, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3080
incq 0x18(%rsp)
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x43ef
jmp 0x454f
leaq 0x20(%rsp), %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x6e57(%rip), %rdi      # 0xb2aa
leaq 0x6e61(%rip), %rsi      # 0xb2bb
callq 0x3310
testq %rax, %rax
je 0x451b
movq %rax, %r15
movl %ebp, 0x4(%rsp)
leaq 0xd0(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdx
callq 0x33c0
testq %rax, %rax
je 0x450f
leaq 0x6e29(%rip), %r13      # 0xb2bd
leaq 0xd0(%rsp), %rbp
leaq 0x2d0(%rsp), %rbx
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3280
cmpl $0x1, %eax
jne 0x44fa
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x432c
testb %al, %al
je 0x44fa
movl $0x90, %edi
callq 0x32a0
movq %rax, %rdi
addq $0x10, %rdi
movl $0x10, %ecx
leaq 0x50(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3080
incq 0x30(%rsp)
movq %rbp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdx
callq 0x33c0
testq %rax, %rax
jne 0x44a4
movq %r15, %rdi
callq 0x3290
movl 0x4(%rsp), %ebp
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x7b9e
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x4547
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x4532
cmpq $0x0, 0x18(%rsp)
je 0x459e
movl $0xd8, %edi
callq 0x32a0
movq %rax, %r14
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6d7c
leaq 0x38(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6dcc
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x45a1
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x4587
jmp 0x45a1
xorl %r14d, %r14d
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x45c0
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x45ab
movq %r14, %rax
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x45fc
movq (%rdi), %r13
movl $0x90, %esi
callq 0x32b0
movq %r13, %rdi
cmpq %r15, %r13
jne 0x45e2
jmp 0x45fc
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x32b0
jmp 0x4639
jmp 0x4636
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %r15
cmpq %r15, %rdi
je 0x4639
movq (%rdi), %r14
movl $0x90, %esi
callq 0x32b0
movq %r14, %rdi
cmpq %r15, %r14
jne 0x461f
jmp 0x4639
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4658
movq (%rdi), %r14
movl $0x90, %esi
callq 0x32b0
movq %r14, %rdi
cmpq %r12, %r14
jne 0x4643
movq %rbx, %rdi
callq 0x3400