// File: /workspace/github_cpp_makefile_star2_O3/BU-DiSC[P]BF-Shared-Hashing/./args.hxx
// Function: _gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, 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::ArgumentParser::Parse<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, 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>>>>>>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, 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>>>>>, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, 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>>>>>)
It Parse(It begin, It end)
            {
                bool terminated = false;
                std::vector<Command *> commands = GetCommands();

                // Check all arg chunks
                for (auto it = begin; it != end; ++it)
                {
                    if (Complete(it, end))
                    {
                        return end;
                    }

                    const auto &chunk = *it;

                    if (!terminated && chunk == terminator)
                    {
                        terminated = true;
                    } else if (!terminated && ParseOption(chunk) == OptionType::LongFlag)
                    {
                        if (!ParseLong(it, end))
                        {
                            return it;
                        }
                    } else if (!terminated && ParseOption(chunk) == OptionType::ShortFlag)
                    {
                        if (!ParseShort(it, end))
                        {
                            return it;
                        }
                    } else if (!terminated && !commands.empty())
                    {
                        auto itCommand = std::find_if(commands.begin(), commands.end(), [&chunk](Command *c) { return c->Name() == chunk; });
                        if (itCommand == commands.end())
                        {
                            const std::string errorMessage("Unknown command: " + chunk);
#ifndef ARGS_NOEXCEPT
                            throw ParseError(errorMessage);
#else
                            error = Error::Parse;
                            errorMsg = errorMessage;
                            return it;
#endif
                        }

                        SelectCommand(*itCommand);

                        if (const auto &coroutine = GetCoroutine())
                        {
                            ++it;
                            RaiiSubparser coro(*this, std::vector<std::string>(it, end));
                            coroutine(coro.Parser());
#ifdef ARGS_NOEXCEPT
                            error = GetError();
                            if (error != Error::None)
                            {
                                return end;
                            }

                            if (!coro.Parser().IsParsed())
                            {
                                error = Error::Usage;
                                return end;
                            }
#else
                            if (!coro.Parser().IsParsed())
                            {
                                throw UsageError("Subparser::Parse was not called");
                            }
#endif

                            break;
                        }

                        commands = GetCommands();
                    } else
                    {
                        auto pos = GetNextPositional();
                        if (pos)
                        {
                            pos->ParseValue(chunk);

                            if (pos->KickOut())
                            {
                                return ++it;
                            }
                        } else
                        {
                            const std::string errorMessage("Passed in argument, but no positional arguments were ready to receive it: " + chunk);
#ifndef ARGS_NOEXCEPT
                            throw ParseError(errorMessage);
#else
                            error = Error::Parse;
                            errorMsg = errorMessage;
                            return it;
#endif
                        }
                    }

                    if (!readCompletion && completion != nullptr && completion->Matched())
                    {
#ifdef ARGS_NOEXCEPT
                        error = Error::Completion;
#endif
                        readCompletion = true;
                        ++it;
                        size_t argsLeft = std::distance(it, end);
                        if (completion->cword == 0 || argsLeft <= 1 || completion->cword >= argsLeft)
                        {
#ifndef ARGS_NOEXCEPT
                            throw Completion("");
#endif
                        }

                        std::vector<std::string> curArgs(++it, end);
                        curArgs.resize(completion->cword);

                        if (completion->syntax == "bash")
                        {
                            // bash tokenizes --flag=value as --flag=value
                            for (size_t idx = 0; idx < curArgs.size(); )
                            {
                                if (idx > 0 && curArgs[idx] == "=")
                                {
                                    curArgs[idx - 1] += "=";
                                    if (idx + 1 < curArgs.size())
                                    {
                                        curArgs[idx - 1] += curArgs[idx + 1];
                                        curArgs.erase(curArgs.begin() + idx, curArgs.begin() + idx + 2);
                                    } else
                                    {
                                        curArgs.erase(curArgs.begin() + idx);
                                    }
                                } else
                                {
                                    ++idx;
                                }
                            }

                        }
#ifndef ARGS_NOEXCEPT
                        try
                        {
                            Parse(curArgs.begin(), curArgs.end());
                            throw Completion("");
                        }
                        catch (Completion &)
                        {
                            throw;
                        }
                        catch (args::Error&)
                        {
                            throw Completion("");
                        }
#else
                        return Parse(curArgs.begin(), curArgs.end());
#endif
                    }
                }

                Validate(shortprefix, longprefix);
                return end;
            }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq *0x28(%rax)
movq %r15, (%rsp)
cmpq %r14, %r15
je 0x1ce81
leaq 0x210(%rbx), %rax
movq %rax, 0x68(%rsp)
xorl %ebp, %ebp
movq %rsp, %r13
movl %ebp, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d3fa
testb %al, %al
jne 0x1ce98
movq (%rsp), %r15
testb $0x1, %r12b
je 0x1cc24
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movq %rax, %rbp
testq %rax, %rax
je 0x1cebc
movq (%rbp), %rax
movq %rbp, %rdi
movq %r15, %rsi
callq *0x98(%rax)
testb $0x20, 0x8(%rbp)
movl %r12d, %ebp
je 0x1cc97
jmp 0x1cd8e
movq 0x8(%r15), %rdx
cmpq 0x1e0(%rbx), %rdx
jne 0x1cc4c
movb $0x1, %bpl
testq %rdx, %rdx
je 0x1cc97
movq 0x1d8(%rbx), %rsi
movq (%r15), %rdi
callq 0x5430
testl %eax, %eax
je 0x1cc97
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1dc10
testl %eax, %eax
je 0x1cc7f
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1dc10
cmpl $0x1, %eax
jne 0x1ccd4
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1e01c
jmp 0x1cc8d
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1dc9e
testb %al, %al
je 0x1cd9b
xorl %ebp, %ebp
cmpb $0x0, 0x208(%rbx)
jne 0x1ccba
movq 0x200(%rbx), %rdi
testq %rdi, %rdi
je 0x1ccba
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
jne 0x1cf0f
movq (%rsp), %r15
addq $0x20, %r15
movq %r15, (%rsp)
cmpq %r14, %r15
jne 0x1cbce
jmp 0x1ce81
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
cmpq %rsi, %rdi
je 0x1cbf1
movq %r15, %rdx
callq 0x1f90f
cmpq 0x38(%rsp), %rax
je 0x1d08e
movq (%rax), %rax
movq %rax, 0x130(%rbx)
testq %rax, %rax
je 0x1cd0d
movb $0x1, 0xc(%rax)
movq %rbx, %rax
movq %rax, %r12
movq 0x130(%rax), %rax
testq %rax, %rax
jne 0x1cd10
cmpq $0x0, 0x118(%r12)
jne 0x1cda4
movq (%rbx), %rax
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq *0x28(%rax)
movq 0x30(%rsp), %rdi
movaps 0x70(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
testq %rdi, %rdi
je 0x1cc95
callq 0x53d0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1cc95
callq 0x53d0
jmp 0x1cc95
movq (%rsp), %r14
addq $0x20, %r14
jmp 0x1ce98
movq (%rsp), %r14
jmp 0x1ce98
movq (%rsp), %rsi
addq $0x20, %rsi
movq %rsi, (%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r14, %rdx
callq 0xdfb2
leaq 0x108(%r12), %r15
movq %rbx, %rax
leaq 0x78(%rsp), %r13
movq %rax, %rcx
movq 0x130(%rax), %rax
testq %rax, %rax
jne 0x1cdd2
movq %rcx, 0x70(%rsp)
movaps 0x50(%rsp), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %r13, %rdi
movq %rbx, %rdx
movq 0x68(%rsp), %r8
callq 0x1fa36
leaq 0x10(%rsp), %rdi
callq 0x698e
movq 0x70(%rsp), %rax
movq 0x170(%rax), %rcx
movq %rcx, 0x130(%rsp)
movq %r13, 0x170(%rax)
leaq 0x50(%rsp), %rdi
callq 0x698e
cmpq $0x0, 0x118(%r12)
je 0x1d1aa
movq %r15, %rdi
movq %r13, %rsi
callq *0x120(%r12)
cmpb $0x0, 0x128(%rsp)
je 0x1d1af
leaq 0x70(%rsp), %rdi
callq 0x18bac
leaq 0x198(%rbx), %rsi
leaq 0x178(%rbx), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1cea7
callq 0x53d0
movq %r14, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcfe8(%rip), %rsi      # 0x29eab
leaq 0x70(%rsp), %rdi
movq %r15, %rdx
callq 0xd04f
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x54d0
leaq 0x1bc5f(%rip), %rax     # 0x38b50
movq %rax, (%r14)
leaq 0x1b575(%rip), %rsi     # 0x38470
movq 0x1c0c6(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
jmp 0x1d331
movb $0x1, 0x208(%rbx)
movq (%rsp), %rsi
leaq 0x20(%rsi), %rcx
movq %rcx, (%rsp)
movq %r14, %rax
subq %rcx, %rax
sarq $0x5, %rax
movq 0x200(%rbx), %rcx
movq 0x128(%rcx), %rcx
cmpq %rax, %rcx
jae 0x1d02a
testq %rcx, %rcx
je 0x1d02a
cmpq $0x1, %rax
jbe 0x1d02a
addq $0x40, %rsi
movq %rsi, (%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rcx
movq %r14, %rdx
callq 0xdfb2
movq 0x200(%rbx), %rax
movq 0x128(%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1e454
movl $0x130, %edi            # imm = 0x130
addq 0x200(%rbx), %rdi
leaq 0xcf5b(%rip), %rsi      # 0x29ef6
callq 0x5120
testl %eax, %eax
setne %al
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
cmpq %rsi, %rdx
sete %cl
orb %al, %cl
je 0x1d0e1
movq %rbx, %rdi
callq 0x1e4ca
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc473(%rip), %rdx      # 0x29459
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0xf95c
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x54d0
leaq 0x1bb86(%rip), %rax     # 0x38b90
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x1bb52(%rip), %rsi     # 0x38b68
movq 0x1bfab(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
jmp 0x1d331
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc40f(%rip), %rdx      # 0x29459
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0xf95c
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x54d0
leaq 0x1bb22(%rip), %rax     # 0x38b90
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x1baee(%rip), %rsi     # 0x38b68
movq 0x1bf47(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
jmp 0x1d331
leaq 0xcde4(%rip), %rsi      # 0x29e79
leaq 0x70(%rsp), %rdi
movq %r15, %rdx
callq 0xd04f
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x54d0
leaq 0x1ba8d(%rip), %rax     # 0x38b50
movq %rax, (%r14)
leaq 0x1b3a3(%rip), %rsi     # 0x38470
movq 0x1bef4(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
jmp 0x1d331
xorl %r13d, %r13d
leaq 0xbf48(%rip), %r14      # 0x29033
leaq 0x10(%rsp), %r15
testq %r13, %r13
je 0x1d10e
movq %r13, %rbp
shlq $0x5, %rbp
addq %rbp, %rsi
movq %rsi, %rdi
movq %r14, %rsi
callq 0x5120
testl %eax, %eax
je 0x1d12f
incq %r13
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rdx, %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r13
jb 0x1d0f0
jmp 0x1cfbd
leaq -0x1(%r13), %r12
shlq $0x5, %r12
movq 0x10(%rsp), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0x5720
leaq 0x1(%r13), %rcx
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rcx
jae 0x1d19a
shlq $0x5, %rcx
addq %rsi, %r12
movq (%rsi,%rcx), %rax
movq 0x8(%rsi,%rcx), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x5150
movq 0x10(%rsp), %rax
leaq (%rax,%rbp), %rsi
leaq (%rax,%rbp), %rdx
addq $0x40, %rdx
movq %r15, %rdi
callq 0x1fcbe
jmp 0x1d111
addq %rbp, %rsi
movq %r15, %rdi
callq 0x1fd68
jmp 0x1d111
callq 0x5190
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xccbf(%rip), %rsi      # 0x29e8b
leaq 0xccd7(%rip), %rdx      # 0x29eaa
leaq 0x10(%rsp), %rdi
callq 0xf95c
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x54d0
leaq 0x1b54c(%rip), %rax     # 0x38740
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x1b518(%rip), %rsi     # 0x38718
movq 0x1bdc1(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
jmp 0x1d331
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d226
callq 0x53d0
testb %bpl, %bpl
jne 0x1d230
jmp 0x1d249
movq %rax, %rbx
movq %r14, %rdi
callq 0x52e0
jmp 0x1d249
jmp 0x1d374
jmp 0x1d374
jmp 0x1d246
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x18bac
jmp 0x1d3e2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x698e
leaq 0x50(%rsp), %rdi
jmp 0x1d37c
jmp 0x1d3df
jmp 0x1d374
movq %rdx, %r15
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x1d28e
callq 0x53d0
testb %bpl, %bpl
jne 0x1d29b
jmp 0x1d2ab
movq %rdx, %r15
movq %rax, %rbx
movq %r14, %rdi
callq 0x52e0
jmp 0x1d2ab
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x2, %r15d
jne 0x1d2c0
movq %rbx, %rdi
callq 0x51c0
callq 0x55b0
jmp 0x1d331
cmpl $0x1, %r15d
jne 0x1d377
movq %rbx, %rdi
callq 0x51c0
movl $0x10, %edi
callq 0x51f0
movq %rax, %r14
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc167(%rip), %rdx      # 0x29459
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0xf95c
movb $0x1, %bpl
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x54d0
leaq 0x1b87a(%rip), %rax     # 0x38b90
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x1b846(%rip), %rsi     # 0x38b68
movq 0x1bc9f(%rip), %rdx     # 0x38fc8
movq %r14, %rdi
callq 0x5670
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d343
callq 0x53d0
testb %bpl, %bpl
jne 0x1d34d
jmp 0x1d355
movq %rax, %rbx
movq %r14, %rdi
callq 0x52e0
callq 0x5640
jmp 0x1d377
movq %rax, %rbx
callq 0x5640
jmp 0x1d377
movq %rax, %rdi
callq 0x6c08
jmp 0x1d3b1
jmp 0x1d3b6
jmp 0x1d3df
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x698e
jmp 0x1d3e2
jmp 0x1d3df
jmp 0x1d3df
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x1d399
callq 0x53d0
testb %bpl, %bpl
jne 0x1d3a3
jmp 0x1d3e2
movq %rax, %rbx
movq %r14, %rdi
callq 0x52e0
jmp 0x1d3e2
jmp 0x1d3df
jmp 0x1d3df
movq %rax, %rbx
jmp 0x1d3c1
movq %rax, %rbx
movq %r14, %rdi
callq 0x52e0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d3e2
callq 0x53d0
jmp 0x1d3e2
jmp 0x1d3df
jmp 0x1d3df
jmp 0x1d3df
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1d3f1
callq 0x53d0
movq %rbx, %rdi
callq 0x56b0
nop