// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::ParseUrl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void BamHttp::ParseUrl(const string& url) {

    // clear flag to start
    m_isUrlParsed = false;

    // make sure url starts with "http://", case-insensitive
    string tempUrl(url);
    toLower(tempUrl);
    const size_t prefixFound = tempUrl.find(HTTP_PREFIX);
    if ( prefixFound == string::npos )
        return;

    // find end of host name portion (first '/' hit after the prefix)
    const size_t firstSlashFound = tempUrl.find(HOST_SEPARATOR, HTTP_PREFIX_LENGTH);
    if ( firstSlashFound == string::npos ) {
        ;  // no slash found... no filename given along with host?
    }

    // fetch hostname (check for proxy port)
    string hostname = tempUrl.substr(HTTP_PREFIX_LENGTH, (firstSlashFound - HTTP_PREFIX_LENGTH));
    const size_t colonFound = hostname.find(PROXY_SEPARATOR);
    if ( colonFound != string::npos ) {
        ; // TODO: handle proxy port (later, just skip for now)
    } else {
        m_hostname = hostname;
        m_port = HTTP_PORT;
    }

    // store remainder of URL as filename (must be non-empty)
    string filename = tempUrl.substr(firstSlashFound);
    if ( filename.empty() )
        return;
    m_filename = filename;

    // set parsed OK flag
    m_isUrlParsed = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
xorl %ebp, %ebp
movb %bpl, 0xa8(%rdi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x33ff0
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %bpl, (%rax)
movq 0x8(%r14), %r14
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x34730
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x4ebcf
movq 0x8(%rsp), %rax
movsbl (%rax,%r15), %edi
callq 0x34350
movq 0x68(%rsp), %rcx
movb %al, (%rcx,%r15)
incq %r15
jmp 0x4ebad
leaq 0x68(%rsp), %rdi
callq 0x33a00
leaq 0x296e0(%rip), %rsi     # 0x782c0
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x35770
cmpq $-0x1, %rax
je 0x4ec98
leaq 0x8(%rsp), %rdi
pushq $0x2f
popq %rsi
pushq $0x7
popq %rdx
callq 0x33d30
movq %rax, %r14
leaq -0x7(%rax), %rcx
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x7
popq %rdx
callq 0x332a0
leaq 0x48(%rsp), %rdi
pushq $0x3a
popq %rsi
xorl %edx, %edx
callq 0x33d30
cmpq $-0x1, %rax
jne 0x4ec52
leaq 0x38(%rbx), %rdi
leaq 0x48(%rsp), %rsi
callq 0x32060
leaq 0x58(%rbx), %rdi
leaq 0x29653(%rip), %rsi     # 0x782a0
callq 0x32060
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %r14, %rdx
callq 0x332a0
cmpq $0x0, 0x30(%rsp)
je 0x4ec84
leaq 0x78(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x32060
movb $0x1, 0xa8(%rbx)
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
leaq 0x8(%rsp), %rdi
callq 0x33a00
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x4ecdb
jmp 0x4ece7
jmp 0x4ece7
jmp 0x4ece7
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x33a00
jmp 0x4ecea
jmp 0x4ecfc
jmp 0x4ecd8
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x33a00
jmp 0x4ecea
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f