// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::HostAddress::ParseAddress()
bool HostAddress::ParseAddress(void) {

    // all IPv6 addresses should have a ':'
    string s = m_ipString;
    size_t found = s.find(':');
    if ( found != string::npos ) {
        // try parse IP6 address
        uint8_t maybeIp6[16];
        if ( ParseIp6(s, maybeIp6) ) {
            SetAddress(maybeIp6);
            m_protocol = HostAddress::IPv6Protocol;
            return true;
        }
    }

    // all IPv4 addresses should have a '.'
    found = s.find('.');
    if ( found != string::npos ) {
        uint32_t maybeIp4(0);
        if ( ParseIp4(s, maybeIp4) ) {
            SetAddress(maybeIp4);
            m_protocol = HostAddress::IPv4Protocol;
            return true;
        }
    }

    // else likely just a plain-text host name "www.foo.bar"
    // will need to look up IP address info later
    m_protocol = HostAddress::UnknownNetworkProtocol;
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x267c0
movq %r14, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x27f00
cmpq $-0x1, %rax
je 0x4b0e7
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x267c0
leaq 0x10(%rsp), %rdi
movl $0x25, %esi
movq $-0x1, %rdx
callq 0x29220
cmpq $-0x1, %rax
je 0x4afeb
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x277f0
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x26b80
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4afeb
callq 0x27560
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x3a, %edx
callq 0x4b4af
movl 0x88(%rsp), %eax
subl 0x80(%rsp), %eax
shrl $0x5, %eax
movzbl %al, %r12d
leal -0x9(%r12), %eax
cmpl $-0x6, %eax
jb 0x4b0a8
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movw $0x3a3a, (%r14)         # imm = 0x3A3A
movq $0x2, -0x8(%r14)
movb $0x0, 0x2(%r14)
leaq 0x10(%rsp), %rdi
movl $0x2, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0x28b00
xorl %ebp, %ebp
cmpq $-0x1, %rax
je 0x4b083
leaq 0x10(%rsp), %r15
incq %rax
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
movq %r15, %rdi
movq %rax, %rdx
callq 0x28b00
incb %bpl
cmpq $-0x1, %rax
jne 0x4b062
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x4b092
callq 0x27560
cmpl $0x8, %r12d
sete %al
cmpb $0x2, %bpl
setae %cl
testb %cl, %al
je 0x4b157
xorl %r15d, %r15d
leaq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %r12
callq 0x270a0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4b0d1
callq 0x27560
testb %r15b, %r15b
je 0x4b0e7
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x8(%rbx)
movl $0x1, (%rbx)
jmp 0x4b124
leaq 0x60(%rsp), %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0x27f00
cmpq $-0x1, %rax
je 0x4b12c
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x60(%rsp), %rdi
callq 0x4b399
testb %al, %al
je 0x4b12c
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rbx)
movl $0x0, (%rbx)
movb $0x1, 0x38(%rbx)
movb $0x1, %bl
jmp 0x4b134
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b143
callq 0x27560
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0x27f00
cmpb $0x1, %bpl
je 0x4b183
xorl %ecx, %ecx
cmpq $-0x1, %rax
sete %cl
addl $0x7, %ecx
cmpl %ecx, %r12d
jb 0x4b0a8
movl %r12d, %eax
subl $0x1, %eax
movq %rax, 0x8(%rsp)
setb %r15b
jb 0x4b0ab
movl $0x9, %ebp
subl %r12d, %ebp
movsbq 0x8(%rsp), %r14
movl $0x10, %r13d
movq 0x80(%rsp), %r12
movq 0x88(%rsp), %rdx
subq %r12, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0x4b2d7
movq %r14, %rax
shlq $0x5, %rax
cmpq $0x0, 0x8(%r12,%rax)
je 0x4b226
addq %rax, %r12
movq (%r12), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x26620
movq %rax, %rcx
shrq $0x10, %rcx
testw %cx, %cx
je 0x4b245
cmpl %r14d, 0x8(%rsp)
jne 0x4b257
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0x4b399
testb %al, %al
je 0x4b259
movl 0x40(%rsp), %ecx
bswapl %ecx
movl %ecx, 0x2c(%rsp,%r13)
addq $-0x4, %r13
decq %rbp
jmp 0x4b259
cmpl %r14d, 0x8(%rsp)
jne 0x4b25f
leal -0x1(%r14), %esi
cmpq %rsi, %rdx
jbe 0x4b2e8
shlq $0x5, %rsi
movq 0x8(%r12,%rsi), %rax
jmp 0x4b295
rolw $0x8, %ax
movw %ax, 0x2e(%rsp,%r13)
addq $-0x2, %r13
movb $0x1, %al
jmp 0x4b259
xorl %eax, %eax
testb %al, %al
jne 0x4b2ab
jmp 0x4b2af
testq %r14, %r14
je 0x4b28a
testq %rbp, %rbp
je 0x4b2ab
movb $0x1, %al
testq %r13, %r13
je 0x4b2af
movw $0x0, 0x2e(%rsp,%r13)
addq $-0x2, %r13
movzbl %al, %ecx
movl %ecx, %eax
incb %al
cmpq %rcx, %rbp
ja 0x4b26b
jmp 0x4b2ab
cmpq $0x1, %rdx
jbe 0x4b2f6
movq 0x28(%r12), %rax
testq %rax, %rax
je 0x4b2a6
movw $0x0, 0x2e(%rsp,%r13)
addq $-0x2, %r13
testq %rax, %rax
je 0x4b2af
movb $0x1, %al
jmp 0x4b2b1
xorl %eax, %eax
testb %al, %al
je 0x4b0a8
testq %r14, %r14
setle %r15b
jle 0x4b0ab
decq %r14
testq %r13, %r13
jne 0x4b1ac
jmp 0x4b0ab
leaq 0x9fc4(%rip), %rdi      # 0x552a2
movq %r14, %rsi
xorl %eax, %eax
callq 0x284f0
leaq 0x9fb3(%rip), %rdi      # 0x552a2
xorl %eax, %eax
callq 0x284f0
leaq 0x9fa5(%rip), %rdi      # 0x552a2
movl $0x1, %esi
xorl %eax, %eax
callq 0x284f0
jmp 0x4b333
jmp 0x4b333
jmp 0x4b333
jmp 0x4b333
jmp 0x4b342
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b361
callq 0x27560
jmp 0x4b361
jmp 0x4b338
jmp 0x4b33d
jmp 0x4b338
jmp 0x4b33d
movq %rax, %rbx
jmp 0x4b354
movq %rax, %rbx
jmp 0x4b361
movq %rax, %rbx
jmp 0x4b375
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x4b354
callq 0x27560
leaq 0x80(%rsp), %rdi
callq 0x270a0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4b375
callq 0x27560
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x4b389
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd