// File: yeonnic[P]solparser/././argx.hpp
// 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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xd8(%rbp)
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
callq 0xb7d0
movq -0x30(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x6630
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rcx
leaq -0x58(%rbp), %rdi
movl $0x20, %edx
callq 0x6220
jmp 0x2dbc4
leaq -0x59(%rbp), %rdi
callq 0x6390
movb $0x1, -0x6d(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2dbfc
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2dbfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x6390
jmp 0x2de46
movq -0xd8(%rbp), %rsi
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2df20
jmp 0x2dc19
jmp 0x2dc1b
movq -0xe0(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x2df70
movb %al, -0xe1(%rbp)
jmp 0x2dc36
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x2dc81
jmp 0x2dc42
leaq -0xa8(%rbp), %rdi
callq 0x2df00
jmp 0x2ddf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2de1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2df00
jmp 0x2de1f
leaq -0xa8(%rbp), %rdi
callq 0x2dfa0
movq %rax, -0xf0(%rbp)
jmp 0x2dc96
movq -0xf0(%rbp), %rdi
callq 0x65c0
testb $0x1, %al
jne 0x2dca8
jmp 0x2dcad
jmp 0x2dddd
leaq -0xa8(%rbp), %rdi
callq 0x2dfc0
movq %rax, -0xf8(%rbp)
jmp 0x2dcc2
movq -0xf8(%rbp), %rdi
leaq 0x9814(%rip), %rsi      # 0x374e4
callq 0x26120
testb $0x1, %al
jne 0x2dcdb
jmp 0x2dd0d
testb $0x1, -0x6d(%rbp)
jne 0x2dd08
movq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16a30
jmp 0x2dcf3
leaq -0x58(%rbp), %rdi
callq 0x6490
movb $0x1, -0x6d(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x2dddd
leaq -0xa8(%rbp), %rdi
callq 0x2dfc0
movq %rax, -0x100(%rbp)
jmp 0x2dd22
movq -0x100(%rbp), %rdi
callq 0x2dab0
movq %rax, -0x108(%rbp)
jmp 0x2dd37
movq -0x108(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6530
addq $0x1, %rax
addq -0xb0(%rbp), %rax
cmpq -0x78(%rbp), %rax
jbe 0x2dd8e
testb $0x1, -0x6d(%rbp)
jne 0x2dd8c
movq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16a30
jmp 0x2dd77
leaq -0x58(%rbp), %rdi
callq 0x6490
movb $0x1, -0x6d(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x2dd8e
cmpq $0x0, -0xb0(%rbp)
jbe 0x2dddb
testb $0x1, -0x6d(%rbp)
jne 0x2ddb0
leaq -0x58(%rbp), %rdi
movl $0x20, %esi
callq 0x6200
jmp 0x2ddae
jmp 0x2ddb0
leaq -0xa8(%rbp), %rdi
callq 0x2dfc0
movq %rax, -0x110(%rbp)
jmp 0x2ddc5
movq -0x110(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6450
jmp 0x2ddd7
movb $0x0, -0x6d(%rbp)
jmp 0x2dddd
leaq -0xa8(%rbp), %rdi
callq 0x2dfe0
jmp 0x2ddeb
jmp 0x2dc1b
testb $0x1, -0x6d(%rbp)
jne 0x2de0a
movq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16a30
jmp 0x2de08
jmp 0x2de0a
movb $0x1, -0x31(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x61f0
testb $0x1, -0x31(%rbp)
jne 0x2de36
jmp 0x2de2a
leaq -0x58(%rbp), %rdi
callq 0x61f0
jmp 0x2de46
movq -0xd0(%rbp), %rdi
callq 0x13c70
movq -0xc8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0x13c70
movq -0x68(%rbp), %rdi
callq 0x6620
nopl (%rax,%rax)