// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rdi, %rbx
movl $0x1, (%rsp)
cmpl $0x2, %esi
jl 0x67e6
movq %rdx, %r14
movl %esi, %r12d
leaq 0x78(%rbx), %r15
movl $0x1, %eax
movq %rsp, %rbp
movq %rbx, 0x20(%rsp)
movslq %eax, %rcx
leaq (%r14,%rcx,8), %r13
movq (%r13), %rcx
cmpb $0x2d, (%rcx)
jne 0x678c
movzbl 0x1(%rcx), %edx
testl %edx, %edx
je 0x678c
cmpl $0x2d, %edx
jne 0x67a6
cmpb $0x0, 0x2(%rcx)
je 0x67b9
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x68f8
jmp 0x6797
movq %r15, %rdi
movq %r13, %rsi
callq 0x8d04
movl (%rsp), %eax
incl %eax
movl %eax, (%rsp)
cmpl %r12d, %eax
jl 0x6756
jmp 0x67e6
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x70f6
jmp 0x6797
movq %rbp, %rbx
movl %r12d, %ebp
subl %eax, %ebp
jle 0x67d9
movq %r15, %rdi
movq %r13, %rsi
callq 0x8d04
addq $0x8, %r13
decl %ebp
jne 0x67c3
movl %r12d, %eax
movl %eax, (%rsp)
movq %rbx, %rbp
movq 0x20(%rsp), %rbx
jmp 0x6797
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a842(%rip), %rsi     # 0x21038
leaq 0x1a83f(%rip), %rdx     # 0x2103c
movq %rsp, %rdi
callq 0x9172
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8260
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6828
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5410
testl %ebp, %ebp
jne 0x687b
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1a97d(%rip), %rsi     # 0x211b6
leaq 0x1a97d(%rip), %rdx     # 0x211bd
callq 0x9172
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8260
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6868
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5410
testl %ebp, %ebp
jne 0x6896
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x74c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x745e
jmp 0x68ba
leaq 0xf8(%rbx), %rdx
leaq 0x1a831(%rip), %rsi     # 0x210d5
movq %rsp, %r14
movq %r14, %rdi
callq 0x89cc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x745e
movq %rsp, %rdi
callq 0x51d0
xorl %edi, %edi
callq 0x54f0
jmp 0x68d1
jmp 0x68d1
jmp 0x68d1
jmp 0x68ec
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x68ef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0x68ef
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5720
nop