LLVMFuzzerTestOneInput:
   17|  9.45k|{
   18|       |   // use a vector with null termination instead of a std::string to avoid
   19|       |   // small string optimization to hide bounds problems
   20|  9.45k|   std::vector<char> buffer{Data, Data + Size};
   21|       |
   22|       |   // non-null terminated
   23|  9.45k|   {
   24|  9.45k|      const auto& input = buffer;
   25|  9.45k|      [[maybe_unused]] auto s = glz::read_cbor<my_struct>(input);
   26|       |
   27|  9.45k|      std::string json_output{};
   28|  9.45k|      [[maybe_unused]] auto ec = glz::cbor_to_json(input, json_output);
   29|  9.45k|   }
   30|       |
   31|       |   // null terminated
   32|  9.45k|   {
   33|  9.45k|      buffer.push_back('\0');
   34|  9.45k|      const auto& input = buffer;
   35|  9.45k|      [[maybe_unused]] auto s = glz::read_cbor<my_struct>(input);
   36|  9.45k|   }
   37|       |
   38|  9.45k|   return 0;
   39|  9.45k|}

_ZN3glz12cbor_to_jsonITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__16vectorIcNS2_9allocatorIcEEEENS2_12basic_stringIcNS2_11char_traitsIcEES5_EEEENS_9error_ctxERKT0_RT1_:
  769|  9.45k|   {
  770|  9.45k|      size_t ix{}; // write index
  771|       |
  772|  9.45k|      auto* it = cbor.data();
  773|  9.45k|      auto* end = it + cbor.size();
  774|       |
  775|  9.45k|      context ctx{};
  776|       |
  777|  9.45k|      if (it >= end) {
  ------------------
  |  Branch (777:11): [True: 0, False: 9.45k]
  ------------------
  778|      0|         return {0, error_code::unexpected_end};
  779|      0|      }
  780|       |
  781|  9.45k|      detail::cbor_to_json_value<Opts>(ctx, it, end, out, ix, 0);
  782|  9.45k|      if (bool(ctx.error)) {
  ------------------
  |  Branch (782:11): [True: 5.85k, False: 3.59k]
  ------------------
  783|  5.85k|         return {ix, ctx.error};
  784|  5.85k|      }
  785|       |
  786|  3.59k|      if (it < end) {
  ------------------
  |  Branch (786:11): [True: 137, False: 3.46k]
  ------------------
  787|    137|         return {ix, error_code::syntax_error};
  788|    137|      }
  789|       |
  790|  3.46k|      if constexpr (resizable<JSONBuffer>) {
  791|  3.46k|         out.resize(ix);
  792|  3.46k|      }
  793|       |
  794|       |      // count is the number of bytes written. A resizable buffer carries its own size, but a
  795|       |      // fixed-size one has no other way to learn how much of it now holds JSON.
  796|  3.46k|      return {ix};
  797|  3.59k|   }
_ZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
  106|  33.7M|      {
  107|  33.7M|         using namespace cbor;
  108|       |
  109|  33.7M|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (109:14): [True: 1.28k, False: 33.7M]
  ------------------
  110|  1.28k|            ctx.error = error_code::unexpected_end;
  111|  1.28k|            return;
  112|  1.28k|         }
  113|       |
  114|  33.7M|         uint8_t initial;
  115|  33.7M|         std::memcpy(&initial, it, 1);
  116|  33.7M|         ++it;
  117|       |
  118|  33.7M|         const uint8_t major_type = get_major_type(initial);
  119|  33.7M|         const uint8_t additional_info = get_additional_info(initial);
  120|       |
  121|       |         // `recursive_depth` is the number of levels enclosing this value. Arrays, maps, and the tags
  122|       |         // that wrap a value open another; scalars do not, so as in the readers a scalar may sit
  123|       |         // inside the deepest container the limit allows.
  124|  33.7M|         const bool opens_level = major_type == major::array || major_type == major::map || major_type == major::tag;
  ------------------
  |  Branch (124:35): [True: 486k, False: 33.2M]
  |  Branch (124:65): [True: 67.3k, False: 33.2M]
  |  Branch (124:93): [True: 195k, False: 33.0M]
  ------------------
  125|  33.7M|         if (opens_level && recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (125:14): [True: 749k, False: 33.0M]
  |  Branch (125:29): [True: 10, False: 749k]
  ------------------
  126|     10|            ctx.error = error_code::exceeded_max_recursive_depth;
  127|     10|            return;
  128|     10|         }
  129|       |
  130|  33.7M|         switch (major_type) {
  131|  7.87M|         case major::uint: {
  ------------------
  |  Branch (131:10): [True: 7.87M, False: 25.8M]
  ------------------
  132|       |            // Unsigned integer
  133|  7.87M|            const uint64_t value = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  134|  7.87M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (134:17): [True: 116, False: 7.87M]
  ------------------
  135|    116|               return;
  136|  7.87M|            to<JSON, uint64_t>::template op<Opts>(value, ctx, out, ix);
  137|  7.87M|            break;
  138|  7.87M|         }
  139|       |
  140|  1.69M|         case major::nint: {
  ------------------
  |  Branch (140:10): [True: 1.69M, False: 32.0M]
  ------------------
  141|       |            // Negative integer: -1 - n
  142|  1.69M|            const uint64_t n = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  143|  1.69M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (143:17): [True: 122, False: 1.69M]
  ------------------
  144|    122|               return;
  145|  1.69M|            cbor_to_json_negative_integer<Opts>(ctx, n, out, ix);
  146|  1.69M|            break;
  147|  1.69M|         }
  148|       |
  149|  1.75M|         case major::bstr: {
  ------------------
  |  Branch (149:10): [True: 1.75M, False: 32.0M]
  ------------------
  150|       |            // Byte string - written as a JSON string of hex digit pairs (see emit_hex_bytes)
  151|  1.75M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (151:17): [True: 0, False: 1.75M]
  ------------------
  152|       |
  153|  1.75M|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (153:17): [True: 611, False: 1.75M]
  ------------------
  154|       |               // Indefinite-length byte string - each chunk is hex encoded as it is read, so a long
  155|       |               // byte string never has to be assembled in memory first
  156|  7.39k|               while (true) {
  ------------------
  |  Branch (156:23): [True: 7.39k, Folded]
  ------------------
  157|  7.39k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (157:23): [True: 86, False: 7.30k]
  ------------------
  158|     86|                     ctx.error = error_code::unexpected_end;
  159|     86|                     return;
  160|     86|                  }
  161|  7.30k|                  uint8_t chunk_initial;
  162|  7.30k|                  std::memcpy(&chunk_initial, it, 1);
  163|       |
  164|  7.30k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (164:23): [True: 351, False: 6.95k]
  ------------------
  165|    351|                     ++it;
  166|    351|                     break;
  167|    351|                  }
  168|       |
  169|  6.95k|                  ++it;
  170|  6.95k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  171|  6.95k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  172|       |
  173|  6.95k|                  if (chunk_major != major::bstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (173:23): [True: 27, False: 6.92k]
  |  Branch (173:53): [True: 2, False: 6.92k]
  ------------------
  174|     29|                     ctx.error = error_code::syntax_error;
  175|     29|                     return;
  176|     29|                  }
  177|       |
  178|  6.92k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  179|  6.92k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (179:23): [True: 13, False: 6.91k]
  ------------------
  180|     13|                     return;
  181|       |
  182|  6.91k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (182:23): [True: 132, False: 6.78k]
  ------------------
  183|    132|                     ctx.error = error_code::unexpected_end;
  184|    132|                     return;
  185|    132|                  }
  186|       |
  187|  6.78k|                  if (!emit_hex_bytes(ctx, it, chunk_len, out, ix)) return;
  ------------------
  |  Branch (187:23): [True: 0, False: 6.78k]
  ------------------
  188|  6.78k|                  it += chunk_len;
  189|  6.78k|               }
  190|    611|            }
  191|  1.75M|            else {
  192|  1.75M|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  193|  1.75M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (193:20): [True: 18, False: 1.75M]
  ------------------
  194|     18|                  return;
  195|       |
  196|  1.75M|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (196:20): [True: 171, False: 1.75M]
  ------------------
  197|    171|                  ctx.error = error_code::unexpected_end;
  198|    171|                  return;
  199|    171|               }
  200|       |
  201|  1.75M|               if (!emit_hex_bytes(ctx, it, length, out, ix)) return;
  ------------------
  |  Branch (201:20): [True: 0, False: 1.75M]
  ------------------
  202|  1.75M|               it += length;
  203|  1.75M|            }
  204|       |
  205|  1.75M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (205:17): [True: 0, False: 1.75M]
  ------------------
  206|  1.75M|            break;
  207|  1.75M|         }
  208|       |
  209|  1.75M|         case major::tstr: {
  ------------------
  |  Branch (209:10): [True: 197k, False: 33.5M]
  ------------------
  210|       |            // Text string
  211|   197k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (211:17): [True: 1.78k, False: 196k]
  ------------------
  212|       |               // Indefinite-length text string - concatenate chunks
  213|  1.78k|               std::string str;
  214|   130k|               while (true) {
  ------------------
  |  Branch (214:23): [True: 130k, Folded]
  ------------------
  215|   130k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (215:23): [True: 188, False: 130k]
  ------------------
  216|    188|                     ctx.error = error_code::unexpected_end;
  217|    188|                     return;
  218|    188|                  }
  219|   130k|                  uint8_t chunk_initial;
  220|   130k|                  std::memcpy(&chunk_initial, it, 1);
  221|       |
  222|   130k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (222:23): [True: 1.16k, False: 129k]
  ------------------
  223|  1.16k|                     ++it;
  224|  1.16k|                     break;
  225|  1.16k|                  }
  226|       |
  227|   129k|                  ++it;
  228|   129k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  229|   129k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  230|       |
  231|   129k|                  if (chunk_major != major::tstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (231:23): [True: 63, False: 129k]
  |  Branch (231:53): [True: 6, False: 129k]
  ------------------
  232|     69|                     ctx.error = error_code::syntax_error;
  233|     69|                     return;
  234|     69|                  }
  235|       |
  236|   129k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  237|   129k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (237:23): [True: 93, False: 129k]
  ------------------
  238|     93|                     return;
  239|       |
  240|   129k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (240:23): [True: 264, False: 128k]
  ------------------
  241|    264|                     ctx.error = error_code::unexpected_end;
  242|    264|                     return;
  243|    264|                  }
  244|       |
  245|   128k|                  str.append(reinterpret_cast<const char*>(it), chunk_len);
  246|   128k|                  it += chunk_len;
  247|   128k|               }
  248|  1.16k|               detail::emit_untrusted_string<Opts>(ctx, str, out, ix);
  249|  1.16k|            }
  250|   196k|            else {
  251|   196k|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  252|   196k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (252:20): [True: 173, False: 195k]
  ------------------
  253|    173|                  return;
  254|       |
  255|   195k|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (255:20): [True: 378, False: 195k]
  ------------------
  256|    378|                  ctx.error = error_code::unexpected_end;
  257|    378|                  return;
  258|    378|               }
  259|       |
  260|   195k|               const sv value{reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  261|   195k|               detail::emit_untrusted_string<Opts>(ctx, value, out, ix);
  262|   195k|               it += length;
  263|   195k|            }
  264|   196k|            break;
  265|   197k|         }
  266|       |
  267|   486k|         case major::array: {
  ------------------
  |  Branch (267:10): [True: 486k, False: 33.2M]
  ------------------
  268|       |            // The elements of an array stay on one line, so a separator is ',' or ", "
  269|   486k|            const auto convert_element = [&](const bool needs_comma) {
  270|   486k|               if (needs_comma) {
  271|   486k|                  if constexpr (Opts.prettify) {
  272|   486k|                     if (!emit_literal<", ">(ctx, out, ix)) return;
  273|   486k|                  }
  274|   486k|                  else {
  275|   486k|                     if (!emit_char(ctx, ',', out, ix)) return;
  276|   486k|                  }
  277|   486k|               }
  278|   486k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  279|   486k|            };
  280|       |
  281|   486k|            if (!emit_char(ctx, '[', out, ix)) return;
  ------------------
  |  Branch (281:17): [True: 0, False: 486k]
  ------------------
  282|       |
  283|   486k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (283:17): [True: 7.17k, False: 479k]
  ------------------
  284|       |               // Indefinite-length array
  285|  7.17k|               bool first = true;
  286|  15.1M|               while (true) {
  ------------------
  |  Branch (286:23): [True: 15.1M, Folded]
  ------------------
  287|  15.1M|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (287:23): [True: 622, False: 15.1M]
  ------------------
  288|    622|                     ctx.error = error_code::unexpected_end;
  289|    622|                     return;
  290|    622|                  }
  291|  15.1M|                  uint8_t peek;
  292|  15.1M|                  std::memcpy(&peek, it, 1);
  293|       |
  294|  15.1M|                  if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (294:23): [True: 1.26k, False: 15.1M]
  ------------------
  295|  1.26k|                     ++it;
  296|  1.26k|                     break;
  297|  1.26k|                  }
  298|       |
  299|  15.1M|                  convert_element(!first);
  300|  15.1M|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (300:23): [True: 5.28k, False: 15.1M]
  ------------------
  301|  5.28k|                     return;
  302|  15.1M|                  first = false;
  303|  15.1M|               }
  304|  7.17k|            }
  305|   479k|            else {
  306|   479k|               const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  307|   479k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (307:20): [True: 108, False: 478k]
  ------------------
  308|    108|                  return;
  309|       |
  310|  16.6M|               for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (310:37): [True: 16.1M, False: 453k]
  ------------------
  311|  16.1M|                  convert_element(i > 0);
  312|  16.1M|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (312:23): [True: 25.0k, False: 16.1M]
  ------------------
  313|  25.0k|                     return;
  314|  16.1M|               }
  315|   478k|            }
  316|       |
  317|   455k|            if (!emit_char(ctx, ']', out, ix)) return;
  ------------------
  |  Branch (317:17): [True: 0, False: 455k]
  ------------------
  318|   455k|            break;
  319|   455k|         }
  320|       |
  321|   455k|         case major::map: {
  ------------------
  |  Branch (321:10): [True: 67.3k, False: 33.6M]
  ------------------
  322|  67.3k|            if (!emit_char(ctx, '{', out, ix)) return;
  ------------------
  |  Branch (322:17): [True: 0, False: 67.3k]
  ------------------
  323|       |
  324|       |            // A prettified map only breaks the line before its '}' when it holds at least one
  325|       |            // pair, so an empty map stays "{}" whether its length was definite or indefinite.
  326|  67.3k|            bool wrote_pair = false;
  327|       |
  328|       |            // One pair: the ',' separating it from the pair before, the line a prettified map opens
  329|       |            // for it, then the key, the colon, and the value.
  330|  67.3k|            const auto convert_pair = [&](const bool needs_comma) {
  331|  67.3k|               if (needs_comma) {
  332|  67.3k|                  if (!emit_char(ctx, ',', out, ix)) return;
  333|  67.3k|               }
  334|  67.3k|               if constexpr (Opts.prettify) {
  335|  67.3k|                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  336|  67.3k|               }
  337|       |
  338|       |               // Key (must be a string for JSON compatibility)
  339|  67.3k|               cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  340|  67.3k|               if (bool(ctx.error)) [[unlikely]]
  341|  67.3k|                  return;
  342|       |
  343|  67.3k|               if constexpr (Opts.prettify) {
  344|  67.3k|                  if (!emit_literal<": ">(ctx, out, ix)) return;
  345|  67.3k|               }
  346|  67.3k|               else {
  347|  67.3k|                  if (!emit_char(ctx, ':', out, ix)) return;
  348|  67.3k|               }
  349|       |
  350|  67.3k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  351|  67.3k|            };
  352|       |
  353|  67.3k|            {
  354|       |               // The indentation this map adds belongs to this map, so it is raised for the pairs
  355|       |               // and no longer: leaving it up on an error path would indent whatever the context
  356|       |               // is used for next.
  357|  67.3k|               const indent_guard indent{ctx, Opts.prettify ? check_indentation_width(Opts) : 0};
  ------------------
  |  Branch (357:47): [Folded, False: 67.3k]
  ------------------
  358|       |
  359|  67.3k|               if (additional_info == info::indefinite) {
  ------------------
  |  Branch (359:20): [True: 1.64k, False: 65.6k]
  ------------------
  360|       |                  // Indefinite-length map
  361|   908k|                  while (true) {
  ------------------
  |  Branch (361:26): [True: 908k, Folded]
  ------------------
  362|   908k|                     if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (362:26): [True: 249, False: 908k]
  ------------------
  363|    249|                        ctx.error = error_code::unexpected_end;
  364|    249|                        return;
  365|    249|                     }
  366|   908k|                     uint8_t peek;
  367|   908k|                     std::memcpy(&peek, it, 1);
  368|       |
  369|   908k|                     if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (369:26): [True: 303, False: 908k]
  ------------------
  370|    303|                        ++it;
  371|    303|                        break;
  372|    303|                     }
  373|       |
  374|   908k|                     convert_pair(wrote_pair);
  375|   908k|                     if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (375:26): [True: 1.09k, False: 907k]
  ------------------
  376|  1.09k|                        return;
  377|   907k|                     wrote_pair = true;
  378|   907k|                  }
  379|  1.64k|               }
  380|  65.6k|               else {
  381|  65.6k|                  const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  382|  65.6k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (382:23): [True: 95, False: 65.5k]
  ------------------
  383|     95|                     return;
  384|       |
  385|  65.5k|                  wrote_pair = count > 0;
  386|       |
  387|   804k|                  for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (387:40): [True: 742k, False: 62.2k]
  ------------------
  388|   742k|                     convert_pair(i > 0);
  389|   742k|                     if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (389:26): [True: 3.33k, False: 738k]
  ------------------
  390|  3.33k|                        return;
  391|   742k|                  }
  392|  65.5k|               }
  393|  67.3k|            }
  394|       |
  395|       |            if constexpr (Opts.prettify) {
  396|       |               if (wrote_pair) {
  397|       |                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  398|       |               }
  399|       |            }
  400|  62.5k|            if (!emit_char(ctx, '}', out, ix)) return;
  ------------------
  |  Branch (400:17): [True: 0, False: 62.5k]
  ------------------
  401|  62.5k|            break;
  402|  62.5k|         }
  403|       |
  404|   195k|         case major::tag: {
  ------------------
  |  Branch (404:10): [True: 195k, False: 33.5M]
  ------------------
  405|       |            // Semantic tag - for JSON output, we skip the tag and output the content
  406|       |            // Some tags could have special handling (e.g., datetime)
  407|   195k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  408|   195k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (408:17): [True: 43, False: 195k]
  ------------------
  409|     43|               return;
  410|       |
  411|       |            // Check for typed arrays (RFC 8746)
  412|   195k|            const auto ta_info = typed_array::get_info(tag_num);
  413|   195k|            if (ta_info.valid) {
  ------------------
  |  Branch (413:17): [True: 76.9k, False: 118k]
  ------------------
  414|       |               // It's a typed array - read the byte string and convert elements
  415|  76.9k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (415:20): [True: 51, False: 76.9k]
  ------------------
  416|     51|                  ctx.error = error_code::unexpected_end;
  417|     51|                  return;
  418|     51|               }
  419|       |
  420|  76.9k|               uint8_t bstr_initial;
  421|  76.9k|               std::memcpy(&bstr_initial, it, 1);
  422|  76.9k|               ++it;
  423|       |
  424|  76.9k|               if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (424:20): [True: 12, False: 76.9k]
  ------------------
  425|     12|                  ctx.error = error_code::syntax_error;
  426|     12|                  return;
  427|     12|               }
  428|       |
  429|  76.9k|               const uint64_t byte_len = cbor_to_json_decode_arg(ctx, it, end, get_additional_info(bstr_initial));
  430|  76.9k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (430:20): [True: 103, False: 76.8k]
  ------------------
  431|    103|                  return;
  432|       |
  433|  76.8k|               if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (433:20): [True: 241, False: 76.5k]
  ------------------
  434|    241|                  ctx.error = error_code::unexpected_end;
  435|    241|                  return;
  436|    241|               }
  437|       |
  438|       |               // Tags 83 and 87 hold IEEE binary128 elements, which no C++ floating point type this
  439|       |               // library writes or reads represents. Rejecting the width here, before the array is
  440|       |               // opened, keeps the element loop over widths it can decode and leaves no half
  441|       |               // written array behind.
  442|  76.5k|               if (ta_info.element_size > 8) [[unlikely]] {
  ------------------
  |  Branch (442:20): [True: 2, False: 76.5k]
  ------------------
  443|      2|                  ctx.error = error_code::feature_not_supported;
  444|      2|                  return;
  445|      2|               }
  446|       |
  447|  76.5k|               if (byte_len % ta_info.element_size != 0) [[unlikely]] {
  ------------------
  |  Branch (447:20): [True: 5, False: 76.5k]
  ------------------
  448|      5|                  ctx.error = error_code::syntax_error;
  449|      5|                  return;
  450|      5|               }
  451|       |
  452|  76.5k|               const size_t count = byte_len / ta_info.element_size;
  453|  76.5k|               const bool need_swap = typed_array::needs_byteswap(tag_num);
  454|       |
  455|  76.5k|               if (!emit_char(ctx, '[', out, ix)) return;
  ------------------
  |  Branch (455:20): [True: 0, False: 76.5k]
  ------------------
  456|       |
  457|  9.59M|               for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (457:35): [True: 9.51M, False: 76.5k]
  ------------------
  458|  9.51M|                  if (i > 0) {
  ------------------
  |  Branch (458:23): [True: 9.45M, False: 65.7k]
  ------------------
  459|  9.45M|                     if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (459:26): [True: 0, False: 9.45M]
  ------------------
  460|  9.45M|                  }
  461|       |
  462|       |                  // Read and optionally byteswap the element
  463|  9.51M|                  if (ta_info.is_float) {
  ------------------
  |  Branch (463:23): [True: 7.39M, False: 2.11M]
  ------------------
  464|  7.39M|                     if (ta_info.element_size == 2) {
  ------------------
  |  Branch (464:26): [True: 7.33M, False: 62.8k]
  ------------------
  465|       |                        // Half precision (tags 80 and 84) has no C++ type; it widens to double,
  466|       |                        // the same conversion decode_half performs for a bare float16 value.
  467|  7.33M|                        uint16_t half;
  468|  7.33M|                        std::memcpy(&half, it, 2);
  469|  7.33M|                        if (need_swap) {
  ------------------
  |  Branch (469:29): [True: 6.85M, False: 479k]
  ------------------
  470|  6.85M|                           half = std::byteswap(half);
  471|  6.85M|                        }
  472|  7.33M|                        to<JSON, double>::template op<Opts>(decode_half(half), ctx, out, ix);
  473|  7.33M|                     }
  474|  62.8k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (474:31): [True: 48.6k, False: 14.1k]
  ------------------
  475|  48.6k|                        float val;
  476|  48.6k|                        std::memcpy(&val, it, 4);
  477|  48.6k|                        if (need_swap) {
  ------------------
  |  Branch (477:29): [True: 5.64k, False: 43.0k]
  ------------------
  478|  5.64k|                           uint32_t bits;
  479|  5.64k|                           std::memcpy(&bits, &val, 4);
  480|  5.64k|                           bits = std::byteswap(bits);
  481|  5.64k|                           std::memcpy(&val, &bits, 4);
  482|  5.64k|                        }
  483|  48.6k|                        to<JSON, float>::template op<Opts>(val, ctx, out, ix);
  484|  48.6k|                     }
  485|  14.1k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (485:31): [True: 14.1k, False: 0]
  ------------------
  486|  14.1k|                        double val;
  487|  14.1k|                        std::memcpy(&val, it, 8);
  488|  14.1k|                        if (need_swap) {
  ------------------
  |  Branch (488:29): [True: 1.17k, False: 13.0k]
  ------------------
  489|  1.17k|                           uint64_t bits;
  490|  1.17k|                           std::memcpy(&bits, &val, 8);
  491|  1.17k|                           bits = std::byteswap(bits);
  492|  1.17k|                           std::memcpy(&val, &bits, 8);
  493|  1.17k|                        }
  494|  14.1k|                        to<JSON, double>::template op<Opts>(val, ctx, out, ix);
  495|  14.1k|                     }
  496|      0|                     else {
  497|      0|                        ctx.error = error_code::syntax_error;
  498|      0|                        return;
  499|      0|                     }
  500|  7.39M|                  }
  501|  2.11M|                  else if (ta_info.is_signed) {
  ------------------
  |  Branch (501:28): [True: 246k, False: 1.87M]
  ------------------
  502|   246k|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (502:26): [True: 56.7k, False: 189k]
  ------------------
  503|  56.7k|                        int8_t val;
  504|  56.7k|                        std::memcpy(&val, it, 1);
  505|  56.7k|                        to<JSON, int8_t>::template op<Opts>(val, ctx, out, ix);
  506|  56.7k|                     }
  507|   189k|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (507:31): [True: 126k, False: 62.9k]
  ------------------
  508|   126k|                        int16_t val;
  509|   126k|                        std::memcpy(&val, it, 2);
  510|   126k|                        if (need_swap) {
  ------------------
  |  Branch (510:29): [True: 19.5k, False: 107k]
  ------------------
  511|  19.5k|                           uint16_t bits;
  512|  19.5k|                           std::memcpy(&bits, &val, 2);
  513|  19.5k|                           bits = std::byteswap(bits);
  514|  19.5k|                           std::memcpy(&val, &bits, 2);
  515|  19.5k|                        }
  516|   126k|                        to<JSON, int16_t>::template op<Opts>(val, ctx, out, ix);
  517|   126k|                     }
  518|  62.9k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (518:31): [True: 48.0k, False: 14.8k]
  ------------------
  519|  48.0k|                        int32_t val;
  520|  48.0k|                        std::memcpy(&val, it, 4);
  521|  48.0k|                        if (need_swap) {
  ------------------
  |  Branch (521:29): [True: 9.06k, False: 38.9k]
  ------------------
  522|  9.06k|                           uint32_t bits;
  523|  9.06k|                           std::memcpy(&bits, &val, 4);
  524|  9.06k|                           bits = std::byteswap(bits);
  525|  9.06k|                           std::memcpy(&val, &bits, 4);
  526|  9.06k|                        }
  527|  48.0k|                        to<JSON, int32_t>::template op<Opts>(val, ctx, out, ix);
  528|  48.0k|                     }
  529|  14.8k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (529:31): [True: 14.8k, False: 0]
  ------------------
  530|  14.8k|                        int64_t val;
  531|  14.8k|                        std::memcpy(&val, it, 8);
  532|  14.8k|                        if (need_swap) {
  ------------------
  |  Branch (532:29): [True: 13.9k, False: 989]
  ------------------
  533|  13.9k|                           uint64_t bits;
  534|  13.9k|                           std::memcpy(&bits, &val, 8);
  535|  13.9k|                           bits = std::byteswap(bits);
  536|  13.9k|                           std::memcpy(&val, &bits, 8);
  537|  13.9k|                        }
  538|  14.8k|                        to<JSON, int64_t>::template op<Opts>(val, ctx, out, ix);
  539|  14.8k|                     }
  540|   246k|                  }
  541|  1.87M|                  else {
  542|       |                     // Unsigned
  543|  1.87M|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (543:26): [True: 1.23M, False: 635k]
  ------------------
  544|  1.23M|                        uint8_t val;
  545|  1.23M|                        std::memcpy(&val, it, 1);
  546|  1.23M|                        to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  547|  1.23M|                     }
  548|   635k|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (548:31): [True: 163k, False: 472k]
  ------------------
  549|   163k|                        uint16_t val;
  550|   163k|                        std::memcpy(&val, it, 2);
  551|   163k|                        if (need_swap) {
  ------------------
  |  Branch (551:29): [True: 89.0k, False: 74.0k]
  ------------------
  552|  89.0k|                           val = std::byteswap(val);
  553|  89.0k|                        }
  554|   163k|                        to<JSON, uint16_t>::template op<Opts>(val, ctx, out, ix);
  555|   163k|                     }
  556|   472k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (556:31): [True: 180k, False: 291k]
  ------------------
  557|   180k|                        uint32_t val;
  558|   180k|                        std::memcpy(&val, it, 4);
  559|   180k|                        if (need_swap) {
  ------------------
  |  Branch (559:29): [True: 20.2k, False: 160k]
  ------------------
  560|  20.2k|                           val = std::byteswap(val);
  561|  20.2k|                        }
  562|   180k|                        to<JSON, uint32_t>::template op<Opts>(val, ctx, out, ix);
  563|   180k|                     }
  564|   291k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (564:31): [True: 291k, False: 0]
  ------------------
  565|   291k|                        uint64_t val;
  566|   291k|                        std::memcpy(&val, it, 8);
  567|   291k|                        if (need_swap) {
  ------------------
  |  Branch (567:29): [True: 221k, False: 70.1k]
  ------------------
  568|   221k|                           val = std::byteswap(val);
  569|   221k|                        }
  570|   291k|                        to<JSON, uint64_t>::template op<Opts>(val, ctx, out, ix);
  571|   291k|                     }
  572|  1.87M|                  }
  573|       |
  574|  9.51M|                  if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (574:23): [True: 0, False: 9.51M]
  ------------------
  575|      0|                     return;
  576|      0|                  }
  577|       |
  578|  9.51M|                  it += ta_info.element_size;
  579|  9.51M|               }
  580|       |
  581|  76.5k|               if (!emit_char(ctx, ']', out, ix)) return;
  ------------------
  |  Branch (581:20): [True: 0, False: 76.5k]
  ------------------
  582|  76.5k|            }
  583|   118k|            else {
  584|       |               // Other tags - just output the tagged content
  585|   118k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  586|   118k|            }
  587|   195k|            break;
  588|   195k|         }
  589|       |
  590|  21.4M|         case major::simple: {
  ------------------
  |  Branch (590:10): [True: 21.4M, False: 12.2M]
  ------------------
  591|  21.4M|            switch (additional_info) {
  592|  5.19M|            case simple::false_value:
  ------------------
  |  Branch (592:13): [True: 5.19M, False: 16.2M]
  ------------------
  593|  5.19M|               if (!emit_literal<"false">(ctx, out, ix)) return;
  ------------------
  |  Branch (593:20): [True: 0, False: 5.19M]
  ------------------
  594|  5.19M|               break;
  595|  5.19M|            case simple::true_value:
  ------------------
  |  Branch (595:13): [True: 4.42M, False: 17.0M]
  ------------------
  596|  4.42M|               if (!emit_literal<"true">(ctx, out, ix)) return;
  ------------------
  |  Branch (596:20): [True: 0, False: 4.42M]
  ------------------
  597|  4.42M|               break;
  598|  4.42M|            case simple::null_value:
  ------------------
  |  Branch (598:13): [True: 90.9k, False: 21.3M]
  ------------------
  599|       |            // JSON has one empty value and CBOR has two. `undefined` becomes `null` because that is
  600|       |            // the only thing JSON can say, so the distinction between "no value" and "absent value"
  601|       |            // does not survive the conversion.
  602|  98.7k|            case simple::undefined:
  ------------------
  |  Branch (602:13): [True: 7.74k, False: 21.4M]
  ------------------
  603|  98.7k|               if (!emit_literal<"null">(ctx, out, ix)) return;
  ------------------
  |  Branch (603:20): [True: 0, False: 98.7k]
  ------------------
  604|  98.7k|               break;
  605|  11.2M|            case simple::float16: {
  ------------------
  |  Branch (605:13): [True: 11.2M, False: 10.1M]
  ------------------
  606|  11.2M|               if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (606:20): [True: 87, False: 11.2M]
  ------------------
  607|     87|                  ctx.error = error_code::unexpected_end;
  608|     87|                  return;
  609|     87|               }
  610|  11.2M|               uint16_t half;
  611|  11.2M|               std::memcpy(&half, it, 2);
  612|  11.2M|               if constexpr (std::endian::native == std::endian::little) {
  613|  11.2M|                  half = std::byteswap(half);
  614|  11.2M|               }
  615|  11.2M|               it += 2;
  616|  11.2M|               const double value = decode_half(half);
  617|  11.2M|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  618|  11.2M|               break;
  619|  11.2M|            }
  620|  5.58k|            case simple::float32: {
  ------------------
  |  Branch (620:13): [True: 5.58k, False: 21.4M]
  ------------------
  621|  5.58k|               if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (621:20): [True: 7, False: 5.57k]
  ------------------
  622|      7|                  ctx.error = error_code::unexpected_end;
  623|      7|                  return;
  624|      7|               }
  625|  5.57k|               uint32_t bits;
  626|  5.57k|               std::memcpy(&bits, it, 4);
  627|  5.57k|               if constexpr (std::endian::native == std::endian::little) {
  628|  5.57k|                  bits = std::byteswap(bits);
  629|  5.57k|               }
  630|  5.57k|               float value;
  631|  5.57k|               std::memcpy(&value, &bits, 4);
  632|  5.57k|               it += 4;
  633|  5.57k|               to<JSON, float>::template op<Opts>(value, ctx, out, ix);
  634|  5.57k|               break;
  635|  5.58k|            }
  636|  36.3k|            case simple::float64: {
  ------------------
  |  Branch (636:13): [True: 36.3k, False: 21.4M]
  ------------------
  637|  36.3k|               if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (637:20): [True: 11, False: 36.3k]
  ------------------
  638|     11|                  ctx.error = error_code::unexpected_end;
  639|     11|                  return;
  640|     11|               }
  641|  36.3k|               uint64_t bits;
  642|  36.3k|               std::memcpy(&bits, it, 8);
  643|  36.3k|               if constexpr (std::endian::native == std::endian::little) {
  644|  36.3k|                  bits = std::byteswap(bits);
  645|  36.3k|               }
  646|  36.3k|               double value;
  647|  36.3k|               std::memcpy(&value, &bits, 8);
  648|  36.3k|               it += 8;
  649|  36.3k|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  650|  36.3k|               break;
  651|  36.3k|            }
  652|     93|            case simple::break_code:
  ------------------
  |  Branch (652:13): [True: 93, False: 21.4M]
  ------------------
  653|     93|               ctx.error = error_code::syntax_error; // Unexpected break
  654|     93|               break;
  655|   440k|            default:
  ------------------
  |  Branch (655:13): [True: 440k, False: 21.0M]
  ------------------
  656|   440k|               if (additional_info < 24) {
  ------------------
  |  Branch (656:20): [True: 374k, False: 65.3k]
  ------------------
  657|       |                  // Simple value 0-23 - output as number
  658|   374k|                  to<JSON, uint8_t>::template op<Opts>(additional_info, ctx, out, ix);
  659|   374k|               }
  660|  65.3k|               else if (additional_info == 24) {
  ------------------
  |  Branch (660:25): [True: 65.3k, False: 19]
  ------------------
  661|       |                  // Simple value in next byte
  662|  65.3k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (662:23): [True: 3, False: 65.3k]
  ------------------
  663|      3|                     ctx.error = error_code::unexpected_end;
  664|      3|                     return;
  665|      3|                  }
  666|  65.3k|                  uint8_t val;
  667|  65.3k|                  std::memcpy(&val, it, 1);
  668|  65.3k|                  ++it;
  669|  65.3k|                  to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  670|  65.3k|               }
  671|     19|               else {
  672|     19|                  ctx.error = error_code::syntax_error;
  673|     19|               }
  674|   440k|               break;
  675|  21.4M|            }
  676|  21.4M|            break;
  677|  21.4M|         }
  678|       |
  679|  21.4M|         default:
  ------------------
  |  Branch (679:10): [True: 0, False: 33.7M]
  ------------------
  680|      0|            ctx.error = error_code::syntax_error;
  681|      0|            break;
  682|  33.7M|         }
  683|  33.7M|      }
_ZN3glz6detail23cbor_to_json_decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   17|  13.5M|      {
   18|  13.5M|         using namespace cbor;
   19|       |
   20|  13.5M|         if (additional_info < 24) {
  ------------------
  |  Branch (20:14): [True: 12.8M, False: 646k]
  ------------------
   21|  12.8M|            return additional_info;
   22|  12.8M|         }
   23|       |
   24|   646k|         switch (additional_info) {
   25|   346k|         case info::uint8_follows: {
  ------------------
  |  Branch (25:10): [True: 346k, False: 299k]
  ------------------
   26|   346k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (26:17): [True: 62, False: 346k]
  ------------------
   27|     62|               ctx.error = error_code::unexpected_end;
   28|     62|               return 0;
   29|     62|            }
   30|   346k|            uint8_t val;
   31|   346k|            std::memcpy(&val, it, 1);
   32|   346k|            ++it;
   33|   346k|            return val;
   34|   346k|         }
   35|   178k|         case info::uint16_follows: {
  ------------------
  |  Branch (35:10): [True: 178k, False: 467k]
  ------------------
   36|   178k|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (36:17): [True: 71, False: 178k]
  ------------------
   37|     71|               ctx.error = error_code::unexpected_end;
   38|     71|               return 0;
   39|     71|            }
   40|   178k|            uint16_t val;
   41|   178k|            std::memcpy(&val, it, 2);
   42|   178k|            if constexpr (std::endian::native == std::endian::little) {
   43|   178k|               val = std::byteswap(val);
   44|   178k|            }
   45|   178k|            it += 2;
   46|   178k|            return val;
   47|   178k|         }
   48|  96.5k|         case info::uint32_follows: {
  ------------------
  |  Branch (48:10): [True: 96.5k, False: 549k]
  ------------------
   49|  96.5k|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (49:17): [True: 170, False: 96.3k]
  ------------------
   50|    170|               ctx.error = error_code::unexpected_end;
   51|    170|               return 0;
   52|    170|            }
   53|  96.3k|            uint32_t val;
   54|  96.3k|            std::memcpy(&val, it, 4);
   55|  96.3k|            if constexpr (std::endian::native == std::endian::little) {
   56|  96.3k|               val = std::byteswap(val);
   57|  96.3k|            }
   58|  96.3k|            it += 4;
   59|  96.3k|            return val;
   60|  96.5k|         }
   61|  24.9k|         case info::uint64_follows: {
  ------------------
  |  Branch (61:10): [True: 24.9k, False: 621k]
  ------------------
   62|  24.9k|            if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (62:17): [True: 519, False: 24.4k]
  ------------------
   63|    519|               ctx.error = error_code::unexpected_end;
   64|    519|               return 0;
   65|    519|            }
   66|  24.4k|            uint64_t val;
   67|  24.4k|            std::memcpy(&val, it, 8);
   68|  24.4k|            if constexpr (std::endian::native == std::endian::little) {
   69|  24.4k|               val = std::byteswap(val);
   70|  24.4k|            }
   71|  24.4k|            it += 8;
   72|  24.4k|            return val;
   73|  24.9k|         }
   74|     92|         default:
  ------------------
  |  Branch (74:10): [True: 92, False: 646k]
  ------------------
   75|     92|            ctx.error = error_code::syntax_error;
   76|     92|            return 0;
   77|   646k|         }
   78|   646k|      }
_ZN3glz6detail29cbor_to_json_negative_integerITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEvRT1_mRT0_Rm:
   87|  1.93M|      {
   88|  1.93M|         if (n <= uint64_t((std::numeric_limits<int64_t>::max)())) [[likely]] {
  ------------------
  |  Branch (88:14): [True: 1.92M, False: 3.65k]
  ------------------
   89|  1.92M|            to<JSON, int64_t>::template op<Opts>(static_cast<int64_t>(~n), ctx, out, ix);
   90|  1.92M|         }
   91|  3.65k|         else if (n == (std::numeric_limits<uint64_t>::max)()) [[unlikely]] {
  ------------------
  |  Branch (91:19): [True: 411, False: 3.24k]
  ------------------
   92|    411|            if (!emit_literal<"-18446744073709551616">(ctx, out, ix)) return;
  ------------------
  |  Branch (92:17): [True: 0, False: 411]
  ------------------
   93|    411|         }
   94|  3.24k|         else {
   95|  3.24k|            if (!emit_char(ctx, '-', out, ix)) return;
  ------------------
  |  Branch (95:17): [True: 0, False: 3.24k]
  ------------------
   96|  3.24k|            to<JSON, uint64_t>::template op<Opts>(n + 1, ctx, out, ix);
   97|  3.24k|         }
   98|  1.93M|      }
_ZZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlbE_clEb:
  269|  31.3M|            const auto convert_element = [&](const bool needs_comma) {
  270|  31.3M|               if (needs_comma) {
  ------------------
  |  Branch (270:20): [True: 30.9M, False: 475k]
  ------------------
  271|       |                  if constexpr (Opts.prettify) {
  272|       |                     if (!emit_literal<", ">(ctx, out, ix)) return;
  273|       |                  }
  274|  30.9M|                  else {
  275|  30.9M|                     if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (275:26): [True: 0, False: 30.9M]
  ------------------
  276|  30.9M|                  }
  277|  30.9M|               }
  278|  30.9M|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  279|  31.3M|            };
_ZZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlbE0_clEb:
  330|  1.65M|            const auto convert_pair = [&](const bool needs_comma) {
  331|  1.65M|               if (needs_comma) {
  ------------------
  |  Branch (331:20): [True: 1.64M, False: 7.74k]
  ------------------
  332|  1.64M|                  if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (332:23): [True: 0, False: 1.64M]
  ------------------
  333|  1.64M|               }
  334|       |               if constexpr (Opts.prettify) {
  335|       |                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  336|       |               }
  337|       |
  338|       |               // Key (must be a string for JSON compatibility)
  339|  1.65M|               cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  340|  1.65M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (340:20): [True: 1.01k, False: 1.64M]
  ------------------
  341|  1.01k|                  return;
  342|       |
  343|       |               if constexpr (Opts.prettify) {
  344|       |                  if (!emit_literal<": ">(ctx, out, ix)) return;
  345|       |               }
  346|  1.64M|               else {
  347|  1.64M|                  if (!emit_char(ctx, ':', out, ix)) return;
  ------------------
  |  Branch (347:23): [True: 0, False: 1.64M]
  ------------------
  348|  1.64M|               }
  349|       |
  350|  1.64M|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  351|  1.64M|            };
_ZN3glz6detail16cbor_to_json_keyITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
  695|  1.65M|      {
  696|  1.65M|         using namespace cbor;
  697|       |
  698|  1.65M|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (698:14): [True: 418, False: 1.65M]
  ------------------
  699|    418|            ctx.error = error_code::unexpected_end;
  700|    418|            return;
  701|    418|         }
  702|       |
  703|  1.65M|         uint8_t initial;
  704|  1.65M|         std::memcpy(&initial, it, 1);
  705|  1.65M|         const uint8_t major_type = get_major_type(initial);
  706|  1.65M|         const uint8_t additional_info = get_additional_info(initial);
  707|       |
  708|  1.65M|         switch (major_type) {
  709|  26.0k|         case major::tstr:
  ------------------
  |  Branch (709:10): [True: 26.0k, False: 1.62M]
  ------------------
  710|   587k|         case major::bstr:
  ------------------
  |  Branch (710:10): [True: 561k, False: 1.09M]
  ------------------
  711|       |            // Both already emit as a JSON string (tstr escaped, bstr hex-quoted).
  712|   587k|            cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth);
  713|   587k|            return;
  714|  4.32k|         case major::tag: {
  ------------------
  |  Branch (714:10): [True: 4.32k, False: 1.64M]
  ------------------
  715|       |            // Unwrap the tag and key-check the tagged content, so e.g. a tag-0
  716|       |            // datetime text key still emits as a string. Typed-array tags
  717|       |            // (RFC 8746) decode to a JSON array and are rejected below. The tag is the only key
  718|       |            // that recurses, so it is the one that takes a level, as it does as a value.
  719|  4.32k|            if (recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (719:17): [True: 2, False: 4.31k]
  ------------------
  720|      2|               ctx.error = error_code::exceeded_max_recursive_depth;
  721|      2|               return;
  722|      2|            }
  723|  4.31k|            ++it;
  724|  4.31k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  725|  4.31k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (725:17): [True: 13, False: 4.30k]
  ------------------
  726|     13|               return;
  727|  4.30k|            if (typed_array::get_info(tag_num).valid) [[unlikely]] {
  ------------------
  |  Branch (727:17): [True: 16, False: 4.29k]
  ------------------
  728|     16|               ctx.error = error_code::syntax_error;
  729|     16|               return;
  730|     16|            }
  731|  4.29k|            cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  732|  4.29k|            return;
  733|  4.30k|         }
  734|   823k|         case major::uint:
  ------------------
  |  Branch (734:10): [True: 823k, False: 831k]
  ------------------
  735|  1.06M|         case major::nint: {
  ------------------
  |  Branch (735:10): [True: 239k, False: 1.41M]
  ------------------
  736|  1.06M|            ++it;
  737|  1.06M|            const uint64_t arg = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  738|  1.06M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (738:17): [True: 17, False: 1.06M]
  ------------------
  739|     17|               return;
  740|       |
  741|  1.06M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (741:17): [True: 0, False: 1.06M]
  ------------------
  742|  1.06M|            if (major_type == major::uint) {
  ------------------
  |  Branch (742:17): [True: 823k, False: 239k]
  ------------------
  743|   823k|               to<JSON, uint64_t>::template op<Opts>(arg, ctx, out, ix);
  744|   823k|            }
  745|   239k|            else {
  746|   239k|               cbor_to_json_negative_integer<Opts>(ctx, arg, out, ix);
  747|   239k|            }
  748|  1.06M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (748:17): [True: 0, False: 1.06M]
  ------------------
  749|      0|               return;
  750|  1.06M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (750:17): [True: 0, False: 1.06M]
  ------------------
  751|  1.06M|            return;
  752|  1.06M|         }
  753|  1.06M|         default:
  ------------------
  |  Branch (753:10): [True: 224, False: 1.65M]
  ------------------
  754|    224|            ctx.error = error_code::syntax_error;
  755|    224|            return;
  756|  1.65M|         }
  757|  1.65M|      }

_ZN3glz4cbor14get_major_typeEh:
  128|  35.8M|   [[nodiscard]] GLZ_ALWAYS_INLINE constexpr uint8_t get_major_type(uint8_t initial) noexcept { return initial >> 5; }
_ZN3glz4cbor19get_additional_infoEh:
  132|  35.8M|   {
  133|  35.8M|      return initial & 0x1f;
  134|  35.8M|   }
_ZN3glz4cbor12initial_byteEhh:
  123|  16.3M|   {
  124|  16.3M|      return static_cast<uint8_t>((major_type << 5) | (additional_info & 0x1f));
  125|  16.3M|   }
_ZN3glz4cbor11decode_halfEt:
  139|  18.6M|   {
  140|  18.6M|      const int sign = (half >> 15) & 1;
  141|  18.6M|      const int exp = (half >> 10) & 0x1f;
  142|  18.6M|      const int mant = half & 0x3ff;
  143|       |
  144|  18.6M|      double val;
  145|  18.6M|      if (exp == 0) {
  ------------------
  |  Branch (145:11): [True: 14.0M, False: 4.58M]
  ------------------
  146|       |         // Subnormal or zero
  147|  14.0M|         val = std::ldexp(static_cast<double>(mant), -24);
  148|  14.0M|      }
  149|  4.58M|      else if (exp != 31) {
  ------------------
  |  Branch (149:16): [True: 4.44M, False: 138k]
  ------------------
  150|       |         // Normal number
  151|  4.44M|         val = std::ldexp(static_cast<double>(mant + 1024), exp - 25);
  152|  4.44M|      }
  153|   138k|      else {
  154|       |         // Infinity or NaN
  155|   138k|         val = (mant == 0) ? std::numeric_limits<double>::infinity() : std::numeric_limits<double>::quiet_NaN();
  ------------------
  |  Branch (155:16): [True: 876, False: 137k]
  ------------------
  156|   138k|      }
  157|       |
  158|  18.6M|      return sign ? -val : val;
  ------------------
  |  Branch (158:14): [True: 2.22M, False: 16.4M]
  ------------------
  159|  18.6M|   }
_ZN3glz4cbor11typed_array7matchesImEEbNS1_16typed_array_infoE:
  402|  1.76k|      {
  403|  1.76k|         if (!info.valid || info.element_size != sizeof(T)) {
  ------------------
  |  Branch (403:14): [True: 78, False: 1.69k]
  |  Branch (403:29): [True: 6, False: 1.68k]
  ------------------
  404|     84|            return false;
  405|     84|         }
  406|       |         if constexpr (std::floating_point<T>) {
  407|       |            // Tags 83 and 87 are IEEE binary128, which is not the 80-bit extended long double that
  408|       |            // shares its 16-byte storage on x86-64, so no float Glaze can write or read matches them.
  409|       |            return info.is_float && info.element_size <= 8;
  410|       |         }
  411|  1.68k|         else {
  412|  1.68k|            return !info.is_float && info.is_signed == std::is_signed_v<T>;
  ------------------
  |  Branch (412:20): [True: 1.68k, False: 2]
  |  Branch (412:38): [True: 1.68k, False: 2]
  ------------------
  413|  1.68k|         }
  414|  1.68k|      }
_ZN3glz4cbor11typed_array8get_infoEm:
  313|   279k|      {
  314|   279k|         typed_array_info info{};
  315|       |
  316|   279k|         if (tag < 64 || tag > 87 || tag == 76) {
  ------------------
  |  Branch (316:14): [True: 105k, False: 173k]
  |  Branch (316:26): [True: 17.0k, False: 156k]
  |  Branch (316:38): [True: 399, False: 156k]
  ------------------
  317|   123k|            return info; // Not a typed array tag
  318|   123k|         }
  319|       |
  320|   156k|         info.valid = true;
  321|       |
  322|   156k|         if (tag >= 64 && tag <= 71) {
  ------------------
  |  Branch (322:14): [True: 156k, False: 0]
  |  Branch (322:27): [True: 88.5k, False: 68.0k]
  ------------------
  323|       |            // Unsigned integers
  324|  88.5k|            info.is_signed = false;
  325|  88.5k|            info.is_float = false;
  326|  88.5k|            if (tag == 64 || tag == 68) {
  ------------------
  |  Branch (326:17): [True: 654, False: 87.8k]
  |  Branch (326:30): [True: 1.06k, False: 86.7k]
  ------------------
  327|  1.72k|               info.element_size = 1;
  328|  1.72k|               info.is_little_endian = true; // Doesn't matter for 1 byte
  329|  1.72k|            }
  330|  86.7k|            else if (tag == 65 || tag == 69) {
  ------------------
  |  Branch (330:22): [True: 712, False: 86.0k]
  |  Branch (330:35): [True: 24.1k, False: 61.9k]
  ------------------
  331|  24.8k|               info.element_size = 2;
  332|  24.8k|               info.is_little_endian = (tag == 69);
  333|  24.8k|            }
  334|  61.9k|            else if (tag == 66 || tag == 70) {
  ------------------
  |  Branch (334:22): [True: 1.13k, False: 60.7k]
  |  Branch (334:35): [True: 1.10k, False: 59.6k]
  ------------------
  335|  2.24k|               info.element_size = 4;
  336|  2.24k|               info.is_little_endian = (tag == 70);
  337|  2.24k|            }
  338|  59.6k|            else {
  339|  59.6k|               info.element_size = 8;
  340|  59.6k|               info.is_little_endian = (tag == 71);
  341|  59.6k|            }
  342|  88.5k|         }
  343|  68.0k|         else if (tag >= 72 && tag <= 79) {
  ------------------
  |  Branch (343:19): [True: 68.0k, False: 0]
  |  Branch (343:32): [True: 31.5k, False: 36.5k]
  ------------------
  344|       |            // Signed integers
  345|  31.5k|            info.is_signed = true;
  346|  31.5k|            info.is_float = false;
  347|  31.5k|            if (tag == 72) {
  ------------------
  |  Branch (347:17): [True: 6.71k, False: 24.7k]
  ------------------
  348|  6.71k|               info.element_size = 1;
  349|  6.71k|               info.is_little_endian = true;
  350|  6.71k|            }
  351|  24.7k|            else if (tag == 73 || tag == 77) {
  ------------------
  |  Branch (351:22): [True: 7.94k, False: 16.8k]
  |  Branch (351:35): [True: 7.09k, False: 9.74k]
  ------------------
  352|  15.0k|               info.element_size = 2;
  353|  15.0k|               info.is_little_endian = (tag == 77);
  354|  15.0k|            }
  355|  9.74k|            else if (tag == 74 || tag == 78) {
  ------------------
  |  Branch (355:22): [True: 1.31k, False: 8.43k]
  |  Branch (355:35): [True: 1.16k, False: 7.26k]
  ------------------
  356|  2.47k|               info.element_size = 4;
  357|  2.47k|               info.is_little_endian = (tag == 78);
  358|  2.47k|            }
  359|  7.26k|            else {
  360|  7.26k|               info.element_size = 8;
  361|  7.26k|               info.is_little_endian = (tag == 79);
  362|  7.26k|            }
  363|  31.5k|         }
  364|  36.5k|         else {
  365|       |            // Floating point (80-87)
  366|  36.5k|            info.is_signed = true; // Floats can be negative
  367|  36.5k|            info.is_float = true;
  368|  36.5k|            if (tag == 80 || tag == 84) {
  ------------------
  |  Branch (368:17): [True: 12.2k, False: 24.3k]
  |  Branch (368:30): [True: 15.4k, False: 8.84k]
  ------------------
  369|  27.6k|               info.element_size = 2; // float16
  370|  27.6k|               info.is_little_endian = (tag == 84);
  371|  27.6k|            }
  372|  8.84k|            else if (tag == 81 || tag == 85) {
  ------------------
  |  Branch (372:22): [True: 1.37k, False: 7.47k]
  |  Branch (372:35): [True: 5.97k, False: 1.49k]
  ------------------
  373|  7.35k|               info.element_size = 4; // float32
  374|  7.35k|               info.is_little_endian = (tag == 85);
  375|  7.35k|            }
  376|  1.49k|            else if (tag == 82 || tag == 86) {
  ------------------
  |  Branch (376:22): [True: 743, False: 752]
  |  Branch (376:35): [True: 743, False: 9]
  ------------------
  377|  1.48k|               info.element_size = 8; // float64
  378|  1.48k|               info.is_little_endian = (tag == 86);
  379|  1.48k|            }
  380|      9|            else {
  381|      9|               info.element_size = 16; // float128
  382|      9|               info.is_little_endian = (tag == 87);
  383|      9|            }
  384|  36.5k|         }
  385|       |
  386|   156k|         return info;
  387|   279k|      }
_ZN3glz4cbor11typed_array14needs_byteswapEm:
  418|  77.8k|      {
  419|  77.8k|         const auto info = get_info(tag);
  420|  77.8k|         if (!info.valid || info.element_size == 1) {
  ------------------
  |  Branch (420:14): [True: 0, False: 77.8k]
  |  Branch (420:29): [True: 4.20k, False: 73.6k]
  ------------------
  421|  4.20k|            return false;
  422|  4.20k|         }
  423|  73.6k|         constexpr bool native_is_le = (std::endian::native == std::endian::little);
  424|  73.6k|         return native_is_le != info.is_little_endian;
  425|  77.8k|      }

_ZN3glz9read_cborITkNS_14read_supportedIL_ZNS_4CBOREEEE9my_structRKNSt3__16vectorIcNS3_9allocatorIcEEEEEENS3_8expectedIT_NS_9error_ctxEEEOT0_:
 2980|  18.9k|   {
 2981|  18.9k|      T value{};
 2982|  18.9k|      const auto pe = read<opts{.format = CBOR}>(value, std::forward<Buffer>(buffer));
 2983|  18.9k|      if (pe) [[unlikely]] {
  ------------------
  |  Branch (2983:11): [True: 18.8k, False: 57]
  ------------------
 2984|  18.8k|         return unexpected(pe);
 2985|  18.8k|      }
 2986|     57|      return value;
 2987|  18.9k|   }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEER9my_structTkNS_10is_contextERNS_7contextERPKcS9_EEvOT0_OT1_OT2_T3_:
  131|  18.9k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  18.9k|         else {
  141|  18.9k|            using V = std::remove_cvref_t<T>;
  142|  18.9k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  18.9k|                                             end);
  144|  18.9k|         }
  145|  18.9k|      }
_ZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS5_ILm1EEEEES1_TkNS_10is_contextENS_7contextEPKcS9_EEvRT1_RT2_RT3_T4_:
 1861|  18.9k|      {
 1862|  18.9k|         using namespace cbor;
 1863|       |
 1864|  18.9k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1864:14): [True: 0, False: 18.9k]
  ------------------
 1865|      0|            ctx.error = error_code::unexpected_end;
 1866|      0|            return;
 1867|      0|         }
 1868|       |
 1869|  18.9k|         uint8_t initial;
 1870|  18.9k|         std::memcpy(&initial, it, 1);
 1871|  18.9k|         ++it;
 1872|       |
 1873|  18.9k|         const uint8_t major_type = get_major_type(initial);
 1874|  18.9k|         const uint8_t additional_info = get_additional_info(initial);
 1875|       |
 1876|  18.9k|         if (major_type != major::map) [[unlikely]] {
  ------------------
  |  Branch (1876:14): [True: 13.0k, False: 5.90k]
  ------------------
 1877|  13.0k|            ctx.error = error_code::syntax_error;
 1878|  13.0k|            return;
 1879|  13.0k|         }
 1880|       |
 1881|  5.90k|         depth_guard guard{ctx};
 1882|  5.90k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1882:14): [True: 0, False: 5.90k]
  ------------------
 1883|      0|            return;
 1884|      0|         }
 1885|       |
 1886|  5.90k|         static constexpr auto N = reflect<T>::size;
 1887|       |         if constexpr (N == 0) {
 1888|       |            (void)value;
 1889|       |         }
 1890|       |
 1891|  5.90k|         uint64_t n_keys;
 1892|  5.90k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1892:14): [True: 1.97k, False: 3.92k]
  ------------------
 1893|       |            // Handle indefinite map by counting as we go
 1894|  1.97k|            n_keys = (std::numeric_limits<uint64_t>::max)();
 1895|  1.97k|         }
 1896|  3.92k|         else {
 1897|  3.92k|            n_keys = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1898|  3.92k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1898:17): [True: 89, False: 3.83k]
  ------------------
 1899|     89|               return;
 1900|  3.92k|         }
 1901|       |
 1902|  21.2k|         for (uint64_t key_idx = 0; key_idx < n_keys; ++key_idx) {
  ------------------
  |  Branch (1902:37): [True: 18.1k, False: 3.10k]
  ------------------
 1903|  18.1k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1903:17): [True: 595, False: 17.5k]
  ------------------
 1904|    595|               ctx.error = error_code::unexpected_end;
 1905|    595|               return;
 1906|    595|            }
 1907|       |
 1908|       |            // Check for break in indefinite map
 1909|  17.5k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1909:17): [True: 10.7k, False: 6.79k]
  ------------------
 1910|  10.7k|               uint8_t peek;
 1911|  10.7k|               std::memcpy(&peek, it, 1);
 1912|  10.7k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1912:20): [True: 18, False: 10.7k]
  ------------------
 1913|     18|                  ++it;
 1914|     18|                  break;
 1915|     18|               }
 1916|  10.7k|            }
 1917|       |
 1918|       |            // Read key
 1919|  17.5k|            uint8_t key_initial;
 1920|  17.5k|            std::memcpy(&key_initial, it, 1);
 1921|  17.5k|            ++it;
 1922|       |
 1923|  17.5k|            const uint8_t key_major = get_major_type(key_initial);
 1924|  17.5k|            const uint8_t key_info = get_additional_info(key_initial);
 1925|       |
 1926|  17.5k|            if (key_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (1926:17): [True: 1.66k, False: 15.9k]
  ------------------
 1927|  1.66k|               ctx.error = error_code::syntax_error;
 1928|  1.66k|               return;
 1929|  1.66k|            }
 1930|       |
 1931|  15.9k|            uint64_t key_len = cbor_detail::decode_arg(ctx, it, end, key_info);
 1932|  15.9k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1932:17): [True: 160, False: 15.7k]
  ------------------
 1933|    160|               return;
 1934|       |
 1935|  15.7k|            if (static_cast<uint64_t>(end - it) < key_len) [[unlikely]] {
  ------------------
  |  Branch (1935:17): [True: 278, False: 15.4k]
  ------------------
 1936|    278|               ctx.error = error_code::unexpected_end;
 1937|    278|               return;
 1938|    278|            }
 1939|       |
 1940|  15.4k|            if constexpr (N > 0) {
 1941|  15.4k|               static constexpr auto HashInfo = hash_info<T>;
 1942|       |
 1943|       |               // decode_hash_with_size pre-screens the key length against [min_length, max_length],
 1944|       |               // so no call-site length filter is needed here (the buffer bound above still applies).
 1945|  15.4k|               const auto index = decode_hash_with_size<CBOR, T, HashInfo, HashInfo.type>::op(it, end, key_len);
 1946|       |
 1947|  15.4k|               if (index < N) [[likely]] {
  ------------------
  |  Branch (1947:20): [True: 15.1k, False: 334]
  ------------------
 1948|  15.1k|                  const sv key{reinterpret_cast<const char*>(it), static_cast<size_t>(key_len)};
 1949|  15.1k|                  it += key_len;
 1950|       |
 1951|  15.1k|                  visit<N>(
 1952|  15.1k|                     [&]<size_t I>() {
 1953|  15.1k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1954|  15.1k|                        static constexpr auto Length = TargetKey.size();
 1955|  15.1k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
 1956|       |                           // An `else` branch rather than an early return, so a skipped field's reader
 1957|       |                           // is never instantiated -- see `skipped_by_meta`.
 1958|  15.1k|                           if constexpr (skipped_by_meta<T, I, operation::parse>) {
 1959|  15.1k|                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1960|  15.1k|                           }
 1961|  15.1k|                           else if constexpr (reflectable<T>) {
 1962|  15.1k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1963|  15.1k|                           }
 1964|  15.1k|                           else {
 1965|  15.1k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1966|  15.1k|                           }
 1967|  15.1k|                        }
 1968|  15.1k|                        else if (is_tag_key<TagKey>(key)) {
 1969|  15.1k|                           skip_value<CBOR>::op<Opts>(ctx, it, end);
 1970|  15.1k|                           if (bool(ctx.error)) [[unlikely]]
 1971|  15.1k|                              return;
 1972|  15.1k|                        }
 1973|  15.1k|                        else {
 1974|  15.1k|                           if constexpr (Opts.error_on_unknown_keys) {
 1975|  15.1k|                              ctx.error = error_code::unknown_key;
 1976|  15.1k|                              return;
 1977|  15.1k|                           }
 1978|  15.1k|                           else {
 1979|  15.1k|                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1980|  15.1k|                              if (bool(ctx.error)) [[unlikely]]
 1981|  15.1k|                                 return;
 1982|  15.1k|                           }
 1983|  15.1k|                        }
 1984|  15.1k|                     },
 1985|  15.1k|                     index);
 1986|       |
 1987|  15.1k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1987:23): [True: 2.72k, False: 12.4k]
  ------------------
 1988|  2.72k|                     return;
 1989|  15.1k|               }
 1990|    334|               else [[unlikely]] {
 1991|    334|                  const sv unmatched{reinterpret_cast<const char*>(it), static_cast<size_t>(key_len)};
 1992|    334|                  if (is_tag_key<TagKey>(unmatched)) {
  ------------------
  |  Branch (1992:23): [True: 0, False: 334]
  ------------------
 1993|      0|                     it += key_len;
 1994|      0|                     skip_value<CBOR>::op<Opts>(ctx, it, end);
 1995|      0|                     if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1995:26): [True: 0, False: 0]
  ------------------
 1996|      0|                        return;
 1997|      0|                  }
 1998|    334|                  else if constexpr (Opts.error_on_unknown_keys) {
 1999|    334|                     ctx.error = error_code::unknown_key;
 2000|    334|                     return;
 2001|       |                  }
 2002|       |                  else {
 2003|       |                     it += key_len;
 2004|       |                     skip_value<CBOR>::op<Opts>(ctx, it, end);
 2005|       |                     if (bool(ctx.error)) [[unlikely]]
 2006|       |                        return;
 2007|       |                  }
 2008|    334|               }
 2009|       |            }
 2010|       |            else if (is_tag_key<TagKey>(sv{reinterpret_cast<const char*>(it), static_cast<size_t>(key_len)})) {
 2011|       |               it += key_len;
 2012|       |               skip_value<CBOR>::op<Opts>(ctx, it, end);
 2013|       |               if (bool(ctx.error)) [[unlikely]]
 2014|       |                  return;
 2015|       |            }
 2016|       |            else if constexpr (Opts.error_on_unknown_keys) {
 2017|       |               ctx.error = error_code::unknown_key;
 2018|       |               return;
 2019|       |            }
 2020|       |            else {
 2021|       |               it += key_len;
 2022|       |               skip_value<CBOR>::op<Opts>(ctx, it, end);
 2023|       |               if (bool(ctx.error)) [[unlikely]]
 2024|       |                  return;
 2025|       |            }
 2026|  15.4k|         }
 2027|       |
 2028|  3.11k|         check_self_constraint<CBOR, Opts>(value, ctx);
 2029|  3.11k|      }
_ZN3glz11cbor_detail10decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   32|   162k|      {
   33|   162k|         using namespace cbor;
   34|       |
   35|   162k|         if (additional_info < 24) {
  ------------------
  |  Branch (35:14): [True: 30.1k, False: 132k]
  ------------------
   36|  30.1k|            return additional_info;
   37|  30.1k|         }
   38|       |
   39|   132k|         switch (additional_info) {
   40|   121k|         case info::uint8_follows: {
  ------------------
  |  Branch (40:10): [True: 121k, False: 10.2k]
  ------------------
   41|   121k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (41:17): [True: 35, False: 121k]
  ------------------
   42|     35|               ctx.error = error_code::unexpected_end;
   43|     35|               return 0;
   44|     35|            }
   45|   121k|            uint8_t val;
   46|   121k|            std::memcpy(&val, it, 1);
   47|   121k|            ++it;
   48|   121k|            return val;
   49|   121k|         }
   50|  3.58k|         case info::uint16_follows: {
  ------------------
  |  Branch (50:10): [True: 3.58k, False: 128k]
  ------------------
   51|  3.58k|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (51:17): [True: 59, False: 3.53k]
  ------------------
   52|     59|               ctx.error = error_code::unexpected_end;
   53|     59|               return 0;
   54|     59|            }
   55|  3.53k|            uint16_t val;
   56|  3.53k|            std::memcpy(&val, it, 2);
   57|  3.53k|            if constexpr (std::endian::native == std::endian::little) {
   58|  3.53k|               val = std::byteswap(val);
   59|  3.53k|            }
   60|  3.53k|            it += 2;
   61|  3.53k|            return val;
   62|  3.58k|         }
   63|  2.94k|         case info::uint32_follows: {
  ------------------
  |  Branch (63:10): [True: 2.94k, False: 129k]
  ------------------
   64|  2.94k|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (64:17): [True: 156, False: 2.78k]
  ------------------
   65|    156|               ctx.error = error_code::unexpected_end;
   66|    156|               return 0;
   67|    156|            }
   68|  2.78k|            uint32_t val;
   69|  2.78k|            std::memcpy(&val, it, 4);
   70|  2.78k|            if constexpr (std::endian::native == std::endian::little) {
   71|  2.78k|               val = std::byteswap(val);
   72|  2.78k|            }
   73|  2.78k|            it += 4;
   74|  2.78k|            return val;
   75|  2.94k|         }
   76|  3.66k|         case info::uint64_follows: {
  ------------------
  |  Branch (76:10): [True: 3.66k, False: 128k]
  ------------------
   77|  3.66k|            if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (77:17): [True: 492, False: 3.17k]
  ------------------
   78|    492|               ctx.error = error_code::unexpected_end;
   79|    492|               return 0;
   80|    492|            }
   81|  3.17k|            uint64_t val;
   82|  3.17k|            std::memcpy(&val, it, 8);
   83|  3.17k|            if constexpr (std::endian::native == std::endian::little) {
   84|  3.17k|               val = std::byteswap(val);
   85|  3.17k|            }
   86|  3.17k|            it += 8;
   87|  3.17k|            return val;
   88|  3.66k|         }
   89|    100|         default:
  ------------------
  |  Branch (89:10): [True: 100, False: 132k]
  ------------------
   90|    100|            ctx.error = error_code::syntax_error;
   91|    100|            return 0;
   92|   132k|         }
   93|   132k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS5_ILm1EEEEES1_TkNS_10is_contextENS_7contextEPKcS9_EEvRT1_RT2_RT3_T4_ENKUlTnmvE_clILm0EEEDav:
 1952|  4.49k|                     [&]<size_t I>() {
 1953|  4.49k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1954|  4.49k|                        static constexpr auto Length = TargetKey.size();
 1955|  4.49k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1955:29): [True: 4.49k, False: 4]
  |  Branch (1955:52): [True: 4.49k, False: 0]
  ------------------
 1956|       |                           // An `else` branch rather than an early return, so a skipped field's reader
 1957|       |                           // is never instantiated -- see `skipped_by_meta`.
 1958|       |                           if constexpr (skipped_by_meta<T, I, operation::parse>) {
 1959|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1960|       |                           }
 1961|  4.49k|                           else if constexpr (reflectable<T>) {
 1962|  4.49k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1963|       |                           }
 1964|       |                           else {
 1965|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1966|       |                           }
 1967|  4.49k|                        }
 1968|      4|                        else if (is_tag_key<TagKey>(key)) {
  ------------------
  |  Branch (1968:34): [True: 0, False: 4]
  ------------------
 1969|      0|                           skip_value<CBOR>::op<Opts>(ctx, it, end);
 1970|      0|                           if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1970:32): [True: 0, False: 0]
  ------------------
 1971|      0|                              return;
 1972|      0|                        }
 1973|      4|                        else {
 1974|      4|                           if constexpr (Opts.error_on_unknown_keys) {
 1975|      4|                              ctx.error = error_code::unknown_key;
 1976|      4|                              return;
 1977|       |                           }
 1978|       |                           else {
 1979|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1980|       |                              if (bool(ctx.error)) [[unlikely]]
 1981|       |                                 return;
 1982|       |                           }
 1983|      4|                        }
 1984|  4.49k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEERiTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  131|  4.49k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  4.49k|         else {
  141|  4.49k|            using V = std::remove_cvref_t<T>;
  142|  4.49k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  4.49k|                                             end);
  144|  4.49k|         }
  145|  4.49k|      }
_ZN3glz4fromILj2EiE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEEiTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  391|  4.49k|      {
  392|  4.49k|         using namespace cbor;
  393|       |
  394|  4.49k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (394:14): [True: 8, False: 4.48k]
  ------------------
  395|      8|            ctx.error = error_code::unexpected_end;
  396|      8|            return;
  397|      8|         }
  398|       |
  399|  4.48k|         uint8_t initial;
  400|  4.48k|         std::memcpy(&initial, it, 1);
  401|  4.48k|         ++it;
  402|       |
  403|  4.48k|         const uint8_t major_type = get_major_type(initial);
  404|  4.48k|         const uint8_t additional_info = get_additional_info(initial);
  405|       |
  406|  4.48k|         if (major_type == major::uint) {
  ------------------
  |  Branch (406:14): [True: 2.06k, False: 2.42k]
  ------------------
  407|  2.06k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  408|  2.06k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (408:17): [True: 61, False: 1.99k]
  ------------------
  409|     61|               return;
  410|       |
  411|       |            // Range check: n must fit in T's positive range
  412|  1.99k|            constexpr auto max_val = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  413|  1.99k|            if (n > max_val) [[unlikely]] {
  ------------------
  |  Branch (413:17): [True: 83, False: 1.91k]
  ------------------
  414|     83|               ctx.error = error_code::parse_number_failure;
  415|     83|               return;
  416|     83|            }
  417|  1.91k|            value = static_cast<T>(n);
  418|  1.91k|         }
  419|  2.42k|         else if (major_type == major::nint) {
  ------------------
  |  Branch (419:19): [True: 2.27k, False: 152]
  ------------------
  420|  2.27k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  421|  2.27k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (421:17): [True: 87, False: 2.18k]
  ------------------
  422|     87|               return;
  423|       |
  424|       |            // CBOR negative value = -1 - n
  425|       |            // For T's range [-2^(bits-1), 2^(bits-1)-1], max valid n = 2^(bits-1) - 1
  426|  2.18k|            constexpr auto max_n = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  427|       |
  428|  2.18k|            if (n > max_n) [[unlikely]] {
  ------------------
  |  Branch (428:17): [True: 93, False: 2.09k]
  ------------------
  429|     93|               ctx.error = error_code::parse_number_failure;
  430|     93|               return;
  431|     93|            }
  432|       |
  433|       |            // Safe computation using two's complement identity:
  434|       |            // ~n = -1 - n (bitwise NOT)
  435|  2.09k|            value = static_cast<T>(~n);
  436|  2.09k|         }
  437|    152|         else [[unlikely]] {
  438|    152|            ctx.error = error_code::syntax_error;
  439|    152|         }
  440|  4.48k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS5_ILm1EEEEES1_TkNS_10is_contextENS_7contextEPKcS9_EEvRT1_RT2_RT3_T4_ENKUlTnmvE_clILm1EEEDav:
 1952|  2.74k|                     [&]<size_t I>() {
 1953|  2.74k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1954|  2.74k|                        static constexpr auto Length = TargetKey.size();
 1955|  2.74k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1955:29): [True: 2.73k, False: 10]
  |  Branch (1955:52): [True: 2.73k, False: 0]
  ------------------
 1956|       |                           // An `else` branch rather than an early return, so a skipped field's reader
 1957|       |                           // is never instantiated -- see `skipped_by_meta`.
 1958|       |                           if constexpr (skipped_by_meta<T, I, operation::parse>) {
 1959|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1960|       |                           }
 1961|  2.73k|                           else if constexpr (reflectable<T>) {
 1962|  2.73k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1963|       |                           }
 1964|       |                           else {
 1965|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1966|       |                           }
 1967|  2.73k|                        }
 1968|     10|                        else if (is_tag_key<TagKey>(key)) {
  ------------------
  |  Branch (1968:34): [True: 0, False: 10]
  ------------------
 1969|      0|                           skip_value<CBOR>::op<Opts>(ctx, it, end);
 1970|      0|                           if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1970:32): [True: 0, False: 0]
  ------------------
 1971|      0|                              return;
 1972|      0|                        }
 1973|     10|                        else {
 1974|     10|                           if constexpr (Opts.error_on_unknown_keys) {
 1975|     10|                              ctx.error = error_code::unknown_key;
 1976|     10|                              return;
 1977|       |                           }
 1978|       |                           else {
 1979|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1980|       |                              if (bool(ctx.error)) [[unlikely]]
 1981|       |                                 return;
 1982|       |                           }
 1983|     10|                        }
 1984|  2.74k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEERdTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  131|  2.73k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  2.73k|         else {
  141|  2.73k|            using V = std::remove_cvref_t<T>;
  142|  2.73k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  2.73k|                                             end);
  144|  2.73k|         }
  145|  2.73k|      }
_ZN3glz4fromILj2EdE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEEdTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  449|  2.73k|      {
  450|  2.73k|         using namespace cbor;
  451|       |
  452|  2.73k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (452:14): [True: 7, False: 2.72k]
  ------------------
  453|      7|            ctx.error = error_code::unexpected_end;
  454|      7|            return;
  455|      7|         }
  456|       |
  457|  2.72k|         uint8_t initial;
  458|  2.72k|         std::memcpy(&initial, it, 1);
  459|  2.72k|         ++it;
  460|       |
  461|  2.72k|         const uint8_t major_type = get_major_type(initial);
  462|  2.72k|         const uint8_t additional_info = get_additional_info(initial);
  463|       |
  464|       |         // An integer is a number, and a floating point target is the only alternative wide enough to
  465|       |         // hold a magnitude past int64_t. Rejecting the integer major types here left a CBOR integer
  466|       |         // too large for any integer target with nowhere to go, and matches what MessagePack's
  467|       |         // floating point reader has always accepted. It is a conversion, though: variant resolution
  468|       |         // runs a strict pass first so `double` cannot claim a value a later integer alternative
  469|       |         // holds exactly.
  470|  2.72k|         if (check_allow_conversions(Opts) && (major_type == major::uint || major_type == major::nint)) {
  ------------------
  |  Branch (470:14): [True: 2.72k, Folded]
  |  Branch (470:48): [True: 781, False: 1.94k]
  |  Branch (470:77): [True: 652, False: 1.29k]
  ------------------
  471|  1.43k|            const uint64_t arg = cbor_detail::decode_arg(ctx, it, end, additional_info);
  472|  1.43k|            if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (472:17): [True: 25, False: 1.40k]
  ------------------
  473|     25|               return;
  474|     25|            }
  475|  1.40k|            if (major_type == major::nint) {
  ------------------
  |  Branch (475:17): [True: 631, False: 777]
  ------------------
  476|       |               // A negative head encodes -1 - arg, which runs past int64_t once arg does.
  477|    631|               value = static_cast<T>(-1.0 - static_cast<double>(arg));
  478|    631|            }
  479|    777|            else {
  480|    777|               value = static_cast<T>(arg);
  481|    777|            }
  482|  1.40k|            return;
  483|  1.43k|         }
  484|       |
  485|  1.29k|         if (major_type != major::simple) [[unlikely]] {
  ------------------
  |  Branch (485:14): [True: 20, False: 1.27k]
  ------------------
  486|     20|            ctx.error = error_code::syntax_error;
  487|     20|            return;
  488|     20|         }
  489|       |
  490|  1.27k|         switch (additional_info) {
  491|    686|         case simple::float16: {
  ------------------
  |  Branch (491:10): [True: 686, False: 588]
  ------------------
  492|    686|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (492:17): [True: 18, False: 668]
  ------------------
  493|     18|               ctx.error = error_code::unexpected_end;
  494|     18|               return;
  495|     18|            }
  496|    668|            uint16_t half;
  497|    668|            std::memcpy(&half, it, 2);
  498|    668|            if constexpr (std::endian::native == std::endian::little) {
  499|    668|               half = std::byteswap(half);
  500|    668|            }
  501|    668|            it += 2;
  502|    668|            value = static_cast<T>(decode_half(half));
  503|    668|            break;
  504|    686|         }
  505|    328|         case simple::float32: {
  ------------------
  |  Branch (505:10): [True: 328, False: 946]
  ------------------
  506|    328|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (506:17): [True: 6, False: 322]
  ------------------
  507|      6|               ctx.error = error_code::unexpected_end;
  508|      6|               return;
  509|      6|            }
  510|    322|            uint32_t bits;
  511|    322|            std::memcpy(&bits, it, 4);
  512|    322|            if constexpr (std::endian::native == std::endian::little) {
  513|    322|               bits = std::byteswap(bits);
  514|    322|            }
  515|    322|            float f;
  516|    322|            std::memcpy(&f, &bits, 4);
  517|    322|            it += 4;
  518|    322|            value = static_cast<T>(f);
  519|    322|            break;
  520|    328|         }
  521|    254|         case simple::float64: {
  ------------------
  |  Branch (521:10): [True: 254, False: 1.02k]
  ------------------
  522|       |            if constexpr (sizeof(T) < sizeof(double) && not check_allow_conversions(Opts)) {
  523|       |               // Narrowing a float64 rounds it, so without allow_conversions a narrower target rejects
  524|       |               // one. Variant resolution relies on this: a `float` alternative must not claim a value
  525|       |               // a later `double` alternative holds exactly.
  526|       |               ctx.error = error_code::syntax_error;
  527|       |            }
  528|    254|            else {
  529|    254|               if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (529:20): [True: 8, False: 246]
  ------------------
  530|      8|                  ctx.error = error_code::unexpected_end;
  531|      8|                  return;
  532|      8|               }
  533|    246|               uint64_t bits;
  534|    246|               std::memcpy(&bits, it, 8);
  535|    246|               if constexpr (std::endian::native == std::endian::little) {
  536|    246|                  bits = std::byteswap(bits);
  537|    246|               }
  538|    246|               double d;
  539|    246|               std::memcpy(&d, &bits, 8);
  540|    246|               it += 8;
  541|    246|               value = static_cast<T>(d);
  542|    246|            }
  543|      0|            break;
  544|    328|         }
  545|      6|         default:
  ------------------
  |  Branch (545:10): [True: 6, False: 1.26k]
  ------------------
  546|      6|            ctx.error = error_code::syntax_error;
  547|  1.27k|         }
  548|  1.27k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS5_ILm1EEEEES1_TkNS_10is_contextENS_7contextEPKcS9_EEvRT1_RT2_RT3_T4_ENKUlTnmvE_clILm2EEEDav:
 1952|  3.02k|                     [&]<size_t I>() {
 1953|  3.02k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1954|  3.02k|                        static constexpr auto Length = TargetKey.size();
 1955|  3.02k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1955:29): [True: 3.01k, False: 6]
  |  Branch (1955:52): [True: 2.91k, False: 104]
  ------------------
 1956|       |                           // An `else` branch rather than an early return, so a skipped field's reader
 1957|       |                           // is never instantiated -- see `skipped_by_meta`.
 1958|       |                           if constexpr (skipped_by_meta<T, I, operation::parse>) {
 1959|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1960|       |                           }
 1961|  2.91k|                           else if constexpr (reflectable<T>) {
 1962|  2.91k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1963|       |                           }
 1964|       |                           else {
 1965|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1966|       |                           }
 1967|  2.91k|                        }
 1968|    110|                        else if (is_tag_key<TagKey>(key)) {
  ------------------
  |  Branch (1968:34): [True: 0, False: 110]
  ------------------
 1969|      0|                           skip_value<CBOR>::op<Opts>(ctx, it, end);
 1970|      0|                           if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1970:32): [True: 0, False: 0]
  ------------------
 1971|      0|                              return;
 1972|      0|                        }
 1973|    110|                        else {
 1974|    110|                           if constexpr (Opts.error_on_unknown_keys) {
 1975|    110|                              ctx.error = error_code::unknown_key;
 1976|    110|                              return;
 1977|       |                           }
 1978|       |                           else {
 1979|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1980|       |                              if (bool(ctx.error)) [[unlikely]]
 1981|       |                                 return;
 1982|       |                           }
 1983|    110|                        }
 1984|  3.02k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEETkNS_10is_contextERNS_7contextERPKcSF_EEvOT0_OT1_OT2_T3_:
  131|  2.91k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  2.91k|         else {
  141|  2.91k|            using V = std::remove_cvref_t<T>;
  142|  2.91k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  2.91k|                                             end);
  144|  2.91k|         }
  145|  2.91k|      }
_ZN3glz4fromILj2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEES7_TkNS_10is_contextENS_7contextEPKcSD_EEvRT0_RT1_RT2_T3_:
  557|  2.91k|      {
  558|  2.91k|         using namespace cbor;
  559|       |
  560|  2.91k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (560:14): [True: 5, False: 2.90k]
  ------------------
  561|      5|            ctx.error = error_code::unexpected_end;
  562|      5|            return;
  563|      5|         }
  564|       |
  565|  2.90k|         uint8_t initial;
  566|  2.90k|         std::memcpy(&initial, it, 1);
  567|  2.90k|         ++it;
  568|       |
  569|  2.90k|         const uint8_t major_type = get_major_type(initial);
  570|  2.90k|         const uint8_t additional_info = get_additional_info(initial);
  571|       |
  572|  2.90k|         if (major_type != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (572:14): [True: 11, False: 2.89k]
  ------------------
  573|     11|            ctx.error = error_code::syntax_error;
  574|     11|            return;
  575|     11|         }
  576|       |
  577|  2.89k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (577:14): [True: 1.28k, False: 1.61k]
  ------------------
  578|       |            // Indefinite-length text string
  579|       |            if constexpr (string_view_t<T>) {
  580|       |               // Cannot read indefinite string into string_view
  581|       |               ctx.error = error_code::syntax_error;
  582|       |               return;
  583|       |            }
  584|  1.28k|            else {
  585|  1.28k|               if constexpr (resizable<T>) {
  586|  1.28k|                  value.clear();
  587|  1.28k|               }
  588|  1.28k|               size_t offset = 0; // fill position for fixed-size targets
  589|  1.28k|               uint64_t total = 0;
  590|   126k|               while (true) {
  ------------------
  |  Branch (590:23): [True: 126k, Folded]
  ------------------
  591|   126k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (591:23): [True: 96, False: 126k]
  ------------------
  592|     96|                     ctx.error = error_code::unexpected_end;
  593|     96|                     return;
  594|     96|                  }
  595|       |
  596|   126k|                  uint8_t chunk_initial;
  597|   126k|                  std::memcpy(&chunk_initial, it, 1);
  598|       |
  599|       |                  // Check for break code
  600|   126k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (600:23): [True: 700, False: 125k]
  ------------------
  601|    700|                     ++it;
  602|    700|                     break;
  603|    700|                  }
  604|       |
  605|   125k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  606|   125k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  607|       |
  608|       |                  // Chunks must be text strings with definite length
  609|   125k|                  if (chunk_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (609:23): [True: 138, False: 125k]
  ------------------
  610|    138|                     ctx.error = error_code::syntax_error;
  611|    138|                     return;
  612|    138|                  }
  613|   125k|                  if (chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (613:23): [True: 4, False: 125k]
  ------------------
  614|      4|                     ctx.error = error_code::syntax_error;
  615|      4|                     return;
  616|      4|                  }
  617|       |
  618|   125k|                  ++it;
  619|   125k|                  uint64_t chunk_len = cbor_detail::decode_arg(ctx, it, end, chunk_info);
  620|   125k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (620:23): [True: 87, False: 125k]
  ------------------
  621|     87|                     return;
  622|       |
  623|   125k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (623:23): [True: 257, False: 125k]
  ------------------
  624|    257|                     ctx.error = error_code::unexpected_end;
  625|    257|                     return;
  626|    257|                  }
  627|       |
  628|       |                  // A break code rather than a length ends this text string, so the caller's limit is
  629|       |                  // enforced against the running total instead of a single header.
  630|   125k|                  total += chunk_len;
  631|       |                  if constexpr (check_max_string_length(Opts) > 0) {
  632|       |                     if (total > check_max_string_length(Opts)) [[unlikely]] {
  633|       |                        ctx.error = error_code::invalid_length;
  634|       |                        return;
  635|       |                     }
  636|       |                  }
  637|       |                  if constexpr (has_runtime_max_string_length<std::decay_t<decltype(ctx)>>) {
  638|       |                     if (ctx.max_string_length > 0 && total > ctx.max_string_length) [[unlikely]] {
  639|       |                        ctx.error = error_code::invalid_length;
  640|       |                        return;
  641|       |                     }
  642|       |                  }
  643|       |
  644|       |                  if constexpr (array_char_t<T>) {
  645|       |                     // Fixed-size std::array<char, N>: accumulate with bounds checking.
  646|       |                     if (offset + chunk_len > value.size()) [[unlikely]] {
  647|       |                        ctx.error = error_code::syntax_error;
  648|       |                        return;
  649|       |                     }
  650|       |                     std::memcpy(value.data() + offset, it, chunk_len);
  651|       |                     offset += static_cast<size_t>(chunk_len);
  652|       |                  }
  653|   125k|                  else {
  654|   125k|                     value.append(reinterpret_cast<const char*>(it), chunk_len);
  655|   125k|                  }
  656|   125k|                  it += chunk_len;
  657|   125k|               }
  658|       |               if constexpr (array_char_t<T>) {
  659|       |                  // Zero-fill any unused tail of the fixed-size buffer.
  660|       |                  if (offset < value.size()) {
  661|       |                     std::memset(value.data() + offset, 0, value.size() - offset);
  662|       |                  }
  663|       |               }
  664|    700|            }
  665|  1.28k|         }
  666|  1.61k|         else {
  667|       |            // Definite-length text string
  668|  1.61k|            uint64_t length = cbor_detail::decode_arg(ctx, it, end, additional_info);
  669|  1.61k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (669:17): [True: 82, False: 1.53k]
  ------------------
  670|     82|               return;
  671|       |
  672|  1.53k|            if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (672:17): [True: 181, False: 1.35k]
  ------------------
  673|    181|               ctx.error = error_code::unexpected_end;
  674|    181|               return;
  675|    181|            }
  676|       |
  677|       |            // Check user-configured string length limit
  678|       |            if constexpr (check_max_string_length(Opts) > 0) {
  679|       |               if (length > check_max_string_length(Opts)) [[unlikely]] {
  680|       |                  ctx.error = error_code::invalid_length;
  681|       |                  return;
  682|       |               }
  683|       |            }
  684|       |            if constexpr (has_runtime_max_string_length<std::decay_t<decltype(ctx)>>) {
  685|       |               if (ctx.max_string_length > 0 && length > ctx.max_string_length) [[unlikely]] {
  686|       |                  ctx.error = error_code::invalid_length;
  687|       |                  return;
  688|       |               }
  689|       |            }
  690|       |
  691|       |            if constexpr (string_view_t<T>) {
  692|       |               value = {reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  693|       |            }
  694|       |            else if constexpr (array_char_t<T>) {
  695|       |               // Fixed-size std::array<char, N>: bounds-check, copy, zero-fill remainder.
  696|       |               if (length > value.size()) [[unlikely]] {
  697|       |                  ctx.error = error_code::syntax_error;
  698|       |                  return;
  699|       |               }
  700|       |               std::memcpy(value.data(), it, length);
  701|       |               if (length < value.size()) {
  702|       |                  std::memset(value.data() + static_cast<size_t>(length), 0,
  703|       |                              value.size() - static_cast<size_t>(length));
  704|       |               }
  705|       |            }
  706|  1.35k|            else {
  707|  1.35k|               value.assign(reinterpret_cast<const char*>(it), length);
  708|  1.35k|            }
  709|  1.35k|            it += length;
  710|  1.35k|         }
  711|  2.89k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS5_ILm1EEEEES1_TkNS_10is_contextENS_7contextEPKcS9_EEvRT1_RT2_RT3_T4_ENKUlTnmvE_clILm3EEEDav:
 1952|  4.88k|                     [&]<size_t I>() {
 1953|  4.88k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1954|  4.88k|                        static constexpr auto Length = TargetKey.size();
 1955|  4.88k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1955:29): [True: 4.86k, False: 15]
  |  Branch (1955:52): [True: 4.82k, False: 45]
  ------------------
 1956|       |                           // An `else` branch rather than an early return, so a skipped field's reader
 1957|       |                           // is never instantiated -- see `skipped_by_meta`.
 1958|       |                           if constexpr (skipped_by_meta<T, I, operation::parse>) {
 1959|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1960|       |                           }
 1961|  4.82k|                           else if constexpr (reflectable<T>) {
 1962|  4.82k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1963|       |                           }
 1964|       |                           else {
 1965|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1966|       |                           }
 1967|  4.82k|                        }
 1968|     60|                        else if (is_tag_key<TagKey>(key)) {
  ------------------
  |  Branch (1968:34): [True: 0, False: 60]
  ------------------
 1969|      0|                           skip_value<CBOR>::op<Opts>(ctx, it, end);
 1970|      0|                           if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1970:32): [True: 0, False: 0]
  ------------------
 1971|      0|                              return;
 1972|      0|                        }
 1973|     60|                        else {
 1974|     60|                           if constexpr (Opts.error_on_unknown_keys) {
 1975|     60|                              ctx.error = error_code::unknown_key;
 1976|     60|                              return;
 1977|       |                           }
 1978|       |                           else {
 1979|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1980|       |                              if (bool(ctx.error)) [[unlikely]]
 1981|       |                                 return;
 1982|       |                           }
 1983|     60|                        }
 1984|  4.88k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEERNSt3__15arrayImLm3EEETkNS_10is_contextERNS_7contextERPKcSB_EEvOT0_OT1_OT2_T3_:
  131|  4.82k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  4.82k|         else {
  141|  4.82k|            using V = std::remove_cvref_t<T>;
  142|  4.82k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  4.82k|                                             end);
  144|  4.82k|         }
  145|  4.82k|      }
_ZN3glz4fromILj2ENSt3__15arrayImLm3EEEE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEES3_TkNS_10is_contextENS_7contextEPKcS9_EEvRT0_RT1_RT2_T3_:
 1103|  4.82k|      {
 1104|  4.82k|         using namespace cbor;
 1105|  4.82k|         using V = range_value_t<std::remove_cvref_t<T>>;
 1106|       |
 1107|       |         // Set-like containers (std::set, std::unordered_set, ...) can neither be resized nor
 1108|       |         // back-inserted into: each element is parsed into a temporary and then emplaced.
 1109|  4.82k|         constexpr bool set_like = !resizable<T> && !emplace_backable<T> && emplaceable<T>;
  ------------------
  |  Branch (1109:36): [True: 0, Folded]
  |  Branch (1109:53): [True: 0, Folded]
  |  Branch (1109:77): [Folded, False: 0]
  ------------------
 1110|       |         // Everything else either has a fixed size the input must fit, or grows to match the input.
 1111|       |         // The definite- and indefinite-length branches below must agree on which is which, or the
 1112|       |         // same container would accept one framing of an array and reject the other.
 1113|  4.82k|         constexpr bool growable = resizable<T> || emplace_backable<T> || set_like;
  ------------------
  |  Branch (1113:36): [Folded, False: 0]
  |  Branch (1113:52): [Folded, False: 0]
  |  Branch (1113:75): [Folded, False: 0]
  ------------------
 1114|       |
 1115|  4.82k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1115:14): [True: 4, False: 4.82k]
  ------------------
 1116|      4|            ctx.error = error_code::unexpected_end;
 1117|      4|            return;
 1118|      4|         }
 1119|       |
 1120|  4.82k|         uint8_t initial;
 1121|  4.82k|         std::memcpy(&initial, it, 1);
 1122|       |
 1123|  4.82k|         const uint8_t major_type = get_major_type(initial);
 1124|  4.82k|         const uint8_t additional_info = get_additional_info(initial);
 1125|       |
 1126|       |         // A byte-like range also accepts a CBOR byte string, which is what the contiguous byte
 1127|       |         // ranges write for the same bytes.
 1128|       |         if constexpr (byte_like<V>) {
 1129|       |            if (major_type == major::bstr) {
 1130|       |               ++it; // consume the initial byte
 1131|       |
 1132|       |               depth_guard guard{ctx};
 1133|       |               if (!guard) [[unlikely]] {
 1134|       |                  return;
 1135|       |               }
 1136|       |
 1137|       |               if constexpr (growable) {
 1138|       |                  value.clear();
 1139|       |               }
 1140|       |
 1141|       |               size_t filled = 0;
 1142|       |               // Only a target that cannot grow is filled in place; growing would invalidate this.
 1143|       |               [[maybe_unused]] decltype(value.begin()) dest{};
 1144|       |               if constexpr (not growable) {
 1145|       |                  dest = value.begin();
 1146|       |               }
 1147|       |               read_byte_string<Opts>(ctx, it, end, additional_info, [&](const uint8_t byte) {
 1148|       |                  if (exceeds_capacity(value, filled + 1, ctx)) [[unlikely]] {
 1149|       |                     return false;
 1150|       |                  }
 1151|       |                  if constexpr (set_like) {
 1152|       |                     value.emplace(static_cast<V>(byte));
 1153|       |                  }
 1154|       |                  else if constexpr (emplace_backable<T>) {
 1155|       |                     value.emplace_back(static_cast<V>(byte));
 1156|       |                  }
 1157|       |                  else if constexpr (resizable<T>) {
 1158|       |                     value.resize(filled + 1);
 1159|       |                     auto slot = value.begin();
 1160|       |                     std::advance(slot, filled);
 1161|       |                     *slot = static_cast<V>(byte);
 1162|       |                  }
 1163|       |                  else {
 1164|       |                     if (filled >= value.size()) [[unlikely]] {
 1165|       |                        ctx.error = error_code::exceeded_static_array_size;
 1166|       |                        return false;
 1167|       |                     }
 1168|       |                     *dest = static_cast<V>(byte);
 1169|       |                     ++dest;
 1170|       |                  }
 1171|       |                  ++filled;
 1172|       |                  return true;
 1173|       |               });
 1174|       |
 1175|       |               if constexpr (!growable) {
 1176|       |                  // Zero-fill any unused tail, as the byte string reader does for std::array.
 1177|       |                  if (not bool(ctx.error)) {
 1178|       |                     for (; filled < value.size(); ++filled, ++dest) {
 1179|       |                        *dest = V{};
 1180|       |                     }
 1181|       |                  }
 1182|       |               }
 1183|       |               return;
 1184|       |            }
 1185|       |         }
 1186|       |
 1187|       |         // Check for RFC 8746 typed array (tag + byte string)
 1188|  4.82k|         if constexpr (num_t<V> && !std::same_as<V, bool>) {
 1189|  4.82k|            if (major_type == major::tag) {
  ------------------
  |  Branch (1189:17): [True: 1.78k, False: 3.03k]
  ------------------
 1190|  1.78k|               ++it; // consume the tag initial byte
 1191|       |
 1192|       |               // Decode the tag number
 1193|  1.78k|               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1194|  1.78k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1194:20): [True: 18, False: 1.76k]
  ------------------
 1195|     18|                  return;
 1196|       |
 1197|       |               // Verify the tag describes exactly this element type, not merely one of its width
 1198|  1.76k|               if (typed_array::matches<V>(typed_array::get_info(tag_num))) {
  ------------------
  |  Branch (1198:20): [True: 1.68k, False: 88]
  ------------------
 1199|       |                  // Read the byte string
 1200|  1.68k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1200:23): [True: 5, False: 1.67k]
  ------------------
 1201|      5|                     ctx.error = error_code::unexpected_end;
 1202|      5|                     return;
 1203|      5|                  }
 1204|       |
 1205|  1.67k|                  uint8_t bstr_initial;
 1206|  1.67k|                  std::memcpy(&bstr_initial, it, 1);
 1207|  1.67k|                  ++it;
 1208|       |
 1209|  1.67k|                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (1209:23): [True: 13, False: 1.66k]
  ------------------
 1210|     13|                     ctx.error = error_code::syntax_error;
 1211|     13|                     return;
 1212|     13|                  }
 1213|       |
 1214|  1.66k|                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
 1215|  1.66k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1215:23): [True: 100, False: 1.56k]
  ------------------
 1216|    100|                     return;
 1217|       |
 1218|  1.56k|                  if (byte_len % sizeof(V) != 0) [[unlikely]] {
  ------------------
  |  Branch (1218:23): [True: 54, False: 1.50k]
  ------------------
 1219|     54|                     ctx.error = error_code::syntax_error;
 1220|     54|                     return;
 1221|     54|                  }
 1222|       |
 1223|  1.50k|                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (1223:23): [True: 173, False: 1.33k]
  ------------------
 1224|    173|                     ctx.error = error_code::unexpected_end;
 1225|    173|                     return;
 1226|    173|                  }
 1227|       |
 1228|  1.33k|                  const size_t count = byte_len / sizeof(V);
 1229|       |
 1230|       |                  // Check user-configured array size limit
 1231|       |                  if constexpr (check_max_array_size(Opts) > 0) {
 1232|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
 1233|       |                        ctx.error = error_code::invalid_length;
 1234|       |                        return;
 1235|       |                     }
 1236|       |                  }
 1237|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1238|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1239|       |                        ctx.error = error_code::invalid_length;
 1240|       |                        return;
 1241|       |                     }
 1242|       |                  }
 1243|       |
 1244|       |                  if constexpr (set_like) {
 1245|       |                     value.clear();
 1246|       |                  }
 1247|       |                  else if constexpr (resizable<T>) {
 1248|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1249|       |                        return;
 1250|       |                     }
 1251|       |                     value.resize(count);
 1252|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1253|       |                        value.shrink_to_fit();
 1254|       |                     }
 1255|       |                  }
 1256|       |                  else if constexpr (emplace_backable<T>) {
 1257|       |                     // Append-only: the count is known, but the only way to reach it is one element at
 1258|       |                     // a time. Growing to count here rather than while filling leaves both fill paths
 1259|       |                     // below writing into storage that already exists.
 1260|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1261|       |                        return;
 1262|       |                     }
 1263|       |                     value.clear();
 1264|       |                     for (size_t i = 0; i < count; ++i) {
 1265|       |                        value.emplace_back();
 1266|       |                     }
 1267|       |                  }
 1268|  1.33k|                  else {
 1269|  1.33k|                     if (count != value.size()) [[unlikely]] {
  ------------------
  |  Branch (1269:26): [True: 63, False: 1.27k]
  ------------------
 1270|     63|                        ctx.error = error_code::exceeded_static_array_size;
 1271|     63|                        return;
 1272|     63|                     }
 1273|  1.33k|                  }
 1274|       |
 1275|       |                  // Check if we need to byteswap
 1276|  1.27k|                  const bool need_swap = typed_array::needs_byteswap(tag_num);
 1277|       |
 1278|  1.33k|                  if constexpr (contiguous<T>) {
 1279|  1.33k|                     if (need_swap && sizeof(V) > 1) {
  ------------------
  |  Branch (1279:26): [True: 910, False: 425]
  |  Branch (1279:39): [True: 0, Folded]
  ------------------
 1280|       |                        // Need to byteswap each element. Written through data() rather than a
 1281|       |                        // subscript: contiguous storage is what this branch relies on, and a
 1282|       |                        // contiguous range need not also be indexable.
 1283|    910|                        auto* dest = value.data();
 1284|  3.64k|                        for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (1284:44): [True: 2.73k, False: 910]
  ------------------
 1285|  2.73k|                           V elem;
 1286|  2.73k|                           std::memcpy(&elem, it, sizeof(V));
 1287|  2.73k|                           cbor_detail::byteswap_element(elem);
 1288|  2.73k|                           dest[i] = elem;
 1289|  2.73k|                           it += sizeof(V);
 1290|  2.73k|                        }
 1291|    910|                     }
 1292|    425|                     else {
 1293|       |                        // Native endianness or single-byte: bulk read
 1294|    425|                        if (byte_len > 0) {
  ------------------
  |  Branch (1294:29): [True: 362, False: 63]
  ------------------
 1295|    362|                           std::memcpy(value.data(), it, byte_len);
 1296|    362|                           it += byte_len;
 1297|    362|                        }
 1298|    425|                     }
 1299|       |                  }
 1300|       |                  else {
 1301|       |                     // std::list, std::set and friends have no contiguous storage to bulk read into,
 1302|       |                     // so each element is decoded on its own.
 1303|       |                     const bool swap_each = need_swap && sizeof(V) > 1;
 1304|       |                     const auto next_element = [&] {
 1305|       |                        V elem;
 1306|       |                        std::memcpy(&elem, it, sizeof(V));
 1307|       |                        if (swap_each) {
 1308|       |                           cbor_detail::byteswap_element(elem);
 1309|       |                        }
 1310|       |                        it += sizeof(V);
 1311|       |                        return elem;
 1312|       |                     };
 1313|       |
 1314|       |                     if constexpr (set_like) {
 1315|       |                        for (size_t i = 0; i < count; ++i) {
 1316|       |                           value.emplace(next_element());
 1317|       |                        }
 1318|       |                     }
 1319|       |                     else {
 1320|       |                        auto dest = value.begin();
 1321|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
 1322|       |                           *dest = next_element();
 1323|       |                        }
 1324|       |                     }
 1325|       |                  }
 1326|  1.33k|                  return; // Done with typed array
 1327|  1.50k|               }
 1328|     88|               else {
 1329|       |                  // Not a matching typed array tag - error
 1330|     88|                  ctx.error = error_code::syntax_error;
 1331|     88|                  return;
 1332|     88|               }
 1333|  1.76k|            }
 1334|  4.82k|         }
 1335|       |
 1336|       |         // Check for complex array (tag 43001 with nested typed array)
 1337|       |         if constexpr (complex_t<V>) {
 1338|       |            if (major_type == major::tag) {
 1339|       |               ++it; // consume the tag initial byte
 1340|       |
 1341|       |               // Decode the tag number
 1342|       |               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1343|       |               if (bool(ctx.error)) [[unlikely]]
 1344|       |                  return;
 1345|       |
 1346|       |               // Check for tag 43001 (complex array)
 1347|       |               if (tag_num == semantic_tag::complex_array) {
 1348|       |                  using Scalar = typename V::value_type;
 1349|       |
 1350|       |                  // Read nested typed array tag
 1351|       |                  if (it >= end) [[unlikely]] {
 1352|       |                     ctx.error = error_code::unexpected_end;
 1353|       |                     return;
 1354|       |                  }
 1355|       |
 1356|       |                  uint8_t ta_initial;
 1357|       |                  std::memcpy(&ta_initial, it, 1);
 1358|       |                  ++it;
 1359|       |
 1360|       |                  if (get_major_type(ta_initial) != major::tag) [[unlikely]] {
 1361|       |                     ctx.error = error_code::syntax_error;
 1362|       |                     return;
 1363|       |                  }
 1364|       |
 1365|       |                  const uint64_t scalar_tag = cbor_detail::decode_arg(ctx, it, end, get_additional_info(ta_initial));
 1366|       |                  if (bool(ctx.error)) [[unlikely]]
 1367|       |                     return;
 1368|       |
 1369|       |                  // Verify the tag describes exactly this scalar type, not merely one of its width
 1370|       |                  if (!typed_array::matches<Scalar>(typed_array::get_info(scalar_tag))) [[unlikely]] {
 1371|       |                     ctx.error = error_code::syntax_error;
 1372|       |                     return;
 1373|       |                  }
 1374|       |
 1375|       |                  // Read the byte string
 1376|       |                  if (it >= end) [[unlikely]] {
 1377|       |                     ctx.error = error_code::unexpected_end;
 1378|       |                     return;
 1379|       |                  }
 1380|       |
 1381|       |                  uint8_t bstr_initial;
 1382|       |                  std::memcpy(&bstr_initial, it, 1);
 1383|       |                  ++it;
 1384|       |
 1385|       |                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
 1386|       |                     ctx.error = error_code::syntax_error;
 1387|       |                     return;
 1388|       |                  }
 1389|       |
 1390|       |                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
 1391|       |                  if (bool(ctx.error)) [[unlikely]]
 1392|       |                     return;
 1393|       |
 1394|       |                  // Each complex has 2 scalars
 1395|       |                  constexpr size_t complex_byte_size = sizeof(V); // sizeof(complex<T>) = 2 * sizeof(T)
 1396|       |                  if (byte_len % complex_byte_size != 0) [[unlikely]] {
 1397|       |                     ctx.error = error_code::syntax_error;
 1398|       |                     return;
 1399|       |                  }
 1400|       |
 1401|       |                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
 1402|       |                     ctx.error = error_code::unexpected_end;
 1403|       |                     return;
 1404|       |                  }
 1405|       |
 1406|       |                  const size_t count = byte_len / complex_byte_size;
 1407|       |
 1408|       |                  // Check user-configured array size limit
 1409|       |                  if constexpr (check_max_array_size(Opts) > 0) {
 1410|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
 1411|       |                        ctx.error = error_code::invalid_length;
 1412|       |                        return;
 1413|       |                     }
 1414|       |                  }
 1415|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1416|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1417|       |                        ctx.error = error_code::invalid_length;
 1418|       |                        return;
 1419|       |                     }
 1420|       |                  }
 1421|       |
 1422|       |                  if constexpr (set_like) {
 1423|       |                     value.clear();
 1424|       |                  }
 1425|       |                  else if constexpr (resizable<T>) {
 1426|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1427|       |                        return;
 1428|       |                     }
 1429|       |                     value.resize(count);
 1430|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1431|       |                        value.shrink_to_fit();
 1432|       |                     }
 1433|       |                  }
 1434|       |                  else if constexpr (emplace_backable<T>) {
 1435|       |                     // Append-only, as above: grow to the known count so the fill paths below only
 1436|       |                     // have to write into elements that already exist.
 1437|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1438|       |                        return;
 1439|       |                     }
 1440|       |                     value.clear();
 1441|       |                     for (size_t i = 0; i < count; ++i) {
 1442|       |                        value.emplace_back();
 1443|       |                     }
 1444|       |                  }
 1445|       |                  else {
 1446|       |                     if (count != value.size()) [[unlikely]] {
 1447|       |                        ctx.error = error_code::exceeded_static_array_size;
 1448|       |                        return;
 1449|       |                     }
 1450|       |                  }
 1451|       |
 1452|       |                  // Check if we need to byteswap
 1453|       |                  const bool need_swap = typed_array::needs_byteswap(scalar_tag);
 1454|       |
 1455|       |                  if constexpr (contiguous<T>) {
 1456|       |                     if (need_swap && sizeof(Scalar) > 1) {
 1457|       |                        // Need to byteswap each scalar in the interleaved data
 1458|       |                        auto* dest = reinterpret_cast<Scalar*>(value.data());
 1459|       |                        const size_t num_scalars = count * 2; // 2 scalars per complex
 1460|       |                        for (size_t i = 0; i < num_scalars; ++i) {
 1461|       |                           Scalar elem;
 1462|       |                           std::memcpy(&elem, it, sizeof(Scalar));
 1463|       |                           cbor_detail::byteswap_element(elem);
 1464|       |                           dest[i] = elem;
 1465|       |                           it += sizeof(Scalar);
 1466|       |                        }
 1467|       |                     }
 1468|       |                     else {
 1469|       |                        // Native endianness or single-byte: bulk read
 1470|       |                        if (byte_len > 0) {
 1471|       |                           std::memcpy(value.data(), it, byte_len);
 1472|       |                           it += byte_len;
 1473|       |                        }
 1474|       |                     }
 1475|       |                  }
 1476|       |                  else {
 1477|       |                     // No contiguous storage to bulk read into, so the interleaved [real, imag] pairs
 1478|       |                     // are reassembled one element at a time.
 1479|       |                     const bool swap_each = need_swap && sizeof(Scalar) > 1;
 1480|       |                     const auto next_element = [&] {
 1481|       |                        Scalar parts[2];
 1482|       |                        std::memcpy(parts, it, sizeof(V));
 1483|       |                        if (swap_each) {
 1484|       |                           cbor_detail::byteswap_element(parts[0]);
 1485|       |                           cbor_detail::byteswap_element(parts[1]);
 1486|       |                        }
 1487|       |                        it += sizeof(V);
 1488|       |                        return V{parts[0], parts[1]};
 1489|       |                     };
 1490|       |
 1491|       |                     if constexpr (set_like) {
 1492|       |                        for (size_t i = 0; i < count; ++i) {
 1493|       |                           value.emplace(next_element());
 1494|       |                        }
 1495|       |                     }
 1496|       |                     else {
 1497|       |                        auto dest = value.begin();
 1498|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
 1499|       |                           *dest = next_element();
 1500|       |                        }
 1501|       |                     }
 1502|       |                  }
 1503|       |                  return; // Done with complex array
 1504|       |               }
 1505|       |               else {
 1506|       |                  // Not a complex array tag - error
 1507|       |                  ctx.error = error_code::syntax_error;
 1508|       |                  return;
 1509|       |               }
 1510|       |            }
 1511|       |         }
 1512|       |
 1513|       |         // Regular CBOR array (major type 4)
 1514|  4.82k|         ++it; // consume the initial byte
 1515|       |
 1516|  4.82k|         if (major_type != major::array) [[unlikely]] {
  ------------------
  |  Branch (1516:14): [True: 8, False: 4.81k]
  ------------------
 1517|      8|            ctx.error = error_code::syntax_error;
 1518|      8|            return;
 1519|      8|         }
 1520|       |
 1521|       |         // The typed and complex array forms above are flat; only this branch descends into elements.
 1522|  4.81k|         depth_guard guard{ctx};
 1523|  4.81k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1523:14): [True: 0, False: 4.81k]
  ------------------
 1524|      0|            return;
 1525|      0|         }
 1526|       |
 1527|  4.81k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1527:14): [True: 1.06k, False: 3.74k]
  ------------------
 1528|       |            // Indefinite-length array. The resizable-only path below grows with resize() from index
 1529|       |            // zero, which drops any prior contents on its own, so it needs no clear() of its own.
 1530|       |            if constexpr (emplace_backable<T> || set_like) {
 1531|       |               value.clear();
 1532|       |            }
 1533|       |            // A target that cannot grow is filled in place, and it is walked with an iterator rather
 1534|       |            // than a subscript because a non-resizable range need not be indexable. The growing cases
 1535|       |            // leave this default constructed: insertion would invalidate it.
 1536|  1.06k|            [[maybe_unused]] decltype(value.begin()) dest{};
 1537|  1.06k|            if constexpr (not growable) {
 1538|  1.06k|               dest = value.begin();
 1539|  1.06k|            }
 1540|  1.06k|            size_t i = 0;
 1541|  3.32k|            while (true) {
  ------------------
  |  Branch (1541:20): [True: 3.28k, Folded]
  ------------------
 1542|  3.28k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1542:20): [True: 66, False: 3.21k]
  ------------------
 1543|     66|                  ctx.error = error_code::unexpected_end;
 1544|     66|                  return;
 1545|     66|               }
 1546|       |
 1547|  3.21k|               uint8_t peek;
 1548|  3.21k|               std::memcpy(&peek, it, 1);
 1549|       |
 1550|  3.21k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1550:20): [True: 888, False: 2.33k]
  ------------------
 1551|    888|                  ++it;
 1552|    888|                  break;
 1553|    888|               }
 1554|       |
 1555|       |               // A break code rather than a count ends this array, so the caller's element limit is
 1556|       |               // enforced as the array grows instead of up front.
 1557|       |               if constexpr (check_max_array_size(Opts) > 0) {
 1558|       |                  if (i >= check_max_array_size(Opts)) [[unlikely]] {
 1559|       |                     ctx.error = error_code::invalid_length;
 1560|       |                     return;
 1561|       |                  }
 1562|       |               }
 1563|       |               if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1564|       |                  if (ctx.max_array_size > 0 && i >= ctx.max_array_size) [[unlikely]] {
 1565|       |                     ctx.error = error_code::invalid_length;
 1566|       |                     return;
 1567|       |                  }
 1568|       |               }
 1569|       |
 1570|  2.33k|               if (exceeds_capacity(value, i + 1, ctx)) [[unlikely]] {
  ------------------
  |  Branch (1570:20): [True: 0, False: 2.33k]
  ------------------
 1571|      0|                  return;
 1572|      0|               }
 1573|       |
 1574|       |               if constexpr (emplace_backable<T>) {
 1575|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1576|       |               }
 1577|       |               else if constexpr (set_like) {
 1578|       |                  V element{};
 1579|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1580|       |                  if (bool(ctx.error)) [[unlikely]]
 1581|       |                     return;
 1582|       |                  value.emplace(std::move(element));
 1583|       |               }
 1584|       |               else if constexpr (resizable<T>) {
 1585|       |                  // Resizable but append-only through resize: grow by one and re-derive the write
 1586|       |                  // position, since growing may invalidate any iterator held across it.
 1587|       |                  value.resize(i + 1);
 1588|       |                  auto slot = value.begin();
 1589|       |                  std::advance(slot, i);
 1590|       |                  parse<CBOR>::op<Opts>(*slot, ctx, it, end);
 1591|       |               }
 1592|  2.33k|               else {
 1593|  2.33k|                  if (i >= value.size()) [[unlikely]] {
  ------------------
  |  Branch (1593:23): [True: 43, False: 2.28k]
  ------------------
 1594|     43|                     ctx.error = error_code::exceeded_static_array_size;
 1595|     43|                     return;
 1596|     43|                  }
 1597|  2.28k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1598|  2.28k|                  ++dest;
 1599|  2.28k|               }
 1600|      0|               ++i;
 1601|       |
 1602|  2.33k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1602:20): [True: 71, False: 2.26k]
  ------------------
 1603|     71|                  return;
 1604|  2.33k|            }
 1605|  1.06k|         }
 1606|  3.74k|         else {
 1607|       |            // Definite-length array
 1608|  3.74k|            uint64_t count = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1609|  3.74k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1609:17): [True: 85, False: 3.65k]
  ------------------
 1610|     85|               return;
 1611|       |
 1612|       |            // Validate count against remaining buffer size (minimum 1 byte per element)
 1613|  3.65k|            if (count > static_cast<uint64_t>(end - it)) [[unlikely]] {
  ------------------
  |  Branch (1613:17): [True: 206, False: 3.45k]
  ------------------
 1614|    206|               ctx.error = error_code::unexpected_end;
 1615|    206|               return;
 1616|    206|            }
 1617|       |
 1618|       |            // Check user-configured array size limit
 1619|       |            if constexpr (check_max_array_size(Opts) > 0) {
 1620|       |               if (count > check_max_array_size(Opts)) [[unlikely]] {
 1621|       |                  ctx.error = error_code::invalid_length;
 1622|       |                  return;
 1623|       |               }
 1624|       |            }
 1625|       |            if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1626|       |               if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1627|       |                  ctx.error = error_code::invalid_length;
 1628|       |                  return;
 1629|       |               }
 1630|       |            }
 1631|       |
 1632|       |            if constexpr (set_like) {
 1633|       |               value.clear();
 1634|       |               for (size_t i = 0; i < count; ++i) {
 1635|       |                  V element{};
 1636|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1637|       |                  if (bool(ctx.error)) [[unlikely]]
 1638|       |                     return;
 1639|       |                  value.emplace(std::move(element));
 1640|       |               }
 1641|       |            }
 1642|       |            else if constexpr (emplace_backable<T> && !resizable<T>) {
 1643|       |               // Append-only: there is no way to size the target up front even though the count is known.
 1644|       |               if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1645|       |                  return;
 1646|       |               }
 1647|       |               value.clear();
 1648|       |               for (size_t i = 0; i < count; ++i) {
 1649|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1650|       |                  if (bool(ctx.error)) [[unlikely]]
 1651|       |                     return;
 1652|       |               }
 1653|       |            }
 1654|  3.45k|            else {
 1655|       |               if constexpr (resizable<T>) {
 1656|       |                  if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1657|       |                     return;
 1658|       |                  }
 1659|       |                  value.resize(static_cast<size_t>(count));
 1660|       |
 1661|       |                  if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1662|       |                     value.shrink_to_fit();
 1663|       |                  }
 1664|       |               }
 1665|  3.45k|               else {
 1666|  3.45k|                  if (count > value.size()) [[unlikely]] {
  ------------------
  |  Branch (1666:23): [True: 45, False: 3.40k]
  ------------------
 1667|     45|                     ctx.error = error_code::exceeded_static_array_size;
 1668|     45|                     return;
 1669|     45|                  }
 1670|  3.45k|               }
 1671|       |
 1672|       |               // Iteration rather than subscripting: std::list resizes but does not index.
 1673|  3.40k|               auto dest = value.begin();
 1674|  5.31k|               for (size_t i = 0; i < count; ++i, ++dest) {
  ------------------
  |  Branch (1674:35): [True: 1.92k, False: 3.38k]
  ------------------
 1675|  1.92k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1676|  1.92k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1676:23): [True: 66, False: 1.86k]
  ------------------
 1677|     66|                     return;
 1678|  1.92k|               }
 1679|  3.45k|            }
 1680|  3.45k|         }
 1681|  4.81k|      }
_ZN3glz11cbor_detail16byteswap_elementImEEvRT_:
  104|  2.73k|      {
  105|       |         if constexpr (sizeof(V) == 2) {
  106|       |            uint16_t bits;
  107|       |            std::memcpy(&bits, &elem, sizeof(V));
  108|       |            bits = std::byteswap(bits);
  109|       |            std::memcpy(&elem, &bits, sizeof(V));
  110|       |         }
  111|       |         else if constexpr (sizeof(V) == 4) {
  112|       |            uint32_t bits;
  113|       |            std::memcpy(&bits, &elem, sizeof(V));
  114|       |            bits = std::byteswap(bits);
  115|       |            std::memcpy(&elem, &bits, sizeof(V));
  116|       |         }
  117|  2.73k|         else if constexpr (sizeof(V) == 8) {
  118|  2.73k|            uint64_t bits;
  119|  2.73k|            std::memcpy(&bits, &elem, sizeof(V));
  120|  2.73k|            bits = std::byteswap(bits);
  121|  2.73k|            std::memcpy(&elem, &bits, sizeof(V));
  122|  2.73k|         }
  123|  2.73k|      }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEERmTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  131|  4.21k|      {
  132|       |         if constexpr (const_value_v<T>) {
  133|       |            if constexpr (check_error_on_const_read(Opts)) {
  134|       |               ctx.error = error_code::attempt_const_read;
  135|       |            }
  136|       |            else {
  137|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  138|       |            }
  139|       |         }
  140|  4.21k|         else {
  141|  4.21k|            using V = std::remove_cvref_t<T>;
  142|  4.21k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  143|  4.21k|                                             end);
  144|  4.21k|         }
  145|  4.21k|      }
_ZN3glz4fromILj2EmE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEEmTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  348|  4.21k|      {
  349|  4.21k|         using namespace cbor;
  350|       |
  351|  4.21k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (351:14): [True: 24, False: 4.19k]
  ------------------
  352|     24|            ctx.error = error_code::unexpected_end;
  353|     24|            return;
  354|     24|         }
  355|       |
  356|  4.19k|         uint8_t initial;
  357|  4.19k|         std::memcpy(&initial, it, 1);
  358|  4.19k|         ++it;
  359|       |
  360|  4.19k|         const uint8_t major_type = get_major_type(initial);
  361|  4.19k|         const uint8_t additional_info = get_additional_info(initial);
  362|       |
  363|  4.19k|         if (major_type != major::uint) [[unlikely]] {
  ------------------
  |  Branch (363:14): [True: 65, False: 4.12k]
  ------------------
  364|     65|            ctx.error = error_code::syntax_error;
  365|     65|            return;
  366|     65|         }
  367|       |
  368|  4.12k|         uint64_t result = cbor_detail::decode_arg(ctx, it, end, additional_info);
  369|  4.12k|         if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (369:14): [True: 48, False: 4.08k]
  ------------------
  370|     48|            return;
  371|       |
  372|       |         // Reject a value that does not fit in T, matching the signed reader below and the
  373|       |         // JSON/MessagePack integer readers. Without this a uint16/uint32/uint64 argument is
  374|       |         // silently truncated into a narrower target (e.g. 300 -> uint8_t 44) with success.
  375|  4.08k|         if (result > static_cast<uint64_t>((std::numeric_limits<T>::max)())) [[unlikely]] {
  ------------------
  |  Branch (375:14): [True: 0, False: 4.08k]
  ------------------
  376|      0|            ctx.error = error_code::parse_number_failure;
  377|      0|            return;
  378|      0|         }
  379|       |
  380|  4.08k|         value = static_cast<T>(result);
  381|  4.08k|      }
_ZN3glz4fromILj2E9my_structE10is_tag_keyITnNS_14string_literalEXtlNS4_ILm1EEEEEEEbNSt3__117basic_string_viewIcNS6_11char_traitsIcEEEE:
 1850|    518|      {
 1851|    518|         if constexpr (TagKey.sv().empty()) {
 1852|    518|            return false;
 1853|       |         }
 1854|       |         else {
 1855|       |            return key == TagKey.sv();
 1856|       |         }
 1857|    518|      }

_ZN3glz12ensure_spaceINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_RT_m:
  265|  94.1M|   {
  266|  94.1M|      using Buffer = std::remove_cvref_t<B>;
  267|       |
  268|  94.1M|      if constexpr (vector_like<Buffer>) {
  269|  94.1M|         if (required > b.size()) [[unlikely]] {
  ------------------
  |  Branch (269:14): [True: 26.9k, False: 94.0M]
  ------------------
  270|  26.9k|            grow_buffer(b, required);
  271|  26.9k|         }
  272|  94.1M|         return true;
  273|       |      }
  274|       |      else if constexpr (has_bounded_capacity<Buffer>) {
  275|       |         if (required > buffer_traits<Buffer>::capacity(b)) [[unlikely]] {
  276|       |            ctx.error = error_code::buffer_overflow;
  277|       |            return false;
  278|       |         }
  279|       |         return true;
  280|       |      }
  281|       |      else {
  282|       |         return true; // Raw pointer or other - trust caller
  283|       |      }
  284|  94.1M|   }
_ZN3glz11grow_bufferINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRT_m:
  143|  26.9k|   {
  144|  26.9k|      using traits = buffer_traits<std::remove_cvref_t<B>>;
  145|  26.9k|      if constexpr (requires { traits::grow(b, required); }) {
  146|  26.9k|         traits::grow(b, required);
  147|       |      }
  148|       |      else {
  149|       |         // A user specialization written before `grow` existed: keep the growth it used to get.
  150|       |         resize_unfilled(b, 2 * required);
  151|       |      }
  152|  26.9k|   }
_ZN3glz13buffer_traitsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE4growERS7_mQL_ZNS_13buffer_traits12is_resizableEE:
  118|  26.9k|      {
  119|  26.9k|         resize_unfilled(b, 2 * required);
  120|  26.9k|      }
_ZN3glz15resize_unfilledINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRT_m:
   63|  26.9k|   {
   64|  26.9k|      if constexpr (requires { b.resize_and_overwrite(n, [](auto*, size_t written) { return written; }); }) {
   65|  26.9k|         b.resize_and_overwrite(n, [](auto*, size_t written) noexcept { return written; });
   66|       |      }
   67|       |      else {
   68|       |         b.resize(n);
   69|       |      }
   70|  26.9k|   }
_ZZN3glz15resize_unfilledINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRT_mENKUlPS8_mE_clIcEEDaSA_m:
   65|  26.9k|         b.resize_and_overwrite(n, [](auto*, size_t written) noexcept { return written; });

_ZN3glz10get_memberIR9my_structRiEEDcOT_OT0_:
  678|  4.49k|   {
  679|  4.49k|      using V = std::decay_t<decltype(element)>;
  680|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  681|       |         return value.*element;
  682|       |      }
  683|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  684|       |         return element;
  685|       |      }
  686|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  687|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  688|       |         // matrix types and reject them from the invocable check
  689|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  690|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  691|       |      }
  692|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  693|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  694|       |            return std::invoke(*element, std::forward<Value>(value));
  695|       |         }
  696|       |         else {
  697|       |            return *element;
  698|       |         }
  699|       |      }
  700|  4.49k|      else {
  701|  4.49k|         return element;
  702|  4.49k|      }
  703|  4.49k|   }
_ZN3glz10get_memberIR9my_structRdEEDcOT_OT0_:
  678|  2.73k|   {
  679|  2.73k|      using V = std::decay_t<decltype(element)>;
  680|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  681|       |         return value.*element;
  682|       |      }
  683|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  684|       |         return element;
  685|       |      }
  686|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  687|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  688|       |         // matrix types and reject them from the invocable check
  689|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  690|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  691|       |      }
  692|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  693|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  694|       |            return std::invoke(*element, std::forward<Value>(value));
  695|       |         }
  696|       |         else {
  697|       |            return *element;
  698|       |         }
  699|       |      }
  700|  2.73k|      else {
  701|  2.73k|         return element;
  702|  2.73k|      }
  703|  2.73k|   }
_ZN3glz10get_memberIR9my_structRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEDcOT_OT0_:
  678|  2.91k|   {
  679|  2.91k|      using V = std::decay_t<decltype(element)>;
  680|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  681|       |         return value.*element;
  682|       |      }
  683|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  684|       |         return element;
  685|       |      }
  686|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  687|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  688|       |         // matrix types and reject them from the invocable check
  689|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  690|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  691|       |      }
  692|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  693|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  694|       |            return std::invoke(*element, std::forward<Value>(value));
  695|       |         }
  696|       |         else {
  697|       |            return *element;
  698|       |         }
  699|       |      }
  700|  2.91k|      else {
  701|  2.91k|         return element;
  702|  2.91k|      }
  703|  2.91k|   }
_ZN3glz10get_memberIR9my_structRNSt3__15arrayImLm3EEEEEDcOT_OT0_:
  678|  4.82k|   {
  679|  4.82k|      using V = std::decay_t<decltype(element)>;
  680|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  681|       |         return value.*element;
  682|       |      }
  683|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  684|       |         return element;
  685|       |      }
  686|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  687|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  688|       |         // matrix types and reject them from the invocable check
  689|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  690|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  691|       |      }
  692|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  693|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  694|       |            return std::invoke(*element, std::forward<Value>(value));
  695|       |         }
  696|       |         else {
  697|       |            return *element;
  698|       |         }
  699|       |      }
  700|  4.82k|      else {
  701|  4.82k|         return element;
  702|  4.82k|      }
  703|  4.82k|   }
_ZN3glz8str_viewINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKS5_EES5_OT0_:
  341|   196k|   {
  342|   196k|      if constexpr (std::same_as<std::decay_t<T>, std::string_view>) {
  343|   196k|         return value; // already the answer; rebuilding it from data() and size() costs instructions
  344|       |      }
  345|       |      else if constexpr (!char_array_t<T> && std::is_pointer_v<std::decay_t<T>>) {
  346|       |         return value ? std::string_view{value} : std::string_view{};
  347|       |      }
  348|       |      else if constexpr (has_data<T> && has_size<T>) {
  349|       |         return std::string_view{value.data(), value.size()};
  350|       |      }
  351|       |      else {
  352|       |         return std::string_view{value};
  353|       |      }
  354|   196k|   }

_ZN3glz21check_self_constraintILj2ETnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEE9my_structTkNS_10is_contextENS_7contextEEEvRT1_RT2_:
  294|     57|   {
  295|       |      if constexpr (has_self_constraint_v<T> && !check_skip_self_constraint(Opts)) {
  296|       |         if (ctx.error == error_code::none || ctx.error == error_code::end_reached) {
  297|       |            auto wrapper = self_constraint_v<T>(value);
  298|       |            from<Format, decltype(wrapper)>::template op<Opts>(wrapper, ctx, nullptr, nullptr);
  299|       |         }
  300|       |      }
  301|     57|   }

_ZN3glz10call_scopeINS_7contextEEC2ERS1_:
  272|  18.9k|      explicit call_scope(Ctx& c) noexcept : ctx(c), depth(c.depth)
  273|  18.9k|      {
  274|  18.9k|         ctx.error = error_code::none;
  275|  18.9k|         ctx.custom_error_message = {};
  276|  18.9k|      }
_ZN3glz23seed_speculation_budgetITkNS_10is_contextENS_7contextEEEvRT_m:
  312|  18.9k|   {
  313|  18.9k|      if constexpr (requires { ctx.speculation_budget; }) {
  314|  18.9k|         const size_t proportional = max_speculative_parse_factor * input_bytes;
  315|  18.9k|         ctx.speculation_budget =
  316|  18.9k|            (proportional > min_speculative_parse_bytes ? proportional : min_speculative_parse_bytes) + 2;
  ------------------
  |  Branch (316:14): [True: 645, False: 18.2k]
  ------------------
  317|  18.9k|      }
  318|  18.9k|   }
_ZN3glz11depth_guardINS_7contextEEC2ERS1_m:
  215|  8.92k|      depth_guard(Ctx& c, const size_t limit = max_recursive_depth_limit) noexcept : ctx(c)
  216|  8.92k|      {
  217|  8.92k|         if (ctx.depth >= limit) [[unlikely]] {
  ------------------
  |  Branch (217:14): [True: 0, False: 8.92k]
  ------------------
  218|      0|            ctx.error = error_code::exceeded_max_recursive_depth;
  219|      0|            return;
  220|      0|         }
  221|  8.92k|         ++ctx.depth;
  222|  8.92k|         entered = true;
  223|  8.92k|      }
_ZNK3glz11depth_guardINS_7contextEEcvbEv:
  228|  8.92k|      explicit operator bool() const noexcept { return entered; }
_ZN3glz11depth_guardINS_7contextEED2Ev:
  225|  8.92k|      {
  226|  8.92k|         if (entered) --ctx.depth;
  ------------------
  |  Branch (226:14): [True: 8.92k, False: 0]
  ------------------
  227|  8.92k|      }
_ZN3glz10call_scopeINS_7contextEED2Ev:
  277|  18.9k|      ~call_scope() { ctx.depth = depth; }
_ZNK3glz9error_ctxcvbEv:
  148|  18.9k|      operator bool() const noexcept { return ec != error_code::none; }
_ZN3glz12indent_guardINS_7contextEEC2ERS1_m:
  241|  67.3k|      indent_guard(Ctx& c, const size_t indentation_step) noexcept : ctx(c), step(indentation_step)
  242|  67.3k|      {
  243|  67.3k|         ctx.depth += step;
  244|  67.3k|      }
_ZN3glz12indent_guardINS_7contextEED2Ev:
  245|  67.3k|      ~indent_guard() { ctx.depth -= step; }

_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSA_OSB_:
  229|  18.9k|   {
  230|  18.9k|      format_context_t<Opts.format> ctx{};
  231|  18.9k|      return read<Opts>(value, buffer, ctx);
  232|  18.9k|   }
_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEETkNS_10is_contextERNS_7contextEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSC_OSD_OT2_:
  152|  18.9k|   {
  153|  18.9k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
  154|       |
  155|  18.9k|      call_scope scope{ctx};
  156|       |
  157|       |      // A TOML document with no keys is valid, so its reader decides by the type being read.
  158|  18.9k|      if constexpr (Opts.format != NDJSON && Opts.format != TOML) {
  159|  18.9k|         if (buffer.size() == 0) [[unlikely]] {
  ------------------
  |  Branch (159:14): [True: 0, False: 18.9k]
  ------------------
  160|      0|            ctx.error = error_code::no_read_input;
  161|      0|            return {0, ctx.error, ctx.custom_error_message};
  162|      0|         }
  163|  18.9k|      }
  164|       |
  165|       |      // The reader used to grow the caller's buffer by `padding_bytes` here and shrink it back on
  166|       |      // the way out, so that its fixed width loads could run off the end of the document into
  167|       |      // defined bytes. Every one of those loads is now bounded against `end` instead (see
  168|       |      // `chunk_min`), which costs the last chunk of the buffer its chunked path and nothing else --
  169|       |      // measurably less than the round trip did. `std::string::resize` is an ABI entry point on
  170|       |      // both libc++ and libstdc++, so neither call inlined and the parse was spilled around both
  171|       |      // for what amounted to a sixteen byte store; the price did not scale with the document, so on
  172|       |      // a small one it was the bulk of the call. A caller who does have that slack can still say so
  173|       |      // and get the unbounded loads back, and nobody else pays for the buffer being touched at all.
  174|  18.9k|      ctx.padded_input = check_is_padded(Opts);
  175|       |
  176|  18.9k|      static constexpr auto ParseOpts = parse_opts_for<Opts, Buf>();
  177|       |
  178|  18.9k|      auto [it, end] = read_iterators<ParseOpts>(buffer);
  179|  18.9k|      auto start = it;
  180|       |
  181|       |      // Bound the speculative re-parsing a variant resolution may do, in bytes, relative to this
  182|       |      // input. Seeded per read so a reused context starts fresh. See charge_speculation.
  183|  18.9k|      seed_speculation_budget(ctx, size_t(end - it));
  184|       |
  185|       |      // A YAML context marks its outermost parse with stream_begin and seeds its expansion budgets
  186|       |      // there, so clearing it here is what makes those budgets per-read like the one above. A
  187|       |      // reused context would otherwise carry a spent budget into the next document and reject a
  188|       |      // valid one, and would leave stream_begin pointing into the buffer of the previous read.
  189|       |      // Nested YAML parses do not route through glz::read, so they still cannot reseed themselves.
  190|       |      if constexpr (requires { ctx.stream_begin; }) {
  191|       |         ctx.stream_begin = nullptr;
  192|       |      }
  193|       |
  194|       |      // Normalized off before dispatching: no reader branches on it any more, so leaving it set
  195|       |      // would split every instantiation below between callers who declared padding and callers who
  196|       |      // did not, for a flag none of them reads.
  197|  18.9k|      parse<Opts.format>::template op<ParseOpts>(value, ctx, it, end);
  198|       |
  199|  18.9k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (199:11): [True: 18.8k, False: 57]
  ------------------
  200|  18.8k|         goto finish;
  201|  18.8k|      }
  202|       |
  203|       |      // The JSON RFC 8259 defines: JSON-text = ws value ws
  204|       |      // So, trailing whitespace is permitted and sometimes we want to
  205|       |      // validate this, even though this memory will not affect Glaze.
  206|       |      if constexpr (check_validate_trailing_whitespace(Opts)) {
  207|       |         if (it < end) {
  208|       |            skip_ws<ParseOpts>(ctx, it, end);
  209|       |            if (bool(ctx.error)) [[unlikely]] {
  210|       |               goto finish;
  211|       |            }
  212|       |            if (it != end) [[unlikely]] {
  213|       |               ctx.error = error_code::syntax_error;
  214|       |            }
  215|       |         }
  216|       |      }
  217|       |
  218|  18.9k|   finish:
  219|       |      // ParseOpts, not Opts: this reads `null_terminated` to tell a value that ended with the
  220|       |      // buffer from one that ran out, and it has to be told the same thing the parse was.
  221|  18.9k|      finalize_top_level_read<ParseOpts>(ctx, start, it, end);
  222|       |
  223|  18.9k|      return {size_t(it - start), ctx.error, ctx.custom_error_message};
  224|     57|   }
_ZN3glz14read_iteratorsITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETkNS_10contiguousERKNSt3__16vectorIcNS2_9allocatorIcEEEEEEDaOT0_:
   40|  18.9k|   {
   41|  18.9k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
   42|       |
   43|  18.9k|      auto it = reinterpret_cast<const char*>(buffer.data());
   44|  18.9k|      auto end = it + buffer.size();
   45|       |
   46|  18.9k|      return std::pair{it, end};
   47|  18.9k|   }
_ZN3glz16exceeds_capacityINSt3__15arrayImLm3EEETkNS_10is_contextENS_7contextEEEbRT_mRT0_:
   28|  2.33k|   {
   29|       |      if constexpr (fixed_capacity_container<decltype(value)>) {
   30|       |         if (n > value.max_size()) [[unlikely]] {
   31|       |            ctx.error = error_code::exceeded_static_array_size;
   32|       |            return true;
   33|       |         }
   34|       |      }
   35|  2.33k|      return false;
   36|  2.33k|   }
_ZN3glz23finalize_top_level_readITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_PKcS7_S7_:
  131|  18.9k|   {
  132|       |      if constexpr (Opts.format == JSON && !check_null_terminated(Opts)) {
  133|       |         // Deliberately not [[unlikely]]: a body that ends with the buffer lands here on every
  134|       |         // successful read, which is the ordinary case for a registry parsing a wire span.
  135|       |         // start < it, not !=, because a streaming origin can be empty or overshoot on an error
  136|       |         // path; neither is an absent value.
  137|       |         if (ctx.error == error_code::end_reached && ctx.depth == 0 && it == end && start < it) {
  138|       |            context ws_ctx{}; // only written to when skip_ws parses a comment; the result is unused
  139|       |            const char* consumed = start;
  140|       |            skip_ws<Opts>(ws_ctx, consumed, it);
  141|       |            if (consumed == it) {
  142|       |               ctx.error = error_code::no_read_input;
  143|       |            }
  144|       |         }
  145|       |      }
  146|  18.9k|      finalize_read_context(ctx);
  147|  18.9k|   }
_ZN3glz21finalize_read_contextITkNS_10is_contextERNS_7contextEEEvOT_:
  109|  18.9k|   {
  110|  18.9k|      settle_partial_read_complete(ctx);
  111|  18.9k|      settle_end_reached(ctx);
  112|  18.9k|   }
_ZN3glz28settle_partial_read_completeITkNS_10is_contextERNS_7contextEEEvOT_:
  102|  18.9k|   {
  103|  18.9k|      if (ctx.error == error_code::partial_read_complete) {
  ------------------
  |  Branch (103:11): [True: 0, False: 18.9k]
  ------------------
  104|      0|         ctx.error = error_code::none;
  105|      0|      }
  106|  18.9k|   }
_ZN3glz18settle_end_reachedITkNS_10is_contextERNS_7contextEEEvOT_:
   88|  18.9k|   {
   89|  18.9k|      if (ctx.error == error_code::end_reached) {
  ------------------
  |  Branch (89:11): [True: 0, False: 18.9k]
  ------------------
   90|      0|         ctx.error = (ctx.depth == 0) ? error_code::none : error_code::unexpected_end;
  ------------------
  |  Branch (90:22): [True: 0, False: 0]
  ------------------
   91|      0|      }
   92|  18.9k|   }

_ZN3glz21decode_hash_with_sizeILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2806|  15.4k|      {
 2807|  15.4k|         if (n < HashInfo.min_length || n > HashInfo.max_length) [[unlikely]] {
  ------------------
  |  Branch (2807:14): [True: 102, False: 15.3k]
  |  Branch (2807:41): [True: 126, False: 15.2k]
  ------------------
 2808|    228|            return N;
 2809|    228|         }
 2810|  15.2k|         return decode_hash_with_size_impl<Format, T, HashInfo, Type>::op(it, end, n);
 2811|  15.4k|      }
_ZN3glz26decode_hash_with_size_implILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2859|  15.2k|      {
 2860|       |         // unique_index < min_length <= n, so it[unique_index] is within the key (the wrapper has
 2861|       |         // already rejected lengths outside [min_length, max_length]).
 2862|       |         if constexpr (HashInfo.sized_hash) {
 2863|       |            const auto h = bitmix(uint16_t(it[HashInfo.unique_index]) | (uint16_t(n) << 8), HashInfo.seed);
 2864|       |            return HashInfo.table[h % bsize];
 2865|       |         }
 2866|  15.2k|         else {
 2867|       |            if constexpr (N == 2) {
 2868|       |               // Avoids using a hash table
 2869|       |               constexpr auto first_key_char = reflect<T>::keys[0][uindex];
 2870|       |               return size_t(bool(it[uindex] ^ first_key_char));
 2871|       |            }
 2872|  15.2k|            else {
 2873|  15.2k|               return HashInfo.table[uint8_t(it[uindex])];
 2874|  15.2k|            }
 2875|  15.2k|         }
 2876|  15.2k|      }

_ZN3glz3getILm0ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  4.49k|   {
  117|  4.49k|      using D = std::remove_cvref_t<Tup>;
  118|  4.49k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  4.49k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  4.49k|         using T = typename D::template type_at<I>;
  121|       |         if constexpr (std::is_reference_v<Tup> || std::is_const_v<std::remove_reference_t<Tup>>) {
  122|       |            // An lvalue, or a const tuple of either value category: element access carries the
  123|       |            // constness of the tuple, except for elements that are themselves references.
  124|       |            using leaf = tuple_detail::match_const_t<std::remove_reference_t<Tup>, tuple_detail::elem<I, T>>;
  125|       |            return (static_cast<leaf&>(tup).value);
  126|       |         }
  127|  4.49k|         else {
  128|  4.49k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  4.49k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  4.49k|   }
_ZN3glz3tieIJidNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_5arrayImLm3EEEEEENS_5tupleIJDpRT_EEESD_:
  325|  14.9k|   {
  326|  14.9k|      return {{{ts}...}};
  327|  14.9k|   }
_ZN3glz3getILm1ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  2.73k|   {
  117|  2.73k|      using D = std::remove_cvref_t<Tup>;
  118|  2.73k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  2.73k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  2.73k|         using T = typename D::template type_at<I>;
  121|       |         if constexpr (std::is_reference_v<Tup> || std::is_const_v<std::remove_reference_t<Tup>>) {
  122|       |            // An lvalue, or a const tuple of either value category: element access carries the
  123|       |            // constness of the tuple, except for elements that are themselves references.
  124|       |            using leaf = tuple_detail::match_const_t<std::remove_reference_t<Tup>, tuple_detail::elem<I, T>>;
  125|       |            return (static_cast<leaf&>(tup).value);
  126|       |         }
  127|  2.73k|         else {
  128|  2.73k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  2.73k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  2.73k|   }
_ZN3glz3getILm2ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  2.91k|   {
  117|  2.91k|      using D = std::remove_cvref_t<Tup>;
  118|  2.91k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  2.91k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  2.91k|         using T = typename D::template type_at<I>;
  121|       |         if constexpr (std::is_reference_v<Tup> || std::is_const_v<std::remove_reference_t<Tup>>) {
  122|       |            // An lvalue, or a const tuple of either value category: element access carries the
  123|       |            // constness of the tuple, except for elements that are themselves references.
  124|       |            using leaf = tuple_detail::match_const_t<std::remove_reference_t<Tup>, tuple_detail::elem<I, T>>;
  125|       |            return (static_cast<leaf&>(tup).value);
  126|       |         }
  127|  2.91k|         else {
  128|  2.91k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  2.91k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  2.91k|   }
_ZN3glz3getILm3ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  4.82k|   {
  117|  4.82k|      using D = std::remove_cvref_t<Tup>;
  118|  4.82k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  4.82k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  4.82k|         using T = typename D::template type_at<I>;
  121|       |         if constexpr (std::is_reference_v<Tup> || std::is_const_v<std::remove_reference_t<Tup>>) {
  122|       |            // An lvalue, or a const tuple of either value category: element access carries the
  123|       |            // constness of the tuple, except for elements that are themselves references.
  124|       |            using leaf = tuple_detail::match_const_t<std::remove_reference_t<Tup>, tuple_detail::elem<I, T>>;
  125|       |            return (static_cast<leaf&>(tup).value);
  126|       |         }
  127|  4.82k|         else {
  128|  4.82k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  4.82k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  4.82k|   }

_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  8.69M|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  8.69M|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|  8.69M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|  8.69M|            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|  8.69M|            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|  8.69M|               const auto end = glz::to_chars_40kb(start, value);
  363|  8.69M|               ix += size_t(end - start);
  364|  8.69M|            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  8.69M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  1.94M|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  1.94M|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|  1.94M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|  1.94M|            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|  1.94M|            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|  1.94M|               const auto end = glz::to_chars_40kb(start, value);
  363|  1.94M|               ix += size_t(end - start);
  364|  1.94M|            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  1.94M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|   295k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|   295k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|   295k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|   295k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|   295k|            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|   295k|               const auto end = glz::to_chars_40kb(start, value);
  363|   295k|               ix += size_t(end - start);
  364|   295k|            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|   295k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  7.38M|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  7.38M|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|  7.38M|         if constexpr (std::floating_point<V>) {
  223|  7.38M|            using opts_type = std::decay_t<decltype(Opts)>;
  224|  7.38M|            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|  7.38M|            else {
  292|  7.38M|               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|  7.38M|               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  ------------------
  |  Branch (293:41): [Folded, False: 7.38M]
  |  Branch (293:62): [True: 0, Folded]
  ------------------
  294|  7.38M|#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|  7.38M|               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  ------------------
  |  Branch (295:59): [True: 7.38M, Folded]
  |  Branch (295:90): [Folded, False: 0]
  ------------------
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|  7.38M|               else if constexpr (is_any_of<V, float, double>) {
  325|  7.38M|                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|  7.38M|                  const auto end = glz::to_chars(start, value);
  327|  7.38M|                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|  7.38M|            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  7.38M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  54.2k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  54.2k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|  54.2k|         if constexpr (std::floating_point<V>) {
  223|  54.2k|            using opts_type = std::decay_t<decltype(Opts)>;
  224|  54.2k|            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|  54.2k|            else {
  292|  54.2k|               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|  54.2k|               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  ------------------
  |  Branch (293:41): [Folded, False: 54.2k]
  |  Branch (293:62): [True: 0, Folded]
  ------------------
  294|  54.2k|#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|  54.2k|               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  ------------------
  |  Branch (295:59): [True: 54.2k, Folded]
  |  Branch (295:90): [Folded, False: 0]
  ------------------
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|  54.2k|               else if constexpr (is_any_of<V, float, double>) {
  325|  54.2k|                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|  54.2k|                  const auto end = glz::to_chars(start, value);
  327|  54.2k|                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|  54.2k|            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  54.2k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  56.7k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  56.7k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|  56.7k|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|  56.7k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|  56.7k|            const auto end = glz::to_chars(start, value);
  351|  56.7k|            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  56.7k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|   126k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|   126k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|   126k|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|   126k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|   126k|            const auto end = glz::to_chars(start, value);
  351|   126k|            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|   126k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  48.0k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  48.0k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|  48.0k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|  48.0k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|  48.0k|            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|  48.0k|               const auto end = glz::to_chars_40kb(start, value);
  363|  48.0k|               ix += size_t(end - start);
  364|  48.0k|            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  48.0k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  1.30M|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  1.30M|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|  1.30M|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|  1.30M|            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|  1.30M|            const auto end = glz::to_chars(start, value);
  351|  1.30M|            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  1.30M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|   163k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|   163k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|   163k|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|   163k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|   163k|            const auto end = glz::to_chars(start, value);
  351|   163k|            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|   163k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|   180k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|   180k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|   180k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|   180k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|   180k|            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|   180k|               const auto end = glz::to_chars_40kb(start, value);
  363|   180k|               ix += size_t(end - start);
  364|   180k|            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|   180k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|  11.2M|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|  11.2M|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|  11.2M|         if constexpr (std::floating_point<V>) {
  223|  11.2M|            using opts_type = std::decay_t<decltype(Opts)>;
  224|  11.2M|            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|  11.2M|            else {
  292|  11.2M|               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|  11.2M|               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  ------------------
  |  Branch (293:41): [Folded, False: 11.2M]
  |  Branch (293:62): [True: 0, Folded]
  ------------------
  294|  11.2M|#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|  11.2M|               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  ------------------
  |  Branch (295:59): [True: 11.2M, Folded]
  |  Branch (295:90): [Folded, False: 0]
  ------------------
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|  11.2M|               else if constexpr (is_any_of<V, float, double>) {
  325|  11.2M|                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|  11.2M|                  const auto end = glz::to_chars(start, value);
  327|  11.2M|                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|  11.2M|            }
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|       |            const auto end = glz::to_chars(start, value);
  351|       |            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|  11.2M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  206|   374k|      {
  207|       |         /*if constexpr (std::same_as<std::decay_t<B>, std::string>) {
  208|       |            // more efficient strings in C++23:
  209|       |          https://en.cppreference.com/w/cpp/string/basic_string/resize_and_overwrite
  210|       |          }*/
  211|       |
  212|       |         // https://stackoverflow.com/questions/1701055/what-is-the-maximum-length-in-chars-needed-to-represent-any-double-value
  213|       |         // maximum length for a double should be 24 chars, we use 64 to be sufficient for float128_t
  214|       |         if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  215|       |            if (const auto k = ix + 64; k > b.size()) {
  216|       |               grow_buffer(b, k);
  217|       |            }
  218|       |         }
  219|       |
  220|   374k|         using V = std::decay_t<decltype(value)>;
  221|       |
  222|       |         if constexpr (std::floating_point<V>) {
  223|       |            using opts_type = std::decay_t<decltype(Opts)>;
  224|       |            constexpr bool use_float_format = requires { opts_type::float_format; };
  225|       |
  226|       |            // User-specified float_format takes priority over all other options
  227|       |            if constexpr (use_float_format && is_any_of<V, float, double>) {
  228|       |#if GLZ_USE_STD_FORMAT_FLOAT
  229|       |               // Use std::format with user-provided format string (e.g., "{:.2f}")
  230|       |               // Format string is validated at compile-time via std::format_string
  231|       |               constexpr auto fmt = std::format_string<V>{opts_type::float_format};
  232|       |
  233|       |               if constexpr (check_write_unchecked(Opts)) {
  234|       |                  // Caller guarantees buffer has enough space
  235|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  236|       |                  auto result = std::format_to(start, fmt, V(value));
  237|       |                  ix += size_t(result - start);
  238|       |               }
  239|       |               else {
  240|       |                  // format_to_n writes up to 'available' chars and returns total size needed.
  241|       |                  // Common case: output fits in pre-allocated buffer (single pass).
  242|       |                  // Rare case: output exceeds buffer (e.g., "{:.100f}"), requires resize.
  243|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  244|       |                  const auto available = b.size() - ix;
  245|       |                  auto [out, size] = std::format_to_n(start, available, fmt, V(value));
  246|       |
  247|       |                  if (static_cast<size_t>(size) > available) {
  248|       |                     // Output was truncated - size tells us exactly how much space we need
  249|       |                     if constexpr (resizable<B>) {
  250|       |                        grow_buffer(b, ix + size);
  251|       |                        std::format_to(reinterpret_cast<char*>(&b[ix]), fmt, V(value));
  252|       |                     }
  253|       |                     else {
  254|       |                        ctx.error = error_code::unexpected_end;
  255|       |                        return;
  256|       |                     }
  257|       |                  }
  258|       |                  ix += size;
  259|       |               }
  260|       |#else
  261|       |               // snprintf fallback for platforms without std::format float support (e.g., iOS < 16.3)
  262|       |               // Convert std::format spec to printf format at compile time
  263|       |               constexpr auto printf_fmt = detail::to_printf_fmt(opts_type::float_format);
  264|       |
  265|       |               const auto start = reinterpret_cast<char*>(&b[ix]);
  266|       |               const auto available = check_write_unchecked(Opts) ? size_t(64) : (b.size() - ix);
  267|       |
  268|       |               // snprintf returns chars that would be written (excluding null), or negative on error
  269|       |               const int len = std::snprintf(start, available, printf_fmt.data, static_cast<double>(value));
  270|       |
  271|       |               if (len < 0) {
  272|       |                  ctx.error = error_code::unexpected_end;
  273|       |                  return;
  274|       |               }
  275|       |
  276|       |               if (static_cast<size_t>(len) >= available) {
  277|       |                  // Output was truncated, need to resize and retry
  278|       |                  if constexpr (resizable<B> && not check_write_unchecked(Opts)) {
  279|       |                     grow_buffer(b, ix + static_cast<size_t>(len) + 1);
  280|       |                     std::snprintf(reinterpret_cast<char*>(&b[ix]), static_cast<size_t>(len) + 1, printf_fmt.data,
  281|       |                                   static_cast<double>(value));
  282|       |                  }
  283|       |                  else {
  284|       |                     ctx.error = error_code::unexpected_end;
  285|       |                     return;
  286|       |                  }
  287|       |               }
  288|       |               ix += static_cast<size_t>(len);
  289|       |#endif
  290|       |            }
  291|       |            else {
  292|       |               constexpr auto max_precision = uint8_t(check_float_max_write_precision(Opts));
  293|       |               constexpr bool narrows = max_precision > 0 && max_precision < sizeof(V);
  294|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  295|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double> || is_float128<V>;
  296|       |#else
  297|       |               constexpr bool has_full_precision_writer = is_any_of<V, float, double>;
  298|       |#endif
  299|       |               if constexpr (narrows) {
  300|       |                  // we cast to a lower precision floating point value before writing out
  301|       |                  static_assert(max_precision == 4 || max_precision == 8, "invalid float_max_write_precision");
  302|       |                  using reduced_t = std::conditional_t<max_precision == 4, float, double>;
  303|       |                  const auto reduced = static_cast<reduced_t>(value);
  304|       |                  // A finite value beyond the reduced type's range rounds to infinity, which would be written as
  305|       |                  // null. Such a value is written at full precision below instead.
  306|       |                  const bool overflowed = std::isinf(reduced) && value != static_cast<V>(reduced);
  307|       |                  if (not has_full_precision_writer || not overflowed) {
  308|       |                     const auto start = reinterpret_cast<char*>(&b[ix]);
  309|       |                     const auto end = glz::to_chars(start, reduced);
  310|       |                     ix += size_t(end - start);
  311|       |                     return;
  312|       |                  }
  313|       |               }
  314|       |
  315|       |               // Size optimization: pass OptSize=true so the ~17KB pow-10 lookup
  316|       |               // tables are dropped (recomputed on the fly). Much faster than the
  317|       |               // old simple_float::to_chars path at essentially the same footprint.
  318|       |               // See discussion #2519.
  319|       |               if constexpr (is_size_optimized(Opts) && is_any_of<V, float, double>) {
  320|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  321|       |                  const auto end = glz::to_chars<V, /*OptSize=*/true>(start, V(value));
  322|       |                  ix += size_t(end - start);
  323|       |               }
  324|       |               else if constexpr (is_any_of<V, float, double>) {
  325|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  326|       |                  const auto end = glz::to_chars(start, value);
  327|       |                  ix += size_t(end - start);
  328|       |               }
  329|       |// float128_t requires std::to_chars for floating-point, unavailable on older Apple platforms (iOS < 16.3)
  330|       |#if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
  331|       |               else if constexpr (is_float128<V>) {
  332|       |                  const auto start = reinterpret_cast<char*>(&b[ix]);
  333|       |                  const auto [ptr, ec] = std::to_chars(start, &b[0] + b.size(), value, std::chars_format::general);
  334|       |                  if (ec != std::errc()) {
  335|       |                     ctx.error = error_code::unexpected_end;
  336|       |                     return;
  337|       |                  }
  338|       |                  ix += size_t(ptr - start);
  339|       |               }
  340|       |#endif
  341|       |               else if constexpr (not narrows) {
  342|       |                  static_assert(false_v<V>, "type is not supported");
  343|       |               }
  344|       |            }
  345|       |         }
  346|   374k|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  347|       |            // Small integers: always use to_chars (400B tables)
  348|       |            // The 40KB digit_quads table doesn't help for these small ranges
  349|   374k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  350|   374k|            const auto end = glz::to_chars(start, value);
  351|   374k|            ix += size_t(end - start);
  352|       |         }
  353|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  354|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  355|       |            if constexpr (is_size_optimized(Opts)) {
  356|       |               // Size mode: use glz::to_chars (400B lookup tables)
  357|       |               const auto end = glz::to_chars(start, value);
  358|       |               ix += size_t(end - start);
  359|       |            }
  360|       |            else {
  361|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  362|       |               const auto end = glz::to_chars_40kb(start, value);
  363|       |               ix += size_t(end - start);
  364|       |            }
  365|       |         }
  366|       |         else if constexpr (std::integral<V>) {
  367|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  368|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  369|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  370|       |            if constexpr (is_size_optimized(Opts)) {
  371|       |               // Size mode: use glz::to_chars (400B lookup tables)
  372|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  373|       |               ix += size_t(end - start);
  374|       |            }
  375|       |            else {
  376|       |               // Normal mode: use to_chars_40kb
  377|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  378|       |               ix += size_t(end - start);
  379|       |            }
  380|       |         }
  381|       |         else {
  382|       |            static_assert(false_v<V>, "type is not supported");
  383|       |         }
  384|   374k|      }

_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  8.69M|      {
  815|  8.69M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  8.69M|            static_assert(required_padding<T>());
  817|  8.69M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 8.69M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  8.69M|         }
  821|       |
  822|  8.69M|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  8.69M|         else {
  832|  8.69M|            write_chars::op<O>(value, ctx, b, ix);
  833|  8.69M|         }
  834|  8.69M|      }
_ZN3glz16required_paddingImEEmv:
  538|  8.99M|   {
  539|  8.99M|      constexpr auto value = []() -> size_t {
  540|  8.99M|         if constexpr (boolean_like<T>) {
  541|  8.99M|            return 8;
  542|  8.99M|         }
  543|  8.99M|         else if constexpr (num_t<T>) {
  544|  8.99M|            if constexpr (std::floating_point<T>) {
  545|  8.99M|               if constexpr (sizeof(T) > 8) {
  546|  8.99M|                  return 64;
  547|  8.99M|               }
  548|  8.99M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  8.99M|                  return zmij::double_buffer_size + 4;
  551|  8.99M|               }
  552|  8.99M|               else {
  553|  8.99M|                  return zmij::float_buffer_size + 4;
  554|  8.99M|               }
  555|  8.99M|            }
  556|  8.99M|            else if constexpr (sizeof(T) > 4) {
  557|  8.99M|               return 24;
  558|  8.99M|            }
  559|  8.99M|            else if constexpr (sizeof(T) > 2) {
  560|  8.99M|               return 16;
  561|  8.99M|            }
  562|  8.99M|            else {
  563|  8.99M|               return 8;
  564|  8.99M|            }
  565|  8.99M|         }
  566|  8.99M|         else if constexpr (nullable_like<T>) {
  567|  8.99M|            if constexpr (has_value_type<T>) {
  568|  8.99M|               return required_padding<typename T::value_type>();
  569|  8.99M|            }
  570|  8.99M|            else if constexpr (has_element_type<T>) {
  571|  8.99M|               return required_padding<typename T::element_type>();
  572|  8.99M|            }
  573|  8.99M|            else {
  574|  8.99M|               return 0;
  575|  8.99M|            }
  576|  8.99M|         }
  577|  8.99M|         else if constexpr (always_null_t<T>) {
  578|  8.99M|            return 8;
  579|  8.99M|         }
  580|  8.99M|         else {
  581|  8.99M|            return 0;
  582|  8.99M|         }
  583|  8.99M|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  8.99M|      return value;
  591|  8.99M|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEElTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  1.92M|      {
  815|  1.92M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  1.92M|            static_assert(required_padding<T>());
  817|  1.92M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 1.92M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  1.92M|         }
  821|       |
  822|  1.92M|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  1.92M|         else {
  832|  1.92M|            write_chars::op<O>(value, ctx, b, ix);
  833|  1.92M|         }
  834|  1.92M|      }
_ZN3glz16required_paddingIlEEmv:
  538|  1.94M|   {
  539|  1.94M|      constexpr auto value = []() -> size_t {
  540|  1.94M|         if constexpr (boolean_like<T>) {
  541|  1.94M|            return 8;
  542|  1.94M|         }
  543|  1.94M|         else if constexpr (num_t<T>) {
  544|  1.94M|            if constexpr (std::floating_point<T>) {
  545|  1.94M|               if constexpr (sizeof(T) > 8) {
  546|  1.94M|                  return 64;
  547|  1.94M|               }
  548|  1.94M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  1.94M|                  return zmij::double_buffer_size + 4;
  551|  1.94M|               }
  552|  1.94M|               else {
  553|  1.94M|                  return zmij::float_buffer_size + 4;
  554|  1.94M|               }
  555|  1.94M|            }
  556|  1.94M|            else if constexpr (sizeof(T) > 4) {
  557|  1.94M|               return 24;
  558|  1.94M|            }
  559|  1.94M|            else if constexpr (sizeof(T) > 2) {
  560|  1.94M|               return 16;
  561|  1.94M|            }
  562|  1.94M|            else {
  563|  1.94M|               return 8;
  564|  1.94M|            }
  565|  1.94M|         }
  566|  1.94M|         else if constexpr (nullable_like<T>) {
  567|  1.94M|            if constexpr (has_value_type<T>) {
  568|  1.94M|               return required_padding<typename T::value_type>();
  569|  1.94M|            }
  570|  1.94M|            else if constexpr (has_element_type<T>) {
  571|  1.94M|               return required_padding<typename T::element_type>();
  572|  1.94M|            }
  573|  1.94M|            else {
  574|  1.94M|               return 0;
  575|  1.94M|            }
  576|  1.94M|         }
  577|  1.94M|         else if constexpr (always_null_t<T>) {
  578|  1.94M|            return 8;
  579|  1.94M|         }
  580|  1.94M|         else {
  581|  1.94M|            return 0;
  582|  1.94M|         }
  583|  1.94M|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  1.94M|      return value;
  591|  1.94M|   }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm22EEEtlA22_cLc45ELc49ELc56ELc52ELc52ELc54ELc55ELc52ELc52ELc48ELc55ELc51ELc55ELc48ELc57ELc53ELc53ELc49ELc54ELc49ELc54EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|    411|      {
 1165|    411|         static constexpr auto s = str.sv();
 1166|    411|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 411]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|    411|         dump<false>(s, out, ix);
 1170|    411|         return true;
 1171|    411|      }
_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  3.24k|      {
  815|  3.24k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  3.24k|            static_assert(required_padding<T>());
  817|  3.24k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 3.24k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  3.24k|         }
  821|       |
  822|  3.24k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  3.24k|         else {
  832|  3.24k|            write_chars::op<O>(value, ctx, b, ix);
  833|  3.24k|         }
  834|  3.24k|      }
_ZN3glz6detail9emit_charINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_cRT_Rm:
 1154|  50.5M|      {
 1155|  50.5M|         if (!ensure_space(ctx, out, ix + 1)) [[unlikely]] {
  ------------------
  |  Branch (1155:14): [True: 0, False: 50.5M]
  ------------------
 1156|      0|            return false;
 1157|      0|         }
 1158|  50.5M|         dump<false>(c, out, ix);
 1159|  50.5M|         return true;
 1160|  50.5M|      }
_ZN3glz6detail14emit_hex_bytesINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEETkNS_10is_contextENS_7contextEPKcEEbRT0_T1_mRT_Rm:
 1190|  1.76M|      {
 1191|  1.76M|         static constexpr char digits[] = "0123456789abcdef";
 1192|       |
 1193|  1.76M|         if (!ensure_space(ctx, out, ix + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (1193:14): [True: 0, False: 1.76M]
  ------------------
 1194|      0|            return false;
 1195|      0|         }
 1196|       |
 1197|  7.56M|         for (uint64_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (1197:31): [True: 5.80M, False: 1.76M]
  ------------------
 1198|  5.80M|            uint8_t b;
 1199|  5.80M|            std::memcpy(&b, data + i, 1);
 1200|  5.80M|            dump<false>(digits[(b >> 4) & 0xf], out, ix);
 1201|  5.80M|            dump<false>(digits[b & 0xf], out, ix);
 1202|  5.80M|         }
 1203|  1.76M|         return true;
 1204|  1.76M|      }
_ZN3glz6detail21emit_untrusted_stringITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEvRT1_NS3_17basic_string_viewIcS6_EERT0_Rm:
 1140|   196k|      {
 1141|   196k|         to<JSON, std::string_view>::template op<untrusted_string_emit_opts<Opts>>(s, ctx, out, ix);
 1142|   196k|      }
_ZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  845|   196k|      {
  846|       |         if constexpr (check_string_as_number(Opts)) {
  847|       |            const sv str = [&]() -> const sv {
  848|       |               if constexpr (array_char_t<T>) {
  849|       |                  const auto* start = value.data();
  850|       |                  const auto* end = static_cast<const char*>(std::memchr(start, '\0', value.size()));
  851|       |                  return sv{start, end ? size_t(end - start) : value.size()};
  852|       |               }
  853|       |               else if constexpr (u8str_t<T>) {
  854|       |                  return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  855|       |               }
  856|       |               else {
  857|       |                  return str_view<T>(value);
  858|       |               }
  859|       |            }();
  860|       |            if (!ensure_space(ctx, b, ix + str.size() + write_padding_bytes)) [[unlikely]] {
  861|       |               return;
  862|       |            }
  863|       |            dump_maybe_empty<false>(str, b, ix);
  864|       |         }
  865|       |         else if constexpr (char_t<T>) {
  866|       |            if constexpr (check_unquoted(Opts)) {
  867|       |               dump(value, b, ix);
  868|       |            }
  869|       |            else {
  870|       |               // 8 bytes is enough for quotes and escaped character (worst case: \uXXXX = 6 + 2 quotes)
  871|       |               if (!ensure_space(ctx, b, ix + 8)) [[unlikely]] {
  872|       |                  return;
  873|       |               }
  874|       |
  875|       |               std::memcpy(&b[ix], "\"", 1);
  876|       |               ++ix;
  877|       |               if (const auto escaped = char_escape_table[uint8_t(value)]; escaped) {
  878|       |                  std::memcpy(&b[ix], &escaped, 2);
  879|       |                  ix += 2;
  880|       |               }
  881|       |               else if (value == '\0') {
  882|       |                  // null character treated as empty string
  883|       |               }
  884|       |               else if constexpr (check_escape_control_characters(Opts)) {
  885|       |                  if (uint8_t(value) < 0x20) {
  886|       |                     // Write as \uXXXX format
  887|       |                     char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  888|       |                     constexpr char hex_digits[] = "0123456789ABCDEF";
  889|       |                     unicode_escape[4] = hex_digits[(value >> 4) & 0xF];
  890|       |                     unicode_escape[5] = hex_digits[value & 0xF];
  891|       |                     std::memcpy(&b[ix], unicode_escape, 6);
  892|       |                     ix += 6;
  893|       |                  }
  894|       |                  else {
  895|       |                     std::memcpy(&b[ix], &value, 1);
  896|       |                     ++ix;
  897|       |                  }
  898|       |               }
  899|       |               else {
  900|       |                  if constexpr (check_reject_control_characters(Opts)) {
  901|       |                     if (uint8_t(value) < 0x20) [[unlikely]] {
  902|       |                        ctx.error = error_code::invalid_control_character;
  903|       |                     }
  904|       |                  }
  905|       |                  std::memcpy(&b[ix], &value, 1);
  906|       |                  ++ix;
  907|       |               }
  908|       |               std::memcpy(&b[ix], "\"", 1);
  909|       |               ++ix;
  910|       |            }
  911|       |         }
  912|   196k|         else {
  913|       |            if constexpr (check_raw_string(Opts)) {
  914|       |               const sv str = [&]() -> const sv {
  915|       |                  if constexpr (u8str_t<T>) {
  916|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  917|       |                  }
  918|       |                  else {
  919|       |                     return str_view<T>(value);
  920|       |                  }
  921|       |               }();
  922|       |
  923|       |               // We need space for quotes and the string length: 2 + n.
  924|       |               // Use +8 for extra buffer
  925|       |               if (!ensure_space(ctx, b, ix + 8 + str.size())) [[unlikely]] {
  926|       |                  return;
  927|       |               }
  928|       |               // now we don't have to check writing
  929|       |
  930|       |               if constexpr (not check_unquoted(Opts)) {
  931|       |                  std::memcpy(&b[ix], "\"", 1);
  932|       |                  ++ix;
  933|       |               }
  934|       |               if (str.size()) [[likely]] {
  935|       |                  const auto n = str.size();
  936|       |                  std::memcpy(&b[ix], str.data(), n);
  937|       |                  ix += n;
  938|       |               }
  939|       |               if constexpr (not check_unquoted(Opts)) {
  940|       |                  std::memcpy(&b[ix], "\"", 1);
  941|       |                  ++ix;
  942|       |               }
  943|       |            }
  944|   196k|            else {
  945|   196k|               const sv str = [&]() -> const sv {
  946|   196k|                  if constexpr (array_char_t<T>) {
  947|   196k|                     return sv{value.data(), value.size()};
  948|   196k|                  }
  949|   196k|                  else if constexpr (u8str_t<T>) {
  950|   196k|                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  951|   196k|                  }
  952|   196k|                  else {
  953|   196k|                     return str_view<T>(value);
  954|   196k|                  }
  955|   196k|               }();
  956|   196k|               const auto n = str.size();
  957|       |
  958|       |               // In the case n == 0 we need two characters for quotes.
  959|       |               // For each individual character we need room for two characters to handle escapes.
  960|       |               // When using Unicode escapes, we might need up to 6 characters (\uXXXX) per character
  961|       |               if constexpr (check_escape_control_characters(Opts)) {
  962|       |                  if constexpr (has_bounded_capacity<B>) {
  963|       |                     // 6 bytes per character is a ceiling only a string of nothing but control
  964|       |                     // characters reaches. A resizable buffer merely over-allocates against it,
  965|       |                     // but a fixed buffer has nowhere to grow, so the ceiling would reject output
  966|       |                     // that fits. Measuring the string answers exactly, at the cost of a pass over
  967|       |                     // it, so bracket the measurement between two O(1) bounds and only pay it when
  968|       |                     // the answer is still in doubt: the ceiling fitting means yes, and the floor
  969|       |                     // of one byte per character not fitting means no.
  970|       |                     const size_t capacity = buffer_traits<std::remove_cvref_t<B>>::capacity(b);
  971|       |                     size_t required = ix + 10 + 6 * n;
  972|       |                     if (required > capacity) [[unlikely]] {
  973|       |                        required = ix + 10 + n;
  974|       |                        if (required <= capacity) {
  975|       |                           required = ix + 10 + detail::escaped_string_size(str);
  976|       |                        }
  977|       |                     }
  978|       |                     if (!ensure_space(ctx, b, required)) [[unlikely]] {
  979|       |                        return;
  980|       |                     }
  981|       |                  }
  982|       |                  // We need 2 + 6 * n characters in the worst case (all control chars)
  983|       |                  else if (!ensure_space(ctx, b, ix + 10 + 6 * n)) [[unlikely]] {
  984|       |                     return;
  985|       |                  }
  986|       |               }
  987|   196k|               else {
  988|       |                  // Using the original sizing
  989|   196k|                  if (!ensure_space(ctx, b, ix + 10 + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (989:23): [True: 0, False: 196k]
  ------------------
  990|      0|                     return;
  991|      0|                  }
  992|   196k|               }
  993|       |               // now we don't have to check writing
  994|       |
  995|       |               if constexpr (check_unquoted(Opts)) {
  996|       |                  if (n) {
  997|       |                     std::memcpy(&b[ix], str.data(), n);
  998|       |                     ix += n;
  999|       |                  }
 1000|       |               }
 1001|   196k|               else {
 1002|   196k|                  std::memcpy(&b[ix], "\"", 1);
 1003|   196k|                  ++ix;
 1004|       |
 1005|   196k|                  const auto* c = str.data();
 1006|   196k|                  const auto* const e = c + n;
 1007|   196k|                  const auto start = &b[ix];
 1008|   196k|                  auto data = start;
 1009|       |
 1010|       |                  // By default we don't escape control characters for performance. Invalid JSON characters
 1011|       |                  // result in null characters in the output, making the JSON invalid — these would then be
 1012|       |                  // detected upon reading. Enable the `escape_control_characters` option to properly escape
 1013|       |                  // control characters (0x00–0x1F) as \uXXXX sequences.
 1014|       |
 1015|       |                  // Escape handler: writes the escaped form of *c into data, advances both pointers
 1016|   196k|                  auto write_escape = [&]() {
 1017|   196k|                     if constexpr (check_escape_control_characters(Opts)) {
 1018|   196k|                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
 1019|   196k|                           std::memcpy(data, &escaped, 2);
 1020|   196k|                           data += 2;
 1021|   196k|                        }
 1022|   196k|                        else {
 1023|   196k|                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
 1024|   196k|                           constexpr char hex_digits[] = "0123456789ABCDEF";
 1025|   196k|                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
 1026|   196k|                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
 1027|   196k|                           std::memcpy(data, unicode_escape, 6);
 1028|   196k|                           data += 6;
 1029|   196k|                        }
 1030|   196k|                     }
 1031|   196k|                     else {
 1032|   196k|                        if constexpr (check_reject_control_characters(Opts)) {
 1033|       |                           // A control character with no two-character escape cannot be written
 1034|       |                           // without \uXXXX. The table entry is zero, so the memcpy below would
 1035|       |                           // put two NULs where one byte was. Flag it and let the loop finish:
 1036|       |                           // returning early here would leave c un-advanced and the SIMD scan
 1037|       |                           // would find the same byte forever. The output is abandoned anyway.
 1038|   196k|                           if (char_escape_table[uint8_t(*c)] == 0) [[unlikely]] {
 1039|   196k|                              ctx.error = error_code::invalid_control_character;
 1040|   196k|                           }
 1041|   196k|                        }
 1042|   196k|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
 1043|   196k|                        data += 2;
 1044|   196k|                     }
 1045|   196k|                     ++c;
 1046|   196k|                  };
 1047|       |
 1048|       |                  // Adding a helper here means adding a branch to string_escape_simd() in
 1049|       |                  // simd/backends.hpp, which names the widest one this cascade invokes, and a row
 1050|       |                  // to known_builds in tests/json_test/utf8_validation_test.cpp, which checks it.
 1051|       |#if defined(GLZ_USE_AVX2)
 1052|       |                  detail::avx2_string_escape(c, e, data, n, write_escape);
 1053|       |#endif
 1054|   196k|#if defined(GLZ_USE_SSE2)
 1055|   196k|                  detail::sse2_string_escape(c, e, data, n, write_escape);
 1056|       |#elif defined(GLZ_USE_NEON)
 1057|       |                  detail::neon_string_escape(c, e, data, n, write_escape);
 1058|       |#endif
 1059|       |
 1060|       |                  // SWAR: 8 bytes at a time
 1061|   196k|                  if (n > 7) {
  ------------------
  |  Branch (1061:23): [True: 10.8k, False: 185k]
  ------------------
 1062|  21.8k|                     for (const auto end_m7 = e - 7; c < end_m7;) {
  ------------------
  |  Branch (1062:54): [True: 10.9k, False: 10.8k]
  ------------------
 1063|  10.9k|                        std::memcpy(data, c, 8);
 1064|  10.9k|                        uint64_t swar;
 1065|  10.9k|                        std::memcpy(&swar, c, 8);
 1066|       |                        if constexpr (std::endian::native == std::endian::big) {
 1067|       |                           swar = std::byteswap(swar);
 1068|       |                        }
 1069|       |
 1070|  10.9k|                        constexpr uint64_t lo7_mask = repeat_byte8(0b01111111);
 1071|  10.9k|                        const uint64_t lo7 = swar & lo7_mask;
 1072|  10.9k|                        const uint64_t quote = (lo7 ^ repeat_byte8('"')) + lo7_mask;
 1073|  10.9k|                        const uint64_t backslash = (lo7 ^ repeat_byte8('\\')) + lo7_mask;
 1074|  10.9k|                        const uint64_t less_32 = (swar & repeat_byte8(0b01100000)) + lo7_mask;
 1075|  10.9k|                        uint64_t next = ~((quote & backslash & less_32) | swar);
 1076|       |
 1077|  10.9k|                        next &= repeat_byte8(0b10000000);
 1078|  10.9k|                        if (next == 0) {
  ------------------
  |  Branch (1078:29): [True: 9.49k, False: 1.47k]
  ------------------
 1079|  9.49k|                           data += 8;
 1080|  9.49k|                           c += 8;
 1081|  9.49k|                           continue;
 1082|  9.49k|                        }
 1083|       |
 1084|  1.47k|                        const auto length = (countr_zero(next) >> 3);
 1085|  1.47k|                        c += length;
 1086|  1.47k|                        data += length;
 1087|  1.47k|                        write_escape();
 1088|  1.47k|                     }
 1089|  10.8k|                  }
 1090|       |
 1091|       |                  // Scalar tail
 1092|   252k|                  for (; c < e; ++c) {
  ------------------
  |  Branch (1092:26): [True: 56.0k, False: 196k]
  ------------------
 1093|  56.0k|                     if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  ------------------
  |  Branch (1093:79): [True: 1.57k, False: 54.4k]
  ------------------
 1094|  1.57k|                        std::memcpy(data, &escaped, 2);
 1095|  1.57k|                        data += 2;
 1096|  1.57k|                     }
 1097|       |                     else if constexpr (check_escape_control_characters(Opts)) {
 1098|       |                        if (uint8_t(*c) < 0x20) {
 1099|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
 1100|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
 1101|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
 1102|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
 1103|       |                           std::memcpy(data, unicode_escape, 6);
 1104|       |                           data += 6;
 1105|       |                        }
 1106|       |                        else {
 1107|       |                           std::memcpy(data, c, 1);
 1108|       |                           ++data;
 1109|       |                        }
 1110|       |                     }
 1111|  54.4k|                     else {
 1112|  54.4k|                        if constexpr (check_reject_control_characters(Opts)) {
 1113|  54.4k|                           if (uint8_t(*c) < 0x20) [[unlikely]] {
  ------------------
  |  Branch (1113:32): [True: 422, False: 54.0k]
  ------------------
 1114|    422|                              ctx.error = error_code::invalid_control_character;
 1115|    422|                           }
 1116|  54.4k|                        }
 1117|  54.4k|                        std::memcpy(data, c, 1);
 1118|  54.4k|                        ++data;
 1119|  54.4k|                     }
 1120|  56.0k|                  }
 1121|       |
 1122|   196k|                  ix += size_t(data - start);
 1123|       |
 1124|   196k|                  std::memcpy(&b[ix], "\"", 1);
 1125|   196k|                  ++ix;
 1126|   196k|               }
 1127|   196k|            }
 1128|   196k|         }
 1129|   196k|      }
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE_clEv:
  945|   196k|               const sv str = [&]() -> const sv {
  946|       |                  if constexpr (array_char_t<T>) {
  947|       |                     return sv{value.data(), value.size()};
  948|       |                  }
  949|       |                  else if constexpr (u8str_t<T>) {
  950|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  951|       |                  }
  952|   196k|                  else {
  953|   196k|                     return str_view<T>(value);
  954|   196k|                  }
  955|   196k|               }();
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE0_clEv:
 1016|  1.25M|                  auto write_escape = [&]() {
 1017|       |                     if constexpr (check_escape_control_characters(Opts)) {
 1018|       |                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
 1019|       |                           std::memcpy(data, &escaped, 2);
 1020|       |                           data += 2;
 1021|       |                        }
 1022|       |                        else {
 1023|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
 1024|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
 1025|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
 1026|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
 1027|       |                           std::memcpy(data, unicode_escape, 6);
 1028|       |                           data += 6;
 1029|       |                        }
 1030|       |                     }
 1031|  1.25M|                     else {
 1032|  1.25M|                        if constexpr (check_reject_control_characters(Opts)) {
 1033|       |                           // A control character with no two-character escape cannot be written
 1034|       |                           // without \uXXXX. The table entry is zero, so the memcpy below would
 1035|       |                           // put two NULs where one byte was. Flag it and let the loop finish:
 1036|       |                           // returning early here would leave c un-advanced and the SIMD scan
 1037|       |                           // would find the same byte forever. The output is abandoned anyway.
 1038|  1.25M|                           if (char_escape_table[uint8_t(*c)] == 0) [[unlikely]] {
  ------------------
  |  Branch (1038:32): [True: 1.23M, False: 25.8k]
  ------------------
 1039|  1.23M|                              ctx.error = error_code::invalid_control_character;
 1040|  1.23M|                           }
 1041|  1.25M|                        }
 1042|  1.25M|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
 1043|  1.25M|                        data += 2;
 1044|  1.25M|                     }
 1045|  1.25M|                     ++c;
 1046|  1.25M|                  };
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  7.33M|      {
  815|  7.33M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  7.33M|            static_assert(required_padding<T>());
  817|  7.33M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 7.33M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  7.33M|         }
  821|       |
  822|  7.33M|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  7.33M|         else {
  832|  7.33M|            write_chars::op<O>(value, ctx, b, ix);
  833|  7.33M|         }
  834|  7.33M|      }
_ZN3glz16required_paddingIdEEmv:
  538|  18.6M|   {
  539|  18.6M|      constexpr auto value = []() -> size_t {
  540|  18.6M|         if constexpr (boolean_like<T>) {
  541|  18.6M|            return 8;
  542|  18.6M|         }
  543|  18.6M|         else if constexpr (num_t<T>) {
  544|  18.6M|            if constexpr (std::floating_point<T>) {
  545|  18.6M|               if constexpr (sizeof(T) > 8) {
  546|  18.6M|                  return 64;
  547|  18.6M|               }
  548|  18.6M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  18.6M|                  return zmij::double_buffer_size + 4;
  551|  18.6M|               }
  552|  18.6M|               else {
  553|  18.6M|                  return zmij::float_buffer_size + 4;
  554|  18.6M|               }
  555|  18.6M|            }
  556|  18.6M|            else if constexpr (sizeof(T) > 4) {
  557|  18.6M|               return 24;
  558|  18.6M|            }
  559|  18.6M|            else if constexpr (sizeof(T) > 2) {
  560|  18.6M|               return 16;
  561|  18.6M|            }
  562|  18.6M|            else {
  563|  18.6M|               return 8;
  564|  18.6M|            }
  565|  18.6M|         }
  566|  18.6M|         else if constexpr (nullable_like<T>) {
  567|  18.6M|            if constexpr (has_value_type<T>) {
  568|  18.6M|               return required_padding<typename T::value_type>();
  569|  18.6M|            }
  570|  18.6M|            else if constexpr (has_element_type<T>) {
  571|  18.6M|               return required_padding<typename T::element_type>();
  572|  18.6M|            }
  573|  18.6M|            else {
  574|  18.6M|               return 0;
  575|  18.6M|            }
  576|  18.6M|         }
  577|  18.6M|         else if constexpr (always_null_t<T>) {
  578|  18.6M|            return 8;
  579|  18.6M|         }
  580|  18.6M|         else {
  581|  18.6M|            return 0;
  582|  18.6M|         }
  583|  18.6M|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  18.6M|      return value;
  591|  18.6M|   }
_ZN3glz2toILj10EfE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  54.2k|      {
  815|  54.2k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  54.2k|            static_assert(required_padding<T>());
  817|  54.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 54.2k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  54.2k|         }
  821|       |
  822|  54.2k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  54.2k|         else {
  832|  54.2k|            write_chars::op<O>(value, ctx, b, ix);
  833|  54.2k|         }
  834|  54.2k|      }
_ZN3glz16required_paddingIfEEmv:
  538|  54.2k|   {
  539|  54.2k|      constexpr auto value = []() -> size_t {
  540|  54.2k|         if constexpr (boolean_like<T>) {
  541|  54.2k|            return 8;
  542|  54.2k|         }
  543|  54.2k|         else if constexpr (num_t<T>) {
  544|  54.2k|            if constexpr (std::floating_point<T>) {
  545|  54.2k|               if constexpr (sizeof(T) > 8) {
  546|  54.2k|                  return 64;
  547|  54.2k|               }
  548|  54.2k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  54.2k|                  return zmij::double_buffer_size + 4;
  551|  54.2k|               }
  552|  54.2k|               else {
  553|  54.2k|                  return zmij::float_buffer_size + 4;
  554|  54.2k|               }
  555|  54.2k|            }
  556|  54.2k|            else if constexpr (sizeof(T) > 4) {
  557|  54.2k|               return 24;
  558|  54.2k|            }
  559|  54.2k|            else if constexpr (sizeof(T) > 2) {
  560|  54.2k|               return 16;
  561|  54.2k|            }
  562|  54.2k|            else {
  563|  54.2k|               return 8;
  564|  54.2k|            }
  565|  54.2k|         }
  566|  54.2k|         else if constexpr (nullable_like<T>) {
  567|  54.2k|            if constexpr (has_value_type<T>) {
  568|  54.2k|               return required_padding<typename T::value_type>();
  569|  54.2k|            }
  570|  54.2k|            else if constexpr (has_element_type<T>) {
  571|  54.2k|               return required_padding<typename T::element_type>();
  572|  54.2k|            }
  573|  54.2k|            else {
  574|  54.2k|               return 0;
  575|  54.2k|            }
  576|  54.2k|         }
  577|  54.2k|         else if constexpr (always_null_t<T>) {
  578|  54.2k|            return 8;
  579|  54.2k|         }
  580|  54.2k|         else {
  581|  54.2k|            return 0;
  582|  54.2k|         }
  583|  54.2k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  54.2k|      return value;
  591|  54.2k|   }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  50.5k|      {
  815|  50.5k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  50.5k|            static_assert(required_padding<T>());
  817|  50.5k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 50.5k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  50.5k|         }
  821|       |
  822|  50.5k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  50.5k|         else {
  832|  50.5k|            write_chars::op<O>(value, ctx, b, ix);
  833|  50.5k|         }
  834|  50.5k|      }
_ZN3glz2toILj10EaE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  56.7k|      {
  815|  56.7k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  56.7k|            static_assert(required_padding<T>());
  817|  56.7k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 56.7k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  56.7k|         }
  821|       |
  822|  56.7k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  56.7k|         else {
  832|  56.7k|            write_chars::op<O>(value, ctx, b, ix);
  833|  56.7k|         }
  834|  56.7k|      }
_ZN3glz16required_paddingIaEEmv:
  538|  56.7k|   {
  539|  56.7k|      constexpr auto value = []() -> size_t {
  540|  56.7k|         if constexpr (boolean_like<T>) {
  541|  56.7k|            return 8;
  542|  56.7k|         }
  543|  56.7k|         else if constexpr (num_t<T>) {
  544|  56.7k|            if constexpr (std::floating_point<T>) {
  545|  56.7k|               if constexpr (sizeof(T) > 8) {
  546|  56.7k|                  return 64;
  547|  56.7k|               }
  548|  56.7k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  56.7k|                  return zmij::double_buffer_size + 4;
  551|  56.7k|               }
  552|  56.7k|               else {
  553|  56.7k|                  return zmij::float_buffer_size + 4;
  554|  56.7k|               }
  555|  56.7k|            }
  556|  56.7k|            else if constexpr (sizeof(T) > 4) {
  557|  56.7k|               return 24;
  558|  56.7k|            }
  559|  56.7k|            else if constexpr (sizeof(T) > 2) {
  560|  56.7k|               return 16;
  561|  56.7k|            }
  562|  56.7k|            else {
  563|  56.7k|               return 8;
  564|  56.7k|            }
  565|  56.7k|         }
  566|  56.7k|         else if constexpr (nullable_like<T>) {
  567|  56.7k|            if constexpr (has_value_type<T>) {
  568|  56.7k|               return required_padding<typename T::value_type>();
  569|  56.7k|            }
  570|  56.7k|            else if constexpr (has_element_type<T>) {
  571|  56.7k|               return required_padding<typename T::element_type>();
  572|  56.7k|            }
  573|  56.7k|            else {
  574|  56.7k|               return 0;
  575|  56.7k|            }
  576|  56.7k|         }
  577|  56.7k|         else if constexpr (always_null_t<T>) {
  578|  56.7k|            return 8;
  579|  56.7k|         }
  580|  56.7k|         else {
  581|  56.7k|            return 0;
  582|  56.7k|         }
  583|  56.7k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  56.7k|      return value;
  591|  56.7k|   }
_ZN3glz2toILj10EsE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   126k|      {
  815|   126k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   126k|            static_assert(required_padding<T>());
  817|   126k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 126k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   126k|         }
  821|       |
  822|   126k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|   126k|         else {
  832|   126k|            write_chars::op<O>(value, ctx, b, ix);
  833|   126k|         }
  834|   126k|      }
_ZN3glz16required_paddingIsEEmv:
  538|   126k|   {
  539|   126k|      constexpr auto value = []() -> size_t {
  540|   126k|         if constexpr (boolean_like<T>) {
  541|   126k|            return 8;
  542|   126k|         }
  543|   126k|         else if constexpr (num_t<T>) {
  544|   126k|            if constexpr (std::floating_point<T>) {
  545|   126k|               if constexpr (sizeof(T) > 8) {
  546|   126k|                  return 64;
  547|   126k|               }
  548|   126k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   126k|                  return zmij::double_buffer_size + 4;
  551|   126k|               }
  552|   126k|               else {
  553|   126k|                  return zmij::float_buffer_size + 4;
  554|   126k|               }
  555|   126k|            }
  556|   126k|            else if constexpr (sizeof(T) > 4) {
  557|   126k|               return 24;
  558|   126k|            }
  559|   126k|            else if constexpr (sizeof(T) > 2) {
  560|   126k|               return 16;
  561|   126k|            }
  562|   126k|            else {
  563|   126k|               return 8;
  564|   126k|            }
  565|   126k|         }
  566|   126k|         else if constexpr (nullable_like<T>) {
  567|   126k|            if constexpr (has_value_type<T>) {
  568|   126k|               return required_padding<typename T::value_type>();
  569|   126k|            }
  570|   126k|            else if constexpr (has_element_type<T>) {
  571|   126k|               return required_padding<typename T::element_type>();
  572|   126k|            }
  573|   126k|            else {
  574|   126k|               return 0;
  575|   126k|            }
  576|   126k|         }
  577|   126k|         else if constexpr (always_null_t<T>) {
  578|   126k|            return 8;
  579|   126k|         }
  580|   126k|         else {
  581|   126k|            return 0;
  582|   126k|         }
  583|   126k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|   126k|      return value;
  591|   126k|   }
_ZN3glz2toILj10EiE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  48.0k|      {
  815|  48.0k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  48.0k|            static_assert(required_padding<T>());
  817|  48.0k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 48.0k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  48.0k|         }
  821|       |
  822|  48.0k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  48.0k|         else {
  832|  48.0k|            write_chars::op<O>(value, ctx, b, ix);
  833|  48.0k|         }
  834|  48.0k|      }
_ZN3glz16required_paddingIiEEmv:
  538|  48.0k|   {
  539|  48.0k|      constexpr auto value = []() -> size_t {
  540|  48.0k|         if constexpr (boolean_like<T>) {
  541|  48.0k|            return 8;
  542|  48.0k|         }
  543|  48.0k|         else if constexpr (num_t<T>) {
  544|  48.0k|            if constexpr (std::floating_point<T>) {
  545|  48.0k|               if constexpr (sizeof(T) > 8) {
  546|  48.0k|                  return 64;
  547|  48.0k|               }
  548|  48.0k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  48.0k|                  return zmij::double_buffer_size + 4;
  551|  48.0k|               }
  552|  48.0k|               else {
  553|  48.0k|                  return zmij::float_buffer_size + 4;
  554|  48.0k|               }
  555|  48.0k|            }
  556|  48.0k|            else if constexpr (sizeof(T) > 4) {
  557|  48.0k|               return 24;
  558|  48.0k|            }
  559|  48.0k|            else if constexpr (sizeof(T) > 2) {
  560|  48.0k|               return 16;
  561|  48.0k|            }
  562|  48.0k|            else {
  563|  48.0k|               return 8;
  564|  48.0k|            }
  565|  48.0k|         }
  566|  48.0k|         else if constexpr (nullable_like<T>) {
  567|  48.0k|            if constexpr (has_value_type<T>) {
  568|  48.0k|               return required_padding<typename T::value_type>();
  569|  48.0k|            }
  570|  48.0k|            else if constexpr (has_element_type<T>) {
  571|  48.0k|               return required_padding<typename T::element_type>();
  572|  48.0k|            }
  573|  48.0k|            else {
  574|  48.0k|               return 0;
  575|  48.0k|            }
  576|  48.0k|         }
  577|  48.0k|         else if constexpr (always_null_t<T>) {
  578|  48.0k|            return 8;
  579|  48.0k|         }
  580|  48.0k|         else {
  581|  48.0k|            return 0;
  582|  48.0k|         }
  583|  48.0k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  48.0k|      return value;
  591|  48.0k|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  14.8k|      {
  815|  14.8k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  14.8k|            static_assert(required_padding<T>());
  817|  14.8k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 14.8k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  14.8k|         }
  821|       |
  822|  14.8k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  14.8k|         else {
  832|  14.8k|            write_chars::op<O>(value, ctx, b, ix);
  833|  14.8k|         }
  834|  14.8k|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  1.30M|      {
  815|  1.30M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  1.30M|            static_assert(required_padding<T>());
  817|  1.30M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 1.30M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  1.30M|         }
  821|       |
  822|  1.30M|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  1.30M|         else {
  832|  1.30M|            write_chars::op<O>(value, ctx, b, ix);
  833|  1.30M|         }
  834|  1.30M|      }
_ZN3glz16required_paddingIhEEmv:
  538|  1.67M|   {
  539|  1.67M|      constexpr auto value = []() -> size_t {
  540|  1.67M|         if constexpr (boolean_like<T>) {
  541|  1.67M|            return 8;
  542|  1.67M|         }
  543|  1.67M|         else if constexpr (num_t<T>) {
  544|  1.67M|            if constexpr (std::floating_point<T>) {
  545|  1.67M|               if constexpr (sizeof(T) > 8) {
  546|  1.67M|                  return 64;
  547|  1.67M|               }
  548|  1.67M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  1.67M|                  return zmij::double_buffer_size + 4;
  551|  1.67M|               }
  552|  1.67M|               else {
  553|  1.67M|                  return zmij::float_buffer_size + 4;
  554|  1.67M|               }
  555|  1.67M|            }
  556|  1.67M|            else if constexpr (sizeof(T) > 4) {
  557|  1.67M|               return 24;
  558|  1.67M|            }
  559|  1.67M|            else if constexpr (sizeof(T) > 2) {
  560|  1.67M|               return 16;
  561|  1.67M|            }
  562|  1.67M|            else {
  563|  1.67M|               return 8;
  564|  1.67M|            }
  565|  1.67M|         }
  566|  1.67M|         else if constexpr (nullable_like<T>) {
  567|  1.67M|            if constexpr (has_value_type<T>) {
  568|  1.67M|               return required_padding<typename T::value_type>();
  569|  1.67M|            }
  570|  1.67M|            else if constexpr (has_element_type<T>) {
  571|  1.67M|               return required_padding<typename T::element_type>();
  572|  1.67M|            }
  573|  1.67M|            else {
  574|  1.67M|               return 0;
  575|  1.67M|            }
  576|  1.67M|         }
  577|  1.67M|         else if constexpr (always_null_t<T>) {
  578|  1.67M|            return 8;
  579|  1.67M|         }
  580|  1.67M|         else {
  581|  1.67M|            return 0;
  582|  1.67M|         }
  583|  1.67M|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|  1.67M|      return value;
  591|  1.67M|   }
_ZN3glz2toILj10EtE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   163k|      {
  815|   163k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   163k|            static_assert(required_padding<T>());
  817|   163k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 163k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   163k|         }
  821|       |
  822|   163k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|   163k|         else {
  832|   163k|            write_chars::op<O>(value, ctx, b, ix);
  833|   163k|         }
  834|   163k|      }
_ZN3glz16required_paddingItEEmv:
  538|   163k|   {
  539|   163k|      constexpr auto value = []() -> size_t {
  540|   163k|         if constexpr (boolean_like<T>) {
  541|   163k|            return 8;
  542|   163k|         }
  543|   163k|         else if constexpr (num_t<T>) {
  544|   163k|            if constexpr (std::floating_point<T>) {
  545|   163k|               if constexpr (sizeof(T) > 8) {
  546|   163k|                  return 64;
  547|   163k|               }
  548|   163k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   163k|                  return zmij::double_buffer_size + 4;
  551|   163k|               }
  552|   163k|               else {
  553|   163k|                  return zmij::float_buffer_size + 4;
  554|   163k|               }
  555|   163k|            }
  556|   163k|            else if constexpr (sizeof(T) > 4) {
  557|   163k|               return 24;
  558|   163k|            }
  559|   163k|            else if constexpr (sizeof(T) > 2) {
  560|   163k|               return 16;
  561|   163k|            }
  562|   163k|            else {
  563|   163k|               return 8;
  564|   163k|            }
  565|   163k|         }
  566|   163k|         else if constexpr (nullable_like<T>) {
  567|   163k|            if constexpr (has_value_type<T>) {
  568|   163k|               return required_padding<typename T::value_type>();
  569|   163k|            }
  570|   163k|            else if constexpr (has_element_type<T>) {
  571|   163k|               return required_padding<typename T::element_type>();
  572|   163k|            }
  573|   163k|            else {
  574|   163k|               return 0;
  575|   163k|            }
  576|   163k|         }
  577|   163k|         else if constexpr (always_null_t<T>) {
  578|   163k|            return 8;
  579|   163k|         }
  580|   163k|         else {
  581|   163k|            return 0;
  582|   163k|         }
  583|   163k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|   163k|      return value;
  591|   163k|   }
_ZN3glz2toILj10EjE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   180k|      {
  815|   180k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   180k|            static_assert(required_padding<T>());
  817|   180k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 180k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   180k|         }
  821|       |
  822|   180k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|   180k|         else {
  832|   180k|            write_chars::op<O>(value, ctx, b, ix);
  833|   180k|         }
  834|   180k|      }
_ZN3glz16required_paddingIjEEmv:
  538|   180k|   {
  539|   180k|      constexpr auto value = []() -> size_t {
  540|   180k|         if constexpr (boolean_like<T>) {
  541|   180k|            return 8;
  542|   180k|         }
  543|   180k|         else if constexpr (num_t<T>) {
  544|   180k|            if constexpr (std::floating_point<T>) {
  545|   180k|               if constexpr (sizeof(T) > 8) {
  546|   180k|                  return 64;
  547|   180k|               }
  548|   180k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   180k|                  return zmij::double_buffer_size + 4;
  551|   180k|               }
  552|   180k|               else {
  553|   180k|                  return zmij::float_buffer_size + 4;
  554|   180k|               }
  555|   180k|            }
  556|   180k|            else if constexpr (sizeof(T) > 4) {
  557|   180k|               return 24;
  558|   180k|            }
  559|   180k|            else if constexpr (sizeof(T) > 2) {
  560|   180k|               return 16;
  561|   180k|            }
  562|   180k|            else {
  563|   180k|               return 8;
  564|   180k|            }
  565|   180k|         }
  566|   180k|         else if constexpr (nullable_like<T>) {
  567|   180k|            if constexpr (has_value_type<T>) {
  568|   180k|               return required_padding<typename T::value_type>();
  569|   180k|            }
  570|   180k|            else if constexpr (has_element_type<T>) {
  571|   180k|               return required_padding<typename T::element_type>();
  572|   180k|            }
  573|   180k|            else {
  574|   180k|               return 0;
  575|   180k|            }
  576|   180k|         }
  577|   180k|         else if constexpr (always_null_t<T>) {
  578|   180k|            return 8;
  579|   180k|         }
  580|   180k|         else {
  581|   180k|            return 0;
  582|   180k|         }
  583|   180k|      }();
  584|       |
  585|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  586|       |         // we always require 16 bytes available from write_padding_bytes
  587|       |         // for opening and closing characters
  588|       |         return 0;
  589|       |      }
  590|   180k|      return value;
  591|   180k|   }
_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   291k|      {
  815|   291k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   291k|            static_assert(required_padding<T>());
  817|   291k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 291k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   291k|         }
  821|       |
  822|   291k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|   291k|         else {
  832|   291k|            write_chars::op<O>(value, ctx, b, ix);
  833|   291k|         }
  834|   291k|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm6EEEtlA6_cLc102ELc97ELc108ELc115ELc101EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|  5.19M|      {
 1165|  5.19M|         static constexpr auto s = str.sv();
 1166|  5.19M|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 5.19M]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|  5.19M|         dump<false>(s, out, ix);
 1170|  5.19M|         return true;
 1171|  5.19M|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm5EEEtlA5_cLc116ELc114ELc117ELc101EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|  4.42M|      {
 1165|  4.42M|         static constexpr auto s = str.sv();
 1166|  4.42M|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 4.42M]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|  4.42M|         dump<false>(s, out, ix);
 1170|  4.42M|         return true;
 1171|  4.42M|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm5EEEtlA5_cLc110ELc117ELc108ELc108EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|  98.7k|      {
 1165|  98.7k|         static constexpr auto s = str.sv();
 1166|  98.7k|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 98.7k]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|  98.7k|         dump<false>(s, out, ix);
 1170|  98.7k|         return true;
 1171|  98.7k|      }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  11.2M|      {
  815|  11.2M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  11.2M|            static_assert(required_padding<T>());
  817|  11.2M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 11.2M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  11.2M|         }
  821|       |
  822|  11.2M|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|  11.2M|         else {
  832|  11.2M|            write_chars::op<O>(value, ctx, b, ix);
  833|  11.2M|         }
  834|  11.2M|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   374k|      {
  815|   374k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   374k|            static_assert(required_padding<T>());
  817|   374k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 374k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   374k|         }
  821|       |
  822|   374k|         static constexpr auto O = write_unchecked_on<Opts>();
  823|       |
  824|       |         if constexpr (check_quoted_num(Opts)) {
  825|       |            std::memcpy(&b[ix], "\"", 1);
  826|       |            ++ix;
  827|       |            write_chars::op<O>(value, ctx, b, ix);
  828|       |            std::memcpy(&b[ix], "\"", 1);
  829|       |            ++ix;
  830|       |         }
  831|   374k|         else {
  832|   374k|            write_chars::op<O>(value, ctx, b, ix);
  833|   374k|         }
  834|   374k|      }

_ZN3glz6to_tieIR9my_structLm4EQleT0_L_ZNS_6detail25max_pure_reflection_countEEEEDcOT_:
  232|  14.9k|   {
  233|       |      if constexpr (N == 0) {
  234|       |         return tuple{};
  235|       |      }
  236|       |      else if constexpr (N == 1) {
  237|       |         auto& [p] = t;
  238|       |         return glz::tie(p);
  239|       |      }
  240|       |      else if constexpr (N == 2) {
  241|       |         auto& [p0, p1] = t;
  242|       |         return glz::tie(p0, p1);
  243|       |      }
  244|       |      else if constexpr (N == 3) {
  245|       |         auto& [p0, p1, p2] = t;
  246|       |         return glz::tie(p0, p1, p2);
  247|       |      }
  248|  14.9k|      else if constexpr (N == 4) {
  249|  14.9k|         auto& [p0, p1, p2, p3] = t;
  250|  14.9k|         return glz::tie(p0, p1, p2, p3);
  251|       |      }
  252|       |      else if constexpr (N == 5) {
  253|       |         auto& [p0, p1, p2, p3, p4] = t;
  254|       |         return glz::tie(p0, p1, p2, p3, p4);
  255|       |      }
  256|       |      else if constexpr (N == 6) {
  257|       |         auto& [p0, p1, p2, p3, p4, p5] = t;
  258|       |         return glz::tie(p0, p1, p2, p3, p4, p5);
  259|       |      }
  260|       |      else if constexpr (N == 7) {
  261|       |         auto& [p0, p1, p2, p3, p4, p5, p6] = t;
  262|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6);
  263|       |      }
  264|       |      else if constexpr (N == 8) {
  265|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7] = t;
  266|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7);
  267|       |      }
  268|       |      else if constexpr (N == 9) {
  269|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8] = t;
  270|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8);
  271|       |      }
  272|       |      else if constexpr (N == 10) {
  273|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9] = t;
  274|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
  275|       |      }
  276|       |      else if constexpr (N == 11) {
  277|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10] = t;
  278|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
  279|       |      }
  280|       |      else if constexpr (N == 12) {
  281|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11] = t;
  282|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
  283|       |      }
  284|       |      else if constexpr (N == 13) {
  285|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12] = t;
  286|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
  287|       |      }
  288|       |      else if constexpr (N == 14) {
  289|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13] = t;
  290|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
  291|       |      }
  292|       |      else if constexpr (N == 15) {
  293|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14] = t;
  294|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);
  295|       |      }
  296|       |      else if constexpr (N == 16) {
  297|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15] = t;
  298|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);
  299|       |      }
  300|       |      else if constexpr (N == 17) {
  301|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16] = t;
  302|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);
  303|       |      }
  304|       |      else if constexpr (N == 18) {
  305|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = t;
  306|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17);
  307|       |      }
  308|       |      else if constexpr (N == 19) {
  309|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18] = t;
  310|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18);
  311|       |      }
  312|       |      else if constexpr (N == 20) {
  313|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19] = t;
  314|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19);
  315|       |      }
  316|       |      else if constexpr (N == 21) {
  317|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20] = t;
  318|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20);
  319|       |      }
  320|       |      else if constexpr (N == 22) {
  321|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21] = t;
  322|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  323|       |                         p21);
  324|       |      }
  325|       |      else if constexpr (N == 23) {
  326|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21,
  327|       |                p22] = t;
  328|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  329|       |                         p21, p22);
  330|       |      }
  331|       |      else if constexpr (N == 24) {
  332|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  333|       |                p23] = t;
  334|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  335|       |                         p21, p22, p23);
  336|       |      }
  337|       |      else if constexpr (N == 25) {
  338|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  339|       |                p23, p24] = t;
  340|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  341|       |                         p21, p22, p23, p24);
  342|       |      }
  343|       |      else if constexpr (N == 26) {
  344|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  345|       |                p23, p24, p25] = t;
  346|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  347|       |                         p21, p22, p23, p24, p25);
  348|       |      }
  349|       |      else if constexpr (N == 27) {
  350|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  351|       |                p23, p24, p25, p26] = t;
  352|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  353|       |                         p21, p22, p23, p24, p25, p26);
  354|       |      }
  355|       |      else if constexpr (N == 28) {
  356|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  357|       |                p23, p24, p25, p26, p27] = t;
  358|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  359|       |                         p21, p22, p23, p24, p25, p26, p27);
  360|       |      }
  361|       |      else if constexpr (N == 29) {
  362|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  363|       |                p23, p24, p25, p26, p27, p28] = t;
  364|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  365|       |                         p21, p22, p23, p24, p25, p26, p27, p28);
  366|       |      }
  367|       |      else if constexpr (N == 30) {
  368|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  369|       |                p23, p24, p25, p26, p27, p28, p29] = t;
  370|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  371|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29);
  372|       |      }
  373|       |      else if constexpr (N == 31) {
  374|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  375|       |                p23, p24, p25, p26, p27, p28, p29, p30] = t;
  376|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  377|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30);
  378|       |      }
  379|       |      else if constexpr (N == 32) {
  380|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  381|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31] = t;
  382|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  383|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31);
  384|       |      }
  385|       |      else if constexpr (N == 33) {
  386|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  387|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32] = t;
  388|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  389|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32);
  390|       |      }
  391|       |      else if constexpr (N == 34) {
  392|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  393|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33] = t;
  394|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  395|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33);
  396|       |      }
  397|       |      else if constexpr (N == 35) {
  398|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  399|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34] = t;
  400|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  401|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34);
  402|       |      }
  403|       |      else if constexpr (N == 36) {
  404|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  405|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35] = t;
  406|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  407|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35);
  408|       |      }
  409|       |      else if constexpr (N == 37) {
  410|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  411|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36] = t;
  412|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  413|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36);
  414|       |      }
  415|       |      else if constexpr (N == 38) {
  416|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  417|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37] = t;
  418|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  419|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37);
  420|       |      }
  421|       |      else if constexpr (N == 39) {
  422|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  423|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38] = t;
  424|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  425|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38);
  426|       |      }
  427|       |      else if constexpr (N == 40) {
  428|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  429|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39] = t;
  430|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  431|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39);
  432|       |      }
  433|       |      else if constexpr (N == 41) {
  434|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  435|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40] = t;
  436|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  437|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  438|       |                         p40);
  439|       |      }
  440|       |      else if constexpr (N == 42) {
  441|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  442|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41] = t;
  443|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  444|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  445|       |                         p40, p41);
  446|       |      }
  447|       |      else if constexpr (N == 43) {
  448|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  449|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42] = t;
  450|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  451|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  452|       |                         p40, p41, p42);
  453|       |      }
  454|       |      else if constexpr (N == 44) {
  455|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  456|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42,
  457|       |                p43] = t;
  458|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  459|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  460|       |                         p40, p41, p42, p43);
  461|       |      }
  462|       |      else if constexpr (N == 45) {
  463|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  464|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  465|       |                p44] = t;
  466|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  467|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  468|       |                         p40, p41, p42, p43, p44);
  469|       |      }
  470|       |      else if constexpr (N == 46) {
  471|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  472|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  473|       |                p44, p45] = t;
  474|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  475|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  476|       |                         p40, p41, p42, p43, p44, p45);
  477|       |      }
  478|       |      else if constexpr (N == 47) {
  479|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  480|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  481|       |                p44, p45, p46] = t;
  482|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  483|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  484|       |                         p40, p41, p42, p43, p44, p45, p46);
  485|       |      }
  486|       |      else if constexpr (N == 48) {
  487|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  488|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  489|       |                p44, p45, p46, p47] = t;
  490|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  491|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  492|       |                         p40, p41, p42, p43, p44, p45, p46, p47);
  493|       |      }
  494|       |      else if constexpr (N == 49) {
  495|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  496|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  497|       |                p44, p45, p46, p47, p48] = t;
  498|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  499|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  500|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48);
  501|       |      }
  502|       |      else if constexpr (N == 50) {
  503|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  504|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  505|       |                p44, p45, p46, p47, p48, p49] = t;
  506|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  507|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  508|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49);
  509|       |      }
  510|       |      else if constexpr (N == 51) {
  511|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  512|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  513|       |                p44, p45, p46, p47, p48, p49, p50] = t;
  514|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  515|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  516|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50);
  517|       |      }
  518|       |      else if constexpr (N == 52) {
  519|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  520|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  521|       |                p44, p45, p46, p47, p48, p49, p50, p51] = t;
  522|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  523|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  524|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51);
  525|       |      }
  526|       |      else if constexpr (N == 53) {
  527|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  528|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  529|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52] = t;
  530|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  531|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  532|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52);
  533|       |      }
  534|       |      else if constexpr (N == 54) {
  535|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  536|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  537|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53] = t;
  538|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  539|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  540|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53);
  541|       |      }
  542|       |      else if constexpr (N == 55) {
  543|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  544|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  545|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54] = t;
  546|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  547|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  548|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54);
  549|       |      }
  550|       |      else if constexpr (N == 56) {
  551|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  552|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  553|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55] = t;
  554|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  555|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  556|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55);
  557|       |      }
  558|       |      else if constexpr (N == 57) {
  559|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  560|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  561|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56] = t;
  562|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  563|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  564|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56);
  565|       |      }
  566|       |      else if constexpr (N == 58) {
  567|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  568|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  569|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57] = t;
  570|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  571|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  572|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57);
  573|       |      }
  574|       |      else if constexpr (N == 59) {
  575|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  576|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  577|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58] = t;
  578|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  579|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  580|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58);
  581|       |      }
  582|       |      else if constexpr (N == 60) {
  583|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  584|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  585|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59] = t;
  586|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  587|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  588|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  589|       |                         p59);
  590|       |      }
  591|       |      else if constexpr (N == 61) {
  592|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  593|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  594|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60] = t;
  595|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  596|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  597|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  598|       |                         p59, p60);
  599|       |      }
  600|       |      else if constexpr (N == 62) {
  601|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  602|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  603|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61] = t;
  604|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  605|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  606|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  607|       |                         p59, p60, p61);
  608|       |      }
  609|       |      else if constexpr (N == 63) {
  610|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  611|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  612|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62] = t;
  613|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  614|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  615|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  616|       |                         p59, p60, p61, p62);
  617|       |      }
  618|       |      else if constexpr (N == 64) {
  619|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  620|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  621|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63] = t;
  622|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  623|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  624|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  625|       |                         p59, p60, p61, p62, p63);
  626|       |      }
  627|       |      else if constexpr (N == 65) {
  628|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  629|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  630|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63,
  631|       |                p64] = t;
  632|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  633|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  634|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  635|       |                         p59, p60, p61, p62, p63, p64);
  636|       |      }
  637|       |      else if constexpr (N == 66) {
  638|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  639|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  640|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  641|       |                p65] = t;
  642|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  643|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  644|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  645|       |                         p59, p60, p61, p62, p63, p64, p65);
  646|       |      }
  647|       |      else if constexpr (N == 67) {
  648|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  649|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  650|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  651|       |                p65, p66] = t;
  652|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  653|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  654|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  655|       |                         p59, p60, p61, p62, p63, p64, p65, p66);
  656|       |      }
  657|       |      else if constexpr (N == 68) {
  658|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  659|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  660|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  661|       |                p65, p66, p67] = t;
  662|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  663|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  664|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  665|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67);
  666|       |      }
  667|       |      else if constexpr (N == 69) {
  668|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  669|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  670|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  671|       |                p65, p66, p67, p68] = t;
  672|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  673|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  674|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  675|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68);
  676|       |      }
  677|       |      else if constexpr (N == 70) {
  678|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  679|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  680|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  681|       |                p65, p66, p67, p68, p69] = t;
  682|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  683|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  684|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  685|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69);
  686|       |      }
  687|       |      else if constexpr (N == 71) {
  688|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  689|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  690|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  691|       |                p65, p66, p67, p68, p69, p70] = t;
  692|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  693|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  694|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  695|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70);
  696|       |      }
  697|       |      else if constexpr (N == 72) {
  698|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  699|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  700|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  701|       |                p65, p66, p67, p68, p69, p70, p71] = t;
  702|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  703|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  704|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  705|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71);
  706|       |      }
  707|       |      else if constexpr (N == 73) {
  708|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  709|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  710|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  711|       |                p65, p66, p67, p68, p69, p70, p71, p72] = t;
  712|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  713|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  714|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  715|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72);
  716|       |      }
  717|       |      else if constexpr (N == 74) {
  718|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  719|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  720|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  721|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73] = t;
  722|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  723|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  724|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  725|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73);
  726|       |      }
  727|       |      else if constexpr (N == 75) {
  728|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  729|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  730|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  731|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74] = t;
  732|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  733|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  734|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  735|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74);
  736|       |      }
  737|       |      else if constexpr (N == 76) {
  738|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  739|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  740|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  741|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75] = t;
  742|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  743|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  744|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  745|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75);
  746|       |      }
  747|       |      else if constexpr (N == 77) {
  748|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  749|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  750|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  751|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76] = t;
  752|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  753|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  754|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  755|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76);
  756|       |      }
  757|       |      else if constexpr (N == 78) {
  758|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  759|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  760|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  761|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77] = t;
  762|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  763|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  764|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  765|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77);
  766|       |      }
  767|       |      else if constexpr (N == 79) {
  768|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  769|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  770|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  771|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78] = t;
  772|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  773|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  774|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  775|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  776|       |                         p78);
  777|       |      }
  778|       |      else if constexpr (N == 80) {
  779|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  780|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  781|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  782|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79] = t;
  783|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  784|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  785|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  786|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  787|       |                         p78, p79);
  788|       |      }
  789|       |      else if constexpr (N == 81) {
  790|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  791|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  792|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  793|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80] = t;
  794|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  795|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  796|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  797|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  798|       |                         p78, p79, p80);
  799|       |      }
  800|       |      else if constexpr (N == 82) {
  801|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  802|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  803|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  804|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81] = t;
  805|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  806|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  807|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  808|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  809|       |                         p78, p79, p80, p81);
  810|       |      }
  811|       |      else if constexpr (N == 83) {
  812|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  813|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  814|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  815|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82] = t;
  816|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  817|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  818|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  819|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  820|       |                         p78, p79, p80, p81, p82);
  821|       |      }
  822|       |      else if constexpr (N == 84) {
  823|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  824|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  825|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  826|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83] = t;
  827|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  828|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  829|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  830|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  831|       |                         p78, p79, p80, p81, p82, p83);
  832|       |      }
  833|       |      else if constexpr (N == 85) {
  834|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  835|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  836|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  837|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84] = t;
  838|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  839|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  840|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  841|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  842|       |                         p78, p79, p80, p81, p82, p83, p84);
  843|       |      }
  844|       |      else if constexpr (N == 86) {
  845|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  846|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  847|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  848|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84,
  849|       |                p85] = t;
  850|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  851|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  852|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  853|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  854|       |                         p78, p79, p80, p81, p82, p83, p84, p85);
  855|       |      }
  856|       |      else if constexpr (N == 87) {
  857|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  858|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  859|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  860|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  861|       |                p86] = t;
  862|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  863|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  864|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  865|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  866|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86);
  867|       |      }
  868|       |      else if constexpr (N == 88) {
  869|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  870|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  871|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  872|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  873|       |                p86, p87] = t;
  874|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  875|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  876|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  877|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  878|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87);
  879|       |      }
  880|       |      else if constexpr (N == 89) {
  881|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  882|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  883|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  884|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  885|       |                p86, p87, p88] = t;
  886|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  887|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  888|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  889|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  890|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88);
  891|       |      }
  892|       |      else if constexpr (N == 90) {
  893|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  894|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  895|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  896|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  897|       |                p86, p87, p88, p89] = t;
  898|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  899|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  900|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  901|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  902|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89);
  903|       |      }
  904|       |      else if constexpr (N == 91) {
  905|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  906|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  907|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  908|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  909|       |                p86, p87, p88, p89, p90] = t;
  910|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  911|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  912|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  913|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  914|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90);
  915|       |      }
  916|       |      else if constexpr (N == 92) {
  917|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  918|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  919|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  920|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  921|       |                p86, p87, p88, p89, p90, p91] = t;
  922|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  923|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  924|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  925|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  926|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91);
  927|       |      }
  928|       |      else if constexpr (N == 93) {
  929|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  930|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  931|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  932|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  933|       |                p86, p87, p88, p89, p90, p91, p92] = t;
  934|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  935|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  936|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  937|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  938|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92);
  939|       |      }
  940|       |      else if constexpr (N == 94) {
  941|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  942|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  943|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  944|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  945|       |                p86, p87, p88, p89, p90, p91, p92, p93] = t;
  946|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  947|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  948|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  949|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  950|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93);
  951|       |      }
  952|       |      else if constexpr (N == 95) {
  953|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  954|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  955|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  956|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  957|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94] = t;
  958|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  959|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  960|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  961|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  962|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94);
  963|       |      }
  964|       |      else if constexpr (N == 96) {
  965|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  966|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  967|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  968|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  969|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95] = t;
  970|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  971|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  972|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  973|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  974|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95);
  975|       |      }
  976|       |      else if constexpr (N == 97) {
  977|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  978|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  979|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  980|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  981|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96] = t;
  982|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  983|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  984|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  985|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  986|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96);
  987|       |      }
  988|       |      else if constexpr (N == 98) {
  989|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
  990|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
  991|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
  992|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
  993|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97] = t;
  994|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
  995|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
  996|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
  997|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
  998|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
  999|       |                         p97);
 1000|       |      }
 1001|       |      else if constexpr (N == 99) {
 1002|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1003|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1004|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1005|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1006|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98] = t;
 1007|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1008|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1009|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1010|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1011|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1012|       |                         p97, p98);
 1013|       |      }
 1014|       |      else if constexpr (N == 100) {
 1015|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1016|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1017|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1018|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1019|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99] = t;
 1020|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1021|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1022|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1023|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1024|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1025|       |                         p97, p98, p99);
 1026|       |      }
 1027|       |      else if constexpr (N == 101) {
 1028|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1029|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1030|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1031|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1032|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100] = t;
 1033|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1034|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1035|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1036|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1037|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1038|       |                         p97, p98, p99, p100);
 1039|       |      }
 1040|       |      else if constexpr (N == 102) {
 1041|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1042|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1043|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1044|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1045|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101] = t;
 1046|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1047|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1048|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1049|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1050|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1051|       |                         p97, p98, p99, p100, p101);
 1052|       |      }
 1053|       |      else if constexpr (N == 103) {
 1054|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1055|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1056|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1057|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1058|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102] = t;
 1059|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1060|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1061|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1062|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1063|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1064|       |                         p97, p98, p99, p100, p101, p102);
 1065|       |      }
 1066|       |      else if constexpr (N == 104) {
 1067|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1068|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1069|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1070|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1071|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103] = t;
 1072|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1073|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1074|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1075|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1076|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1077|       |                         p97, p98, p99, p100, p101, p102, p103);
 1078|       |      }
 1079|       |      else if constexpr (N == 105) {
 1080|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1081|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1082|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1083|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1084|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104] = t;
 1085|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1086|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1087|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1088|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1089|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1090|       |                         p97, p98, p99, p100, p101, p102, p103, p104);
 1091|       |      }
 1092|       |      else if constexpr (N == 106) {
 1093|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1094|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1095|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1096|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1097|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1098|       |                p105] = t;
 1099|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1100|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1101|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1102|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1103|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1104|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105);
 1105|       |      }
 1106|       |      else if constexpr (N == 107) {
 1107|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1108|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1109|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1110|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1111|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1112|       |                p105, p106] = t;
 1113|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1114|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1115|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1116|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1117|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1118|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106);
 1119|       |      }
 1120|       |      else if constexpr (N == 108) {
 1121|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1122|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1123|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1124|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1125|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1126|       |                p105, p106, p107] = t;
 1127|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1128|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1129|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1130|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1131|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1132|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107);
 1133|       |      }
 1134|       |      else if constexpr (N == 109) {
 1135|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1136|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1137|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1138|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1139|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1140|       |                p105, p106, p107, p108] = t;
 1141|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1142|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1143|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1144|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1145|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1146|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108);
 1147|       |      }
 1148|       |      else if constexpr (N == 110) {
 1149|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1150|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1151|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1152|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1153|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1154|       |                p105, p106, p107, p108, p109] = t;
 1155|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1156|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1157|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1158|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1159|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1160|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109);
 1161|       |      }
 1162|       |      else if constexpr (N == 111) {
 1163|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1164|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1165|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1166|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1167|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1168|       |                p105, p106, p107, p108, p109, p110] = t;
 1169|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1170|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1171|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1172|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1173|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1174|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110);
 1175|       |      }
 1176|       |      else if constexpr (N == 112) {
 1177|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1178|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1179|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1180|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1181|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1182|       |                p105, p106, p107, p108, p109, p110, p111] = t;
 1183|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1184|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1185|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1186|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1187|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1188|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111);
 1189|       |      }
 1190|       |      else if constexpr (N == 113) {
 1191|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1192|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1193|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1194|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1195|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1196|       |                p105, p106, p107, p108, p109, p110, p111, p112] = t;
 1197|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1198|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1199|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1200|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1201|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1202|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112);
 1203|       |      }
 1204|       |      else if constexpr (N == 114) {
 1205|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1206|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1207|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1208|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1209|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1210|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113] = t;
 1211|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1212|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1213|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1214|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1215|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1216|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1217|       |                         p113);
 1218|       |      }
 1219|       |      else if constexpr (N == 115) {
 1220|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1221|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1222|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1223|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1224|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1225|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114] = t;
 1226|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1227|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1228|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1229|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1230|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1231|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1232|       |                         p113, p114);
 1233|       |      }
 1234|       |      else if constexpr (N == 116) {
 1235|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1236|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1237|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1238|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1239|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1240|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115] = t;
 1241|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1242|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1243|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1244|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1245|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1246|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1247|       |                         p113, p114, p115);
 1248|       |      }
 1249|       |      else if constexpr (N == 117) {
 1250|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1251|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1252|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1253|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1254|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1255|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116] = t;
 1256|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1257|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1258|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1259|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1260|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1261|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1262|       |                         p113, p114, p115, p116);
 1263|       |      }
 1264|       |      else if constexpr (N == 118) {
 1265|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1266|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1267|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1268|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1269|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1270|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117] = t;
 1271|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1272|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1273|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1274|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1275|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1276|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1277|       |                         p113, p114, p115, p116, p117);
 1278|       |      }
 1279|       |      else if constexpr (N == 119) {
 1280|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1281|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1282|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1283|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1284|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1285|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118] = t;
 1286|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1287|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1288|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1289|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1290|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1291|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1292|       |                         p113, p114, p115, p116, p117, p118);
 1293|       |      }
 1294|       |      else if constexpr (N == 120) {
 1295|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1296|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1297|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1298|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1299|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1300|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119] = t;
 1301|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1302|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1303|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1304|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1305|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1306|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1307|       |                         p113, p114, p115, p116, p117, p118, p119);
 1308|       |      }
 1309|       |      else if constexpr (N == 121) {
 1310|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1311|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1312|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1313|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1314|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1315|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120] = t;
 1316|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1317|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1318|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1319|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1320|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1321|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1322|       |                         p113, p114, p115, p116, p117, p118, p119, p120);
 1323|       |      }
 1324|       |      else if constexpr (N == 122) {
 1325|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1326|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1327|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1328|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1329|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1330|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121] =
 1331|       |            t;
 1332|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1333|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1334|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1335|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1336|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1337|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1338|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121);
 1339|       |      }
 1340|       |      else if constexpr (N == 123) {
 1341|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1342|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1343|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1344|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1345|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1346|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1347|       |                p122] = t;
 1348|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1349|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1350|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1351|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1352|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1353|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1354|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122);
 1355|       |      }
 1356|       |      else if constexpr (N == 124) {
 1357|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1358|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1359|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1360|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1361|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1362|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1363|       |                p122, p123] = t;
 1364|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1365|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1366|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1367|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1368|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1369|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1370|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123);
 1371|       |      }
 1372|       |      else if constexpr (N == 125) {
 1373|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1374|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1375|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1376|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1377|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1378|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1379|       |                p122, p123, p124] = t;
 1380|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1381|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1382|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1383|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1384|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1385|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1386|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124);
 1387|       |      }
 1388|       |      else if constexpr (N == 126) {
 1389|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1390|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1391|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1392|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1393|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1394|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1395|       |                p122, p123, p124, p125] = t;
 1396|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1397|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1398|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1399|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1400|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1401|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1402|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125);
 1403|       |      }
 1404|       |      else if constexpr (N == 127) {
 1405|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1406|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1407|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1408|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1409|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1410|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1411|       |                p122, p123, p124, p125, p126] = t;
 1412|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1413|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1414|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1415|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1416|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1417|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1418|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126);
 1419|       |      }
 1420|       |      else if constexpr (N == 128) {
 1421|       |         auto& [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22,
 1422|       |                p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43,
 1423|       |                p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64,
 1424|       |                p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85,
 1425|       |                p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104,
 1426|       |                p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121,
 1427|       |                p122, p123, p124, p125, p126, p127] = t;
 1428|       |         return glz::tie(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20,
 1429|       |                         p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39,
 1430|       |                         p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58,
 1431|       |                         p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77,
 1432|       |                         p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96,
 1433|       |                         p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112,
 1434|       |                         p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126, p127);
 1435|       |      }
 1436|  14.9k|   }

_ZN3glz6detail18sse2_string_escapeIcRZNS_2toILj10ENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEERKS7_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_EUlvE0_EEvRPKcSV_RPT_mSP_:
   20|   196k|   {
   21|       |      // SSE2: 16 bytes at a time with direct comparison instructions
   22|   196k|      if (n > 15) {
  ------------------
  |  Branch (22:11): [True: 5.56k, False: 191k]
  ------------------
   23|  5.56k|         const __m128i quote_vec = _mm_set1_epi8('"');
   24|  5.56k|         const __m128i bs_vec = _mm_set1_epi8('\\');
   25|  5.56k|         const __m128i ctrl_mask = _mm_set1_epi8(static_cast<int8_t>(0xE0));
   26|  5.56k|         const __m128i zero = _mm_setzero_si128();
   27|       |
   28|  1.58M|         for (const char* end_m15 = e - 15; c < end_m15;) {
  ------------------
  |  Branch (28:45): [True: 1.58M, False: 5.56k]
  ------------------
   29|  1.58M|            __m128i v = _mm_loadu_si128(reinterpret_cast<const __m128i*>(c));
   30|  1.58M|            _mm_storeu_si128(reinterpret_cast<__m128i*>(data), v);
   31|       |
   32|  1.58M|            const uint32_t mask = static_cast<uint32_t>(
   33|  1.58M|               _mm_movemask_epi8(_mm_or_si128(_mm_or_si128(_mm_cmpeq_epi8(v, quote_vec), _mm_cmpeq_epi8(v, bs_vec)),
   34|  1.58M|                                              _mm_cmpeq_epi8(_mm_and_si128(v, ctrl_mask), zero))));
   35|       |
   36|  1.58M|            if (mask == 0) {
  ------------------
  |  Branch (36:17): [True: 326k, False: 1.25M]
  ------------------
   37|   326k|               data += 16;
   38|   326k|               c += 16;
   39|   326k|               continue;
   40|   326k|            }
   41|       |
   42|  1.25M|            const uint32_t length = countr_zero(mask);
   43|  1.25M|            c += length;
   44|  1.25M|            data += length;
   45|  1.25M|            write_escape();
   46|  1.25M|         }
   47|  5.56k|      }
   48|   196k|   }

_ZN3glz11countr_zeroEj:
   16|  1.25M|   {
   17|       |#ifdef _MSC_VER
   18|       |      return std::countr_zero(x);
   19|       |#else
   20|  1.25M|#if __has_builtin(__builtin_ctzl)
   21|  1.25M|      return __builtin_ctzl(x);
   22|       |#else
   23|       |      return std::countr_zero(x);
   24|       |#endif
   25|  1.25M|#endif
   26|  1.25M|   }
_ZN3glz11countr_zeroEm:
   29|  1.47k|   {
   30|       |#ifdef _MSC_VER
   31|       |      return std::countr_zero(x);
   32|       |#else
   33|  1.47k|#if __has_builtin(__builtin_ctzll)
   34|  1.47k|      return __builtin_ctzll(x);
   35|       |#else
   36|       |      return std::countr_zero(x);
   37|       |#endif
   38|  1.47k|#endif
   39|  1.47k|   }

_ZN3glz7compareILm1EcEEbPKT0_S3_:
  122|  7.22k|   {
  123|       |      if constexpr (Count > 8) {
  124|       |         return 0 == std::memcmp(lhs, rhs, Count);
  125|       |         // return internal_compare(lhs, rhs, Count);
  126|       |      }
  127|       |      else if constexpr (Count == 8) {
  128|       |         uint64_t l, r;
  129|       |         std::memcpy(&l, lhs, 8);
  130|       |         std::memcpy(&r, rhs, 8);
  131|       |         return l == r;
  132|       |      }
  133|       |      else if constexpr (Count == 7) {
  134|       |         uint32_t l, r;
  135|       |         std::memcpy(&l, lhs, 4);
  136|       |         std::memcpy(&r, rhs, 4);
  137|       |         uint32_t l2, r2;
  138|       |         std::memcpy(&l2, lhs + 3, 4);
  139|       |         std::memcpy(&r2, rhs + 3, 4);
  140|       |         return (l == r) & (l2 == r2);
  141|       |      }
  142|       |      else if constexpr (Count == 6) {
  143|       |         uint32_t l, r;
  144|       |         std::memcpy(&l, lhs, 4);
  145|       |         std::memcpy(&r, rhs, 4);
  146|       |         uint16_t l2, r2;
  147|       |         std::memcpy(&l2, lhs + 4, 2);
  148|       |         std::memcpy(&r2, rhs + 4, 2);
  149|       |         return (l == r) & (l2 == r2);
  150|       |      }
  151|       |      else if constexpr (Count == 5) {
  152|       |         uint32_t l, r;
  153|       |         std::memcpy(&l, lhs, 4);
  154|       |         std::memcpy(&r, rhs, 4);
  155|       |         return (l == r) & (lhs[4] == rhs[4]);
  156|       |      }
  157|       |      else if constexpr (Count == 4) {
  158|       |         uint32_t l, r;
  159|       |         std::memcpy(&l, lhs, 4);
  160|       |         std::memcpy(&r, rhs, 4);
  161|       |         return l == r;
  162|       |      }
  163|       |      else if constexpr (Count == 3) {
  164|       |         uint16_t l, r;
  165|       |         std::memcpy(&l, lhs, 2);
  166|       |         std::memcpy(&r, rhs, 2);
  167|       |         return (l == r) & (lhs[2] == rhs[2]);
  168|       |      }
  169|       |      else if constexpr (Count == 2) {
  170|       |         uint16_t l, r;
  171|       |         std::memcpy(&l, lhs, 2);
  172|       |         std::memcpy(&r, rhs, 2);
  173|       |         return l == r;
  174|       |      }
  175|  7.22k|      else if constexpr (Count == 1) {
  176|  7.22k|         return *lhs == *rhs;
  177|       |      }
  178|       |      else if constexpr (Count == 0) {
  179|       |         return true;
  180|       |      }
  181|  7.22k|   }
_ZN3glz7compareILm5EcEEbPKT0_S3_:
  122|  3.01k|   {
  123|       |      if constexpr (Count > 8) {
  124|       |         return 0 == std::memcmp(lhs, rhs, Count);
  125|       |         // return internal_compare(lhs, rhs, Count);
  126|       |      }
  127|       |      else if constexpr (Count == 8) {
  128|       |         uint64_t l, r;
  129|       |         std::memcpy(&l, lhs, 8);
  130|       |         std::memcpy(&r, rhs, 8);
  131|       |         return l == r;
  132|       |      }
  133|       |      else if constexpr (Count == 7) {
  134|       |         uint32_t l, r;
  135|       |         std::memcpy(&l, lhs, 4);
  136|       |         std::memcpy(&r, rhs, 4);
  137|       |         uint32_t l2, r2;
  138|       |         std::memcpy(&l2, lhs + 3, 4);
  139|       |         std::memcpy(&r2, rhs + 3, 4);
  140|       |         return (l == r) & (l2 == r2);
  141|       |      }
  142|       |      else if constexpr (Count == 6) {
  143|       |         uint32_t l, r;
  144|       |         std::memcpy(&l, lhs, 4);
  145|       |         std::memcpy(&r, rhs, 4);
  146|       |         uint16_t l2, r2;
  147|       |         std::memcpy(&l2, lhs + 4, 2);
  148|       |         std::memcpy(&r2, rhs + 4, 2);
  149|       |         return (l == r) & (l2 == r2);
  150|       |      }
  151|  3.01k|      else if constexpr (Count == 5) {
  152|  3.01k|         uint32_t l, r;
  153|  3.01k|         std::memcpy(&l, lhs, 4);
  154|  3.01k|         std::memcpy(&r, rhs, 4);
  155|  3.01k|         return (l == r) & (lhs[4] == rhs[4]);
  156|       |      }
  157|       |      else if constexpr (Count == 4) {
  158|       |         uint32_t l, r;
  159|       |         std::memcpy(&l, lhs, 4);
  160|       |         std::memcpy(&r, rhs, 4);
  161|       |         return l == r;
  162|       |      }
  163|       |      else if constexpr (Count == 3) {
  164|       |         uint16_t l, r;
  165|       |         std::memcpy(&l, lhs, 2);
  166|       |         std::memcpy(&r, rhs, 2);
  167|       |         return (l == r) & (lhs[2] == rhs[2]);
  168|       |      }
  169|       |      else if constexpr (Count == 2) {
  170|       |         uint16_t l, r;
  171|       |         std::memcpy(&l, lhs, 2);
  172|       |         std::memcpy(&r, rhs, 2);
  173|       |         return l == r;
  174|       |      }
  175|       |      else if constexpr (Count == 1) {
  176|       |         return *lhs == *rhs;
  177|       |      }
  178|       |      else if constexpr (Count == 0) {
  179|       |         return true;
  180|       |      }
  181|  3.01k|   }
_ZN3glz7compareILm3EcEEbPKT0_S3_:
  122|  4.86k|   {
  123|       |      if constexpr (Count > 8) {
  124|       |         return 0 == std::memcmp(lhs, rhs, Count);
  125|       |         // return internal_compare(lhs, rhs, Count);
  126|       |      }
  127|       |      else if constexpr (Count == 8) {
  128|       |         uint64_t l, r;
  129|       |         std::memcpy(&l, lhs, 8);
  130|       |         std::memcpy(&r, rhs, 8);
  131|       |         return l == r;
  132|       |      }
  133|       |      else if constexpr (Count == 7) {
  134|       |         uint32_t l, r;
  135|       |         std::memcpy(&l, lhs, 4);
  136|       |         std::memcpy(&r, rhs, 4);
  137|       |         uint32_t l2, r2;
  138|       |         std::memcpy(&l2, lhs + 3, 4);
  139|       |         std::memcpy(&r2, rhs + 3, 4);
  140|       |         return (l == r) & (l2 == r2);
  141|       |      }
  142|       |      else if constexpr (Count == 6) {
  143|       |         uint32_t l, r;
  144|       |         std::memcpy(&l, lhs, 4);
  145|       |         std::memcpy(&r, rhs, 4);
  146|       |         uint16_t l2, r2;
  147|       |         std::memcpy(&l2, lhs + 4, 2);
  148|       |         std::memcpy(&r2, rhs + 4, 2);
  149|       |         return (l == r) & (l2 == r2);
  150|       |      }
  151|       |      else if constexpr (Count == 5) {
  152|       |         uint32_t l, r;
  153|       |         std::memcpy(&l, lhs, 4);
  154|       |         std::memcpy(&r, rhs, 4);
  155|       |         return (l == r) & (lhs[4] == rhs[4]);
  156|       |      }
  157|       |      else if constexpr (Count == 4) {
  158|       |         uint32_t l, r;
  159|       |         std::memcpy(&l, lhs, 4);
  160|       |         std::memcpy(&r, rhs, 4);
  161|       |         return l == r;
  162|       |      }
  163|  4.86k|      else if constexpr (Count == 3) {
  164|  4.86k|         uint16_t l, r;
  165|  4.86k|         std::memcpy(&l, lhs, 2);
  166|  4.86k|         std::memcpy(&r, rhs, 2);
  167|  4.86k|         return (l == r) & (lhs[2] == rhs[2]);
  168|       |      }
  169|       |      else if constexpr (Count == 2) {
  170|       |         uint16_t l, r;
  171|       |         std::memcpy(&l, lhs, 2);
  172|       |         std::memcpy(&r, rhs, 2);
  173|       |         return l == r;
  174|       |      }
  175|       |      else if constexpr (Count == 1) {
  176|       |         return *lhs == *rhs;
  177|       |      }
  178|       |      else if constexpr (Count == 0) {
  179|       |         return true;
  180|       |      }
  181|  4.86k|   }

_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvNS1_17basic_string_viewIcS4_EERT0_Rm:
  192|  9.71M|   {
  193|  9.71M|      const auto n = str.size();
  194|  9.71M|      if constexpr (vector_like<B>) {
  195|       |         if constexpr (Checked) {
  196|       |            const auto k = ix + n;
  197|       |            if (ix + n > b.size()) [[unlikely]] {
  198|       |               grow_buffer(b, k);
  199|       |            }
  200|       |         }
  201|  9.71M|      }
  202|  9.71M|      std::memcpy(&b[ix], str.data(), n);
  203|  9.71M|      ix += n;
  204|  9.71M|   }
_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10byte_sizedEcEEvT1_RT0_Rm:
  150|  62.1M|   {
  151|       |      if constexpr (Checked && vector_like<B>) {
  152|       |         if (ix == b.size()) [[unlikely]] {
  153|       |            grow_buffer(b, b.size() == 0 ? 64 : ix + 1);
  154|       |         }
  155|       |      }
  156|  62.1M|      assign_maybe_cast(c, b, ix);
  157|  62.1M|      ++ix;
  158|  62.1M|   }
_ZN3glz17assign_maybe_castITkNS_10byte_sizedEcNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvT_RT0_Rm:
   95|  62.1M|   {
   96|  62.1M|      using V = std::decay_t<decltype(b[0])>;
   97|  62.1M|      using C = std::decay_t<decltype(c)>;
   98|  62.1M|      if constexpr (std::same_as<V, C>) {
   99|  62.1M|         b[ix] = c;
  100|       |      }
  101|       |      else {
  102|       |         b[ix] = static_cast<V>(c);
  103|       |      }
  104|  62.1M|   }

_ZN3glz5visitILm4EZNS_4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb0ELb0ELb1ELb1EEETnNS_14string_literalEXtlNS6_ILm1EEEEES2_TkNS_10is_contextENS_7contextEPKcSA_EEvRT1_RT2_RT3_T4_EUlTnmvE_EEvOT0_m:
   86|  15.1k|   {
   87|  15.1k|      if constexpr (N > 0) {
   88|  15.1k|         assert(index < N && "glz::visit index out of range");
  ------------------
  |  Branch (88:10): [True: 15.1k, False: 0]
  |  Branch (88:10): [True: 15.1k, Folded]
  |  Branch (88:10): [True: 15.1k, False: 0]
  ------------------
   89|       |         // Explicit sizes for small N to help the compiler and make debugging easier
   90|       |         if constexpr (N == 1) {
   91|       |            (void)index;
   92|       |            (void)(lambda.template operator()<0>());
   93|       |         }
   94|       |         else if constexpr (N == 2) {
   95|       |            switch (index) {
   96|       |            case 0:
   97|       |               lambda.template operator()<0>();
   98|       |               break;
   99|       |            case 1:
  100|       |               lambda.template operator()<1>();
  101|       |               break;
  102|       |            default:
  103|       |               std::unreachable();
  104|       |            }
  105|       |         }
  106|       |         else if constexpr (N == 3) {
  107|       |            switch (index) {
  108|       |            case 0:
  109|       |               lambda.template operator()<0>();
  110|       |               break;
  111|       |            case 1:
  112|       |               lambda.template operator()<1>();
  113|       |               break;
  114|       |            case 2:
  115|       |               lambda.template operator()<2>();
  116|       |               break;
  117|       |            default:
  118|       |               std::unreachable();
  119|       |            }
  120|       |         }
  121|  15.1k|         else if constexpr (N == 4) {
  122|  15.1k|            switch (index) {
  123|  4.49k|            case 0:
  ------------------
  |  Branch (123:13): [True: 4.49k, False: 10.6k]
  ------------------
  124|  4.49k|               lambda.template operator()<0>();
  125|  4.49k|               break;
  126|  2.74k|            case 1:
  ------------------
  |  Branch (126:13): [True: 2.74k, False: 12.4k]
  ------------------
  127|  2.74k|               lambda.template operator()<1>();
  128|  2.74k|               break;
  129|  3.02k|            case 2:
  ------------------
  |  Branch (129:13): [True: 3.02k, False: 12.1k]
  ------------------
  130|  3.02k|               lambda.template operator()<2>();
  131|  3.02k|               break;
  132|  4.88k|            case 3:
  ------------------
  |  Branch (132:13): [True: 4.88k, False: 10.2k]
  ------------------
  133|  4.88k|               lambda.template operator()<3>();
  134|  4.88k|               break;
  135|      0|            default:
  ------------------
  |  Branch (135:13): [True: 0, False: 15.1k]
  ------------------
  136|      0|               std::unreachable();
  137|  15.1k|            }
  138|       |         }
  139|       |         else if constexpr (N == 5) {
  140|       |            switch (index) {
  141|       |            case 0:
  142|       |               lambda.template operator()<0>();
  143|       |               break;
  144|       |            case 1:
  145|       |               lambda.template operator()<1>();
  146|       |               break;
  147|       |            case 2:
  148|       |               lambda.template operator()<2>();
  149|       |               break;
  150|       |            case 3:
  151|       |               lambda.template operator()<3>();
  152|       |               break;
  153|       |            case 4:
  154|       |               lambda.template operator()<4>();
  155|       |               break;
  156|       |            default:
  157|       |               std::unreachable();
  158|       |            }
  159|       |         }
  160|       |         else if constexpr (N == 6) {
  161|       |            switch (index) {
  162|       |            case 0:
  163|       |               lambda.template operator()<0>();
  164|       |               break;
  165|       |            case 1:
  166|       |               lambda.template operator()<1>();
  167|       |               break;
  168|       |            case 2:
  169|       |               lambda.template operator()<2>();
  170|       |               break;
  171|       |            case 3:
  172|       |               lambda.template operator()<3>();
  173|       |               break;
  174|       |            case 4:
  175|       |               lambda.template operator()<4>();
  176|       |               break;
  177|       |            case 5:
  178|       |               lambda.template operator()<5>();
  179|       |               break;
  180|       |            default:
  181|       |               std::unreachable();
  182|       |            }
  183|       |         }
  184|       |         else if constexpr (N == 7) {
  185|       |            switch (index) {
  186|       |            case 0:
  187|       |               lambda.template operator()<0>();
  188|       |               break;
  189|       |            case 1:
  190|       |               lambda.template operator()<1>();
  191|       |               break;
  192|       |            case 2:
  193|       |               lambda.template operator()<2>();
  194|       |               break;
  195|       |            case 3:
  196|       |               lambda.template operator()<3>();
  197|       |               break;
  198|       |            case 4:
  199|       |               lambda.template operator()<4>();
  200|       |               break;
  201|       |            case 5:
  202|       |               lambda.template operator()<5>();
  203|       |               break;
  204|       |            case 6:
  205|       |               lambda.template operator()<6>();
  206|       |               break;
  207|       |            default:
  208|       |               std::unreachable();
  209|       |            }
  210|       |         }
  211|       |         else if constexpr (N == 8) {
  212|       |            switch (index) {
  213|       |            case 0:
  214|       |               lambda.template operator()<0>();
  215|       |               break;
  216|       |            case 1:
  217|       |               lambda.template operator()<1>();
  218|       |               break;
  219|       |            case 2:
  220|       |               lambda.template operator()<2>();
  221|       |               break;
  222|       |            case 3:
  223|       |               lambda.template operator()<3>();
  224|       |               break;
  225|       |            case 4:
  226|       |               lambda.template operator()<4>();
  227|       |               break;
  228|       |            case 5:
  229|       |               lambda.template operator()<5>();
  230|       |               break;
  231|       |            case 6:
  232|       |               lambda.template operator()<6>();
  233|       |               break;
  234|       |            case 7:
  235|       |               lambda.template operator()<7>();
  236|       |               break;
  237|       |            default:
  238|       |               std::unreachable();
  239|       |            }
  240|       |         }
  241|       |         else if constexpr (N == 9) {
  242|       |            switch (index) {
  243|       |            case 0:
  244|       |               lambda.template operator()<0>();
  245|       |               break;
  246|       |            case 1:
  247|       |               lambda.template operator()<1>();
  248|       |               break;
  249|       |            case 2:
  250|       |               lambda.template operator()<2>();
  251|       |               break;
  252|       |            case 3:
  253|       |               lambda.template operator()<3>();
  254|       |               break;
  255|       |            case 4:
  256|       |               lambda.template operator()<4>();
  257|       |               break;
  258|       |            case 5:
  259|       |               lambda.template operator()<5>();
  260|       |               break;
  261|       |            case 6:
  262|       |               lambda.template operator()<6>();
  263|       |               break;
  264|       |            case 7:
  265|       |               lambda.template operator()<7>();
  266|       |               break;
  267|       |            case 8:
  268|       |               lambda.template operator()<8>();
  269|       |               break;
  270|       |            default:
  271|       |               std::unreachable();
  272|       |            }
  273|       |         }
  274|       |         else if constexpr (N == 10) {
  275|       |            switch (index) {
  276|       |            case 0:
  277|       |               lambda.template operator()<0>();
  278|       |               break;
  279|       |            case 1:
  280|       |               lambda.template operator()<1>();
  281|       |               break;
  282|       |            case 2:
  283|       |               lambda.template operator()<2>();
  284|       |               break;
  285|       |            case 3:
  286|       |               lambda.template operator()<3>();
  287|       |               break;
  288|       |            case 4:
  289|       |               lambda.template operator()<4>();
  290|       |               break;
  291|       |            case 5:
  292|       |               lambda.template operator()<5>();
  293|       |               break;
  294|       |            case 6:
  295|       |               lambda.template operator()<6>();
  296|       |               break;
  297|       |            case 7:
  298|       |               lambda.template operator()<7>();
  299|       |               break;
  300|       |            case 8:
  301|       |               lambda.template operator()<8>();
  302|       |               break;
  303|       |            case 9:
  304|       |               lambda.template operator()<9>();
  305|       |               break;
  306|       |            default:
  307|       |               std::unreachable();
  308|       |            }
  309|       |         }
  310|       |         else {
  311|       |#ifdef _MSC_VER
  312|       |            using Lambda = std::decay_t<decltype(lambda)>;
  313|       |            static const auto jump_table = []<size_t... I>(std::index_sequence<I...>) {
  314|       |               return std::array{make_jump_function<I, Lambda>()...};
  315|       |            }(std::make_index_sequence<N>{});
  316|       |#else
  317|       |            static constexpr auto jump_table = []<size_t... I>(std::index_sequence<I...>) {
  318|       |               return std::array{+[](std::decay_t<decltype(lambda)>& l) { l.template operator()<I>(); }...};
  319|       |            }(std::make_index_sequence<N>{});
  320|       |#endif
  321|       |
  322|       |#if defined(__clang__)
  323|       |            [[assume(index < N)]];
  324|       |#endif
  325|       |            jump_table[index](lambda);
  326|       |
  327|       |            // This code runs significantly slower on Clang
  328|       |            // Simple tests with assembly show that this should be faster,
  329|       |            // but full Glaze assembly need to be looked into
  330|       |            /*[&, index]<size_t... I>(std::index_sequence<I...>) {
  331|       |               (void)((index == I ? lambda.template operator()<I>() : void()), ...);
  332|       |            }(std::make_index_sequence<N>{});*/
  333|       |         }
  334|  15.1k|      }
  335|  15.1k|   }

_ZN3glz8to_charsIaQsr3stdE7same_asIu14__remove_cvrefIT_EaEEEPcS3_S1_:
  277|  56.7k|   {
  278|  56.7k|      *buf = '-';
  279|       |      // Keep the magnitude uint8_t: arithmetic promotes to int, which has no overload where int32_t is long
  280|       |      // (e.g. arm-none-eabi, ESP32).
  281|  56.7k|      const uint8_t u = uint8_t(val);
  282|  56.7k|      return to_chars(buf + (val < 0), uint8_t(val < 0 ? 0u - u : u));
  ------------------
  |  Branch (282:48): [True: 20.8k, False: 35.9k]
  ------------------
  283|  56.7k|   }
_ZN3glz8to_charsIhQsr3stdE7same_asIu14__remove_cvrefIT_EhEEEPcS3_S1_:
  259|  1.73M|   {
  260|  1.73M|      using namespace itoa_impl;
  261|  1.73M|      if (val < 100) {
  ------------------
  |  Branch (261:11): [True: 1.16M, False: 570k]
  ------------------
  262|  1.16M|         return u32_2(buf, val);
  263|  1.16M|      }
  264|   570k|      else {
  265|       |         // 100-255: 3 digits
  266|   570k|         const uint32_t q = val / 100;
  267|   570k|         *buf = char('0' + q);
  268|   570k|         std::memcpy(buf + 1, &digit_pairs[val - q * 100], 2);
  269|   570k|         return buf + 3;
  270|   570k|      }
  271|  1.73M|   }
_ZN3glz9itoa_impl5u32_2EPcj:
   74|  1.22M|      {
   75|  1.22M|         const uint32_t lz = val < 10;
   76|  1.22M|         std::memcpy(buf, char_table + ((val * 2) | lz), 2);
   77|  1.22M|         return buf + 2 - lz;
   78|  1.22M|      }
_ZN3glz8to_charsIsQsr3stdE7same_asIu14__remove_cvrefIT_EsEEEPcS3_S1_:
  309|   126k|   {
  310|   126k|      *buf = '-';
  311|   126k|      const uint16_t u = uint16_t(val); // see int8_t
  312|   126k|      return to_chars(buf + (val < 0), uint16_t(val < 0 ? 0u - u : u));
  ------------------
  |  Branch (312:49): [True: 14.2k, False: 112k]
  ------------------
  313|   126k|   }
_ZN3glz8to_charsItQsr3stdE7same_asIu14__remove_cvrefIT_EtEEEPcS3_S1_:
  289|   290k|   {
  290|   290k|      using namespace itoa_impl;
  291|   290k|      if (val < 100) {
  ------------------
  |  Branch (291:11): [True: 56.9k, False: 233k]
  ------------------
  292|  56.9k|         return u32_2(buf, val);
  293|  56.9k|      }
  294|   233k|      else if (val < 10000) {
  ------------------
  |  Branch (294:16): [True: 48.8k, False: 184k]
  ------------------
  295|  48.8k|         return u32_4(buf, val);
  296|  48.8k|      }
  297|   184k|      else {
  298|       |         // 10000-65535: 5 digits
  299|   184k|         const uint32_t q = val / 10000;
  300|   184k|         *buf = char('0' + q);
  301|   184k|         return u64_len_4(buf + 1, val - q * 10000);
  302|   184k|      }
  303|   290k|   }
_ZN3glz9itoa_impl5u32_4EPcj:
   81|  48.8k|      {
   82|  48.8k|         const uint32_t aa = (val * 5243) >> 19; // val / 100
   83|  48.8k|         const uint32_t lz = aa < 10;
   84|  48.8k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   85|  48.8k|         std::memcpy(buf + 2 - lz, &digit_pairs[val - aa * 100], 2);
   86|  48.8k|         return buf + 4 - lz;
   87|  48.8k|      }
_ZN3glz9itoa_impl9u64_len_4EPcj:
  148|   184k|      {
  149|   184k|         const uint32_t aa = (val * 5243) >> 19;
  150|   184k|         std::memcpy(buf, &digit_pairs[aa], 2);
  151|   184k|         std::memcpy(buf + 2, &digit_pairs[val - aa * 100], 2);
  152|   184k|         return buf + 4;
  153|   184k|      }

_ZN3glz13to_chars_40kbImQsr3stdE7same_asIu14__remove_cvrefIT_EmEEEPcS3_S1_:
  291|  10.9M|   {
  292|  10.9M|      using namespace itoa_40kb_impl;
  293|  10.9M|      if (val < 10000) {
  ------------------
  |  Branch (293:11): [True: 10.3M, False: 561k]
  ------------------
  294|  10.3M|         if (val < 100)
  ------------------
  |  Branch (294:14): [True: 10.3M, False: 4.99k]
  ------------------
  295|  10.3M|            return u64_2(buf, val);
  296|  4.99k|         else
  297|  4.99k|            return u64_4(buf, val);
  298|  10.3M|      }
  299|   561k|      else if (val < 100000000) {
  ------------------
  |  Branch (299:16): [True: 170k, False: 391k]
  ------------------
  300|   170k|         if (val < 1000000)
  ------------------
  |  Branch (300:14): [True: 163k, False: 6.63k]
  ------------------
  301|   163k|            return u64_6(buf, val);
  302|  6.63k|         else
  303|  6.63k|            return u64_8(buf, val);
  304|   170k|      }
  305|   391k|      else if (val < 1000000000000ULL) {
  ------------------
  |  Branch (305:16): [True: 92.6k, False: 298k]
  ------------------
  306|  92.6k|         if (val < 10000000000ULL)
  ------------------
  |  Branch (306:14): [True: 89.2k, False: 3.48k]
  ------------------
  307|  89.2k|            return u64_10(buf, val);
  308|  3.48k|         else
  309|  3.48k|            return u64_12(buf, val);
  310|  92.6k|      }
  311|   298k|      else if (val < 10000000000000000ULL) {
  ------------------
  |  Branch (311:16): [True: 36.7k, False: 261k]
  ------------------
  312|  36.7k|         if (val < 100000000000000ULL)
  ------------------
  |  Branch (312:14): [True: 18.6k, False: 18.1k]
  ------------------
  313|  18.6k|            return u64_14(buf, val);
  314|  18.1k|         else
  315|  18.1k|            return u64_16(buf, val);
  316|  36.7k|      }
  317|   261k|      else if (val < 1000000000000000000ULL) {
  ------------------
  |  Branch (317:16): [True: 46.2k, False: 215k]
  ------------------
  318|  46.2k|         return u64_18(buf, val);
  319|  46.2k|      }
  320|   215k|      else {
  321|   215k|         return u64_20(buf, val);
  322|   215k|      }
  323|  10.9M|   }
_ZN3glz14itoa_40kb_impl5u64_2EPcm:
  114|  10.3M|      {
  115|  10.3M|         const uint64_t lz = val < 10;
  116|  10.3M|         std::memcpy(buf, char_table + ((val * 2) | lz), 2);
  117|  10.3M|         return buf + 2 - lz;
  118|  10.3M|      }
_ZN3glz14itoa_40kb_impl5u64_4EPcm:
  121|  4.99k|      {
  122|  4.99k|         const uint64_t aa = (val * 5243ULL) >> 19;
  123|  4.99k|         const uint64_t lz = val < 1000;
  124|  4.99k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  125|  4.99k|         std::memcpy(buf + 2 - lz, &digit_pairs[val - aa * 100], 2);
  126|  4.99k|         return buf + 4 - lz;
  127|  4.99k|      }
_ZN3glz14itoa_40kb_impl5u64_6EPcm:
  130|   163k|      {
  131|   163k|         const uint64_t aa = (val * 429497ULL) >> 32;
  132|   163k|         const uint64_t lz = val < 100000;
  133|   163k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  134|   163k|         std::memcpy(buf + 2 - lz, &digit_quads[val - aa * 10000], 4);
  135|   163k|         return buf + 6 - lz;
  136|   163k|      }
_ZN3glz14itoa_40kb_impl5u64_8EPcm:
  139|  6.63k|      {
  140|  6.63k|         const uint64_t aabb = (val * 109951163ULL) >> 40;
  141|  6.63k|         const uint64_t aa = (aabb * 5243ULL) >> 19;
  142|  6.63k|         const uint64_t lz = val < 10000000;
  143|  6.63k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  144|  6.63k|         std::memcpy(buf + 2 - lz, &digit_pairs[aabb - aa * 100], 2);
  145|  6.63k|         std::memcpy(buf + 4 - lz, &digit_quads[val - aabb * 10000], 4);
  146|  6.63k|         return buf + 8 - lz;
  147|  6.63k|      }
_ZN3glz14itoa_40kb_impl6u64_10EPcm:
  150|  89.2k|      {
  151|  89.2k|         const uint64_t high = div_1e8(val);
  152|  89.2k|         const uint64_t low = val - high * 100000000;
  153|  89.2k|         const uint64_t lz = high < 10;
  154|  89.2k|         std::memcpy(buf, char_table + ((high * 2) | lz), 2);
  155|  89.2k|         const uint64_t aabb = (low * 109951163ULL) >> 40;
  156|  89.2k|         const uint64_t ccdd = low - aabb * 10000;
  157|  89.2k|         std::memcpy(buf + 2 - lz, &digit_quads[aabb], 4);
  158|  89.2k|         std::memcpy(buf + 6 - lz, &digit_quads[ccdd], 4);
  159|  89.2k|         return buf + 10 - lz;
  160|  89.2k|      }
_ZN3glz14itoa_40kb_impl7div_1e8Em:
   50|   838k|      {
   51|   838k|         constexpr __uint128_t multiplier = 0xabcc77118461cefdULL;
   52|   838k|         constexpr uint64_t shift = 90;
   53|   838k|         return static_cast<uint64_t>((static_cast<__uint128_t>(value) * multiplier) >> shift);
   54|   838k|      }
_ZN3glz14itoa_40kb_impl6u64_12EPcm:
  163|  3.48k|      {
  164|  3.48k|         const uint64_t high = div_1e8(val);
  165|  3.48k|         const uint64_t low = val - high * 100000000;
  166|  3.48k|         const uint64_t aa = (high * 5243ULL) >> 19;
  167|  3.48k|         const uint64_t lz = aa < 10;
  168|  3.48k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  169|  3.48k|         std::memcpy(buf + 2 - lz, &digit_pairs[high - aa * 100], 2);
  170|  3.48k|         const uint64_t aabb = (low * 109951163ULL) >> 40;
  171|  3.48k|         const uint64_t ccdd = low - aabb * 10000;
  172|  3.48k|         std::memcpy(buf + 4 - lz, &digit_quads[aabb], 4);
  173|  3.48k|         std::memcpy(buf + 8 - lz, &digit_quads[ccdd], 4);
  174|  3.48k|         return buf + 12 - lz;
  175|  3.48k|      }
_ZN3glz14itoa_40kb_impl6u64_14EPcm:
  178|  18.6k|      {
  179|  18.6k|         const uint64_t high = div_1e8(val);
  180|  18.6k|         const uint64_t low = val - high * 100000000;
  181|  18.6k|         const uint64_t aa = (high * 429497ULL) >> 32;
  182|  18.6k|         const uint64_t lz = aa < 10;
  183|  18.6k|         const uint64_t bbcc = high - aa * 10000;
  184|  18.6k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  185|  18.6k|         std::memcpy(buf + 2 - lz, &digit_quads[bbcc], 4);
  186|  18.6k|         const uint64_t aabb = (low * 109951163ULL) >> 40;
  187|  18.6k|         const uint64_t ccdd = low - aabb * 10000;
  188|  18.6k|         std::memcpy(buf + 6 - lz, &digit_quads[aabb], 4);
  189|  18.6k|         std::memcpy(buf + 10 - lz, &digit_quads[ccdd], 4);
  190|  18.6k|         return buf + 14 - lz;
  191|  18.6k|      }
_ZN3glz14itoa_40kb_impl6u64_16EPcm:
  194|  18.1k|      {
  195|  18.1k|         const uint64_t high = div_1e8(val);
  196|  18.1k|         const uint64_t low = val - high * 100000000;
  197|  18.1k|         uint64_t aabb = (high * 109951163ULL) >> 40;
  198|  18.1k|         uint64_t ccdd = high - aabb * 10000;
  199|  18.1k|         const uint64_t aa = (aabb * 5243ULL) >> 19;
  200|  18.1k|         const uint64_t lz = aa < 10;
  201|  18.1k|         const uint64_t bb = aabb - aa * 100;
  202|  18.1k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  203|  18.1k|         std::memcpy(buf + 2 - lz, &digit_pairs[bb], 2);
  204|  18.1k|         std::memcpy(buf + 4 - lz, &digit_quads[ccdd], 4);
  205|  18.1k|         aabb = (low * 109951163ULL) >> 40;
  206|  18.1k|         ccdd = low - aabb * 10000;
  207|  18.1k|         std::memcpy(buf + 8 - lz, &digit_quads[aabb], 4);
  208|  18.1k|         std::memcpy(buf + 12 - lz, &digit_quads[ccdd], 4);
  209|  18.1k|         return buf + 16 - lz;
  210|  18.1k|      }
_ZN3glz14itoa_40kb_impl6u64_18EPcm:
  213|  46.2k|      {
  214|  46.2k|         const uint64_t high = div_1e8(val);
  215|  46.2k|         const uint64_t low = val - high * 100000000;
  216|  46.2k|         const uint64_t high10 = div_1e8(high);
  217|  46.2k|         const uint64_t low10 = high - high10 * 100000000;
  218|  46.2k|         const uint64_t lz = high10 < 10;
  219|  46.2k|         std::memcpy(buf, char_table + ((high10 * 2) | lz), 2);
  220|  46.2k|         uint64_t aabb = (low10 * 109951163ULL) >> 40;
  221|  46.2k|         uint64_t ccdd = low10 - aabb * 10000;
  222|  46.2k|         std::memcpy(buf + 2 - lz, &digit_quads[aabb], 4);
  223|  46.2k|         std::memcpy(buf + 6 - lz, &digit_quads[ccdd], 4);
  224|  46.2k|         aabb = (low * 109951163ULL) >> 40;
  225|  46.2k|         ccdd = low - aabb * 10000;
  226|  46.2k|         std::memcpy(buf + 10 - lz, &digit_quads[aabb], 4);
  227|  46.2k|         std::memcpy(buf + 14 - lz, &digit_quads[ccdd], 4);
  228|  46.2k|         return buf + 18 - lz;
  229|  46.2k|      }
_ZN3glz14itoa_40kb_impl6u64_20EPcm:
  232|   215k|      {
  233|   215k|         const uint64_t high = div_1e8(val);
  234|   215k|         const uint64_t low = val - high * 100000000;
  235|   215k|         const uint64_t high12 = div_1e8(high);
  236|   215k|         const uint64_t low12 = high - high12 * 100000000;
  237|   215k|         const uint64_t aa = (high12 * 5243ULL) >> 19;
  238|   215k|         const uint64_t lz = aa < 10;
  239|   215k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
  240|   215k|         std::memcpy(buf + 2 - lz, &digit_pairs[high12 - aa * 100], 2);
  241|   215k|         uint64_t aabb = (low12 * 109951163ULL) >> 40;
  242|   215k|         uint64_t ccdd = low12 - aabb * 10000;
  243|   215k|         std::memcpy(buf + 4 - lz, &digit_quads[aabb], 4);
  244|   215k|         std::memcpy(buf + 8 - lz, &digit_quads[ccdd], 4);
  245|   215k|         aabb = (low * 109951163ULL) >> 40;
  246|   215k|         ccdd = low - aabb * 10000;
  247|   215k|         std::memcpy(buf + 12 - lz, &digit_quads[aabb], 4);
  248|   215k|         std::memcpy(buf + 16 - lz, &digit_quads[ccdd], 4);
  249|   215k|         return buf + 20 - lz;
  250|   215k|      }
_ZN3glz13to_chars_40kbIlQsr3stdE7same_asIu14__remove_cvrefIT_ElEEEPcS3_S1_:
  328|  1.94M|   {
  329|  1.94M|      *buf = '-';
  330|  1.94M|      return to_chars_40kb(buf + (val < 0),
  331|  1.94M|                           static_cast<uint64_t>((static_cast<uint64_t>(val) ^ (val >> 63)) - (val >> 63)));
  332|  1.94M|   }
_ZN3glz13to_chars_40kbIiQsr3stdE7same_asIu14__remove_cvrefIT_EiEEEPcS3_S1_:
  282|  48.0k|   {
  283|  48.0k|      *buf = '-';
  284|  48.0k|      return to_chars_40kb(buf + (val < 0),
  285|  48.0k|                           static_cast<uint32_t>((static_cast<uint32_t>(val) ^ (val >> 31)) - (val >> 31)));
  286|  48.0k|   }
_ZN3glz13to_chars_40kbIjQsr3stdE7same_asIu14__remove_cvrefIT_EjEEEPcS3_S1_:
  260|   228k|   {
  261|   228k|      using namespace itoa_40kb_impl;
  262|   228k|      if (val < 10000) {
  ------------------
  |  Branch (262:11): [True: 27.5k, False: 200k]
  ------------------
  263|  27.5k|         if (val < 100)
  ------------------
  |  Branch (263:14): [True: 25.2k, False: 2.31k]
  ------------------
  264|  25.2k|            return u32_2(buf, val);
  265|  2.31k|         else
  266|  2.31k|            return u32_4(buf, val);
  267|  27.5k|      }
  268|   200k|      else if (val < 100000000) {
  ------------------
  |  Branch (268:16): [True: 15.1k, False: 185k]
  ------------------
  269|  15.1k|         if (val < 1000000)
  ------------------
  |  Branch (269:14): [True: 4.06k, False: 11.1k]
  ------------------
  270|  4.06k|            return u32_6(buf, val);
  271|  11.1k|         else
  272|  11.1k|            return u32_8(buf, val);
  273|  15.1k|      }
  274|   185k|      else {
  275|   185k|         return u32_10(buf, val);
  276|   185k|      }
  277|   228k|   }
_ZN3glz14itoa_40kb_impl5u32_2EPcj:
   62|  25.2k|      {
   63|  25.2k|         const uint64_t lz = val < 10;
   64|       |         // Use OR since val*2 is always even (bit 0 is 0)
   65|  25.2k|         std::memcpy(buf, char_table + ((val * 2) | lz), 2);
   66|  25.2k|         return buf + 2 - lz;
   67|  25.2k|      }
_ZN3glz14itoa_40kb_impl5u32_4EPcj:
   70|  2.31k|      {
   71|  2.31k|         const uint32_t aa = (val * 5243) >> 19;
   72|  2.31k|         const uint64_t lz = val < 1000;
   73|  2.31k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   74|  2.31k|         std::memcpy(buf + 2 - lz, &digit_pairs[val - aa * 100], 2);
   75|  2.31k|         return buf + 4 - lz;
   76|  2.31k|      }
_ZN3glz14itoa_40kb_impl5u32_6EPcj:
   79|  4.06k|      {
   80|  4.06k|         const uint32_t aa = static_cast<uint32_t>((static_cast<uint64_t>(val) * 429497ULL) >> 32);
   81|  4.06k|         const uint64_t lz = val < 100000;
   82|  4.06k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   83|  4.06k|         std::memcpy(buf + 2 - lz, &digit_quads[val - aa * 10000], 4);
   84|  4.06k|         return buf + 6 - lz;
   85|  4.06k|      }
_ZN3glz14itoa_40kb_impl5u32_8EPcj:
   88|  11.1k|      {
   89|  11.1k|         const uint64_t aabb = (static_cast<uint64_t>(val) * 109951163ULL) >> 40;
   90|  11.1k|         const uint64_t aa = (aabb * 5243ULL) >> 19;
   91|  11.1k|         const uint64_t lz = val < 10000000;
   92|  11.1k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   93|  11.1k|         std::memcpy(buf + 2 - lz, &digit_pairs[aabb - aa * 100], 2);
   94|  11.1k|         std::memcpy(buf + 4 - lz, &digit_quads[val - aabb * 10000], 4);
   95|  11.1k|         return buf + 8 - lz;
   96|  11.1k|      }
_ZN3glz14itoa_40kb_impl6u32_10EPcj:
   99|   185k|      {
  100|   185k|         const uint64_t high = div_1e8(val);
  101|   185k|         const uint64_t low = val - high * 100000000;
  102|   185k|         const uint64_t lz = high < 10;
  103|   185k|         std::memcpy(buf, char_table + ((high * 2) | lz), 2);
  104|   185k|         const uint64_t aabb = (low * 109951163ULL) >> 40;
  105|   185k|         const uint64_t ccdd = low - aabb * 10000;
  106|   185k|         std::memcpy(buf + 2 - lz, &digit_quads[aabb], 4);
  107|   185k|         std::memcpy(buf + 6 - lz, &digit_quads[ccdd], 4);
  108|   185k|         return buf + 10 - lz;
  109|   185k|      }

_ZN3glz8to_charsITkNSt3__114floating_pointEdLb0EEEPcS2_T_:
 1118|  18.6M|   {
 1119|  18.6M|      static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>);
 1120|  18.6M|      return zmij::detail::write<T, OptSize>(val, buf);
 1121|  18.6M|   }
_ZN3glz4zmij6detail5writeIdLb0EEEPcT_S3_:
  975|  18.6M|      {
  976|  18.6M|         using namespace detail_impl;
  977|  18.6M|         using traits = float_traits<Float>;
  978|  18.6M|         auto bits = traits::to_bits(value);
  979|  18.6M|         auto bin_exp = traits::get_exp(bits);
  980|  18.6M|         auto bin_sig = traits::get_sig(bits);
  981|       |
  982|  18.6M|         *buffer = '-';
  983|  18.6M|         buffer += traits::is_negative(bits);
  984|       |
  985|  18.6M|         const auto* c = &consts_v<OptSize>;
  986|  18.6M|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|  18.6M|#define ZMIJ_ASM(x) asm x
  ------------------
  987|  18.6M|         int64_t threshold = traits::num_bits == 64 ? static_cast<int64_t>(c->threshold) : 10'000'000;
  ------------------
  |  Branch (987:30): [True: 18.6M, Folded]
  ------------------
  988|       |
  989|  18.6M|         to_decimal_result dec;
  990|  18.6M|         bool is_normal = unsigned(bin_exp - 1) < unsigned(traits::exp_mask - 1);
  991|  18.6M|         if (!is_normal) [[unlikely]] {
  ------------------
  |  Branch (991:14): [True: 802k, False: 17.8M]
  ------------------
  992|   802k|            if (bin_exp != 0) {
  ------------------
  |  Branch (992:17): [True: 139k, False: 663k]
  ------------------
  993|       |#if GLZ_ZMIJ_EMIT_INF_NAN
  994|       |               memcpy(buffer, bin_sig == 0 ? "inf" : "nan", 4);
  995|       |               return buffer + 3;
  996|       |#else
  997|       |               // Undo the speculative '-' for sign-bit-set NaN/Inf: JSON "null"
  998|       |               // never carries a sign.
  999|   139k|               buffer -= traits::is_negative(bits);
 1000|   139k|               memcpy(buffer, "null", 4);
 1001|   139k|               return buffer + 4;
 1002|   139k|#endif
 1003|   139k|            }
 1004|   663k|            if (bin_sig == 0) {
  ------------------
  |  Branch (1004:17): [True: 637k, False: 26.5k]
  ------------------
 1005|   637k|               memcpy(buffer, "0", 2);
 1006|   637k|               return buffer + 1;
 1007|   637k|            }
 1008|  26.5k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig, 1, true, *c);
 1009|  26.5k|            int64_t dec_sig = dec.sig * 10 + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1009:47): [True: 19.5k, False: 6.96k]
  ------------------
 1010|  26.5k|            int32_t dec_exp = dec.exp;
 1011|  63.9k|            while (dec_sig < threshold) {
  ------------------
  |  Branch (1011:20): [True: 37.4k, False: 26.5k]
  ------------------
 1012|  37.4k|               dec_sig *= 10;
 1013|  37.4k|               --dec_exp;
 1014|  37.4k|            }
 1015|  26.5k|            int64_t d = static_cast<int64_t>(detail_impl::div10(static_cast<uint64_t>(dec_sig)));
 1016|  26.5k|            int32_t last_digit = static_cast<int32_t>(dec_sig - d * 10);
 1017|  26.5k|            dec = {d, dec_exp, last_digit, last_digit != 0};
 1018|  26.5k|         }
 1019|  17.8M|         else {
 1020|  17.8M|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig | traits::implicit_bit,
 1021|  17.8M|                                                                                     bin_exp, bin_sig != 0, *c);
 1022|  17.8M|         }
 1023|  17.8M|         bool extra_digit = dec.sig >= threshold;
 1024|  17.8M|         int dec_exp = dec.exp + traits::max_digits10 - 2 + extra_digit;
 1025|  17.8M|         if (traits::num_bits == 32 && dec.sig < 1'000'000) [[unlikely]] {
  ------------------
  |  Branch (1025:14): [Folded, False: 17.8M]
  |  Branch (1025:40): [True: 0, False: 0]
  ------------------
 1026|      0|            dec.sig = 10 * dec.sig + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1026:39): [True: 0, False: 0]
  ------------------
 1027|      0|            dec.has_last_digit = false;
 1028|      0|            --dec_exp;
 1029|      0|         }
 1030|       |
 1031|  17.8M|         char* start = buffer;
 1032|  17.8M|         auto dig = to_digits<traits::num_bits, OptSize>(static_cast<uint64_t>(dec.sig), extra_digit, *c);
 1033|  17.8M|         constexpr int bcd_size = traits::num_bits == 64 ? 16 : 8;
  ------------------
  |  Branch (1033:35): [True: 0, Folded]
  ------------------
 1034|  17.8M|         if (dec_exp >= traits::min_fixed_dec_exp && dec_exp <= traits::max_fixed_dec_exp) {
  ------------------
  |  Branch (1034:14): [True: 4.43M, False: 13.4M]
  |  Branch (1034:54): [True: 4.42M, False: 10.4k]
  ------------------
 1035|  4.42M|            memcpy(start, &zeros_v, 8);
 1036|  4.42M|            const auto& fmt = dec_exp_formats.get<traits>(dec_exp);
 1037|  4.42M|            buffer += fmt.start_pos;
 1038|  4.42M|            memcpy(buffer, &dig.digits, bcd_size);
 1039|  4.42M|            memmove(buffer, buffer + !extra_digit, bcd_size);
 1040|  4.42M|            buffer[bcd_size + extra_digit - 1] = static_cast<char>('0' + (dec.has_last_digit ? dec.last_digit : 0));
  ------------------
  |  Branch (1040:75): [True: 508k, False: 3.91M]
  ------------------
 1041|  4.42M|            memmove(start + fmt.shift_pos, start + fmt.point_pos, bcd_size);
 1042|  4.42M|            start[fmt.point_pos] = '.';
 1043|  4.42M|            int num_digits = dec.has_last_digit ? bcd_size : dig.num_digits - 1;
  ------------------
  |  Branch (1043:30): [True: 508k, False: 3.91M]
  ------------------
 1044|  4.42M|            return buffer + fmt.exp_pos[num_digits + extra_digit - 1];
 1045|  4.42M|         }
 1046|  13.4M|         buffer += extra_digit;
 1047|  13.4M|         memcpy(buffer, &dig.digits, bcd_size);
 1048|  13.4M|         buffer[bcd_size] = static_cast<char>('0' + dec.last_digit);
 1049|  13.4M|         buffer += dec.has_last_digit ? bcd_size + 1 : dig.num_digits;
  ------------------
  |  Branch (1049:20): [True: 12.8M, False: 651k]
  ------------------
 1050|  13.4M|         start[0] = start[1];
 1051|  13.4M|         start[1] = '.';
 1052|  13.4M|         buffer -= (buffer - 1 == start + 1);
 1053|       |
 1054|  13.4M|         if constexpr (exp_string_table<OptSize>::enable) {
 1055|  13.4M|            uint64_t exp_data = exp_strings_v<OptSize>.data[dec_exp + exp_string_table<OptSize>::offset];
 1056|  13.4M|            int len = int(exp_data >> 48);
 1057|  13.4M|            if (is_big_endian) exp_data = bswap64(exp_data);
  ------------------
  |  Branch (1057:17): [Folded, False: 13.4M]
  ------------------
 1058|  13.4M|            memcpy(buffer, &exp_data, traits::max_exponent10 >= 100 ? 8 : 4);
  ------------------
  |  Branch (1058:39): [True: 13.4M, Folded]
  ------------------
 1059|  13.4M|            return buffer + len;
 1060|  13.4M|         }
 1061|       |         // Glaze emits uppercase 'E', omits '+' on positive exponents, and
 1062|       |         // drops the leading zero on single-digit exponents (E7, not E07).
 1063|       |         // Branchless: write "E-" always, then advance past the '-' only when
 1064|       |         // the exponent is negative.
 1065|      0|         bool neg = dec_exp < 0;
 1066|  13.4M|         buffer[0] = 'E';
 1067|  13.4M|         buffer[1] = '-';
 1068|  13.4M|         buffer += 1 + unsigned(neg);
 1069|  13.4M|         dec_exp = neg ? -dec_exp : dec_exp;
  ------------------
  |  Branch (1069:20): [True: 0, False: 13.4M]
  ------------------
 1070|  13.4M|         unsigned hundreds_written = 0;
 1071|  13.4M|         if constexpr (traits::max_exponent10 >= 100) {
 1072|  13.4M|            int32_t digit = 0;
 1073|       |            if constexpr (use_umul128_hi64) {
 1074|       |               digit = static_cast<int32_t>(umul128_hi64(static_cast<uint64_t>(dec_exp), 0x290000000000000ull));
 1075|       |            }
 1076|  13.4M|            else {
 1077|  13.4M|               digit = static_cast<int32_t>((uint32_t(dec_exp) * div100_sig) >> div100_exp);
 1078|  13.4M|            }
 1079|  13.4M|            *buffer = static_cast<char>('0' + digit);
 1080|  13.4M|            hundreds_written = unsigned(dec_exp >= 100);
 1081|  13.4M|            buffer += hundreds_written;
 1082|  13.4M|            dec_exp -= digit * 100;
 1083|  13.4M|         }
 1084|       |         // dec_exp now in [0, 99]. Skip the tens digit only when no higher
 1085|       |         // digit has been written (i.e. true leading zero, not interior).
 1086|  13.4M|         const char* d2 = digits2(dec_exp);
 1087|  13.4M|         *buffer = d2[0];
 1088|  13.4M|         buffer += hundreds_written | unsigned(dec_exp >= 10);
 1089|  13.4M|         *buffer = d2[1];
 1090|  13.4M|         return buffer + 1;
 1091|  17.8M|      }
_ZN3glz4zmij11detail_impl12float_traitsIdE7to_bitsEd:
  358|  18.6M|         {
  359|  18.6M|            sig_type bits;
  360|  18.6M|            memcpy(&bits, &value, sizeof(value));
  361|  18.6M|            return bits;
  362|  18.6M|         }
_ZN3glz4zmij11detail_impl12float_traitsIdE7get_expEm:
  367|  18.6M|         {
  368|  18.6M|            return static_cast<int32_t>((bits << 1) >> (num_sig_bits + 1));
  369|  18.6M|         }
_ZN3glz4zmij11detail_impl12float_traitsIdE7get_sigEm:
  365|  18.6M|         static auto get_sig(sig_type bits) noexcept -> sig_type { return bits & (implicit_bit - 1); }
_ZN3glz4zmij11detail_impl12float_traitsIdE11is_negativeEm:
  364|  18.8M|         static auto is_negative(sig_type bits) noexcept -> bool { return bits >> (num_bits - 1); }
_ZN3glz4zmij11detail_impl10to_decimalIdmLb0EEENS1_17to_decimal_resultET0_lbRKNS1_9constantsIXT1_EEE:
  868|  17.8M|      {
  869|  17.8M|         using traits = float_traits<Float>;
  870|  17.8M|         int64_t bin_exp = raw_exp - traits::exp_offset;
  871|  17.8M|         constexpr int num_bits = std::numeric_limits<UInt>::digits;
  872|       |
  873|  17.8M|         constexpr uint64_t log10_2_sig = 78'913;
  874|  17.8M|         constexpr int32_t log10_2_exp = 18;
  875|  17.8M|         int32_t dec_exp = 0;
  876|       |         if constexpr (use_umul128_hi64) {
  877|       |            dec_exp =
  878|       |               static_cast<int32_t>(umul128_hi64(static_cast<uint64_t>(bin_exp), log10_2_sig << (64 - log10_2_exp)));
  879|       |         }
  880|  17.8M|         else {
  881|  17.8M|            dec_exp = compute_dec_exp(bin_exp);
  882|  17.8M|         }
  883|  17.8M|         uint64_t even = 1 - (bin_sig & 1);
  884|  17.8M|         constexpr int32_t extra_shift = exp_shift_table<OptSize>::extra_shift;
  885|       |
  886|  17.8M|         if (!regular) [[unlikely]] {
  ------------------
  |  Branch (886:14): [True: 11.1M, False: 6.75M]
  ------------------
  887|  11.1M|            int32_t irregular_dec_exp = compute_dec_exp(bin_exp, false);
  888|  11.1M|            int32_t shift = compute_exp_shift(bin_exp, irregular_dec_exp + 1) + extra_shift;
  889|  11.1M|            uint128 pow10 = c.pow10_significands[-irregular_dec_exp - 1];
  890|  11.1M|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  891|       |
  892|  11.1M|            int64_t integral = p.hi >> extra_shift;
  893|  11.1M|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  894|       |
  895|  11.1M|            uint64_t half_ulp = pow10.hi >> (extra_shift + 1 - shift);
  896|  11.1M|            bool round_up = half_ulp > ~uint64_t(0) - fractional;
  897|  11.1M|            bool round_down = (half_ulp >> 1) > fractional;
  898|  11.1M|            integral += round_up;
  899|       |
  900|  11.1M|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, (uint64_t(1) << 63) - 1));
  901|  11.1M|            int32_t lo = static_cast<int32_t>(umul128_add_hi64(fractional - (half_ulp >> 1), 10, ~uint64_t(0)));
  902|  11.1M|            if (digit < lo) digit = lo;
  ------------------
  |  Branch (902:17): [True: 388k, False: 10.7M]
  ------------------
  903|  11.1M|            return {integral, irregular_dec_exp, digit, (round_up + round_down) == 0};
  904|  11.1M|         }
  905|       |
  906|       |         if constexpr (num_bits == 32) {
  907|       |            constexpr int32_t float_extra_shift = 34;
  908|       |            int32_t shift = compute_exp_shift(bin_exp, dec_exp + 1) + float_extra_shift;
  909|       |            uint64_t pow10_hi = c.pow10_significands[-dec_exp - 1].hi;
  910|       |            uint64_t p = umul128_hi64(pow10_hi + 1, uint64_t(bin_sig) << shift);
  911|       |
  912|       |            int64_t integral = p >> float_extra_shift;
  913|       |            uint64_t fractional = p & ((1ull << float_extra_shift) - 1);
  914|       |
  915|       |            uint64_t half_ulp = (pow10_hi >> (65 - shift)) + even;
  916|       |            bool round_up = (fractional + half_ulp) >> float_extra_shift;
  917|       |            bool round_down = half_ulp > fractional;
  918|       |            integral += round_up;
  919|       |
  920|       |            uint64_t prod = fractional * 10;
  921|       |            int32_t digit = static_cast<int32_t>(prod >> float_extra_shift);
  922|       |            uint64_t rem = prod & ((1ull << float_extra_shift) - 1);
  923|       |            digit +=
  924|       |               rem > (1ull << (float_extra_shift - 1)) || (rem == (1ull << (float_extra_shift - 1)) && (digit & 1));
  925|       |            return {integral, dec_exp, digit, (round_up + round_down) == 0};
  926|       |         }
  927|  6.75M|         else {
  928|  6.75M|            int32_t shift = exp_shift_table<OptSize>::enable ? exp_shifts_v<OptSize>.data[bin_exp + traits::exp_offset]
  ------------------
  |  Branch (928:29): [True: 6.75M, Folded]
  ------------------
  929|  6.75M|                                                             : compute_exp_shift(bin_exp, dec_exp + 1) + extra_shift;
  930|  6.75M|            ZMIJ_ASM(("" : "+r"(dec_exp)));
  ------------------
  |  |  126|  6.75M|#define ZMIJ_ASM(x) asm x
  ------------------
  931|  6.75M|            uint128 pow10 = c.pow10_significands[-dec_exp - 1];
  932|  6.75M|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  933|  6.75M|            int64_t integral = p.hi >> extra_shift;
  934|  6.75M|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  935|  6.75M|            uint64_t half_ulp = (pow10.hi >> (extra_shift + 1 - shift)) + even;
  936|  6.75M|            bool round_up = fractional + half_ulp < fractional;
  937|  6.75M|            bool round_down = half_ulp > fractional;
  938|  6.75M|            integral += round_up;
  939|       |
  940|  6.75M|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, c.biased_half));
  941|  6.75M|            if (fractional == (1ull << 62)) [[unlikely]] {
  ------------------
  |  Branch (941:17): [True: 59.7k, False: 6.69M]
  ------------------
  942|  59.7k|               digit = 2;
  943|  59.7k|            }
  944|  6.75M|            return {integral, dec_exp, digit, (round_up + round_down) == 0};
  945|  6.75M|         }
  946|  6.75M|      }
_ZN3glz4zmij11detail_impl15compute_dec_expElb:
  333|  29.0M|      {
  334|  29.0M|         assert(bin_exp >= -1334 && bin_exp <= 2620);
  ------------------
  |  Branch (334:10): [True: 29.0M, False: 0]
  |  Branch (334:10): [True: 29.0M, False: 0]
  |  Branch (334:10): [True: 29.0M, False: 0]
  ------------------
  335|  29.0M|         constexpr int log10_3_over_4_sig = 131'072;
  336|  29.0M|         constexpr int log10_2_sig = 315'653, log10_2_exp = 20;
  337|  29.0M|         return static_cast<int32_t>((bin_exp * log10_2_sig - !regular * log10_3_over_4_sig) >> log10_2_exp);
  338|  29.0M|      }
_ZN3glz4zmij11detail_impl17compute_exp_shiftEli:
  457|  11.1M|      {
  458|  11.1M|         assert(dec_exp >= -350 && dec_exp <= 350);
  ------------------
  |  Branch (458:10): [True: 11.1M, False: 0]
  |  Branch (458:10): [True: 11.1M, False: 0]
  |  Branch (458:10): [True: 11.1M, False: 0]
  ------------------
  459|  11.1M|         constexpr int log2_pow10_sig = 217'707, log2_pow10_exp = 16;
  460|  11.1M|         int pow10_bin_exp = -dec_exp * log2_pow10_sig >> log2_pow10_exp;
  461|  11.1M|         return static_cast<int32_t>(bin_exp + pow10_bin_exp + 1);
  462|  11.1M|      }
_ZNK3glz4zmij11detail_impl23pow10_significand_tableILb0EEixEi:
  440|  17.9M|         {
  441|  17.9M|            constexpr int dec_exp_min = -293;
  442|  17.9M|            int i = dec_exp - dec_exp_min;
  443|  17.9M|            if (compress) return compute(i);
  ------------------
  |  Branch (443:17): [Folded, False: 17.9M]
  ------------------
  444|  17.9M|            if (!split_tables) return {data[i * 2], data[i * 2 + 1]};
  ------------------
  |  Branch (444:17): [True: 17.9M, Folded]
  ------------------
  445|       |
  446|      0|            const uint64_t* hi = data + num_pow10s + dec_exp_min - 1;
  447|      0|            const uint64_t* lo = hi + num_pow10s;
  448|       |
  449|      0|            if !consteval {
  450|      0|               ZMIJ_ASM(volatile("" : "+r"(hi), "+r"(lo)));
  ------------------
  |  |  126|      0|#define ZMIJ_ASM(x) asm x
  ------------------
  451|      0|            }
  452|      0|            return {hi[-dec_exp], lo[-dec_exp]};
  453|  17.9M|         }
_ZN3glz4zmij11detail_impl13umul192_hi128Emmm:
  308|  17.9M|      {
  309|  17.9M|         uint128_t p = umul128(x_hi, y);
  310|  17.9M|         uint64_t lo = uint64_t(p) + uint64_t(umul128(x_lo, y) >> 64);
  311|  17.9M|         return {uint64_t(p >> 64) + (lo < uint64_t(p)), lo};
  312|  17.9M|      }
_ZN3glz4zmij11detail_impl7umul128Emm:
  265|  35.8M|      {
  266|  35.8M|#if ZMIJ_USE_INT128
  267|  35.8M|         return uint128_t(x) * y;
  268|       |#else
  269|       |#if defined(_M_AMD64)
  270|       |         if !consteval {
  271|       |            uint64_t hi = 0;
  272|       |            uint64_t lo = _umul128(x, y, &hi);
  273|       |            return {hi, lo};
  274|       |         }
  275|       |#elif defined(_M_ARM64)
  276|       |         if !consteval {
  277|       |            return {__umulh(x, y), x * y};
  278|       |         }
  279|       |#endif
  280|       |         uint64_t a = x >> 32;
  281|       |         uint64_t b = uint32_t(x);
  282|       |         uint64_t c = y >> 32;
  283|       |         uint64_t d = uint32_t(y);
  284|       |
  285|       |         uint64_t ac = a * c;
  286|       |         uint64_t bc = b * c;
  287|       |         uint64_t ad = a * d;
  288|       |         uint64_t bd = b * d;
  289|       |
  290|       |         uint64_t cs = (bd >> 32) + uint32_t(ad) + uint32_t(bc);
  291|       |         return {ac + (ad >> 32) + (bc >> 32) + (cs >> 32), (cs << 32) + uint32_t(bd)};
  292|       |#endif
  293|  35.8M|      }
_ZN3glz4zmij11detail_impl16umul128_add_hi64Emmm:
  298|  29.0M|      {
  299|  29.0M|#if ZMIJ_USE_INT128
  300|  29.0M|         return uint64_t((uint128_t(x) * y + c) >> 64);
  301|       |#else
  302|       |         auto p = umul128(x, y);
  303|       |         return p.hi + (p.lo + c < p.lo);
  304|       |#endif
  305|  29.0M|      }
_ZN3glz4zmij11detail_impl5div10Em:
  326|  36.1k|      {
  327|  36.1k|         assert(x <= (1ull << 62));
  ------------------
  |  Branch (327:10): [True: 36.1k, False: 0]
  ------------------
  328|  36.1k|         constexpr uint64_t div10_sig64 = (1ull << 63) / 5 + 1;
  329|  36.1k|         return ZMIJ_USE_INT128 ? umul128_hi64(x, div10_sig64) : x / 10;
  ------------------
  |  |  247|  36.1k|#define ZMIJ_USE_INT128 1
  |  |  ------------------
  |  |  |  Branch (247:25): [True: 36.1k, Folded]
  |  |  ------------------
  ------------------
  330|  36.1k|      }
_ZN3glz4zmij11detail_impl12umul128_hi64Emm:
  295|  78.2k|      constexpr auto umul128_hi64(uint64_t x, uint64_t y) noexcept -> uint64_t { return uint64_t(umul128(x, y) >> 64); }
_ZN3glz4zmij11detail_impl9to_digitsILi64ELb0EEENS1_10dec_digitsIXT_EEEmbRKNS1_9constantsIXT0_EEE:
  809|  17.8M|      {
  810|       |         if constexpr (num_bits == 32) {
  811|       |            auto result = to_bcd8<OptSize>(value);
  812|       |            return {result.bcd + zeros_v, result.len};
  813|       |         }
  814|  17.8M|         else {
  815|       |#if !ZMIJ_USE_NEON && !ZMIJ_USE_SSE
  816|       |            uint32_t bbccddee = uint32_t(value / 100'000'000);
  817|       |            uint32_t ffgghhii = uint32_t(value % 100'000'000);
  818|       |            auto hi = to_bcd8<OptSize>(bbccddee);
  819|       |            if (ffgghhii == 0) return {{hi.bcd + zeros_v, zeros_v}, hi.len};
  820|       |            auto lo = to_bcd8<OptSize>(ffgghhii);
  821|       |            return {{hi.bcd + zeros_v, lo.bcd + zeros_v}, 8 + lo.len};
  822|       |#elif ZMIJ_USE_NEON
  823|       |            auto unshuffled_digits = to_unshuffled_digits(value, c);
  824|       |            uint8x16_t digits = vrev64q_u8(unshuffled_digits);
  825|       |            uint16x8_t str = vaddq_u16(vreinterpretq_u16_u8(digits), vreinterpretq_u16_s8(vdupq_n_s8('0')));
  826|       |
  827|       |            // vcgtzq_s8 is AArch64-only; the portable spelling (ARMv7 NEON and
  828|       |            // up) is "compare greater-than against a zero vector".
  829|       |            uint16x8_t is_not_zero = vreinterpretq_u16_u8(vcgtq_s8(vreinterpretq_s8_u8(digits), vdupq_n_s8(0)));
  830|       |            uint64_t zeroes = vget_lane_u64(vreinterpret_u64_u8(vshrn_n_u16(is_not_zero, 4)), 0);
  831|       |            return {str, 16 - (clz(zeroes) >> 2)};
  832|       |#else
  833|  17.8M|            uint32_t abbccddee = uint32_t(value / 100'000'000);
  834|  17.8M|            uint32_t ffgghhii = uint32_t(value % 100'000'000);
  835|       |
  836|  17.8M|            const __m128i zeros = _mm_load_si128(m128ptr(&c.zeros));
  837|  17.8M|            auto unshuffled_bcd = to_unshuffled_digits(abbccddee, ffgghhii, c);
  838|       |#if ZMIJ_USE_SSE4_1
  839|       |            const __m128i bswap = _mm_load_si128(m128ptr(&c.bswap));
  840|       |            auto bcd = _mm_shuffle_epi8(unshuffled_bcd, bswap);
  841|       |#else
  842|  17.8M|            auto bcd = _mm_shuffle_epi32(unshuffled_bcd, _MM_SHUFFLE(0, 1, 2, 3));
  843|  17.8M|#endif
  844|       |
  845|  17.8M|            __m128i mask128 = _mm_cmpgt_epi8(bcd, _mm_setzero_si128());
  846|  17.8M|            uint64_t mask = _mm_movemask_epi8(mask128);
  847|       |#if defined(__LZCNT__) && !defined(ZMIJ_NO_BUILTINS)
  848|       |            int len = 32 - _lzcnt_u32(mask);
  849|       |#else
  850|  17.8M|            int len = 63 - clz((mask << 1) | 1);
  851|  17.8M|#endif
  852|  17.8M|            return {_mm_or_si128(bcd, zeros), len};
  853|  17.8M|#endif
  854|  17.8M|         }
  855|  17.8M|      }
_ZN3glz4zmij11detail_impl20to_unshuffled_digitsILb0EEEDv2_xjjRKNS1_9constantsIXT_EEE:
  735|  17.8M|      {
  736|  17.8M|         const __m128i div10k = _mm_load_si128(m128ptr(&c.div10k));
  737|  17.8M|         const __m128i neg10k = _mm_load_si128(m128ptr(&c.neg10k));
  738|  17.8M|         __m128i x = _mm_set_epi64x(bbccddee, ffgghhii);
  739|  17.8M|         __m128i y = _mm_add_epi64(x, _mm_mul_epu32(neg10k, _mm_srli_epi64(_mm_mul_epu32(x, div10k), div10k_exp)));
  740|  17.8M|         return to_bcd_4x4(y, c);
  741|  17.8M|      }
_ZN3glz4zmij11detail_impl10to_bcd_4x4ILb0EEEDv2_xS3_RKNS1_9constantsIXT_EEE:
  712|  17.9M|      {
  713|  17.9M|         const __m128i div100 = _mm_load_si128(m128ptr(&c.div100));
  714|  17.9M|         const __m128i div10 = _mm_load_si128(m128ptr(&c.div10));
  715|       |#if ZMIJ_USE_SSE4_1
  716|       |         const __m128i neg100 = _mm_load_si128(m128ptr(&c.neg100));
  717|       |         const __m128i neg10 = _mm_load_si128(m128ptr(&c.neg10));
  718|       |
  719|       |         __m128i z = _mm_add_epi64(y, _mm_mullo_epi32(neg100, _mm_srli_epi32(_mm_mulhi_epu16(y, div100), 3)));
  720|       |         return _mm_add_epi16(z, _mm_mullo_epi16(neg10, _mm_mulhi_epu16(z, div10)));
  721|       |#else
  722|  17.9M|         const __m128i hundred = _mm_load_si128(m128ptr(&c.hundred));
  723|  17.9M|         const __m128i moddiv10 = _mm_load_si128(m128ptr(&c.moddiv10));
  724|       |
  725|  17.9M|         __m128i y_div_100 = _mm_srli_epi16(_mm_mulhi_epu16(y, div100), 3);
  726|  17.9M|         __m128i y_mod_100 = _mm_sub_epi16(y, _mm_mullo_epi16(y_div_100, hundred));
  727|  17.9M|         __m128i z = _mm_or_si128(_mm_slli_epi32(y_mod_100, 16), y_div_100);
  728|  17.9M|         return _mm_sub_epi16(_mm_slli_epi16(z, 8), _mm_mullo_epi16(moddiv10, _mm_mulhi_epu16(z, div10)));
  729|  17.9M|#endif
  730|  17.9M|      }
_ZN3glz4zmij11detail_impl3clzEm:
  187|  17.9M|      {
  188|  17.9M|         assert(x != 0);
  ------------------
  |  Branch (188:10): [True: 17.9M, False: 0]
  ------------------
  189|  17.9M|#if ZMIJ_HAS_BUILTIN(__builtin_clzll)
  190|  17.9M|         return __builtin_clzll(x);
  191|       |#elif defined(_M_AMD64) && defined(__AVX2__)
  192|       |         return __lzcnt64(x);
  193|       |#elif defined(_M_AMD64) || defined(_M_ARM64)
  194|       |         unsigned long idx;
  195|       |         _BitScanReverse64(&idx, x);
  196|       |         return 63 - idx;
  197|       |#elif ZMIJ_MSC_VER
  198|       |         unsigned long idx;
  199|       |         if (_BitScanReverse(&idx, uint32_t(x >> 32))) return 31 - idx;
  200|       |         _BitScanReverse(&idx, uint32_t(x));
  201|       |         return 63 - idx;
  202|       |#else
  203|       |         int n = 64;
  204|       |         for (; x > 0; x >>= 1) --n;
  205|       |         return n;
  206|       |#endif
  207|  17.9M|      }
_ZNK3glz4zmij11detail_impl20dec_exp_format_table3getINS1_12float_traitsIdEEEERKNS2_5entryEi:
  559|  4.42M|         {
  560|  4.42M|            constexpr auto min = traits::min_fixed_dec_exp, max = Traits::max_fixed_dec_exp;
  561|  4.42M|            unsigned i = unsigned(dec_exp - min);
  562|  4.42M|            return data[i <= unsigned(max - min) ? i : num_entries - 1];
  ------------------
  |  Branch (562:25): [True: 4.42M, False: 0]
  ------------------
  563|  4.42M|         }
_ZN3glz8to_charsITkNSt3__114floating_pointEfLb0EEEPcS2_T_:
 1118|  54.2k|   {
 1119|  54.2k|      static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>);
 1120|  54.2k|      return zmij::detail::write<T, OptSize>(val, buf);
 1121|  54.2k|   }
_ZN3glz4zmij6detail5writeIfLb0EEEPcT_S3_:
  975|  54.2k|      {
  976|  54.2k|         using namespace detail_impl;
  977|  54.2k|         using traits = float_traits<Float>;
  978|  54.2k|         auto bits = traits::to_bits(value);
  979|  54.2k|         auto bin_exp = traits::get_exp(bits);
  980|  54.2k|         auto bin_sig = traits::get_sig(bits);
  981|       |
  982|  54.2k|         *buffer = '-';
  983|  54.2k|         buffer += traits::is_negative(bits);
  984|       |
  985|  54.2k|         const auto* c = &consts_v<OptSize>;
  986|  54.2k|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|  54.2k|#define ZMIJ_ASM(x) asm x
  ------------------
  987|  54.2k|         int64_t threshold = traits::num_bits == 64 ? static_cast<int64_t>(c->threshold) : 10'000'000;
  ------------------
  |  Branch (987:30): [Folded, False: 54.2k]
  ------------------
  988|       |
  989|  54.2k|         to_decimal_result dec;
  990|  54.2k|         bool is_normal = unsigned(bin_exp - 1) < unsigned(traits::exp_mask - 1);
  991|  54.2k|         if (!is_normal) [[unlikely]] {
  ------------------
  |  Branch (991:14): [True: 18.3k, False: 35.9k]
  ------------------
  992|  18.3k|            if (bin_exp != 0) {
  ------------------
  |  Branch (992:17): [True: 896, False: 17.4k]
  ------------------
  993|       |#if GLZ_ZMIJ_EMIT_INF_NAN
  994|       |               memcpy(buffer, bin_sig == 0 ? "inf" : "nan", 4);
  995|       |               return buffer + 3;
  996|       |#else
  997|       |               // Undo the speculative '-' for sign-bit-set NaN/Inf: JSON "null"
  998|       |               // never carries a sign.
  999|    896|               buffer -= traits::is_negative(bits);
 1000|    896|               memcpy(buffer, "null", 4);
 1001|    896|               return buffer + 4;
 1002|    896|#endif
 1003|    896|            }
 1004|  17.4k|            if (bin_sig == 0) {
  ------------------
  |  Branch (1004:17): [True: 7.76k, False: 9.66k]
  ------------------
 1005|  7.76k|               memcpy(buffer, "0", 2);
 1006|  7.76k|               return buffer + 1;
 1007|  7.76k|            }
 1008|  9.66k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig, 1, true, *c);
 1009|  9.66k|            int64_t dec_sig = dec.sig * 10 + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1009:47): [True: 8.84k, False: 819]
  ------------------
 1010|  9.66k|            int32_t dec_exp = dec.exp;
 1011|  34.1k|            while (dec_sig < threshold) {
  ------------------
  |  Branch (1011:20): [True: 24.4k, False: 9.66k]
  ------------------
 1012|  24.4k|               dec_sig *= 10;
 1013|  24.4k|               --dec_exp;
 1014|  24.4k|            }
 1015|  9.66k|            int64_t d = static_cast<int64_t>(detail_impl::div10(static_cast<uint64_t>(dec_sig)));
 1016|  9.66k|            int32_t last_digit = static_cast<int32_t>(dec_sig - d * 10);
 1017|  9.66k|            dec = {d, dec_exp, last_digit, last_digit != 0};
 1018|  9.66k|         }
 1019|  35.9k|         else {
 1020|  35.9k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig | traits::implicit_bit,
 1021|  35.9k|                                                                                     bin_exp, bin_sig != 0, *c);
 1022|  35.9k|         }
 1023|  45.6k|         bool extra_digit = dec.sig >= threshold;
 1024|  45.6k|         int dec_exp = dec.exp + traits::max_digits10 - 2 + extra_digit;
 1025|  45.6k|         if (traits::num_bits == 32 && dec.sig < 1'000'000) [[unlikely]] {
  ------------------
  |  Branch (1025:14): [True: 45.6k, Folded]
  |  Branch (1025:40): [True: 4.89k, False: 40.7k]
  ------------------
 1026|  4.89k|            dec.sig = 10 * dec.sig + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1026:39): [True: 4.69k, False: 206]
  ------------------
 1027|  4.89k|            dec.has_last_digit = false;
 1028|  4.89k|            --dec_exp;
 1029|  4.89k|         }
 1030|       |
 1031|  45.6k|         char* start = buffer;
 1032|  45.6k|         auto dig = to_digits<traits::num_bits, OptSize>(static_cast<uint64_t>(dec.sig), extra_digit, *c);
 1033|  45.6k|         constexpr int bcd_size = traits::num_bits == 64 ? 16 : 8;
  ------------------
  |  Branch (1033:35): [Folded, False: 45.6k]
  ------------------
 1034|  45.6k|         if (dec_exp >= traits::min_fixed_dec_exp && dec_exp <= traits::max_fixed_dec_exp) {
  ------------------
  |  Branch (1034:14): [True: 14.6k, False: 30.9k]
  |  Branch (1034:54): [True: 5.08k, False: 9.55k]
  ------------------
 1035|  5.08k|            memcpy(start, &zeros_v, 8);
 1036|  5.08k|            const auto& fmt = dec_exp_formats.get<traits>(dec_exp);
 1037|  5.08k|            buffer += fmt.start_pos;
 1038|  5.08k|            memcpy(buffer, &dig.digits, bcd_size);
 1039|  5.08k|            memmove(buffer, buffer + !extra_digit, bcd_size);
 1040|  5.08k|            buffer[bcd_size + extra_digit - 1] = static_cast<char>('0' + (dec.has_last_digit ? dec.last_digit : 0));
  ------------------
  |  Branch (1040:75): [True: 2.39k, False: 2.68k]
  ------------------
 1041|  5.08k|            memmove(start + fmt.shift_pos, start + fmt.point_pos, bcd_size);
 1042|  5.08k|            start[fmt.point_pos] = '.';
 1043|  5.08k|            int num_digits = dec.has_last_digit ? bcd_size : dig.num_digits - 1;
  ------------------
  |  Branch (1043:30): [True: 2.39k, False: 2.68k]
  ------------------
 1044|  5.08k|            return buffer + fmt.exp_pos[num_digits + extra_digit - 1];
 1045|  5.08k|         }
 1046|  40.5k|         buffer += extra_digit;
 1047|  40.5k|         memcpy(buffer, &dig.digits, bcd_size);
 1048|  40.5k|         buffer[bcd_size] = static_cast<char>('0' + dec.last_digit);
 1049|  40.5k|         buffer += dec.has_last_digit ? bcd_size + 1 : dig.num_digits;
  ------------------
  |  Branch (1049:20): [True: 18.0k, False: 22.5k]
  ------------------
 1050|  40.5k|         start[0] = start[1];
 1051|  40.5k|         start[1] = '.';
 1052|  40.5k|         buffer -= (buffer - 1 == start + 1);
 1053|       |
 1054|  40.5k|         if constexpr (exp_string_table<OptSize>::enable) {
 1055|  40.5k|            uint64_t exp_data = exp_strings_v<OptSize>.data[dec_exp + exp_string_table<OptSize>::offset];
 1056|  40.5k|            int len = int(exp_data >> 48);
 1057|  40.5k|            if (is_big_endian) exp_data = bswap64(exp_data);
  ------------------
  |  Branch (1057:17): [Folded, False: 40.5k]
  ------------------
 1058|  40.5k|            memcpy(buffer, &exp_data, traits::max_exponent10 >= 100 ? 8 : 4);
  ------------------
  |  Branch (1058:39): [Folded, False: 40.5k]
  ------------------
 1059|  40.5k|            return buffer + len;
 1060|  40.5k|         }
 1061|       |         // Glaze emits uppercase 'E', omits '+' on positive exponents, and
 1062|       |         // drops the leading zero on single-digit exponents (E7, not E07).
 1063|       |         // Branchless: write "E-" always, then advance past the '-' only when
 1064|       |         // the exponent is negative.
 1065|      0|         bool neg = dec_exp < 0;
 1066|  40.5k|         buffer[0] = 'E';
 1067|  40.5k|         buffer[1] = '-';
 1068|  40.5k|         buffer += 1 + unsigned(neg);
 1069|  40.5k|         dec_exp = neg ? -dec_exp : dec_exp;
  ------------------
  |  Branch (1069:20): [True: 0, False: 40.5k]
  ------------------
 1070|  40.5k|         unsigned hundreds_written = 0;
 1071|       |         if constexpr (traits::max_exponent10 >= 100) {
 1072|       |            int32_t digit = 0;
 1073|       |            if constexpr (use_umul128_hi64) {
 1074|       |               digit = static_cast<int32_t>(umul128_hi64(static_cast<uint64_t>(dec_exp), 0x290000000000000ull));
 1075|       |            }
 1076|       |            else {
 1077|       |               digit = static_cast<int32_t>((uint32_t(dec_exp) * div100_sig) >> div100_exp);
 1078|       |            }
 1079|       |            *buffer = static_cast<char>('0' + digit);
 1080|       |            hundreds_written = unsigned(dec_exp >= 100);
 1081|       |            buffer += hundreds_written;
 1082|       |            dec_exp -= digit * 100;
 1083|       |         }
 1084|       |         // dec_exp now in [0, 99]. Skip the tens digit only when no higher
 1085|       |         // digit has been written (i.e. true leading zero, not interior).
 1086|  40.5k|         const char* d2 = digits2(dec_exp);
 1087|  40.5k|         *buffer = d2[0];
 1088|  40.5k|         buffer += hundreds_written | unsigned(dec_exp >= 10);
 1089|  40.5k|         *buffer = d2[1];
 1090|  40.5k|         return buffer + 1;
 1091|  45.6k|      }
_ZN3glz4zmij11detail_impl12float_traitsIfE7to_bitsEf:
  358|  54.2k|         {
  359|  54.2k|            sig_type bits;
  360|  54.2k|            memcpy(&bits, &value, sizeof(value));
  361|  54.2k|            return bits;
  362|  54.2k|         }
_ZN3glz4zmij11detail_impl12float_traitsIfE7get_expEj:
  367|  54.2k|         {
  368|  54.2k|            return static_cast<int32_t>((bits << 1) >> (num_sig_bits + 1));
  369|  54.2k|         }
_ZN3glz4zmij11detail_impl12float_traitsIfE7get_sigEj:
  365|  54.2k|         static auto get_sig(sig_type bits) noexcept -> sig_type { return bits & (implicit_bit - 1); }
_ZN3glz4zmij11detail_impl12float_traitsIfE11is_negativeEj:
  364|  55.1k|         static auto is_negative(sig_type bits) noexcept -> bool { return bits >> (num_bits - 1); }
_ZN3glz4zmij11detail_impl10to_decimalIfjLb0EEENS1_17to_decimal_resultET0_lbRKNS1_9constantsIXT1_EEE:
  868|  45.6k|      {
  869|  45.6k|         using traits = float_traits<Float>;
  870|  45.6k|         int64_t bin_exp = raw_exp - traits::exp_offset;
  871|  45.6k|         constexpr int num_bits = std::numeric_limits<UInt>::digits;
  872|       |
  873|  45.6k|         constexpr uint64_t log10_2_sig = 78'913;
  874|  45.6k|         constexpr int32_t log10_2_exp = 18;
  875|  45.6k|         int32_t dec_exp = 0;
  876|       |         if constexpr (use_umul128_hi64) {
  877|       |            dec_exp =
  878|       |               static_cast<int32_t>(umul128_hi64(static_cast<uint64_t>(bin_exp), log10_2_sig << (64 - log10_2_exp)));
  879|       |         }
  880|  45.6k|         else {
  881|  45.6k|            dec_exp = compute_dec_exp(bin_exp);
  882|  45.6k|         }
  883|  45.6k|         uint64_t even = 1 - (bin_sig & 1);
  884|  45.6k|         constexpr int32_t extra_shift = exp_shift_table<OptSize>::extra_shift;
  885|       |
  886|  45.6k|         if (!regular) [[unlikely]] {
  ------------------
  |  Branch (886:14): [True: 3.58k, False: 42.0k]
  ------------------
  887|  3.58k|            int32_t irregular_dec_exp = compute_dec_exp(bin_exp, false);
  888|  3.58k|            int32_t shift = compute_exp_shift(bin_exp, irregular_dec_exp + 1) + extra_shift;
  889|  3.58k|            uint128 pow10 = c.pow10_significands[-irregular_dec_exp - 1];
  890|  3.58k|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  891|       |
  892|  3.58k|            int64_t integral = p.hi >> extra_shift;
  893|  3.58k|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  894|       |
  895|  3.58k|            uint64_t half_ulp = pow10.hi >> (extra_shift + 1 - shift);
  896|  3.58k|            bool round_up = half_ulp > ~uint64_t(0) - fractional;
  897|  3.58k|            bool round_down = (half_ulp >> 1) > fractional;
  898|  3.58k|            integral += round_up;
  899|       |
  900|  3.58k|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, (uint64_t(1) << 63) - 1));
  901|  3.58k|            int32_t lo = static_cast<int32_t>(umul128_add_hi64(fractional - (half_ulp >> 1), 10, ~uint64_t(0)));
  902|  3.58k|            if (digit < lo) digit = lo;
  ------------------
  |  Branch (902:17): [True: 632, False: 2.95k]
  ------------------
  903|  3.58k|            return {integral, irregular_dec_exp, digit, (round_up + round_down) == 0};
  904|  3.58k|         }
  905|       |
  906|  42.0k|         if constexpr (num_bits == 32) {
  907|  42.0k|            constexpr int32_t float_extra_shift = 34;
  908|  42.0k|            int32_t shift = compute_exp_shift(bin_exp, dec_exp + 1) + float_extra_shift;
  909|  42.0k|            uint64_t pow10_hi = c.pow10_significands[-dec_exp - 1].hi;
  910|  42.0k|            uint64_t p = umul128_hi64(pow10_hi + 1, uint64_t(bin_sig) << shift);
  911|       |
  912|  42.0k|            int64_t integral = p >> float_extra_shift;
  913|  42.0k|            uint64_t fractional = p & ((1ull << float_extra_shift) - 1);
  914|       |
  915|  42.0k|            uint64_t half_ulp = (pow10_hi >> (65 - shift)) + even;
  916|  42.0k|            bool round_up = (fractional + half_ulp) >> float_extra_shift;
  917|  42.0k|            bool round_down = half_ulp > fractional;
  918|  42.0k|            integral += round_up;
  919|       |
  920|  42.0k|            uint64_t prod = fractional * 10;
  921|  42.0k|            int32_t digit = static_cast<int32_t>(prod >> float_extra_shift);
  922|  42.0k|            uint64_t rem = prod & ((1ull << float_extra_shift) - 1);
  923|  42.0k|            digit +=
  924|  42.0k|               rem > (1ull << (float_extra_shift - 1)) || (rem == (1ull << (float_extra_shift - 1)) && (digit & 1));
  ------------------
  |  Branch (924:16): [True: 18.4k, False: 23.6k]
  |  Branch (924:60): [True: 241, False: 23.3k]
  |  Branch (924:104): [True: 6, False: 235]
  ------------------
  925|  42.0k|            return {integral, dec_exp, digit, (round_up + round_down) == 0};
  926|       |         }
  927|       |         else {
  928|       |            int32_t shift = exp_shift_table<OptSize>::enable ? exp_shifts_v<OptSize>.data[bin_exp + traits::exp_offset]
  929|       |                                                             : compute_exp_shift(bin_exp, dec_exp + 1) + extra_shift;
  930|       |            ZMIJ_ASM(("" : "+r"(dec_exp)));
  931|       |            uint128 pow10 = c.pow10_significands[-dec_exp - 1];
  932|       |            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  933|       |            int64_t integral = p.hi >> extra_shift;
  934|       |            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  935|       |            uint64_t half_ulp = (pow10.hi >> (extra_shift + 1 - shift)) + even;
  936|       |            bool round_up = fractional + half_ulp < fractional;
  937|       |            bool round_down = half_ulp > fractional;
  938|       |            integral += round_up;
  939|       |
  940|       |            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, c.biased_half));
  941|       |            if (fractional == (1ull << 62)) [[unlikely]] {
  942|       |               digit = 2;
  943|       |            }
  944|       |            return {integral, dec_exp, digit, (round_up + round_down) == 0};
  945|       |         }
  946|  42.0k|      }
_ZN3glz4zmij11detail_impl9to_digitsILi32ELb0EEENS1_10dec_digitsIXT_EEEmbRKNS1_9constantsIXT0_EEE:
  809|  45.6k|      {
  810|  45.6k|         if constexpr (num_bits == 32) {
  811|  45.6k|            auto result = to_bcd8<OptSize>(value);
  812|  45.6k|            return {result.bcd + zeros_v, result.len};
  813|       |         }
  814|       |         else {
  815|       |#if !ZMIJ_USE_NEON && !ZMIJ_USE_SSE
  816|       |            uint32_t bbccddee = uint32_t(value / 100'000'000);
  817|       |            uint32_t ffgghhii = uint32_t(value % 100'000'000);
  818|       |            auto hi = to_bcd8<OptSize>(bbccddee);
  819|       |            if (ffgghhii == 0) return {{hi.bcd + zeros_v, zeros_v}, hi.len};
  820|       |            auto lo = to_bcd8<OptSize>(ffgghhii);
  821|       |            return {{hi.bcd + zeros_v, lo.bcd + zeros_v}, 8 + lo.len};
  822|       |#elif ZMIJ_USE_NEON
  823|       |            auto unshuffled_digits = to_unshuffled_digits(value, c);
  824|       |            uint8x16_t digits = vrev64q_u8(unshuffled_digits);
  825|       |            uint16x8_t str = vaddq_u16(vreinterpretq_u16_u8(digits), vreinterpretq_u16_s8(vdupq_n_s8('0')));
  826|       |
  827|       |            // vcgtzq_s8 is AArch64-only; the portable spelling (ARMv7 NEON and
  828|       |            // up) is "compare greater-than against a zero vector".
  829|       |            uint16x8_t is_not_zero = vreinterpretq_u16_u8(vcgtq_s8(vreinterpretq_s8_u8(digits), vdupq_n_s8(0)));
  830|       |            uint64_t zeroes = vget_lane_u64(vreinterpret_u64_u8(vshrn_n_u16(is_not_zero, 4)), 0);
  831|       |            return {str, 16 - (clz(zeroes) >> 2)};
  832|       |#else
  833|       |            uint32_t abbccddee = uint32_t(value / 100'000'000);
  834|       |            uint32_t ffgghhii = uint32_t(value % 100'000'000);
  835|       |
  836|       |            const __m128i zeros = _mm_load_si128(m128ptr(&c.zeros));
  837|       |            auto unshuffled_bcd = to_unshuffled_digits(abbccddee, ffgghhii, c);
  838|       |#if ZMIJ_USE_SSE4_1
  839|       |            const __m128i bswap = _mm_load_si128(m128ptr(&c.bswap));
  840|       |            auto bcd = _mm_shuffle_epi8(unshuffled_bcd, bswap);
  841|       |#else
  842|       |            auto bcd = _mm_shuffle_epi32(unshuffled_bcd, _MM_SHUFFLE(0, 1, 2, 3));
  843|       |#endif
  844|       |
  845|       |            __m128i mask128 = _mm_cmpgt_epi8(bcd, _mm_setzero_si128());
  846|       |            uint64_t mask = _mm_movemask_epi8(mask128);
  847|       |#if defined(__LZCNT__) && !defined(ZMIJ_NO_BUILTINS)
  848|       |            int len = 32 - _lzcnt_u32(mask);
  849|       |#else
  850|       |            int len = 63 - clz((mask << 1) | 1);
  851|       |#endif
  852|       |            return {_mm_or_si128(bcd, zeros), len};
  853|       |#endif
  854|       |         }
  855|  45.6k|      }
_ZN3glz4zmij11detail_impl7to_bcd8ILb0EEENS1_10bcd_resultEm:
  753|  45.6k|      {
  754|  45.6k|         if (!ZMIJ_USE_SSE && !ZMIJ_USE_NEON) {
  ------------------
  |  |   63|  45.6k|#define ZMIJ_USE_SSE ZMIJ_USE_SIMD
  |  |  ------------------
  |  |  |  |   41|  91.2k|#define ZMIJ_USE_SIMD 1
  |  |  ------------------
  ------------------
                       if (!ZMIJ_USE_SSE && !ZMIJ_USE_NEON) {
  ------------------
  |  |   55|      0|#define ZMIJ_USE_NEON 0
  ------------------
  |  Branch (754:14): [Folded, False: 45.6k]
  |  Branch (754:31): [True: 0, Folded]
  ------------------
  755|      0|            uint64_t abcd_efgh = abcdefgh + neg10k_v * ((abcdefgh * div10k_sig) >> div10k_exp);
  756|      0|            uint64_t ab_cd_ef_gh = abcd_efgh + neg100_v * (((abcd_efgh * div100_sig) >> div100_exp) & 0x7f0000007f);
  757|      0|            uint64_t a_b_c_d_e_f_g_h =
  758|      0|               ab_cd_ef_gh + neg10_v * (((ab_cd_ef_gh * div10_sig) >> div10_exp) & 0xf000f000f000f);
  759|      0|            uint64_t bcd = is_big_endian ? a_b_c_d_e_f_g_h : bswap64(a_b_c_d_e_f_g_h);
  ------------------
  |  Branch (759:28): [Folded, False: 0]
  ------------------
  760|      0|            return {bcd, count_trailing_nonzeros(bcd)};
  761|      0|         }
  762|       |
  763|  45.6k|         const auto* c = &consts_v<OptSize>;
  764|  45.6k|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|  45.6k|#define ZMIJ_ASM(x) asm x
  ------------------
  765|       |
  766|       |#if ZMIJ_USE_NEON
  767|       |         uint64_t abcd_efgh_64 = abcdefgh + neg10k_v * ((abcdefgh * div10k_sig) >> div10k_exp);
  768|       |         int32x4_t abcd_efgh = vcombine_s32(vreinterpret_s32_u64(vcreate_u64(abcd_efgh_64)), vdup_n_s32(0));
  769|       |         uint8x16_t digits_128 = to_bcd_4x4(abcd_efgh, *c);
  770|       |         uint8x8_t digits = vget_low_u8(digits_128);
  771|       |         uint64_t bcd = vget_lane_u64(vreinterpret_u64_u8(vrev64_u8(digits)), 0);
  772|       |         return {bcd, count_trailing_nonzeros(bcd)};
  773|       |#elif ZMIJ_USE_SSE4_1
  774|       |         uint64_t abcd_efgh = abcdefgh + neg10k_v * ((abcdefgh * div10k_sig) >> div10k_exp);
  775|       |         uint64_t unshuffled_bcd = lo_u64(to_bcd_4x4(_mm_set_epi64x(0, abcd_efgh), *c));
  776|       |         int len = unshuffled_bcd ? 8 - ctz(unshuffled_bcd) / 8 : 0;
  777|       |         return {bswap64(unshuffled_bcd), len};
  778|       |#elif ZMIJ_USE_SSE
  779|       |         uint64_t abcd_efgh =
  780|  45.6k|            (abcdefgh << 32) - uint64_t((10000ull << 32) - 1) * ((abcdefgh * div10k_sig) >> div10k_exp);
  781|  45.6k|         uint64_t bcd = lo_u64(to_bcd_4x4(_mm_set_epi64x(0, abcd_efgh), *c));
  782|  45.6k|         return {bcd, count_trailing_nonzeros(bcd)};
  783|  45.6k|#endif
  784|  45.6k|      }
_ZN3glz4zmij11detail_impl6lo_u64EDv2_x:
  700|  45.6k|      {
  701|  45.6k|#if defined(__x86_64__) || defined(_M_X64)
  702|  45.6k|         return uint64_t(_mm_cvtsi128_si64(x));
  703|       |#else
  704|       |         uint64_t result;
  705|       |         _mm_storel_epi64(reinterpret_cast<__m128i*>(&result), x);
  706|       |         return result;
  707|       |#endif
  708|  45.6k|      }
_ZN3glz4zmij11detail_impl23count_trailing_nonzerosEm:
  568|  45.6k|      {
  569|  45.6k|         if (is_big_endian) x = bswap64(x);
  ------------------
  |  Branch (569:14): [Folded, False: 45.6k]
  ------------------
  570|  45.6k|         return (size_t(70) - clz((x << 1) | 1)) / 8;
  571|  45.6k|      }
_ZNK3glz4zmij11detail_impl20dec_exp_format_table3getINS1_12float_traitsIfEEEERKNS2_5entryEi:
  559|  5.08k|         {
  560|  5.08k|            constexpr auto min = traits::min_fixed_dec_exp, max = Traits::max_fixed_dec_exp;
  561|  5.08k|            unsigned i = unsigned(dec_exp - min);
  562|  5.08k|            return data[i <= unsigned(max - min) ? i : num_entries - 1];
  ------------------
  |  Branch (562:25): [True: 5.08k, False: 0]
  ------------------
  563|  5.08k|         }

