// File: /workspace/github_cpp_makefile_star2_O1/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 0x6bf6
testq %r13, %r13
cmoveq 0x10(%rsp), %r13
movb 0x28(%rbx), %al
leaq 0x38(%rsp), %rbp
movb %al, 0x28(%rbp)
movb $0x1, %r14b
leaq 0x75d7(%rip), %rbx      # 0x2a0b1
movb 0x60(%rsp), %al
cmpb 0x28(%r15), %al
jne 0x22afa
testb %al, %al
je 0x22bfc
movq 0x38(%rsp), %rax
cmpq (%r15), %rax
je 0x22bfc
cmpq $0x0, 0x48(%rsp)
je 0x22bef
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x5120
testl %eax, %eax
je 0x22b49
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x22b7d
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 0x22b2b
jmp 0x22b80
testb $0x1, %r14b
jne 0x22bef
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6b72
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movb $0x1, %r14b
movq 0x10(%rsp), %r13
jmp 0x22bef
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
addq %r12, %rax
incq %rax
cmpq %r13, %rax
jbe 0x22bbe
testb $0x1, %r14b
jne 0x22bbe
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6b72
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movb $0x1, %r14b
movq 0x10(%rsp), %r13
testq %r12, %r12
je 0x22bef
testb $0x1, %r14b
jne 0x22bd8
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 0x22ce0
jmp 0x22ada
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x22c10
callq 0x53d0
testb $0x1, %r14b
jne 0x22c25
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x6b72
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x22c39
callq 0x53d0
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22c4f
movq %rax, %rbx
jmp 0x22c72
movq %rax, %rbx
jmp 0x22c86
jmp 0x22c5b
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x22c72
callq 0x53d0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x22c86
callq 0x53d0
movq 0x8(%rsp), %rdi
callq 0x6982
movq %rbx, %rdi
callq 0x56b0