// File: zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::StatsFileReader::ParseReadGroupLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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::StatsFileReader::ParseReadGroupLine(const string& line,
                                                      map<string, ReadGroupResolver>& readGroups)
{
    // split read group data in to fields
    vector<string> fields = Utilities::Split(line, WHITESPACE_CHARS);
    if ( fields.size() != NUM_READGROUPS_FIELDS ) return false;

    // retrieve RG name
    const string& name = fields.at(0);

    // populate RG's 'resolver' data
    ReadGroupResolver resolver;

    stringstream dataStream;
    dataStream.str(fields.at(1));
    dataStream >> resolver.MedianFragmentLength;
    dataStream.clear();

    dataStream.str(fields.at(2));
    dataStream >> resolver.MinFragmentLength;
    dataStream.clear();

    dataStream.str(fields.at(3));
    dataStream >> resolver.MaxFragmentLength;
    dataStream.clear();

    dataStream.str(fields.at(4));
    dataStream >> resolver.TopModelId;
    dataStream.clear();

    dataStream.str(fields.at(5));
    dataStream >> resolver.NextTopModelId;
    dataStream.clear();

    resolver.IsAmbiguous = ( fields.at(6) == TRUE_KEYWORD );

    // store RG entry and return success
    readGroups.insert( make_pair<string, ReadGroupResolver>(name, resolver) );
    return true;
}

// Assembly:
subq $0x438, %rsp            # imm = 0x438
movq %rdi, 0x428(%rsp)
movq %rsi, 0x420(%rsp)
movq %rdx, 0x418(%rsp)
movq 0x420(%rsp), %rsi
leaq 0x9cff2(%rip), %rdx     # 0x165c60
leaq 0x400(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x115e50
movq 0x60(%rsp), %rdi
callq 0x936f0
movq %rax, 0x68(%rsp)
jmp 0xc8c91
movq 0x68(%rsp), %rax
cmpq $0x7, %rax
je 0xc8ccd
movb $0x0, 0x437(%rsp)
movl $0x1, 0x3f0(%rsp)
jmp 0xc9132
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc9150
xorl %eax, %eax
movl %eax, %esi
leaq 0x400(%rsp), %rdi
callq 0xcf8f0
movq %rax, 0x58(%rsp)
jmp 0xc8ce5
movq 0x58(%rsp), %rax
movq %rax, 0x3e8(%rsp)
leaq 0x388(%rsp), %rdi
callq 0xc75c0
jmp 0xc8d01
leaq 0x200(%rsp), %rdi
callq 0x86520
jmp 0xc8d10
leaq 0x400(%rsp), %rdi
movl $0x1, %esi
callq 0xcf8f0
movq %rax, 0x50(%rsp)
jmp 0xc8d29
movq 0x50(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86850
jmp 0xc8d3d
leaq 0x38c(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86470
jmp 0xc8d54
movq 0x200(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x200(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x86ce0
jmp 0xc8d71
leaq 0x400(%rsp), %rdi
movl $0x2, %esi
callq 0xcf8f0
movq %rax, 0x48(%rsp)
jmp 0xc8d8a
movq 0x48(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86850
jmp 0xc8d9e
leaq 0x200(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x86470
jmp 0xc8db5
movq 0x200(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x200(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x86ce0
jmp 0xc8dd2
leaq 0x400(%rsp), %rdi
movl $0x3, %esi
callq 0xcf8f0
movq %rax, 0x40(%rsp)
jmp 0xc8deb
movq 0x40(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86850
jmp 0xc8dff
leaq 0x390(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86470
jmp 0xc8e16
movq 0x200(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x200(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x86ce0
jmp 0xc8e33
leaq 0x400(%rsp), %rdi
movl $0x4, %esi
callq 0xcf8f0
movq %rax, 0x38(%rsp)
jmp 0xc8e4c
movq 0x38(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86850
jmp 0xc8e60
leaq 0x394(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86400
jmp 0xc8e77
movq 0x200(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x200(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x86ce0
jmp 0xc8e94
leaq 0x400(%rsp), %rdi
movl $0x5, %esi
callq 0xcf8f0
movq %rax, 0x30(%rsp)
jmp 0xc8ead
movq 0x30(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86850
jmp 0xc8ec1
leaq 0x396(%rsp), %rsi
leaq 0x200(%rsp), %rdi
callq 0x86400
jmp 0xc8ed8
movq 0x200(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x200(%rsp,%rax), %rdi
xorl %esi, %esi
callq 0x86ce0
jmp 0xc8ef5
leaq 0x400(%rsp), %rdi
movl $0x6, %esi
callq 0xcf8f0
movq %rax, 0x28(%rsp)
jmp 0xc8f0e
movq 0x28(%rsp), %rdi
leaq 0x9cd66(%rip), %rsi     # 0x165c80
callq 0x91630
movb %al, 0x27(%rsp)
jmp 0xc8f25
movb 0x27(%rsp), %al
andb $0x1, %al
movb %al, 0x398(%rsp)
movq 0x418(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x3e8(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x86350
jmp 0xc8f56
leaq 0x80(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0xcf9b0
jmp 0xc8f6d
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0xcf980
jmp 0xc8f8c
leaq 0x180(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0xcfa40
jmp 0xc8fa3
movq 0x18(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0xcf930
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0xc8fc0
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movb %al, 0x78(%rsp)
leaq 0x180(%rsp), %rdi
callq 0xcfab0
jmp 0xc8fe1
leaq 0x100(%rsp), %rdi
callq 0xcfb10
jmp 0xc8ff0
leaq 0x80(%rsp), %rdi
callq 0xcfb70
jmp 0xc8fff
leaq 0xe0(%rsp), %rdi
callq 0x86f68
jmp 0xc900e
movb $0x1, 0x437(%rsp)
movl $0x1, 0x3f0(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x86580
jmp 0xc90ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc9121
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc910e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc90ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc90dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
jmp 0xc90cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3f8(%rsp)
movl %eax, 0x3f4(%rsp)
leaq 0x180(%rsp), %rdi
callq 0xcfab0
jmp 0xc90ca
jmp 0xc90cc
leaq 0x100(%rsp), %rdi
callq 0xcfb10
jmp 0xc90db
jmp 0xc90dd
leaq 0x80(%rsp), %rdi
callq 0xcfb70
jmp 0xc90ec
jmp 0xc90ee
leaq 0xe0(%rsp), %rdi
callq 0x86f68
jmp 0xc90fd
jmp 0xc910e
leaq 0x388(%rsp), %rdi
callq 0xcfb70
jmp 0xc911f
leaq 0x200(%rsp), %rdi
callq 0x86580
jmp 0xc911d
jmp 0xc9121
jmp 0xc9132
leaq 0x388(%rsp), %rdi
callq 0xcfb70
jmp 0xc9130
jmp 0xc9150
leaq 0x400(%rsp), %rdi
callq 0x92a50
movb 0x437(%rsp), %al
andb $0x1, %al
addq $0x438, %rsp            # imm = 0x438
retq
leaq 0x400(%rsp), %rdi
callq 0x92a50
jmp 0xc915f
jmp 0xc9161
movq 0x3f8(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopw %cs:(%rax,%rax)