LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x28c40
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x47672
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa0(%rbx)
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x4768f
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x98(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x30(%rdi), %rdi
leaq 0x38(%r14), %rsi
leaq 0x58(%r14), %rdx
movl 0x8(%r14), %ecx
callq 0x26b60
movl %eax, %ebx
testb %al, %al
jne 0x47717
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf467(%rip), %rsi      # 0x56b30
leaq 0xf476(%rip), %rdx      # 0x56b46
movq %rsp, %rdi
callq 0x26750
movq 0x30(%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x27b40
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x288b0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47709
callq 0x27560
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x47717
callq 0x27560
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4773e
callq 0x27560
jmp 0x4773e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4774c
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::Open(BamTools::IBamIODevice::OpenMode)
bool BamHttp::Open(const IBamIODevice::OpenMode mode) {

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

    // attempt connection to socket
    if ( !ConnectSocket() ) {
        SetErrorString("BamHttp::Open", m_socket->GetErrorString());
        return false;
    }

    // initialize our file positions
    m_filePosition     = 0;
    m_fileEndPosition  = 0;
    m_rangeEndPosition = 0;

    // attempt to send initial request (just 'HEAD' to check connection)
    if ( !SendHeadRequest() ) {
        SetErrorString("BamHttp::Open", m_socket->GetErrorString());
        return false;
    }

    // clear response from HEAD request, not needed
    ClearResponse();

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0x477f8
movl $0x1, 0x8(%rbx)
movq %rbx, %rdi
callq 0x28830
testb %al, %al
je 0x47879
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%rbx)
movq $0x0, 0xc0(%rbx)
movq %rbx, %rdi
callq 0x27460
testb %al, %al
je 0x478bc
movq 0xa0(%rbx), %rdi
movb $0x1, %bpl
testq %rdi, %rdi
je 0x4786c
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa0(%rbx)
jmp 0x4786c
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf33f(%rip), %rsi      # 0x56b47
leaq 0xf345(%rip), %rdx      # 0x56b54
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf1c3(%rip), %rsi      # 0x569ec
leaq 0xf1e3(%rip), %rdx      # 0x56a13
leaq 0x28(%rsp), %rdi
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4785b
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4786a
callq 0x27560
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf2be(%rip), %rsi      # 0x56b47
leaq 0xf2c4(%rip), %rdx      # 0x56b54
leaq 0x8(%rsp), %rdi
callq 0x26750
movq 0x30(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x27b40
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
jmp 0x478fd
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xf27b(%rip), %rsi      # 0x56b47
leaq 0xf281(%rip), %rdx      # 0x56b54
leaq 0x8(%rsp), %rdi
callq 0x26750
movq 0x30(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x27b40
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x47856
jmp 0x4785b
jmp 0x4791a
jmp 0x47945
jmp 0x47959
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4793e
jmp 0x47948
jmp 0x47945
jmp 0x47959
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x47948
callq 0x27560
jmp 0x47948
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4795c
callq 0x27560
jmp 0x4795c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BamHttp_p.cpp
// Function: BamTools::Internal::BamHttp::Seek(long const&, int)
bool BamHttp::Seek(const int64_t& position, const int origin) {

    // if HTTP device not in a valid state
    if ( !IsOpen() ) {
        SetErrorString("BamHttp::Seek", "cannot seek on unopen connection");
        return false;
    }

    // reset the connection
    DisconnectSocket();
    if ( !ConnectSocket() ) {
        SetErrorString("BamHttp::Seek", m_socket->GetErrorString());
        return false;
    }

    // udpate file position
    switch ( origin ) {
        case SEEK_CUR : m_filePosition += position; break;
        case SEEK_SET : m_filePosition  = position; break;
        default :
            SetErrorString("BamHttp::Seek", "unsupported seek origin");
            return false;
    }

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x50(%rax)
testb %al, %al
je 0x486ee
movq %rbx, %rdi
callq 0x26b30
movq %rbx, %rdi
callq 0x28830
testb %al, %al
je 0x4876d
testl %ebp, %ebp
je 0x487be
cmpl $0x1, %ebp
jne 0x487cc
movq (%r14), %rax
addq %rax, 0xb0(%rbx)
jmp 0x487c8
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe4d4(%rip), %rsi      # 0x56bd2
leaq 0xe4da(%rip), %rdx      # 0x56bdf
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe4c1(%rip), %rsi      # 0x56be0
leaq 0xe4da(%rip), %rdx      # 0x56c00
leaq 0x28(%rsp), %rdi
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x48751
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x48760
callq 0x27560
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe455(%rip), %rsi      # 0x56bd2
leaq 0xe45b(%rip), %rdx      # 0x56bdf
leaq 0x8(%rsp), %rdi
callq 0x26750
movq 0x30(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x27b40
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4874c
jmp 0x48751
movq (%r14), %rax
movq %rax, 0xb0(%rbx)
movb $0x1, %al
jmp 0x48762
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe3f6(%rip), %rsi      # 0x56bd2
leaq 0xe3fc(%rip), %rdx      # 0x56bdf
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe404(%rip), %rsi      # 0x56c01
leaq 0xe414(%rip), %rdx      # 0x56c18
leaq 0x28(%rsp), %rdi
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x288b0
jmp 0x48742
jmp 0x48842
jmp 0x48856
jmp 0x4886a
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4884f
jmp 0x48859
jmp 0x48856
jmp 0x4886a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x48859
callq 0x27560
jmp 0x48859
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4886d
callq 0x27560
jmp 0x4886d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe354(%rip), %rsi      # 0x56c4a
leaq 0xe35b(%rip), %rdx      # 0x56c58
leaq 0x20(%rsp), %rdi
callq 0x26750
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe19b(%rip), %rsi      # 0x56ab2
leaq 0xe1bb(%rip), %rdx      # 0x56ad9
movq %rsp, %rdi
callq 0x26750
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x288b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x48944
callq 0x27560
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x48953
callq 0x27560
movq $-0x1, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4897a
callq 0x27560
jmp 0x4897a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x48989
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::Close()
void BgzfStream::Close(void) {

    // skip if no device open
    if ( m_device == 0 ) return;

    // if writing to file, flush the current BGZF block,
    // then write an empty block (as EOF marker)
    if ( m_device->IsOpen() && (m_device->Mode() == IBamIODevice::WriteOnly) ) {
        FlushBlock();
        const size_t blockLength = DeflateBlock(0);
        m_device->Write(m_compressedBlock.Buffer, blockLength);
    }

    // close device
    m_device->Close();
    delete m_device;
    m_device = 0;

    // ensure our buffers are cleared out
    m_uncompressedBlock.Clear();
    m_compressedBlock.Clear();

    // reset state
    m_blockLength = 0;
    m_blockOffset = 0;
    m_blockAddress = 0;
    m_isWriteCompressed = true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x48e1f
movq (%rdi), %rax
callq *0x50(%rax)
testb %al, %al
je 0x48dd6
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl $0x2, %eax
jne 0x48dd6
movq %rbx, %rdi
callq 0x27bb0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x265b0
movq 0x18(%rbx), %rdi
movq 0x30(%rbx), %rsi
movq (%rdi), %rcx
movl %eax, %edx
callq *0x40(%rcx)
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x48def
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
xorl %esi, %esi
callq 0x26bc0
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rdx
xorl %esi, %esi
callq 0x26bc0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movb $0x1, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::CheckBlockHeader(char*)
bool BgzfStream::CheckBlockHeader(char* header) {
    return (header[0] == Constants::GZIP_ID1 &&
            header[1] == Constants::GZIP_ID2 &&
            header[2] == Z_DEFLATED &&
            (header[3] & Constants::FLG_FEXTRA) != 0 &&
            BamTools::UnpackUnsignedShort(&header[10]) == Constants::BGZF_XLEN &&
            header[12] == Constants::BGZF_ID1 &&
            header[13] == Constants::BGZF_ID2 &&
            BamTools::UnpackUnsignedShort(&header[14]) == Constants::BGZF_LEN );
}

// Assembly:
cmpb $0x1f, (%rdi)
jne 0x48e55
cmpb $-0x75, 0x1(%rdi)
jne 0x48e55
cmpb $0x8, 0x2(%rdi)
jne 0x48e55
testb $0x4, 0x3(%rdi)
je 0x48e55
cmpw $0x6, 0xa(%rdi)
jne 0x48e55
cmpb $0x42, 0xc(%rdi)
jne 0x48e55
cmpb $0x43, 0xd(%rdi)
jne 0x48e55
cmpw $0x2, 0xe(%rdi)
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BamTools::IBamIODevice::OpenMode)
void BgzfStream::Open(const string& filename, const IBamIODevice::OpenMode mode) {

    // close current device if necessary
    Close();
    BT_ASSERT_X( (m_device == 0), "BgzfStream::Open() - unable to properly close previous IO device" );

    // retrieve new IO device depending on filename
    m_device = BamDeviceFactory::CreateDevice(filename);
    BT_ASSERT_X( m_device, "BgzfStream::Open() - unable to create IO device from filename" );

    // if device fails to open
    if ( !m_device->Open(mode) ) {
        const string deviceError = m_device->GetErrorString();
        const string message = string("could not open BGZF stream: \n\t") + deviceError;
        throw BamException("BgzfStream::Open", message);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x27180
movq %r14, %rdi
callq 0x272b0
movq %rax, 0x18(%rbx)
movq (%rax), %rcx
movq %rax, %rdi
movl %ebp, %esi
callq *0x20(%rcx)
testb %al, %al
je 0x49a5b
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rsi
movq (%rsi), %rax
leaq 0x48(%rsp), %rdi
callq *0x48(%rax)
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xd3e9(%rip), %rsi      # 0x56e63
leaq 0xd400(%rip), %rdx      # 0x56e81
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x29120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x49aae
callq 0x27560
movl $0x28, %edi
callq 0x269d0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xd3b8(%rip), %rsi      # 0x56e82
leaq 0xd3c1(%rip), %rdx      # 0x56e92
callq 0x26750
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x21444(%rip), %rsi     # 0x6af38
movq 0x2147d(%rip), %rdx     # 0x6af78
movq %r14, %rdi
callq 0x28a20
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x49b15
callq 0x27560
testb %bpl, %bpl
jne 0x49b1f
jmp 0x49b27
movq %rax, %rbx
movq %r14, %rdi
callq 0x27070
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x49b44
jmp 0x49b4e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x49b4e
callq 0x27560
jmp 0x49b4e
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49b61
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::Read(char*, unsigned long)
size_t BgzfStream::Read(char* data, const size_t dataLength) {

    if ( dataLength == 0 )
        return 0;

    // if stream not open for reading
    BT_ASSERT_X( m_device, "BgzfStream::Read() - trying to read from null device");
    if ( !m_device->IsOpen() || (m_device->Mode() != IBamIODevice::ReadOnly) )
        return 0;

    // read blocks as needed until desired data length is retrieved
    char* output = data;
    size_t numBytesRead = 0;
    while ( numBytesRead < dataLength ) {

        // determine bytes available in current block
        int bytesAvailable = m_blockLength - m_blockOffset;

        // read (and decompress) next block if needed
        if ( bytesAvailable <= 0 ) {
            ReadBlock();
            bytesAvailable = m_blockLength - m_blockOffset;
            if ( bytesAvailable <= 0 )
                break;
        }

        // copy data from uncompressed source buffer into data destination buffer
        const size_t copyLength = min( (dataLength-numBytesRead), (size_t)bytesAvailable );
        memcpy(output, m_uncompressedBlock.Buffer + m_blockOffset, copyLength);

        // update counters
        m_blockOffset += copyLength;
        output        += copyLength;
        numBytesRead  += copyLength;
    }

    // update block data
    if ( m_blockOffset == m_blockLength ) {
        m_blockAddress = m_device->Tell();
        m_blockOffset  = 0;
        m_blockLength  = 0;
    }

    // return actual number of bytes read
    return numBytesRead;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x49c17
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
testb %al, %al
je 0x49c17
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl $0x1, %eax
jne 0x49c17
movl 0x4(%rbx), %eax
xorl %r14d, %r14d
movl (%rbx), %edx
subl %eax, %edx
jg 0x49bc5
movq %rbx, %rdi
callq 0x26830
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
movl %ecx, %edx
subl %eax, %edx
jle 0x49bfc
movq %r15, %r13
subq %r14, %r13
movl %edx, %ecx
cmpq %rcx, %r13
cmovaeq %rcx, %r13
movslq %eax, %rsi
addq 0x20(%rbx), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x27260
movl 0x4(%rbx), %eax
addl %r13d, %eax
movl %eax, 0x4(%rbx)
addq %r13, %r12
addq %r13, %r14
cmpq %r15, %r14
jb 0x49bac
movl (%rbx), %ecx
cmpl %ecx, %eax
jne 0x49c1a
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, 0x8(%rbx)
movq $0x0, (%rbx)
jmp 0x49c1a
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::Seek(long const&)
void BgzfStream::Seek(const int64_t& position) {

    BT_ASSERT_X( m_device, "BgzfStream::Seek() - trying to seek on null IO device");

    // skip if device is not open
    if ( !IsOpen() ) return;

    // determine adjusted offset & address
    int     blockOffset  = (position & 0xFFFF);
    int64_t blockAddress = (position >> 16) & 0xFFFFFFFFFFFFLL;

    // attempt seek in file
    if ( m_device->IsRandomAccess() && m_device->Seek(blockAddress) ) {

        // update block data & return success
        m_blockLength  = 0;
        m_blockAddress = blockAddress;
        m_blockOffset  = blockOffset;
    }
    else {
        stringstream s("");
        s << "unable to seek to position: " << position;
        throw BamException("BgzfStream::Seek", s.str());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x4a170
movq %rsi, %rbx
movq (%rdi), %rax
callq *0x50(%rax)
testb %al, %al
je 0x4a170
movq (%rbx), %r15
movq %r15, %rax
shrq $0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
je 0x4a17e
movq 0x18(%r14), %rdi
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq *0x30(%rax)
testb %al, %al
je 0x4a17e
movzwl %r15w, %eax
movl $0x0, (%r14)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%r14)
movl %eax, 0x4(%r14)
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xbd01(%rip), %rdx      # 0x55e8f
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x18, %edx
callq 0x28740
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a1be
callq 0x27560
leaq 0x60(%rsp), %r14
leaq 0xcd36(%rip), %rsi      # 0x56f00
movl $0x1c, %edx
movq %r14, %rdi
callq 0x27a70
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x27570
movl $0x28, %edi
callq 0x269d0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xcd1f(%rip), %rsi      # 0x56f1d
leaq 0xcd28(%rip), %rdx      # 0x56f2d
callq 0x26750
leaq 0x68(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x28730
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x20d01(%rip), %rsi     # 0x6af38
movq 0x20d3a(%rip), %rdx     # 0x6af78
movq %rbx, %rdi
callq 0x28a20
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a25c
callq 0x27560
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a26b
callq 0x27560
testb %bpl, %bpl
jne 0x4a289
jmp 0x4a296
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a289
callq 0x27560
jmp 0x4a289
movq %rax, %r14
movq %rbx, %rdi
callq 0x27070
jmp 0x4a296
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x270d0
jmp 0x4a2c1
movq %rax, %rdi
callq 0x2f047
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a2c1
callq 0x27560
jmp 0x4a2c1
movq %rax, %r14
movq %r14, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/BgzfStream_p.cpp
// Function: BamTools::Internal::BgzfStream::Write(char const*, unsigned long)
size_t BgzfStream::Write(const char* data, const size_t dataLength) {

    BT_ASSERT_X( m_device, "BgzfStream::Write() - trying to write to null IO device");
    BT_ASSERT_X( (m_device->Mode() == IBamIODevice::WriteOnly),
                 "BgzfStream::Write() - trying to write to non-writable IO device");

    // skip if file not open for writing
    if ( !IsOpen() )
        return 0;

    // write blocks as needed til all data is written
    size_t numBytesWritten = 0;
    const char* input = data;
    const size_t blockLength = Constants::BGZF_DEFAULT_BLOCK_SIZE;
    while ( numBytesWritten < dataLength ) {

        // copy data contents to uncompressed output buffer
        unsigned int copyLength = min(blockLength - m_blockOffset, dataLength - numBytesWritten);
        char* buffer = m_uncompressedBlock.Buffer;
        memcpy(buffer + m_blockOffset, input, copyLength);

        // update counter
        m_blockOffset   += copyLength;
        input           += copyLength;
        numBytesWritten += copyLength;

        // flush (& compress) output buffer when full
        if ( m_blockOffset == static_cast<int32_t>(blockLength) )
            FlushBlock();
    }

    // return actual number of bytes written
    return numBytesWritten;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x4a37e
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
callq *0x50(%rax)
xorb $0x1, %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x4a37e
xorl %r12d, %r12d
movslq 0x4(%r15), %rdi
movl $0x10000, %eax          # imm = 0x10000
subq %rdi, %rax
movq %rbx, %rbp
subq %r12, %rbp
cmpq %rax, %rbp
cmovaeq %rax, %rbp
addq 0x20(%r15), %rdi
movl %ebp, %r13d
movq %r14, %rsi
movq %r13, %rdx
callq 0x27260
addl 0x4(%r15), %ebp
movl %ebp, 0x4(%r15)
cmpl $0x10000, %ebp          # imm = 0x10000
jne 0x4a371
movq %r15, %rdi
callq 0x27bb0
addq %r13, %r14
addq %r13, %r12
cmpq %rbx, %r12
jb 0x4a32e
jmp 0x4a381
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/ByteArray_p.cpp
// Function: BamTools::Internal::ByteArray::IndexOf(char, unsigned long, unsigned long) const
size_t ByteArray::IndexOf(const char c, const size_t from, const size_t to) const {
    const size_t size = ( (to == 0 ) ? m_data.size() : to );
    for ( size_t i = from; i < size; ++i ) {
        if ( m_data.at(i) == c ) 
            return i;
    }
    return m_data.size();
}

// Assembly:
pushq %rax
movq (%rdi), %r8
movq 0x8(%rdi), %rax
subq %r8, %rax
testq %rcx, %rcx
cmoveq %rax, %rcx
cmpq %rdx, %rcx
jbe 0x4a4c4
movq %rdx, %rdi
cmpq %rdi, %rax
jbe 0x4a4c6
cmpb %sil, (%r8,%rdi)
je 0x4a4c1
incq %rdi
cmpq %rdi, %rcx
jne 0x4a4ac
jmp 0x4a4c4
movq %rdi, %rax
popq %rcx
retq
cmpq %rax, %rdx
cmovbeq %rax, %rdx
leaq 0xadce(%rip), %rdi      # 0x552a2
movq %rdx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x284e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/ByteArray_p.cpp
// Function: BamTools::Internal::ByteArray::Remove(unsigned long, unsigned long)
ByteArray& ByteArray::Remove(size_t from, size_t n) {

    // if 'from' outside range, just return
    const size_t originalSize = m_data.size();
    if ( from >= originalSize )
        return *this;

    // if asked to clip from 'from' to end (or beyond), simply resize
    if ( from + n >= originalSize )
        Resize(from);

    // otherwise, shift data & resize
    else {
        memmove( &m_data[from], &m_data[from+n], (originalSize-from-n) );
        Resize(originalSize - n);
    }

    // return reference to modified byte array
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %r15
subq %rcx, %r15
cmpq %rsi, %r15
jbe 0x4a529
movq %rdx, %r14
leaq (%rdx,%rsi), %rax
movq %r15, %rdx
subq %rax, %rdx
jbe 0x4a51f
addq %rcx, %rsi
addq %rcx, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x287c0
subq %r14, %r15
movq %r15, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x29060
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::HostAddress::SetAddress(unsigned char const*)
void HostAddress::SetAddress(const uint8_t* ip6Address) {
    for ( uint8_t i = 0; i < 16; ++i )
        m_ip6Address[i] = ip6Address[i];
    m_protocol = HostAddress::IPv6Protocol;
    m_hasIpAddress = true;
}

// Assembly:
xorl %eax, %eax
movb (%rsi,%rax), %cl
movb %cl, 0x8(%rdi,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x4aba8
movl $0x1, (%rdi)
movb $0x1, 0x38(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::HostAddress::operator==(BamTools::Internal::HostAddress const&) const
bool HostAddress::operator==(const HostAddress& other) const {

    // if self is IPv4
    if ( m_protocol == HostAddress::IPv4Protocol ) {
        return ( other.m_protocol == HostAddress::IPv4Protocol &&
                 m_ip4Address == other.m_ip4Address
               );
    }

    // if self is IPv6
    else if ( m_protocol == HostAddress::IPv6Protocol ) {
        return ( other.m_protocol == HostAddress::IPv6Protocol &&
                 memcmp(&m_ip6Address, &other.m_ip6Address, sizeof(IPv6Address)) == 0
               );
    }

    // otherwise compare protocols
    else return m_protocol == other.m_protocol;
}

// Assembly:
movl (%rdi), %ecx
movl (%rsi), %eax
cmpl $0x1, %ecx
je 0x4ad07
testl %ecx, %ecx
jne 0x4ad25
movl 0x4(%rsi), %ecx
xorl 0x4(%rdi), %ecx
orl %ecx, %eax
jmp 0x4ad27
cmpl $0x1, %eax
jne 0x4ad2b
movdqu 0x8(%rdi), %xmm0
movdqu 0x8(%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jmp 0x4ad27
cmpl %eax, %ecx
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::HostAddress::operator<(BamTools::Internal::HostAddress const&) const
bool HostAddress::operator<(const HostAddress& other) const {

    // if self is IPv4
    if ( m_protocol == HostAddress::IPv4Protocol ) {
        if ( other.m_protocol == HostAddress::IPv4Protocol )
            return m_ip4Address < other.m_ip4Address;
    }

    // if self is IPv6
    else if ( m_protocol == HostAddress::IPv6Protocol ) {
        if ( other.m_protocol == HostAddress::IPv6Protocol )
            return (memcmp(&m_ip6Address, &other.m_ip6Address, sizeof(IPv6Address)) < 0);
    }

    // otherwise compare protocol types
    return m_protocol < other.m_protocol;
}

// Assembly:
movl (%rdi), %eax
movl (%rsi), %ecx
cmpl $0x1, %eax
je 0x4ad49
testl %eax, %eax
jne 0x4ad84
testl %ecx, %ecx
jne 0x4ad84
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
setb %al
retq
cmpl $0x1, %ecx
jne 0x4ad84
movq 0x8(%rdi), %rcx
bswapq %rcx
movq 0x8(%rsi), %rdx
bswapq %rdx
cmpq %rdx, %rcx
jne 0x4ad76
movq 0x10(%rdi), %rcx
movq 0x10(%rsi), %rdx
bswapq %rcx
bswapq %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x4ad80
xorl %eax, %eax
cmpq %rdx, %rcx
sbbl %eax, %eax
orl $0x1, %eax
shrl $0x1f, %eax
retq
cmpl %ecx, %eax
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::HostAddress::GetIPString[abi:cxx11]() const
std::string HostAddress::GetIPString(void) const {

    stringstream ss("");

    // IPv4 format
    if ( m_protocol == HostAddress::IPv4Protocol ) {
        ss << ( (m_ip4Address>>24) & 0xff ) << '.'
           << ( (m_ip4Address>>16) & 0xff ) << '.'
           << ( (m_ip4Address>> 8) & 0xff ) << '.'
           << (  m_ip4Address      & 0xff );

    }

    // IPv6 format
    else if ( m_protocol == HostAddress::IPv6Protocol ) {
        for ( uint8_t i = 0; i < 8; ++i ) {
            if ( i != 0 )
                ss << ':';
                ss << hex << ( (uint16_t(m_ip6Address[2*i]) << 8) |
                               (uint16_t(m_ip6Address[2*i+1]))
                             );
        }
    }

    // return result (empty string if unknown protocol)
    return ss.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb09d(%rip), %rdx      # 0x55e8f
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x18, %edx
callq 0x28740
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ae22
callq 0x27560
movl (%r14), %eax
testl %eax, %eax
je 0x4ae90
cmpl $0x1, %eax
jne 0x4af05
leaq 0x38(%rsp), %r15
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
testq %r13, %r13
je 0x4ae59
movb $0x3a, 0x8(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x27a70
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x50(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x50(%rsp,%rax)
movzwl 0x8(%r14,%r13,2), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %r15, %rdi
callq 0x28a90
incq %r13
cmpq $0x8, %r13
jne 0x4ae3f
jmp 0x4af05
leaq 0x38(%rsp), %rdi
movzbl 0x7(%r14), %esi
callq 0x26fb0
leaq 0x8(%rsp), %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movzbl 0x6(%r14), %esi
movq %rax, %rdi
callq 0x26fb0
leaq 0x8(%rsp), %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movzbl 0x5(%r14), %esi
movq %rax, %rdi
callq 0x26fb0
leaq 0x8(%rsp), %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movzbl 0x4(%r14), %esi
movq %rax, %rdi
callq 0x26fb0
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x28730
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4af58
callq 0x27560
jmp 0x4af58
movq %rax, %rbx
jmp 0x4af58
jmp 0x4af4b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_p.cpp
// Function: BamTools::Internal::ParseIp4(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int&)
static
bool ParseIp4(const string& address, uint32_t& maybeIp4 ) {

    // split IP address into string fields
    vector<string> addressFields = Split(address, '.');
    if ( addressFields.size() != 4 )
        return false;

    // convert each field to integer value
    uint32_t ipv4(0);
    for ( uint8_t i = 0; i < 4; ++i ) {

        const string& field = addressFields.at(i);
        const size_t fieldSize = field.size();
        for ( size_t j = 0; j < fieldSize; ++j ) {
            if ( !isdigit(field[j]) )
                return false;
        }

        int value = atoi( addressFields.at(i).c_str() );
        if ( value < 0 || value > 255 )
            return false;

        // append byte value
        ipv4 <<= 8;
        ipv4 += value;
    }

    // store 32-bit IP address & return success
    maybeIp4 = ipv4;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x2e, %edx
callq 0x4b4a7
movq (%rbx), %r12
movq 0x8(%rbx), %r15
subq %r12, %r15
xorl %ebx, %ebx
cmpq $0x80, %r15
jne 0x4b45c
sarq $0x5, %r15
xorl %r13d, %r13d
cmpq %r15, %r13
je 0x4b476
movq %r13, %rax
shlq $0x5, %rax
movq (%r12,%rax), %rdi
movq 0x8(%r12,%rax), %rax
testq %rax, %rax
je 0x4b439
xorl %ecx, %ecx
movsbl (%rdi,%rcx), %edx
addl $-0x30, %edx
cmpl $0xa, %edx
jae 0x4b45a
incq %rcx
cmpq %rcx, %rax
jne 0x4b425
callq 0x28640
cmpl $0xff, %eax
ja 0x4b45a
shll $0x8, %ebx
orl %eax, %ebx
incq %r13
cmpq $0x4, %r13
jne 0x4b409
movl %ebx, (%r14)
movb $0x1, %bl
jmp 0x4b45c
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x270a0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9e25(%rip), %rdi      # 0x552a2
movq %r15, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x284e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x270a0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HostAddress_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, char delim) {
    stringstream ss(source);
    string field;
    vector<string> fields;
    while ( getline(ss, field, delim) )
        fields.push_back(field);
    return fields;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0x28740
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb $0x0, (%r12)
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movsbl %bpl, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x28ea0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4b51e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26ab0
jmp 0x4b4f6
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b52d
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x270d0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x270a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b561
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x270d0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HttpHeader_p.cpp
// Function: BamTools::Internal::HttpHeader::ParseLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
bool HttpHeader::ParseLine(const string& line, int) {

    // find colon position, return failure if not found
    const size_t colonFound = line.find(Constants::COLON_CHAR);
    if ( colonFound == string::npos )
        return false;

    // store key/value (without leading/trailing whitespace) & return success
    const string key   = Trim(line.substr(0, colonFound));
    const string value = Trim(line.substr(colonFound+1));
    m_fields[key] = value;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x27ef0
movq %rax, %rbx
cmpq $-0x1, %rax
je 0x4c85e
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x277f0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x48(%rsp), %rdi
callq 0x4c6c2
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x4c7df
callq 0x27560
leaq 0x1(%rbx), %rdx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x277f0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x4c6c2
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c81e
callq 0x27560
addq $0x8, %r14
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x26130
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x26b80
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c84b
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c85e
callq 0x27560
cmpq $-0x1, %rbx
setne %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4c8a0
jmp 0x4c8a5
movq %rax, %rbx
jmp 0x4c8a5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
jmp 0x4c8aa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c8a5
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c8b8
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HttpHeader_p.cpp
// Function: BamTools::Internal::HttpHeader::ToString[abi:cxx11]() const
string HttpHeader::ToString(void) const {
    string result("");
    if ( m_isValid ) {
        map<string, string>::const_iterator fieldIter = m_fields.begin();
        map<string, string>::const_iterator fieldEnd  = m_fields.end();
        for ( ; fieldIter != fieldEnd; ++fieldIter ) {
            const string& key   = (*fieldIter).first;
            const string& value = (*fieldIter).second;
            const string& line  = key   + Constants::FIELD_SEPARATOR +
                                  value + Constants::FIELD_NEWLINE;
            result += line;
        }
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
leaq 0x9565(%rip), %rdx      # 0x55e8f
movq %rdx, %rsi
callq 0x26750
cmpb $0x1, 0x38(%r14)
jne 0x4c9f3
movq 0x20(%r14), %r15
addq $0x10, %r14
cmpq %r14, %r15
je 0x4c9f3
leaq 0x28(%rsp), %r13
leaq 0x48(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x20(%r15), %rsi
movq %r13, %rdi
leaq 0x20fd5(%rip), %rdx     # 0x6d940
callq 0x29120
leaq 0x40(%r15), %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x29120
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x20f94(%rip), %rdx     # 0x6d920
callq 0x29120
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4c9a5
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4c9b9
callq 0x27560
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x265d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4c9df
callq 0x27560
movq %r15, %rdi
callq 0x27ae0
movq %rax, %r15
cmpq %r14, %rax
jne 0x4c95d
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4ca49
movq %rax, %r14
jmp 0x4ca26
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4ca26
callq 0x27560
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x4ca3f
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4ca49
callq 0x27560
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x4ca57
callq 0x27560
movq %r14, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HttpHeader_p.cpp
// Function: BamTools::Internal::HttpRequestHeader::ToString[abi:cxx11]() const
string HttpRequestHeader::ToString(void) const {
    stringstream request("");
    request << m_method   << Constants::SPACE_CHAR
            << m_resource << Constants::SPACE_CHAR
            << Constants::HTTP_STRING << GetMajorVersion() << Constants::DOT_CHAR << GetMinorVersion()
            << Constants::FIELD_NEWLINE
            << HttpHeader::ToString()
            << Constants::FIELD_NEWLINE;
    return request.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x9070(%rip), %rdx      # 0x55e8f
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movl $0x18, %edx
callq 0x28740
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4ce4a
callq 0x27560
leaq 0x30(%rsp), %rdi
movq 0x48(%r14), %rsi
movq 0x50(%r14), %rdx
callq 0x27a70
movq %rsp, %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movq 0x68(%r14), %rsi
movq 0x70(%r14), %rdx
movq %rax, %rdi
callq 0x27a70
movq %rsp, %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movq 0x20ac7(%rip), %rsi     # 0x6d960
movq 0x20ac8(%rip), %rdx     # 0x6d968
movq %rax, %rdi
callq 0x27a70
movl 0x3c(%r14), %esi
movq %rax, %rdi
callq 0x28a90
movq %rsp, %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movl 0x40(%r14), %esi
movq %rax, %rdi
callq 0x28a90
movq 0x20a46(%rip), %rsi     # 0x6d920
movq 0x20a47(%rip), %rdx     # 0x6d928
movq %rax, %rdi
callq 0x27a70
movq %rax, %r15
movq %rsp, %rdi
movq %r14, %rsi
callq 0x28a10
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x27a70
movq 0x20a11(%rip), %rsi     # 0x6d920
movq 0x20a12(%rip), %rdx     # 0x6d928
movq %rax, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4cf2c
callq 0x27560
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x28730
leaq 0x20(%rsp), %rdi
callq 0x270d0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4cf82
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4cf8f
callq 0x27560
jmp 0x4cf8f
movq %rax, %rbx
jmp 0x4cf8f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4cf85
callq 0x27560
jmp 0x4cf85
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/HttpHeader_p.cpp
// Function: BamTools::Internal::HttpResponseHeader::ToString[abi:cxx11]() const
string HttpResponseHeader::ToString(void) const {
    stringstream response("");
    response << Constants::HTTP_STRING << GetMajorVersion() << Constants::DOT_CHAR << GetMinorVersion()
             << Constants::SPACE_CHAR  << m_statusCode
             << Constants::SPACE_CHAR  << m_reason
             << Constants::FIELD_NEWLINE
             << HttpHeader::ToString()
             << Constants::FIELD_NEWLINE;
    return response.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8ac0(%rip), %rdx      # 0x55e8f
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movl $0x18, %edx
callq 0x28740
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4d3fa
callq 0x27560
leaq 0x30(%rsp), %rdi
movq 0x2055a(%rip), %rsi     # 0x6d960
movq 0x2055b(%rip), %rdx     # 0x6d968
callq 0x27a70
movl 0x3c(%r14), %esi
movq %rax, %rdi
callq 0x28a90
movq %rsp, %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movl 0x40(%r14), %esi
movq %rax, %rdi
callq 0x28a90
movq %rsp, %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movl 0x44(%r14), %esi
movq %rax, %rdi
callq 0x28a90
movq %rsp, %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x27a70
movq 0x48(%r14), %rsi
movq 0x50(%r14), %rdx
movq %rax, %rdi
callq 0x27a70
movq 0x2049a(%rip), %rsi     # 0x6d920
movq 0x2049b(%rip), %rdx     # 0x6d928
movq %rax, %rdi
callq 0x27a70
movq %rax, %r15
movq %rsp, %rdi
movq %r14, %rsi
callq 0x28a10
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x27a70
movq 0x20465(%rip), %rsi     # 0x6d920
movq 0x20466(%rip), %rdx     # 0x6d928
movq %rax, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4d4d8
callq 0x27560
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x28730
leaq 0x20(%rsp), %rdi
callq 0x270d0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4d52e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4d53b
callq 0x27560
jmp 0x4d53b
movq %rax, %rbx
jmp 0x4d53b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4d531
callq 0x27560
jmp 0x4d531
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x270d0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/ILocalIODevice_p.cpp
// Function: BamTools::Internal::ILocalIODevice::Close()
void ILocalIODevice::Close(void) {

    // skip if not open
    if ( !IsOpen() )
        return;

    // flush & close FILE*
    fflush(m_stream);
    fclose(m_stream);
    m_stream = 0;

    // reset other device state
    m_mode = IBamIODevice::NotOpen;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x50(%rax)
testb %al, %al
je 0x4dced
movq 0x30(%rbx), %rdi
callq 0x27b70
movq 0x30(%rbx), %rdi
callq 0x276a0
movq $0x0, 0x30(%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/io/RollingBuffer_p.cpp
// Function: BamTools::Internal::RollingBuffer::RollingBuffer(unsigned long)
RollingBuffer::RollingBuffer(size_t growth)
    : m_bufferGrowth(growth)
{
    // buffer always contains at least 1 (maybe empty) byte array
    m_data.push_back( ByteArray() );

    // set cleared state
    Clear();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rsi, 0x20(%rdi)
leaq 0x28(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x29010
movq %rsp, %rdi
callq 0x27dd0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x274f0
movq %rsp, %rdi
callq 0x27470
movq %r14, %rdi
callq 0x27be0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
jmp 0x4dd95
movq %rax, %r14
movq %rsp, %rdi
callq 0x27470
jmp 0x4dd98
movq %rax, %r14
movq %rbx, %rdi
callq 0x27e80
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047