// File: /workspace/github_cpp_makefile_star2_O3/tenup-coin[P]seeder/netbase.cpp
// Function: CNetAddr::ToStringIP[abi:cxx11]() const
std::string CNetAddr::ToStringIP() const
{
    if (IsTor())
        return EncodeBase32(&ip[6], 10) + ".onion";
    if (IsI2P())
        return EncodeBase32(&ip[6], 10) + ".oc.b32.i2p";
    CService serv(*this, 0);
    struct sockaddr_storage sockaddr;
    socklen_t socklen = sizeof(sockaddr);
    if (serv.GetSockAddr((struct sockaddr*)&sockaddr, &socklen)) {
        char name[1025] = "";
        if (!getnameinfo((const struct sockaddr*)&sockaddr, socklen, name, sizeof(name), NULL, 0, NI_NUMERICHOST))
            return std::string(name);
    }
    if (IsIPv4())
        return strprintf("%u.%u.%u.%u", GetByte(3), GetByte(2), GetByte(1), GetByte(0));
    else
        return strprintf("%x:%x:%x:%x:%x:%x:%x:%x",
                         GetByte(15) << 8 | GetByte(14), GetByte(13) << 8 | GetByte(12),
                         GetByte(11) << 8 | GetByte(10), GetByte(9) << 8 | GetByte(8),
                         GetByte(7) << 8 | GetByte(6), GetByte(5) << 8 | GetByte(4),
                         GetByte(3) << 8 | GetByte(2), GetByte(1) << 8 | GetByte(0));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rsi, %r14
movl $0x7ed887fd, %eax       # imm = 0x7ED887FD
xorl (%rsi), %eax
movq %rdi, %rbx
movzwl 0x4(%rsi), %ecx
xorl $0x43eb, %ecx           # imm = 0x43EB
orl %eax, %ecx
je 0x8b62
movl $0x4ddb60fd, %eax       # imm = 0x4DDB60FD
xorl (%r14), %eax
movzwl 0x4(%r14), %ecx
xorl $0xb5dd, %ecx           # imm = 0xB5DD
orl %eax, %ecx
je 0x8bac
movups (%r14), %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movw $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x438(%rsp), %rsi
callq 0x951e
testb %al, %al
je 0x8a99
leaq 0x30(%rsp), %r15
movl $0x401, %edx            # imm = 0x401
movq %r15, %rdi
xorl %esi, %esi
callq 0x3220
movl 0xc(%rsp), %esi
subq $0x8, %rsp
leaq 0x440(%rsp), %rdi
movq %r15, %rdx
movl $0x401, %ecx            # imm = 0x401
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
callq 0x3270
addq $0x10, %rsp
testl %eax, %eax
je 0x8cc0
movl 0x8(%r14), %eax
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
xorq %rax, %rcx
orq (%r14), %rcx
je 0x8c2e
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa948(%rip), %rsi      # 0x13406
leaq 0xa958(%rip), %rdx      # 0x1341d
leaq 0x30(%rsp), %rdi
callq 0x5b14
movzwl (%r14), %eax
movzwl 0x2(%r14), %ecx
rolw $0x8, %ax
movzwl %ax, %edx
rolw $0x8, %cx
movzwl %cx, %ecx
movzwl 0x4(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
movzwl 0x6(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r9d
movzwl 0x8(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r10d
movzwl 0xa(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r11d
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
movzwl 0xe(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r12
pushq %r11
pushq %r10
callq 0x95b3
addq $0x20, %rsp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8cae
jmp 0x8ca9
addq $0x6, %r14
leaq 0x30(%rsp), %r15
movl $0xa, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x125af
leaq 0xa865(%rip), %rsi      # 0x133e7
movq %r15, %rdi
callq 0x36c0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x8bfd
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8c03
addq $0x6, %r14
leaq 0x30(%rsp), %r15
movl $0xa, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x125af
leaq 0xa822(%rip), %rsi      # 0x133ee
movq %r15, %rdi
callq 0x36c0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x8c7e
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8c84
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8cae
jmp 0x8ca9
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa7bc(%rip), %rsi      # 0x133fa
leaq 0xa7c0(%rip), %rdx      # 0x13405
leaq 0x30(%rsp), %rdi
callq 0x5b14
movzbl 0xc(%r14), %edx
movzbl 0xd(%r14), %ecx
movzbl 0xe(%r14), %r8d
movzbl 0xf(%r14), %r9d
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x95b3
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8cae
jmp 0x8ca9
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8cae
callq 0x33d0
movq %rbx, %rax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x31c0
leaq (%rsp,%rax), %rdx
addq $0x30, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b14
jmp 0x8cae
jmp 0x8d0b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8d39
jmp 0x8d34
jmp 0x8d0b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8d39
jmp 0x8d34
movq %rax, %rbx
jmp 0x8d39
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d39
jmp 0x8d34
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d39
callq 0x33d0
movq %rbx, %rdi
callq 0x3650
nop