// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::parse(int, char const**)
void CommandLineParser::parse(int argc, const char* argv[])
{
    // Parse arguments.
    for (int i = 1; i < argc; i++)
    {
        if (argv[i][0] == '-')
        {
            if (argv[i][1] == '-')
            {
                if (argv[i][2] == 0)
                {
                    // "--": End of options.
                    // Keep the "--" as an argument so the application can add further semantics to it.
                    for (; i < argc; i++)
                    {
                        args.emplace_back(argv[i]);
                    }
                }
                else
                {
                    // Long option.
                    parseLongOption(argc, argv, i);
                }
            }
            else if (argv[i][1] == 0)
            {
                // Positional arg '-'.
                args.emplace_back(argv[i]);
            }
            else
            {
                // Short option(s).
                parseShortOptions(argc, argv, i);
            }
        }
        else
        {
            // Positional arg.
            args.emplace_back(argv[i]);
        }
    }

    if (isSet("help"))
    {
        printMessage(getUsageStr());
        std::exit(0);
    }

    if (isSet("version"))
    {
        printMessage("version " + version);
        std::exit(0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
leaq 0x78(%rdi), %r15
movslq %esi, %r12
pushq $0x1
popq %rax
movl %eax, 0x18(%rsp)
cmpl %ebp, %eax
jge 0x616d
movslq %eax, %rbx
leaq (%r14,%rbx,8), %r13
movq (%r13), %rax
cmpb $0x2d, (%rax)
jne 0x6144
movzbl 0x1(%rax), %ecx
testl %ecx, %ecx
je 0x6144
cmpl $0x2d, %ecx
jne 0x6157
cmpb $0x0, 0x2(%rax)
je 0x6139
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
leaq 0x18(%rsp), %rcx
callq 0x6268
jmp 0x614f
movq %r15, %rdi
movq %r13, %rsi
callq 0x79b4
incq %rbx
addq $0x8, %r13
cmpq %r12, %rbx
jl 0x6127
movl %ebx, 0x18(%rsp)
jmp 0x614f
movq %r15, %rdi
movq %r13, %rsi
callq 0x79b4
movl 0x18(%rsp), %eax
incl %eax
jmp 0x60e6
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
leaq 0x18(%rsp), %rcx
callq 0x6754
jmp 0x614f
leaq 0x14ec4(%rip), %rsi     # 0x1b038
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x760a
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x79ee
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x61e8
leaq 0x1500c(%rip), %rsi     # 0x1b1b6
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x760a
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x79ee
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x620a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x69aa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6968
jmp 0x6235
movq 0x10(%rsp), %rbx
leaq 0xf8(%rbx), %rdx
leaq 0x14eb8(%rip), %rsi     # 0x1b0d5
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x7667
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6968
leaq 0x18(%rsp), %rdi
callq 0x51f0
xorl %edi, %edi
callq 0x54f0
jmp 0x624e
jmp 0x624e
jmp 0x624e
jmp 0x625d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x51f0
jmp 0x6260
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5730