LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::ReadReferenceEntry(BamTools::Internal::BtiReferenceEntry&)
void BamToolsIndex::ReadReferenceEntry(BtiReferenceEntry& refEntry) {

    // return false if refId not valid index in file summary structure
    if ( refEntry.ID < 0 || refEntry.ID >= (int)m_indexFileSummary.size() )
        throw BamException("BamToolsIndex::ReadReferenceEntry", "invalid reference requested");

    // use index summary to assist reading the reference's BTI blocks
    const BtiReferenceSummary& refSummary = m_indexFileSummary.at(refEntry.ID);
    ReadBlocks(refSummary, refEntry.Blocks);
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
cmpl $0x0, (%rax)
jl 0xc283c
movq 0x28(%rsp), %rdi
movq 0x98(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
addq $0x38, %rdi
callq 0x72c30
movq %rax, %rcx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jl 0xc2949
movb $0x1, 0x3e(%rsp)
movl $0x28, %edi
callq 0x737c0
movq %rax, 0x10(%rsp)
leaq 0x77(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7b5f0
movq 0x18(%rsp), %rdx
leaq 0x291c5(%rip), %rsi     # 0xeba30
leaq 0x78(%rsp), %rdi
callq 0x78e70
jmp 0xc2877
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x291c0(%rip), %rsi     # 0xeba52
leaq 0x40(%rsp), %rdi
callq 0x78e70
jmp 0xc289e
movq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x79cd0
jmp 0xc28b4
movq 0x10(%rsp), %rdi
movb $0x0, 0x3e(%rsp)
movq 0x4f64b(%rip), %rsi     # 0x111f10
movq 0x4f694(%rip), %rdx     # 0x111f60
callq 0x7b010
jmp 0xc299c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0xc292a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0xc2912
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x7cce8
jmp 0xc2910
jmp 0xc2912
leaq 0x3f(%rsp), %rdi
callq 0x76f80
leaq 0x78(%rsp), %rdi
callq 0x7cce8
jmp 0xc2928
jmp 0xc292a
leaq 0x77(%rsp), %rdi
callq 0x76f80
testb $0x1, 0x3e(%rsp)
jne 0xc293d
jmp 0xc2947
movq 0x10(%rsp), %rdi
callq 0x74e00
jmp 0xc298a
movq 0x28(%rsp), %rdi
addq $0x38, %rdi
movq 0x98(%rsp), %rax
movslq (%rax), %rsi
callq 0x71920
movq 0x28(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq $0x8, %rdx
callq 0x79060
addq $0xa8, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::HasAlignments(int const&) const
bool BamToolsIndex::HasAlignments(const int& referenceID) const {
    if ( referenceID < 0 || referenceID >= (int)m_indexFileSummary.size() )
        return false;
    const BtiReferenceSummary& refSummary = m_indexFileSummary.at(referenceID);
    return ( refSummary.NumBlocks > 0 );
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
jl 0xc29e6
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
addq $0x38, %rdi
callq 0x72c30
movq %rax, %rcx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jl 0xc29ed
movb $0x0, 0x37(%rsp)
jmp 0xc2a19
movq 0x10(%rsp), %rdi
addq $0x38, %rdi
movq 0x20(%rsp), %rax
movslq (%rax), %rsi
callq 0x7bf30
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
setg %al
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool BamToolsIndex::Load(const std::string& filename) {

    try {

        // attempt to open file (read-only)
        OpenFile(filename, IBamIODevice::ReadOnly);

        // load metadata & generate in-memory summary
        LoadHeader();
        LoadFileSummary();

        // return success
        return true;

    } catch ( BamException& e ) {
        m_errorString = e.what();
        return false;
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x74480
jmp 0xc2e38
movq (%rsp), %rdi
callq 0x77ad0
jmp 0xc2e43
movq (%rsp), %rdi
callq 0x788f0
jmp 0xc2e4e
movb $0x1, 0x37(%rsp)
jmp 0xc2ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xc2ecd
movq 0x18(%rsp), %rdi
callq 0x72fc0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq (%rsp), %rdi
movq %rax, %rsi
addq $0x10, %rdi
callq 0x78d10
jmp 0xc2e9f
movb $0x0, 0x37(%rsp)
callq 0x7a790
jmp 0xc2ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x7a790
jmp 0xc2ec0
jmp 0xc2ecd
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nop
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::LoadHeader()
void BamToolsIndex::LoadHeader(void) {

    // check BTI file metadata
    CheckMagicNumber();
    CheckVersion();

    // use file's BTI block size to set member variable
    const int64_t numBytesRead = m_resources.Device->Read((char*)&m_blockSize, sizeof(m_blockSize));
    if ( m_isBigEndian ) SwapEndian_32(m_blockSize);
    if ( numBytesRead != sizeof(m_blockSize) )
        throw BamException("BamToolsIndex::LoadHeader", "could not read BTI block size");
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x7b0e0
movq 0x20(%rsp), %rdi
callq 0x7b3c0
movq 0x20(%rsp), %rsi
movq 0x60(%rsi), %rdi
addq $0x50, %rsi
movq (%rdi), %rax
movl $0x4, %edx
callq *0x28(%rax)
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x88(%rsp)
testb $0x1, 0x30(%rax)
je 0xc2f47
movq 0x20(%rsp), %rdi
addq $0x50, %rdi
callq 0x77400
cmpq $0x4, 0x88(%rsp)
je 0xc3063
movb $0x1, 0x2e(%rsp)
movl $0x28, %edi
callq 0x737c0
movq %rax, 0x10(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7b5f0
movq 0x18(%rsp), %rdx
leaq 0x289a7(%rip), %rsi     # 0xeb92c
leaq 0x68(%rsp), %rdi
callq 0x78e70
jmp 0xc2f91
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x2899a(%rip), %rsi     # 0xeb946
leaq 0x30(%rsp), %rdi
callq 0x78e70
jmp 0xc2fb8
movq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x79cd0
jmp 0xc2fce
movq 0x10(%rsp), %rdi
movb $0x0, 0x2e(%rsp)
movq 0x4ef31(%rip), %rsi     # 0x111f10
movq 0x4ef7a(%rip), %rdx     # 0x111f60
callq 0x7b010
jmp 0xc307d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xc3044
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xc302c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x7cce8
jmp 0xc302a
jmp 0xc302c
leaq 0x2f(%rsp), %rdi
callq 0x76f80
leaq 0x68(%rsp), %rdi
callq 0x7cce8
jmp 0xc3042
jmp 0xc3044
leaq 0x67(%rsp), %rdi
callq 0x76f80
testb $0x1, 0x2e(%rsp)
jne 0xc3057
jmp 0xc3061
movq 0x10(%rsp), %rdi
callq 0x74e00
jmp 0xc306b
addq $0x98, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::LoadFileSummary()
void BamToolsIndex::LoadFileSummary(void) {

    // load number of reference sequences
    int numReferences;
    LoadNumReferences(numReferences);

    // initialize file summary data
    InitializeFileSummary(numReferences);

    // load summary for each reference
    BtiFileSummary::iterator summaryIter = m_indexFileSummary.begin();
    BtiFileSummary::iterator summaryEnd  = m_indexFileSummary.end();
    for ( ; summaryIter != summaryEnd; ++summaryIter )
        LoadReferenceSummary(*summaryIter);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x1c(%rsp), %rsi
callq 0x7b780
movq (%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x7b7e0
movq (%rsp), %rdi
addq $0x38, %rdi
callq 0x73430
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
addq $0x38, %rdi
callq 0x722a0
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x77150
testb $0x1, %al
jne 0xc30e3
jmp 0xc3105
leaq 0x10(%rsp), %rdi
callq 0x74470
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x75720
leaq 0x10(%rsp), %rdi
callq 0x7b830
jmp 0xc30ce
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::LoadNumReferences(int&)
void BamToolsIndex::LoadNumReferences(int& numReferences) {
    const int64_t numBytesRead = m_resources.Device->Read((char*)&numReferences, sizeof(numReferences));
    if ( m_isBigEndian ) SwapEndian_32(numReferences);
    if ( numBytesRead != sizeof(numReferences) )
        throw BamException("BamToolsIndex::LoadNumReferences", "could not read number of references");
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rax), %rdi
movq 0x88(%rsp), %rsi
movq (%rdi), %rax
movl $0x4, %edx
callq *0x28(%rax)
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x80(%rsp)
testb $0x1, 0x30(%rax)
je 0xc316e
movq 0x88(%rsp), %rdi
callq 0x75b80
cmpq $0x4, 0x80(%rsp)
je 0xc3288
movb $0x1, 0x26(%rsp)
movl $0x28, %edi
callq 0x737c0
movq %rax, 0x8(%rsp)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x7b5f0
movq 0x10(%rsp), %rdx
leaq 0x287f9(%rip), %rsi     # 0xeb9a5
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xc31b8
leaq 0x27(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x7b5f0
movq (%rsp), %rdx
leaq 0x287f5(%rip), %rsi     # 0xeb9c6
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xc31dd
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x79cd0
jmp 0xc31f3
movq 0x8(%rsp), %rdi
movb $0x0, 0x26(%rsp)
movq 0x4ed0c(%rip), %rsi     # 0x111f10
movq 0x4ed55(%rip), %rdx     # 0x111f60
callq 0x7b010
jmp 0xc32a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc3269
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc3251
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc324f
jmp 0xc3251
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc3267
jmp 0xc3269
leaq 0x5f(%rsp), %rdi
callq 0x76f80
testb $0x1, 0x26(%rsp)
jne 0xc327c
jmp 0xc3286
movq 0x8(%rsp), %rdi
callq 0x74e00
jmp 0xc3290
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::LoadReferenceSummary(BamTools::Internal::BtiReferenceSummary&)
void BamToolsIndex::LoadReferenceSummary(BtiReferenceSummary& refSummary) {

    // load number of blocks
    int numBlocks;
    LoadNumBlocks(numBlocks);

    // store block summary data for this reference
    refSummary.NumBlocks = numBlocks;
    refSummary.FirstBlockFilePosition = Tell();

    // skip reference's blocks
    SkipBlocks(numBlocks);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x72f20
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
callq 0x73570
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
leaq 0x14(%rsp), %rsi
callq 0x76190
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::LoadNumBlocks(int&)
void BamToolsIndex::LoadNumBlocks(int& numBlocks) {
    const int64_t numBytesRead = m_resources.Device->Read((char*)&numBlocks, sizeof(numBlocks));
    if ( m_isBigEndian ) SwapEndian_32(numBlocks);
    if ( numBytesRead != sizeof(numBlocks) )
        throw BamException("BamToolsIndex::LoadNumBlocks", "could not read number of BTI blocks");
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rax), %rdi
movq 0x88(%rsp), %rsi
movq (%rdi), %rax
movl $0x4, %edx
callq *0x28(%rax)
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x80(%rsp)
testb $0x1, 0x30(%rax)
je 0xc336e
movq 0x88(%rsp), %rdi
callq 0x75b80
cmpq $0x4, 0x80(%rsp)
je 0xc3488
movb $0x1, 0x26(%rsp)
movl $0x28, %edi
callq 0x737c0
movq %rax, 0x8(%rsp)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x7b5f0
movq 0x10(%rsp), %rdx
leaq 0x285b8(%rip), %rsi     # 0xeb964
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xc33b8
leaq 0x27(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x7b5f0
movq (%rsp), %rdx
leaq 0x285b0(%rip), %rsi     # 0xeb981
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xc33dd
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x79cd0
jmp 0xc33f3
movq 0x8(%rsp), %rdi
movb $0x0, 0x26(%rsp)
movq 0x4eb0c(%rip), %rsi     # 0x111f10
movq 0x4eb55(%rip), %rdx     # 0x111f60
callq 0x7b010
jmp 0xc34a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc3469
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc3451
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc344f
jmp 0xc3451
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc3467
jmp 0xc3469
leaq 0x5f(%rsp), %rdi
callq 0x76f80
testb $0x1, 0x26(%rsp)
jne 0xc347c
jmp 0xc3486
movq 0x8(%rsp), %rdi
callq 0x74e00
jmp 0xc3490
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::ReadBlocks(BamTools::Internal::BtiReferenceSummary const&, std::vector<BamTools::Internal::BtiBlock, std::allocator<BamTools::Internal::BtiBlock>>&)
void BamToolsIndex::ReadBlocks(const BtiReferenceSummary& refSummary, BtiBlockVector& blocks) {

    // prep blocks container
    blocks.clear();
    blocks.reserve(refSummary.NumBlocks);

    // skip to first block entry
    Seek( refSummary.FirstBlockFilePosition, SEEK_SET );

    // read & store block entries
    BtiBlock block;
    for ( int i = 0; i < refSummary.NumBlocks; ++i ) {
        ReadBlock(block);
        blocks.push_back(block);
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x7b4e0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rax
movslq (%rax), %rsi
callq 0x7bab0
movq (%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x77390
movl $0x0, 0x1c(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x79e50
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xc3817
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x78fb0
movq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x768c0
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0xc37e0
addq $0x58, %rsp
retq
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/index/BamToolsIndex_p.cpp
// Function: BamTools::Internal::BamToolsIndex::WriteBlocks(std::vector<BamTools::Internal::BtiBlock, std::allocator<BamTools::Internal::BtiBlock>> const&)
void BamToolsIndex::WriteBlocks(const BtiBlockVector& blocks) {
    BtiBlockVector::const_iterator blockIter = blocks.begin();
    BtiBlockVector::const_iterator blockEnd  = blocks.end();
    for ( ; blockIter != blockEnd; ++blockIter )
        WriteBlock(*blockIter);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x76ff0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x78e80
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x71c20
testb $0x1, %al
jne 0xc3c3a
jmp 0xc3c5c
leaq 0x10(%rsp), %rdi
callq 0x7c950
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x73550
leaq 0x10(%rsp), %rdi
callq 0x73260
jmp 0xc3c25
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/BamAux.h
// Function: BamTools::SwapEndian_64(long&)
API_EXPORT inline void SwapEndian_64(int64_t& x) {
    x = ( (x >> 56) | 
         ((x << 40) & 0x00FF000000000000ll) |
         ((x << 24) & 0x0000FF0000000000ll) |
         ((x << 8)  & 0x000000FF00000000ll) |
         ((x >> 8)  & 0x00000000FF000000ll) |
         ((x >> 24) & 0x0000000000FF0000ll) |
         ((x >> 40) & 0x000000000000FF00ll) |
          (x << 56)
        );
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rcx
sarq $0x38, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
shlq $0x28, %rax
movabsq $0xff000000000000, %rdx # imm = 0xFF000000000000
andq %rdx, %rax
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
shlq $0x18, %rax
movabsq $0xff0000000000, %rdx   # imm = 0xFF0000000000
andq %rdx, %rax
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
shlq $0x8, %rax
movabsq $0xff00000000, %rdx     # imm = 0xFF00000000
andq %rdx, %rax
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
sarq $0x8, %rax
movabsq $0xff000000, %rdx       # imm = 0xFF000000
andq %rdx, %rax
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
sarq $0x18, %rax
andq $0xff0000, %rax         # imm = 0xFF0000
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
sarq $0x28, %rax
andq $0xff00, %rax           # imm = 0xFF00
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq (%rax), %rax
shlq $0x38, %rax
orq %rax, %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamDeviceFactory_p.cpp
// Function: BamTools::Internal::BamDeviceFactory::CreateDevice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
IBamIODevice* BamDeviceFactory::CreateDevice(const string& source) {

    // check for requested pipe
    if ( source == "-" || source == "stdin" || source == "stdout" )
        return new BamPipe;

    // check for HTTP prefix
    if ( source.find("http://") == 0 )
        return new BamHttp(source);

    // check for FTP prefix
    if ( source.find("ftp://") == 0 )
        return new BamFtp(source);

    // otherwise assume a "normal" file
    return new BamFile(source);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x25bfb(%rip), %rsi     # 0xebb30
callq 0x7cc20
testb $0x1, %al
jne 0xc5f6a
movq 0x38(%rsp), %rdi
leaq 0x25be8(%rip), %rsi     # 0xebb32
callq 0x7cc20
testb $0x1, %al
jne 0xc5f6a
movq 0x38(%rsp), %rdi
leaq 0x25bd9(%rip), %rsi     # 0xebb38
callq 0x7cc20
testb $0x1, %al
jne 0xc5f6a
jmp 0xc5fb2
movl $0x38, %edi
callq 0x76970
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
callq 0x74630
jmp 0xc5f86
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xc60c3
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x764d0
jmp 0xc60cd
movq 0x38(%rsp), %rdi
leaq 0x25b81(%rip), %rsi     # 0xebb3f
xorl %eax, %eax
movl %eax, %edx
callq 0x7cac0
cmpq $0x0, %rax
jne 0xc601a
movl $0xc8, %edi
callq 0x76970
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rsi
callq 0x76f50
jmp 0xc5fee
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xc60c3
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x764d0
jmp 0xc60cd
movq 0x38(%rsp), %rdi
leaq 0x25b21(%rip), %rsi     # 0xebb47
xorl %eax, %eax
movl %eax, %edx
callq 0x7cac0
cmpq $0x0, %rax
jne 0xc607c
movl $0x120, %edi            # imm = 0x120
callq 0x76970
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
callq 0x79010
jmp 0xc6056
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xc60c3
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x764d0
jmp 0xc60cd
movl $0x58, %edi
callq 0x76970
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rsi
callq 0x772d0
jmp 0xc609d
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xc60c3
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x764d0
jmp 0xc60cd
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x7b550
nopw (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::~BamFtp()
BamFtp::~BamFtp(void) {

    // close connection & clean up
    Close();
    if ( m_commandSocket )
        delete m_commandSocket;
    if ( m_dataSocket )
        delete m_dataSocket;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x4b1fe(%rip), %rax     # 0x111fc8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0xc6ddc
movq 0x18(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0xc6e44
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0xc6e12
movq 0x10(%rsp), %rdi
callq 0x732c0
jmp 0xc6e08
movq 0x10(%rsp), %rdi
callq 0x764d0
jmp 0xc6e44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6f24
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x764d0
jmp 0xc6f24
movq 0x18(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0xc6e99
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0xc6e7a
movq 0x8(%rsp), %rdi
callq 0x732c0
jmp 0xc6e70
movq 0x8(%rsp), %rdi
callq 0x764d0
jmp 0xc6e99
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x764d0
jmp 0xc6f24
movq 0x18(%rsp), %rdi
addq $0xf0, %rdi
callq 0x7cce8
jmp 0xc6eac
movq 0x18(%rsp), %rdi
addq $0xd0, %rdi
callq 0x7cce8
jmp 0xc6ebf
movq 0x18(%rsp), %rdi
addq $0xb0, %rdi
callq 0x7cce8
jmp 0xc6ed2
movq 0x18(%rsp), %rdi
addq $0x90, %rdi
callq 0x7cce8
jmp 0xc6ee5
movq 0x18(%rsp), %rdi
addq $0x68, %rdi
callq 0x7cce8
jmp 0xc6ef5
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
callq 0x7cce8
jmp 0xc6f05
movq 0x18(%rsp), %rdi
callq 0x72ba0
addq $0x38, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6f49
movq 0x18(%rsp), %rdi
addq $0xf0, %rdi
callq 0x7cce8
jmp 0xc6f37
jmp 0xc6f49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6f6e
movq 0x18(%rsp), %rdi
addq $0xd0, %rdi
callq 0x7cce8
jmp 0xc6f5c
jmp 0xc6f6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6f93
movq 0x18(%rsp), %rdi
addq $0xb0, %rdi
callq 0x7cce8
jmp 0xc6f81
jmp 0xc6f93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6fb8
movq 0x18(%rsp), %rdi
addq $0x90, %rdi
callq 0x7cce8
jmp 0xc6fa6
jmp 0xc6fb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6fda
movq 0x18(%rsp), %rdi
addq $0x68, %rdi
callq 0x7cce8
jmp 0xc6fc8
jmp 0xc6fda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc6fec
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
callq 0x7cce8
jmp 0xc6fea
jmp 0xc6fec
movq 0x18(%rsp), %rdi
callq 0x72ba0
jmp 0xc6ff8
jmp 0xc6ffa
movq 0x28(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::Close()
void BamFtp::Close(void) {

    // disconnect socket
    m_commandSocket->DisconnectFromHost();
    m_dataSocket->DisconnectFromHost();

    // reset state - necessary??
    m_isUrlParsed = false;
    m_filePosition = -1;
    m_username = DEFAULT_USER;
    m_password = DEFAULT_PASS;
    m_dataHostname.clear();
    m_dataPort = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rax), %rdi
callq 0x7b600
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x7b600
movq 0x8(%rsp), %rdi
movb $0x0, 0x110(%rdi)
movq $-0x1, 0x118(%rdi)
addq $0xb0, %rdi
leaq 0x51b41(%rip), %rsi     # 0x118bf0
callq 0x71240
movq 0x8(%rsp), %rdi
addq $0xd0, %rdi
leaq 0x51b49(%rip), %rsi     # 0x118c10
callq 0x71240
movq 0x8(%rsp), %rdi
addq $0x68, %rdi
callq 0x78800
movq 0x8(%rsp), %rax
movw $0x0, 0x88(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::Open(BamTools::IBamIODevice::OpenMode)
bool BamFtp::Open(const IBamIODevice::OpenMode mode) {

    // BamFtp only supports read-only access
    if ( mode != IBamIODevice::ReadOnly ) {
        SetErrorString("BamFtp::Open", "writing on this device is not supported");
        return false;
    }

    // initialize basic valid state
    m_mode = mode;
    m_filePosition = 0;

    // attempt connection to command & data sockets
    return ( ConnectCommandSocket() && ConnectDataSocket() );
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movl %esi, 0x84(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x1, 0x84(%rsp)
je 0xc8c1e
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x7b5f0
movq 0x10(%rsp), %rdx
leaq 0x23110(%rip), %rsi     # 0xebc4c
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xc8b48
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x230f6(%rip), %rsi     # 0xebc59
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xc8b6f
movq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x7ab60
jmp 0xc8b85
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc8b91
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc8ba7
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movb $0x0, 0x97(%rsp)
jmp 0xc8c67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc8c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc8bfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc8bf8
jmp 0xc8bfa
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc8c10
jmp 0xc8c12
leaq 0x5f(%rsp), %rdi
callq 0x76f80
jmp 0xc8c78
movq 0x18(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x8(%rdi)
movq $0x0, 0x118(%rdi)
callq 0x71db0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x7(%rsp)
jne 0xc8c4c
jmp 0xc8c5a
movq 0x18(%rsp), %rdi
callq 0x7bb10
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x97(%rsp)
movb 0x97(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopw (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
static inline
vector<string> split(const string& source, const char delim) {

    stringstream ss(source);
    string field;
    vector<string> fields;

    while ( getline(ss, field, delim) )
        fields.push_back(field);
    return fields;
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x10(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x18(%rsp)
movq %rdi, 0x1f0(%rsp)
movq %rsi, 0x1e8(%rsp)
movb %al, 0x1e7(%rsp)
movq 0x1e8(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x10, %edi
movl $0x8, %esi
callq 0x7b8d0
movq 0x20(%rsp), %rsi
movl %eax, %edx
leaq 0x58(%rsp), %rdi
callq 0x7a4b0
leaq 0x38(%rsp), %rdi
callq 0x79100
jmp 0xc8cf6
movq 0x10(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
callq 0x7b6e0
jmp 0xc8d07
jmp 0xc8d09
movsbl 0x1e7(%rsp), %edx
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x7be00
movq %rax, 0x8(%rsp)
jmp 0xc8d27
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x7a210
movq %rax, (%rsp)
jmp 0xc8d41
movq (%rsp), %rax
cmpq $0x0, %rax
je 0xc8d98
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x73a70
jmp 0xc8d5c
jmp 0xc8d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xc8de5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xc8dd7
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x74e60
jmp 0xc8dbe
movb $0x1, 0x2b(%rsp)
testb $0x1, 0x2b(%rsp)
jne 0xc8db2
movq 0x10(%rsp), %rdi
callq 0x74e60
jmp 0xc8db0
jmp 0xc8db2
leaq 0x38(%rsp), %rdi
callq 0x7cce8
jmp 0xc8dc0
jmp 0xc8dd7
leaq 0x58(%rsp), %rdi
callq 0x74f60
movq 0x18(%rsp), %rax
addq $0x1f8, %rsp            # imm = 0x1F8
retq
leaq 0x38(%rsp), %rdi
callq 0x7cce8
jmp 0xc8de3
jmp 0xc8de5
leaq 0x58(%rsp), %rdi
callq 0x74f60
jmp 0xc8df1
jmp 0xc8df3
movq 0x30(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::toLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static inline
string toLower(const string& s) {
    string out;
    const size_t sSize = s.size();
    out.resize(sSize);
    for ( size_t i = 0; i < sSize; ++i )
        out[i] = tolower(s[i]);
    return out;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movb $0x0, 0x57(%rsp)
callq 0x79100
movq 0x58(%rsp), %rdi
callq 0x74cd0
movq %rax, 0x28(%rsp)
jmp 0xc8e46
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rsi
callq 0x79090
jmp 0xc8e61
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0xc8ee8
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x771c0
movq %rax, 0x10(%rsp)
jmp 0xc8e8c
movq 0x10(%rsp), %rax
movsbl (%rax), %edi
callq 0x798a0
movq 0x18(%rsp), %rdi
movb %al, 0x7(%rsp)
movq 0x30(%rsp), %rsi
callq 0x7cb00
movq %rax, 0x8(%rsp)
jmp 0xc8eb3
movq 0x8(%rsp), %rax
movb 0x7(%rsp), %cl
movb %cl, (%rax)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0xc8e6a
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x7cce8
jmp 0xc8f08
movb $0x1, 0x57(%rsp)
testb $0x1, 0x57(%rsp)
jne 0xc8efe
movq 0x18(%rsp), %rdi
callq 0x7cce8
movq 0x20(%rsp), %rax
addq $0x68, %rsp
retq
jmp 0xc8f0a
movq 0x40(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::Read(char*, unsigned int)
int64_t BamFtp::Read(char* data, const unsigned int numBytes) {

    // if BamHttp not in a valid state
    if ( !IsOpen() )
        return -1;

    // read until hit desired @numBytes
    int64_t bytesReadSoFar = 0;
    while ( bytesReadSoFar < numBytes ) {

        // calculate number of bytes we're going to try to read this iteration
        const size_t remainingBytes = ( numBytes - bytesReadSoFar );

        // if either disconnected somehow, or (more likely) we have seeked since last read
        if ( !m_dataSocket->IsConnected() ) {
            if ( !ConnectDataSocket() ) {
                // TODO: set error string
                return -1;
            }
        }

        // read bytes from data socket
        const int64_t socketBytesRead = ReadDataSocket(data+bytesReadSoFar, remainingBytes);
        if ( socketBytesRead < 0 ) // error
            return -1;
        else if ( socketBytesRead == 0 ) // EOF
            return bytesReadSoFar;
        bytesReadSoFar += socketBytesRead;
        m_filePosition += socketBytesRead;
    }

    // return actual number bytes successfully read
    return bytesReadSoFar;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq (%rdi), %rax
callq *0x50(%rax)
testb $0x1, %al
jne 0xc8f54
movq $-0x1, 0x40(%rsp)
jmp 0xc902c
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl 0x2c(%rsp), %ecx
cmpq %rcx, %rax
jge 0xc9022
movq 0x8(%rsp), %rax
movl 0x2c(%rsp), %ecx
subq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x38(%rax), %rdi
callq 0x75cd0
testb $0x1, %al
jne 0xc8fad
movq 0x8(%rsp), %rdi
callq 0x7bb10
testb $0x1, %al
jne 0xc8fab
movq $-0x1, 0x40(%rsp)
jmp 0xc902c
jmp 0xc8fad
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rax
movl %eax, %edx
callq 0x77d40
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jge 0xc8fe0
movq $-0x1, 0x40(%rsp)
jmp 0xc902c
cmpq $0x0, 0x10(%rsp)
jne 0xc8ff4
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xc902c
jmp 0xc8ff6
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x20(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rsp), %rcx
addq 0x118(%rax), %rcx
movq %rcx, 0x118(%rax)
jmp 0xc8f5d
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::Seek(long const&, int)
bool BamFtp::Seek(const int64_t& position, const int origin) {

    // if FTP device not in a valid state
    if ( !IsOpen() ) {
        // TODO: set error string
        return false;
    }

    // ----------------------
    // UGLY !! but works??
    // ----------------------
    // disconnect from server
    m_dataSocket->DisconnectFromHost();
    m_commandSocket->DisconnectFromHost();

    // update file position & return success
    if ( origin == SEEK_CUR )
        m_filePosition += position;
    else if ( origin == SEEK_SET)
        m_filePosition = position;
    else {
        // TODO: set error string
        return false;
    }
    return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movq (%rdi), %rax
callq *0x50(%rax)
testb $0x1, %al
jne 0xc90cc
movb $0x0, 0x27(%rsp)
jmp 0xc9133
movq (%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x7b600
movq (%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x7b600
cmpl $0x1, 0xc(%rsp)
jne 0xc9109
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
addq 0x118(%rax), %rcx
movq %rcx, 0x118(%rax)
jmp 0xc912e
cmpl $0x0, 0xc(%rsp)
jne 0xc9125
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x118(%rax)
jmp 0xc912c
movb $0x0, 0x27(%rsp)
jmp 0xc9133
jmp 0xc912e
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nop
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::WriteCommandSocket(char const*, unsigned int)
int64_t BamFtp::WriteCommandSocket(const char* data, const unsigned int numBytes) {
    if ( !m_commandSocket->IsConnected() )
        return -1;
    m_commandSocket->ClearBuffer();
    return m_commandSocket->Write(data, numBytes);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rax), %rdi
callq 0x75cd0
testb $0x1, %al
jne 0xc9173
movq $-0x1, 0x20(%rsp)
jmp 0xc919b
movq (%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x7b680
movq (%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x73b10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::Write(char const*, unsigned int)
int64_t BamFtp::Write(const char* data, const unsigned int numBytes) {
    (void)data;
    (void)numBytes;
    BT_ASSERT_X(false, "BamFtp::Write : write-mode not supported on this device");
    SetErrorString("BamFtp::Write", "write-mode not supported on this device");
    return -1;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x761a0
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7b5f0
movq 0x18(%rsp), %rdx
leaq 0x22ac6(%rip), %rsi     # 0xebd11
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xc9257
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x22aad(%rip), %rsi     # 0xebd1f
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xc927e
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x7ab60
jmp 0xc9294
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc92a0
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc92b6
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq $-0x1, %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc9323
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc930b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc9309
jmp 0xc930b
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc9321
jmp 0xc9323
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nop
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamFtp_p.cpp
// Function: BamTools::Internal::BamFtp::WriteDataSocket(char const*, unsigned int)
int64_t BamFtp::WriteDataSocket(const char* data, const unsigned int numBytes) {
    (void)data;
    (void)numBytes;
    BT_ASSERT_X(false, "BamFtp::WriteDataSocket: write-mode not supported on this device");
    SetErrorString("BamFtp::Write", "write-mode not supported on this device");
    return -1;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x761a0
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7b5f0
movq 0x18(%rsp), %rdx
leaq 0x22986(%rip), %rsi     # 0xebd11
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xc9397
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x2296d(%rip), %rsi     # 0xebd1f
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xc93be
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x7ab60
jmp 0xc93d4
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc93e0
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc93f6
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq $-0x1, %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc9463
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xc944b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xc9449
jmp 0xc944b
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xc9461
jmp 0xc9463
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nop
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::~BamHttp()
BamHttp::~BamHttp(void) {

    // close connection & clean up
    Close();
    if ( m_socket )
        delete m_socket;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x482a6(%rip), %rax     # 0x111f80
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0xc9cec
movq 0x8(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0xc9d4a
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0xc9d1f
movq (%rsp), %rdi
callq 0x732c0
jmp 0xc9d16
movq (%rsp), %rdi
callq 0x764d0
jmp 0xc9d4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xc9d99
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x764d0
jmp 0xc9d99
movq 0x8(%rsp), %rdi
addq $0x78, %rdi
callq 0x7cce8
jmp 0xc9d5a
movq 0x8(%rsp), %rdi
addq $0x58, %rdi
callq 0x7cce8
jmp 0xc9d6a
movq 0x8(%rsp), %rdi
addq $0x38, %rdi
callq 0x7cce8
jmp 0xc9d7a
movq 0x8(%rsp), %rdi
callq 0x72ba0
addq $0x28, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xc9dbb
movq 0x8(%rsp), %rdi
addq $0x78, %rdi
callq 0x7cce8
jmp 0xc9da9
jmp 0xc9dbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xc9ddd
movq 0x8(%rsp), %rdi
addq $0x58, %rdi
callq 0x7cce8
jmp 0xc9dcb
jmp 0xc9ddd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xc9def
movq 0x8(%rsp), %rdi
addq $0x38, %rdi
callq 0x7cce8
jmp 0xc9ded
jmp 0xc9def
movq 0x8(%rsp), %rdi
callq 0x72ba0
jmp 0xc9dfb
jmp 0xc9dfd
movq 0x18(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nop
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::Close()
void BamHttp::Close(void) {

    // disconnect socket & clear related resources
    DisconnectSocket();

    // reset state
    m_isUrlParsed = false;
    m_filePosition     = -1;
    m_fileEndPosition  = -1;
    m_rangeEndPosition = -1;
    m_mode = IBamIODevice::NotOpen;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x73bd0
movq 0x8(%rsp), %rax
movb $0x0, 0xa8(%rax)
movq $-0x1, 0xb0(%rax)
movq $-0x1, 0xb8(%rax)
movq $-0x1, 0xc0(%rax)
movl $0x0, 0x8(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::DisconnectSocket()
void BamHttp::DisconnectSocket(void) {

    // disconnect socket & clean up
    m_socket->DisconnectFromHost();
    ClearResponse();
    if ( m_request )  {
        delete m_request;
        m_request = 0;
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rax), %rdi
callq 0x7b600
movq 0x8(%rsp), %rdi
callq 0x73f50
movq 0x8(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0xc9f85
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0xc9f75
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x98(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::ConnectSocket()
bool BamHttp::ConnectSocket(void) {

    BT_ASSERT_X(m_socket, "null socket?");

    // any state checks, etc?
    if ( !m_socket->ConnectToHost(m_hostname, m_port, m_mode) ) {
        SetErrorString("BamHttp::ConnectSocket", m_socket->GetErrorString());
        return false;
    }

    // return success
    return true;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x761a0
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movq %rax, %rsi
addq $0x38, %rsi
movq %rax, %rdx
addq $0x58, %rdx
movl 0x8(%rax), %ecx
callq 0x73c30
testb $0x1, %al
jne 0xca09e
leaq 0x47(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x7b5f0
movq (%rsp), %rdx
leaq 0x21dd5(%rip), %rsi     # 0xebdbd
leaq 0x48(%rsp), %rdi
callq 0x78e70
jmp 0xc9ff4
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0x77a20
jmp 0xca009
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x7ab60
jmp 0xca01f
leaq 0x10(%rsp), %rdi
callq 0x7cce8
jmp 0xca02b
leaq 0x48(%rsp), %rdi
callq 0x7cce8
jmp 0xca037
leaq 0x47(%rsp), %rdi
callq 0x76f80
movb $0x0, 0x77(%rsp)
jmp 0xca0a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xca092
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xca084
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x7cce8
jmp 0xca082
jmp 0xca084
leaq 0x48(%rsp), %rdi
callq 0x7cce8
jmp 0xca090
jmp 0xca092
leaq 0x47(%rsp), %rdi
callq 0x76f80
jmp 0xca0ae
movb $0x1, 0x77(%rsp)
movb 0x77(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::toLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static inline
string toLower(const string& s) {
    string out;
    const size_t sSize = s.size();
    out.reserve(sSize);
    for ( size_t i = 0; i < sSize; ++i )
        out[i] = tolower(s[i]);
    return out;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movb $0x0, 0x57(%rsp)
callq 0x79100
movq 0x58(%rsp), %rdi
callq 0x74cd0
movq %rax, 0x28(%rsp)
jmp 0xcaab6
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rsi
callq 0x7a230
jmp 0xcaad1
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0xcab58
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x771c0
movq %rax, 0x10(%rsp)
jmp 0xcaafc
movq 0x10(%rsp), %rax
movsbl (%rax), %edi
callq 0x798a0
movq 0x18(%rsp), %rdi
movb %al, 0x7(%rsp)
movq 0x30(%rsp), %rsi
callq 0x7cb00
movq %rax, 0x8(%rsp)
jmp 0xcab23
movq 0x8(%rsp), %rax
movb 0x7(%rsp), %cl
movb %cl, (%rax)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0xcaada
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x7cce8
jmp 0xcab78
movb $0x1, 0x57(%rsp)
testb $0x1, 0x57(%rsp)
jne 0xcab6e
movq 0x18(%rsp), %rdi
callq 0x7cce8
movq 0x20(%rsp), %rax
addq $0x68, %rsp
retq
jmp 0xcab7a
movq 0x40(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::WriteToSocket(char const*, unsigned int)
int64_t BamHttp::WriteToSocket(const char* data, const unsigned int numBytes) {
    if ( !m_socket->IsConnected() )
        return -1;
    m_socket->ClearBuffer();
    return m_socket->Write(data, numBytes);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rax), %rdi
callq 0x75cd0
testb $0x1, %al
jne 0xcc793
movq $-0x1, 0x20(%rsp)
jmp 0xcc7bb
movq (%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x7b680
movq (%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x73b10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::Write(char const*, unsigned int)
int64_t BamHttp::Write(const char* data, const unsigned int numBytes) {
    (void)data;
    (void)numBytes;
    BT_ASSERT_X(false, "BamHttp::Write : write-mode not supported on this device");
    SetErrorString("BamHttp::Write", "write-mode not supported on this device");
    return -1;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x761a0
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7b5f0
movq 0x18(%rsp), %rdx
leaq 0x1f66c(%rip), %rsi     # 0xebed7
leaq 0x60(%rsp), %rdi
callq 0x78e70
jmp 0xcc877
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rdx
leaq 0x1f48d(%rip), %rsi     # 0xebd1f
leaq 0x28(%rsp), %rdi
callq 0x78e70
jmp 0xcc89e
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x7ab60
jmp 0xcc8b4
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xcc8c0
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xcc8d6
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq $-0x1, %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xcc943
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xcc92b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7cce8
jmp 0xcc929
jmp 0xcc92b
leaq 0x27(%rsp), %rdi
callq 0x76f80
leaq 0x60(%rsp), %rdi
callq 0x7cce8
jmp 0xcc941
jmp 0xcc943
leaq 0x5f(%rsp), %rdi
callq 0x76f80
movq 0x50(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nop