// File: /workspace/github_cpp_makefile_star2_O1/gdaws[P]process-monitor/program_arguments.cpp
// Function: program_arguments::parser::parse(int, char const**)
void parser::parse(int argc, const char ** argv)
{
    bool print_help = false;
    set_options_group(NULL);
    add_option('h', "help", "display this help and exit", print_help);
    
    std::vector<std::string> error_messages;
    
    for(int i = 1; i < argc; i++)
    {
        const char * arg = argv[i];
        
        if(arg[0] == '-')
        {
            if(arg[1] == '-')
            {
                const char * name_begin = arg + 2;
                const char * value = strstr(name_begin, "=");
                const char * name_end = 
                    (value ? value : name_begin + strlen(name_begin));
                
                verbose_names_iterator iter = 
                    m_verbose_names.find(std::string(name_begin, name_end));
                
                if(iter == m_verbose_names.end())
                {
                    std::stringstream format;
                    format<<"unknown option  '--"
                          <<std::string(name_begin, name_end)
                          <<"'";
                    error_messages.push_back(format.str());
                    continue;
                }
                
                option * opt = &(iter->second);
                
                if(value)
                {
                    if(!opt->value_name)
                    {
                        std::stringstream format;
                        format<<"option '--"
                              <<std::string(name_begin, name_end)
                              <<"' doesn't allow an argument";
                        error_messages.push_back(format.str());
                        continue;
                    }
                }
                else
                {
                    if(opt->value_name)
                    {
                        std::stringstream format;
                        format<<"option  '--"
                              <<std::string(name_begin, name_end)
                              <<"' requires an argument";
                        error_messages.push_back(format.str());
                        continue;
                    }
                }
                
                opt->binding->parse_value(value + 1);
            }
            else
            {
                names_iterator iter = m_names.find(arg[1]);
                
                if(iter == m_names.end())
                {
                    std::stringstream format;
                    format<<"unknown option  '-"<<arg[1]<<"'";
                    error_messages.push_back(format.str());
                    continue;
                }
                
                option * opt = &(iter->second);
                
                const char * value = "=";
                
                if(opt->value_name)
                {
                    value = argv[++i];
                    
                    if(!value || value[0] == '-')
                    {
                        std::stringstream format;
                        format<<"option  '-"<<arg[1]
                              <<"' requires an argument";
                        error_messages.push_back(format.str());
                        continue;
                    }
                }
                
                opt->binding->parse_value(value);
            }
        }
        else
        {
            if(m_next_argument == m_arguments.end())
            {
                if(m_argument_repeat_last)
                {
                    m_next_argument = m_arguments.begin() + 
                        (m_arguments.size() - m_argument_repeat_last);
                }
                else
                {
                    error_messages.push_back("too many arguments");
                    continue;
                }
            }
            
            (*m_next_argument).binding->parse_value(arg);
            m_next_argument++;
        }
    }
    
    if(print_help)
    {
        help(argv[0]);
        exit(0);
    }
    
    if(m_next_argument < m_arguments.end()  - m_argument_repeat_last)
    {
        for(; m_next_argument != m_arguments.end(); m_next_argument++)
        {
            std::stringstream format;
            format<<"missing "<<uppercase(m_next_argument->value_name)
                  <<" argument";
            error_messages.push_back(format.str());
        }
    }
    
    if(error_messages.size())
    {
        for(std::vector<std::string>::const_iterator iter 
                = error_messages.begin(); iter != error_messages.end(); iter++)
        {
            std::cerr<<argv[0]<<": "<<*iter<<std::endl;
        }
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdx, 0x60(%rsp)
movl %esi, %ebp
movq %rdi, %r14
leaq 0x23(%rsp), %rbx
movb $0x0, (%rbx)
xorl %esi, %esi
callq 0x324c
movl $0x18, %edi
callq 0x21c0
leaq 0x5a1b(%rip), %rcx      # 0x8d10
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
movl %ebp, %ebx
movb $0x1, 0x10(%rax)
leaq 0x2d6b(%rip), %rdx      # 0x6074
leaq 0x2d69(%rip), %r8       # 0x6079
movq %r14, 0x28(%rsp)
movq %r14, %rdi
movl $0x68, %esi
xorl %ecx, %ecx
movq %rax, %r9
callq 0x2c34
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
cmpl $0x2, %ebp
jl 0x38d3
movq 0x28(%rsp), %rcx
leaq 0x8(%rcx), %rax
leaq 0xa0(%rsp), %r13
leaq 0x80(%r13), %rdx
movq %rdx, 0x38(%rsp)
leaq 0x30(%rcx), %rdx
movq %rdx, 0x78(%rsp)
addq $0x38, %rcx
movq %rcx, 0x70(%rsp)
movl $0x1, %ebp
movl %ebx, 0x24(%rsp)
movq %rax, 0x68(%rsp)
movslq %ebp, %rax
movq 0x60(%rsp), %rcx
movq (%rcx,%rax,8), %r12
cmpb $0x2d, (%r12)
jne 0x34ed
movb 0x1(%r12), %cl
cmpb $0x2d, %cl
jne 0x354e
addq $0x2, %r12
movq %r12, %rdi
movl $0x3d, %esi
callq 0x20c0
movq %rax, %rbx
movq %rax, %r15
testq %rax, %rax
jne 0x33cd
movq %r12, %rdi
callq 0x20e0
movq %rax, %r15
addq %r12, %r15
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4d32
movq 0x78(%rsp), %rdi
movq %r13, %r14
movq %r13, %rsi
callq 0x5b72
movq %rax, %r13
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3423
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21d0
cmpq 0x70(%rsp), %r13
je 0x36b8
movq 0x50(%r13), %rax
testq %rbx, %rbx
je 0x37d0
testq %rax, %rax
jne 0x38b3
movq %r14, %r13
movq %r14, %rdi
callq 0x2130
movl $0xa, %edx
leaq 0xb0(%rsp), %rdi
leaq 0x2c49(%rip), %rsi      # 0x60ac
callq 0x2200
movl 0x24(%rsp), %ebx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4d32
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x2200
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x2c0f(%rip), %rsi      # 0x60b7
callq 0x2200
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x34c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rsp, %r14
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x5bb8
jmp 0x387d
movq 0x28(%rsp), %r14
movq 0x80(%r14), %rax
cmpq %rax, 0x90(%r14)
jne 0x352e
movslq 0x98(%r14), %rcx
testq %rcx, %rcx
je 0x376f
movq 0x78(%r14), %rdx
subq %rdx, %rax
shrq $0x4, %rax
subq %rcx, %rax
shlq $0x4, %rax
addq %rdx, %rax
movq %rax, 0x90(%r14)
movq 0x90(%r14), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *(%rax)
addq $0x10, 0x90(%r14)
jmp 0x38c9
movq 0x28(%rsp), %rdx
movq 0x10(%rdx), %rdx
movq 0x68(%rsp), %rsi
testq %rdx, %rdx
je 0x357d
movq 0x68(%rsp), %rsi
xorl %edi, %edi
cmpb %cl, 0x20(%rdx)
setl %dil
cmovgeq %rdx, %rsi
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x3566
movq 0x68(%rsp), %rdi
movq %rdi, %rdx
cmpq %rdi, %rsi
je 0x3594
cmpb 0x20(%rsi), %cl
cmovlq %rdi, %rsi
movq %rsi, %rdx
cmpq %rdi, %rdx
je 0x3641
cmpq $0x0, 0x38(%rdx)
leaq 0x2aeb(%rip), %rsi      # 0x6094
je 0x3761
leal 0x1(%rax), %ebp
movq 0x60(%rsp), %rcx
movq 0x8(%rcx,%rax,8), %rsi
testq %rsi, %rsi
je 0x35ca
cmpb $0x2d, (%rsi)
jne 0x3761
movq %r13, %rdi
callq 0x2130
movl $0xa, %edx
leaq 0xb0(%rsp), %rdi
leaq 0x2b0c(%rip), %rsi      # 0x60f2
callq 0x2200
movb 0x1(%r12), %al
movb %al, (%rsp)
movl $0x1, %edx
leaq 0xb0(%rsp), %rdi
movq %rsp, %rsi
callq 0x2200
movl $0x16, %edx
movq %rax, %rdi
leaq 0x2abc(%rip), %rsi      # 0x60d3
callq 0x2200
movq %rsp, %r14
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x5bb8
jmp 0x387d
movq %r13, %rdi
callq 0x2130
movl $0x12, %edx
leaq 0xb0(%rsp), %rdi
leaq 0x2a8d(%rip), %rsi      # 0x60ea
callq 0x2200
movb 0x1(%r12), %al
movb %al, (%rsp)
movl $0x1, %edx
leaq 0xb0(%rsp), %rdi
movq %rsp, %rsi
callq 0x2200
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2a1c(%rip), %rsi      # 0x60aa
callq 0x2200
movq %rsp, %r14
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x5bb8
jmp 0x387d
movq %r14, %r13
movq %r14, %rdi
callq 0x2130
movl $0x13, %edx
leaq 0xb0(%rsp), %rdi
leaq 0x29bf(%rip), %rsi      # 0x6096
callq 0x2200
movl 0x24(%rsp), %ebx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4d32
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x2200
movl $0x1, %edx
movq %rax, %rdi
leaq 0x298e(%rip), %rsi      # 0x60aa
callq 0x2200
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x373c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rsp, %r14
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x5bb8
jmp 0x387d
movq 0x48(%rdx), %rdi
movq (%rdi), %rax
callq *(%rax)
jmp 0x38c9
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %r13, %rdi
leaq 0x2974(%rip), %rsi      # 0x60fd
leaq 0x297f(%rip), %rdx      # 0x610f
callq 0x4d32
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x5bb8
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x38c9
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x38c9
testq %rax, %rax
je 0x38b3
movq %r14, %r13
movq %r14, %rdi
callq 0x2130
movl $0xb, %edx
leaq 0xb0(%rsp), %rdi
leaq 0x28a6(%rip), %rsi      # 0x609e
callq 0x2200
movl 0x24(%rsp), %ebx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4d32
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x2200
movl $0x16, %edx
movq %rax, %rdi
leaq 0x2896(%rip), %rsi      # 0x60d3
callq 0x2200
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x385d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rsp, %r14
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x5bb8
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3898
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %r13, %rdi
movq 0x570e(%rip), %rsi      # 0x8fb0
callq 0x2150
movq 0x38(%rsp), %rdi
callq 0x20a0
jmp 0x38c9
movq 0x60(%r13), %rdi
incq %rbx
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
movl 0x24(%rsp), %ebx
movq %r14, %r13
incl %ebp
cmpl %ebx, %ebp
jl 0x337e
cmpb $0x0, 0x23(%rsp)
jne 0x3a7c
movq 0x28(%rsp), %rdx
movslq 0x98(%rdx), %rax
shlq $0x4, %rax
movq 0x80(%rdx), %rcx
subq %rax, %rcx
cmpq %rcx, 0x90(%rdx)
jae 0x3a54
movq 0x28(%rsp), %rcx
movq 0x90(%rcx), %rax
cmpq 0x80(%rcx), %rax
je 0x3a54
leaq 0xb0(%rsp), %r15
leaq 0x10(%rsp), %r13
leaq 0x90(%rsp), %r14
leaq 0xa0(%rsp), %rbp
leaq 0x80(%rsp), %r12
movq %rsp, %rbx
movq %rbp, %rdi
callq 0x2130
movl $0x8, %edx
movq %r15, %rdi
leaq 0x27b3(%rip), %rsi      # 0x6110
callq 0x2200
movq 0x28(%rsp), %rax
movq 0x90(%rax), %rax
movq (%rax), %rsi
movq %r12, %rdi
leaq 0x37(%rsp), %rdx
callq 0x46c4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x43ec
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x2200
movl $0x9, %edx
movq %rax, %rdi
leaq 0x2737(%rip), %rsi      # 0x60e0
callq 0x2200
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x39c4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x39e1
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x22a0
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x5bb8
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x3a14
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbp, %rdi
movq 0x5592(%rip), %rsi      # 0x8fb0
callq 0x2150
leaq 0x120(%rsp), %rdi
callq 0x20a0
movq 0x28(%rsp), %rcx
movq 0x90(%rcx), %rax
addq $0x10, %rax
movq %rax, 0x90(%rcx)
cmpq 0x80(%rcx), %rax
jne 0x3946
movq 0x40(%rsp), %r12
cmpq %r12, 0x48(%rsp)
jne 0x3a95
leaq 0x40(%rsp), %rdi
callq 0x2a24
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x60(%rsp), %rax
movq (%rax), %rsi
movq 0x28(%rsp), %rdi
callq 0x3c82
xorl %edi, %edi
callq 0x2220
cmpq 0x48(%rsp), %r12
jne 0x3aa6
movl $0x1, %edi
callq 0x2220
movq 0x5543(%rip), %rbx      # 0x8ff0
leaq 0x266a(%rip), %r14      # 0x611e
movq 0x60(%rsp), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x3ad9
movq %r15, %rdi
callq 0x20e0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2200
jmp 0x3af0
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x22d0
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
addq $0x20, %r12
cmpq 0x48(%rsp), %r12
jne 0x3ab4
jmp 0x3a9c
jmp 0x3bf3
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3c01
jmp 0x3c01
jmp 0x3c01
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3c01
jmp 0x3c01
jmp 0x3c01
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3c01
jmp 0x3bf3
jmp 0x3bbc
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3ba4
jmp 0x3bf3
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3c01
jmp 0x3c01
jmp 0x3c01
jmp 0x3bf3
jmp 0x3ba4
jmp 0x3c01
jmp 0x3bf3
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x3c12
jmp 0x3c4f
jmp 0x3c01
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3c70
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x3c70
jmp 0x3bf3
jmp 0x3c01
jmp 0x3bf3
movq %rax, %rbx
jmp 0x3c70
jmp 0x3c01
jmp 0x3c01
movq %rax, %rbx
jmp 0x3c32
movq %rax, %rbx
jmp 0x3c4f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x3c4f
movq 0x10(%rsp), %rsi
jmp 0x3c47
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x3c32
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x3c4f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x535a(%rip), %rsi      # 0x8fb0
leaq 0xa0(%rsp), %rdi
callq 0x2150
leaq 0x120(%rsp), %rdi
callq 0x20a0
leaq 0x40(%rsp), %rdi
callq 0x2a24
movq %rbx, %rdi
callq 0x22f0