_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5Error7details26register_InvalidEnumStringEv:
   79|     10|{
   80|     10|    ::sdbusplus::sdbuspp::register_event_helper<InvalidEnumString>::hook();
   81|     10|}
_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5Error7details28register_UnpackPropertyErrorEv:
  158|     10|{
  159|     10|    ::sdbusplus::sdbuspp::register_event_helper<UnpackPropertyError>::hook();
  160|     10|}
event.cpp:_ZN9sdbusplus5error3xyz15openbmc_project9sdbusplus5ErrorL10loadErrorsEv:
  170|      2|{
  171|      2|    sd_bus_error_add_map(errors);
  172|      2|}

LLVMFuzzerTestOneInput:
   27|  3.42k|{
   28|  3.42k|    if (size == 0)
  ------------------
  |  Branch (28:9): [True: 0, False: 3.42k]
  ------------------
   29|      0|    {
   30|      0|        return 0;
   31|      0|    }
   32|       |
   33|  3.42k|    char temp_file[] = "/tmp/fuzz_conf_XXXXXX";
   34|  3.42k|    int fd = mkstemp(temp_file);
   35|  3.42k|    if (fd < 0)
  ------------------
  |  Branch (35:9): [True: 0, False: 3.42k]
  ------------------
   36|      0|    {
   37|      0|        return 0;
   38|      0|    }
   39|       |
   40|  3.42k|    ssize_t written = write(fd, data, size);
   41|  3.42k|    close(fd);
   42|  3.42k|    if (written < 0)
  ------------------
  |  Branch (42:9): [True: 0, False: 3.42k]
  ------------------
   43|      0|    {
   44|      0|        unlink(temp_file);
   45|      0|        return 0;
   46|      0|    }
   47|       |
   48|  3.42k|    try
   49|  3.42k|    {
   50|  3.42k|        phosphor::network::config::Parser parser(temp_file);
   51|       |
   52|       |        // Inspect parser state
   53|  3.42k|        (void)parser.getFileExists();
   54|  3.42k|        (void)parser.getFilename();
   55|  3.42k|        (void)parser.getWarnings();
   56|       |
   57|       |        // Exercise map queries
   58|  3.42k|        (void)parser.map.getLastValueString("Match", "Name");
   59|  3.42k|        (void)parser.map.getLastValueString("Network", "DHCP");
   60|  3.42k|        (void)parser.map.getLastValueString("DHCP", "ClientIdentifier");
   61|  3.42k|        (void)parser.map.getLastValueString("Address", "Address");
   62|  3.42k|        (void)parser.map.getLastValueString("Route", "Gateway");
   63|  3.42k|        (void)parser.map.getValueStrings("Match", "Name");
   64|  3.42k|        (void)parser.map.getValueStrings("Network", "DHCP");
   65|  3.42k|        (void)parser.map.getValueStrings("DHCP", "ClientIdentifier");
   66|       |
   67|       |        // Exercise network util config queries
   68|  3.42k|        (void)phosphor::network::getIPv6AcceptRA(parser);
   69|  3.42k|        (void)phosphor::network::getDHCPValue(parser);
   70|  3.42k|        (void)phosphor::network::getDHCPProp(
   71|  3.42k|            parser, phosphor::network::DHCPType::v4, "UseDNS");
   72|  3.42k|        (void)phosphor::network::getDHCPProp(
   73|  3.42k|            parser, phosphor::network::DHCPType::v6, "UseDNS");
   74|  3.42k|        (void)phosphor::network::getDHCPProp(
   75|  3.42k|            parser, phosphor::network::DHCPType::v4, "UseNTP");
   76|  3.42k|        (void)phosphor::network::getDHCPProp(
   77|  3.42k|            parser, phosphor::network::DHCPType::v6, "UseNTP");
   78|  3.42k|        (void)phosphor::network::getDHCPProp(
   79|  3.42k|            parser, phosphor::network::DHCPType::v4, "UseHostname");
   80|  3.42k|        (void)phosphor::network::getDHCPProp(
   81|  3.42k|            parser, phosphor::network::DHCPType::v6, "UseHostname");
   82|  3.42k|        (void)phosphor::network::getDHCPProp(
   83|  3.42k|            parser, phosphor::network::DHCPType::v4, "SendHostname");
   84|  3.42k|        (void)phosphor::network::getDHCPProp(
   85|  3.42k|            parser, phosphor::network::DHCPType::v6, "SendHostname");
   86|  3.42k|        (void)phosphor::network::getDHCPProp(
   87|  3.42k|            parser, phosphor::network::DHCPType::v4, "UseDomains");
   88|  3.42k|        (void)phosphor::network::getDHCPProp(
   89|  3.42k|            parser, phosphor::network::DHCPType::v6, "UseDomains");
   90|       |
   91|       |        // Round-trip write and re-parse test
   92|  3.42k|        char out_file[] = "/tmp/fuzz_conf_out_XXXXXX";
   93|  3.42k|        int out_fd = mkstemp(out_file);
   94|  3.42k|        if (out_fd >= 0)
  ------------------
  |  Branch (94:13): [True: 3.42k, False: 0]
  ------------------
   95|  3.42k|        {
   96|  3.42k|            close(out_fd);
   97|  3.42k|            try
   98|  3.42k|            {
   99|  3.42k|                parser.writeFile(out_file);
  100|  3.42k|                phosphor::network::config::Parser re_parser(out_file);
  101|  3.42k|            }
  102|  3.42k|            catch (...)
  103|  3.42k|            {
  104|      0|            }
  105|  3.42k|            unlink(out_file);
  106|  3.42k|        }
  107|  3.42k|    }
  108|  3.42k|    catch (...)
  109|  3.42k|    {
  110|      0|    }
  111|       |
  112|  3.42k|    unlink(temp_file);
  113|       |
  114|       |    // Direct string helper fuzzing
  115|  3.42k|    std::string_view sv(reinterpret_cast<const char*>(data), size);
  116|  3.42k|    (void)phosphor::network::config::parseBool(sv);
  117|  3.42k|    (void)phosphor::network::config::icaseeq(sv, "true");
  118|  3.42k|    (void)phosphor::network::config::icaseeq(sv, "yes");
  119|  3.42k|    (void)phosphor::network::config::icaseeq(sv, "false");
  120|  3.42k|    (void)phosphor::network::config::icaseeq(sv, "no");
  121|       |
  122|  3.42k|    try
  123|  3.42k|    {
  124|  3.42k|        phosphor::network::config::KeyCheck{}(sv);
  125|  3.42k|    }
  126|  3.42k|    catch (...)
  127|  3.42k|    {
  128|  2.96k|    }
  129|       |
  130|  3.42k|    try
  131|  3.42k|    {
  132|  3.42k|        phosphor::network::config::SectionCheck{}(sv);
  133|  3.42k|    }
  134|  3.42k|    catch (...)
  135|  3.42k|    {
  136|  3.05k|    }
  137|       |
  138|  3.42k|    try
  139|  3.42k|    {
  140|  3.42k|        phosphor::network::config::ValueCheck{}(sv);
  141|  3.42k|    }
  142|  3.42k|    catch (...)
  143|  3.42k|    {
  144|  2.85k|    }
  145|       |
  146|  3.42k|    try
  147|  3.42k|    {
  148|  3.42k|        (void)phosphor::network::config::pathForIntfConf("/etc/systemd/network",
  149|  3.42k|                                                         sv);
  150|  3.42k|        (void)phosphor::network::config::pathForIntfDev("/etc/systemd/network",
  151|  3.42k|                                                        sv);
  152|  3.42k|    }
  153|  3.42k|    catch (...)
  154|  3.42k|    {
  155|      0|    }
  156|       |
  157|  3.42k|    return 0;
  158|  3.42k|}

_ZN8phosphor7network6config7icaseeqENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEES6_:
   27|  57.9k|{
   28|  57.9k|    return std::equal(in.begin(), in.end(), expected.begin(), expected.end(),
   29|  57.9k|                      [](auto a, auto b) { return tolower(a) == b; });
   30|  57.9k|}
_ZN8phosphor7network6config9parseBoolENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   33|  4.64k|{
   34|  4.64k|    if (in == "1"sv || icaseeq(in, "yes"sv) || icaseeq(in, "y"sv) ||
  ------------------
  |  Branch (34:9): [True: 18, False: 4.62k]
  |  Branch (34:24): [True: 15, False: 4.61k]
  |  Branch (34:48): [True: 40, False: 4.57k]
  ------------------
   35|  4.57k|        icaseeq(in, "true"sv) || icaseeq(in, "t"sv) || icaseeq(in, "on"sv))
  ------------------
  |  Branch (35:9): [True: 42, False: 4.52k]
  |  Branch (35:34): [True: 171, False: 4.35k]
  |  Branch (35:56): [True: 11, False: 4.34k]
  ------------------
   36|    297|    {
   37|    297|        return true;
   38|    297|    }
   39|  4.34k|    if (in == "0"sv || icaseeq(in, "no"sv) || icaseeq(in, "n"sv) ||
  ------------------
  |  Branch (39:9): [True: 28, False: 4.31k]
  |  Branch (39:24): [True: 10, False: 4.30k]
  |  Branch (39:47): [True: 13, False: 4.29k]
  ------------------
   40|  4.29k|        icaseeq(in, "false"sv) || icaseeq(in, "f"sv) || icaseeq(in, "off"sv))
  ------------------
  |  Branch (40:9): [True: 28, False: 4.26k]
  |  Branch (40:35): [True: 48, False: 4.22k]
  |  Branch (40:57): [True: 10, False: 4.21k]
  ------------------
   41|    137|    {
   42|    137|        return false;
   43|    137|    }
   44|  4.21k|    return std::nullopt;
   45|  4.34k|}
_ZN8phosphor7network6config15pathForIntfConfERKNSt3__14__fs10filesystem4pathENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   48|  3.42k|{
   49|  3.42k|    return dir / stdplus::strCat("00-bmc-"sv, intf, ".network"sv);
   50|  3.42k|}
_ZN8phosphor7network6config14pathForIntfDevERKNSt3__14__fs10filesystem4pathENS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   53|  3.42k|{
   54|  3.42k|    return dir / stdplus::strCat(intf, ".netdev"sv);
   55|  3.42k|}
_ZNK8phosphor7network6config10SectionMap18getLastValueStringENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
   59|  58.2k|{
   60|  58.2k|    auto sit = find(section);
   61|  58.2k|    if (sit == end())
  ------------------
  |  Branch (61:9): [True: 52.0k, False: 6.22k]
  ------------------
   62|  52.0k|    {
   63|  52.0k|        return nullptr;
   64|  52.0k|    }
   65|  27.2k|    for (auto it = sit->second.rbegin(); it != sit->second.rend(); ++it)
  ------------------
  |  Branch (65:42): [True: 22.4k, False: 4.82k]
  ------------------
   66|  22.4k|    {
   67|  22.4k|        auto kit = it->find(key);
   68|  22.4k|        if (kit == it->end() || kit->second.empty())
  ------------------
  |  Branch (68:13): [True: 21.0k, False: 1.40k]
  |  Branch (68:13): [True: 21.0k, False: 1.40k]
  |  Branch (68:33): [True: 0, False: 1.40k]
  ------------------
   69|  21.0k|        {
   70|  21.0k|            continue;
   71|  21.0k|        }
   72|  1.40k|        return &kit->second.back().get();
   73|  22.4k|    }
   74|  4.82k|    return nullptr;
   75|  6.22k|}
_ZNK8phosphor7network6config10SectionMap15getValueStringsENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
   79|  10.2k|{
   80|  10.2k|    return getValues(section, key,
   81|  10.2k|                     [](const Value& v) { return std::string(v); });
   82|  10.2k|}
_ZN8phosphor7network6config8KeyCheckclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   85|  3.42k|{
   86|  3.42k|    for (auto c : s)
  ------------------
  |  Branch (86:17): [True: 37.7M, False: 466]
  ------------------
   87|  37.7M|    {
   88|  37.7M|        if (c == '\n' || c == '=')
  ------------------
  |  Branch (88:13): [True: 2.74k, False: 37.7M]
  |  Branch (88:26): [True: 213, False: 37.7M]
  ------------------
   89|  2.96k|        {
   90|  2.96k|            throw std::invalid_argument(
   91|  2.96k|                stdplus::strCat("Invalid Config Key: "sv, s));
   92|  2.96k|        }
   93|  37.7M|    }
   94|  3.42k|}
_ZN8phosphor7network6config12SectionCheckclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   97|  3.42k|{
   98|  3.42k|    for (auto c : s)
  ------------------
  |  Branch (98:17): [True: 21.6M, False: 372]
  ------------------
   99|  21.6M|    {
  100|  21.6M|        if (c == '\n' || c == ']')
  ------------------
  |  Branch (100:13): [True: 2.76k, False: 21.6M]
  |  Branch (100:26): [True: 287, False: 21.6M]
  ------------------
  101|  3.05k|        {
  102|  3.05k|            throw std::invalid_argument(
  103|  3.05k|                stdplus::strCat("Invalid Config Section: "sv, s));
  104|  3.05k|        }
  105|  21.6M|    }
  106|  3.42k|}
_ZN8phosphor7network6config10ValueCheckclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  109|  3.42k|{
  110|  3.42k|    for (auto c : s)
  ------------------
  |  Branch (110:17): [True: 47.7M, False: 570]
  ------------------
  111|  47.7M|    {
  112|  47.7M|        if (c == '\n')
  ------------------
  |  Branch (112:13): [True: 2.85k, False: 47.7M]
  ------------------
  113|  2.85k|        {
  114|  2.85k|            throw std::invalid_argument(
  115|  2.85k|                stdplus::strCat("Invalid Config Value: "sv, s));
  116|  2.85k|        }
  117|  47.7M|    }
  118|  3.42k|}
_ZN8phosphor7network6config6ParserC2ERKNSt3__14__fs10filesystem4pathE:
  121|  6.85k|{
  122|  6.85k|    setFile(filename);
  123|  6.85k|}
_ZN8phosphor7network6config6Parser7setFileERKNSt3__14__fs10filesystem4pathE:
  250|  6.85k|{
  251|  6.85k|    Parse parse(filename);
  252|       |
  253|  6.85k|    bool fileExists = true;
  254|  6.85k|    try
  255|  6.85k|    {
  256|  6.85k|        auto fd = stdplus::fd::open(filename.c_str(),
  257|  6.85k|                                    stdplus::fd::OpenAccess::ReadOnly);
  258|  6.85k|        stdplus::fd::LineReader reader(fd);
  259|  62.2M|        while (true)
  ------------------
  |  Branch (259:16): [True: 62.2M, Folded]
  ------------------
  260|  62.2M|        {
  261|  62.2M|            parse.pump(*reader.readLine());
  262|  62.2M|        }
  263|  6.85k|    }
  264|  6.85k|    catch (const stdplus::exception::Eof&)
  265|  6.85k|    {}
  266|  6.85k|    catch (const std::system_error& e)
  267|  6.85k|    {
  268|      0|        fileExists = false;
  269|       |        // TODO: Pass exceptions once callers can handle them
  270|      0|        parse.warnings.emplace_back(
  271|      0|            std::format("{}: Open error: {}", filename.native(), e.what()));
  272|      0|    }
  273|       |
  274|  6.85k|    this->map = std::move(parse.map);
  275|  6.85k|    this->fileExists = fileExists;
  276|  6.85k|    this->filename = filename;
  277|  6.85k|    this->warnings = std::move(parse.warnings);
  278|  6.85k|}
_ZN8phosphor7network6config6Parser9writeFileERKNSt3__14__fs10filesystem4pathE:
  308|  3.42k|{
  309|  3.42k|    writeFileInt(map, filename);
  310|  3.42k|    this->filename = filename;
  311|  3.42k|}
config_parser.cpp:_ZZN8phosphor7network6config7icaseeqENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEES6_ENK3$_0clIccEEDaT_T0_:
   29|  2.10k|                      [](auto a, auto b) { return tolower(a) == b; });
config_parser.cpp:_ZZNK8phosphor7network6config10SectionMap15getValueStringsENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_ENK3$_0clERKNS1_7CheckedINS3_12basic_stringIcS6_NS3_9allocatorIcEEEENS1_10ValueCheckEEE:
   81|  2.87k|                     [](const Value& v) { return std::string(v); });
_ZN8phosphor7network6config5ParseC2ERKNSt3__14__fs10filesystem4pathE:
  157|  6.85k|        filename(filename), section(nullptr), lineno(0)
  158|  6.85k|    {}
_ZN8phosphor7network6config5Parse4pumpENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  228|  62.2M|    {
  229|  62.2M|        lineno++;
  230|  62.2M|        for (size_t i = 0; i < line.size(); ++i)
  ------------------
  |  Branch (230:28): [True: 12.7M, False: 49.4M]
  ------------------
  231|  12.7M|        {
  232|  12.7M|            auto c = line[i];
  233|  12.7M|            if (iscomment(c))
  ------------------
  |  Branch (233:17): [True: 674, False: 12.7M]
  ------------------
  234|    674|            {
  235|    674|                return;
  236|    674|            }
  237|  12.7M|            else if (c == '[')
  ------------------
  |  Branch (237:22): [True: 9.12M, False: 3.66M]
  ------------------
  238|  9.12M|            {
  239|  9.12M|                return pumpSection(line.substr(i + 1));
  240|  9.12M|            }
  241|  3.66M|            else if (!isHorizontalSpace(c))
  ------------------
  |  Branch (241:22): [True: 3.66M, False: 4.78k]
  ------------------
  242|  3.66M|            {
  243|  3.66M|                return pumpKV(line.substr(i));
  244|  3.66M|            }
  245|  12.7M|        }
  246|  62.2M|    }
_ZN8phosphor7network6config9iscommentEc:
  131|  12.7M|{
  132|  12.7M|    return c == '#' || c == ';';
  ------------------
  |  Branch (132:12): [True: 410, False: 12.7M]
  |  Branch (132:24): [True: 264, False: 12.7M]
  ------------------
  133|  12.7M|}
_ZN8phosphor7network6config5Parse11pumpSectionENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  161|  9.12M|    {
  162|  9.12M|        auto cpos = line.find(']');
  163|  9.12M|        if (cpos == line.npos)
  ------------------
  |  Branch (163:13): [True: 4.55M, False: 4.56M]
  ------------------
  164|  4.55M|        {
  165|  4.55M|            warnings.emplace_back(std::format("{}:{}: Section missing ]",
  166|  4.55M|                                              filename.get().native(), lineno));
  167|  4.55M|        }
  168|  4.56M|        else
  169|  4.56M|        {
  170|  4.56M|            for (auto c : line.substr(cpos + 1))
  ------------------
  |  Branch (170:25): [True: 4.42k, False: 4.56M]
  ------------------
  171|  4.42k|            {
  172|  4.42k|                if (!isHorizontalSpace(c))
  ------------------
  |  Branch (172:21): [True: 3.38k, False: 1.03k]
  ------------------
  173|  3.38k|                {
  174|  3.38k|                    warnings.emplace_back(
  175|  3.38k|                        std::format("{}:{}: Characters outside section name",
  176|  3.38k|                                    filename.get().native(), lineno));
  177|  3.38k|                    break;
  178|  3.38k|                }
  179|  4.42k|            }
  180|  4.56M|        }
  181|  9.12M|        auto s = line.substr(0, cpos);
  182|  9.12M|        auto it = map.find(s);
  183|  9.12M|        if (it == map.end())
  ------------------
  |  Branch (183:13): [True: 44.2k, False: 9.08M]
  ------------------
  184|  44.2k|        {
  185|  44.2k|            std::tie(it, std::ignore) = map.emplace(
  186|  44.2k|                Section(Section::unchecked(), s), KeyValuesMapList{});
  187|  44.2k|        }
  188|  9.12M|        section = &it->second.emplace_back();
  189|  9.12M|    }
_ZN8phosphor7network6config17isHorizontalSpaceEc:
  126|  10.4M|{
  127|  10.4M|    return c == ' ' || c == '\t';
  ------------------
  |  Branch (127:12): [True: 552k, False: 9.85M]
  |  Branch (127:24): [True: 559k, False: 9.29M]
  ------------------
  128|  10.4M|}
_ZN8phosphor7network6config5Parse6pumpKVENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  192|  3.66M|    {
  193|  3.66M|        auto epos = line.find('=');
  194|  3.66M|        std::vector<std::string> new_warnings;
  195|  3.66M|        if (epos == line.npos)
  ------------------
  |  Branch (195:13): [True: 2.27M, False: 1.39M]
  ------------------
  196|  2.27M|        {
  197|  2.27M|            new_warnings.emplace_back(std::format(
  198|  2.27M|                "{}:{}: KV missing `=`", filename.get().native(), lineno));
  199|  2.27M|        }
  200|  3.66M|        auto k = line.substr(0, epos);
  201|  3.66M|        removePadding(k);
  202|  3.66M|        if (section == nullptr)
  ------------------
  |  Branch (202:13): [True: 2.14M, False: 1.51M]
  ------------------
  203|  2.14M|        {
  204|  2.14M|            new_warnings.emplace_back(
  205|  2.14M|                std::format("{}:{}: Key `{}` missing section",
  206|  2.14M|                            filename.get().native(), lineno, k));
  207|  2.14M|        }
  208|  3.66M|        if (!new_warnings.empty())
  ------------------
  |  Branch (208:13): [True: 2.27M, False: 1.39M]
  ------------------
  209|  2.27M|        {
  210|  2.27M|            warnings.insert(warnings.end(),
  211|  2.27M|                            std::make_move_iterator(new_warnings.begin()),
  212|  2.27M|                            std::make_move_iterator(new_warnings.end()));
  213|  2.27M|            return;
  214|  2.27M|        }
  215|  1.39M|        auto v = line.substr(epos + 1);
  216|  1.39M|        removePadding(v);
  217|       |
  218|  1.39M|        auto it = section->find(k);
  219|  1.39M|        if (it == section->end())
  ------------------
  |  Branch (219:13): [True: 230k, False: 1.16M]
  ------------------
  220|   230k|        {
  221|   230k|            std::tie(it, std::ignore) =
  222|   230k|                section->emplace(Key(Key::unchecked(), k), ValueList{});
  223|   230k|        }
  224|  1.39M|        it->second.emplace_back(Value::unchecked(), v);
  225|  1.39M|    }
config_parser.cpp:_ZN8phosphor7network6configL13removePaddingERNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  136|  5.05M|{
  137|  5.05M|    size_t idx = str.size();
  138|  5.06M|    for (; idx > 0 && isHorizontalSpace(str[idx - 1]); idx--)
  ------------------
  |  Branch (138:12): [True: 2.81M, False: 2.24M]
  |  Branch (138:23): [True: 6.29k, False: 2.81M]
  ------------------
  139|  6.29k|        ;
  140|  5.05M|    str.remove_suffix(str.size() - idx);
  141|       |
  142|  5.05M|    idx = 0;
  143|  6.15M|    for (; idx < str.size() && isHorizontalSpace(str[idx]); idx++)
  ------------------
  |  Branch (143:12): [True: 3.91M, False: 2.24M]
  |  Branch (143:32): [True: 1.09M, False: 2.81M]
  ------------------
  144|  1.09M|        ;
  145|  5.05M|    str.remove_prefix(idx);
  146|  5.05M|}
config_parser.cpp:_ZN8phosphor7network6configL12writeFileIntERKNS1_10SectionMapERKNSt3__14__fs10filesystem4pathE:
  281|  3.42k|{
  282|  3.42k|    stdplus::fd::AtomicWriter writer(filename, 0644);
  283|  3.42k|    stdplus::fd::FormatBuffer out(writer);
  284|  3.42k|    for (const auto& [section, maps] : map)
  ------------------
  |  Branch (284:38): [True: 22.1k, False: 3.42k]
  ------------------
  285|  22.1k|    {
  286|  22.1k|        for (const auto& keymap : maps)
  ------------------
  |  Branch (286:33): [True: 4.56M, False: 22.1k]
  ------------------
  287|  4.56M|        {
  288|  4.56M|            out.appends("["sv, section.get(), "]\n"sv);
  289|  4.56M|            for (const auto& [key, vals] : keymap)
  ------------------
  |  Branch (289:42): [True: 115k, False: 4.56M]
  ------------------
  290|   115k|            {
  291|   115k|                for (const auto& val : vals)
  ------------------
  |  Branch (291:38): [True: 695k, False: 115k]
  ------------------
  292|   695k|                {
  293|   695k|                    out.appends(key.get(), "="sv, val.get(), "\n"sv);
  294|   695k|                }
  295|   115k|            }
  296|  4.56M|        }
  297|  22.1k|    }
  298|  3.42k|    out.flush();
  299|  3.42k|    writer.commit();
  300|  3.42k|}

_ZNK8phosphor7network6config6Parser13getFileExistsEv:
  163|  44.5k|    {
  164|  44.5k|        return fileExists;
  165|  44.5k|    }
_ZNK8phosphor7network6config6Parser11getFilenameEv:
  179|  44.1k|    {
  180|  44.1k|        return filename;
  181|  44.1k|    }
_ZNK8phosphor7network6config6Parser11getWarningsEv:
  171|  3.42k|    {
  172|  3.42k|        return warnings;
  173|  3.42k|    }
_ZNK8phosphor7network6config11string_hashclINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEEEmRKT_:
  102|  10.5M|    {
  103|  10.5M|        return static_cast<const std::hash<std::string_view>&>(*this)(t);
  104|  10.5M|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_12SectionCheckEEeqINS3_17basic_string_viewIcS6_EEEEbRKT_:
   62|  9.09M|    {
   63|  9.09M|        return t == rhs;
   64|  9.09M|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_10ValueCheckEE3getEv:
   45|   696k|    {
   46|   696k|        return t;
   47|   696k|    }
config_parser.cpp:_ZNK8phosphor7network6config10SectionMap9getValuesIZNKS2_15getValueStringsENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEES8_E3$_0EEDaS8_S8_OT_:
  124|  10.2k|    {
  125|  10.2k|        std::vector<std::invoke_result_t<decltype(conv), const Value&>> values;
  126|  10.2k|        auto sit = find(section);
  127|  10.2k|        if (sit == end())
  ------------------
  |  Branch (127:13): [True: 9.52k, False: 752]
  ------------------
  128|  9.52k|        {
  129|  9.52k|            return values;
  130|  9.52k|        }
  131|    752|        for (const auto& secv : sit->second)
  ------------------
  |  Branch (131:31): [True: 3.15k, False: 752]
  ------------------
  132|  3.15k|        {
  133|  3.15k|            auto kit = secv.find(key);
  134|  3.15k|            if (kit == secv.end())
  ------------------
  |  Branch (134:17): [True: 2.16k, False: 997]
  ------------------
  135|  2.16k|            {
  136|  2.16k|                continue;
  137|  2.16k|            }
  138|    997|            for (auto v : kit->second)
  ------------------
  |  Branch (138:25): [True: 2.87k, False: 997]
  ------------------
  139|  2.87k|            {
  140|  2.87k|                values.push_back(conv(v));
  141|  2.87k|            }
  142|    997|        }
  143|    752|        return values;
  144|  10.2k|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_10ValueCheckEEcvRKS9_Ev:
   50|  2.87k|    {
   51|  2.87k|        return t;
   52|  2.87k|    }
_ZNK8phosphor7network6config11string_hashclINS1_12SectionCheckEEEmRKNS1_7CheckedINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEET_EE:
   97|  44.2k|    {
   98|  44.2k|        return static_cast<const std::hash<std::string_view>&>(*this)(t.get());
   99|  44.2k|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_12SectionCheckEE3getEv:
   45|  4.60M|    {
   46|  4.60M|        return t;
   47|  4.60M|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_12SectionCheckEEeqIS9_SA_EEbRKNS2_IT_T0_EE:
   56|    296|    {
   57|    296|        static_assert(std::is_same_v<Check2, Check>);
   58|    296|        return t == rhs.t;
   59|    296|    }
_ZN8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_12SectionCheckEEC2IJRNS3_17basic_string_viewIcS6_EEEEENSB_9uncheckedEDpOT_:
   41|  44.2k|        t(std::forward<Args>(args)...)
   42|  44.2k|    {}
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_8KeyCheckEEeqINS3_17basic_string_viewIcS6_EEEEbRKT_:
   62|  1.16M|    {
   63|  1.16M|        return t == rhs;
   64|  1.16M|    }
_ZNK8phosphor7network6config11string_hashclINS1_8KeyCheckEEEmRKNS1_7CheckedINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEET_EE:
   97|   230k|    {
   98|   230k|        return static_cast<const std::hash<std::string_view>&>(*this)(t.get());
   99|   230k|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_8KeyCheckEE3getEv:
   45|   925k|    {
   46|   925k|        return t;
   47|   925k|    }
_ZNK8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_8KeyCheckEEeqIS9_SA_EEbRKNS2_IT_T0_EE:
   56|    426|    {
   57|    426|        static_assert(std::is_same_v<Check2, Check>);
   58|    426|        return t == rhs.t;
   59|    426|    }
_ZN8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_8KeyCheckEEC2IJRNS3_17basic_string_viewIcS6_EEEEENSB_9uncheckedEDpOT_:
   41|   230k|        t(std::forward<Args>(args)...)
   42|   230k|    {}
_ZN8phosphor7network6config7CheckedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS1_10ValueCheckEEC2IJRNS3_17basic_string_viewIcS6_EEEEENSB_9uncheckedEDpOT_:
   41|  1.39M|        t(std::forward<Args>(args)...)
   42|  1.39M|    {}

_ZN8phosphor7network15getIPv6AcceptRAERKNS0_6config6ParserE:
  272|  3.42k|{
  273|  3.42k|#if ENABLE_IPV6_ACCEPT_RA
  274|  3.42k|    constexpr bool def = true;
  275|       |#else
  276|       |    constexpr bool def = false;
  277|       |#endif
  278|  3.42k|    return systemdParseLast(config, "Network", "IPv6AcceptRA",
  279|  3.42k|                            config::parseBool)
  280|  3.42k|        .value_or(def);
  281|  3.42k|}
_ZN8phosphor7network12getDHCPValueERKNS0_6config6ParserE:
  284|  3.42k|{
  285|  3.42k|    return systemdParseLast(config, "Network", "DHCP", systemdParseDHCP)
  286|  3.42k|        .value_or(DHCPVal{.v4 = true, .v6 = true});
  287|  3.42k|}
_ZN8phosphor7network11getDHCPPropERKNS0_6config6ParserENS0_8DHCPTypeENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEE:
  291|  34.2k|{
  292|  34.2k|    std::string_view type = (dhcpType == DHCPType::v4) ? "DHCPv4" : "DHCPv6";
  ------------------
  |  Branch (292:29): [True: 17.1k, False: 17.1k]
  ------------------
  293|       |
  294|  34.2k|    if (!config.map.contains(type))
  ------------------
  |  Branch (294:9): [True: 33.9k, False: 315]
  ------------------
  295|  33.9k|    {
  296|  33.9k|        type = "DHCP";
  297|  33.9k|    }
  298|       |
  299|  34.2k|    return systemdParseLast(config, type, key, config::parseBool)
  300|  34.2k|        .value_or(true);
  301|  34.2k|}
_ZN8phosphor7network16systemdParseLastIRDoFNSt3__18optionalIbEENS2_17basic_string_viewIcNS2_11char_traitsIcEEEEEEEDaRKNS0_6config6ParserES8_S8_OT_:
  246|  37.6k|{
  247|  37.6k|    if (!config.getFileExists())
  ------------------
  |  Branch (247:9): [True: 0, False: 37.6k]
  ------------------
  248|      0|    {}
  249|  37.6k|    else if (auto str = config.map.getLastValueString(section, key);
  250|  37.6k|             str == nullptr)
  ------------------
  |  Branch (250:14): [True: 36.5k, False: 1.16k]
  ------------------
  251|  36.5k|    {
  252|  36.5k|        lg2::notice(
  253|  36.5k|            "Unable to get the value of {CFG_SEC}[{CFG_KEY}] from {CFG_FILE}",
  254|  36.5k|            "CFG_SEC", section, "CFG_KEY", key, "CFG_FILE",
  255|  36.5k|            config.getFilename());
  256|  36.5k|    }
  257|  1.16k|    else if (auto val = fun(*str); !val)
  ------------------
  |  Branch (257:36): [True: 774, False: 390]
  ------------------
  258|    774|    {
  259|    774|        lg2::notice(
  260|    774|            "Invalid value of {CFG_SEC}[{CFG_KEY}] from {CFG_FILE}: {CFG_VAL}",
  261|    774|            "CFG_SEC", section, "CFG_KEY", key, "CFG_FILE",
  262|    774|            config.getFilename(), "CFG_VAL", *str);
  263|    774|    }
  264|    390|    else
  265|    390|    {
  266|    390|        return val;
  267|    390|    }
  268|  37.2k|    return decltype(fun(std::string_view{}))(std::nullopt);
  269|  37.6k|}
_ZN8phosphor7network16systemdParseLastIRFNSt3__18optionalINS0_7DHCPValEEENS2_17basic_string_viewIcNS2_11char_traitsIcEEEEEEEDaRKNS0_6config6ParserES9_S9_OT_:
  246|  3.42k|{
  247|  3.42k|    if (!config.getFileExists())
  ------------------
  |  Branch (247:9): [True: 0, False: 3.42k]
  ------------------
  248|      0|    {}
  249|  3.42k|    else if (auto str = config.map.getLastValueString(section, key);
  250|  3.42k|             str == nullptr)
  ------------------
  |  Branch (250:14): [True: 3.37k, False: 56]
  ------------------
  251|  3.37k|    {
  252|  3.37k|        lg2::notice(
  253|  3.37k|            "Unable to get the value of {CFG_SEC}[{CFG_KEY}] from {CFG_FILE}",
  254|  3.37k|            "CFG_SEC", section, "CFG_KEY", key, "CFG_FILE",
  255|  3.37k|            config.getFilename());
  256|  3.37k|    }
  257|     56|    else if (auto val = fun(*str); !val)
  ------------------
  |  Branch (257:36): [True: 24, False: 32]
  ------------------
  258|     24|    {
  259|     24|        lg2::notice(
  260|     24|            "Invalid value of {CFG_SEC}[{CFG_KEY}] from {CFG_FILE}: {CFG_VAL}",
  261|     24|            "CFG_SEC", section, "CFG_KEY", key, "CFG_FILE",
  262|     24|            config.getFilename(), "CFG_VAL", *str);
  263|     24|    }
  264|     32|    else
  265|     32|    {
  266|     32|        return val;
  267|     32|    }
  268|  3.39k|    return decltype(fun(std::string_view{}))(std::nullopt);
  269|  3.42k|}
util.cpp:_ZN8phosphor7networkL16systemdParseDHCPENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  227|     56|{
  228|     56|    if (config::icaseeq(str, "ipv4"))
  ------------------
  |  Branch (228:9): [True: 1, False: 55]
  ------------------
  229|      1|    {
  230|      1|        return DHCPVal{.v4 = true, .v6 = false};
  231|      1|    }
  232|     55|    if (config::icaseeq(str, "ipv6"))
  ------------------
  |  Branch (232:9): [True: 1, False: 54]
  ------------------
  233|      1|    {
  234|      1|        return DHCPVal{.v4 = false, .v6 = true};
  235|      1|    }
  236|     54|    if (auto b = config::parseBool(str); b)
  ------------------
  |  Branch (236:42): [True: 30, False: 24]
  ------------------
  237|     30|    {
  238|     30|        return DHCPVal{.v4 = *b, .v6 = *b};
  239|     30|    }
  240|     24|    return std::nullopt;
  241|     54|}

_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valENS0_17flag_unsigned_valENS0_8flag_strEETpTkNS0_9log_flagsEJNS0_13flag_floatingEEEEDaNS0_8log_flagIJDpT_EEENS6_IJDpT0_EEE:
   47|   122k|{
   48|   122k|    return details::log_flag<As..., Bs...>{};
   49|   122k|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valENS0_17flag_unsigned_valEETpTkNS0_9log_flagsEJNS0_8flag_strEEEEDaNS0_8log_flagIJDpT_EEENS5_IJDpT0_EEE:
   47|   122k|{
   48|   122k|    return details::log_flag<As..., Bs...>{};
   49|   122k|}
_ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_15flag_signed_valEETpTkNS0_9log_flagsEJNS0_17flag_unsigned_valEEEEDaNS0_8log_flagIJDpT_EEENS4_IJDpT0_EEE:
   47|   122k|{
   48|   122k|    return details::log_flag<As..., Bs...>{};
   49|   122k|}

_ZN3lg27details6do_logENS_5levelERKNSt3__115source_locationEPKcz:
  269|  40.6k|{
  270|  40.6k|    using namespace std::string_literals;
  271|       |
  272|  40.6k|    std::vector<std::string> strings{static_locs};
  273|       |
  274|  40.6k|    std::string message{m};
  275|       |
  276|       |    // Assign all the static fields.
  277|  40.6k|    strings[pos_fmtmsg] = "LOG2_FMTMSG="s + m;
  278|  40.6k|    strings[pos_prio] = "PRIORITY="s + std::to_string(static_cast<uint64_t>(l));
  279|  40.6k|    strings[pos_file] = "CODE_FILE="s + s.file_name();
  280|  40.6k|    strings[pos_line] = "CODE_LINE="s + std::to_string(s.line());
  281|  40.6k|    strings[pos_func] = "CODE_FUNC="s + s.function_name();
  282|       |
  283|       |    // Handle all the va_list args.
  284|  40.6k|    std::va_list args;
  285|  40.6k|    va_start(args, m);
  286|   163k|    while (true)
  ------------------
  |  Branch (286:12): [True: 163k, Folded]
  ------------------
  287|   163k|    {
  288|       |        // Get the header out.
  289|   163k|        auto h_ptr = va_arg(args, const char*);
  290|   163k|        if (h_ptr == nullptr)
  ------------------
  |  Branch (290:13): [True: 40.6k, False: 122k]
  ------------------
  291|  40.6k|        {
  292|  40.6k|            break;
  293|  40.6k|        }
  294|   122k|        std::string h{h_ptr};
  295|       |
  296|       |        // Get the format flag.
  297|   122k|        auto f = va_arg(args, uint64_t);
  298|       |
  299|       |        // Handle the value depending on which type format flag it has.
  300|   122k|        std::string value = {};
  301|   122k|        switch (f & (signed_val | unsigned_val | str | floating).value)
  ------------------
  |  Branch (301:17): [True: 122k, False: 0]
  ------------------
  302|   122k|        {
  303|      0|            case signed_val.value:
  ------------------
  |  Branch (303:13): [True: 0, False: 122k]
  ------------------
  304|      0|            {
  305|      0|                auto v = va_arg(args, int64_t);
  306|      0|                value = value_to_string(f, v);
  307|      0|                break;
  308|      0|            }
  309|       |
  310|      0|            case unsigned_val.value:
  ------------------
  |  Branch (310:13): [True: 0, False: 122k]
  ------------------
  311|      0|            {
  312|      0|                auto v = va_arg(args, uint64_t);
  313|      0|                value = value_to_string(f, v);
  314|      0|                break;
  315|      0|            }
  316|       |
  317|   122k|            case str.value:
  ------------------
  |  Branch (317:13): [True: 122k, False: 0]
  ------------------
  318|   122k|            {
  319|   122k|                value = va_arg(args, const char*);
  320|   122k|                break;
  321|      0|            }
  322|       |
  323|      0|            case floating.value:
  ------------------
  |  Branch (323:13): [True: 0, False: 122k]
  ------------------
  324|      0|            {
  325|      0|                auto v = va_arg(args, double);
  326|      0|                value = value_to_string(f, v);
  327|      0|                break;
  328|      0|            }
  329|   122k|        }
  330|       |
  331|       |        // Create the field for this value.
  332|   122k|        strings.emplace_back(h + '=' + value);
  333|       |
  334|       |        // Check for {HEADER} in the message and replace with value.
  335|   122k|        auto h_brace = '{' + h + '}';
  336|   122k|        if (auto start = message.find(h_brace); start != std::string::npos)
  ------------------
  |  Branch (336:49): [True: 122k, False: 0]
  ------------------
  337|   122k|        {
  338|   122k|            message.replace(start, h_brace.size(), value);
  339|   122k|        }
  340|   122k|    }
  341|  40.6k|    va_end(args);
  342|       |
  343|       |    // Add the final message into the strings array.
  344|  40.6k|    strings[pos_msg] = "MESSAGE="s + message.data();
  345|       |
  346|       |    // Transform strings -> iovec.
  347|  40.6k|    std::vector<iovec> iov{};
  348|  40.6k|    std::ranges::transform(strings, std::back_inserter(iov), [](auto& s) {
  349|  40.6k|        return iovec{s.data(), s.length()};
  350|  40.6k|    });
  351|       |
  352|       |    // Output the iovec.
  353|  40.6k|    if (send_debug_to_journal() || l != level::debug)
  ------------------
  |  Branch (353:9): [True: 0, False: 40.6k]
  |  Branch (353:36): [True: 40.6k, False: 0]
  ------------------
  354|  40.6k|    {
  355|  40.6k|        sd_journal_sendv(iov.data(), strings.size());
  356|  40.6k|    }
  357|  40.6k|    extra_output_method()(l, s, message);
  358|  40.6k|}
lg2_logger.cpp:_ZZN3lg27details6do_logENS_5levelERKNSt3__115source_locationEPKczENK3$_0clINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDaRT_:
  348|   367k|    std::ranges::transform(strings, std::back_inserter(iov), [](auto& s) {
  349|   367k|        return iovec{s.data(), s.length()};
  350|   367k|    });
lg2_logger.cpp:_ZN3lg27detailsL21send_debug_to_journalEv:
  262|  40.6k|{
  263|  40.6k|    static const bool send = nullptr != getenv("DEBUG_INVOCATION");
  264|  40.6k|    return send;
  265|  40.6k|}
lg2_logger.cpp:_ZN3lg27detailsL19extra_output_methodEv:
  251|  40.6k|{
  252|  40.6k|    static const auto method =
  253|  40.6k|        (isatty(fileno(stderr)) || nullptr != getenv("LG2_FORCE_STDERR"))
  ------------------
  |  Branch (253:10): [True: 40.6k, False: 1]
  |  Branch (253:36): [True: 0, False: 1]
  ------------------
  254|  40.6k|            ? cerr_extra_output
  255|  40.6k|            : noop_extra_output;
  256|  40.6k|    return method;
  257|  40.6k|}
lg2_logger.cpp:_ZN3lg27detailsL17noop_extra_outputENS_5levelERKNSt3__115source_locationERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  135|  40.6k|{}

_ZN9sdbusplus7sdbuspp21register_event_helperINS_5error3xyz15openbmc_project9sdbusplus5Error17InvalidEnumStringEE4hookEv:
   20|     10|    {
   21|     10|        register_event(T::errName, throw_event);
   22|     10|    }
_ZN9sdbusplus7sdbuspp21register_event_helperINS_5error3xyz15openbmc_project9sdbusplus5Error19UnpackPropertyErrorEE4hookEv:
   20|     10|    {
   21|     10|        register_event(T::errName, throw_event);
   22|     10|    }

_ZN9sdbusplus7sdbuspp14register_eventERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPFvRKN8nlohmann16json_abi_v3_12_010basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_NSB_14adl_serializerENSE_IhNS5_IhEEEEvEERKNS1_15source_locationEE:
  215|     20|{
  216|     20|    sdbusplus::exception::get_event_hooks().emplace(event, throw_hook);
  217|     20|}
exception.cpp:_ZN9sdbusplus9exceptionL15get_event_hooksEv:
  140|     20|{
  141|     20|    static std::unordered_map<std::string, sdbusplus::sdbuspp::register_hook>
  142|     20|        event_hooks;
  143|     20|    return event_hooks;
  144|     20|}

_ZN7stdplus2fd9OpenFlagsC2ENS0_10OpenAccessE:
   48|  6.85k|        BitFlags<OpenFlag>(static_cast<int>(access))
   49|  6.85k|    {}

_ZN7stdplus2fd12FormatBuffer7appendsIJNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEENS3_12basic_stringIcS6_NS3_9allocatorIcEEEES7_EEEvDpRKT_:
   52|  4.56M|    {
   53|  4.56M|        strAppend(buf, s...);
   54|  4.56M|        writeIfNeeded();
   55|  4.56M|    }
_ZN7stdplus2fd12FormatBuffer7appendsIJNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_17basic_string_viewIcS6_EES9_SB_EEEvDpRKT_:
   52|   695k|    {
   53|   695k|        strAppend(buf, s...);
   54|   695k|        writeIfNeeded();
   55|   695k|    }

_ZN7stdplus2fd2FdD2Ev:
  119|  17.1k|    virtual ~Fd() = default;

_ZN7stdplus2fd10setFdFlagsERNS0_2FdENS_8BitFlagsINS0_6FdFlagEiEE:
  254|  10.2k|{
  255|  10.2k|    return fd.fcntlSetfd(flags);
  256|  10.2k|}
_ZN7stdplus2fd10getFdFlagsERKNS0_2FdE:
  249|  10.2k|{
  250|  10.2k|    return fd.fcntlGetfd();
  251|  10.2k|}
_ZN7stdplus2fd10writeExactIRNS_11BasicStrBufIcLm128ENSt3__19allocatorIcEEEEEEvRNS0_2FdEOT_:
  144|  7.15k|{
  145|  7.15k|    detail::writeExact(fd, raw::asSpan<std::byte>(t));
  146|  7.15k|}
_ZN7stdplus2fd4readIRNSt3__15arrayIcLm4096EEEEEDaRNS0_2FdEOT_:
   53|  89.2k|{
   54|  89.2k|    return detail::alignedOp(detail::readAligned, fd,
   55|  89.2k|                             std::forward<Container>(c));
   56|  89.2k|}
_ZN7stdplus2fd6detail9alignedOpIRFNSt3__14spanISt4byteLm18446744073709551615EEERNS0_2FdEmS6_ERNS3_5arrayIcLm4096EEEJEEEDaOT_S8_OT0_DpOT1_:
   42|  89.2k|{
   43|  89.2k|    using Data = raw::detail::dataType<Container>;
   44|  89.2k|    auto ret = fun(fd, sizeof(Data), raw::asSpan<std::byte>(c),
   45|  89.2k|                   std::forward<Args>(args)...);
   46|  89.2k|    return std::span<Data>(std::begin(c), ret.size() / sizeof(Data));
   47|  89.2k|}

_ZN7stdplus8BitFlagsINS_2fd8OpenFlagEiEC2Ei:
   20|  6.85k|    explicit constexpr BitFlags(underlying val) noexcept : val(val) {}
_ZNK7stdplus8BitFlagsINS_2fd8OpenFlagEiEcviEv:
   45|  6.85k|    {
   46|  6.85k|        return val;
   47|  6.85k|    }
_ZNO7stdplus8BitFlagsINS_2fd6FdFlagEiE3setES2_:
   28|  10.2k|    {
   29|  10.2k|        val |= static_cast<underlying>(flag);
   30|  10.2k|        return std::move(*this);
   31|  10.2k|    }
_ZNK7stdplus8BitFlagsINS_2fd6FdFlagEiEcviEv:
   45|  10.2k|    {
   46|  10.2k|        return val;
   47|  10.2k|    }
_ZN7stdplus8BitFlagsINS_2fd6FdFlagEiEC2Ei:
   20|  10.2k|    explicit constexpr BitFlags(underlying val) noexcept : val(val) {}

_ZN7stdplus8CopyableIiJEE7HandleFINS_7ManagedIiJEE7DropperIXadL_ZNS_2fd6detail4dropEOiEEEENS1_6RefferIXadL_ZNS7_3refERKiEEEEEC2IJEEES8_DpOT_:
   68|  6.85k|            MHandleF(std::move(maybeV), std::forward<Vs>(vs)...)
   69|  6.85k|        {}

_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEED2Ev:
   92|  13.7k|        {
   93|  13.7k|            reset();
   94|  13.7k|        }
_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEE5resetEv:
  176|  13.7k|        {
  177|  13.7k|            reset(std::nullopt);
  178|  13.7k|        }
_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEE5resetEONSt3__18optionalIiEE:
  160|  13.7k|        {
  161|  13.7k|            maybeDrop(std::index_sequence_for<As...>());
  162|  13.7k|            maybeT = std::move(maybeV);
  163|  13.7k|        }
_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEE9maybeDropITpTnmJEEEvNSt3__116integer_sequenceImJXspT_EEEE:
  228|  13.7k|        {
  229|  13.7k|            if (maybeT)
  ------------------
  |  Branch (229:17): [True: 10.2k, False: 3.42k]
  ------------------
  230|  10.2k|            {
  231|  10.2k|                Drop()(std::move(*maybeT), std::get<Indices>(as)...);
  232|  10.2k|            }
  233|  13.7k|        }
_ZN7stdplus7ManagedIiJEE7DropperIXadL_ZNS_2fd6detail4dropEOiEEEclES5_:
  240|  10.2k|        {
  241|  10.2k|            drop(std::move(t), as...);
  242|  10.2k|        }
_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEEC2EOS8_:
   69|  3.42k|            as(std::move(other.as)), maybeT(std::move(other.maybeT))
   70|  3.42k|        {
   71|  3.42k|            other.maybeT = std::nullopt;
   72|  3.42k|        }
_ZN7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEEC2IJEEES6_DpOT_:
   60|  10.2k|            as(std::forward<Vs>(vs)...), maybeT(std::move(maybeV))
   61|  10.2k|        {}
_ZNKR7stdplus7ManagedIiJEE7HandleFINS1_7DropperIXadL_ZNS_2fd6detail4dropEOiEEEEE5valueEv:
  138|   123k|        {
  139|   123k|            return maybeT.value();
  140|   123k|        }

_ZN7stdplus3raw6asSpanITkNS_17TriviallyCopyableESt4byteTkNS0_6detail15ContainsTrivialERNS_11BasicStrBufIcLm128ENSt3__19allocatorIcEEEES2_EENS5_4spanIT1_Lm18446744073709551615EEEOT0_:
  208|  7.15k|{
  209|  7.15k|    static_assert(sizeof(*std::data(c)) % sizeof(IntTp) == 0);
  210|  7.15k|    return {reinterpret_cast<IntTp*>(std::data(c)),
  211|  7.15k|            std::size(c) * sizeof(*std::data(c)) / sizeof(IntTp)};
  212|  7.15k|}
_ZN7stdplus3raw6asSpanITkNS_17TriviallyCopyableESt4byteTkNS0_6detail15ContainsTrivialERNSt3__15arrayIcLm4096EEES2_EENS4_4spanIT1_Lm18446744073709551615EEEOT0_:
  208|  89.2k|{
  209|  89.2k|    static_assert(sizeof(*std::data(c)) % sizeof(IntTp) == 0);
  210|  89.2k|    return {reinterpret_cast<IntTp*>(std::data(c)),
  211|  89.2k|            std::size(c) * sizeof(*std::data(c)) / sizeof(IntTp)};
  212|  89.2k|}

_ZN7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE8allocateEm:
  105|  3.34k|    {
  106|  3.34k|        auto ptr = static_cast<Allocator&>(*this).allocate(n);
  107|  3.34k|        if (std::is_constant_evaluated())
  ------------------
  |  Branch (107:13): [Folded, False: 3.34k]
  ------------------
  108|      0|        {
  109|      0|            for (std::size_t i = 0; i < n; ++i)
  ------------------
  |  Branch (109:37): [True: 0, False: 0]
  ------------------
  110|      0|            {
  111|      0|                std::construct_at(ptr + i);
  112|      0|            }
  113|      0|        }
  114|  3.34k|        return ptr;
  115|  3.34k|    }
_ZN7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE6dynLenEm:
   90|  5.23M|    {
   91|  5.23M|        store.dyn.len = len | dyn_mask;
   92|  5.23M|    }
_ZN7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE6inlLenEh:
  100|  30.8k|    {
  101|  30.8k|        store.inl.len = len;
  102|  30.8k|    }
_ZN7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE8zeroInitEv:
  118|  3.42k|    {
  119|  3.42k|        if (std::is_constant_evaluated())
  ------------------
  |  Branch (119:13): [Folded, False: 3.42k]
  ------------------
  120|      0|        {
  121|      0|            store.dyn.ptr = allocate(buf_len);
  122|      0|            store.dyn.cap = buf_len;
  123|      0|            dynLen(0);
  124|      0|        }
  125|  3.42k|        else
  126|  3.42k|        {
  127|  3.42k|            inlLen(0);
  128|  3.42k|        }
  129|  3.42k|    }
_ZNK7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE5isDynEv:
   76|  10.5M|    {
   77|  10.5M|        if (std::is_constant_evaluated())
  ------------------
  |  Branch (77:13): [Folded, False: 10.5M]
  ------------------
   78|      0|        {
   79|      0|            return true;
   80|      0|        }
   81|  10.5M|        return store.inl.len & inl_mask;
   82|  10.5M|    }
_ZNK7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE6inlLenEv:
   95|  58.8k|    {
   96|  58.8k|        return store.inl.len;
   97|  58.8k|    }
_ZNK7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEE6dynLenEv:
   85|  10.4M|    {
   86|  10.4M|        return store.dyn.len & ~dyn_mask;
   87|  10.4M|    }
_ZN7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEE6appendEm:
  298|  5.26M|    {
  299|  5.26M|        if (!as.isDyn())
  ------------------
  |  Branch (299:13): [True: 26.8k, False: 5.23M]
  ------------------
  300|  26.8k|        {
  301|  26.8k|            const std::size_t oldlen = as.inlLen();
  302|  26.8k|            const std::size_t newlen = oldlen + amt;
  303|  26.8k|            if (newlen <= as.buf_len)
  ------------------
  |  Branch (303:17): [True: 25.7k, False: 1.10k]
  ------------------
  304|  25.7k|            {
  305|  25.7k|                as.inlLen(newlen);
  306|  25.7k|                return as.store.inl.ptr + oldlen;
  307|  25.7k|            }
  308|  1.10k|            const std::size_t newcap = newlen + (newlen >> 1);
  309|  1.10k|            const auto ptr = as.allocate(newcap);
  310|  1.10k|            std::copy(as.store.inl.ptr, as.store.inl.ptr + oldlen, ptr);
  311|       |
  312|  1.10k|            as.store.dyn.ptr = ptr;
  313|  1.10k|            as.store.dyn.cap = newcap;
  314|  1.10k|            as.dynLen(newlen);
  315|  1.10k|            return ptr + oldlen;
  316|  26.8k|        }
  317|  5.23M|        const std::size_t oldlen = as.dynLen();
  318|  5.23M|        const std::size_t newlen = oldlen + amt;
  319|  5.23M|        if (newlen > as.store.dyn.cap)
  ------------------
  |  Branch (319:13): [True: 2.24k, False: 5.23M]
  ------------------
  320|  2.24k|        {
  321|  2.24k|            const std::size_t newcap = newlen + (newlen >> 1);
  322|  2.24k|            const auto ptr = as.allocate(newcap);
  323|  2.24k|            std::copy(as.store.dyn.ptr, as.store.dyn.ptr + oldlen, ptr);
  324|  2.24k|            as.deallocate(as.store.dyn.ptr, as.store.dyn.cap);
  325|       |
  326|  2.24k|            as.store.dyn.ptr = ptr;
  327|  2.24k|            as.store.dyn.cap = newcap;
  328|  2.24k|        }
  329|  5.23M|        as.dynLen(newlen);
  330|  5.23M|        return as.store.dyn.ptr + oldlen;
  331|  5.26M|    }
_ZNK7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEE4sizeEv:
  288|  5.27M|    {
  289|  5.27M|        return as.isDyn() ? as.dynLen() : as.inlLen();
  ------------------
  |  Branch (289:16): [True: 5.24M, False: 32.0k]
  ------------------
  290|  5.27M|    }
_ZN7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEEC2Ev:
  235|  3.42k|    constexpr BasicStrBuf() noexcept : as({}) {}
_ZN7stdplus6detail8StrBufASIcLm128ENSt3__19allocatorIcEEEC2EOS4_:
  131|  3.42k|    constexpr StrBufAS(Allocator&& a) noexcept : Allocator(std::move(a))
  132|  3.42k|    {
  133|  3.42k|        if (std::is_constant_evaluated())
  ------------------
  |  Branch (133:13): [Folded, False: 3.42k]
  ------------------
  134|      0|        {
  135|      0|            std::construct_at(&store.dyn);
  136|      0|        }
  137|  3.42k|        zeroInit();
  138|  3.42k|    }
_ZN7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEE4dataEv:
  368|  7.15k|    {
  369|  7.15k|        return as.isDyn() ? as.store.dyn.ptr : as.store.inl.ptr;
  ------------------
  |  Branch (369:16): [True: 5.48k, False: 1.67k]
  ------------------
  370|  7.15k|    }
_ZN7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEED2Ev:
  280|  3.42k|    {
  281|  3.42k|        if (as.isDyn())
  ------------------
  |  Branch (281:13): [True: 1.10k, False: 2.32k]
  ------------------
  282|  1.10k|        {
  283|  1.10k|            as.deallocate(as.store.dyn.ptr, as.store.dyn.cap);
  284|  1.10k|        }
  285|  3.42k|    }
_ZN7stdplus11BasicStrBufIcLm128ENSt3__19allocatorIcEEE5clearEv:
  356|  7.15k|    {
  357|  7.15k|        if (as.isDyn())
  ------------------
  |  Branch (357:13): [True: 5.48k, False: 1.67k]
  ------------------
  358|  5.48k|        {
  359|  5.48k|            as.dynLen(0);
  360|  5.48k|        }
  361|  1.67k|        else
  362|  1.67k|        {
  363|  1.67k|            as.inlLen(0);
  364|  1.67k|        }
  365|  7.15k|    }

_ZN7stdplus6detail9strAppendIcLm128ENSt3__19allocatorIcEEJcccEEEvRNS_11BasicStrBufIT_XT0_ET1_EEDpNS2_17basic_string_viewIT2_NS2_11char_traitsISB_EEEE:
   27|  4.56M|{
   28|  4.56M|    [[maybe_unused]] auto out = dst.append((strs.size() + ... + 0));
   29|  4.56M|    ((out = std::copy(strs.begin(), strs.end(), out)), ...);
   30|  4.56M|}
_ZN7stdplus6detail5DedSVIcEC2ENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   41|  10.5M|        std::basic_string_view<CharT>(sv)
   42|  10.5M|    {}
_ZN7stdplus6detail9strAppendIcNSt3__111char_traitsIcEENS2_9allocatorIcEEJccEEEvRNS2_12basic_stringIT_T0_T1_EEDpNS2_17basic_string_viewIT2_NS3_ISE_EEEE:
   19|  12.2k|{
   20|  12.2k|    dst.reserve((dst.size() + ... + strs.size()));
   21|  12.2k|    (dst.append(strs), ...);
   22|  12.2k|}
_ZN7stdplus6detail5DedSVIcEC2INSt3__111char_traitsIcEENS4_9allocatorIcEEEERKNS4_12basic_stringIcT_T0_EE:
   38|  5.95M|        std::basic_string_view<CharT>(s)
   39|  5.95M|    {}
_ZN7stdplus4util6strCatIcNSt3__111char_traitsIcEENS2_9allocatorIcEEJNS2_17basic_string_viewIcS4_EES8_S8_EEEDaDpRKT2_:
   74|  3.42k|{
   75|  3.42k|    std::basic_string<CharT, Traits, Alloc> ret;
   76|  3.42k|    strAppend(ret, strs...);
   77|  3.42k|    return ret;
   78|  3.42k|}
_ZN7stdplus4util9strAppendINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJNS2_17basic_string_viewIcS5_EESA_SA_EEEvRT_DpRKT0_:
   60|  3.42k|{
   61|  3.42k|    detail::strAppend(dst, detail::DedSV(strs)...);
   62|  3.42k|}
_ZN7stdplus6detail9strAppendIcNSt3__111char_traitsIcEENS2_9allocatorIcEEJcccEEEvRNS2_12basic_stringIT_T0_T1_EEDpNS2_17basic_string_viewIT2_NS3_ISE_EEEE:
   19|  3.42k|{
   20|  3.42k|    dst.reserve((dst.size() + ... + strs.size()));
   21|  3.42k|    (dst.append(strs), ...);
   22|  3.42k|}
_ZN7stdplus4util6strCatIcNSt3__111char_traitsIcEENS2_9allocatorIcEEJNS2_17basic_string_viewIcS4_EES8_EEEDaDpRKT2_:
   74|  12.2k|{
   75|  12.2k|    std::basic_string<CharT, Traits, Alloc> ret;
   76|  12.2k|    strAppend(ret, strs...);
   77|  12.2k|    return ret;
   78|  12.2k|}
_ZN7stdplus4util9strAppendINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEJNS2_17basic_string_viewIcS5_EESA_EEEvRT_DpRKT0_:
   60|  12.2k|{
   61|  12.2k|    detail::strAppend(dst, detail::DedSV(strs)...);
   62|  12.2k|}
_ZN7stdplus4util9strAppendINS_11BasicStrBufIcLm128ENSt3__19allocatorIcEEEEJNS3_17basic_string_viewIcNS3_11char_traitsIcEEEENS3_12basic_stringIcS9_S5_EESA_EEEvRT_DpRKT0_:
   60|  4.56M|{
   61|  4.56M|    detail::strAppend(dst, detail::DedSV(strs)...);
   62|  4.56M|}
_ZN7stdplus4util9strAppendINS_11BasicStrBufIcLm128ENSt3__19allocatorIcEEEEJNS3_12basic_stringIcNS3_11char_traitsIcEES5_EENS3_17basic_string_viewIcS9_EESA_SC_EEEvRT_DpRKT0_:
   60|   695k|{
   61|   695k|    detail::strAppend(dst, detail::DedSV(strs)...);
   62|   695k|}
_ZN7stdplus6detail9strAppendIcLm128ENSt3__19allocatorIcEEJccccEEEvRNS_11BasicStrBufIT_XT0_ET1_EEDpNS2_17basic_string_viewIT2_NS2_11char_traitsISB_EEEE:
   27|   695k|{
   28|   695k|    [[maybe_unused]] auto out = dst.append((strs.size() + ... + 0));
   29|   695k|    ((out = std::copy(strs.begin(), strs.end(), out)), ...);
   30|   695k|}

_ZN7stdplus13basic_zstringIKcNSt3__111char_traitsIcEEEC2IPS1_TnNS2_9enable_ifIXsr3stdE12is_pointer_vIT_EEbE4typeELb1EEES9_:
   98|  6.85k|    constexpr basic_zstring(T str) noexcept : data_(str)
   99|  6.85k|    {}
_ZNK7stdplus13basic_zstringIKcNSt3__111char_traitsIcEEE5c_strEv:
  133|  6.85k|    {
  134|  6.85k|        return data_;
  135|  6.85k|    }

_ZN7stdplus9exception3EofC2EPKc:
   45|  13.7k|    std::system_error(std::make_error_code(std::errc::no_message_available),
   46|  13.7k|                      what)
   47|  13.7k|{}

_ZN7stdplus2fd12AtomicWriterC2ERKNSt3__14__fs10filesystem4pathEiNS2_17basic_string_viewIcNS2_11char_traitsIcEEEE:
   40|  3.42k|    filename(filename), mode(mode),
   41|  3.42k|    tmpname(!tmpl.empty() ? std::string(tmpl) : makeTmpName(filename)),
  ------------------
  |  Branch (41:13): [True: 0, False: 3.42k]
  ------------------
   42|  3.42k|    fd(mktemp(tmpname))
   43|  3.42k|{}
_ZN7stdplus2fd12AtomicWriterD2Ev:
   69|  3.42k|{
   70|  3.42k|    cleanup();
   71|  3.42k|}
_ZN7stdplus2fd12AtomicWriter6commitEb:
   74|  3.42k|{
   75|  3.42k|    try
   76|  3.42k|    {
   77|  3.42k|        CHECK_ERRNO(fsync(get()), "fsync");
  ------------------
  |  |   40|  3.42k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  3.42k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  3.42k|        {                                                                      \
  |  |   43|  3.42k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  3.42k|        }                                                                      \
  |  |   46|  3.42k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  3.42k|        {                                                                      \
  |  |   48|  3.42k|            if (check_errno_ret < 0)                                           \
  |  |   49|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  3.42k|        }                                                                      \
  |  |   51|  3.42k|        else                                                                   \
  |  |   52|  3.42k|        {                                                                      \
  |  |   53|  3.42k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  3.42k|                          "Unimplemented check routine");                      \
  |  |   55|  3.42k|        }                                                                      \
  |  |   56|  3.42k|        return check_errno_ret;                                                \
  |  |   57|  3.42k|    }((expr))
  ------------------
   78|  3.42k|        CHECK_ERRNO(fchmod(get(), mode), "fchmod");
  ------------------
  |  |   40|  3.42k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  3.42k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  3.42k|        {                                                                      \
  |  |   43|  3.42k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  3.42k|        }                                                                      \
  |  |   46|  3.42k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  3.42k|        {                                                                      \
  |  |   48|  3.42k|            if (check_errno_ret < 0)                                           \
  |  |   49|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  3.42k|        }                                                                      \
  |  |   51|  3.42k|        else                                                                   \
  |  |   52|  3.42k|        {                                                                      \
  |  |   53|  3.42k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  3.42k|                          "Unimplemented check routine");                      \
  |  |   55|  3.42k|        }                                                                      \
  |  |   56|  3.42k|        return check_errno_ret;                                                \
  |  |   57|  3.42k|    }((expr))
  ------------------
   79|       |        // We want the file to be closed before renaming it
   80|  3.42k|        {
   81|  3.42k|            auto ifd = std::move(fd);
   82|  3.42k|        }
   83|  3.42k|        try
   84|  3.42k|        {
   85|  3.42k|            std::filesystem::rename(tmpname, filename);
   86|  3.42k|            tmpname.clear();
   87|  3.42k|        }
   88|  3.42k|        catch (const std::filesystem::filesystem_error& e)
   89|  3.42k|        {
   90|      0|            if (!allow_copy || e.code() != std::errc::cross_device_link)
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  |  Branch (90:17): [True: 0, False: 0]
  |  Branch (90:32): [True: 0, False: 0]
  ------------------
   91|      0|            {
   92|      0|                throw;
   93|      0|            }
   94|      0|            std::filesystem::copy(tmpname, filename);
   95|      0|        }
   96|  3.42k|    }
   97|  3.42k|    catch (...)
   98|  3.42k|    {
   99|       |        // We do this to ensure that any crashes that might happen before the
  100|       |        // destructor don't cause us to leave stale files.
  101|      0|        cleanup();
  102|      0|        throw;
  103|      0|    }
  104|  3.42k|}
_ZNK7stdplus2fd12AtomicWriter3getEv:
  107|  14.0k|{
  108|  14.0k|    return fd.get();
  109|  14.0k|}
_ZN7stdplus2fd12AtomicWriter7cleanupEv:
  112|  3.42k|{
  113|  3.42k|    if (!tmpname.empty())
  ------------------
  |  Branch (113:9): [True: 0, False: 3.42k]
  ------------------
  114|      0|    {
  115|       |        // Ensure the FD is closed prior to removing the file
  116|      0|        {
  117|      0|            auto ifd = std::move(fd);
  118|      0|        }
  119|      0|        std::error_code ec;
  120|      0|        std::filesystem::remove(tmpname, ec);
  121|      0|        tmpname.clear();
  122|      0|    }
  123|  3.42k|}
atomic.cpp:_ZN7stdplus2fdL11makeTmpNameERKNSt3__14__fs10filesystem4pathE:
   20|  3.42k|{
   21|  3.42k|    auto name = filename.filename();
   22|  3.42k|    auto path = filename.parent_path() /
   23|  3.42k|                std::format(".{}.XXXXXX", name.native());
   24|  3.42k|    return path.native();
   25|  3.42k|}
atomic.cpp:_ZN7stdplus2fdL6mktempERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   28|  3.42k|{
   29|  3.42k|    mode_t old = umask(0077);
   30|  3.42k|    int fd = mkstemp(tmpl.data());
   31|  3.42k|    umask(old);
   32|  3.42k|    return CHECK_ERRNO(fd, [&](int error) {
  ------------------
  |  |   40|  3.42k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  3.42k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  3.42k|        {                                                                      \
  |  |   43|  3.42k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  3.42k|        }                                                                      \
  |  |   46|  3.42k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  3.42k|        {                                                                      \
  |  |   48|  3.42k|            if (check_errno_ret < 0)                                           \
  |  |   49|  3.42k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  3.42k|        }                                                                      \
  |  |   51|  3.42k|        else                                                                   \
  |  |   52|  3.42k|        {                                                                      \
  |  |   53|  3.42k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  3.42k|                          "Unimplemented check routine");                      \
  |  |   55|  3.42k|        }                                                                      \
  |  |   56|  3.42k|        return check_errno_ret;                                                \
  |  |   57|  3.42k|    }((expr))
  ------------------
   33|  3.42k|        throw std::system_error(error, std::generic_category(),
   34|  3.42k|                                std::format("mkstemp({})", tmpl));
   35|  3.42k|    });
   36|  3.42k|}

_ZN7stdplus2fd4openENS_13basic_zstringIKcNSt3__111char_traitsIcEEEENS0_9OpenFlagsEj:
   15|  6.85k|{
   16|  6.85k|    return DupableFd(
   17|  6.85k|        CHECK_ERRNO(::open(pathname.c_str(), static_cast<int>(flags), mode),
  ------------------
  |  |   40|  6.85k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  6.85k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  6.85k|        {                                                                      \
  |  |   43|  6.85k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  6.85k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  6.85k|        }                                                                      \
  |  |   46|  6.85k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  6.85k|        {                                                                      \
  |  |   48|  6.85k|            if (check_errno_ret < 0)                                           \
  |  |   49|  6.85k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  6.85k|        }                                                                      \
  |  |   51|  6.85k|        else                                                                   \
  |  |   52|  6.85k|        {                                                                      \
  |  |   53|  6.85k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  6.85k|                          "Unimplemented check routine");                      \
  |  |   55|  6.85k|        }                                                                      \
  |  |   56|  6.85k|        return check_errno_ret;                                                \
  |  |   57|  6.85k|    }((expr))
  ------------------
   18|  6.85k|                    std::format("open `{}`", pathname.c_str())));
   19|  6.85k|}

_ZN7stdplus2fd9DupableFdC2EOi:
   27|  6.85k|DupableFd::DupableFd(int&& fd) : handle(std::move(fd))
   28|  6.85k|{
   29|  6.85k|    fd::setFdFlags(*this, fd::getFdFlags(*this).set(fd::FdFlag::CloseOnExec));
   30|  6.85k|}
_ZNK7stdplus2fd9DupableFd3getEv:
   38|   102k|{
   39|   102k|    return handle.value();
   40|   102k|}

_ZN7stdplus2fd12FormatBufferC2ERNS0_2FdEm:
    9|  3.42k|FormatBuffer::FormatBuffer(Fd& fd, size_t max) : fd(fd), max(max) {}
_ZN7stdplus2fd12FormatBufferD2Ev:
   12|  3.42k|{
   13|  3.42k|    flush();
   14|  3.42k|}
_ZN7stdplus2fd12FormatBuffer5flushEv:
   17|  11.6k|{
   18|  11.6k|    if (buf.size() > 0)
  ------------------
  |  Branch (18:9): [True: 7.15k, False: 4.45k]
  ------------------
   19|  7.15k|    {
   20|  7.15k|        writeExact(fd, buf);
   21|  7.15k|        buf.clear();
   22|  7.15k|    }
   23|  11.6k|}
_ZN7stdplus2fd12FormatBuffer13writeIfNeededEv:
   26|  5.26M|{
   27|  5.26M|    if (buf.size() >= max)
  ------------------
  |  Branch (27:9): [True: 4.76k, False: 5.25M]
  ------------------
   28|  4.76k|    {
   29|  4.76k|        flush();
   30|  4.76k|    }
   31|  5.26M|}

_ZNK7stdplus2fd6FdImpl4readENSt3__14spanISt4byteLm18446744073709551615EEE:
   39|  89.2k|{
   40|  89.2k|    return fret(buf, "read", ::read(get(), buf.data(), buf.size()));
   41|  89.2k|}
_ZNK7stdplus2fd6FdImpl5writeENSt3__14spanIKSt4byteLm18446744073709551615EEE:
   64|  7.15k|{
   65|  7.15k|    return fret(data, "write", ::write(get(), data.data(), data.size()));
   66|  7.15k|}
_ZNK7stdplus2fd6FdImpl10fcntlSetfdENS_8BitFlagsINS0_6FdFlagEiEE:
  172|  10.2k|{
  173|  10.2k|    CHECK_ERRNO(::fcntl(get(), F_SETFD, static_cast<int>(flags)),
  ------------------
  |  |   40|  10.2k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  10.2k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  10.2k|        {                                                                      \
  |  |   43|  10.2k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  10.2k|        }                                                                      \
  |  |   46|  10.2k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  10.2k|        {                                                                      \
  |  |   48|  10.2k|            if (check_errno_ret < 0)                                           \
  |  |   49|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  10.2k|        }                                                                      \
  |  |   51|  10.2k|        else                                                                   \
  |  |   52|  10.2k|        {                                                                      \
  |  |   53|  10.2k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  10.2k|                          "Unimplemented check routine");                      \
  |  |   55|  10.2k|        }                                                                      \
  |  |   56|  10.2k|        return check_errno_ret;                                                \
  |  |   57|  10.2k|    }((expr))
  ------------------
  174|  10.2k|                "fcntl setfd");
  175|  10.2k|}
_ZNK7stdplus2fd6FdImpl10fcntlGetfdEv:
  178|  10.2k|{
  179|  10.2k|    return FdFlags(CHECK_ERRNO(::fcntl(get(), F_GETFD), "fcntl getfd"));
  ------------------
  |  |   40|  10.2k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  10.2k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  10.2k|        {                                                                      \
  |  |   43|  10.2k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  10.2k|        }                                                                      \
  |  |   46|  10.2k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  10.2k|        {                                                                      \
  |  |   48|  10.2k|            if (check_errno_ret < 0)                                           \
  |  |   49|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  10.2k|        }                                                                      \
  |  |   51|  10.2k|        else                                                                   \
  |  |   52|  10.2k|        {                                                                      \
  |  |   53|  10.2k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  10.2k|                          "Unimplemented check routine");                      \
  |  |   55|  10.2k|        }                                                                      \
  |  |   56|  10.2k|        return check_errno_ret;                                                \
  |  |   57|  10.2k|    }((expr))
  ------------------
  180|  10.2k|}
impl.cpp:_ZN7stdplus2fdL4fretISt4byteEENSt3__14spanIT_Lm18446744073709551615EEES6_PKcl:
   22|  89.2k|{
   23|  89.2k|    if (r == -1)
  ------------------
  |  Branch (23:9): [True: 0, False: 89.2k]
  ------------------
   24|      0|    {
   25|      0|        if (errno == EAGAIN || errno == EWOULDBLOCK)
  ------------------
  |  Branch (25:13): [True: 0, False: 0]
  |  Branch (25:32): [True: 0, False: 0]
  ------------------
   26|      0|        {
   27|      0|            return {};
   28|      0|        }
   29|      0|        throw util::makeSystemError(errno, name);
   30|      0|    }
   31|  89.2k|    else if (r == 0 && buf.size() > 0)
  ------------------
  |  Branch (31:14): [True: 6.85k, False: 82.4k]
  |  Branch (31:24): [True: 6.85k, False: 0]
  ------------------
   32|  6.85k|    {
   33|  6.85k|        throw exception::Eof(name);
   34|  6.85k|    }
   35|  82.4k|    return buf.subspan(0, r);
   36|  89.2k|}
impl.cpp:_ZN7stdplus2fdL4fretIKSt4byteEENSt3__14spanIT_Lm18446744073709551615EEES7_PKcl:
   22|  7.15k|{
   23|  7.15k|    if (r == -1)
  ------------------
  |  Branch (23:9): [True: 0, False: 7.15k]
  ------------------
   24|      0|    {
   25|      0|        if (errno == EAGAIN || errno == EWOULDBLOCK)
  ------------------
  |  Branch (25:13): [True: 0, False: 0]
  |  Branch (25:32): [True: 0, False: 0]
  ------------------
   26|      0|        {
   27|      0|            return {};
   28|      0|        }
   29|      0|        throw util::makeSystemError(errno, name);
   30|      0|    }
   31|  7.15k|    else if (r == 0 && buf.size() > 0)
  ------------------
  |  Branch (31:14): [True: 0, False: 7.15k]
  |  Branch (31:24): [True: 0, False: 0]
  ------------------
   32|      0|    {
   33|      0|        throw exception::Eof(name);
   34|      0|    }
   35|  7.15k|    return buf.subspan(0, r);
   36|  7.15k|}

_ZN7stdplus2fd10LineReaderC2ERNS0_2FdE:
   12|  6.85k|LineReader::LineReader(Fd& fd) : fd(fd) {}
_ZN7stdplus2fd10LineReader8readLineEv:
   15|  62.2M|{
   16|  62.2M|    if (hit_eof)
  ------------------
  |  Branch (16:9): [True: 6.85k, False: 62.2M]
  ------------------
   17|  6.85k|    {
   18|  6.85k|        throw exception::Eof("readLine");
   19|  6.85k|    }
   20|  62.2M|    if (line_complete)
  ------------------
  |  Branch (20:9): [True: 62.1M, False: 6.85k]
  ------------------
   21|  62.1M|    {
   22|  62.1M|        line.clear();
   23|  62.1M|    }
   24|  62.2M|    while (true)
  ------------------
  |  Branch (24:12): [True: 62.2M, Folded]
  ------------------
   25|  62.2M|    {
   26|  62.2M|        if (buf_data.empty())
  ------------------
  |  Branch (26:13): [True: 89.2k, False: 62.1M]
  ------------------
   27|  89.2k|        {
   28|  89.2k|            try
   29|  89.2k|            {
   30|  89.2k|                buf_data = read(fd, buf);
   31|  89.2k|                if (buf_data.empty())
  ------------------
  |  Branch (31:21): [True: 0, False: 89.2k]
  ------------------
   32|      0|                {
   33|      0|                    return nullptr;
   34|      0|                }
   35|  89.2k|            }
   36|  89.2k|            catch (const exception::Eof&)
   37|  89.2k|            {
   38|  6.85k|                hit_eof = true;
   39|  6.85k|                return &line;
   40|  6.85k|            }
   41|  89.2k|        }
   42|  62.2M|        line_complete = false;
   43|   316M|        for (size_t i = 0; i < buf_data.size(); ++i)
  ------------------
  |  Branch (43:28): [True: 316M, False: 64.4k]
  ------------------
   44|   316M|        {
   45|   316M|            if (buf_data[i] == '\n')
  ------------------
  |  Branch (45:17): [True: 62.1M, False: 254M]
  ------------------
   46|  62.1M|            {
   47|  62.1M|                auto oldsize = line.size();
   48|  62.1M|                line.resize(oldsize + i);
   49|  62.1M|                std::memcpy(line.data() + oldsize, buf_data.data(), i);
   50|  62.1M|                buf_data = buf_data.subspan(i + 1);
   51|  62.1M|                line_complete = true;
   52|  62.1M|                return &line;
   53|  62.1M|            }
   54|   316M|        }
   55|  64.4k|        auto oldsize = line.size();
   56|  64.4k|        line.resize(oldsize + buf_data.size());
   57|  64.4k|        std::memcpy(line.data() + oldsize, buf_data.data(), buf_data.size());
   58|  64.4k|        buf_data = {};
   59|  64.4k|    }
   60|  62.2M|}

_ZN7stdplus2fd6detail4dropEOi:
   18|  10.2k|{
   19|  10.2k|    CHECK_ERRNO(close(fd), "close");
  ------------------
  |  |   40|  10.2k|    [&](auto check_errno_ret) {                                                \
  |  |   41|  10.2k|        if constexpr (::std::is_pointer_v<decltype(check_errno_ret)>)          \
  |  |   42|  10.2k|        {                                                                      \
  |  |   43|  10.2k|            if (check_errno_ret == nullptr)                                    \
  |  |   44|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   45|  10.2k|        }                                                                      \
  |  |   46|  10.2k|        else if constexpr (::std::is_signed_v<decltype(check_errno_ret)>)      \
  |  |   47|  10.2k|        {                                                                      \
  |  |   48|  10.2k|            if (check_errno_ret < 0)                                           \
  |  |   49|  10.2k|                ::stdplus::util::doError(errno, (error_handler));              \
  |  |   50|  10.2k|        }                                                                      \
  |  |   51|  10.2k|        else                                                                   \
  |  |   52|  10.2k|        {                                                                      \
  |  |   53|  10.2k|            static_assert(::std::is_same_v<decltype(check_errno_ret), int>,    \
  |  |   54|  10.2k|                          "Unimplemented check routine");                      \
  |  |   55|  10.2k|        }                                                                      \
  |  |   56|  10.2k|        return check_errno_ret;                                                \
  |  |   57|  10.2k|    }((expr))
  ------------------
   20|  10.2k|}
_ZN7stdplus2fd9ManagedFdC2EOi:
   26|  3.42k|ManagedFd::ManagedFd(int&& fd) : handle(std::move(fd))
   27|  3.42k|{
   28|  3.42k|    fd::setFdFlags(*this, fd::getFdFlags(*this).set(fd::FdFlag::CloseOnExec));
   29|  3.42k|}
_ZNK7stdplus2fd9ManagedFd3getEv:
   54|  20.8k|{
   55|  20.8k|    return handle.value();
   56|  20.8k|}

_ZN7stdplus2fd6detail10writeExactERNS0_2FdENSt3__14spanIKSt4byteLm18446744073709551615EEE:
   55|  7.15k|{
   56|  7.15k|    opExact("writeExact", &Fd::write, fd, data);
   57|  7.15k|}
_ZN7stdplus2fd6detail11readAlignedERNS0_2FdEmNSt3__14spanISt4byteLm18446744073709551615EEE:
  111|  89.2k|{
  112|  89.2k|    return opAligned("readAligned", &Fd::read, fd, align, buf);
  113|  89.2k|}
ops.cpp:_ZN7stdplus2fd6detailL7opExactIMNS0_2FdEKFNSt3__14spanIKSt4byteLm18446744073709551615EEES8_ES7_JEEEvPKcOT_RS3_NS5_IT0_Lm18446744073709551615EEEDpOT1_:
   17|  7.15k|{
   18|  7.15k|    std::size_t total = 0;
   19|  7.15k|    try
   20|  7.15k|    {
   21|  14.3k|        while (total < data.size())
  ------------------
  |  Branch (21:16): [True: 7.15k, False: 7.15k]
  ------------------
   22|  7.15k|        {
   23|  7.15k|            auto r =
   24|  7.15k|                (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
   25|  7.15k|            if (r.size() == 0)
  ------------------
  |  Branch (25:17): [True: 0, False: 7.15k]
  ------------------
   26|      0|            {
   27|      0|                throw exception::WouldBlock(
   28|      0|                    std::format("{} missing", name, data.size()));
   29|      0|            }
   30|  7.15k|            total += r.size();
   31|  7.15k|        }
   32|  7.15k|    }
   33|  7.15k|    catch (const std::system_error&)
   34|  7.15k|    {
   35|      0|        if (total != 0)
  ------------------
  |  Branch (35:13): [True: 0, False: 0]
  ------------------
   36|      0|        {
   37|      0|            throw exception::Incomplete(
   38|      0|                std::format("{} is {}B/{}B", name, total, data.size()));
   39|      0|        }
   40|      0|        throw;
   41|      0|    }
   42|  7.15k|}
ops.cpp:_ZN7stdplus2fd6detailL9opAlignedIMNS0_2FdEKFNSt3__14spanISt4byteLm18446744073709551615EEES7_ES6_JEEENS5_IT0_Lm18446744073709551615EEEPKcOT_RS3_mSB_DpOT1_:
   82|  89.2k|{
   83|  89.2k|    std::size_t total = 0;
   84|  89.2k|    try
   85|  89.2k|    {
   86|  89.2k|        do
   87|  89.2k|        {
   88|  89.2k|            auto r =
   89|  89.2k|                (fd.*fun)(data.subspan(total), std::forward<Args>(args)...);
   90|  89.2k|            if (total != 0 && r.size() == 0)
  ------------------
  |  Branch (90:17): [True: 0, False: 89.2k]
  |  Branch (90:31): [True: 0, False: 0]
  ------------------
   91|      0|            {
   92|      0|                throw exception::Incomplete(
   93|      0|                    std::format("{} is {}B/{}B", name, total % align, align));
   94|      0|            }
   95|  89.2k|            total += r.size();
   96|  89.2k|        } while (total % align != 0);
  ------------------
  |  Branch (96:18): [True: 0, False: 89.2k]
  ------------------
   97|  89.2k|    }
   98|  89.2k|    catch (const std::system_error&)
   99|  89.2k|    {
  100|  6.85k|        if (total % align)
  ------------------
  |  Branch (100:13): [True: 0, False: 6.85k]
  ------------------
  101|      0|        {
  102|      0|            throw exception::Incomplete(
  103|      0|                std::format("{} is {}B/{}B", name, total % align, align));
  104|      0|        }
  105|  6.85k|        throw;
  106|  6.85k|    }
  107|  82.4k|    return std::span<Byte>(data.data(), total);
  108|  89.2k|}

