// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/third-party/catch2/single_include/catch2/catch.hpp
// Function: Catch::clara::detail::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Catch::clara::detail::TokenStream const&) const
auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override {

            struct ParserInfo {
                ParserBase const* parser = nullptr;
                size_t count = 0;
            };
            const size_t totalParsers = m_options.size() + m_args.size();
            assert( totalParsers < 512 );
            // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do
            ParserInfo parseInfos[512];

            {
                size_t i = 0;
                for (auto const &opt : m_options) parseInfos[i++].parser = &opt;
                for (auto const &arg : m_args) parseInfos[i++].parser = &arg;
            }

            m_exeName.set( exeName );

            auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );
            while( result.value().remainingTokens() ) {
                bool tokenParsed = false;

                for( size_t i = 0; i < totalParsers; ++i ) {
                    auto&  parseInfo = parseInfos[i];
                    if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {
                        result = parseInfo.parser->parse(exeName, result.value().remainingTokens());
                        if (!result)
                            return result;
                        if (result.value().type() != ParseResultType::NoMatch) {
                            tokenParsed = true;
                            ++parseInfo.count;
                            break;
                        }
                    }
                }

                if( result.value().type() == ParseResultType::ShortCircuitAll )
                    return result;
                if( !tokenParsed )
                    return InternalParseResult::runtimeError( "Unrecognised token: " + result.value().remainingTokens()->token );
            }
            // !TBD Check missing required options
            return result;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2148, %rsp           # imm = 0x2148
movq %rcx, -0x30(%rbp)
movq %rdx, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x30(%rsi), %rbx
movq 0x38(%rsi), %r12
movq %r12, %rax
subq %rbx, %rax
pushq $0x78
popq %rcx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x50(%rsi), %r15
movq %rsi, -0x50(%rbp)
movq 0x48(%rsi), %r13
movq %r15, %rax
subq %r13, %rax
pushq $0x60
popq %rsi
cqto
idivq %rsi
addq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpq $0x200, %rax            # imm = 0x200
jae 0x4405b
leaq -0x2170(%rbp), %r14
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
xorl %esi, %esi
callq 0x24300
cmpq %r12, %rbx
je 0x43db9
movq %rbx, (%r14)
addq $0x78, %rbx
addq $0x10, %r14
jmp 0x43d9c
movq %r13, (%r14)
addq $0x60, %r13
addq $0x10, %r14
cmpq %r15, %r13
jne 0x43dae
movq -0x50(%rbp), %rsi
addq $0x8, %rsi
leaq -0x168(%rbp), %r14
movq %r14, %rdi
movq -0x40(%rbp), %rdx
callq 0x44164
movq %r14, %rdi
callq 0x422de
leaq -0x108(%rbp), %rdi
movl $0x1, -0x8(%rdi)
movq -0x30(%rbp), %rsi
callq 0x41f20
leaq -0xb0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x41df4
leaq -0xf8(%rbp), %rdi
callq 0x420d0
leaq -0xb0(%rbp), %rbx
leaq -0x110(%rbp), %r15
movq -0xb0(%rbp), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r15, %rdi
leaq -0x98(%rbp), %rsi
callq 0x41f20
movq -0x100(%rbp), %r12
movq -0xf8(%rbp), %r13
movq -0x110(%rbp), %r14
movq -0x108(%rbp), %r15
leaq -0x100(%rbp), %rdi
callq 0x420d0
cmpq %r13, %r12
jne 0x43e77
cmpq %r15, %r14
je 0x44031
leaq -0x2168(%rbp), %rax
xorl %r13d, %r13d
cmpq %r13, -0x48(%rbp)
je 0x43f4f
movq %rax, -0x30(%rbp)
movq -0x8(%rax), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
testq %rax, %rax
je 0x43eba
movq -0x30(%rbp), %rax
movq (%rax), %r12
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
cmpq %rax, %r12
jae 0x43f3f
movq -0xb0(%rbp), %rax
movq %rbx, %r15
movq %rbx, %rdi
callq *0x10(%rax)
leaq -0x138(%rbp), %rbx
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
callq 0x41f20
movq (%r14), %rax
leaq -0x110(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rcx
callq *0x18(%rax)
movq %r15, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x4422a
movq %r12, %rdi
callq 0x3efe6
leaq -0x128(%rbp), %rdi
callq 0x420d0
cmpl $0x0, -0xa8(%rbp)
jne 0x43ffd
movq -0xb0(%rbp), %rax
movq %rbx, %rdi
callq *0x10(%rax)
cmpl $0x1, -0xa0(%rbp)
jne 0x43f54
incq %r13
movq -0x30(%rbp), %rax
addq $0x10, %rax
jmp 0x43e81
xorl %r14d, %r14d
jmp 0x43f63
cmpq -0x48(%rbp), %r13
setb %r14b
movq -0x30(%rbp), %rax
incq (%rax)
movq -0xb0(%rbp), %rax
movq %rbx, %rdi
callq *0x10(%rax)
cmpl $0x2, -0xa0(%rbp)
leaq -0x110(%rbp), %r15
je 0x44046
testb %r14b, %r14b
jne 0x43e25
leaq -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x110(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x41f20
leaq -0x110(%rbp), %rdi
callq 0x42d7e
leaq 0x8(%rax), %rdx
leaq 0x315eb(%rip), %rsi     # 0x755af
leaq -0x138(%rbp), %rdi
callq 0x3e5a5
movq -0x38(%rbp), %rbx
leaq -0x138(%rbp), %rsi
movq %rbx, %rdi
callq 0x42f3a
leaq -0x138(%rbp), %rdi
callq 0x24ad8
leaq -0x100(%rbp), %rdi
callq 0x420d0
jmp 0x44010
leaq -0xb0(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x44254
leaq -0xb0(%rbp), %rdi
callq 0x3efe6
movq %rbx, %rax
addq $0x2148, %rsp           # imm = 0x2148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xb0(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x44254
jmp 0x44010
leaq -0xb0(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x44254
jmp 0x44010
leaq 0x314ca(%rip), %rdi     # 0x7552c
leaq 0x2fe44(%rip), %rsi     # 0x73ead
leaq 0x314cf(%rip), %rcx     # 0x7553f
movl $0x2585, %edx           # imm = 0x2585
callq 0x24390
movq %rax, %rbx
leaq -0x138(%rbp), %rdi
callq 0x24ad8
jmp 0x4408e
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
jmp 0x440cf
jmp 0x440d8
jmp 0x440d8
jmp 0x440d8
jmp 0x440d8
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x420d0
jmp 0x440e7
jmp 0x440d8
jmp 0x440d8
movq %rax, %rbx
jmp 0x440c8
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x3efe6
leaq -0x128(%rbp), %rdi
callq 0x420d0
jmp 0x440db
jmp 0x440d8
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x3efe6
movq %rbx, %rdi
callq 0x24950
nop