// File: zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::StatsFileReader::ParseOptionLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BamTools::ResolveTool::ResolveSettings*)
bool ResolveTool::StatsFileReader::ParseOptionLine(const string& line,
                                                   ResolveTool::ResolveSettings* settings)
{
    // split line into option, value
    vector<string> fields = Utilities::Split(line, EQUAL_CHAR);
    if ( fields.size() != NUM_OPTIONS_FIELDS )
        return false;
    const string& option = fields.at(0);
    stringstream value(fields.at(1));

    // -----------------------------------
    // handle option based on keyword

    // ConfidenceInterval
    if ( option == OPTION_CONFIDENCEINTERVAL ) {
        value >> settings->ConfidenceInterval;
        settings->HasConfidenceInterval = true;
        return true;
    }

    // ForceMarkReadGroups
    if ( option == OPTION_FORCEMARKREADGROUPS ) {
        value >> settings->HasForceMarkReadGroups;
        return true;
    }

    // MinimumMapQuality
    if ( option == OPTION_MINIMUMMAPQUALITY ) {
        value >> settings->MinimumMapQuality;
        settings->HasMinimumMapQuality = true;
        return true;
    }

    // UnusedModelThreshold
    if ( option == OPTION_UNUSEDMODELTHRESHOLD ) {
        value >> settings->UnusedModelThreshold;
        settings->HasUnusedModelThreshold = true;
        return true;
    }

    // otherwise unknown option
    cerr << "bamtools resolve ERROR - unrecognized option: " << option << " in stats file" << endl;
    return false;
}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
movq %rdi, 0x208(%rsp)
movq %rsi, 0x200(%rsp)
movq %rdx, 0x1f8(%rsp)
movq 0x200(%rsp), %rsi
leaq 0x1e0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movl $0x3d, %edx
callq 0x115cd0
movq 0x30(%rsp), %rdi
callq 0x936f0
movq %rax, 0x38(%rsp)
jmp 0xc892f
movq 0x38(%rsp), %rax
cmpq $0x2, %rax
je 0xc896b
movb $0x0, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
jmp 0xc8bef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0xc8c0d
xorl %eax, %eax
movl %eax, %esi
leaq 0x1e0(%rsp), %rdi
callq 0xcf8f0
movq %rax, 0x28(%rsp)
jmp 0xc8983
movq 0x28(%rsp), %rax
movq %rax, 0x1c8(%rsp)
leaq 0x1e0(%rsp), %rdi
movl $0x1, %esi
callq 0xcf8f0
movq %rax, 0x20(%rsp)
jmp 0xc89a9
movl $0x10, %edi
movl $0x8, %esi
callq 0x928c0
movl %eax, 0x1c(%rsp)
jmp 0xc89be
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x86be0
jmp 0xc89d3
movq 0x1c8(%rsp), %rdi
leaq 0x9d33e(%rip), %rsi     # 0x165d20
callq 0x91630
movb %al, 0x1b(%rsp)
jmp 0xc89ed
movb 0x1b(%rsp), %al
testb $0x1, %al
jne 0xc89f7
jmp 0xc8a59
movq 0x1f8(%rsp), %rsi
addq $0x90, %rsi
leaq 0x40(%rsp), %rdi
callq 0x865d0
jmp 0xc8a12
movq 0x1f8(%rsp), %rax
movb $0x1, 0x7(%rax)
movb $0x1, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
jmp 0xc8bdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x86580
jmp 0xc8bed
movq 0x1c8(%rsp), %rdi
leaq 0x9d318(%rip), %rsi     # 0x165d80
callq 0x91630
movb %al, 0x1a(%rsp)
jmp 0xc8a73
movb 0x1a(%rsp), %al
testb $0x1, %al
jne 0xc8a7d
jmp 0xc8aad
movq 0x1f8(%rsp), %rsi
addq $0x8, %rsi
leaq 0x40(%rsp), %rdi
callq 0x86620
jmp 0xc8a95
movb $0x1, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
jmp 0xc8bdf
movq 0x1c8(%rsp), %rdi
leaq 0x9d284(%rip), %rsi     # 0x165d40
callq 0x91630
movb %al, 0x19(%rsp)
jmp 0xc8ac7
movb 0x19(%rsp), %al
testb $0x1, %al
jne 0xc8ad1
jmp 0xc8b10
movq 0x1f8(%rsp), %rsi
addq $0x98, %rsi
leaq 0x40(%rsp), %rdi
callq 0x86400
jmp 0xc8aec
movq 0x1f8(%rsp), %rax
movb $0x1, 0x9(%rax)
movb $0x1, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
jmp 0xc8bdf
movq 0x1c8(%rsp), %rdi
leaq 0x9d241(%rip), %rsi     # 0x165d60
callq 0x91630
movb %al, 0x18(%rsp)
jmp 0xc8b2a
movb 0x18(%rsp), %al
testb $0x1, %al
jne 0xc8b34
jmp 0xc8b70
movq 0x1f8(%rsp), %rsi
addq $0xa0, %rsi
leaq 0x40(%rsp), %rdi
callq 0x865d0
jmp 0xc8b4f
movq 0x1f8(%rsp), %rax
movb $0x1, 0xa(%rax)
movb $0x1, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
jmp 0xc8bdf
movq 0x9c469(%rip), %rdi     # 0x164fe0
leaq 0x680a2(%rip), %rsi     # 0x130c20
callq 0x86700
movq %rax, 0x10(%rsp)
jmp 0xc8b8a
movq 0x10(%rsp), %rdi
movq 0x1c8(%rsp), %rsi
callq 0x86640
movq %rax, 0x8(%rsp)
jmp 0xc8ba3
movq 0x8(%rsp), %rdi
leaq 0x680a0(%rip), %rsi     # 0x130c4f
callq 0x86700
movq %rax, (%rsp)
jmp 0xc8bba
movq (%rsp), %rdi
movq 0x9c3ab(%rip), %rsi     # 0x164f70
callq 0x86770
jmp 0xc8bcc
movb $0x0, 0x217(%rsp)
movl $0x1, 0x1d0(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x86580
jmp 0xc8beb
jmp 0xc8bef
jmp 0xc8c0d
leaq 0x1e0(%rsp), %rdi
callq 0x92a50
movb 0x217(%rsp), %al
andb $0x1, %al
addq $0x218, %rsp            # imm = 0x218
retq
leaq 0x1e0(%rsp), %rdi
callq 0x92a50
jmp 0xc8c1c
jmp 0xc8c1e
movq 0x1d8(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopw %cs:(%rax,%rax)