// File: /workspace/github_cpp_makefile_star2_O1/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 0x27130
testb %al, %al
je 0x46c3f
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx)
leaq 0x8(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0x98(%rsp), %r12
leaq 0x70(%rsp), %r13
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x27bb0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
setne %bpl
jne 0x46c43
cmpq $0x0, 0xa0(%rsp)
je 0x46ae4
movq %r13, %rdi
movq %r12, %rsi
movl $0x9, %edx
callq 0x66e70
movq %rsp, %rdi
movq %r13, %rsi
callq 0x4ab90
movq %r13, %rdi
callq 0x2f0de
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x46ae4
movq %rbx, %rdi
callq 0x4cda6
movq %rax, %r15
cmpq 0x68(%rsp), %rax
je 0x46c43
movq (%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2f122
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x2f122
movb $0x1, 0x60(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2f122
addq $0x70, %r15
movb 0x60(%rsp), %al
movb %al, 0x90(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x4ce0e
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x46c0e
callq 0x27560
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x46c22
callq 0x27560
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x46ae4
callq 0x27560
jmp 0x46ae4
xorl %ebp, %ebp
jmp 0x46c65
movq %rsp, %rdi
callq 0x2f0de
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x46c65
callq 0x27560
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x46cec
movq %rax, %rbx
jmp 0x46ca4
movq %rax, %rbx
jmp 0x46cb8
jmp 0x46ce1
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x46ca4
callq 0x27560
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x46cb8
callq 0x27560
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x46ce4
callq 0x27560
jmp 0x46ce4
jmp 0x46ce1
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2f0de
jmp 0x46ce4
jmp 0x46ce1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2f0de
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x46d06
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed