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

    // clear flag to start
    m_isUrlParsed = false;

    // make sure url starts with "ftp://", case-insensitive
    string tempUrl(url);
    toLower(tempUrl);
    const size_t prefixFound = tempUrl.find(FTP_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, FTP_PREFIX_LENGTH);
    if ( firstSlashFound == string::npos ) {
        ;  // no slash found... no filename given along with host?
    }

    // fetch hostname
    string hostname = tempUrl.substr(FTP_PREFIX_LENGTH, (firstSlashFound - FTP_PREFIX_LENGTH));
    m_hostname = hostname;
    m_port = FTP_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 %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
xorl %ebp, %ebp
movb %bpl, 0x110(%rdi)
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x267c0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb %bpl, (%r12)
movq 0x8(%r14), %r14
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26590
testq %r14, %r14
je 0x459b8
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movsbl (%rax,%r13), %edi
callq 0x28340
movq 0x48(%rsp), %rcx
movb %al, (%rcx,%r13)
incq %r13
cmpq %r13, %r14
jne 0x45998
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x459c7
callq 0x27560
movq 0x27ca2(%rip), %rsi     # 0x6d670
movq 0x27ca3(%rip), %rcx     # 0x6d678
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
callq 0x28af0
cmpq $-0x1, %rax
je 0x45a8d
leaq 0x8(%rsp), %rdi
movl $0x6, %edx
movl $0x2f, %esi
callq 0x27ef0
movq %rax, %r14
leaq -0x6(%rax), %rcx
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x6, %edx
callq 0x277f0
leaq 0x40(%rbx), %rdi
leaq 0x68(%rsp), %rsi
callq 0x26b80
movw $0x15, 0x60(%rbx)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x277f0
cmpq $0x0, 0x30(%rsp)
je 0x45a67
leaq 0x90(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x26b80
movb $0x1, 0x110(%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45a7a
callq 0x27560
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45a8d
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45a9c
callq 0x27560
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45acb
callq 0x27560
jmp 0x45acb
jmp 0x45ac8
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x45af1
jmp 0x45af6
jmp 0x45adf
jmp 0x45adf
movq %rax, %rbx
jmp 0x45af6
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x45af6
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x45b05
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop