// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a60(%rip), %rsi      # 0x1f206
movq %rbx, %rdi
callq 0x40e0
movq 0x90(%r15), %rcx
movb $0x1, %dl
testl %eax, %eax
sete (%rcx)
je 0x16b86
movq 0x98(%r15), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x167d6
movq %rcx, 0x8(%rax)
leaq -0x90(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2c, %edx
callq 0x16669
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x16a8e
leaq 0x68(%r15), %rcx
movq %rcx, -0x58(%rbp)
xorl %esi, %esi
leaq -0x78(%rbp), %rbx
xorl %r14d, %r14d
shlq $0x5, %rsi
addq %rax, %rsi
movq %rbx, %rdi
movl $0x3a, %edx
callq 0x16669
movq -0x78(%rbp), %r13
movq -0x70(%rbp), %rax
subq %r13, %rax
sarq $0x5, %rax
cmpq $0x3, %rax
movq %r14, -0x60(%rbp)
je 0x16975
cmpq $0x2, %rax
je 0x16884
cmpq $0x1, %rax
jne 0x16aa1
movq (%r13), %rdi
callq 0x44d0
movl %eax, -0x2c(%rbp)
testl %eax, %eax
jle 0x16afe
movq 0x98(%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16a51
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16a5a
movq (%r13), %rdi
callq 0x44d0
movl %eax, %r14d
movq 0x20(%r13), %rdi
callq 0x44d0
movl %eax, %ebx
testl %r14d, %r14d
setle %al
testl %ebx, %ebx
setle %cl
orb %al, %cl
cmpb $0x1, %cl
leaq -0x2c(%rbp), %r12
jne 0x168f8
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %r13
movq %r13, %rdi
leaq 0x8964(%rip), %rsi      # 0x1f22b
leaq 0x897b(%rip), %rdx      # 0x1f249
callq 0x6058
movq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x4180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x168f8
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
movl %r14d, -0x2c(%rbp)
cmpl %ebx, %r14d
jge 0x1693b
movq 0x98(%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1691f
movl %r14d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16927
movq %r12, %rdx
callq 0x10e6e
movl -0x2c(%rbp), %eax
leal 0x1(%rax), %r14d
movl %r14d, -0x2c(%rbp)
cmpl %ebx, %eax
jl 0x16901
jmp 0x16a5a
movq 0x98(%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16959
movl %r14d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16961
movq %r12, %rdx
callq 0x10e6e
movl -0x2c(%rbp), %eax
leal -0x1(%rax), %r14d
movl %r14d, -0x2c(%rbp)
cmpl %ebx, %eax
jg 0x1693b
jmp 0x16a5a
movq (%r13), %rdi
callq 0x44d0
movl %eax, %r12d
movq 0x20(%r13), %rdi
callq 0x44d0
movl %eax, %ebx
movq 0x40(%r13), %rdi
callq 0x44d0
testl %r12d, %r12d
jle 0x16ad1
movl %eax, %r14d
testl %eax, %eax
jle 0x16ad1
testl %ebx, %ebx
je 0x16b2b
cmpl %r14d, %r12d
setb %al
testl %ebx, %ebx
sets %cl
testb %cl, %al
jne 0x169d2
cmpl %r12d, %r14d
setb %al
testl %ebx, %ebx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x169d4
negl %ebx
movl %r12d, -0x2c(%rbp)
cmpl %r14d, %r12d
leaq -0x2c(%rbp), %r13
jae 0x16a19
movq 0x98(%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x169ff
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16a07
movq %r13, %rdx
callq 0x10e6e
movl -0x2c(%rbp), %r12d
addl %ebx, %r12d
movl %r12d, -0x2c(%rbp)
cmpl %r14d, %r12d
jle 0x169e1
jmp 0x16a5a
movq 0x98(%r15), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16a37
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16a3f
movq %r13, %rdx
callq 0x10e6e
movl -0x2c(%rbp), %r12d
addl %ebx, %r12d
movl %r12d, -0x2c(%rbp)
cmpl %r14d, %r12d
jge 0x16a19
jmp 0x16a5a
leaq -0x2c(%rbp), %rdx
callq 0x10e6e
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0xfd58
movq -0x60(%rbp), %r14
incl %r14d
movq -0x90(%rbp), %rax
movq -0x88(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movq %r14, %rsi
cmpq %r14, %rcx
ja 0x1680b
leaq -0x90(%rbp), %rdi
callq 0xfd58
movb $0x1, %dl
jmp 0x16b86
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x87ae(%rip), %rsi      # 0x1f261
leaq 0x87c2(%rip), %rdx      # 0x1f27c
callq 0x6058
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
jmp 0x16b56
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x8748(%rip), %rsi      # 0x1f22b
leaq 0x875f(%rip), %rdx      # 0x1f249
callq 0x6058
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
jmp 0x16b56
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x86fd(%rip), %rsi      # 0x1f20d
leaq 0x8713(%rip), %rdx      # 0x1f22a
callq 0x6058
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
jmp 0x16b56
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x870d(%rip), %rsi      # 0x1f24a
leaq 0x871c(%rip), %rdx      # 0x1f260
callq 0x6058
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x16b6f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x78(%rbp), %rdi
callq 0xfd58
leaq -0x90(%rbp), %rdi
callq 0xfd58
xorl %edx, %edx
movl %edx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16ba9
jmp 0x16bd4
jmp 0x16ba9
jmp 0x16ba9
jmp 0x16bd4
jmp 0x16bd4
jmp 0x16ba9
jmp 0x16bd4
jmp 0x16bd4
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x16bd7
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x16bd7
jmp 0x16bd4
movq %rax, %rbx
jmp 0x16be0
jmp 0x16bd4
jmp 0x16bd4
jmp 0x16bd4
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0xfd58
leaq -0x90(%rbp), %rdi
callq 0xfd58
movq %rbx, %rdi
callq 0x4580