// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
leaq 0x89de(%rip), %rsi      # 0x1f206
movq %rbx, %rdi
callq 0x40e0
movq 0x90(%r14), %rcx
testl %eax, %eax
sete (%rcx)
je 0x16c22
movq 0x98(%r14), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x16856
movq %rcx, 0x8(%rax)
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x2c, %edx
callq 0x166e5
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
setne %r13b
je 0x16b1c
leaq 0x68(%r14), %rcx
movq %rcx, -0x58(%rbp)
xorl %esi, %esi
leaq -0x78(%rbp), %rbx
xorl %r15d, %r15d
shlq $0x5, %rsi
addq %rax, %rsi
movq %rbx, %rdi
movl $0x3a, %edx
callq 0x166e5
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %rax
subq %r12, %rax
sarq $0x5, %rax
cmpq $0x3, %rax
movq %r15, -0x60(%rbp)
je 0x169f5
cmpq $0x2, %rax
je 0x16908
cmpq $0x1, %rax
jne 0x16b2d
movq (%r12), %rdi
callq 0x44d0
movl %eax, -0x2c(%rbp)
testl %eax, %eax
jle 0x16b8e
movq 0x98(%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16adb
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16ae4
movq (%r12), %rdi
callq 0x44d0
movl %eax, %ebx
movq 0x20(%r12), %rdi
callq 0x44d0
movl %eax, %r13d
testl %ebx, %ebx
setle %al
testl %r13d, %r13d
setle %cl
orb %al, %cl
cmpb $0x1, %cl
leaq -0x2c(%rbp), %r15
jne 0x1697d
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %r12
movq %r12, %rdi
leaq 0x88df(%rip), %rsi      # 0x1f22b
leaq 0x88f6(%rip), %rdx      # 0x1f249
callq 0x6086
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x4180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1697d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
movl %ebx, -0x2c(%rbp)
cmpl %r13d, %ebx
jge 0x169bd
movq 0x98(%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x169a2
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x169aa
movq %r15, %rdx
callq 0x10e9c
movl -0x2c(%rbp), %eax
leal 0x1(%rax), %ebx
movl %ebx, -0x2c(%rbp)
cmpl %r13d, %eax
jl 0x16985
jmp 0x16ae4
movq 0x98(%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x169da
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x169e2
movq %r15, %rdx
callq 0x10e9c
movl -0x2c(%rbp), %eax
leal -0x1(%rax), %ebx
movl %ebx, -0x2c(%rbp)
cmpl %r13d, %eax
jg 0x169bd
jmp 0x16ae4
movb %r13b, -0x2d(%rbp)
movq (%r12), %rdi
callq 0x44d0
movl %eax, %r15d
movq 0x20(%r12), %rdi
callq 0x44d0
movl %eax, %r13d
movq 0x40(%r12), %rdi
callq 0x44d0
testl %r15d, %r15d
jle 0x16b5d
movl %eax, %ebx
testl %eax, %eax
jle 0x16b5d
testl %r13d, %r13d
je 0x16bbb
cmpl %ebx, %r15d
setl %al
testl %r13d, %r13d
sets %cl
testb %cl, %al
jne 0x16a5b
cmpl %r15d, %ebx
setl %al
testl %r13d, %r13d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x16a5e
negl %r13d
movl %r15d, -0x2c(%rbp)
cmpl %ebx, %r15d
leaq -0x2c(%rbp), %r12
jge 0x16aa3
movq 0x98(%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16a89
movl %r15d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16a91
movq %r12, %rdx
callq 0x10e9c
movl -0x2c(%rbp), %r15d
addl %r13d, %r15d
movl %r15d, -0x2c(%rbp)
cmpl %ebx, %r15d
jle 0x16a6b
jmp 0x16ae4
movq 0x98(%r14), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x16ac1
movl %r15d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x16ac9
movq %r12, %rdx
callq 0x10e9c
movl -0x2c(%rbp), %r15d
addl %r13d, %r15d
movl %r15d, -0x2c(%rbp)
cmpl %ebx, %r15d
jge 0x16aa3
jmp 0x16ae4
leaq -0x2c(%rbp), %rdx
callq 0x10e9c
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0xfdbc
movq -0x60(%rbp), %r15
incl %r15d
movq -0x90(%rbp), %rax
movq -0x88(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movq %r15, %rsi
cmpq %r15, %rcx
seta %r13b
ja 0x1688f
leaq -0x90(%rbp), %rdi
callq 0xfdbc
jmp 0x16c22
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x8722(%rip), %rsi      # 0x1f261
leaq 0x8736(%rip), %rdx      # 0x1f27c
callq 0x6086
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
jmp 0x16bea
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x86bc(%rip), %rsi      # 0x1f22b
leaq 0x86d3(%rip), %rdx      # 0x1f249
callq 0x6086
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
movb -0x2d(%rbp), %r13b
jmp 0x16bea
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x866d(%rip), %rsi      # 0x1f20d
leaq 0x8683(%rip), %rdx      # 0x1f22a
callq 0x6086
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
jmp 0x16bea
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x867d(%rip), %rsi      # 0x1f24a
leaq 0x868c(%rip), %rdx      # 0x1f260
callq 0x6086
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x4180
movb -0x2d(%rbp), %r13b
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x16c03
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x78(%rbp), %rdi
callq 0xfdbc
leaq -0x90(%rbp), %rdi
callq 0xfdbc
testb $0x1, %r13b
je 0x16c22
xorl %eax, %eax
jmp 0x16c24
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16c45
jmp 0x16c70
jmp 0x16c45
jmp 0x16c45
jmp 0x16c70
jmp 0x16c70
jmp 0x16c45
jmp 0x16c70
jmp 0x16c70
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x16c73
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x16c73
jmp 0x16c70
movq %rax, %rbx
jmp 0x16c7c
jmp 0x16c70
jmp 0x16c70
jmp 0x16c70
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0xfdbc
leaq -0x90(%rbp), %rdi
callq 0xfdbc
movq %rbx, %rdi
callq 0x4580