// File: /workspace/github_cpp_makefile_star2_O3/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 0x441c
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4533
addq $0x8, %r14
leaq 0xd0(%rsp), %rbx
leaq 0x8(%rsp), %r15
movq %rbx, %rsi
callq 0x4310
testb %al, %al
je 0x440b
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 0x43d3
jmp 0x4533
leaq 0x20(%rsp), %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x6dfd(%rip), %rdi      # 0xb234
leaq 0x6e07(%rip), %rsi      # 0xb245
callq 0x3310
testq %rax, %rax
je 0x44ff
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 0x44f3
leaq 0x6dcf(%rip), %r13      # 0xb247
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 0x44de
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x4310
testb %al, %al
je 0x44de
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 0x4488
movq %r15, %rdi
callq 0x3290
movl 0x4(%rsp), %ebp
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x7b24
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x452b
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x4516
cmpq $0x0, 0x18(%rsp)
je 0x4582
movl $0xd8, %edi
callq 0x32a0
movq %rax, %r14
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6d58
leaq 0x38(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6da8
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x4585
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x456b
jmp 0x4585
xorl %r14d, %r14d
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x45a4
movq (%rdi), %rbx
movl $0x90, %esi
callq 0x32b0
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x458f
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 0x45e0
movq (%rdi), %r13
movl $0x90, %esi
callq 0x32b0
movq %r13, %rdi
cmpq %r15, %r13
jne 0x45c6
jmp 0x45e0
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x32b0
jmp 0x461d
jmp 0x461a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %r15
cmpq %r15, %rdi
je 0x461d
movq (%rdi), %r14
movl $0x90, %esi
callq 0x32b0
movq %r14, %rdi
cmpq %r15, %r14
jne 0x4603
jmp 0x461d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x463c
movq (%rdi), %r14
movl $0x90, %esi
callq 0x32b0
movq %r14, %rdi
cmpq %r12, %r14
jne 0x4627
movq %rbx, %rdi
callq 0x3400