// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x4c0, %rsp            # imm = 0x4C0
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x83d4
testb %al, %al
je 0x7d69
addq $0x6, %r14
leaq 0xb0(%rsp), %r15
pushq $0xa
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x10f5e
leaq 0xa65e(%rip), %rdx      # 0x123b7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9132
jmp 0x7eff
movq %r14, %rdi
callq 0x83ec
testb %al, %al
je 0x7da6
addq $0x6, %r14
leaq 0xb0(%rsp), %r15
pushq $0xa
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x10f5e
leaq 0xa628(%rip), %rdx      # 0x123be
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9132
jmp 0x7eff
movups (%r14), %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andw $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x30(%rsp), %rsi
callq 0x85f4
testb %al, %al
je 0x7e13
leaq 0xb0(%rsp), %r15
movl $0x401, %edx            # imm = 0x401
movq %r15, %rdi
xorl %esi, %esi
callq 0x3230
movl 0xc(%rsp), %esi
subq $0x8, %rsp
leaq 0x38(%rsp), %rdi
movq %r15, %rdx
movl $0x401, %ecx            # imm = 0x401
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
callq 0x3280
popq %rcx
popq %rdx
testl %eax, %eax
je 0x7f1c
movq %r14, %rdi
callq 0x8392
testb %al, %al
je 0x7e63
leaq 0xa5a4(%rip), %rsi      # 0x123ca
leaq 0xb0(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x3180
movzbl 0xc(%r14), %edx
movzbl 0xd(%r14), %ecx
movzbl 0xe(%r14), %r8d
movzbl 0xf(%r14), %r9d
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x867f
jmp 0x7eff
leaq 0xa56c(%rip), %rsi      # 0x123d6
leaq 0xb0(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x3180
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, %r15d
movzwl 0xe(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r15
pushq %r11
pushq %r10
callq 0x867f
addq $0x20, %rsp
leaq 0xb0(%rsp), %rdi
callq 0x31d0
movq %rbx, %rax
addq $0x4c0, %rsp            # imm = 0x4C0
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb0(%rsp), %rsi
leaq 0xb(%rsp), %rdx
movq %rbx, %rdi
callq 0x3180
jmp 0x7f0c
jmp 0x7f3b
jmp 0x7f42
jmp 0x7f42
jmp 0x7f3b
movq %rax, %rbx
jmp 0x7f52
jmp 0x7f42
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x31d0
movq %rbx, %rdi
callq 0x3690