// File: 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:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x110(%rax)
movq 0xd8(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x73370
movq 0x28(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0xc8e10
jmp 0xc6bb9
leaq 0x98(%rsp), %rdi
callq 0x7cce8
jmp 0xc6bc8
leaq 0x51fe1(%rip), %rsi     # 0x118bb0
xorl %eax, %eax
movl %eax, %edx
leaq 0xb8(%rsp), %rdi
callq 0x7cb90
movq %rax, 0x18(%rsp)
jmp 0xc6be7
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $-0x1, 0x80(%rsp)
jne 0xc6c25
movl $0x1, 0x7c(%rsp)
jmp 0xc6d59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xc6d7e
leaq 0xb8(%rsp), %rdi
movl $0x2f, %esi
movl $0x6, %edx
callq 0x787f0
movq %rax, 0x10(%rsp)
jmp 0xc6c43
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpq $-0x1, 0x70(%rsp)
jne 0xc6c57
jmp 0xc6c57
movq 0x70(%rsp), %rcx
addq $-0x6, %rcx
leaq 0x50(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
movl $0x6, %edx
callq 0x76c50
jmp 0xc6c79
movq 0x20(%rsp), %rdi
addq $0x40, %rdi
leaq 0x50(%rsp), %rsi
callq 0x71240
jmp 0xc6c8e
movq 0x20(%rsp), %rax
movw $0x15, 0x60(%rax)
movq 0x70(%rsp), %rdx
leaq 0x30(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
movq $-0x1, %rcx
callq 0x76c50
jmp 0xc6cb9
leaq 0x30(%rsp), %rdi
callq 0x7aba0
movb %al, 0xf(%rsp)
jmp 0xc6cc9
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xc6cd3
jmp 0xc6d13
movl $0x1, 0x7c(%rsp)
jmp 0xc6d3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xc6d70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x7cce8
jmp 0xc6d6e
movq 0x20(%rsp), %rdi
addq $0x90, %rdi
leaq 0x30(%rsp), %rsi
callq 0x71240
jmp 0xc6d2b
movq 0x20(%rsp), %rax
movb $0x1, 0x110(%rax)
movl $0x0, 0x7c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x7cce8
jmp 0xc6d4b
leaq 0x50(%rsp), %rdi
callq 0x7cce8
jmp 0xc6d57
jmp 0xc6d59
leaq 0xb8(%rsp), %rdi
callq 0x7cce8
addq $0xe8, %rsp
retq
jmp 0xc6d70
leaq 0x50(%rsp), %rdi
callq 0x7cce8
jmp 0xc6d7c
jmp 0xc6d7e
leaq 0xb8(%rsp), %rdi
callq 0x7cce8
jmp 0xc6d8d
jmp 0xc6d8f
movq 0x90(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopw %cs:(%rax,%rax)