// File: /workspace/github_cpp_makefile_star2_O1/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 0x8c60
movl $0x4ddb60fd, %eax       # imm = 0x4DDB60FD
xorl (%r14), %eax
movzwl 0x4(%r14), %ecx
xorl $0xb5dd, %ecx           # imm = 0xB5DD
orl %eax, %ecx
je 0x8caa
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 0x9664
testb %al, %al
je 0x8b97
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 0x8dbe
movl 0x8(%r14), %eax
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
xorq %rax, %rcx
orq (%r14), %rcx
je 0x8d2c
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa84a(%rip), %rsi      # 0x13406
leaq 0xa85a(%rip), %rdx      # 0x1341d
leaq 0x30(%rsp), %rdi
callq 0x5b6c
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 0x96fc
addq $0x20, %rsp
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8dac
jmp 0x8da7
addq $0x6, %r14
leaq 0x30(%rsp), %r15
movl $0xa, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x12838
leaq 0xa767(%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 0x8cfb
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8d01
addq $0x6, %r14
leaq 0x30(%rsp), %r15
movl $0xa, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x12838
leaq 0xa724(%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 0x8d7c
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8d82
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 0x8dac
jmp 0x8da7
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa6be(%rip), %rsi      # 0x133fa
leaq 0xa6c2(%rip), %rdx      # 0x13405
leaq 0x30(%rsp), %rdi
callq 0x5b6c
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 0x96fc
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8dac
jmp 0x8da7
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 0x8dac
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 0x5b6c
jmp 0x8dac
jmp 0x8e09
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8e37
jmp 0x8e32
jmp 0x8e09
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x8e37
jmp 0x8e32
movq %rax, %rbx
jmp 0x8e37
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e37
jmp 0x8e32
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e37
callq 0x33d0
movq %rbx, %rdi
callq 0x3650
nop