// File: /workspace/github_cpp_makefile_star2_O3/BU-DiSC[P]BF-Shared-Hashing/./args.hxx
// Function: std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> args::Wrap<std::istream_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, std::char_traits<char>, long>>(std::istream_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, std::char_traits<char>, long>, std::istream_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char, std::char_traits<char>, long>, unsigned long, unsigned long, unsigned long)
inline std::vector<std::string> Wrap(It begin,
                                         It end,
                                         const std::string::size_type width,
                                         std::string::size_type firstlinewidth = 0,
                                         std::string::size_type firstlineindent = 0)
    {
        std::vector<std::string> output;
        std::string line(firstlineindent, ' ');
        bool empty = true;

        if (firstlinewidth == 0)
        {
            firstlinewidth = width;
        }

        auto currentwidth = firstlinewidth;

        for (auto it = begin; it != end; ++it)
        {
            if (it->empty())
            {
                continue;
            }

            if (*it == "\n")
            {
                if (!empty)
                {
                    output.push_back(line);
                    line.clear();
                    empty = true;
                    currentwidth = width;
                }

                continue;
            }

            auto itemsize = Glyphs(*it);
            if ((line.length() + 1 + itemsize) > currentwidth)
            {
                if (!empty)
                {
                    output.push_back(line);
                    line.clear();
                    empty = true;
                    currentwidth = width;
                }
            }

            if (itemsize > 0)
            {
                if (!empty)
                {
                    line += ' ';
                }

                line += *it;
                empty = false;
            }
        }

        if (!empty)
        {
            output.push_back(line);
        }

        return output;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r13
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
movq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x18(%rsp), %rdi
movq %r9, %rsi
movl $0x20, %edx
callq 0x5480
movq (%rbx), %rax
leaq 0x40(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
callq 0x6c14
testq %r13, %r13
cmoveq 0x10(%rsp), %r13
movb 0x28(%rbx), %al
leaq 0x38(%rsp), %rbp
movb %al, 0x28(%rbp)
movb $0x1, %r14b
leaq 0x7b76(%rip), %rbx      # 0x2a0b1
movb 0x60(%rsp), %al
cmpb 0x28(%r15), %al
jne 0x2255b
testb %al, %al
je 0x2265d
movq 0x38(%rsp), %rax
cmpq (%r15), %rax
je 0x2265d
cmpq $0x0, 0x48(%rsp)
je 0x22650
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x5120
testl %eax, %eax
je 0x225aa
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x225de
movq 0x40(%rsp), %rcx
xorl %edx, %edx
xorl %r12d, %r12d
movb (%rcx,%rdx), %sil
andb $-0x40, %sil
xorl %edi, %edi
negb %sil
setno %dil
addq %rdi, %r12
incq %rdx
cmpq %rdx, %rax
jne 0x2258c
jmp 0x225e1
testb $0x1, %r14b
jne 0x22650
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6b8a
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movb $0x1, %r14b
movq 0x10(%rsp), %r13
jmp 0x22650
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
addq %r12, %rax
incq %rax
cmpq %r13, %rax
jbe 0x2261f
testb $0x1, %r14b
jne 0x2261f
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6b8a
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movb $0x1, %r14b
movq 0x10(%rsp), %r13
testq %r12, %r12
je 0x22650
testb $0x1, %r14b
jne 0x22639
leaq 0x18(%rsp), %rdi
movl $0x20, %esi
callq 0x5370
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x5150
xorl %r14d, %r14d
movq %rbp, %rdi
callq 0x22742
jmp 0x2253b
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x22671
callq 0x53d0
testb $0x1, %r14b
jne 0x22686
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x6b8a
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2269a
callq 0x53d0
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x226b0
movq %rax, %rbx
jmp 0x226d3
movq %rax, %rbx
jmp 0x226e7
jmp 0x226bc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x226d3
callq 0x53d0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x226e7
callq 0x53d0
movq 0x8(%rsp), %rdi
callq 0x698e
movq %rbx, %rdi
callq 0x56b0
nop