// File: /workspace/github_cpp_makefile_star2_O3/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 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x267c0
movq %r14, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x27ef0
cmpq $-0x1, %rax
je 0x4b10a
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
callq 0x267c0
movq %rsp, %rdi
movl $0x25, %esi
movq $-0x1, %rdx
callq 0x29210
cmpq $-0x1, %rax
je 0x4b024
leaq 0x38(%rsp), %rdi
movq %rsp, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x277f0
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
callq 0x26b80
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b024
callq 0x27560
leaq 0x78(%rsp), %rdi
movq %rsp, %rsi
movl $0x3a, %edx
callq 0x4b4a7
movl 0x80(%rsp), %eax
subl 0x78(%rsp), %eax
shrl $0x5, %eax
movzbl %al, %r14d
leal -0x9(%r14), %eax
cmpl $-0x6, %eax
jb 0x4b0d0
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x3a3a, (%r15)         # imm = 0x3A3A
movq $0x2, -0x8(%r15)
movb $0x0, 0x2(%r15)
movq %rsp, %rdi
movl $0x2, %ecx
movq %r15, %rsi
xorl %edx, %edx
callq 0x28af0
xorl %ebp, %ebp
cmpq $-0x1, %rax
je 0x4b0ab
movq %rsp, %r12
incq %rax
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rcx
movq %r12, %rdi
movq %rax, %rdx
callq 0x28af0
incb %bpl
cmpq $-0x1, %rax
jne 0x4b08a
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b0ba
callq 0x27560
cmpl $0x8, %r14d
sete %al
cmpb $0x2, %bpl
setae %cl
testb %cl, %al
je 0x4b17c
xorl %r13d, %r13d
leaq 0x78(%rsp), %rdi
callq 0x270a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4b0f0
callq 0x27560
testb %r13b, %r13b
je 0x4b10a
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x8(%rbx)
movb $0x1, 0x38(%rbx)
movl $0x1, (%rbx)
jmp 0x4b148
leaq 0x58(%rsp), %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0x27ef0
cmpq $-0x1, %rax
je 0x4b14c
movq %rsp, %rsi
movl $0x0, (%rsi)
leaq 0x58(%rsp), %rdi
callq 0x4b3c8
testb %al, %al
je 0x4b14c
movl (%rsp), %eax
movl %eax, 0x4(%rbx)
movb $0x1, 0x38(%rbx)
movl $0x0, (%rbx)
movb $0x1, %bl
jmp 0x4b154
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4b168
callq 0x27560
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0x27ef0
cmpb $0x1, %bpl
jne 0x4b19e
testl %r14d, %r14d
jne 0x4b1b3
movb $0x1, %r13b
jmp 0x4b0d3
xorl %ecx, %ecx
cmpq $-0x1, %rax
sete %cl
addl $0x7, %ecx
cmpl %ecx, %r14d
jb 0x4b0d0
leal -0x1(%r14), %eax
movl $0x9, %r12d
subl %r14d, %r12d
movq %rax, 0x30(%rsp)
movsbq %al, %r15
addl $-0x2, %r14d
movl $0x10, %ebp
movq %r14, %rax
shlq $0x5, %rax
movq %rax, 0x90(%rsp)
movq 0x78(%rsp), %r13
movq 0x80(%rsp), %rdx
subq %r13, %rdx
sarq $0x5, %rdx
cmpq %r15, %rdx
jbe 0x4b307
movq %r15, %rax
shlq $0x5, %rax
cmpq $0x0, 0x8(%r13,%rax)
je 0x4b25f
addq %rax, %r13
movq (%r13), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x26620
movq %rax, %rcx
shrq $0x10, %rcx
testw %cx, %cx
je 0x4b28c
cmpl %r15d, 0x30(%rsp)
jne 0x4b0d0
movq %r13, %rdi
leaq 0x38(%rsp), %rsi
callq 0x4b3c8
testb %al, %al
je 0x4b0d0
movl 0x38(%rsp), %eax
bswapl %eax
movl %eax, 0x1c(%rsp,%rbp)
addq $-0x4, %rbp
decq %r12
jmp 0x4b299
cmpl %r15d, 0x30(%rsp)
jne 0x4b2b7
cmpq %r14, %rdx
jbe 0x4b318
movq 0x90(%rsp), %rax
cmpq $0x0, 0x8(%r13,%rax)
je 0x4b0d0
movw $0x0, 0x1e(%rsp,%rbp)
jmp 0x4b295
rolw $0x8, %ax
movw %ax, 0x1e(%rsp,%rbp)
addq $-0x2, %rbp
testq %r15, %r15
setle %r13b
jle 0x4b0d3
decq %r15
testq %rbp, %rbp
jne 0x4b1e1
jmp 0x4b0d3
testq %r15, %r15
je 0x4b2ea
testq %r12, %r12
je 0x4b2e5
movb $0x1, %al
testq %rbp, %rbp
je 0x4b0d0
movw $0x0, 0x1e(%rsp,%rbp)
addq $-0x2, %rbp
movzbl %al, %ecx
movl %ecx, %eax
incb %al
cmpq %rcx, %r12
ja 0x4b2c3
jmp 0x4b299
xorl %r12d, %r12d
jmp 0x4b299
cmpq $0x1, %rdx
jbe 0x4b329
cmpq $0x0, 0x28(%r13)
je 0x4b0d0
movw $0x0, 0x1e(%rsp,%rbp)
jmp 0x4b196
leaq 0x9f94(%rip), %rdi      # 0x552a2
movq %r15, %rsi
xorl %eax, %eax
callq 0x284e0
leaq 0x9f83(%rip), %rdi      # 0x552a2
movq %r14, %rsi
xorl %eax, %eax
callq 0x284e0
leaq 0x9f72(%rip), %rdi      # 0x552a2
movl $0x1, %esi
xorl %eax, %eax
callq 0x284e0
jmp 0x4b366
jmp 0x4b366
jmp 0x4b366
jmp 0x4b366
jmp 0x4b375
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b391
callq 0x27560
jmp 0x4b391
jmp 0x4b36b
jmp 0x4b370
jmp 0x4b36b
jmp 0x4b370
movq %rax, %rbx
jmp 0x4b387
movq %rax, %rbx
jmp 0x4b391
movq %rax, %rbx
jmp 0x4b3a4
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b387
callq 0x27560
leaq 0x78(%rsp), %rdi
callq 0x270a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4b3a4
callq 0x27560
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4b3b8
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047