// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getUsageStr[abi:cxx11]() const
std::string CommandLineParser::getUsageStr() const
{
    std::stringstream ret;

    // Get usage header.
    std::vector<std::string> lines = ut1::splitLines(usage, 80);
    ret << ut1::joinStrings(lines, "\n") << "\n"; // ut1::splitLines() swallows the last LF.

    // Get maximum longOption[=argName] string len.
    size_t maxHelpNameLen = 0;
    for (const auto& opt: options)
    {
        maxHelpNameLen = std::max(maxHelpNameLen, opt.second.getHelpNameLen());
    }

    // Get width/wrap column of help text.
    size_t helpStartCol = maxHelpNameLen + 8;
    size_t helpWidth    = std::max(helpStartCol + 80, size_t(79));
    size_t helpWrapCol  = helpWidth - helpStartCol;

    // Print option list.
    for (const auto& name: optionList)
    {
        // Print option header.
        if (ut1::hasPrefix(name, HEADER_PREFIX))
        {
            ret << name.substr(strlen(HEADER_PREFIX));
            continue;
        }

        const Option* option = getOption(name);
        ret << "  ";
        if (option->shortOption)
        {
            ret << "-" << option->shortOption;
        }
        else
        {
            ret << "  ";
        }
        std::string nameEqArg = option->longOption;
        if (!option->argName.empty())
        {
            nameEqArg += "=" + option->argName;
        }
        ret << " --" << nameEqArg;
        size_t pad = std::max(size_t(0), maxHelpNameLen - nameEqArg.length()) + 1;
        ret << std::string(pad, ' ');
        lines = ut1::splitLines(option->help, helpWrapCol);
        ret << ut1::joinStrings(lines, "\n" + std::string(helpStartCol, ' '));
        std::vector<std::string> braceItems;
        if (option->shortOptionAlias)
        {
            braceItems.push_back("alias=-" + std::string(1, option->shortOptionAlias));
        }
        if (option->isList)
        {
            braceItems.emplace_back("list");
        }
        if (!option->defaultValue.empty())
        {
            braceItems.push_back("default=" + option->defaultValue);
        }
        if (option->value != option->defaultValue)
        {
            if (option->argName.empty())
            {
                braceItems.emplace_back("set");
            }
            else
            {
                braceItems.push_back("value=" + option->value);
            }
        }
        if (option->count > 1)
        {
            braceItems.push_back("count=" + std::to_string(option->count));
        }
        if (!braceItems.empty())
        {
            ret << " (" + ut1::joinStrings(braceItems, ", ") + ")";
        }
        ret << "\n";
    }

    // Get usage footer.
    ret << footer;

    std::string u = ret.str();
    ut1::replaceStringInPlace(u, "$programName", programName);
    ut1::replaceStringInPlace(u, "$version", version);

    return u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x110(%rsp), %rdi
callq 0x5310
movq %rbx, 0x8(%rsp)
leaq 0xb8(%rbx), %rsi
leaq 0xd8(%rsp), %rdi
pushq $0x50
popq %rdx
callq 0x9326
leaq 0x146b8(%rip), %rsi     # 0x1b0a9
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x760a
leaq 0x50(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x95ae
leaq 0x120(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x53c0
leaq 0x14679(%rip), %rsi     # 0x1b0a9
movq %rax, %rdi
callq 0x5400
leaq 0x50(%rsp), %rdi
callq 0x51f0
leaq 0x30(%rsp), %rdi
callq 0x51f0
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
leaq 0x8(%rcx), %rbx
xorl %r14d, %r14d
cmpq %rbx, %rax
je 0x6a88
movq 0x90(%rax), %rcx
movq 0x50(%rax), %rdx
addq %rcx, %rdx
cmpq $0x1, %rcx
sbbq $-0x1, %rdx
cmpq %rdx, %r14
cmovbeq %rdx, %r14
movq %rax, %rdi
callq 0x54c0
jmp 0x6a5c
leaq 0x58(%r14), %rax
cmpq $0x50, %rax
pushq $0x4f
popq %rcx
cmovaeq %rax, %rcx
leaq 0x8(%r14), %rax
movq %rax, 0x98(%rsp)
subq %rax, %rcx
movq %rcx, 0xa0(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rbp
movq 0x38(%rax), %rax
movq %rax, 0xb0(%rsp)
incq %r14
movq %r14, 0xa8(%rsp)
leaq 0x30(%rsp), %r13
movq %r15, 0x90(%rsp)
cmpq 0xb0(%rsp), %rbp
je 0x6f1d
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
leaq 0x14567(%rip), %rsi     # 0x1b05f
movq %r13, %rdx
callq 0x760a
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x8c40
movl %eax, %r14d
movq %rbx, %rdi
callq 0x51f0
testb %r14b, %r14b
je 0x6b44
movq %rbx, %rdi
movq %rbp, %rsi
pushq $0x7
popq %rdx
pushq $-0x1
popq %rcx
callq 0x5460
leaq 0x120(%rsp), %rdi
movq %rbx, %rsi
callq 0x53c0
movq %rbx, %rdi
jmp 0x6f0f
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x7520
movq %rax, %r14
movq %rbx, %r15
leaq 0x120(%rsp), %rdi
leaq 0x14611(%rip), %rsi     # 0x1b177
callq 0x5400
movq %r14, %rbx
cmpb $0x0, (%r14)
je 0x6b95
leaq 0x120(%rsp), %rdi
leaq 0x14733(%rip), %rsi     # 0x1b2b6
callq 0x5400
movsbl (%rbx), %esi
movq %rax, %rdi
callq 0x54e0
jmp 0x6ba9
leaq 0x120(%rsp), %rdi
leaq 0x145d3(%rip), %rsi     # 0x1b177
callq 0x5400
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x55d0
cmpq $0x0, 0x50(%rbx)
je 0x6be2
leaq 0x48(%r14), %rdx
movq %r13, %rdi
leaq 0x145cf(%rip), %rsi     # 0x1b199
callq 0x7667
movq %r15, %rdi
movq %r13, %rsi
callq 0x5820
movq %r13, %rdi
callq 0x51f0
leaq 0x120(%rsp), %rdi
leaq 0x14601(%rip), %rsi     # 0x1b1f2
callq 0x5400
movq %rax, %rdi
movq %r15, %rsi
callq 0x53c0
movq 0xa8(%rsp), %rsi
subq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r13, %rdi
pushq $0x20
popq %rdx
callq 0x54d0
leaq 0x120(%rsp), %rdi
movq %r13, %rsi
callq 0x53c0
movq %r13, %rdi
callq 0x51f0
leaq 0x28(%r14), %rsi
movq %r13, %rdi
movq 0xa0(%rsp), %rdx
callq 0x9326
leaq 0xd8(%rsp), %rdi
movq %r13, %rsi
callq 0x88d4
movq %r13, %rdi
callq 0x7646
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
movq 0x98(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x54d0
leaq 0x70(%rsp), %r12
movq %r12, %rdi
leaq 0x14408(%rip), %rsi     # 0x1b0a9
movq %r15, %rdx
callq 0x7717
movq %r13, %rdi
leaq 0xd8(%rsp), %rsi
movq %r12, %rdx
callq 0x95ae
leaq 0x120(%rsp), %rdi
movq %r13, %rsi
callq 0x53c0
movq %r13, %rdi
callq 0x51f0
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x51f0
leaq 0xb8(%rsp), %rdi
callq 0x51f0
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movb 0x1(%rbx), %al
testb %al, %al
je 0x6d4f
leaq 0x80(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movsbl %al, %edx
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x54d0
movq %r13, %rdi
leaq 0x14452(%rip), %rsi     # 0x1b17a
movq %r15, %rdx
callq 0x7717
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x8926
movq %r13, %rdi
callq 0x51f0
leaq 0x70(%rsp), %rdi
callq 0x51f0
cmpb $0x1, 0x88(%rbx)
jne 0x6d69
leaq 0x10(%rsp), %rdi
leaq 0x1441e(%rip), %rsi     # 0x1b182
callq 0x79fc
leaq 0x68(%r14), %r15
cmpq $0x0, 0x70(%rbx)
je 0x6d9b
movq %r13, %rdi
leaq 0x14409(%rip), %rsi     # 0x1b187
movq %r15, %rdx
callq 0x7667
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x8926
movq %r13, %rdi
callq 0x51f0
addq $0x90, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7a35
testb %al, %al
movq 0x90(%rsp), %r15
je 0x6dfa
cmpq $0x0, 0x50(%rbx)
je 0x6de9
movq %r13, %rdi
leaq 0x143ca(%rip), %rsi     # 0x1b194
movq %r14, %rdx
callq 0x7667
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x8926
movq %r13, %rdi
callq 0x51f0
jmp 0x6dfa
leaq 0x10(%rsp), %rdi
leaq 0x1439b(%rip), %rsi     # 0x1b190
callq 0x7a40
movl 0xb0(%rbx), %esi
cmpl $0x2, %esi
jb 0x6e43
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x75cb
movq %r13, %rdi
leaq 0x1437f(%rip), %rsi     # 0x1b19b
movq %rbx, %rdx
callq 0x7717
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x8926
movq %r13, %rdi
callq 0x51f0
leaq 0x70(%rsp), %rdi
callq 0x51f0
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x6eec
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
leaq 0x14340(%rip), %rsi     # 0x1b1a5
leaq 0x7(%rsp), %rdx
callq 0x760a
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x95ae
leaq 0x70(%rsp), %r14
movq %r14, %rdi
leaq 0x1430c(%rip), %rsi     # 0x1b1a2
movq %rbx, %rdx
callq 0x7717
movq %r13, %rdi
movq %r14, %rsi
leaq 0x143bd(%rip), %rdx     # 0x1b268
callq 0x76f8
leaq 0x120(%rsp), %rdi
movq %r13, %rsi
callq 0x53c0
movq %r13, %rdi
callq 0x51f0
leaq 0x70(%rsp), %rdi
callq 0x51f0
leaq 0xb8(%rsp), %rdi
callq 0x51f0
leaq 0xf0(%rsp), %rdi
callq 0x51f0
leaq 0x120(%rsp), %rdi
leaq 0x141ae(%rip), %rsi     # 0x1b0a9
callq 0x5400
leaq 0x10(%rsp), %rdi
callq 0x7646
leaq 0x50(%rsp), %rdi
callq 0x51f0
addq $0x20, %rbp
jmp 0x6adb
movq 0x8(%rsp), %rax
leaq 0xd8(%rax), %rsi
leaq 0x120(%rsp), %rdi
callq 0x53c0
leaq 0x128(%rsp), %rsi
movq %r15, %rdi
callq 0x5660
leaq 0x1425b(%rip), %rsi     # 0x1b1a8
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x760a
movq 0x8(%rsp), %rax
leaq 0x98(%rax), %rdx
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x8ca9
leaq 0x50(%rsp), %rdi
callq 0x51f0
leaq 0x1422f(%rip), %rsi     # 0x1b1b5
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x760a
movq 0x8(%rsp), %rdx
addq $0xf8, %rdx
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x8ca9
leaq 0x50(%rsp), %rdi
callq 0x51f0
leaq 0xd8(%rsp), %rdi
callq 0x7646
leaq 0x110(%rsp), %rdi
callq 0x5340
movq %r15, %rax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6feb
jmp 0x6ffa
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x51f0
jmp 0x6ffd
movq %rax, %rbx
movq 0x90(%rsp), %rdi
jmp 0x7120
movq %rax, %rbx
jmp 0x702e
jmp 0x7129
movq %rax, %rbx
jmp 0x7139
jmp 0x7129
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x51f0
leaq 0x30(%rsp), %rdi
jmp 0x7120
jmp 0x7057
jmp 0x7109
jmp 0x7070
jmp 0x708e
jmp 0x7109
jmp 0x7109
jmp 0x7118
movq %rax, %rbx
jmp 0x70a7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x70bc
movq %rax, %rbx
jmp 0x70b4
jmp 0x7109
jmp 0x7109
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x51f0
jmp 0x7091
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x51f0
jmp 0x709d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x70bc
jmp 0x70fa
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x51f0
leaq 0xb8(%rsp), %rdi
callq 0x51f0
leaq 0xf0(%rsp), %rdi
callq 0x51f0
jmp 0x710c
jmp 0x7118
movq %rax, %rbx
jmp 0x70e4
jmp 0x7129
jmp 0x7129
jmp 0x7118
jmp 0x7118
movq %rax, %rbx
jmp 0x70ee
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x51f0
leaq 0x70(%rsp), %rdi
callq 0x51f0
leaq 0xb8(%rsp), %rdi
jmp 0x7102
jmp 0x7118
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x51f0
jmp 0x711b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7646
jmp 0x711b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x51f0
jmp 0x712c
jmp 0x7129
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x7646
leaq 0x110(%rsp), %rdi
callq 0x5340
movq %rbx, %rdi
callq 0x5730