// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ReadNamesFileReader::Read(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ReadGroupResolver, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ReadGroupResolver>>>&)
bool ResolveTool::ReadNamesFileReader::Read(map<string, ReadGroupResolver>& readGroups) {

    // up-front sanity check
    if ( !m_stream.is_open() ) return false;

    // parse read names file
    string line;
    vector<string> fields;
    map<string, ReadGroupResolver>::iterator rgIter;
    map<string, ReadGroupResolver>::iterator rgEnd = readGroups.end();
    while ( getline(m_stream, line) ) {

        // skip if empty line
        if ( line.empty() ) continue;

        // split line on '\t'
        fields = Utilities::Split(line, TAB_CHAR);
        if ( fields.size() != 2 ) continue;

        // look up resolver for read group
        rgIter = readGroups.find( fields[0] );
        if ( rgIter == rgEnd ) return false;
        ReadGroupResolver& resolver = (*rgIter).second;

        // store read name with resolver
        resolver.ReadNames.insert( make_pair<string,bool>(fields[1], true) ) ;
    }

    // if here, return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x78, %rdi
callq 0x35130
testb %al, %al
je 0x4ebdf
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rbx, 0x20(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x28(%rsp), %r12
leaq 0x90(%rsp), %r13
leaq 0x68(%rsp), %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x35100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
setne %bl
jne 0x4ebe3
cmpq $0x0, 0x30(%rsp)
je 0x4eb0f
movq %r13, %rdi
movq %r12, %rsi
pushq $0x9
popq %rdx
callq 0x67d08
movq %rsp, %rdi
movq %r13, %rsi
callq 0x51a44
movq %r13, %rdi
callq 0x3abf0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x4eb0f
movq 0x20(%rsp), %rdi
callq 0x539f2
movq %rax, %rbp
cmpq 0x18(%rsp), %rax
je 0x4ebe3
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x35810
movq %r15, %rdi
movq %rbx, %rsi
callq 0x35810
movb $0x1, 0x88(%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x51b22
addq $0x70, %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x53a68
movq %r13, %rdi
callq 0x35730
movq %r15, %rdi
callq 0x35730
leaq 0x48(%rsp), %rdi
callq 0x35730
jmp 0x4eb0f
xorl %ebx, %ebx
jmp 0x4ebf5
movq %rsp, %rdi
callq 0x3abf0
leaq 0x28(%rsp), %rdi
callq 0x35730
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4ec61
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x35730
jmp 0x4ec2a
jmp 0x4ec56
movq %rax, %rbx
jmp 0x4ec34
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x35730
leaq 0x48(%rsp), %rdi
callq 0x35730
jmp 0x4ec59
jmp 0x4ec56
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3abf0
jmp 0x4ec59
jmp 0x4ec56
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3abf0
leaq 0x28(%rsp), %rdi
callq 0x35730
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198
nop