// File: gdaws[P]process-monitor/program_arguments.cpp
// Function: program_arguments::parser::help(char const*)
void parser::help(const char * program_name)
{
    std::cout<<"Usage: "<<program_name<<" [OPTION]... ";
    
     for(unsigned int i = 0; i < m_arguments.size(); i++)
    {
        std::cout<<(i > 0 ? " " : "" )
            <<uppercase(m_arguments[i].value_name)
            <<(i >= (m_arguments.size() - m_argument_repeat_last) ? "..." : "");
    }
    std::cout<<std::endl<<m_program_description<<std::endl;
    
    std::vector<options_group>::const_iterator group = m_groups.begin();
    
    for(; group != m_groups.end(); group++)
    {
        if(group->description) std::cout<<group->description<<":"<<std::endl;

        std::vector<option>::const_iterator option = group->options.begin();
        for(; option != group->options.end(); option++)
        {
            std::string name;
            std::string long_name;
            std::string description;
            
            if(option->name)
            {
                name = '-';
                name+= option->name;
            }
            
            if(option->verbose_name)
            {
                long_name = "--";
                long_name+= option->verbose_name;
                
                if(option->value_name)
                {
                    long_name += '=';
                    long_name += uppercase(option->value_name);
                }
            }
            
            if(option->description)
            {
                description = option->description;
            }
            
            name += std::string(std::max<int>(0, 2 - name.length()), ' ');
            long_name+=std::string(std::max<int>(0,22-long_name.length()), ' ');
            
            std::cout<<" "<<name<<", "<<long_name<<" "<<description<<std::endl;
        }
        
        std::cout<<std::endl;
    }
    
    std::cout<<std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq 0x1150b(%rip), %rdi     # 0x16fc0
leaq 0x965f(%rip), %rsi      # 0xf11b
callq 0x3270
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x3270
movq %rax, %rdi
leaq 0x964c(%rip), %rsi      # 0xf123
callq 0x3270
movl $0x0, -0x14(%rbp)
movq -0x1b8(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x1c0(%rbp)
addq $0x78, %rdi
callq 0x70a0
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5c73
movl -0x14(%rbp), %eax
testl %eax, %eax
leaq 0x961a(%rip), %rax      # 0xf136
leaq 0x9614(%rip), %rsi      # 0xf137
cmovneq %rax, %rsi
movq 0x11492(%rip), %rdi     # 0x16fc0
callq 0x3270
movq -0x1b8(%rbp), %rdi
movq %rax, -0x1d8(%rbp)
addq $0x78, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x7340
movq (%rax), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x3440
movq -0x1d0(%rbp), %rsi
movq -0x1c8(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x6b40
jmp 0x5b82
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x62e0
jmp 0x5b91
movq -0x1d8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3230
movq %rax, -0x1e0(%rbp)
jmp 0x5baa
movq -0x1b8(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x1e8(%rbp)
addq $0x78, %rdi
callq 0x70a0
movq -0x1b8(%rbp), %rdx
movq -0x1e0(%rbp), %rdi
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
movslq 0x98(%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
leaq 0x9541(%rip), %rax      # 0xf131
leaq 0x9540(%rip), %rsi      # 0xf137
cmovaeq %rax, %rsi
callq 0x3270
jmp 0x5c02
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5ae3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5c65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5c5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32e0
jmp 0x62d0
movq 0x11346(%rip), %rdi     # 0x16fc0
movq 0x1132f(%rip), %rsi     # 0x16fb0
callq 0x32b0
movq %rax, %rdi
movq -0x1b8(%rbp), %rax
movq 0xa0(%rax), %rsi
callq 0x3270
movq %rax, %rdi
movq 0x1130a(%rip), %rsi     # 0x16fb0
callq 0x32b0
movq -0x1b8(%rbp), %rdi
addq $0x60, %rdi
callq 0x7360
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x7390
movq -0x1b8(%rbp), %rdi
addq $0x60, %rdi
callq 0x7410
movq %rax, -0x88(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x73d0
testb $0x1, %al
jne 0x5cfc
jmp 0x62b4
leaq -0x78(%rbp), %rdi
callq 0x7440
cmpq $0x0, (%rax)
je 0x5d41
leaq -0x78(%rbp), %rdi
callq 0x7440
movq (%rax), %rsi
movq 0x112a2(%rip), %rdi     # 0x16fc0
callq 0x3270
movq %rax, %rdi
leaq 0x9347(%rip), %rsi      # 0xf074
callq 0x3270
movq %rax, %rdi
movq 0x11274(%rip), %rsi     # 0x16fb0
callq 0x32b0
leaq -0x78(%rbp), %rdi
callq 0x7440
movq %rax, %rdi
addq $0x8, %rdi
callq 0x7460
movq %rax, -0x90(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7440
movq %rax, %rdi
addq $0x8, %rdi
callq 0x74d0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7490
testb $0x1, %al
jne 0x5d95
jmp 0x628a
leaq -0xb8(%rbp), %rdi
callq 0x3390
leaq -0xd8(%rbp), %rdi
callq 0x3390
leaq -0xf8(%rbp), %rdi
callq 0x3390
leaq -0x90(%rbp), %rdi
callq 0x7500
cmpb $0x0, (%rax)
je 0x5e0d
leaq -0xb8(%rbp), %rdi
movl $0x2d, %esi
callq 0x3410
jmp 0x5ddd
leaq -0x90(%rbp), %rdi
callq 0x7500
movsbl (%rax), %esi
leaq -0xb8(%rbp), %rdi
callq 0x3170
jmp 0x5dfa
jmp 0x5e0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6264
leaq -0x90(%rbp), %rdi
callq 0x7500
cmpq $0x0, 0x8(%rax)
je 0x5f6a
leaq 0x927e(%rip), %rsi      # 0xf0a9
leaq -0xd8(%rbp), %rdi
callq 0x3380
jmp 0x5e39
leaq -0x90(%rbp), %rdi
callq 0x7500
movq 0x8(%rax), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x3250
jmp 0x5e57
leaq -0x90(%rbp), %rdi
callq 0x7500
cmpq $0x0, 0x10(%rax)
je 0x5f68
leaq -0xd8(%rbp), %rdi
movl $0x3d, %esi
callq 0x3170
jmp 0x5e81
leaq -0x90(%rbp), %rdi
callq 0x7500
movq 0x10(%rax), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x3440
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x6b40
jmp 0x5ec7
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x62e0
jmp 0x5edc
leaq -0xd8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3370
jmp 0x5ef1
leaq -0x118(%rbp), %rdi
callq 0x3160
leaq -0x138(%rbp), %rdi
callq 0x3160
leaq -0x139(%rbp), %rdi
callq 0x32e0
jmp 0x5f68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5f4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3160
leaq -0x138(%rbp), %rdi
callq 0x3160
leaq -0x139(%rbp), %rdi
callq 0x32e0
jmp 0x6264
jmp 0x5f6a
leaq -0x90(%rbp), %rdi
callq 0x7500
cmpq $0x0, 0x18(%rax)
je 0x5f9d
leaq -0x90(%rbp), %rdi
callq 0x7500
movq 0x18(%rax), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x3380
jmp 0x5f9b
jmp 0x5f9d
movl $0x0, -0x164(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x33b0
movl %eax, %ecx
movl $0x2, %eax
subl %ecx, %eax
movl %eax, -0x168(%rbp)
leaq -0x164(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x7520
movq %rax, -0x200(%rbp)
jmp 0x5fde
movq -0x200(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x210(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x3440
movq -0x210(%rbp), %rsi
movq -0x208(%rbp), %rcx
leaq -0x160(%rbp), %rdi
movl $0x20, %edx
callq 0x7560
jmp 0x6023
leaq -0xb8(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x3370
jmp 0x6038
leaq -0x160(%rbp), %rdi
callq 0x3160
leaq -0x169(%rbp), %rdi
callq 0x32e0
movl $0x0, -0x194(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x33b0
movl %eax, %ecx
movl $0x16, %eax
subl %ecx, %eax
movl %eax, -0x198(%rbp)
leaq -0x194(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x7520
movq %rax, -0x218(%rbp)
jmp 0x6091
movq -0x218(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x228(%rbp)
leaq -0x199(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x3440
movq -0x228(%rbp), %rsi
movq -0x220(%rbp), %rcx
leaq -0x190(%rbp), %rdi
movl $0x20, %edx
callq 0x7560
jmp 0x60d6
leaq -0xd8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x3370
jmp 0x60eb
leaq -0x190(%rbp), %rdi
callq 0x3160
leaq -0x199(%rbp), %rdi
callq 0x32e0
movq 0x10eb6(%rip), %rdi     # 0x16fc0
leaq 0x9025(%rip), %rsi      # 0xf136
callq 0x3270
movq %rax, -0x230(%rbp)
jmp 0x611f
movq -0x230(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3230
movq %rax, -0x238(%rbp)
jmp 0x613b
movq -0x238(%rbp), %rdi
leaq 0x8fec(%rip), %rsi      # 0xf135
callq 0x3270
movq %rax, -0x240(%rbp)
jmp 0x6157
movq -0x240(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3230
movq %rax, -0x248(%rbp)
jmp 0x6173
movq -0x248(%rbp), %rdi
leaq 0x8fb5(%rip), %rsi      # 0xf136
callq 0x3270
movq %rax, -0x250(%rbp)
jmp 0x618f
movq -0x250(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x3230
movq %rax, -0x258(%rbp)
jmp 0x61ab
movq -0x258(%rbp), %rdi
movq 0x10df7(%rip), %rsi     # 0x16fb0
callq 0x32b0
jmp 0x61c0
leaq -0xf8(%rbp), %rdi
callq 0x3160
leaq -0xd8(%rbp), %rdi
callq 0x3160
leaq -0xb8(%rbp), %rdi
callq 0x3160
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x75d0
movq %rax, -0x1a8(%rbp)
jmp 0x5d5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6224
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x3160
leaq -0x169(%rbp), %rdi
callq 0x32e0
jmp 0x6264
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x6258
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x3160
leaq -0x199(%rbp), %rdi
callq 0x32e0
leaq -0xf8(%rbp), %rdi
callq 0x3160
leaq -0xd8(%rbp), %rdi
callq 0x3160
leaq -0xb8(%rbp), %rdi
callq 0x3160
jmp 0x62d0
movq 0x10d2f(%rip), %rdi     # 0x16fc0
movq 0x10d18(%rip), %rsi     # 0x16fb0
callq 0x32b0
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0x7610
movq %rax, -0x1b0(%rbp)
jmp 0x5ccc
movq 0x10d05(%rip), %rdi     # 0x16fc0
movq 0x10cee(%rip), %rsi     # 0x16fb0
callq 0x32b0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3430
nopl (%rax)