_ZN4args14ArgumentParserC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
 3217|    892|            {
 3218|    892|                Description(description_);
 3219|    892|                Epilog(epilog_);
 3220|    892|                LongPrefix("--");
 3221|    892|                ShortPrefix("-");
 3222|    892|                LongSeparator("=");
 3223|    892|                Terminator("--");
 3224|    892|                SetArgumentSeparations(true, true, true, true);
 3225|    892|                matched = true;
 3226|    892|            }
_ZN4args7CommandC2Ev:
 2058|    892|            Command() = default;
_ZN4args5GroupC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_8functionIFbRKS0_EEENS_7OptionsE:
 1681|    892|            Group(const std::string &help_ = std::string(), const std::function<bool(const Group &)> &validator_ = Validators::DontCare, Options options_ = {}) : Base(help_, options_), validator(validator_) {}
_ZN4args4BaseC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7OptionsE:
 1030|  3.56k|            Base(const std::string &help_, Options options_ = {}) : options(options_), help(help_) {}
_ZNK4args4Base7MatchedEv:
 1044|  58.8k|            {
 1045|  58.8k|                return matched;
 1046|  58.8k|            }
_ZN4args4Base11GetCommandsEv:
 1066|  2.67k|            {
 1067|  2.67k|                return {};
 1068|  2.67k|            }
_ZNK4args4Base7IsGroupEv:
 1071|     60|            {
 1072|     60|                return false;
 1073|     60|            }
_ZN4args4Base17GetNextPositionalEv:
 1081|    612|            {
 1082|    612|                return nullptr;
 1083|    612|            }
_ZNK4args4Base10HasCommandEv:
 1101|     60|            {
 1102|     60|                return false;
 1103|     60|            }
_ZN4args4Base5ResetEv:
 1130|  3.56k|            {
 1131|  3.56k|                matched = false;
 1132|       |#ifdef ARGS_NOEXCEPT
 1133|       |                error = Error::None;
 1134|       |                errorMsg.clear();
 1135|       |#endif
 1136|  3.56k|            }
_ZN4args4BaseD2Ev:
 1031|  3.56k|            virtual ~Base() {}
_ZN4args5GroupD2Ev:
 1687|    892|            virtual ~Group() {}
_ZNK4args5Group8ChildrenEv:
 1699|  59.7k|            {
 1700|  59.7k|                return children;
 1701|  59.7k|            }
_ZN4argsanENS_7OptionsES0_:
  815|   114k|    {
  816|   114k|        return static_cast<Options>(static_cast<int>(lhs) & static_cast<int>(rhs));
  817|   114k|    }
_ZNK4args4Base10GetOptionsEv:
 1034|  57.0k|            {
 1035|  57.0k|                return options;
 1036|  57.0k|            }
_ZN4args5Group11GetCommandsEv:
 1857|    892|            {
 1858|    892|                std::vector<Command*> res;
 1859|    892|                for (const auto &child : Children())
  ------------------
  |  Branch (1859:40): [True: 2.67k, False: 892]
  ------------------
 1860|  2.67k|                {
 1861|  2.67k|                    auto subparsers = child->GetCommands();
 1862|  2.67k|                    res.insert(std::end(res), std::begin(subparsers), std::end(subparsers));
 1863|  2.67k|                }
 1864|    892|                return res;
 1865|    892|            }
_ZN4args5Group5MatchERKNS_10EitherFlagE:
 1709|  57.6k|            {
 1710|  57.6k|                for (Base *child: Children())
  ------------------
  |  Branch (1710:33): [True: 169k, False: 632]
  ------------------
 1711|   169k|                {
 1712|   169k|                    if (FlagBase *match = child->Match(flag))
  ------------------
  |  Branch (1712:35): [True: 57.0k, False: 112k]
  ------------------
 1713|  57.0k|                    {
 1714|  57.0k|                        return match;
 1715|  57.0k|                    }
 1716|   169k|                }
 1717|    632|                return nullptr;
 1718|  57.6k|            }
_ZN4args5Group17GetNextPositionalEv:
 1744|    204|            {
 1745|    204|                for (Base *child: Children())
  ------------------
  |  Branch (1745:33): [True: 612, False: 204]
  ------------------
 1746|    612|                {
 1747|    612|                    if (auto next = child->GetNextPositional())
  ------------------
  |  Branch (1747:30): [True: 0, False: 612]
  ------------------
 1748|      0|                    {
 1749|      0|                        return next;
 1750|      0|                    }
 1751|    612|                }
 1752|    204|                return nullptr;
 1753|    204|            }
_ZNK4args5Group10HasCommandEv:
 1778|     20|            {
 1779|     20|                return std::any_of(Children().begin(), Children().end(), [](Base *child) { return child->HasCommand(); });
 1780|     20|            }
_ZZNK4args5Group10HasCommandEvENKUlPNS_4BaseEE_clES2_:
 1779|     60|                return std::any_of(Children().begin(), Children().end(), [](Base *child) { return child->HasCommand(); });
_ZN4args5Group5ResetEv:
 1873|    892|            {
 1874|    892|                Base::Reset();
 1875|       |
 1876|    892|                for (auto &child: Children())
  ------------------
  |  Branch (1876:33): [True: 2.67k, False: 892]
  ------------------
 1877|  2.67k|                {
 1878|  2.67k|                    child->Reset();
 1879|  2.67k|                }
 1880|       |#ifdef ARGS_NOEXCEPT
 1881|       |                error = Error::None;
 1882|       |                errorMsg.clear();
 1883|       |#endif
 1884|    892|            }
_ZN4args7Command5ResetEv:
 2510|    892|            {
 2511|    892|                Group::Reset();
 2512|    892|                selectedCommand = nullptr;
 2513|    892|                subparserProgramLine.clear();
 2514|    892|                subparserDescription.clear();
 2515|    892|                subparserHasFlag = false;
 2516|    892|                subparserHasPositional = false;
 2517|    892|                subparserHasCommand = false;
 2518|       |#ifdef ARGS_NOEXCEPT
 2519|       |                subparserError = Error::None;
 2520|       |#endif
 2521|    892|            }
_ZN4args7Command11DescriptionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2131|    892|            { this->description = description_; }
_ZN4args7Command6EpilogERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2141|    892|            { this->epilog = epilog_; }
_ZN4args14ArgumentParser10LongPrefixERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 3250|    892|            {
 3251|    892|                this->longprefix = longprefix_;
 3252|    892|                this->helpParams.longPrefix = longprefix_;
 3253|    892|            }
_ZN4args14ArgumentParser11ShortPrefixERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 3262|    892|            {
 3263|    892|                this->shortprefix = shortprefix_;
 3264|    892|                this->helpParams.shortPrefix = shortprefix_;
 3265|    892|            }
_ZN4args14ArgumentParser13LongSeparatorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 3274|    892|            {
 3275|    892|                if (longseparator_.empty())
  ------------------
  |  Branch (3275:21): [True: 0, False: 892]
  ------------------
 3276|      0|                {
 3277|      0|                    const std::string errorMessage("longseparator can not be set to empty");
 3278|       |#ifdef ARGS_NOEXCEPT
 3279|       |                    error = Error::Usage;
 3280|       |                    errorMsg = errorMessage;
 3281|       |#else
 3282|      0|                    throw UsageError(errorMessage);
 3283|      0|#endif
 3284|      0|                } else
 3285|    892|                {
 3286|    892|                    this->longseparator = longseparator_;
 3287|    892|                    this->helpParams.longSeparator = allowJoinedLongValue ? longseparator : " ";
  ------------------
  |  Branch (3287:54): [True: 892, False: 0]
  ------------------
 3288|    892|                }
 3289|    892|            }
_ZN4args5ErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  486|    872|            Error(const std::string &problem) : std::runtime_error(problem) {}
_ZN4args14ArgumentParser10TerminatorERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 3298|    892|            { this->terminator = terminator_; }
_ZN4args14ArgumentParser22SetArgumentSeparationsEbbbb:
 3328|    892|            {
 3329|    892|                this->allowJoinedShortValue = allowJoinedShortValue_;
 3330|    892|                this->allowJoinedLongValue = allowJoinedLongValue_;
 3331|    892|                this->allowSeparateShortValue = allowSeparateShortValue_;
 3332|    892|                this->allowSeparateLongValue = allowSeparateLongValue_;
 3333|       |
 3334|    892|                this->helpParams.longSeparator = allowJoinedLongValue ? longseparator : " ";
  ------------------
  |  Branch (3334:50): [True: 892, False: 0]
  ------------------
 3335|    892|                this->helpParams.shortSeparator = allowJoinedShortValue ? "" : " ";
  ------------------
  |  Branch (3335:51): [True: 892, False: 0]
  ------------------
 3336|    892|            }
_ZNK4args7Command7MatchedEv:
 2164|  58.7k|            { return Base::Matched(); }
_ZNK4args7Command8ValidateERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
 2459|     20|            {
 2460|     20|                if (!Matched())
  ------------------
  |  Branch (2460:21): [True: 0, False: 20]
  ------------------
 2461|      0|                {
 2462|      0|                    return;
 2463|      0|                }
 2464|       |
 2465|     20|                auto onValidationError = [&]
 2466|     20|                {
 2467|     20|                    std::ostringstream problem;
 2468|     20|                    problem << "Group validation failed somewhere!";
 2469|       |#ifdef ARGS_NOEXCEPT
 2470|       |                    error = Error::Validation;
 2471|       |                    errorMsg = problem.str();
 2472|       |#else
 2473|     20|                    throw ValidationError(problem.str());
 2474|     20|#endif
 2475|     20|                };
 2476|       |
 2477|     20|                for (Base *child: Children())
  ------------------
  |  Branch (2477:33): [True: 60, False: 20]
  ------------------
 2478|     60|                {
 2479|     60|                    if (child->IsGroup() && !child->Matched())
  ------------------
  |  Branch (2479:25): [True: 0, False: 60]
  |  Branch (2479:45): [True: 0, False: 0]
  ------------------
 2480|      0|                    {
 2481|      0|                        onValidationError();
 2482|      0|                    }
 2483|       |
 2484|     60|                    child->Validate(shortprefix, longprefix);
 2485|     60|                }
 2486|       |
 2487|     20|                if (subparser != nullptr)
  ------------------
  |  Branch (2487:21): [True: 0, False: 20]
  ------------------
 2488|      0|                {
 2489|      0|                    subparser->Validate(shortprefix, longprefix);
 2490|      0|                    if (!subparser->Matched())
  ------------------
  |  Branch (2490:25): [True: 0, False: 0]
  ------------------
 2491|      0|                    {
 2492|      0|                        onValidationError();
 2493|      0|                    }
 2494|      0|                }
 2495|       |
 2496|     20|                if (selectedCommand == nullptr && commandIsRequired && (Group::HasCommand() || subparserHasCommand))
  ------------------
  |  Branch (2496:21): [True: 20, False: 0]
  |  Branch (2496:51): [True: 20, False: 0]
  |  Branch (2496:73): [True: 0, False: 20]
  |  Branch (2496:96): [True: 0, False: 20]
  ------------------
 2497|      0|                {
 2498|      0|                    std::ostringstream problem;
 2499|      0|                    problem << "Command is required";
 2500|       |#ifdef ARGS_NOEXCEPT
 2501|       |                    error = Error::Validation;
 2502|       |                    errorMsg = problem.str();
 2503|       |#else
 2504|      0|                    throw ValidationError(problem.str());
 2505|      0|#endif
 2506|      0|                }
 2507|     20|            }
_ZN4args7Command11GetCommandsEv:
 2362|    892|            {
 2363|    892|                if (selectedCommand != nullptr)
  ------------------
  |  Branch (2363:21): [True: 0, False: 892]
  ------------------
 2364|      0|                {
 2365|      0|                    return selectedCommand->GetCommands();
 2366|      0|                }
 2367|       |
 2368|    892|                if (Matched())
  ------------------
  |  Branch (2368:21): [True: 892, False: 0]
  ------------------
 2369|    892|                {
 2370|    892|                    return Group::GetCommands();
 2371|    892|                }
 2372|       |
 2373|      0|                return { this };
 2374|    892|            }
_ZN4args7Command5MatchERKNS_10EitherFlagE:
 2183|  57.6k|            {
 2184|  57.6k|                if (selectedCommand != nullptr)
  ------------------
  |  Branch (2184:21): [True: 0, False: 57.6k]
  ------------------
 2185|      0|                {
 2186|      0|                    if (auto *res = selectedCommand->Match(flag))
  ------------------
  |  Branch (2186:31): [True: 0, False: 0]
  ------------------
 2187|      0|                    {
 2188|      0|                        return res;
 2189|      0|                    }
 2190|       |
 2191|      0|                    for (auto *child: Children())
  ------------------
  |  Branch (2191:37): [True: 0, False: 0]
  ------------------
 2192|      0|                    {
 2193|      0|                        if ((child->GetOptions() & Options::Global) != Options::None)
  ------------------
  |  Branch (2193:29): [True: 0, False: 0]
  ------------------
 2194|      0|                        {
 2195|      0|                            if (auto *res = child->Match(flag))
  ------------------
  |  Branch (2195:39): [True: 0, False: 0]
  ------------------
 2196|      0|                            {
 2197|      0|                                return res;
 2198|      0|                            }
 2199|      0|                        }
 2200|      0|                    }
 2201|       |
 2202|      0|                    return nullptr;
 2203|      0|                }
 2204|       |
 2205|  57.6k|                if (subparser != nullptr)
  ------------------
  |  Branch (2205:21): [True: 0, False: 57.6k]
  ------------------
 2206|      0|                {
 2207|      0|                    return subparser->Match(flag);
 2208|      0|                }
 2209|       |
 2210|  57.6k|                return Matched() ? Group::Match(flag) : nullptr;
  ------------------
  |  Branch (2210:24): [True: 57.6k, False: 0]
  ------------------
 2211|  57.6k|            }
_ZN4args7Command17GetNextPositionalEv:
 2247|    204|            {
 2248|    204|                if (selectedCommand != nullptr)
  ------------------
  |  Branch (2248:21): [True: 0, False: 204]
  ------------------
 2249|      0|                {
 2250|      0|                    if (auto *res = selectedCommand->GetNextPositional())
  ------------------
  |  Branch (2250:31): [True: 0, False: 0]
  ------------------
 2251|      0|                    {
 2252|      0|                        return res;
 2253|      0|                    }
 2254|       |
 2255|      0|                    for (auto *child: Children())
  ------------------
  |  Branch (2255:37): [True: 0, False: 0]
  ------------------
 2256|      0|                    {
 2257|      0|                        if ((child->GetOptions() & Options::Global) != Options::None)
  ------------------
  |  Branch (2257:29): [True: 0, False: 0]
  ------------------
 2258|      0|                        {
 2259|      0|                            if (auto *res = child->GetNextPositional())
  ------------------
  |  Branch (2259:39): [True: 0, False: 0]
  ------------------
 2260|      0|                            {
 2261|      0|                                return res;
 2262|      0|                            }
 2263|      0|                        }
 2264|      0|                    }
 2265|       |
 2266|      0|                    return nullptr;
 2267|      0|                }
 2268|       |
 2269|    204|                if (subparser != nullptr)
  ------------------
  |  Branch (2269:21): [True: 0, False: 204]
  ------------------
 2270|      0|                {
 2271|      0|                    return subparser->GetNextPositional();
 2272|      0|                }
 2273|       |
 2274|    204|                return Matched() ? Group::GetNextPositional() : nullptr;
  ------------------
  |  Branch (2274:24): [True: 204, False: 0]
  ------------------
 2275|    204|            }
_ZN4args14ArgumentParser5ResetEv:
 3466|    892|            {
 3467|    892|                Command::Reset();
 3468|    892|                matched = true;
 3469|    892|                readCompletion = false;
 3470|    892|            }
_ZN4args10EitherFlagC2Ec:
  581|  59.8k|        EitherFlag(const char flag) : isShort(true), shortFlag(flag), longFlag() {}
_ZN4args10EitherFlagC2EPKc:
  580|  2.67k|        EitherFlag(const char *flag) : isShort(false), shortFlag(), longFlag(flag) {}
_ZN4args7MatcherC2ESt16initializer_listINS_10EitherFlagEE:
  686|  2.67k|                Matcher(EitherFlag::GetShort(in), EitherFlag::GetLong(in)) {}
_ZN4args10EitherFlag8GetShortESt16initializer_listIS0_E:
  601|  2.67k|        {
  602|  2.67k|            std::unordered_set<char>  shortFlags;
  603|  2.67k|            for (const EitherFlag &flag: flags)
  ------------------
  |  Branch (603:40): [True: 5.35k, False: 2.67k]
  ------------------
  604|  5.35k|            {
  605|  5.35k|                if (flag.isShort)
  ------------------
  |  Branch (605:21): [True: 2.67k, False: 2.67k]
  ------------------
  606|  2.67k|                {
  607|  2.67k|                    shortFlags.insert(flag.shortFlag);
  608|  2.67k|                }
  609|  5.35k|            }
  610|  2.67k|            return shortFlags;
  611|  2.67k|        }
_ZN4args10EitherFlag7GetLongESt16initializer_listIS0_E:
  586|  2.67k|        {
  587|  2.67k|            std::unordered_set<std::string>  longFlags;
  588|  2.67k|            for (const EitherFlag &flag: flags)
  ------------------
  |  Branch (588:40): [True: 5.35k, False: 2.67k]
  ------------------
  589|  5.35k|            {
  590|  5.35k|                if (!flag.isShort)
  ------------------
  |  Branch (590:21): [True: 2.67k, False: 2.67k]
  ------------------
  591|  2.67k|                {
  592|  2.67k|                    longFlags.insert(flag.longFlag);
  593|  2.67k|                }
  594|  5.35k|            }
  595|  2.67k|            return longFlags;
  596|  2.67k|        }
_ZN4args7MatcherC2INSt3__113unordered_setIcNS2_4hashIcEENS2_8equal_toIcEENS2_9allocatorIcEEEENS3_INS2_12basic_stringIcNS2_11char_traitsIcEES9_EENS4_ISE_EENS6_ISE_EENS8_ISE_EEEEEEOT_OT0_:
  670|  2.67k|                Matcher(std::begin(shortIn), std::end(shortIn), std::begin(longIn), std::end(longIn))
  671|  2.67k|            {}
_ZN4args7MatcherC2INSt3__121__hash_const_iteratorIPNS2_11__hash_nodeIcPvEEEENS3_IPNS4_INS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES5_EEEEEET_SI_T0_SJ_:
  645|  2.67k|                shortFlags(shortFlagsStart, shortFlagsEnd),
  646|  2.67k|                longFlags(longFlagsStart, longFlagsEnd)
  647|  2.67k|            {
  648|  2.67k|                if (shortFlags.empty() && longFlags.empty())
  ------------------
  |  Branch (648:21): [True: 0, False: 2.67k]
  |  Branch (648:43): [True: 0, False: 0]
  ------------------
  649|      0|                {
  650|      0|#ifndef ARGS_NOEXCEPT
  651|      0|                    throw UsageError("empty Matcher");
  652|      0|#endif
  653|      0|                }
  654|  2.67k|            }
_ZN4args8HelpFlagC2ERNS_5GroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ONS_7MatcherENS_7OptionsE:
 3618|    892|            HelpFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_ = {}): Flag(group_, name_, help_, std::move(matcher_), options_) {}
_ZN4args4FlagC2ERNS_5GroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ONS_7MatcherENS_7OptionsE:
 3583|  2.67k|            Flag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_): FlagBase(name_, help_, std::move(matcher_), options_)
 3584|  2.67k|            {
 3585|  2.67k|                group_.Add(*this);
 3586|  2.67k|            }
_ZN4args8FlagBaseC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_ONS_7MatcherENS_7OptionsE:
 1337|  2.67k|            FlagBase(const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_) : NamedBase(name_, help_, options_), matcher(std::move(matcher_)) {}
_ZN4args9NamedBaseC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_NS_7OptionsE:
 1186|  2.67k|            NamedBase(const std::string &name_, const std::string &help_, Options options_ = {}) : Base(help_, options_), name(name_) {}
_ZN4args9NamedBaseD2Ev:
 1187|  2.67k|            virtual ~NamedBase() {}
_ZN4args7MatcherC2EOS0_:
  688|  2.67k|            Matcher(Matcher &&other) noexcept : shortFlags(std::move(other.shortFlags)), longFlags(std::move(other.longFlags))
  689|  2.67k|            {}
_ZN4args5Group3AddERNS_4BaseE:
 1692|  2.67k|            {
 1693|  2.67k|                children.emplace_back(&child);
 1694|  2.67k|            }
_ZN4args8FlagBaseD2Ev:
 1339|  2.67k|            virtual ~FlagBase() {}
_ZN4args4Flag10ParseValueERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
 3607|  56.9k|            {
 3608|  56.9k|            }
_ZNK4args8FlagBase8ValidateERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
 1373|     60|            {
 1374|     60|                if (!Matched() && IsRequired())
  ------------------
  |  Branch (1374:21): [True: 27, False: 33]
  |  Branch (1374:35): [True: 0, False: 27]
  ------------------
 1375|      0|                {
 1376|      0|                        std::ostringstream problem;
 1377|      0|                        problem << "Flag '" << matcher.GetLongOrAny().str(shortPrefix, longPrefix) << "' is required";
 1378|       |#ifdef ARGS_NOEXCEPT
 1379|       |                        error = Error::Required;
 1380|       |                        errorMsg = problem.str();
 1381|       |#else
 1382|      0|                        throw RequiredError(problem.str());
 1383|      0|#endif
 1384|      0|                }
 1385|     60|            }
_ZNK4args4Base10IsRequiredEv:
 1039|     27|            {
 1040|     27|                return (GetOptions() & Options::Required) != Options::None;
 1041|     27|            }
_ZN4args10EitherFlagC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  579|    504|        EitherFlag(const std::string &flag) : isShort(false), shortFlag(), longFlag(flag) {}
_ZN4args8FlagBase5MatchERKNS_10EitherFlagE:
 1342|   169k|            {
 1343|   169k|                if (matcher.Match(flag))
  ------------------
  |  Branch (1343:21): [True: 57.0k, False: 112k]
  ------------------
 1344|  57.0k|                {
 1345|  57.0k|                    if ((GetOptions() & Options::Single) != Options::None && matched)
  ------------------
  |  Branch (1345:25): [True: 0, False: 57.0k]
  |  Branch (1345:78): [True: 0, False: 0]
  ------------------
 1346|      0|                    {
 1347|      0|                        std::ostringstream problem;
 1348|      0|                        problem << "Flag '" << flag.str() << "' was passed multiple times, but is only allowed to be passed once";
 1349|       |#ifdef ARGS_NOEXCEPT
 1350|       |                        error = Error::Extra;
 1351|       |                        errorMsg = problem.str();
 1352|       |#else
 1353|      0|                        throw ExtraError(problem.str());
 1354|      0|#endif
 1355|      0|                    }
 1356|  57.0k|                    matched = true;
 1357|  57.0k|                    return this;
 1358|  57.0k|                }
 1359|   112k|                return nullptr;
 1360|   169k|            }
_ZNK4args7Matcher5MatchERKNS_10EitherFlagE:
  710|   169k|            {
  711|   169k|                return flag.isShort ? Match(flag.shortFlag) : Match(flag.longFlag);
  ------------------
  |  Branch (711:24): [True: 167k, False: 1.42k]
  ------------------
  712|   169k|            }
_ZNK4args7Matcher5MatchEc:
  696|   167k|            {
  697|   167k|                return shortFlags.find(flag) != shortFlags.end();
  698|   167k|            }
_ZNK4args7Matcher5MatchERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  703|  1.42k|            {
  704|  1.42k|                return longFlags.find(flag) != longFlags.end();
  705|  1.42k|            }
_ZN4args10ParseErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  504|    853|            ParseError(const std::string &problem) : Error(problem) {}
_ZN4args5NargsC2Em:
  998|  57.0k|        Nargs(size_t num_) : min{num_}, max{num_}
  999|  57.0k|        {
 1000|  57.0k|        }
_ZNK4args9NamedBase4NameEv:
 1235|     19|            {
 1236|     19|                return name;
 1237|     19|            }
_ZNK4args4Flag17NumberOfArgumentsEv:
 3602|  57.0k|            {
 3603|  57.0k|                return 0;
 3604|  57.0k|            }
_ZN4args8HelpFlag10ParseValueERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
 3623|     19|            {
 3624|       |#ifdef ARGS_NOEXCEPT
 3625|       |                    error = Error::Help;
 3626|       |                    errorMsg = Name();
 3627|       |#else
 3628|     19|                    throw Help(Name());
 3629|     19|#endif
 3630|     19|            }
_ZN4args4HelpC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  549|     19|            Help(const std::string &flag) : Error(flag) {}
_ZN4args7MatcherD2Ev:
  691|  5.35k|            ~Matcher() {}
_ZN4args4FlagC2ERNS_5GroupERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ONS_7MatcherEb:
 3588|  1.78k|            Flag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const bool extraError_ = false): Flag(group_, name_, help_, std::move(matcher_), extraError_ ? Options::Single : Options::None)
  ------------------
  |  Branch (3588:186): [True: 0, False: 1.78k]
  ------------------
 3589|  1.78k|            {
 3590|  1.78k|            }
_ZN4args14ArgumentParser9ParseArgsINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEET_SC_SC_:
 3480|    892|            {
 3481|       |                // Reset all Matched statuses and errors
 3482|    892|                Reset();
 3483|       |#ifdef ARGS_NOEXCEPT
 3484|       |                error = GetError();
 3485|       |                if (error != Error::None)
 3486|       |                {
 3487|       |                    return end;
 3488|       |                }
 3489|       |#endif
 3490|    892|                return Parse(begin, end);
 3491|    892|            }
_ZN4args14ArgumentParser5ParseINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEET_SC_SC_:
 3003|    892|            {
 3004|    892|                bool terminated = false;
 3005|    892|                std::vector<Command *> commands = GetCommands();
 3006|       |
 3007|       |                // Check all arg chunks
 3008|  1.84k|                for (auto it = begin; it != end; ++it)
  ------------------
  |  Branch (3008:39): [True: 1.16k, False: 688]
  ------------------
 3009|  1.16k|                {
 3010|  1.16k|                    if (Complete(it, end))
  ------------------
  |  Branch (3010:25): [True: 0, False: 1.16k]
  ------------------
 3011|      0|                    {
 3012|      0|                        return end;
 3013|      0|                    }
 3014|       |
 3015|  1.16k|                    const auto &chunk = *it;
 3016|       |
 3017|  1.16k|                    if (!terminated && chunk == terminator)
  ------------------
  |  Branch (3017:25): [True: 1.15k, False: 1]
  |  Branch (3017:40): [True: 2, False: 1.15k]
  ------------------
 3018|      2|                    {
 3019|      2|                        terminated = true;
 3020|  1.15k|                    } else if (!terminated && ParseOption(chunk) == OptionType::LongFlag)
  ------------------
  |  Branch (3020:32): [True: 1.15k, False: 1]
  |  Branch (3020:47): [True: 504, False: 653]
  ------------------
 3021|    504|                    {
 3022|    504|                        if (!ParseLong(it, end))
  ------------------
  |  Branch (3022:29): [True: 0, False: 504]
  ------------------
 3023|      0|                        {
 3024|      0|                            return it;
 3025|      0|                        }
 3026|    654|                    } else if (!terminated && ParseOption(chunk) == OptionType::ShortFlag)
  ------------------
  |  Branch (3026:32): [True: 653, False: 1]
  |  Branch (3026:47): [True: 450, False: 203]
  ------------------
 3027|    450|                    {
 3028|    450|                        if (!ParseShort(it, end))
  ------------------
  |  Branch (3028:29): [True: 0, False: 450]
  ------------------
 3029|      0|                        {
 3030|      0|                            return it;
 3031|      0|                        }
 3032|    450|                    } else if (!terminated && !commands.empty())
  ------------------
  |  Branch (3032:32): [True: 203, False: 1]
  |  Branch (3032:47): [True: 0, False: 203]
  ------------------
 3033|      0|                    {
 3034|      0|                        auto itCommand = std::find_if(commands.begin(), commands.end(), [&chunk](Command *c) { return c->Name() == chunk; });
 3035|      0|                        if (itCommand == commands.end())
  ------------------
  |  Branch (3035:29): [True: 0, False: 0]
  ------------------
 3036|      0|                        {
 3037|      0|                            const std::string errorMessage("Unknown command: " + chunk);
 3038|      0|#ifndef ARGS_NOEXCEPT
 3039|      0|                            throw ParseError(errorMessage);
 3040|       |#else
 3041|       |                            error = Error::Parse;
 3042|       |                            errorMsg = errorMessage;
 3043|       |                            return it;
 3044|       |#endif
 3045|      0|                        }
 3046|       |
 3047|      0|                        SelectCommand(*itCommand);
 3048|       |
 3049|      0|                        if (const auto &coroutine = GetCoroutine())
  ------------------
  |  Branch (3049:41): [True: 0, False: 0]
  ------------------
 3050|      0|                        {
 3051|      0|                            ++it;
 3052|      0|                            RaiiSubparser coro(*this, std::vector<std::string>(it, end));
 3053|      0|                            coroutine(coro.Parser());
 3054|       |#ifdef ARGS_NOEXCEPT
 3055|       |                            error = GetError();
 3056|       |                            if (error != Error::None)
 3057|       |                            {
 3058|       |                                return end;
 3059|       |                            }
 3060|       |
 3061|       |                            if (!coro.Parser().IsParsed())
 3062|       |                            {
 3063|       |                                error = Error::Usage;
 3064|       |                                return end;
 3065|       |                            }
 3066|       |#else
 3067|      0|                            if (!coro.Parser().IsParsed())
  ------------------
  |  Branch (3067:33): [True: 0, False: 0]
  ------------------
 3068|      0|                            {
 3069|      0|                                throw UsageError("Subparser::Parse was not called");
 3070|      0|                            }
 3071|      0|#endif
 3072|       |
 3073|      0|                            break;
 3074|      0|                        }
 3075|       |
 3076|      0|                        commands = GetCommands();
 3077|      0|                    } else
 3078|    204|                    {
 3079|    204|                        auto pos = GetNextPositional();
 3080|    204|                        if (pos)
  ------------------
  |  Branch (3080:29): [True: 0, False: 204]
  ------------------
 3081|      0|                        {
 3082|      0|                            pos->ParseValue(chunk);
 3083|       |#ifdef ARGS_NOEXCEPT
 3084|       |                            if (pos->GetError() != Error::None)
 3085|       |                            {
 3086|       |                                return it;
 3087|       |                            }
 3088|       |#endif
 3089|       |
 3090|      0|                            if (pos->KickOut())
  ------------------
  |  Branch (3090:33): [True: 0, False: 0]
  ------------------
 3091|      0|                            {
 3092|      0|                                return ++it;
 3093|      0|                            }
 3094|      0|                        } else
 3095|    204|                        {
 3096|    204|                            const std::string errorMessage("Passed in argument, but no positional arguments were ready to receive it: " + chunk);
 3097|    204|#ifndef ARGS_NOEXCEPT
 3098|    204|                            throw ParseError(errorMessage);
 3099|       |#else
 3100|       |                            error = Error::Parse;
 3101|       |                            errorMsg = errorMessage;
 3102|       |                            return it;
 3103|       |#endif
 3104|    204|                        }
 3105|    204|                    }
 3106|       |
 3107|    956|                    if (!readCompletion && completion != nullptr && completion->Matched())
  ------------------
  |  Branch (3107:25): [True: 288, False: 668]
  |  Branch (3107:44): [True: 0, False: 288]
  |  Branch (3107:69): [True: 0, False: 0]
  ------------------
 3108|      0|                    {
 3109|       |#ifdef ARGS_NOEXCEPT
 3110|       |                        if (completion->GetError() != Error::None)
 3111|       |                        {
 3112|       |                            error = completion->GetError();
 3113|       |                            if (errorMsg.empty())
 3114|       |                            {
 3115|       |                                errorMsg = completion->GetErrorMsg();
 3116|       |                            }
 3117|       |                            return it;
 3118|       |                        }
 3119|       |
 3120|       |                        error = Error::Completion;
 3121|       |#endif
 3122|      0|                        readCompletion = true;
 3123|      0|                        ++it;
 3124|      0|                        const auto argsLeft = static_cast<size_t>(std::distance(it, end));
 3125|      0|                        if (completion->cword == 0 || argsLeft <= 1 || completion->cword >= argsLeft)
  ------------------
  |  Branch (3125:29): [True: 0, False: 0]
  |  Branch (3125:55): [True: 0, False: 0]
  |  Branch (3125:72): [True: 0, False: 0]
  ------------------
 3126|      0|                        {
 3127|      0|#ifndef ARGS_NOEXCEPT
 3128|      0|                            throw Completion("");
 3129|       |#else
 3130|       |                            return end;
 3131|       |#endif
 3132|      0|                        }
 3133|       |
 3134|      0|                        ++it;
 3135|      0|                        std::vector<std::string> curArgs;
 3136|      0|                        curArgs.reserve(completion->cword);
 3137|      0|                        auto curIt = it;
 3138|      0|                        for (size_t idx = 0; idx < completion->cword && curIt != end; ++idx, ++curIt)
  ------------------
  |  Branch (3138:46): [True: 0, False: 0]
  |  Branch (3138:73): [True: 0, False: 0]
  ------------------
 3139|      0|                        {
 3140|      0|                            curArgs.push_back(*curIt);
 3141|      0|                        }
 3142|       |
 3143|      0|                        if (completion->syntax == "bash")
  ------------------
  |  Branch (3143:29): [True: 0, False: 0]
  ------------------
 3144|      0|                        {
 3145|       |                            // bash tokenizes --flag=value as --flag=value
 3146|       |                            // Security fix: Use size_t arithmetic throughout to avoid conversion issues
 3147|      0|                            for (size_t idx = 0; idx < curArgs.size(); )
  ------------------
  |  Branch (3147:50): [True: 0, False: 0]
  ------------------
 3148|      0|                            {
 3149|      0|                                if (idx > 0 && curArgs[idx] == "=")
  ------------------
  |  Branch (3149:37): [True: 0, False: 0]
  |  Branch (3149:48): [True: 0, False: 0]
  ------------------
 3150|      0|                                {
 3151|      0|                                    size_t prev_idx = idx - 1;  // Safe since we checked idx > 0
 3152|      0|                                    curArgs[prev_idx] += "=";
 3153|      0|                                    size_t next_idx = 0;
 3154|      0|                                    if (SafeAdd<size_t>(idx, static_cast<size_t>(1), next_idx) && next_idx < curArgs.size())
  ------------------
  |  Branch (3154:41): [True: 0, False: 0]
  |  Branch (3154:99): [True: 0, False: 0]
  ------------------
 3155|      0|                                    {
 3156|      0|                                        curArgs[prev_idx] += curArgs[next_idx];
 3157|       |                                        // Erase the '=' token and the following value token.
 3158|      0|                                        size_t erase_end = 0;
 3159|      0|                                        if (SafeAdd<size_t>(next_idx, static_cast<size_t>(1), erase_end))
  ------------------
  |  Branch (3159:45): [True: 0, False: 0]
  ------------------
 3160|      0|                                        {
 3161|      0|                                            typedef std::vector<std::string>::difference_type diff_t;
 3162|      0|                                            curArgs.erase(curArgs.begin() + static_cast<diff_t>(idx),
 3163|      0|                                                         curArgs.begin() + static_cast<diff_t>(erase_end));
 3164|      0|                                        }
 3165|      0|                                    } else
 3166|      0|                                    {
 3167|       |                                        // Safe erase of single '=' token at the end
 3168|      0|                                        typedef std::vector<std::string>::difference_type diff_t;
 3169|      0|                                        curArgs.erase(curArgs.begin() + static_cast<diff_t>(idx));
 3170|      0|                                    }
 3171|       |                                    // Do not increment idx - next element slides into current position
 3172|      0|                                } else
 3173|      0|                                {
 3174|      0|                                    ++idx;
 3175|      0|                                }
 3176|      0|                            }
 3177|       |
 3178|      0|                        }
 3179|      0|#ifndef ARGS_NOEXCEPT
 3180|      0|                        try
 3181|      0|                        {
 3182|      0|                            Parse(curArgs.begin(), curArgs.end());
 3183|      0|                            throw Completion("");
 3184|      0|                        }
 3185|      0|                        catch (Completion &)
 3186|      0|                        {
 3187|      0|                            throw;
 3188|      0|                        }
 3189|      0|                        catch (args::Error&)
 3190|      0|                        {
 3191|      0|                            throw Completion("");
 3192|      0|                        }
 3193|       |#else
 3194|       |                        // Discard the nested Parse's return value: it points
 3195|       |                        // into the local curArgs vector, which is destroyed
 3196|       |                        // when this function returns, leaving the caller with
 3197|       |                        // a dangling iterator that would be compared against
 3198|       |                        // the outer `end` in ParseCLI. Return the outer
 3199|       |                        // `end` instead so the iterator stays in the caller's
 3200|       |                        // container.
 3201|       |                        Parse(curArgs.begin(), curArgs.end());
 3202|       |                        error = Error::Completion;
 3203|       |                        errorMsg.clear();
 3204|       |                        return end;
 3205|       |#endif
 3206|      0|                    }
 3207|    956|                }
 3208|       |
 3209|    688|                Validate(shortprefix, longprefix);
 3210|    688|                return end;
 3211|    892|            }
_ZN4args14ArgumentParser8CompleteINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEEbT_SC_:
 2879|  1.16k|            {
 2880|  1.16k|                auto nextIt = it;
 2881|  1.16k|                if (!readCompletion || (++nextIt != end))
  ------------------
  |  Branch (2881:21): [True: 1.16k, False: 0]
  |  Branch (2881:40): [True: 0, False: 0]
  ------------------
 2882|  1.16k|                {
 2883|  1.16k|                    return false;
 2884|  1.16k|                }
 2885|       |
 2886|      0|                const auto &chunk = *it;
 2887|      0|                auto pos = GetNextPositional();
 2888|      0|                std::vector<Command *> commands = GetCommands();
 2889|      0|                const auto optionType = ParseOption(chunk, true);
 2890|       |
 2891|      0|                if (!commands.empty() && (chunk.empty() || optionType == OptionType::Positional))
  ------------------
  |  Branch (2891:21): [True: 0, False: 0]
  |  Branch (2891:43): [True: 0, False: 0]
  |  Branch (2891:60): [True: 0, False: 0]
  ------------------
 2892|      0|                {
 2893|      0|                    for (auto &cmd : commands)
  ------------------
  |  Branch (2893:36): [True: 0, False: 0]
  ------------------
 2894|      0|                    {
 2895|      0|                        if ((cmd->GetOptions() & Options::HiddenFromCompletion) == Options::None)
  ------------------
  |  Branch (2895:29): [True: 0, False: 0]
  ------------------
 2896|      0|                        {
 2897|      0|                            AddCompletionReply(chunk, cmd->Name());
 2898|      0|                        }
 2899|      0|                    }
 2900|      0|                } else
 2901|      0|                {
 2902|      0|                    bool hasPositionalCompletion = true;
 2903|       |
 2904|      0|                    if (!commands.empty())
  ------------------
  |  Branch (2904:25): [True: 0, False: 0]
  ------------------
 2905|      0|                    {
 2906|      0|                        for (auto &cmd : commands)
  ------------------
  |  Branch (2906:40): [True: 0, False: 0]
  ------------------
 2907|      0|                        {
 2908|      0|                            if ((cmd->GetOptions() & Options::HiddenFromCompletion) == Options::None)
  ------------------
  |  Branch (2908:33): [True: 0, False: 0]
  ------------------
 2909|      0|                            {
 2910|      0|                                AddCompletionReply(chunk, cmd->Name());
 2911|      0|                            }
 2912|      0|                        }
 2913|      0|                    } else if (pos)
  ------------------
  |  Branch (2913:32): [True: 0, False: 0]
  ------------------
 2914|      0|                    {
 2915|      0|                        if ((pos->GetOptions() & Options::HiddenFromCompletion) == Options::None)
  ------------------
  |  Branch (2915:29): [True: 0, False: 0]
  ------------------
 2916|      0|                        {
 2917|      0|                            auto choices = pos->HelpChoices(helpParams);
 2918|      0|                            hasPositionalCompletion = !choices.empty() || optionType != OptionType::Positional;
  ------------------
  |  Branch (2918:55): [True: 0, False: 0]
  |  Branch (2918:75): [True: 0, False: 0]
  ------------------
 2919|      0|                            for (auto &choice : choices)
  ------------------
  |  Branch (2919:47): [True: 0, False: 0]
  ------------------
 2920|      0|                            {
 2921|      0|                                AddCompletionReply(chunk, choice);
 2922|      0|                            }
 2923|      0|                        }
 2924|      0|                    }
 2925|       |
 2926|      0|                    if (hasPositionalCompletion)
  ------------------
  |  Branch (2926:25): [True: 0, False: 0]
  ------------------
 2927|      0|                    {
 2928|      0|                        auto flags = GetAllFlags();
 2929|      0|                        for (auto flag : flags)
  ------------------
  |  Branch (2929:40): [True: 0, False: 0]
  ------------------
 2930|      0|                        {
 2931|      0|                            if ((flag->GetOptions() & Options::HiddenFromCompletion) != Options::None)
  ------------------
  |  Branch (2931:33): [True: 0, False: 0]
  ------------------
 2932|      0|                            {
 2933|      0|                                continue;
 2934|      0|                            }
 2935|       |
 2936|      0|                            auto &matcher = flag->GetMatcher();
 2937|      0|                            if (!AddCompletionReply(chunk, matcher.GetShortOrAny().str(shortprefix, longprefix)))
  ------------------
  |  Branch (2937:33): [True: 0, False: 0]
  ------------------
 2938|      0|                            {
 2939|      0|                                for (auto &flagName : matcher.GetFlagStrings())
  ------------------
  |  Branch (2939:53): [True: 0, False: 0]
  ------------------
 2940|      0|                                {
 2941|      0|                                    if (AddCompletionReply(chunk, flagName.str(shortprefix, longprefix)))
  ------------------
  |  Branch (2941:41): [True: 0, False: 0]
  ------------------
 2942|      0|                                    {
 2943|      0|                                        break;
 2944|      0|                                    }
 2945|      0|                                }
 2946|      0|                            }
 2947|      0|                        }
 2948|       |
 2949|      0|                        if (optionType == OptionType::LongFlag && allowJoinedLongValue)
  ------------------
  |  Branch (2949:29): [True: 0, False: 0]
  |  Branch (2949:67): [True: 0, False: 0]
  ------------------
 2950|      0|                        {
 2951|      0|                            const auto separator = longseparator.empty() ? chunk.npos : chunk.find(longseparator);
  ------------------
  |  Branch (2951:52): [True: 0, False: 0]
  ------------------
 2952|       |                            // Only attempt joined-value completion when the
 2953|       |                            // separator lies at or past the long prefix, so
 2954|       |                            // there is a (possibly empty) flag name between
 2955|       |                            // them. With a custom longseparator that overlaps
 2956|       |                            // the prefix (e.g. LongSeparator("-") under the
 2957|       |                            // default "--" prefix), an attacker-controlled
 2958|       |                            // completion word like "--x" puts the separator
 2959|       |                            // inside the prefix, making `arg` shorter than
 2960|       |                            // longprefix. arg.substr(longprefix.size()) would
 2961|       |                            // then throw std::out_of_range, which escapes the
 2962|       |                            // parser as a non-args exception (bypassing the
 2963|       |                            // documented catch(args::Error) idiom) and is
 2964|       |                            // thrown even under ARGS_NOEXCEPT.
 2965|      0|                            if (separator != chunk.npos && separator >= longprefix.size())
  ------------------
  |  Branch (2965:33): [True: 0, False: 0]
  |  Branch (2965:60): [True: 0, False: 0]
  ------------------
 2966|      0|                            {
 2967|      0|                                std::string arg(chunk, 0, separator);
 2968|      0|                                if (auto flag = this->Match(arg.substr(longprefix.size())))
  ------------------
  |  Branch (2968:42): [True: 0, False: 0]
  ------------------
 2969|      0|                                {
 2970|      0|                                    for (auto &choice : flag->HelpChoices(helpParams))
  ------------------
  |  Branch (2970:55): [True: 0, False: 0]
  ------------------
 2971|      0|                                    {
 2972|      0|                                        AddCompletionReply(chunk, arg + longseparator + choice);
 2973|      0|                                    }
 2974|      0|                                }
 2975|      0|                            }
 2976|      0|                        } else if (optionType == OptionType::ShortFlag && allowJoinedShortValue)
  ------------------
  |  Branch (2976:36): [True: 0, False: 0]
  |  Branch (2976:75): [True: 0, False: 0]
  ------------------
 2977|      0|                        {
 2978|      0|                            if (chunk.size() > shortprefix.size() + 1)
  ------------------
  |  Branch (2978:33): [True: 0, False: 0]
  ------------------
 2979|      0|                            {
 2980|      0|                                auto arg = chunk.at(shortprefix.size());
 2981|       |                                //TODO: support -abcVALUE where a and b take no value
 2982|      0|                                if (auto flag = this->Match(arg))
  ------------------
  |  Branch (2982:42): [True: 0, False: 0]
  ------------------
 2983|      0|                                {
 2984|      0|                                    for (auto &choice : flag->HelpChoices(helpParams))
  ------------------
  |  Branch (2984:55): [True: 0, False: 0]
  ------------------
 2985|      0|                                    {
 2986|      0|                                        AddCompletionReply(chunk, shortprefix + arg + choice);
 2987|      0|                                    }
 2988|      0|                                }
 2989|      0|                            }
 2990|      0|                        }
 2991|      0|                    }
 2992|      0|                }
 2993|       |
 2994|      0|#ifndef ARGS_NOEXCEPT
 2995|      0|                throw Completion(completion->Get());
 2996|       |#else
 2997|       |                return true;
 2998|       |#endif
 2999|  1.16k|            }
_ZN4args14ArgumentParser11ParseOptionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
 2578|  1.81k|            {
 2579|  1.81k|                if (s.find(longprefix) == 0 && (allowEmpty || s.length() > longprefix.length()))
  ------------------
  |  Branch (2579:21): [True: 504, False: 1.30k]
  |  Branch (2579:49): [True: 0, False: 504]
  |  Branch (2579:63): [True: 504, False: 0]
  ------------------
 2580|    504|                {
 2581|    504|                    return OptionType::LongFlag;
 2582|    504|                }
 2583|       |
 2584|  1.30k|                if (s.find(shortprefix) == 0 && (allowEmpty || s.length() > shortprefix.length()))
  ------------------
  |  Branch (2584:21): [True: 908, False: 398]
  |  Branch (2584:50): [True: 0, False: 908]
  |  Branch (2584:64): [True: 900, False: 8]
  ------------------
 2585|    900|                {
 2586|    900|                    return OptionType::ShortFlag;
 2587|    900|                }
 2588|       |
 2589|    406|                return OptionType::Positional;
 2590|  1.30k|            }
_ZN4args14ArgumentParser9ParseLongINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEEbRT_SC_:
 2707|    504|            {
 2708|    504|                const auto &chunk = *it;
 2709|    504|                const auto argchunk = chunk.substr(longprefix.size());
 2710|       |                // Try to separate it, in case of a separator:
 2711|    504|                const auto separator = longseparator.empty() ? argchunk.npos : argchunk.find(longseparator);
  ------------------
  |  Branch (2711:40): [True: 0, False: 504]
  ------------------
 2712|       |                // If the separator is in the argument, separate it.
 2713|    504|                const auto arg = (separator != argchunk.npos ?
  ------------------
  |  Branch (2713:35): [True: 241, False: 263]
  ------------------
 2714|    241|                    std::string(argchunk, 0, separator)
 2715|    504|                    : argchunk);
 2716|    504|                const auto joined = (separator != argchunk.npos ?
  ------------------
  |  Branch (2716:38): [True: 241, False: 263]
  ------------------
 2717|    241|                    argchunk.substr(separator + longseparator.size())
 2718|    504|                    : std::string());
 2719|       |
 2720|    504|                if (auto flag = Match(arg))
  ------------------
  |  Branch (2720:26): [True: 81, False: 423]
  ------------------
 2721|     81|                {
 2722|       |#ifdef ARGS_NOEXCEPT
 2723|       |                    // Match() may set the flag's error (e.g. Error::Extra when
 2724|       |                    // Options::Single is violated). In non-noexcept mode that
 2725|       |                    // path throws and parsing stops before the value is read;
 2726|       |                    // in noexcept mode we must mirror that and skip the value
 2727|       |                    // parsing so the previously-stored value is preserved.
 2728|       |                    if (flag->GetError() != Error::None)
 2729|       |                    {
 2730|       |                        return false;
 2731|       |                    }
 2732|       |#endif
 2733|     81|                    std::vector<std::string> values;
 2734|     81|                    const std::string errorMessage = ParseArgsValues(*flag, arg, it, end, allowSeparateLongValue, allowJoinedLongValue,
 2735|     81|                                                                     separator != argchunk.npos, joined, false, values);
 2736|     81|                    if (!errorMessage.empty())
  ------------------
  |  Branch (2736:25): [True: 17, False: 64]
  ------------------
 2737|     17|                    {
 2738|     17|#ifndef ARGS_NOEXCEPT
 2739|     17|                        throw ParseError(errorMessage);
 2740|       |#else
 2741|       |                        error = Error::Parse;
 2742|       |                        errorMsg = errorMessage;
 2743|       |                        return false;
 2744|       |#endif
 2745|     17|                    }
 2746|       |
 2747|     64|                    if (!readCompletion)
  ------------------
  |  Branch (2747:25): [True: 64, False: 0]
  ------------------
 2748|     64|                    {
 2749|     64|                        flag->ParseValue(values);
 2750|       |#ifdef ARGS_NOEXCEPT
 2751|       |                        // Non-noexcept ParseValue paths throw on Help, reader
 2752|       |                        // failure, or Map miss, which halts parsing. Mirror
 2753|       |                        // that here so a later parser-level error (e.g. an
 2754|       |                        // unknown flag) cannot shadow the flag's error in
 2755|       |                        // ArgumentParser::GetError().
 2756|       |                        if (flag->GetError() != Error::None)
 2757|       |                        {
 2758|       |                            return false;
 2759|       |                        }
 2760|       |#endif
 2761|     64|                    }
 2762|       |
 2763|     64|                    if (flag->KickOut())
  ------------------
  |  Branch (2763:25): [True: 0, False: 64]
  ------------------
 2764|      0|                    {
 2765|      0|                        ++it;
 2766|      0|                        return false;
 2767|      0|                    }
 2768|     64|                } else
 2769|    423|                {
 2770|    423|                    const std::string errorMessage("Flag could not be matched: " + arg);
 2771|    423|#ifndef ARGS_NOEXCEPT
 2772|    423|                    throw ParseError(errorMessage);
 2773|       |#else
 2774|       |                    error = Error::Parse;
 2775|       |                    errorMsg = errorMessage;
 2776|       |                    return false;
 2777|       |#endif
 2778|    423|                }
 2779|       |
 2780|     64|                return true;
 2781|    504|            }
_ZN4args14ArgumentParser15ParseArgsValuesINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEES9_RNS_8FlagBaseERKS9_RT_SG_bbbSF_bRNS2_6vectorIS9_NS7_IS9_EEEE:
 2628|  57.0k|            {
 2629|  57.0k|                values.clear();
 2630|       |
 2631|  57.0k|                Nargs nargs = flag.NumberOfArguments();
 2632|       |
 2633|  57.0k|                if (hasJoined && !allowJoined && nargs.min != 0)
  ------------------
  |  Branch (2633:21): [True: 56.7k, False: 288]
  |  Branch (2633:34): [True: 0, False: 56.7k]
  |  Branch (2633:50): [True: 0, False: 0]
  ------------------
 2634|      0|                {
 2635|      0|                    return "Flag '" + arg + "' was passed a joined argument, but these are disallowed";
 2636|      0|                }
 2637|       |
 2638|  57.0k|                if (hasJoined)
  ------------------
  |  Branch (2638:21): [True: 56.7k, False: 288]
  ------------------
 2639|  56.7k|                {
 2640|  56.7k|                    if (!canDiscardJoined || nargs.max != 0)
  ------------------
  |  Branch (2640:25): [True: 17, False: 56.7k]
  |  Branch (2640:46): [True: 0, False: 56.7k]
  ------------------
 2641|     17|                    {
 2642|     17|                        values.push_back(joinedArg);
 2643|     17|                    }
 2644|  56.7k|                } else if (!allowSeparate)
  ------------------
  |  Branch (2644:28): [True: 0, False: 288]
  ------------------
 2645|      0|                {
 2646|      0|                    if (nargs.min != 0)
  ------------------
  |  Branch (2646:25): [True: 0, False: 0]
  ------------------
 2647|      0|                    {
 2648|      0|                        return "Flag '" + arg + "' was passed a separate argument, but these are disallowed";
 2649|      0|                    }
 2650|      0|                } else
 2651|    288|                {
 2652|    288|                    auto valueIt = it;
 2653|    288|                    ++valueIt;
 2654|       |
 2655|    288|                    while (valueIt != end &&
  ------------------
  |  Branch (2655:28): [True: 268, False: 20]
  ------------------
 2656|    268|                           values.size() < nargs.max &&
  ------------------
  |  Branch (2656:28): [True: 0, False: 268]
  ------------------
 2657|      0|                           (values.size() < nargs.min || ParseOption(*valueIt) == OptionType::Positional))
  ------------------
  |  Branch (2657:29): [True: 0, False: 0]
  |  Branch (2657:58): [True: 0, False: 0]
  ------------------
 2658|      0|                    {
 2659|      0|                        if (Complete(flag, valueIt, end))
  ------------------
  |  Branch (2659:29): [True: 0, False: 0]
  ------------------
 2660|      0|                        {
 2661|       |                            // Park `it` on the completion position rather than
 2662|       |                            // `end`. In ARGS_NOEXCEPT mode Complete returns
 2663|       |                            // true (no throw), so the caller's for-loop will
 2664|       |                            // run its ++it after we return; advancing an
 2665|       |                            // already-end iterator is undefined behavior and
 2666|       |                            // causes a subsequent out-of-bounds read of the
 2667|       |                            // arg vector. Since Complete only fires when
 2668|       |                            // ++nextIt == end, valueIt is the last element,
 2669|       |                            // and ++(it=valueIt) safely lands on end.
 2670|      0|                            it = valueIt;
 2671|      0|                            return "";
 2672|      0|                        }
 2673|       |
 2674|      0|                        values.push_back(*valueIt);
 2675|      0|                        ++it;
 2676|      0|                        ++valueIt;
 2677|      0|                    }
 2678|    288|                }
 2679|       |
 2680|  57.0k|                if (values.size() > nargs.max)
  ------------------
  |  Branch (2680:21): [True: 17, False: 57.0k]
  ------------------
 2681|     17|                {
 2682|     17|                    return "Passed an argument into a non-argument flag: " + arg;
 2683|  57.0k|                } else if (values.size() < nargs.min)
  ------------------
  |  Branch (2683:28): [True: 0, False: 57.0k]
  ------------------
 2684|      0|                {
 2685|      0|                    if (nargs.min == 1 && nargs.max == 1)
  ------------------
  |  Branch (2685:25): [True: 0, False: 0]
  |  Branch (2685:43): [True: 0, False: 0]
  ------------------
 2686|      0|                    {
 2687|      0|                        return "Flag '" + arg + "' requires an argument but received none";
 2688|      0|                    } else if (nargs.min == 1)
  ------------------
  |  Branch (2688:32): [True: 0, False: 0]
  ------------------
 2689|      0|                    {
 2690|      0|                        return "Flag '" + arg + "' requires at least one argument but received none";
 2691|      0|                    } else if (nargs.min != nargs.max)
  ------------------
  |  Branch (2691:32): [True: 0, False: 0]
  ------------------
 2692|      0|                    {
 2693|      0|                        return "Flag '" + arg + "' requires at least " + std::to_string(nargs.min) +
 2694|      0|                               " arguments but received " + std::to_string(values.size());
 2695|      0|                    } else
 2696|      0|                    {
 2697|      0|                        return "Flag '" + arg + "' requires " + std::to_string(nargs.min) +
 2698|      0|                               " arguments but received " + std::to_string(values.size());
 2699|      0|                    }
 2700|      0|                }
 2701|       |
 2702|  57.0k|                return {};
 2703|  57.0k|            }
_ZN4args14ArgumentParser10ParseShortINSt3__111__wrap_iterIPNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEEbRT_SC_:
 2785|    450|            {
 2786|    450|                const auto &chunk = *it;
 2787|    450|                const auto argchunk = chunk.substr(shortprefix.size());
 2788|  57.3k|                for (auto argit = std::begin(argchunk); argit != std::end(argchunk); ++argit)
  ------------------
  |  Branch (2788:57): [True: 57.1k, False: 241]
  ------------------
 2789|  57.1k|                {
 2790|  57.1k|                    const auto arg = *argit;
 2791|       |
 2792|  57.1k|                    if (auto flag = Match(arg))
  ------------------
  |  Branch (2792:30): [True: 56.9k, False: 209]
  ------------------
 2793|  56.9k|                    {
 2794|       |#ifdef ARGS_NOEXCEPT
 2795|       |                        // See ParseLong: if Match recorded an error
 2796|       |                        // (e.g. Options::Single violation), bail before the
 2797|       |                        // value is parsed so the prior value is preserved.
 2798|       |                        if (flag->GetError() != Error::None)
 2799|       |                        {
 2800|       |                            return false;
 2801|       |                        }
 2802|       |#endif
 2803|  56.9k|                        const std::string value(argit + 1, std::end(argchunk));
 2804|  56.9k|                        std::vector<std::string> values;
 2805|  56.9k|                        const std::string errorMessage = ParseArgsValues(*flag, std::string(1, arg), it, end,
 2806|  56.9k|                                                                         allowSeparateShortValue, allowJoinedShortValue,
 2807|  56.9k|                                                                         !value.empty(), value, !value.empty(), values);
 2808|       |
 2809|  56.9k|                        if (!errorMessage.empty())
  ------------------
  |  Branch (2809:29): [True: 0, False: 56.9k]
  ------------------
 2810|      0|                        {
 2811|      0|#ifndef ARGS_NOEXCEPT
 2812|      0|                            throw ParseError(errorMessage);
 2813|       |#else
 2814|       |                            error = Error::Parse;
 2815|       |                            errorMsg = errorMessage;
 2816|       |                            return false;
 2817|       |#endif
 2818|      0|                        }
 2819|       |
 2820|  56.9k|                        if (!readCompletion)
  ------------------
  |  Branch (2820:29): [True: 56.9k, False: 0]
  ------------------
 2821|  56.9k|                        {
 2822|  56.9k|                            flag->ParseValue(values);
 2823|       |#ifdef ARGS_NOEXCEPT
 2824|       |                            // See ParseLong: ensure a flag-level error from
 2825|       |                            // ParseValue (Help, Parse, Map) halts parsing so
 2826|       |                            // it cannot be shadowed by a later parser error.
 2827|       |                            if (flag->GetError() != Error::None)
 2828|       |                            {
 2829|       |                                return false;
 2830|       |                            }
 2831|       |#endif
 2832|  56.9k|                        }
 2833|       |
 2834|  56.9k|                        if (flag->KickOut())
  ------------------
  |  Branch (2834:29): [True: 0, False: 56.9k]
  ------------------
 2835|      0|                        {
 2836|      0|                            ++it;
 2837|      0|                            return false;
 2838|      0|                        }
 2839|       |
 2840|  56.9k|                        if (!values.empty())
  ------------------
  |  Branch (2840:29): [True: 0, False: 56.9k]
  ------------------
 2841|      0|                        {
 2842|      0|                            break;
 2843|      0|                        }
 2844|  56.9k|                    } else
 2845|    209|                    {
 2846|    209|                        const std::string errorMessage("Flag could not be matched: '" + std::string(1, arg) + "'");
 2847|    209|#ifndef ARGS_NOEXCEPT
 2848|    209|                        throw ParseError(errorMessage);
 2849|       |#else
 2850|       |                        error = Error::Parse;
 2851|       |                        errorMsg = errorMessage;
 2852|       |                        return false;
 2853|       |#endif
 2854|    209|                    }
 2855|  57.1k|                }
 2856|       |
 2857|    241|                return true;
 2858|    450|            }
_ZNK4args4Base7KickOutEv:
 1125|  56.9k|            {
 1126|  56.9k|                return (options & Options::KickOut) != Options::None;
 1127|  56.9k|            }

LLVMFuzzerTestOneInput:
    7|    892|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    8|    892|    auto fdp = FuzzedDataProvider(data, size);
    9|       |
   10|    892|    auto parser = args::ArgumentParser("parse_args_fuzzer");
   11|       |
   12|    892|    auto help = args::HelpFlag(parser, "help", "Displays this help menu", {'h', "help"});
   13|    892|    auto test = args::Flag(parser, "test", "Test flag", {'t', "test"});
   14|    892|    auto param = args::Flag(parser, "param", "Param flag", {'p', "param"});
   15|       |
   16|    892|    auto count = fdp.ConsumeIntegralInRange(1, 10);
   17|    892|    auto arguments = std::vector<std::string>();
   18|    892|    arguments.reserve(count);
   19|  5.03k|    for (int i = 0; i < count; ++i) {
  ------------------
  |  Branch (19:21): [True: 4.14k, False: 892]
  ------------------
   20|  4.14k|        arguments.emplace_back(fdp.ConsumeRandomLengthString());
   21|  4.14k|    }
   22|       |
   23|    892|    try {
   24|    892|        parser.ParseArgs(arguments.begin(), arguments.end());
   25|    892|    } catch (...) {
   26|    872|    }
   27|       |
   28|    892|    return 0;
   29|    892|}

