// File: /workspace/github_cpp_makefile_star2_O2/hanhwi[P]SimPoint/analysiscode/SimpointOptions.cpp
// Function: NumClustersCmdLineOption::parseArgumentSub(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool NumClustersCmdLineOption::parseArgumentSub(const string &argument) {
    *searchTarget = (argument == "search");

    if (! *searchTarget) {
        kValuesTarget->clear();
        int k;
        vector<string> ranges = split(argument, ',');
        for (unsigned int i = 0; i < ranges.size(); i++) {
            vector<string> kRange = split(ranges[i], ':');
            if (kRange.size() == 1) {
                k = atoi(kRange[0].c_str());
                if (k < 1) {
                    setParseError("k value cannot be less than 1");
                    return false;
                }
                kValuesTarget->push_back(k);
            } else if (kRange.size() == 2) {
                int start = atoi(kRange[0].c_str()), end = atoi(kRange[1].c_str());
                if ((start < 1) || (end < 1)) {
                    setParseError("k values cannot be less than 1");
                }
                if (start < end) {
                    for (k = start; k <= end; k++) { kValuesTarget->push_back(k); }
                } else {
                    for (k = start; k >= end; k--) { kValuesTarget->push_back(k); }
                }
            } else if (kRange.size() == 3) {
                int start = atoi(kRange[0].c_str()), step = atoi(kRange[1].c_str()),
                    end = atoi(kRange[2].c_str());
                if ((start < 1) || (end < 1)) {
                    setParseError("k values cannot be less than 1");
                    return false;
                } else if (step == 0) {
                    setParseError("step value cannot be 0");
                    return false;
                } else if (((start < end) && (step < 0)) ||
                           ((end < start) && (step > 0))) {
                    step = -step; // silently fix for the user
                }
                if (start < end) {
                    for (k = start; k <= end; k += step) { kValuesTarget->push_back(k); }
                } else {
                    for (k = start; k >= end; k += step) { kValuesTarget->push_back(k); }
                }
            } else {
                setParseError("invalid range specification");
                return false;
            }
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x6858(%rip), %rsi      # 0x181b6
movq %rbx, %rdi
callq 0x5549
movq 0x90(%r15), %rcx
movb %al, (%rcx)
movb $0x1, %cl
testb %al, %al
jne 0x11c54
movq 0x98(%r15), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x1198d
movq %rcx, 0x8(%rax)
leaq -0x88(%rbp), %rdi
pushq $0x2c
popq %rdx
movq %rbx, %rsi
callq 0x11862
leaq 0x68(%r15), %rax
movq %rax, -0x38(%rbp)
xorl %ebx, %ebx
leaq -0x70(%rbp), %r14
movl %ebx, %ebx
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rbx, %rax
jbe 0x11b97
movq %rbx, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %r14, %rdi
pushq $0x3a
popq %rdx
callq 0x11862
movq -0x70(%rbp), %r13
movq -0x68(%rbp), %rax
subq %r13, %rax
sarq $0x5, %rax
cmpq $0x3, %rax
je 0x11ae2
cmpq $0x2, %rax
je 0x11a3f
cmpq $0x1, %rax
jne 0x11baa
movq (%r13), %rdi
callq 0x4480
movl %eax, -0x30(%rbp)
testl %eax, %eax
jle 0x11bf0
movq 0x98(%r15), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc4a0
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0xc7f2
incl %ebx
jmp 0x119ad
movq (%r13), %rdi
callq 0x4480
movl %eax, %r12d
movq 0x20(%r13), %rdi
callq 0x4480
movl %eax, %r14d
testl %r12d, %r12d
setle %al
testl %r14d, %r14d
setle %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x11a95
leaq -0x58(%rbp), %r13
movq %r13, %rdi
leaq 0x6763(%rip), %rsi      # 0x181db
leaq -0x29(%rbp), %rdx
callq 0x53a6
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x41a0
movq %r13, %rdi
callq 0x45e8
cmpl %r14d, %r12d
jge 0x11abc
movl %r12d, -0x30(%rbp)
cmpl %r14d, %r12d
jg 0x11a2c
movq 0x98(%r15), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc4a0
movl -0x30(%rbp), %r12d
incl %r12d
jmp 0x11a9a
movl %r12d, -0x30(%rbp)
cmpl %r14d, %r12d
jl 0x11a2c
movq 0x98(%r15), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc4a0
movl -0x30(%rbp), %r12d
decl %r12d
jmp 0x11abc
movq (%r13), %rdi
callq 0x4480
movl %eax, %r12d
movq 0x20(%r13), %rdi
callq 0x4480
movl %eax, %r14d
movq 0x40(%r13), %rdi
callq 0x4480
testl %r12d, %r12d
jle 0x11bcd
movl %eax, %r13d
testl %eax, %eax
jle 0x11bcd
testl %r14d, %r14d
je 0x11c13
cmpl %r13d, %r12d
setb %al
testl %r14d, %r14d
sets %cl
testb %cl, %al
jne 0x11b43
cmpl %r12d, %r13d
setb %al
testl %r14d, %r14d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x11b46
negl %r14d
cmpl %r13d, %r12d
jae 0x11b71
movl %r12d, -0x30(%rbp)
cmpl %r13d, %r12d
jg 0x11a2c
movq 0x98(%r15), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc4a0
movl -0x30(%rbp), %r12d
addl %r14d, %r12d
jmp 0x11b4b
movl %r12d, -0x30(%rbp)
cmpl %r13d, %r12d
jl 0x11a2c
movq 0x98(%r15), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc4a0
movl -0x30(%rbp), %r12d
addl %r14d, %r12d
jmp 0x11b71
leaq -0x88(%rbp), %rdi
callq 0xc7f2
movb $0x1, %cl
jmp 0x11c54
leaq 0x6660(%rip), %rsi      # 0x18211
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x53a6
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x41a0
jmp 0x11c34
leaq 0x6607(%rip), %rsi      # 0x181db
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x53a6
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x41a0
jmp 0x11c34
leaq 0x65c6(%rip), %rsi      # 0x181bd
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x53a6
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x41a0
jmp 0x11c34
leaq 0x65e0(%rip), %rsi      # 0x181fa
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x53a6
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x41a0
leaq -0x58(%rbp), %rdi
callq 0x45e8
leaq -0x70(%rbp), %rdi
callq 0xc7f2
leaq -0x88(%rbp), %rdi
callq 0xc7f2
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11c75
jmp 0x11c92
jmp 0x11c75
jmp 0x11c75
jmp 0x11c92
jmp 0x11c92
jmp 0x11c75
jmp 0x11c92
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x45e8
jmp 0x11c95
jmp 0x11c92
jmp 0x11c92
movq %rax, %rbx
jmp 0x11c9e
jmp 0x11c92
jmp 0x11c92
jmp 0x11c92
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0xc7f2
leaq -0x88(%rbp), %rdi
callq 0xc7f2
movq %rbx, %rdi
callq 0x4530