// File: demon386[P]git-store/./libs/program_options/src/options_description.cpp
// Function: boost::program_options::(anonymous namespace)::format_paragraph(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int, unsigned int)
void format_paragraph(std::ostream& os,
                              std::string par,
                              unsigned indent,
                              unsigned line_length)
        {                    
            // Through reminder of this function, 'line_length' will
            // be the length available for characters, not including
            // indent.
            assert(indent < line_length);
            line_length -= indent;

            // index of tab (if present) is used as additional indent relative
            // to first_column_width if paragrapth is spanned over multiple
            // lines if tab is not on first line it is ignored
            string::size_type par_indent = par.find('\t');

            if (par_indent == string::npos)
            {
                par_indent = 0;
            }
            else
            {
                // only one tab per paragraph allowed
                if (count(par.begin(), par.end(), '\t') > 1)
                {
                    boost::throw_exception(program_options::error(
                        "Only one tab per paragraph is allowed in the options description"));
                }
          
                // erase tab from string
                par.erase(par_indent, 1);

                // this assert may fail due to user error or 
                // environment conditions!
                assert(par_indent < line_length);

                // ignore tab if not on first line
                if (par_indent >= line_length)
                {
                    par_indent = 0;
                }            
            }
          
            if (par.size() < line_length)
            {
                os << par;
            }
            else
            {
                string::const_iterator       line_begin = par.begin();
                const string::const_iterator par_end = par.end();

                bool first_line = true; // of current paragraph!        
            
                while (line_begin < par_end)  // paragraph lines
                {
                    if (!first_line)
                    {
                        // If line starts with space, but second character
                        // is not space, remove the leading space.
                        // We don't remove double spaces because those
                        // might be intentianal.
                        if ((*line_begin == ' ') &&
                            ((line_begin + 1 < par_end) &&
                             (*(line_begin + 1) != ' ')))
                        {
                            line_begin += 1;  // line_begin != line_end
                        }
                    }

                    // Take care to never increment the iterator past
                    // the end, since MSVC 8.0 (brokenly), assumes that
                    // doing that, even if no access happens, is a bug.
                    unsigned remaining = static_cast<unsigned>(std::distance(line_begin, par_end));
                    string::const_iterator line_end = line_begin + 
                        ((remaining < line_length) ? remaining : line_length);
            
                    // prevent chopped words
                    // Is line_end between two non-space characters?
                    if ((*(line_end - 1) != ' ') &&
                        ((line_end < par_end) && (*line_end != ' ')))
                    {
                        // find last ' ' in the second half of the current paragraph line
                        string::const_iterator last_space =
                            find(reverse_iterator<string::const_iterator>(line_end),
                                 reverse_iterator<string::const_iterator>(line_begin),
                                 ' ')
                            .base();
                
                        if (last_space != line_begin)
                        {                 
                            // is last_space within the second half ot the 
                            // current line
                            if (static_cast<unsigned>(std::distance(last_space, line_end)) < 
                                (line_length / 2))
                            {
                                line_end = last_space;
                            }
                        }                                                
                    } // prevent chopped words
             
                    // write line to stream
                    copy(line_begin, line_end, ostream_iterator<char>(os));
              
                    if (first_line)
                    {
                        indent += static_cast<unsigned>(par_indent);
                        line_length -= static_cast<unsigned>(par_indent); // there's less to work with now
                        first_line = false;
                    }

                    // more lines to follow?
                    if (line_end != par_end)
                    {
                        os << '\n';
                
                        for(unsigned pad = indent; pad > 0; --pad)
                        {
                            os.put(' ');
                        }                                                        
                    }
              
                    // next line starts after of this line
                    line_begin = line_end;              
                } // paragraph lines
            }          
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rsi, -0x168(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x260ca
jmp 0x260e9
leaq 0x3a554(%rip), %rdi     # 0x60625
leaq 0x3a213(%rip), %rsi     # 0x602eb
movl $0x197, %edx            # imm = 0x197
leaq 0x3a47e(%rip), %rcx     # 0x60562
callq 0xd400
movq -0x168(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl $0x9, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xd850
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x26121
movq $0x0, -0x20(%rbp)
jmp 0x26243
movq -0x168(%rbp), %rdi
callq 0xd550
movq -0x168(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0xd340
movq %rax, -0x30(%rbp)
movb $0x9, -0x31(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x31(%rbp), %rdx
callq 0x2a780
cmpq $0x1, %rax
jle 0x261eb
leaq -0x69(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0xdb50
movq -0x170(%rbp), %rdx
leaq 0x3a462(%rip), %rsi     # 0x605e0
leaq -0x68(%rbp), %rdi
callq 0xd8b0
jmp 0x26189
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x13440
jmp 0x26198
leaq -0x48(%rbp), %rdi
callq 0x1e930
jmp 0x261a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x261dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x261d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x134b0
leaq -0x68(%rbp), %rdi
callq 0xdca8
leaq -0x69(%rbp), %rdi
callq 0xd6b0
jmp 0x26670
movq -0x168(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0xd100
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpq %rcx, %rax
jae 0x2620e
jmp 0x2622d
leaq 0x3a40c(%rip), %rdi     # 0x60621
leaq 0x3a0cf(%rip), %rsi     # 0x602eb
movl $0x1b1, %edx            # imm = 0x1B1
leaq 0x3a33a(%rip), %rcx     # 0x60562
callq 0xd400
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpq %rcx, %rax
jb 0x26241
movq $0x0, -0x20(%rbp)
jmp 0x26243
movq -0x168(%rbp), %rdi
callq 0xd430
movl -0x18(%rbp), %ecx
cmpq %rcx, %rax
jae 0x2626c
movq -0x168(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0xd570
jmp 0x26667
movq -0x168(%rbp), %rdi
callq 0xd550
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x13090
movq -0x168(%rbp), %rdi
callq 0xd340
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x13090
movb $0x1, -0xa1(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2a7d0
testb $0x1, %al
jne 0x262db
jmp 0x26665
testb $0x1, -0xa1(%rbp)
jne 0x2639e
leaq -0x88(%rbp), %rdi
callq 0x2a440
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x171(%rbp)
jne 0x2637f
leaq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x2a810
movq %rax, -0xb0(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2a7d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x172(%rbp)
jne 0x26340
jmp 0x26373
leaq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x2a810
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x2a440
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x172(%rbp)
movb -0x172(%rbp), %al
movb %al, -0x171(%rbp)
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x2638b
jmp 0x2639c
leaq -0x88(%rbp), %rdi
movl $0x1, %esi
callq 0x2a850
jmp 0x2639e
movq -0x88(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x2a870
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x263ec
movl -0xbc(%rbp), %eax
movl %eax, -0x178(%rbp)
jmp 0x263f5
movl -0x18(%rbp), %eax
movl %eax, -0x178(%rbp)
movl -0x178(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0x2a810
movq %rax, -0xd8(%rbp)
leaq -0xd8(%rbp), %rdi
movl $0x1, %esi
callq 0x2a8b0
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x2a440
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x179(%rbp)
je 0x26491
leaq -0xd8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2a7d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x17a(%rbp)
jne 0x2646a
jmp 0x26485
leaq -0xd8(%rbp), %rdi
callq 0x2a440
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x17a(%rbp)
movb -0x17a(%rbp), %al
movb %al, -0x179(%rbp)
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x264a0
jmp 0x26583
movq -0xd8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x2a940
movq -0x88(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x2a940
movb $0x20, -0x111(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x108(%rbp), %rsi
leaq -0x111(%rbp), %rdx
callq 0x2a8f0
movq %rax, -0xf0(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2a970
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x29fc0
testb $0x1, %al
jne 0x26539
jmp 0x26581
movq -0xe8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0x2a870
movl -0x18(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jae 0x2657f
movq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x26581
jmp 0x26583
movq -0x88(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x2aa00
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rcx
callq 0x2a980
testb $0x1, -0xa1(%rbp)
je 0x265f8
movq -0x20(%rbp), %rax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movb $0x0, -0xa1(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x29fc0
testb $0x1, %al
jne 0x26611
jmp 0x26652
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0xd740
movl -0x14(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x0, -0x15c(%rbp)
jbe 0x26650
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0xd040
movl -0x15c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x26628
jmp 0x26652
movq -0xd8(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x262bf
jmp 0x26667
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0xdb30
nopl (%rax)