// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: Parser::usage(char const*)
void
Parser::usage(const char* text) {

    if ( strcmp(text, "") != 0 ) {
        std::cerr << text << std::endl;
    }

    // add the options
    std::cerr << "Usage: ";
    std::cerr << programName << " ";

    std::stringstream optionsSummary;
    std::stringstream fullDescription;

    int maxWidth = 30;


    for(std::vector<BaseOption*>::iterator iter = options.begin();
        iter != options.end();
        ++iter
    ) {

        BaseOption* option = *iter;

        // this is the syntax:
        //   [ ] => optional
        //   short|long
        std::string summaryOptionBase = getSummaryOptionText(option);
        std::string fullOptionBase    = getFullOptionText(option);

        if ( option->needArgument() ) {
            summaryOptionBase += " value";
            fullOptionBase    += " value";
        }

        // summary 
        if ( ! option->isMandatory() ) {
            optionsSummary << "[" << summaryOptionBase << "]";
        }
        else {
            optionsSummary << summaryOptionBase;
        }

        optionsSummary << " ";

        // full description
        fullDescription << " " << std::setw(maxWidth) << std::left << fullOptionBase << "\t\t" << option->getDescription() << std::endl;

    }

    std::cerr << optionsSummary.str() << std::endl;
    std::cerr << "Options:" << std::endl;
    std::cerr << fullDescription.str();

    // end
    exit(1);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rdi, %r13
cmpb $0x0, (%rsi)
je 0x40fd
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x30b0
movq 0x5f28(%rip), %r14      # 0x9ff0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3110
movq 0x5eec(%rip), %rbx      # 0x9ff0
leaq 0x2f97(%rip), %rsi      # 0x70a2
movl $0x7, %edx
movq %rbx, %rdi
callq 0x3210
movq 0x78(%r13), %rsi
movq 0x80(%r13), %rdx
movq %rbx, %rdi
callq 0x3210
leaq 0x2f46(%rip), %rsi      # 0x7078
movl $0x1, %edx
movq %rax, %rdi
callq 0x3210
leaq -0x398(%rbp), %rdi
callq 0x3120
leaq -0x210(%rbp), %rdi
callq 0x3120
movq 0x60(%r13), %r15
cmpq 0x68(%r13), %r15
jne 0x4201
leaq -0x380(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x32b0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x5e6c(%rip), %rdi      # 0x9ff0
callq 0x3210
movq %rax, %rdi
callq 0x30d0
leaq -0x38(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x41aa
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq 0x5e3f(%rip), %rdi      # 0x9ff0
leaq 0x2f00(%rip), %rsi      # 0x70b8
movl $0x8, %edx
callq 0x3210
movq 0x5e27(%rip), %rdi      # 0x9ff0
callq 0x30d0
leaq -0x1f8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x32b0
movq 0x5e0b(%rip), %rdi      # 0x9ff0
leaq -0x48(%rbp), %rsi
callq 0x31a0
leaq -0x48(%rbp), %rdi
callq 0x30c0
movl $0x1, %edi
callq 0x3220
leaq -0x388(%rbp), %r14
movq (%r15), %r12
leaq -0x48(%rbp), %rdi
movq %r12, %rdx
leaq 0x3001(%rip), %rcx      # 0x721a
callq 0x44c6
leaq -0x88(%rbp), %rdi
movq %r12, %rdx
leaq 0x2e48(%rip), %rcx      # 0x7077
callq 0x44c6
cmpb $0x1, 0x31(%r12)
jne 0x425f
leaq -0x48(%rbp), %rdi
leaq 0x2e63(%rip), %rsi      # 0x70aa
callq 0x3340
leaq -0x88(%rbp), %rdi
leaq 0x2e50(%rip), %rsi      # 0x70aa
callq 0x3340
cmpb $0x0, 0x30(%r12)
je 0x4279
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
jmp 0x42b1
movl $0x1, %edx
movq %r14, %rdi
leaq 0x2e29(%rip), %rsi      # 0x70b1
callq 0x3210
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2e07(%rip), %rsi      # 0x70b3
callq 0x3210
movl $0x1, %edx
movq %r14, %rdi
leaq 0x2db8(%rip), %rsi      # 0x7078
callq 0x3210
movl $0x1, %edx
leaq -0x200(%rbp), %rdi
leaq 0x2da0(%rip), %rsi      # 0x7078
callq 0x3210
movq -0x200(%rbp), %rax
movq -0x18(%rax), %rcx
movq $0x1e, -0x1f0(%rbp,%rcx)
movq -0x18(%rax), %rax
movl -0x1e8(%rbp,%rax), %ecx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl %edx, %ecx
orl $0x20, %ecx
movl %ecx, -0x1e8(%rbp,%rax)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x200(%rbp), %rdi
callq 0x3210
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x2d7c(%rip), %rsi      # 0x70b5
callq 0x3210
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq 0x38(%r12), %rsi
movq 0x40(%r12), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x630c
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x3210
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3110
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x43af
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x43cb
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x43e4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
addq $0x8, %r15
cmpq 0x68(%r13), %r15
jne 0x4208
jmp 0x4165
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4469
jmp 0x447a
jmp 0x4477
jmp 0x443d
movq %rax, %rbx
jmp 0x445c
jmp 0x4477
jmp 0x4477
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4440
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x4440
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4464
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x445c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x447a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x447a
movq %rax, %rbx
movq 0x5b37(%rip), %rsi      # 0x9fb8
leaq -0x210(%rbp), %rdi
callq 0x3140
leaq -0x190(%rbp), %rdi
callq 0x3080
jmp 0x449e
movq %rax, %rbx
movq 0x5b13(%rip), %rsi      # 0x9fb8
leaq -0x398(%rbp), %rdi
callq 0x3140
leaq -0x318(%rbp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3320
nop