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

_ZN3glz12cbor_to_jsonITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__16vectorIcNS2_9allocatorIcEEEENS2_12basic_stringIcNS2_11char_traitsIcEES5_EEEENS_9error_ctxERKT0_RT1_:
  752|  9.59k|   {
  753|  9.59k|      size_t ix{}; // write index
  754|       |
  755|  9.59k|      auto* it = cbor.data();
  756|  9.59k|      auto* end = it + cbor.size();
  757|       |
  758|  9.59k|      context ctx{};
  759|       |
  760|  9.59k|      if (it >= end) {
  ------------------
  |  Branch (760:11): [True: 0, False: 9.59k]
  ------------------
  761|      0|         return {0, error_code::unexpected_end};
  762|      0|      }
  763|       |
  764|  9.59k|      detail::cbor_to_json_value<Opts>(ctx, it, end, out, ix, 0);
  765|  9.59k|      if (bool(ctx.error)) {
  ------------------
  |  Branch (765:11): [True: 5.72k, False: 3.86k]
  ------------------
  766|  5.72k|         return {ix, ctx.error};
  767|  5.72k|      }
  768|       |
  769|  3.86k|      if (it < end) {
  ------------------
  |  Branch (769:11): [True: 139, False: 3.73k]
  ------------------
  770|    139|         return {ix, error_code::syntax_error};
  771|    139|      }
  772|       |
  773|  3.73k|      if constexpr (resizable<JSONBuffer>) {
  774|  3.73k|         out.resize(ix);
  775|  3.73k|      }
  776|       |
  777|       |      // count is the number of bytes written. A resizable buffer carries its own size, but a
  778|       |      // fixed-size one has no other way to learn how much of it now holds JSON.
  779|  3.73k|      return {ix};
  780|  3.86k|   }
_ZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
   86|  45.5M|      {
   87|  45.5M|         using namespace cbor;
   88|       |
   89|       |         // Check recursion depth limit
   90|  45.5M|         if (recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (90:14): [True: 11, False: 45.5M]
  ------------------
   91|     11|            ctx.error = error_code::exceeded_max_recursive_depth;
   92|     11|            return;
   93|     11|         }
   94|       |
   95|  45.5M|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (95:14): [True: 1.17k, False: 45.5M]
  ------------------
   96|  1.17k|            ctx.error = error_code::unexpected_end;
   97|  1.17k|            return;
   98|  1.17k|         }
   99|       |
  100|  45.5M|         uint8_t initial;
  101|  45.5M|         std::memcpy(&initial, it, 1);
  102|  45.5M|         ++it;
  103|       |
  104|  45.5M|         const uint8_t major_type = get_major_type(initial);
  105|  45.5M|         const uint8_t additional_info = get_additional_info(initial);
  106|       |
  107|  45.5M|         switch (major_type) {
  108|  6.94M|         case major::uint: {
  ------------------
  |  Branch (108:10): [True: 6.94M, False: 38.5M]
  ------------------
  109|       |            // Unsigned integer
  110|  6.94M|            const uint64_t value = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  111|  6.94M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (111:17): [True: 167, False: 6.94M]
  ------------------
  112|    167|               return;
  113|  6.94M|            to<JSON, uint64_t>::template op<Opts>(value, ctx, out, ix);
  114|  6.94M|            break;
  115|  6.94M|         }
  116|       |
  117|  5.61M|         case major::nint: {
  ------------------
  |  Branch (117:10): [True: 5.61M, False: 39.9M]
  ------------------
  118|       |            // Negative integer: -1 - n
  119|  5.61M|            const uint64_t n = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  120|  5.61M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (120:17): [True: 105, False: 5.61M]
  ------------------
  121|    105|               return;
  122|       |            // Use two's complement trick for safe conversion
  123|  5.61M|            const int64_t value = static_cast<int64_t>(~n);
  124|  5.61M|            to<JSON, int64_t>::template op<Opts>(value, ctx, out, ix);
  125|  5.61M|            break;
  126|  5.61M|         }
  127|       |
  128|  2.68M|         case major::bstr: {
  ------------------
  |  Branch (128:10): [True: 2.68M, False: 42.8M]
  ------------------
  129|       |            // Byte string - written as a JSON string of hex digit pairs (see emit_hex_bytes)
  130|  2.68M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (130:17): [True: 0, False: 2.68M]
  ------------------
  131|       |
  132|  2.68M|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (132:17): [True: 842, False: 2.68M]
  ------------------
  133|       |               // Indefinite-length byte string - each chunk is hex encoded as it is read, so a long
  134|       |               // byte string never has to be assembled in memory first
  135|  3.18k|               while (true) {
  ------------------
  |  Branch (135:23): [True: 3.18k, Folded]
  ------------------
  136|  3.18k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (136:23): [True: 83, False: 3.10k]
  ------------------
  137|     83|                     ctx.error = error_code::unexpected_end;
  138|     83|                     return;
  139|     83|                  }
  140|  3.10k|                  uint8_t chunk_initial;
  141|  3.10k|                  std::memcpy(&chunk_initial, it, 1);
  142|       |
  143|  3.10k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (143:23): [True: 622, False: 2.48k]
  ------------------
  144|    622|                     ++it;
  145|    622|                     break;
  146|    622|                  }
  147|       |
  148|  2.48k|                  ++it;
  149|  2.48k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  150|  2.48k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  151|       |
  152|  2.48k|                  if (chunk_major != major::bstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (152:23): [True: 28, False: 2.45k]
  |  Branch (152:53): [True: 1, False: 2.45k]
  ------------------
  153|     29|                     ctx.error = error_code::syntax_error;
  154|     29|                     return;
  155|     29|                  }
  156|       |
  157|  2.45k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  158|  2.45k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (158:23): [True: 11, False: 2.44k]
  ------------------
  159|     11|                     return;
  160|       |
  161|  2.44k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (161:23): [True: 97, False: 2.34k]
  ------------------
  162|     97|                     ctx.error = error_code::unexpected_end;
  163|     97|                     return;
  164|     97|                  }
  165|       |
  166|  2.34k|                  if (!emit_hex_bytes(ctx, it, chunk_len, out, ix)) return;
  ------------------
  |  Branch (166:23): [True: 0, False: 2.34k]
  ------------------
  167|  2.34k|                  it += chunk_len;
  168|  2.34k|               }
  169|    842|            }
  170|  2.68M|            else {
  171|  2.68M|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  172|  2.68M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (172:20): [True: 27, False: 2.68M]
  ------------------
  173|     27|                  return;
  174|       |
  175|  2.68M|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (175:20): [True: 175, False: 2.68M]
  ------------------
  176|    175|                  ctx.error = error_code::unexpected_end;
  177|    175|                  return;
  178|    175|               }
  179|       |
  180|  2.68M|               if (!emit_hex_bytes(ctx, it, length, out, ix)) return;
  ------------------
  |  Branch (180:20): [True: 0, False: 2.68M]
  ------------------
  181|  2.68M|               it += length;
  182|  2.68M|            }
  183|       |
  184|  2.68M|            if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (184:17): [True: 0, False: 2.68M]
  ------------------
  185|  2.68M|            break;
  186|  2.68M|         }
  187|       |
  188|  2.68M|         case major::tstr: {
  ------------------
  |  Branch (188:10): [True: 92.7k, False: 45.4M]
  ------------------
  189|       |            // Text string
  190|  92.7k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (190:17): [True: 1.88k, False: 90.9k]
  ------------------
  191|       |               // Indefinite-length text string - concatenate chunks
  192|  1.88k|               std::string str;
  193|   109k|               while (true) {
  ------------------
  |  Branch (193:23): [True: 109k, Folded]
  ------------------
  194|   109k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (194:23): [True: 166, False: 109k]
  ------------------
  195|    166|                     ctx.error = error_code::unexpected_end;
  196|    166|                     return;
  197|    166|                  }
  198|   109k|                  uint8_t chunk_initial;
  199|   109k|                  std::memcpy(&chunk_initial, it, 1);
  200|       |
  201|   109k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (201:23): [True: 1.27k, False: 107k]
  ------------------
  202|  1.27k|                     ++it;
  203|  1.27k|                     break;
  204|  1.27k|                  }
  205|       |
  206|   107k|                  ++it;
  207|   107k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  208|   107k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  209|       |
  210|   107k|                  if (chunk_major != major::tstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (210:23): [True: 80, False: 107k]
  |  Branch (210:53): [True: 2, False: 107k]
  ------------------
  211|     82|                     ctx.error = error_code::syntax_error;
  212|     82|                     return;
  213|     82|                  }
  214|       |
  215|   107k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  216|   107k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (216:23): [True: 100, False: 107k]
  ------------------
  217|    100|                     return;
  218|       |
  219|   107k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (219:23): [True: 258, False: 107k]
  ------------------
  220|    258|                     ctx.error = error_code::unexpected_end;
  221|    258|                     return;
  222|    258|                  }
  223|       |
  224|   107k|                  str.append(reinterpret_cast<const char*>(it), chunk_len);
  225|   107k|                  it += chunk_len;
  226|   107k|               }
  227|  1.27k|               detail::emit_untrusted_string<Opts>(ctx, str, out, ix);
  228|  1.27k|            }
  229|  90.9k|            else {
  230|  90.9k|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  231|  90.9k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (231:20): [True: 186, False: 90.7k]
  ------------------
  232|    186|                  return;
  233|       |
  234|  90.7k|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (234:20): [True: 420, False: 90.3k]
  ------------------
  235|    420|                  ctx.error = error_code::unexpected_end;
  236|    420|                  return;
  237|    420|               }
  238|       |
  239|  90.3k|               const sv value{reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  240|  90.3k|               detail::emit_untrusted_string<Opts>(ctx, value, out, ix);
  241|  90.3k|               it += length;
  242|  90.3k|            }
  243|  91.5k|            break;
  244|  92.7k|         }
  245|       |
  246|  1.24M|         case major::array: {
  ------------------
  |  Branch (246:10): [True: 1.24M, False: 44.2M]
  ------------------
  247|       |            // The elements of an array stay on one line, so a separator is ',' or ", "
  248|  1.24M|            const auto convert_element = [&](const bool needs_comma) {
  249|  1.24M|               if (needs_comma) {
  250|  1.24M|                  if constexpr (Opts.prettify) {
  251|  1.24M|                     if (!emit_literal<", ">(ctx, out, ix)) return;
  252|  1.24M|                  }
  253|  1.24M|                  else {
  254|  1.24M|                     if (!emit_char(ctx, ',', out, ix)) return;
  255|  1.24M|                  }
  256|  1.24M|               }
  257|  1.24M|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  258|  1.24M|            };
  259|       |
  260|  1.24M|            if (!emit_char(ctx, '[', out, ix)) return;
  ------------------
  |  Branch (260:17): [True: 0, False: 1.24M]
  ------------------
  261|       |
  262|  1.24M|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (262:17): [True: 8.43k, False: 1.23M]
  ------------------
  263|       |               // Indefinite-length array
  264|  8.43k|               bool first = true;
  265|  23.8M|               while (true) {
  ------------------
  |  Branch (265:23): [True: 23.8M, Folded]
  ------------------
  266|  23.8M|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (266:23): [True: 478, False: 23.8M]
  ------------------
  267|    478|                     ctx.error = error_code::unexpected_end;
  268|    478|                     return;
  269|    478|                  }
  270|  23.8M|                  uint8_t peek;
  271|  23.8M|                  std::memcpy(&peek, it, 1);
  272|       |
  273|  23.8M|                  if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (273:23): [True: 941, False: 23.8M]
  ------------------
  274|    941|                     ++it;
  275|    941|                     break;
  276|    941|                  }
  277|       |
  278|  23.8M|                  convert_element(!first);
  279|  23.8M|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (279:23): [True: 7.01k, False: 23.8M]
  ------------------
  280|  7.01k|                     return;
  281|  23.8M|                  first = false;
  282|  23.8M|               }
  283|  8.43k|            }
  284|  1.23M|            else {
  285|  1.23M|               const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  286|  1.23M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (286:20): [True: 111, False: 1.23M]
  ------------------
  287|    111|                  return;
  288|       |
  289|  17.3M|               for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (289:37): [True: 16.1M, False: 1.22M]
  ------------------
  290|  16.1M|                  convert_element(i > 0);
  291|  16.1M|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (291:23): [True: 18.0k, False: 16.1M]
  ------------------
  292|  18.0k|                     return;
  293|  16.1M|               }
  294|  1.23M|            }
  295|       |
  296|  1.22M|            if (!emit_char(ctx, ']', out, ix)) return;
  ------------------
  |  Branch (296:17): [True: 0, False: 1.22M]
  ------------------
  297|  1.22M|            break;
  298|  1.22M|         }
  299|       |
  300|  1.22M|         case major::map: {
  ------------------
  |  Branch (300:10): [True: 214k, False: 45.3M]
  ------------------
  301|   214k|            if (!emit_char(ctx, '{', out, ix)) return;
  ------------------
  |  Branch (301:17): [True: 0, False: 214k]
  ------------------
  302|       |
  303|       |            // A prettified map only breaks the line before its '}' when it holds at least one
  304|       |            // pair, so an empty map stays "{}" whether its length was definite or indefinite.
  305|   214k|            bool wrote_pair = false;
  306|       |
  307|       |            // One pair: the ',' separating it from the pair before, the line a prettified map opens
  308|       |            // for it, then the key, the colon, and the value.
  309|   214k|            const auto convert_pair = [&](const bool needs_comma) {
  310|   214k|               if (needs_comma) {
  311|   214k|                  if (!emit_char(ctx, ',', out, ix)) return;
  312|   214k|               }
  313|   214k|               if constexpr (Opts.prettify) {
  314|   214k|                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  315|   214k|               }
  316|       |
  317|       |               // Key (must be a string for JSON compatibility)
  318|   214k|               cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  319|   214k|               if (bool(ctx.error)) [[unlikely]]
  320|   214k|                  return;
  321|       |
  322|   214k|               if constexpr (Opts.prettify) {
  323|   214k|                  if (!emit_literal<": ">(ctx, out, ix)) return;
  324|   214k|               }
  325|   214k|               else {
  326|   214k|                  if (!emit_char(ctx, ':', out, ix)) return;
  327|   214k|               }
  328|       |
  329|   214k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  330|   214k|            };
  331|       |
  332|   214k|            {
  333|       |               // The indentation this map adds belongs to this map, so it is raised for the pairs
  334|       |               // and no longer: leaving it up on an error path would indent whatever the context
  335|       |               // is used for next.
  336|   214k|               const indent_guard indent{ctx, Opts.prettify ? check_indentation_width(Opts) : 0};
  ------------------
  |  Branch (336:47): [Folded, False: 214k]
  ------------------
  337|       |
  338|   214k|               if (additional_info == info::indefinite) {
  ------------------
  |  Branch (338:20): [True: 1.49k, False: 213k]
  ------------------
  339|       |                  // Indefinite-length map
  340|  3.76M|                  while (true) {
  ------------------
  |  Branch (340:26): [True: 3.76M, Folded]
  ------------------
  341|  3.76M|                     if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (341:26): [True: 205, False: 3.76M]
  ------------------
  342|    205|                        ctx.error = error_code::unexpected_end;
  343|    205|                        return;
  344|    205|                     }
  345|  3.76M|                     uint8_t peek;
  346|  3.76M|                     std::memcpy(&peek, it, 1);
  347|       |
  348|  3.76M|                     if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (348:26): [True: 230, False: 3.76M]
  ------------------
  349|    230|                        ++it;
  350|    230|                        break;
  351|    230|                     }
  352|       |
  353|  3.76M|                     convert_pair(wrote_pair);
  354|  3.76M|                     if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (354:26): [True: 1.06k, False: 3.76M]
  ------------------
  355|  1.06k|                        return;
  356|  3.76M|                     wrote_pair = true;
  357|  3.76M|                  }
  358|  1.49k|               }
  359|   213k|               else {
  360|   213k|                  const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  361|   213k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (361:23): [True: 70, False: 213k]
  ------------------
  362|     70|                     return;
  363|       |
  364|   213k|                  wrote_pair = count > 0;
  365|       |
  366|   985k|                  for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (366:40): [True: 776k, False: 209k]
  ------------------
  367|   776k|                     convert_pair(i > 0);
  368|   776k|                     if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (368:26): [True: 4.18k, False: 772k]
  ------------------
  369|  4.18k|                        return;
  370|   776k|                  }
  371|   213k|               }
  372|   214k|            }
  373|       |
  374|       |            if constexpr (Opts.prettify) {
  375|       |               if (wrote_pair) {
  376|       |                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  377|       |               }
  378|       |            }
  379|   209k|            if (!emit_char(ctx, '}', out, ix)) return;
  ------------------
  |  Branch (379:17): [True: 0, False: 209k]
  ------------------
  380|   209k|            break;
  381|   209k|         }
  382|       |
  383|   224k|         case major::tag: {
  ------------------
  |  Branch (383:10): [True: 224k, False: 45.3M]
  ------------------
  384|       |            // Semantic tag - for JSON output, we skip the tag and output the content
  385|       |            // Some tags could have special handling (e.g., datetime)
  386|   224k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  387|   224k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (387:17): [True: 38, False: 224k]
  ------------------
  388|     38|               return;
  389|       |
  390|       |            // Check for typed arrays (RFC 8746)
  391|   224k|            const auto ta_info = typed_array::get_info(tag_num);
  392|   224k|            if (ta_info.valid) {
  ------------------
  |  Branch (392:17): [True: 58.4k, False: 166k]
  ------------------
  393|       |               // It's a typed array - read the byte string and convert elements
  394|  58.4k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (394:20): [True: 51, False: 58.4k]
  ------------------
  395|     51|                  ctx.error = error_code::unexpected_end;
  396|     51|                  return;
  397|     51|               }
  398|       |
  399|  58.4k|               uint8_t bstr_initial;
  400|  58.4k|               std::memcpy(&bstr_initial, it, 1);
  401|  58.4k|               ++it;
  402|       |
  403|  58.4k|               if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (403:20): [True: 11, False: 58.4k]
  ------------------
  404|     11|                  ctx.error = error_code::syntax_error;
  405|     11|                  return;
  406|     11|               }
  407|       |
  408|  58.4k|               const uint64_t byte_len = cbor_to_json_decode_arg(ctx, it, end, get_additional_info(bstr_initial));
  409|  58.4k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (409:20): [True: 100, False: 58.3k]
  ------------------
  410|    100|                  return;
  411|       |
  412|  58.3k|               if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (412:20): [True: 250, False: 58.0k]
  ------------------
  413|    250|                  ctx.error = error_code::unexpected_end;
  414|    250|                  return;
  415|    250|               }
  416|       |
  417|       |               // Tags 83 and 87 hold IEEE binary128 elements, which no C++ floating point type this
  418|       |               // library writes or reads represents. Rejecting the width here, before the array is
  419|       |               // opened, keeps the element loop over widths it can decode and leaves no half
  420|       |               // written array behind.
  421|  58.0k|               if (ta_info.element_size > 8) [[unlikely]] {
  ------------------
  |  Branch (421:20): [True: 4, False: 58.0k]
  ------------------
  422|      4|                  ctx.error = error_code::feature_not_supported;
  423|      4|                  return;
  424|      4|               }
  425|       |
  426|  58.0k|               if (byte_len % ta_info.element_size != 0) [[unlikely]] {
  ------------------
  |  Branch (426:20): [True: 5, False: 58.0k]
  ------------------
  427|      5|                  ctx.error = error_code::syntax_error;
  428|      5|                  return;
  429|      5|               }
  430|       |
  431|  58.0k|               const size_t count = byte_len / ta_info.element_size;
  432|  58.0k|               const bool need_swap = typed_array::needs_byteswap(tag_num);
  433|       |
  434|  58.0k|               if (!emit_char(ctx, '[', out, ix)) return;
  ------------------
  |  Branch (434:20): [True: 0, False: 58.0k]
  ------------------
  435|       |
  436|  5.29M|               for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (436:35): [True: 5.23M, False: 58.0k]
  ------------------
  437|  5.23M|                  if (i > 0) {
  ------------------
  |  Branch (437:23): [True: 5.18M, False: 47.8k]
  ------------------
  438|  5.18M|                     if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (438:26): [True: 0, False: 5.18M]
  ------------------
  439|  5.18M|                  }
  440|       |
  441|       |                  // Read and optionally byteswap the element
  442|  5.23M|                  if (ta_info.is_float) {
  ------------------
  |  Branch (442:23): [True: 1.79M, False: 3.43M]
  ------------------
  443|  1.79M|                     if (ta_info.element_size == 2) {
  ------------------
  |  Branch (443:26): [True: 1.57M, False: 218k]
  ------------------
  444|       |                        // Half precision (tags 80 and 84) has no C++ type; it widens to double,
  445|       |                        // the same conversion decode_half performs for a bare float16 value.
  446|  1.57M|                        uint16_t half;
  447|  1.57M|                        std::memcpy(&half, it, 2);
  448|  1.57M|                        if (need_swap) {
  ------------------
  |  Branch (448:29): [True: 1.13M, False: 439k]
  ------------------
  449|  1.13M|                           half = std::byteswap(half);
  450|  1.13M|                        }
  451|  1.57M|                        to<JSON, double>::template op<Opts>(decode_half(half), ctx, out, ix);
  452|  1.57M|                     }
  453|   218k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (453:31): [True: 165k, False: 53.8k]
  ------------------
  454|   165k|                        float val;
  455|   165k|                        std::memcpy(&val, it, 4);
  456|   165k|                        if (need_swap) {
  ------------------
  |  Branch (456:29): [True: 52.2k, False: 112k]
  ------------------
  457|  52.2k|                           uint32_t bits;
  458|  52.2k|                           std::memcpy(&bits, &val, 4);
  459|  52.2k|                           bits = std::byteswap(bits);
  460|  52.2k|                           std::memcpy(&val, &bits, 4);
  461|  52.2k|                        }
  462|   165k|                        to<JSON, float>::template op<Opts>(val, ctx, out, ix);
  463|   165k|                     }
  464|  53.8k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (464:31): [True: 53.8k, False: 0]
  ------------------
  465|  53.8k|                        double val;
  466|  53.8k|                        std::memcpy(&val, it, 8);
  467|  53.8k|                        if (need_swap) {
  ------------------
  |  Branch (467:29): [True: 4.39k, False: 49.4k]
  ------------------
  468|  4.39k|                           uint64_t bits;
  469|  4.39k|                           std::memcpy(&bits, &val, 8);
  470|  4.39k|                           bits = std::byteswap(bits);
  471|  4.39k|                           std::memcpy(&val, &bits, 8);
  472|  4.39k|                        }
  473|  53.8k|                        to<JSON, double>::template op<Opts>(val, ctx, out, ix);
  474|  53.8k|                     }
  475|      0|                     else {
  476|      0|                        ctx.error = error_code::syntax_error;
  477|      0|                        return;
  478|      0|                     }
  479|  1.79M|                  }
  480|  3.43M|                  else if (ta_info.is_signed) {
  ------------------
  |  Branch (480:28): [True: 1.27M, False: 2.15M]
  ------------------
  481|  1.27M|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (481:26): [True: 514k, False: 765k]
  ------------------
  482|   514k|                        int8_t val;
  483|   514k|                        std::memcpy(&val, it, 1);
  484|   514k|                        to<JSON, int8_t>::template op<Opts>(val, ctx, out, ix);
  485|   514k|                     }
  486|   765k|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (486:31): [True: 715k, False: 49.8k]
  ------------------
  487|   715k|                        int16_t val;
  488|   715k|                        std::memcpy(&val, it, 2);
  489|   715k|                        if (need_swap) {
  ------------------
  |  Branch (489:29): [True: 1.41k, False: 714k]
  ------------------
  490|  1.41k|                           uint16_t bits;
  491|  1.41k|                           std::memcpy(&bits, &val, 2);
  492|  1.41k|                           bits = std::byteswap(bits);
  493|  1.41k|                           std::memcpy(&val, &bits, 2);
  494|  1.41k|                        }
  495|   715k|                        to<JSON, int16_t>::template op<Opts>(val, ctx, out, ix);
  496|   715k|                     }
  497|  49.8k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (497:31): [True: 19.2k, False: 30.5k]
  ------------------
  498|  19.2k|                        int32_t val;
  499|  19.2k|                        std::memcpy(&val, it, 4);
  500|  19.2k|                        if (need_swap) {
  ------------------
  |  Branch (500:29): [True: 16.2k, False: 3.01k]
  ------------------
  501|  16.2k|                           uint32_t bits;
  502|  16.2k|                           std::memcpy(&bits, &val, 4);
  503|  16.2k|                           bits = std::byteswap(bits);
  504|  16.2k|                           std::memcpy(&val, &bits, 4);
  505|  16.2k|                        }
  506|  19.2k|                        to<JSON, int32_t>::template op<Opts>(val, ctx, out, ix);
  507|  19.2k|                     }
  508|  30.5k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (508:31): [True: 30.5k, False: 0]
  ------------------
  509|  30.5k|                        int64_t val;
  510|  30.5k|                        std::memcpy(&val, it, 8);
  511|  30.5k|                        if (need_swap) {
  ------------------
  |  Branch (511:29): [True: 12.3k, False: 18.2k]
  ------------------
  512|  12.3k|                           uint64_t bits;
  513|  12.3k|                           std::memcpy(&bits, &val, 8);
  514|  12.3k|                           bits = std::byteswap(bits);
  515|  12.3k|                           std::memcpy(&val, &bits, 8);
  516|  12.3k|                        }
  517|  30.5k|                        to<JSON, int64_t>::template op<Opts>(val, ctx, out, ix);
  518|  30.5k|                     }
  519|  1.27M|                  }
  520|  2.15M|                  else {
  521|       |                     // Unsigned
  522|  2.15M|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (522:26): [True: 1.15M, False: 1.00M]
  ------------------
  523|  1.15M|                        uint8_t val;
  524|  1.15M|                        std::memcpy(&val, it, 1);
  525|  1.15M|                        to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  526|  1.15M|                     }
  527|  1.00M|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (527:31): [True: 137k, False: 863k]
  ------------------
  528|   137k|                        uint16_t val;
  529|   137k|                        std::memcpy(&val, it, 2);
  530|   137k|                        if (need_swap) {
  ------------------
  |  Branch (530:29): [True: 132k, False: 4.71k]
  ------------------
  531|   132k|                           val = std::byteswap(val);
  532|   132k|                        }
  533|   137k|                        to<JSON, uint16_t>::template op<Opts>(val, ctx, out, ix);
  534|   137k|                     }
  535|   863k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (535:31): [True: 320k, False: 543k]
  ------------------
  536|   320k|                        uint32_t val;
  537|   320k|                        std::memcpy(&val, it, 4);
  538|   320k|                        if (need_swap) {
  ------------------
  |  Branch (538:29): [True: 928, False: 319k]
  ------------------
  539|    928|                           val = std::byteswap(val);
  540|    928|                        }
  541|   320k|                        to<JSON, uint32_t>::template op<Opts>(val, ctx, out, ix);
  542|   320k|                     }
  543|   543k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (543:31): [True: 543k, False: 0]
  ------------------
  544|   543k|                        uint64_t val;
  545|   543k|                        std::memcpy(&val, it, 8);
  546|   543k|                        if (need_swap) {
  ------------------
  |  Branch (546:29): [True: 82.4k, False: 461k]
  ------------------
  547|  82.4k|                           val = std::byteswap(val);
  548|  82.4k|                        }
  549|   543k|                        to<JSON, uint64_t>::template op<Opts>(val, ctx, out, ix);
  550|   543k|                     }
  551|  2.15M|                  }
  552|       |
  553|  5.23M|                  if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (553:23): [True: 0, False: 5.23M]
  ------------------
  554|      0|                     return;
  555|      0|                  }
  556|       |
  557|  5.23M|                  it += ta_info.element_size;
  558|  5.23M|               }
  559|       |
  560|  58.0k|               if (!emit_char(ctx, ']', out, ix)) return;
  ------------------
  |  Branch (560:20): [True: 0, False: 58.0k]
  ------------------
  561|  58.0k|            }
  562|   166k|            else {
  563|       |               // Other tags - just output the tagged content
  564|   166k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  565|   166k|            }
  566|   224k|            break;
  567|   224k|         }
  568|       |
  569|  28.5M|         case major::simple: {
  ------------------
  |  Branch (569:10): [True: 28.5M, False: 17.0M]
  ------------------
  570|  28.5M|            switch (additional_info) {
  571|  16.7M|            case simple::false_value:
  ------------------
  |  Branch (571:13): [True: 16.7M, False: 11.7M]
  ------------------
  572|  16.7M|               if (!emit_literal<"false">(ctx, out, ix)) return;
  ------------------
  |  Branch (572:20): [True: 0, False: 16.7M]
  ------------------
  573|  16.7M|               break;
  574|  16.7M|            case simple::true_value:
  ------------------
  |  Branch (574:13): [True: 3.89M, False: 24.6M]
  ------------------
  575|  3.89M|               if (!emit_literal<"true">(ctx, out, ix)) return;
  ------------------
  |  Branch (575:20): [True: 0, False: 3.89M]
  ------------------
  576|  3.89M|               break;
  577|  3.89M|            case simple::null_value:
  ------------------
  |  Branch (577:13): [True: 301k, False: 28.2M]
  ------------------
  578|       |            // JSON has one empty value and CBOR has two. `undefined` becomes `null` because that is
  579|       |            // the only thing JSON can say, so the distinction between "no value" and "absent value"
  580|       |            // does not survive the conversion.
  581|   306k|            case simple::undefined:
  ------------------
  |  Branch (581:13): [True: 4.76k, False: 28.5M]
  ------------------
  582|   306k|               if (!emit_literal<"null">(ctx, out, ix)) return;
  ------------------
  |  Branch (582:20): [True: 0, False: 306k]
  ------------------
  583|   306k|               break;
  584|  6.24M|            case simple::float16: {
  ------------------
  |  Branch (584:13): [True: 6.24M, False: 22.2M]
  ------------------
  585|  6.24M|               if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (585:20): [True: 30, False: 6.24M]
  ------------------
  586|     30|                  ctx.error = error_code::unexpected_end;
  587|     30|                  return;
  588|     30|               }
  589|  6.24M|               uint16_t half;
  590|  6.24M|               std::memcpy(&half, it, 2);
  591|  6.24M|               if constexpr (std::endian::native == std::endian::little) {
  592|  6.24M|                  half = std::byteswap(half);
  593|  6.24M|               }
  594|  6.24M|               it += 2;
  595|  6.24M|               const double value = decode_half(half);
  596|  6.24M|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  597|  6.24M|               break;
  598|  6.24M|            }
  599|  8.28k|            case simple::float32: {
  ------------------
  |  Branch (599:13): [True: 8.28k, False: 28.5M]
  ------------------
  600|  8.28k|               if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (600:20): [True: 12, False: 8.27k]
  ------------------
  601|     12|                  ctx.error = error_code::unexpected_end;
  602|     12|                  return;
  603|     12|               }
  604|  8.27k|               uint32_t bits;
  605|  8.27k|               std::memcpy(&bits, it, 4);
  606|  8.27k|               if constexpr (std::endian::native == std::endian::little) {
  607|  8.27k|                  bits = std::byteswap(bits);
  608|  8.27k|               }
  609|  8.27k|               float value;
  610|  8.27k|               std::memcpy(&value, &bits, 4);
  611|  8.27k|               it += 4;
  612|  8.27k|               to<JSON, float>::template op<Opts>(value, ctx, out, ix);
  613|  8.27k|               break;
  614|  8.28k|            }
  615|   160k|            case simple::float64: {
  ------------------
  |  Branch (615:13): [True: 160k, False: 28.3M]
  ------------------
  616|   160k|               if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (616:20): [True: 11, False: 160k]
  ------------------
  617|     11|                  ctx.error = error_code::unexpected_end;
  618|     11|                  return;
  619|     11|               }
  620|   160k|               uint64_t bits;
  621|   160k|               std::memcpy(&bits, it, 8);
  622|   160k|               if constexpr (std::endian::native == std::endian::little) {
  623|   160k|                  bits = std::byteswap(bits);
  624|   160k|               }
  625|   160k|               double value;
  626|   160k|               std::memcpy(&value, &bits, 8);
  627|   160k|               it += 8;
  628|   160k|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  629|   160k|               break;
  630|   160k|            }
  631|     96|            case simple::break_code:
  ------------------
  |  Branch (631:13): [True: 96, False: 28.5M]
  ------------------
  632|     96|               ctx.error = error_code::syntax_error; // Unexpected break
  633|     96|               break;
  634|  1.12M|            default:
  ------------------
  |  Branch (634:13): [True: 1.12M, False: 27.3M]
  ------------------
  635|  1.12M|               if (additional_info < 24) {
  ------------------
  |  Branch (635:20): [True: 1.01M, False: 110k]
  ------------------
  636|       |                  // Simple value 0-23 - output as number
  637|  1.01M|                  to<JSON, uint8_t>::template op<Opts>(additional_info, ctx, out, ix);
  638|  1.01M|               }
  639|   110k|               else if (additional_info == 24) {
  ------------------
  |  Branch (639:25): [True: 110k, False: 33]
  ------------------
  640|       |                  // Simple value in next byte
  641|   110k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (641:23): [True: 2, False: 110k]
  ------------------
  642|      2|                     ctx.error = error_code::unexpected_end;
  643|      2|                     return;
  644|      2|                  }
  645|   110k|                  uint8_t val;
  646|   110k|                  std::memcpy(&val, it, 1);
  647|   110k|                  ++it;
  648|   110k|                  to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  649|   110k|               }
  650|     33|               else {
  651|     33|                  ctx.error = error_code::syntax_error;
  652|     33|               }
  653|  1.12M|               break;
  654|  28.5M|            }
  655|  28.5M|            break;
  656|  28.5M|         }
  657|       |
  658|  28.5M|         default:
  ------------------
  |  Branch (658:10): [True: 0, False: 45.5M]
  ------------------
  659|      0|            ctx.error = error_code::syntax_error;
  660|      0|            break;
  661|  45.5M|         }
  662|  45.5M|      }
_ZN3glz6detail23cbor_to_json_decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   17|  20.8M|      {
   18|  20.8M|         using namespace cbor;
   19|       |
   20|  20.8M|         if (additional_info < 24) {
  ------------------
  |  Branch (20:14): [True: 19.0M, False: 1.76M]
  ------------------
   21|  19.0M|            return additional_info;
   22|  19.0M|         }
   23|       |
   24|  1.76M|         switch (additional_info) {
   25|  1.50M|         case info::uint8_follows: {
  ------------------
  |  Branch (25:10): [True: 1.50M, False: 260k]
  ------------------
   26|  1.50M|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (26:17): [True: 56, False: 1.50M]
  ------------------
   27|     56|               ctx.error = error_code::unexpected_end;
   28|     56|               return 0;
   29|     56|            }
   30|  1.50M|            uint8_t val;
   31|  1.50M|            std::memcpy(&val, it, 1);
   32|  1.50M|            ++it;
   33|  1.50M|            return val;
   34|  1.50M|         }
   35|  39.3k|         case info::uint16_follows: {
  ------------------
  |  Branch (35:10): [True: 39.3k, False: 1.72M]
  ------------------
   36|  39.3k|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (36:17): [True: 94, False: 39.2k]
  ------------------
   37|     94|               ctx.error = error_code::unexpected_end;
   38|     94|               return 0;
   39|     94|            }
   40|  39.2k|            uint16_t val;
   41|  39.2k|            std::memcpy(&val, it, 2);
   42|  39.2k|            if constexpr (std::endian::native == std::endian::little) {
   43|  39.2k|               val = std::byteswap(val);
   44|  39.2k|            }
   45|  39.2k|            it += 2;
   46|  39.2k|            return val;
   47|  39.3k|         }
   48|   172k|         case info::uint32_follows: {
  ------------------
  |  Branch (48:10): [True: 172k, False: 1.59M]
  ------------------
   49|   172k|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (49:17): [True: 187, False: 172k]
  ------------------
   50|    187|               ctx.error = error_code::unexpected_end;
   51|    187|               return 0;
   52|    187|            }
   53|   172k|            uint32_t val;
   54|   172k|            std::memcpy(&val, it, 4);
   55|   172k|            if constexpr (std::endian::native == std::endian::little) {
   56|   172k|               val = std::byteswap(val);
   57|   172k|            }
   58|   172k|            it += 4;
   59|   172k|            return val;
   60|   172k|         }
   61|  48.7k|         case info::uint64_follows: {
  ------------------
  |  Branch (61:10): [True: 48.7k, False: 1.71M]
  ------------------
   62|  48.7k|            if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (62:17): [True: 493, False: 48.2k]
  ------------------
   63|    493|               ctx.error = error_code::unexpected_end;
   64|    493|               return 0;
   65|    493|            }
   66|  48.2k|            uint64_t val;
   67|  48.2k|            std::memcpy(&val, it, 8);
   68|  48.2k|            if constexpr (std::endian::native == std::endian::little) {
   69|  48.2k|               val = std::byteswap(val);
   70|  48.2k|            }
   71|  48.2k|            it += 8;
   72|  48.2k|            return val;
   73|  48.7k|         }
   74|    130|         default:
  ------------------
  |  Branch (74:10): [True: 130, False: 1.76M]
  ------------------
   75|    130|            ctx.error = error_code::syntax_error;
   76|    130|            return 0;
   77|  1.76M|         }
   78|  1.76M|      }
_ZZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlbE_clEb:
  248|  39.9M|            const auto convert_element = [&](const bool needs_comma) {
  249|  39.9M|               if (needs_comma) {
  ------------------
  |  Branch (249:20): [True: 38.7M, False: 1.22M]
  ------------------
  250|       |                  if constexpr (Opts.prettify) {
  251|       |                     if (!emit_literal<", ">(ctx, out, ix)) return;
  252|       |                  }
  253|  38.7M|                  else {
  254|  38.7M|                     if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (254:26): [True: 0, False: 38.7M]
  ------------------
  255|  38.7M|                  }
  256|  38.7M|               }
  257|  38.7M|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  258|  39.9M|            };
_ZZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlbE0_clEb:
  309|  4.54M|            const auto convert_pair = [&](const bool needs_comma) {
  310|  4.54M|               if (needs_comma) {
  ------------------
  |  Branch (310:20): [True: 4.53M, False: 10.6k]
  ------------------
  311|  4.53M|                  if (!emit_char(ctx, ',', out, ix)) return;
  ------------------
  |  Branch (311:23): [True: 0, False: 4.53M]
  ------------------
  312|  4.53M|               }
  313|       |               if constexpr (Opts.prettify) {
  314|       |                  if (!emit_newline_indent<Opts>(ctx, out, ix)) return;
  315|       |               }
  316|       |
  317|       |               // Key (must be a string for JSON compatibility)
  318|  4.54M|               cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  319|  4.54M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (319:20): [True: 1.17k, False: 4.54M]
  ------------------
  320|  1.17k|                  return;
  321|       |
  322|       |               if constexpr (Opts.prettify) {
  323|       |                  if (!emit_literal<": ">(ctx, out, ix)) return;
  324|       |               }
  325|  4.54M|               else {
  326|  4.54M|                  if (!emit_char(ctx, ':', out, ix)) return;
  ------------------
  |  Branch (326:23): [True: 0, False: 4.54M]
  ------------------
  327|  4.54M|               }
  328|       |
  329|  4.54M|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  330|  4.54M|            };
_ZN3glz6detail16cbor_to_json_keyITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
  674|  4.55M|      {
  675|  4.55M|         using namespace cbor;
  676|       |
  677|  4.55M|         if (recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (677:14): [True: 2, False: 4.55M]
  ------------------
  678|      2|            ctx.error = error_code::exceeded_max_recursive_depth;
  679|      2|            return;
  680|      2|         }
  681|       |
  682|  4.55M|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (682:14): [True: 471, False: 4.55M]
  ------------------
  683|    471|            ctx.error = error_code::unexpected_end;
  684|    471|            return;
  685|    471|         }
  686|       |
  687|  4.55M|         uint8_t initial;
  688|  4.55M|         std::memcpy(&initial, it, 1);
  689|  4.55M|         const uint8_t major_type = get_major_type(initial);
  690|  4.55M|         const uint8_t additional_info = get_additional_info(initial);
  691|       |
  692|  4.55M|         switch (major_type) {
  693|  19.0k|         case major::tstr:
  ------------------
  |  Branch (693:10): [True: 19.0k, False: 4.53M]
  ------------------
  694|   860k|         case major::bstr:
  ------------------
  |  Branch (694:10): [True: 841k, False: 3.71M]
  ------------------
  695|       |            // Both already emit as a JSON string (tstr escaped, bstr hex-quoted).
  696|   860k|            cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth);
  697|   860k|            return;
  698|  9.74k|         case major::tag: {
  ------------------
  |  Branch (698:10): [True: 9.74k, False: 4.54M]
  ------------------
  699|       |            // Unwrap the tag and key-check the tagged content, so e.g. a tag-0
  700|       |            // datetime text key still emits as a string. Typed-array tags
  701|       |            // (RFC 8746) decode to a JSON array and are rejected below.
  702|  9.74k|            ++it;
  703|  9.74k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  704|  9.74k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (704:17): [True: 16, False: 9.72k]
  ------------------
  705|     16|               return;
  706|  9.72k|            if (typed_array::get_info(tag_num).valid) [[unlikely]] {
  ------------------
  |  Branch (706:17): [True: 10, False: 9.71k]
  ------------------
  707|     10|               ctx.error = error_code::syntax_error;
  708|     10|               return;
  709|     10|            }
  710|  9.71k|            cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  711|  9.71k|            return;
  712|  9.72k|         }
  713|   846k|         case major::uint:
  ------------------
  |  Branch (713:10): [True: 846k, False: 3.70M]
  ------------------
  714|  3.68M|         case major::nint: {
  ------------------
  |  Branch (714:10): [True: 2.83M, False: 1.71M]
  ------------------
  715|  3.68M|            ++it;
  716|  3.68M|            const uint64_t arg = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  717|  3.68M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (717:17): [True: 29, False: 3.68M]
  ------------------
  718|     29|               return;
  719|       |
  720|  3.68M|            const auto emit_quoted = [&](const auto value) {
  721|  3.68M|               if (!emit_char(ctx, '"', out, ix)) return;
  722|  3.68M|               to<JSON, decltype(value)>::template op<Opts>(value, ctx, out, ix);
  723|  3.68M|               if (bool(ctx.error)) [[unlikely]]
  724|  3.68M|                  return;
  725|  3.68M|               if (!emit_char(ctx, '"', out, ix)) return;
  726|  3.68M|            };
  727|       |
  728|  3.68M|            if (major_type == major::uint) {
  ------------------
  |  Branch (728:17): [True: 846k, False: 2.83M]
  ------------------
  729|   846k|               emit_quoted(arg);
  730|   846k|            }
  731|  2.83M|            else {
  732|  2.83M|               emit_quoted(static_cast<int64_t>(~arg));
  733|  2.83M|            }
  734|  3.68M|            return;
  735|  3.68M|         }
  736|    288|         default:
  ------------------
  |  Branch (736:10): [True: 288, False: 4.55M]
  ------------------
  737|    288|            ctx.error = error_code::syntax_error;
  738|    288|            return;
  739|  4.55M|         }
  740|  4.55M|      }
_ZZN3glz6detail16cbor_to_json_keyITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlT_E_clImEEDaSQ_:
  720|   846k|            const auto emit_quoted = [&](const auto value) {
  721|   846k|               if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (721:20): [True: 0, False: 846k]
  ------------------
  722|   846k|               to<JSON, decltype(value)>::template op<Opts>(value, ctx, out, ix);
  723|   846k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (723:20): [True: 0, False: 846k]
  ------------------
  724|      0|                  return;
  725|   846k|               if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (725:20): [True: 0, False: 846k]
  ------------------
  726|   846k|            };
_ZZN3glz6detail16cbor_to_json_keyITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_jENKUlT_E_clIlEEDaSQ_:
  720|  2.83M|            const auto emit_quoted = [&](const auto value) {
  721|  2.83M|               if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (721:20): [True: 0, False: 2.83M]
  ------------------
  722|  2.83M|               to<JSON, decltype(value)>::template op<Opts>(value, ctx, out, ix);
  723|  2.83M|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (723:20): [True: 0, False: 2.83M]
  ------------------
  724|      0|                  return;
  725|  2.83M|               if (!emit_char(ctx, '"', out, ix)) return;
  ------------------
  |  Branch (725:20): [True: 0, False: 2.83M]
  ------------------
  726|  2.83M|            };

_ZN3glz4cbor14get_major_typeEh:
  128|  50.4M|   [[nodiscard]] GLZ_ALWAYS_INLINE constexpr uint8_t get_major_type(uint8_t initial) noexcept { return initial >> 5; }
_ZN3glz4cbor19get_additional_infoEh:
  132|  50.4M|   {
  133|  50.4M|      return initial & 0x1f;
  134|  50.4M|   }
_ZN3glz4cbor12initial_byteEhh:
  123|  27.8M|   {
  124|  27.8M|      return static_cast<uint8_t>((major_type << 5) | (additional_info & 0x1f));
  125|  27.8M|   }
_ZN3glz4cbor11decode_halfEt:
  139|  7.82M|   {
  140|  7.82M|      const int sign = (half >> 15) & 1;
  141|  7.82M|      const int exp = (half >> 10) & 0x1f;
  142|  7.82M|      const int mant = half & 0x3ff;
  143|       |
  144|  7.82M|      double val;
  145|  7.82M|      if (exp == 0) {
  ------------------
  |  Branch (145:11): [True: 6.11M, False: 1.70M]
  ------------------
  146|       |         // Subnormal or zero
  147|  6.11M|         val = std::ldexp(static_cast<double>(mant), -24);
  148|  6.11M|      }
  149|  1.70M|      else if (exp != 31) {
  ------------------
  |  Branch (149:16): [True: 1.67M, False: 27.5k]
  ------------------
  150|       |         // Normal number
  151|  1.67M|         val = std::ldexp(static_cast<double>(mant + 1024), exp - 25);
  152|  1.67M|      }
  153|  27.5k|      else {
  154|       |         // Infinity or NaN
  155|  27.5k|         val = (mant == 0) ? std::numeric_limits<double>::infinity() : std::numeric_limits<double>::quiet_NaN();
  ------------------
  |  Branch (155:16): [True: 528, False: 26.9k]
  ------------------
  156|  27.5k|      }
  157|       |
  158|  7.82M|      return sign ? -val : val;
  ------------------
  |  Branch (158:14): [True: 328k, False: 7.49M]
  ------------------
  159|  7.82M|   }
_ZN3glz4cbor11typed_array7matchesImEEbNS1_16typed_array_infoE:
  402|  1.46k|      {
  403|  1.46k|         if (!info.valid || info.element_size != sizeof(T)) {
  ------------------
  |  Branch (403:14): [True: 80, False: 1.38k]
  |  Branch (403:29): [True: 16, False: 1.36k]
  ------------------
  404|     96|            return false;
  405|     96|         }
  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.36k|         else {
  412|  1.36k|            return !info.is_float && info.is_signed == std::is_signed_v<T>;
  ------------------
  |  Branch (412:20): [True: 1.36k, False: 6]
  |  Branch (412:38): [True: 1.35k, False: 6]
  ------------------
  413|  1.36k|         }
  414|  1.36k|      }
_ZN3glz4cbor11typed_array8get_infoEm:
  313|   295k|      {
  314|   295k|         typed_array_info info{};
  315|       |
  316|   295k|         if (tag < 64 || tag > 87 || tag == 76) {
  ------------------
  |  Branch (316:14): [True: 149k, False: 145k]
  |  Branch (316:26): [True: 26.3k, False: 119k]
  |  Branch (316:38): [True: 722, False: 118k]
  ------------------
  317|   176k|            return info; // Not a typed array tag
  318|   176k|         }
  319|       |
  320|   118k|         info.valid = true;
  321|       |
  322|   118k|         if (tag >= 64 && tag <= 71) {
  ------------------
  |  Branch (322:14): [True: 118k, False: 0]
  |  Branch (322:27): [True: 26.8k, False: 92.0k]
  ------------------
  323|       |            // Unsigned integers
  324|  26.8k|            info.is_signed = false;
  325|  26.8k|            info.is_float = false;
  326|  26.8k|            if (tag == 64 || tag == 68) {
  ------------------
  |  Branch (326:17): [True: 2.04k, False: 24.7k]
  |  Branch (326:30): [True: 7.51k, False: 17.2k]
  ------------------
  327|  9.56k|               info.element_size = 1;
  328|  9.56k|               info.is_little_endian = true; // Doesn't matter for 1 byte
  329|  9.56k|            }
  330|  17.2k|            else if (tag == 65 || tag == 69) {
  ------------------
  |  Branch (330:22): [True: 659, False: 16.6k]
  |  Branch (330:35): [True: 787, False: 15.8k]
  ------------------
  331|  1.44k|               info.element_size = 2;
  332|  1.44k|               info.is_little_endian = (tag == 69);
  333|  1.44k|            }
  334|  15.8k|            else if (tag == 66 || tag == 70) {
  ------------------
  |  Branch (334:22): [True: 514, False: 15.3k]
  |  Branch (334:35): [True: 1.98k, False: 13.3k]
  ------------------
  335|  2.49k|               info.element_size = 4;
  336|  2.49k|               info.is_little_endian = (tag == 70);
  337|  2.49k|            }
  338|  13.3k|            else {
  339|  13.3k|               info.element_size = 8;
  340|  13.3k|               info.is_little_endian = (tag == 71);
  341|  13.3k|            }
  342|  26.8k|         }
  343|  92.0k|         else if (tag >= 72 && tag <= 79) {
  ------------------
  |  Branch (343:19): [True: 92.0k, False: 0]
  |  Branch (343:32): [True: 43.0k, False: 49.0k]
  ------------------
  344|       |            // Signed integers
  345|  43.0k|            info.is_signed = true;
  346|  43.0k|            info.is_float = false;
  347|  43.0k|            if (tag == 72) {
  ------------------
  |  Branch (347:17): [True: 449, False: 42.5k]
  ------------------
  348|    449|               info.element_size = 1;
  349|    449|               info.is_little_endian = true;
  350|    449|            }
  351|  42.5k|            else if (tag == 73 || tag == 77) {
  ------------------
  |  Branch (351:22): [True: 615, False: 41.9k]
  |  Branch (351:35): [True: 31.7k, False: 10.1k]
  ------------------
  352|  32.3k|               info.element_size = 2;
  353|  32.3k|               info.is_little_endian = (tag == 77);
  354|  32.3k|            }
  355|  10.1k|            else if (tag == 74 || tag == 78) {
  ------------------
  |  Branch (355:22): [True: 2.79k, False: 7.40k]
  |  Branch (355:35): [True: 911, False: 6.49k]
  ------------------
  356|  3.70k|               info.element_size = 4;
  357|  3.70k|               info.is_little_endian = (tag == 78);
  358|  3.70k|            }
  359|  6.49k|            else {
  360|  6.49k|               info.element_size = 8;
  361|  6.49k|               info.is_little_endian = (tag == 79);
  362|  6.49k|            }
  363|  43.0k|         }
  364|  49.0k|         else {
  365|       |            // Floating point (80-87)
  366|  49.0k|            info.is_signed = true; // Floats can be negative
  367|  49.0k|            info.is_float = true;
  368|  49.0k|            if (tag == 80 || tag == 84) {
  ------------------
  |  Branch (368:17): [True: 12.0k, False: 37.0k]
  |  Branch (368:30): [True: 6.15k, False: 30.8k]
  ------------------
  369|  18.1k|               info.element_size = 2; // float16
  370|  18.1k|               info.is_little_endian = (tag == 84);
  371|  18.1k|            }
  372|  30.8k|            else if (tag == 81 || tag == 85) {
  ------------------
  |  Branch (372:22): [True: 11.9k, False: 18.9k]
  |  Branch (372:35): [True: 13.2k, False: 5.68k]
  ------------------
  373|  25.1k|               info.element_size = 4; // float32
  374|  25.1k|               info.is_little_endian = (tag == 85);
  375|  25.1k|            }
  376|  5.68k|            else if (tag == 82 || tag == 86) {
  ------------------
  |  Branch (376:22): [True: 1.17k, False: 4.50k]
  |  Branch (376:35): [True: 4.49k, False: 12]
  ------------------
  377|  5.67k|               info.element_size = 8; // float64
  378|  5.67k|               info.is_little_endian = (tag == 86);
  379|  5.67k|            }
  380|     12|            else {
  381|     12|               info.element_size = 16; // float128
  382|     12|               info.is_little_endian = (tag == 87);
  383|     12|            }
  384|  49.0k|         }
  385|       |
  386|   118k|         return info;
  387|   295k|      }
_ZN3glz4cbor11typed_array14needs_byteswapEm:
  418|  59.0k|      {
  419|  59.0k|         const auto info = get_info(tag);
  420|  59.0k|         if (!info.valid || info.element_size == 1) {
  ------------------
  |  Branch (420:14): [True: 0, False: 59.0k]
  |  Branch (420:29): [True: 4.99k, False: 54.0k]
  ------------------
  421|  4.99k|            return false;
  422|  4.99k|         }
  423|  54.0k|         constexpr bool native_is_le = (std::endian::native == std::endian::little);
  424|  54.0k|         return native_is_le != info.is_little_endian;
  425|  59.0k|      }

_ZN3glz9read_cborITkNS_14read_supportedIL_ZNS_4CBOREEEE9my_structRKNSt3__16vectorIcNS3_9allocatorIcEEEEEENS3_8expectedIT_NS_9error_ctxEEEOT0_:
 2645|  19.1k|   {
 2646|  19.1k|      T value{};
 2647|  19.1k|      const auto pe = read<opts{.format = CBOR}>(value, std::forward<Buffer>(buffer));
 2648|  19.1k|      if (pe) [[unlikely]] {
  ------------------
  |  Branch (2648:11): [True: 19.1k, False: 56]
  ------------------
 2649|  19.1k|         return unexpected(pe);
 2650|  19.1k|      }
 2651|     56|      return value;
 2652|  19.1k|   }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEER9my_structTkNS_10is_contextERNS_7contextERPKcS9_EEvOT0_OT1_OT2_T3_:
  128|  19.1k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  19.1k|         else {
  138|  19.1k|            using V = std::remove_cvref_t<T>;
  139|  19.1k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  19.1k|                                             end);
  141|  19.1k|         }
  142|  19.1k|      }
_ZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_:
 1795|  19.1k|      {
 1796|  19.1k|         using namespace cbor;
 1797|       |
 1798|  19.1k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1798:14): [True: 0, False: 19.1k]
  ------------------
 1799|      0|            ctx.error = error_code::unexpected_end;
 1800|      0|            return;
 1801|      0|         }
 1802|       |
 1803|  19.1k|         uint8_t initial;
 1804|  19.1k|         std::memcpy(&initial, it, 1);
 1805|  19.1k|         ++it;
 1806|       |
 1807|  19.1k|         const uint8_t major_type = get_major_type(initial);
 1808|  19.1k|         const uint8_t additional_info = get_additional_info(initial);
 1809|       |
 1810|  19.1k|         if (major_type != major::map) [[unlikely]] {
  ------------------
  |  Branch (1810:14): [True: 13.0k, False: 6.18k]
  ------------------
 1811|  13.0k|            ctx.error = error_code::syntax_error;
 1812|  13.0k|            return;
 1813|  13.0k|         }
 1814|       |
 1815|  6.18k|         depth_guard guard{ctx};
 1816|  6.18k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1816:14): [True: 0, False: 6.18k]
  ------------------
 1817|      0|            return;
 1818|      0|         }
 1819|       |
 1820|  6.18k|         static constexpr auto N = reflect<T>::size;
 1821|       |         if constexpr (N == 0) {
 1822|       |            (void)value;
 1823|       |         }
 1824|       |
 1825|  6.18k|         uint64_t n_keys;
 1826|  6.18k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1826:14): [True: 1.69k, False: 4.49k]
  ------------------
 1827|       |            // Handle indefinite map by counting as we go
 1828|  1.69k|            n_keys = (std::numeric_limits<uint64_t>::max)();
 1829|  1.69k|         }
 1830|  4.49k|         else {
 1831|  4.49k|            n_keys = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1832|  4.49k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1832:17): [True: 72, False: 4.42k]
  ------------------
 1833|     72|               return;
 1834|  4.49k|         }
 1835|       |
 1836|  21.7k|         for (uint64_t key_idx = 0; key_idx < n_keys; ++key_idx) {
  ------------------
  |  Branch (1836:37): [True: 18.4k, False: 3.23k]
  ------------------
 1837|  18.4k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1837:17): [True: 586, False: 17.9k]
  ------------------
 1838|    586|               ctx.error = error_code::unexpected_end;
 1839|    586|               return;
 1840|    586|            }
 1841|       |
 1842|       |            // Check for break in indefinite map
 1843|  17.9k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1843:17): [True: 10.4k, False: 7.44k]
  ------------------
 1844|  10.4k|               uint8_t peek;
 1845|  10.4k|               std::memcpy(&peek, it, 1);
 1846|  10.4k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1846:20): [True: 8, False: 10.4k]
  ------------------
 1847|      8|                  ++it;
 1848|      8|                  break;
 1849|      8|               }
 1850|  10.4k|            }
 1851|       |
 1852|       |            // Read key
 1853|  17.9k|            uint8_t key_initial;
 1854|  17.9k|            std::memcpy(&key_initial, it, 1);
 1855|  17.9k|            ++it;
 1856|       |
 1857|  17.9k|            const uint8_t key_major = get_major_type(key_initial);
 1858|  17.9k|            const uint8_t key_info = get_additional_info(key_initial);
 1859|       |
 1860|  17.9k|            if (key_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (1860:17): [True: 1.79k, False: 16.1k]
  ------------------
 1861|  1.79k|               ctx.error = error_code::syntax_error;
 1862|  1.79k|               return;
 1863|  1.79k|            }
 1864|       |
 1865|  16.1k|            uint64_t key_len = cbor_detail::decode_arg(ctx, it, end, key_info);
 1866|  16.1k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1866:17): [True: 148, False: 15.9k]
  ------------------
 1867|    148|               return;
 1868|       |
 1869|  15.9k|            if (static_cast<uint64_t>(end - it) < key_len) [[unlikely]] {
  ------------------
  |  Branch (1869:17): [True: 349, False: 15.6k]
  ------------------
 1870|    349|               ctx.error = error_code::unexpected_end;
 1871|    349|               return;
 1872|    349|            }
 1873|       |
 1874|  15.6k|            if constexpr (N > 0) {
 1875|  15.6k|               static constexpr auto HashInfo = hash_info<T>;
 1876|       |
 1877|       |               // decode_hash_with_size pre-screens the key length against [min_length, max_length],
 1878|       |               // so no call-site length filter is needed here (the buffer bound above still applies).
 1879|  15.6k|               const auto index = decode_hash_with_size<CBOR, T, HashInfo, HashInfo.type>::op(it, end, key_len);
 1880|       |
 1881|  15.6k|               if (index < N) [[likely]] {
  ------------------
  |  Branch (1881:20): [True: 15.2k, False: 322]
  ------------------
 1882|  15.2k|                  const sv key{reinterpret_cast<const char*>(it), static_cast<size_t>(key_len)};
 1883|  15.2k|                  it += key_len;
 1884|       |
 1885|  15.2k|                  visit<N>(
 1886|  15.2k|                     [&]<size_t I>() {
 1887|  15.2k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1888|  15.2k|                        static constexpr auto Length = TargetKey.size();
 1889|  15.2k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
 1890|  15.2k|                           if constexpr (reflectable<T>) {
 1891|  15.2k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1892|  15.2k|                           }
 1893|  15.2k|                           else {
 1894|  15.2k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1895|  15.2k|                           }
 1896|  15.2k|                        }
 1897|  15.2k|                        else {
 1898|  15.2k|                           if constexpr (Opts.error_on_unknown_keys) {
 1899|  15.2k|                              ctx.error = error_code::unknown_key;
 1900|  15.2k|                              return;
 1901|  15.2k|                           }
 1902|  15.2k|                           else {
 1903|  15.2k|                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1904|  15.2k|                              if (bool(ctx.error)) [[unlikely]]
 1905|  15.2k|                                 return;
 1906|  15.2k|                           }
 1907|  15.2k|                        }
 1908|  15.2k|                     },
 1909|  15.2k|                     index);
 1910|       |
 1911|  15.2k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1911:23): [True: 2.86k, False: 12.4k]
  ------------------
 1912|  2.86k|                     return;
 1913|  15.2k|               }
 1914|    322|               else [[unlikely]] {
 1915|    322|                  if constexpr (Opts.error_on_unknown_keys) {
 1916|    322|                     ctx.error = error_code::unknown_key;
 1917|    322|                     return;
 1918|       |                  }
 1919|       |                  else {
 1920|       |                     it += key_len;
 1921|       |                     skip_value<CBOR>::op<Opts>(ctx, it, end);
 1922|       |                     if (bool(ctx.error)) [[unlikely]]
 1923|       |                        return;
 1924|       |                  }
 1925|    322|               }
 1926|       |            }
 1927|       |            else if constexpr (Opts.error_on_unknown_keys) {
 1928|       |               ctx.error = error_code::unknown_key;
 1929|       |               return;
 1930|       |            }
 1931|       |            else {
 1932|       |               it += key_len;
 1933|       |               skip_value<CBOR>::op<Opts>(ctx, it, end);
 1934|       |               if (bool(ctx.error)) [[unlikely]]
 1935|       |                  return;
 1936|       |            }
 1937|  15.6k|         }
 1938|  6.11k|      }
_ZN3glz11cbor_detail10decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   29|   171k|      {
   30|   171k|         using namespace cbor;
   31|       |
   32|   171k|         if (additional_info < 24) {
  ------------------
  |  Branch (32:14): [True: 34.4k, False: 136k]
  ------------------
   33|  34.4k|            return additional_info;
   34|  34.4k|         }
   35|       |
   36|   136k|         switch (additional_info) {
   37|   126k|         case info::uint8_follows: {
  ------------------
  |  Branch (37:10): [True: 126k, False: 10.4k]
  ------------------
   38|   126k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (38:17): [True: 34, False: 126k]
  ------------------
   39|     34|               ctx.error = error_code::unexpected_end;
   40|     34|               return 0;
   41|     34|            }
   42|   126k|            uint8_t val;
   43|   126k|            std::memcpy(&val, it, 1);
   44|   126k|            ++it;
   45|   126k|            return val;
   46|   126k|         }
   47|  3.31k|         case info::uint16_follows: {
  ------------------
  |  Branch (47:10): [True: 3.31k, False: 133k]
  ------------------
   48|  3.31k|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (48:17): [True: 64, False: 3.24k]
  ------------------
   49|     64|               ctx.error = error_code::unexpected_end;
   50|     64|               return 0;
   51|     64|            }
   52|  3.24k|            uint16_t val;
   53|  3.24k|            std::memcpy(&val, it, 2);
   54|  3.24k|            if constexpr (std::endian::native == std::endian::little) {
   55|  3.24k|               val = std::byteswap(val);
   56|  3.24k|            }
   57|  3.24k|            it += 2;
   58|  3.24k|            return val;
   59|  3.31k|         }
   60|  3.64k|         case info::uint32_follows: {
  ------------------
  |  Branch (60:10): [True: 3.64k, False: 133k]
  ------------------
   61|  3.64k|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (61:17): [True: 165, False: 3.47k]
  ------------------
   62|    165|               ctx.error = error_code::unexpected_end;
   63|    165|               return 0;
   64|    165|            }
   65|  3.47k|            uint32_t val;
   66|  3.47k|            std::memcpy(&val, it, 4);
   67|  3.47k|            if constexpr (std::endian::native == std::endian::little) {
   68|  3.47k|               val = std::byteswap(val);
   69|  3.47k|            }
   70|  3.47k|            it += 4;
   71|  3.47k|            return val;
   72|  3.64k|         }
   73|  3.44k|         case info::uint64_follows: {
  ------------------
  |  Branch (73:10): [True: 3.44k, False: 133k]
  ------------------
   74|  3.44k|            if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (74:17): [True: 472, False: 2.97k]
  ------------------
   75|    472|               ctx.error = error_code::unexpected_end;
   76|    472|               return 0;
   77|    472|            }
   78|  2.97k|            uint64_t val;
   79|  2.97k|            std::memcpy(&val, it, 8);
   80|  2.97k|            if constexpr (std::endian::native == std::endian::little) {
   81|  2.97k|               val = std::byteswap(val);
   82|  2.97k|            }
   83|  2.97k|            it += 8;
   84|  2.97k|            return val;
   85|  3.44k|         }
   86|     93|         default:
  ------------------
  |  Branch (86:10): [True: 93, False: 136k]
  ------------------
   87|     93|            ctx.error = error_code::syntax_error;
   88|     93|            return 0;
   89|   136k|         }
   90|   136k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm0EEEDav:
 1886|  5.71k|                     [&]<size_t I>() {
 1887|  5.71k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1888|  5.71k|                        static constexpr auto Length = TargetKey.size();
 1889|  5.71k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1889:29): [True: 5.71k, False: 4]
  |  Branch (1889:52): [True: 5.71k, False: 0]
  ------------------
 1890|  5.71k|                           if constexpr (reflectable<T>) {
 1891|  5.71k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1892|       |                           }
 1893|       |                           else {
 1894|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1895|       |                           }
 1896|  5.71k|                        }
 1897|      4|                        else {
 1898|      4|                           if constexpr (Opts.error_on_unknown_keys) {
 1899|      4|                              ctx.error = error_code::unknown_key;
 1900|      4|                              return;
 1901|       |                           }
 1902|       |                           else {
 1903|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1904|       |                              if (bool(ctx.error)) [[unlikely]]
 1905|       |                                 return;
 1906|       |                           }
 1907|      4|                        }
 1908|  5.71k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERiTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  5.71k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  5.71k|         else {
  138|  5.71k|            using V = std::remove_cvref_t<T>;
  139|  5.71k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  5.71k|                                             end);
  141|  5.71k|         }
  142|  5.71k|      }
_ZN3glz4fromILj2EiE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEiTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  388|  5.71k|      {
  389|  5.71k|         using namespace cbor;
  390|       |
  391|  5.71k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (391:14): [True: 8, False: 5.70k]
  ------------------
  392|      8|            ctx.error = error_code::unexpected_end;
  393|      8|            return;
  394|      8|         }
  395|       |
  396|  5.70k|         uint8_t initial;
  397|  5.70k|         std::memcpy(&initial, it, 1);
  398|  5.70k|         ++it;
  399|       |
  400|  5.70k|         const uint8_t major_type = get_major_type(initial);
  401|  5.70k|         const uint8_t additional_info = get_additional_info(initial);
  402|       |
  403|  5.70k|         if (major_type == major::uint) {
  ------------------
  |  Branch (403:14): [True: 2.26k, False: 3.44k]
  ------------------
  404|  2.26k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  405|  2.26k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (405:17): [True: 81, False: 2.18k]
  ------------------
  406|     81|               return;
  407|       |
  408|       |            // Range check: n must fit in T's positive range
  409|  2.18k|            constexpr auto max_val = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  410|  2.18k|            if (n > max_val) [[unlikely]] {
  ------------------
  |  Branch (410:17): [True: 72, False: 2.10k]
  ------------------
  411|     72|               ctx.error = error_code::parse_number_failure;
  412|     72|               return;
  413|     72|            }
  414|  2.10k|            value = static_cast<T>(n);
  415|  2.10k|         }
  416|  3.44k|         else if (major_type == major::nint) {
  ------------------
  |  Branch (416:19): [True: 3.40k, False: 34]
  ------------------
  417|  3.40k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  418|  3.40k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (418:17): [True: 87, False: 3.31k]
  ------------------
  419|     87|               return;
  420|       |
  421|       |            // CBOR negative value = -1 - n
  422|       |            // For T's range [-2^(bits-1), 2^(bits-1)-1], max valid n = 2^(bits-1) - 1
  423|  3.31k|            constexpr auto max_n = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  424|       |
  425|  3.31k|            if (n > max_n) [[unlikely]] {
  ------------------
  |  Branch (425:17): [True: 99, False: 3.22k]
  ------------------
  426|     99|               ctx.error = error_code::parse_number_failure;
  427|     99|               return;
  428|     99|            }
  429|       |
  430|       |            // Safe computation using two's complement identity:
  431|       |            // ~n = -1 - n (bitwise NOT)
  432|  3.22k|            value = static_cast<T>(~n);
  433|  3.22k|         }
  434|     34|         else [[unlikely]] {
  435|     34|            ctx.error = error_code::syntax_error;
  436|     34|         }
  437|  5.70k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm1EEEDav:
 1886|  1.60k|                     [&]<size_t I>() {
 1887|  1.60k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1888|  1.60k|                        static constexpr auto Length = TargetKey.size();
 1889|  1.60k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1889:29): [True: 1.60k, False: 4]
  |  Branch (1889:52): [True: 1.60k, False: 0]
  ------------------
 1890|  1.60k|                           if constexpr (reflectable<T>) {
 1891|  1.60k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1892|       |                           }
 1893|       |                           else {
 1894|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1895|       |                           }
 1896|  1.60k|                        }
 1897|      4|                        else {
 1898|      4|                           if constexpr (Opts.error_on_unknown_keys) {
 1899|      4|                              ctx.error = error_code::unknown_key;
 1900|      4|                              return;
 1901|       |                           }
 1902|       |                           else {
 1903|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1904|       |                              if (bool(ctx.error)) [[unlikely]]
 1905|       |                                 return;
 1906|       |                           }
 1907|      4|                        }
 1908|  1.60k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERdTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  1.60k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  1.60k|         else {
  138|  1.60k|            using V = std::remove_cvref_t<T>;
  139|  1.60k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  1.60k|                                             end);
  141|  1.60k|         }
  142|  1.60k|      }
_ZN3glz4fromILj2EdE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEdTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  446|  1.60k|      {
  447|  1.60k|         using namespace cbor;
  448|       |
  449|  1.60k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (449:14): [True: 7, False: 1.59k]
  ------------------
  450|      7|            ctx.error = error_code::unexpected_end;
  451|      7|            return;
  452|      7|         }
  453|       |
  454|  1.59k|         uint8_t initial;
  455|  1.59k|         std::memcpy(&initial, it, 1);
  456|  1.59k|         ++it;
  457|       |
  458|  1.59k|         const uint8_t major_type = get_major_type(initial);
  459|  1.59k|         const uint8_t additional_info = get_additional_info(initial);
  460|       |
  461|  1.59k|         if (major_type != major::simple) [[unlikely]] {
  ------------------
  |  Branch (461:14): [True: 35, False: 1.56k]
  ------------------
  462|     35|            ctx.error = error_code::syntax_error;
  463|     35|            return;
  464|     35|         }
  465|       |
  466|  1.56k|         switch (additional_info) {
  467|    884|         case simple::float16: {
  ------------------
  |  Branch (467:10): [True: 884, False: 676]
  ------------------
  468|    884|            if ((end - it) < 2) [[unlikely]] {
  ------------------
  |  Branch (468:17): [True: 19, False: 865]
  ------------------
  469|     19|               ctx.error = error_code::unexpected_end;
  470|     19|               return;
  471|     19|            }
  472|    865|            uint16_t half;
  473|    865|            std::memcpy(&half, it, 2);
  474|    865|            if constexpr (std::endian::native == std::endian::little) {
  475|    865|               half = std::byteswap(half);
  476|    865|            }
  477|    865|            it += 2;
  478|    865|            value = static_cast<T>(decode_half(half));
  479|    865|            break;
  480|    884|         }
  481|    278|         case simple::float32: {
  ------------------
  |  Branch (481:10): [True: 278, False: 1.28k]
  ------------------
  482|    278|            if ((end - it) < 4) [[unlikely]] {
  ------------------
  |  Branch (482:17): [True: 6, False: 272]
  ------------------
  483|      6|               ctx.error = error_code::unexpected_end;
  484|      6|               return;
  485|      6|            }
  486|    272|            uint32_t bits;
  487|    272|            std::memcpy(&bits, it, 4);
  488|    272|            if constexpr (std::endian::native == std::endian::little) {
  489|    272|               bits = std::byteswap(bits);
  490|    272|            }
  491|    272|            float f;
  492|    272|            std::memcpy(&f, &bits, 4);
  493|    272|            it += 4;
  494|    272|            value = static_cast<T>(f);
  495|    272|            break;
  496|    278|         }
  497|    390|         case simple::float64: {
  ------------------
  |  Branch (497:10): [True: 390, False: 1.17k]
  ------------------
  498|    390|            if ((end - it) < 8) [[unlikely]] {
  ------------------
  |  Branch (498:17): [True: 10, False: 380]
  ------------------
  499|     10|               ctx.error = error_code::unexpected_end;
  500|     10|               return;
  501|     10|            }
  502|    380|            uint64_t bits;
  503|    380|            std::memcpy(&bits, it, 8);
  504|    380|            if constexpr (std::endian::native == std::endian::little) {
  505|    380|               bits = std::byteswap(bits);
  506|    380|            }
  507|    380|            double d;
  508|    380|            std::memcpy(&d, &bits, 8);
  509|    380|            it += 8;
  510|    380|            value = static_cast<T>(d);
  511|    380|            break;
  512|    390|         }
  513|      8|         default:
  ------------------
  |  Branch (513:10): [True: 8, False: 1.55k]
  ------------------
  514|      8|            ctx.error = error_code::syntax_error;
  515|  1.56k|         }
  516|  1.56k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm2EEEDav:
 1886|  3.42k|                     [&]<size_t I>() {
 1887|  3.42k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1888|  3.42k|                        static constexpr auto Length = TargetKey.size();
 1889|  3.42k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1889:29): [True: 3.41k, False: 5]
  |  Branch (1889:52): [True: 3.33k, False: 86]
  ------------------
 1890|  3.33k|                           if constexpr (reflectable<T>) {
 1891|  3.33k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1892|       |                           }
 1893|       |                           else {
 1894|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1895|       |                           }
 1896|  3.33k|                        }
 1897|     91|                        else {
 1898|     91|                           if constexpr (Opts.error_on_unknown_keys) {
 1899|     91|                              ctx.error = error_code::unknown_key;
 1900|     91|                              return;
 1901|       |                           }
 1902|       |                           else {
 1903|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1904|       |                              if (bool(ctx.error)) [[unlikely]]
 1905|       |                                 return;
 1906|       |                           }
 1907|     91|                        }
 1908|  3.42k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEETkNS_10is_contextERNS_7contextERPKcSF_EEvOT0_OT1_OT2_T3_:
  128|  3.33k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  3.33k|         else {
  138|  3.33k|            using V = std::remove_cvref_t<T>;
  139|  3.33k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  3.33k|                                             end);
  141|  3.33k|         }
  142|  3.33k|      }
_ZN3glz4fromILj2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES7_TkNS_10is_contextENS_7contextEPKcSD_EEvRT0_RT1_RT2_T3_:
  525|  3.33k|      {
  526|  3.33k|         using namespace cbor;
  527|       |
  528|  3.33k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (528:14): [True: 5, False: 3.32k]
  ------------------
  529|      5|            ctx.error = error_code::unexpected_end;
  530|      5|            return;
  531|      5|         }
  532|       |
  533|  3.32k|         uint8_t initial;
  534|  3.32k|         std::memcpy(&initial, it, 1);
  535|  3.32k|         ++it;
  536|       |
  537|  3.32k|         const uint8_t major_type = get_major_type(initial);
  538|  3.32k|         const uint8_t additional_info = get_additional_info(initial);
  539|       |
  540|  3.32k|         if (major_type != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (540:14): [True: 9, False: 3.31k]
  ------------------
  541|      9|            ctx.error = error_code::syntax_error;
  542|      9|            return;
  543|      9|         }
  544|       |
  545|  3.31k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (545:14): [True: 1.41k, False: 1.90k]
  ------------------
  546|       |            // Indefinite-length text string
  547|       |            if constexpr (string_view_t<T>) {
  548|       |               // Cannot read indefinite string into string_view
  549|       |               ctx.error = error_code::syntax_error;
  550|       |               return;
  551|       |            }
  552|  1.41k|            else {
  553|  1.41k|               if constexpr (resizable<T>) {
  554|  1.41k|                  value.clear();
  555|  1.41k|               }
  556|  1.41k|               size_t offset = 0; // fill position for fixed-size targets
  557|   135k|               while (true) {
  ------------------
  |  Branch (557:23): [True: 135k, Folded]
  ------------------
  558|   135k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (558:23): [True: 92, False: 135k]
  ------------------
  559|     92|                     ctx.error = error_code::unexpected_end;
  560|     92|                     return;
  561|     92|                  }
  562|       |
  563|   135k|                  uint8_t chunk_initial;
  564|   135k|                  std::memcpy(&chunk_initial, it, 1);
  565|       |
  566|       |                  // Check for break code
  567|   135k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (567:23): [True: 784, False: 135k]
  ------------------
  568|    784|                     ++it;
  569|    784|                     break;
  570|    784|                  }
  571|       |
  572|   135k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  573|   135k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  574|       |
  575|       |                  // Chunks must be text strings with definite length
  576|   135k|                  if (chunk_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (576:23): [True: 169, False: 134k]
  ------------------
  577|    169|                     ctx.error = error_code::syntax_error;
  578|    169|                     return;
  579|    169|                  }
  580|   134k|                  if (chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (580:23): [True: 2, False: 134k]
  ------------------
  581|      2|                     ctx.error = error_code::syntax_error;
  582|      2|                     return;
  583|      2|                  }
  584|       |
  585|   134k|                  ++it;
  586|   134k|                  uint64_t chunk_len = cbor_detail::decode_arg(ctx, it, end, chunk_info);
  587|   134k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (587:23): [True: 94, False: 134k]
  ------------------
  588|     94|                     return;
  589|       |
  590|   134k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (590:23): [True: 271, False: 134k]
  ------------------
  591|    271|                     ctx.error = error_code::unexpected_end;
  592|    271|                     return;
  593|    271|                  }
  594|       |
  595|       |                  if constexpr (array_char_t<T>) {
  596|       |                     // Fixed-size std::array<char, N>: accumulate with bounds checking.
  597|       |                     if (offset + chunk_len > value.size()) [[unlikely]] {
  598|       |                        ctx.error = error_code::syntax_error;
  599|       |                        return;
  600|       |                     }
  601|       |                     std::memcpy(value.data() + offset, it, chunk_len);
  602|       |                     offset += static_cast<size_t>(chunk_len);
  603|       |                  }
  604|   134k|                  else {
  605|   134k|                     value.append(reinterpret_cast<const char*>(it), chunk_len);
  606|   134k|                  }
  607|   134k|                  it += chunk_len;
  608|   134k|               }
  609|       |               if constexpr (array_char_t<T>) {
  610|       |                  // Zero-fill any unused tail of the fixed-size buffer.
  611|       |                  if (offset < value.size()) {
  612|       |                     std::memset(value.data() + offset, 0, value.size() - offset);
  613|       |                  }
  614|       |               }
  615|    784|            }
  616|  1.41k|         }
  617|  1.90k|         else {
  618|       |            // Definite-length text string
  619|  1.90k|            uint64_t length = cbor_detail::decode_arg(ctx, it, end, additional_info);
  620|  1.90k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (620:17): [True: 87, False: 1.81k]
  ------------------
  621|     87|               return;
  622|       |
  623|  1.81k|            if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (623:17): [True: 216, False: 1.60k]
  ------------------
  624|    216|               ctx.error = error_code::unexpected_end;
  625|    216|               return;
  626|    216|            }
  627|       |
  628|       |            // Check user-configured string length limit
  629|       |            if constexpr (check_max_string_length(Opts) > 0) {
  630|       |               if (length > check_max_string_length(Opts)) [[unlikely]] {
  631|       |                  ctx.error = error_code::invalid_length;
  632|       |                  return;
  633|       |               }
  634|       |            }
  635|       |            if constexpr (has_runtime_max_string_length<std::decay_t<decltype(ctx)>>) {
  636|       |               if (ctx.max_string_length > 0 && length > ctx.max_string_length) [[unlikely]] {
  637|       |                  ctx.error = error_code::invalid_length;
  638|       |                  return;
  639|       |               }
  640|       |            }
  641|       |
  642|       |            if constexpr (string_view_t<T>) {
  643|       |               value = {reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  644|       |            }
  645|       |            else if constexpr (array_char_t<T>) {
  646|       |               // Fixed-size std::array<char, N>: bounds-check, copy, zero-fill remainder.
  647|       |               if (length > value.size()) [[unlikely]] {
  648|       |                  ctx.error = error_code::syntax_error;
  649|       |                  return;
  650|       |               }
  651|       |               std::memcpy(value.data(), it, length);
  652|       |               if (length < value.size()) {
  653|       |                  std::memset(value.data() + static_cast<size_t>(length), 0,
  654|       |                              value.size() - static_cast<size_t>(length));
  655|       |               }
  656|       |            }
  657|  1.60k|            else {
  658|  1.60k|               value.assign(reinterpret_cast<const char*>(it), length);
  659|  1.60k|            }
  660|  1.60k|            it += length;
  661|  1.60k|         }
  662|  3.31k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm3EEEDav:
 1886|  4.55k|                     [&]<size_t I>() {
 1887|  4.55k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1888|  4.55k|                        static constexpr auto Length = TargetKey.size();
 1889|  4.55k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1889:29): [True: 4.53k, False: 13]
  |  Branch (1889:52): [True: 4.47k, False: 61]
  ------------------
 1890|  4.47k|                           if constexpr (reflectable<T>) {
 1891|  4.47k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1892|       |                           }
 1893|       |                           else {
 1894|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1895|       |                           }
 1896|  4.47k|                        }
 1897|     74|                        else {
 1898|     74|                           if constexpr (Opts.error_on_unknown_keys) {
 1899|     74|                              ctx.error = error_code::unknown_key;
 1900|     74|                              return;
 1901|       |                           }
 1902|       |                           else {
 1903|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1904|       |                              if (bool(ctx.error)) [[unlikely]]
 1905|       |                                 return;
 1906|       |                           }
 1907|     74|                        }
 1908|  4.55k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERNSt3__15arrayImLm3EEETkNS_10is_contextERNS_7contextERPKcSB_EEvOT0_OT1_OT2_T3_:
  128|  4.47k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  4.47k|         else {
  138|  4.47k|            using V = std::remove_cvref_t<T>;
  139|  4.47k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  4.47k|                                             end);
  141|  4.47k|         }
  142|  4.47k|      }
_ZN3glz4fromILj2ENSt3__15arrayImLm3EEEE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES3_TkNS_10is_contextENS_7contextEPKcS9_EEvRT0_RT1_RT2_T3_:
 1054|  4.47k|      {
 1055|  4.47k|         using namespace cbor;
 1056|  4.47k|         using V = range_value_t<std::remove_cvref_t<T>>;
 1057|       |
 1058|       |         // Set-like containers (std::set, std::unordered_set, ...) can neither be resized nor
 1059|       |         // back-inserted into: each element is parsed into a temporary and then emplaced.
 1060|  4.47k|         constexpr bool set_like = !resizable<T> && !emplace_backable<T> && emplaceable<T>;
  ------------------
  |  Branch (1060:36): [True: 0, Folded]
  |  Branch (1060:53): [True: 0, Folded]
  |  Branch (1060:77): [Folded, False: 0]
  ------------------
 1061|       |         // Everything else either has a fixed size the input must fit, or grows to match the input.
 1062|       |         // The definite- and indefinite-length branches below must agree on which is which, or the
 1063|       |         // same container would accept one framing of an array and reject the other.
 1064|  4.47k|         constexpr bool growable = resizable<T> || emplace_backable<T> || set_like;
  ------------------
  |  Branch (1064:36): [Folded, False: 0]
  |  Branch (1064:52): [Folded, False: 0]
  |  Branch (1064:75): [Folded, False: 0]
  ------------------
 1065|       |
 1066|  4.47k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1066:14): [True: 3, False: 4.47k]
  ------------------
 1067|      3|            ctx.error = error_code::unexpected_end;
 1068|      3|            return;
 1069|      3|         }
 1070|       |
 1071|  4.47k|         uint8_t initial;
 1072|  4.47k|         std::memcpy(&initial, it, 1);
 1073|       |
 1074|  4.47k|         const uint8_t major_type = get_major_type(initial);
 1075|  4.47k|         const uint8_t additional_info = get_additional_info(initial);
 1076|       |
 1077|       |         // A byte-like range also accepts a CBOR byte string, which is what the contiguous byte
 1078|       |         // ranges write for the same bytes.
 1079|       |         if constexpr (byte_like<V>) {
 1080|       |            if (major_type == major::bstr) {
 1081|       |               ++it; // consume the initial byte
 1082|       |
 1083|       |               depth_guard guard{ctx};
 1084|       |               if (!guard) [[unlikely]] {
 1085|       |                  return;
 1086|       |               }
 1087|       |
 1088|       |               if constexpr (growable) {
 1089|       |                  value.clear();
 1090|       |               }
 1091|       |
 1092|       |               size_t filled = 0;
 1093|       |               // Only a target that cannot grow is filled in place; growing would invalidate this.
 1094|       |               [[maybe_unused]] decltype(value.begin()) dest{};
 1095|       |               if constexpr (not growable) {
 1096|       |                  dest = value.begin();
 1097|       |               }
 1098|       |               read_byte_string<Opts>(ctx, it, end, additional_info, [&](const uint8_t byte) {
 1099|       |                  if (exceeds_capacity(value, filled + 1, ctx)) [[unlikely]] {
 1100|       |                     return false;
 1101|       |                  }
 1102|       |                  if constexpr (set_like) {
 1103|       |                     value.emplace(static_cast<V>(byte));
 1104|       |                  }
 1105|       |                  else if constexpr (emplace_backable<T>) {
 1106|       |                     value.emplace_back(static_cast<V>(byte));
 1107|       |                  }
 1108|       |                  else if constexpr (resizable<T>) {
 1109|       |                     value.resize(filled + 1);
 1110|       |                     auto slot = value.begin();
 1111|       |                     std::advance(slot, filled);
 1112|       |                     *slot = static_cast<V>(byte);
 1113|       |                  }
 1114|       |                  else {
 1115|       |                     if (filled >= value.size()) [[unlikely]] {
 1116|       |                        ctx.error = error_code::exceeded_static_array_size;
 1117|       |                        return false;
 1118|       |                     }
 1119|       |                     *dest = static_cast<V>(byte);
 1120|       |                     ++dest;
 1121|       |                  }
 1122|       |                  ++filled;
 1123|       |                  return true;
 1124|       |               });
 1125|       |
 1126|       |               if constexpr (!growable) {
 1127|       |                  // Zero-fill any unused tail, as the byte string reader does for std::array.
 1128|       |                  if (not bool(ctx.error)) {
 1129|       |                     for (; filled < value.size(); ++filled, ++dest) {
 1130|       |                        *dest = V{};
 1131|       |                     }
 1132|       |                  }
 1133|       |               }
 1134|       |               return;
 1135|       |            }
 1136|       |         }
 1137|       |
 1138|       |         // Check for RFC 8746 typed array (tag + byte string)
 1139|  4.47k|         if constexpr (num_t<V> && !std::same_as<V, bool>) {
 1140|  4.47k|            if (major_type == major::tag) {
  ------------------
  |  Branch (1140:17): [True: 1.48k, False: 2.99k]
  ------------------
 1141|  1.48k|               ++it; // consume the tag initial byte
 1142|       |
 1143|       |               // Decode the tag number
 1144|  1.48k|               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1145|  1.48k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1145:20): [True: 18, False: 1.46k]
  ------------------
 1146|     18|                  return;
 1147|       |
 1148|       |               // Verify the tag describes exactly this element type, not merely one of its width
 1149|  1.46k|               if (typed_array::matches<V>(typed_array::get_info(tag_num))) {
  ------------------
  |  Branch (1149:20): [True: 1.35k, False: 108]
  ------------------
 1150|       |                  // Read the byte string
 1151|  1.35k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1151:23): [True: 3, False: 1.35k]
  ------------------
 1152|      3|                     ctx.error = error_code::unexpected_end;
 1153|      3|                     return;
 1154|      3|                  }
 1155|       |
 1156|  1.35k|                  uint8_t bstr_initial;
 1157|  1.35k|                  std::memcpy(&bstr_initial, it, 1);
 1158|  1.35k|                  ++it;
 1159|       |
 1160|  1.35k|                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (1160:23): [True: 5, False: 1.34k]
  ------------------
 1161|      5|                     ctx.error = error_code::syntax_error;
 1162|      5|                     return;
 1163|      5|                  }
 1164|       |
 1165|  1.34k|                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
 1166|  1.34k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1166:23): [True: 98, False: 1.25k]
  ------------------
 1167|     98|                     return;
 1168|       |
 1169|  1.25k|                  if (byte_len % sizeof(V) != 0) [[unlikely]] {
  ------------------
  |  Branch (1169:23): [True: 56, False: 1.19k]
  ------------------
 1170|     56|                     ctx.error = error_code::syntax_error;
 1171|     56|                     return;
 1172|     56|                  }
 1173|       |
 1174|  1.19k|                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (1174:23): [True: 169, False: 1.02k]
  ------------------
 1175|    169|                     ctx.error = error_code::unexpected_end;
 1176|    169|                     return;
 1177|    169|                  }
 1178|       |
 1179|  1.02k|                  const size_t count = byte_len / sizeof(V);
 1180|       |
 1181|       |                  // Check user-configured array size limit
 1182|       |                  if constexpr (check_max_array_size(Opts) > 0) {
 1183|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
 1184|       |                        ctx.error = error_code::invalid_length;
 1185|       |                        return;
 1186|       |                     }
 1187|       |                  }
 1188|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1189|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1190|       |                        ctx.error = error_code::invalid_length;
 1191|       |                        return;
 1192|       |                     }
 1193|       |                  }
 1194|       |
 1195|       |                  if constexpr (set_like) {
 1196|       |                     value.clear();
 1197|       |                  }
 1198|       |                  else if constexpr (resizable<T>) {
 1199|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1200|       |                        return;
 1201|       |                     }
 1202|       |                     value.resize(count);
 1203|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1204|       |                        value.shrink_to_fit();
 1205|       |                     }
 1206|       |                  }
 1207|       |                  else if constexpr (emplace_backable<T>) {
 1208|       |                     // Append-only: the count is known, but the only way to reach it is one element at
 1209|       |                     // a time. Growing to count here rather than while filling leaves both fill paths
 1210|       |                     // below writing into storage that already exists.
 1211|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1212|       |                        return;
 1213|       |                     }
 1214|       |                     value.clear();
 1215|       |                     for (size_t i = 0; i < count; ++i) {
 1216|       |                        value.emplace_back();
 1217|       |                     }
 1218|       |                  }
 1219|  1.02k|                  else {
 1220|  1.02k|                     if (count != value.size()) [[unlikely]] {
  ------------------
  |  Branch (1220:26): [True: 65, False: 960]
  ------------------
 1221|     65|                        ctx.error = error_code::exceeded_static_array_size;
 1222|     65|                        return;
 1223|     65|                     }
 1224|  1.02k|                  }
 1225|       |
 1226|       |                  // Check if we need to byteswap
 1227|    960|                  const bool need_swap = typed_array::needs_byteswap(tag_num);
 1228|       |
 1229|  1.02k|                  if constexpr (contiguous<T>) {
 1230|  1.02k|                     if (need_swap && sizeof(V) > 1) {
  ------------------
  |  Branch (1230:26): [True: 780, False: 245]
  |  Branch (1230:39): [True: 0, Folded]
  ------------------
 1231|       |                        // Need to byteswap each element. Written through data() rather than a
 1232|       |                        // subscript: contiguous storage is what this branch relies on, and a
 1233|       |                        // contiguous range need not also be indexable.
 1234|    780|                        auto* dest = value.data();
 1235|  3.12k|                        for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (1235:44): [True: 2.34k, False: 780]
  ------------------
 1236|  2.34k|                           V elem;
 1237|  2.34k|                           std::memcpy(&elem, it, sizeof(V));
 1238|  2.34k|                           cbor_detail::byteswap_element(elem);
 1239|  2.34k|                           dest[i] = elem;
 1240|  2.34k|                           it += sizeof(V);
 1241|  2.34k|                        }
 1242|    780|                     }
 1243|    245|                     else {
 1244|       |                        // Native endianness or single-byte: bulk read
 1245|    245|                        if (byte_len > 0) {
  ------------------
  |  Branch (1245:29): [True: 180, False: 65]
  ------------------
 1246|    180|                           std::memcpy(value.data(), it, byte_len);
 1247|    180|                           it += byte_len;
 1248|    180|                        }
 1249|    245|                     }
 1250|       |                  }
 1251|       |                  else {
 1252|       |                     // std::list, std::set and friends have no contiguous storage to bulk read into,
 1253|       |                     // so each element is decoded on its own.
 1254|       |                     const bool swap_each = need_swap && sizeof(V) > 1;
 1255|       |                     const auto next_element = [&] {
 1256|       |                        V elem;
 1257|       |                        std::memcpy(&elem, it, sizeof(V));
 1258|       |                        if (swap_each) {
 1259|       |                           cbor_detail::byteswap_element(elem);
 1260|       |                        }
 1261|       |                        it += sizeof(V);
 1262|       |                        return elem;
 1263|       |                     };
 1264|       |
 1265|       |                     if constexpr (set_like) {
 1266|       |                        for (size_t i = 0; i < count; ++i) {
 1267|       |                           value.emplace(next_element());
 1268|       |                        }
 1269|       |                     }
 1270|       |                     else {
 1271|       |                        auto dest = value.begin();
 1272|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
 1273|       |                           *dest = next_element();
 1274|       |                        }
 1275|       |                     }
 1276|       |                  }
 1277|  1.02k|                  return; // Done with typed array
 1278|  1.19k|               }
 1279|    108|               else {
 1280|       |                  // Not a matching typed array tag - error
 1281|    108|                  ctx.error = error_code::syntax_error;
 1282|    108|                  return;
 1283|    108|               }
 1284|  1.46k|            }
 1285|  4.47k|         }
 1286|       |
 1287|       |         // Check for complex array (tag 43001 with nested typed array)
 1288|       |         if constexpr (complex_t<V>) {
 1289|       |            if (major_type == major::tag) {
 1290|       |               ++it; // consume the tag initial byte
 1291|       |
 1292|       |               // Decode the tag number
 1293|       |               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1294|       |               if (bool(ctx.error)) [[unlikely]]
 1295|       |                  return;
 1296|       |
 1297|       |               // Check for tag 43001 (complex array)
 1298|       |               if (tag_num == semantic_tag::complex_array) {
 1299|       |                  using Scalar = typename V::value_type;
 1300|       |
 1301|       |                  // Read nested typed array tag
 1302|       |                  if (it >= end) [[unlikely]] {
 1303|       |                     ctx.error = error_code::unexpected_end;
 1304|       |                     return;
 1305|       |                  }
 1306|       |
 1307|       |                  uint8_t ta_initial;
 1308|       |                  std::memcpy(&ta_initial, it, 1);
 1309|       |                  ++it;
 1310|       |
 1311|       |                  if (get_major_type(ta_initial) != major::tag) [[unlikely]] {
 1312|       |                     ctx.error = error_code::syntax_error;
 1313|       |                     return;
 1314|       |                  }
 1315|       |
 1316|       |                  const uint64_t scalar_tag = cbor_detail::decode_arg(ctx, it, end, get_additional_info(ta_initial));
 1317|       |                  if (bool(ctx.error)) [[unlikely]]
 1318|       |                     return;
 1319|       |
 1320|       |                  // Verify the tag describes exactly this scalar type, not merely one of its width
 1321|       |                  if (!typed_array::matches<Scalar>(typed_array::get_info(scalar_tag))) [[unlikely]] {
 1322|       |                     ctx.error = error_code::syntax_error;
 1323|       |                     return;
 1324|       |                  }
 1325|       |
 1326|       |                  // Read the byte string
 1327|       |                  if (it >= end) [[unlikely]] {
 1328|       |                     ctx.error = error_code::unexpected_end;
 1329|       |                     return;
 1330|       |                  }
 1331|       |
 1332|       |                  uint8_t bstr_initial;
 1333|       |                  std::memcpy(&bstr_initial, it, 1);
 1334|       |                  ++it;
 1335|       |
 1336|       |                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
 1337|       |                     ctx.error = error_code::syntax_error;
 1338|       |                     return;
 1339|       |                  }
 1340|       |
 1341|       |                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
 1342|       |                  if (bool(ctx.error)) [[unlikely]]
 1343|       |                     return;
 1344|       |
 1345|       |                  // Each complex has 2 scalars
 1346|       |                  constexpr size_t complex_byte_size = sizeof(V); // sizeof(complex<T>) = 2 * sizeof(T)
 1347|       |                  if (byte_len % complex_byte_size != 0) [[unlikely]] {
 1348|       |                     ctx.error = error_code::syntax_error;
 1349|       |                     return;
 1350|       |                  }
 1351|       |
 1352|       |                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
 1353|       |                     ctx.error = error_code::unexpected_end;
 1354|       |                     return;
 1355|       |                  }
 1356|       |
 1357|       |                  const size_t count = byte_len / complex_byte_size;
 1358|       |
 1359|       |                  // Check user-configured array size limit
 1360|       |                  if constexpr (check_max_array_size(Opts) > 0) {
 1361|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
 1362|       |                        ctx.error = error_code::invalid_length;
 1363|       |                        return;
 1364|       |                     }
 1365|       |                  }
 1366|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1367|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1368|       |                        ctx.error = error_code::invalid_length;
 1369|       |                        return;
 1370|       |                     }
 1371|       |                  }
 1372|       |
 1373|       |                  if constexpr (set_like) {
 1374|       |                     value.clear();
 1375|       |                  }
 1376|       |                  else if constexpr (resizable<T>) {
 1377|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1378|       |                        return;
 1379|       |                     }
 1380|       |                     value.resize(count);
 1381|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1382|       |                        value.shrink_to_fit();
 1383|       |                     }
 1384|       |                  }
 1385|       |                  else if constexpr (emplace_backable<T>) {
 1386|       |                     // Append-only, as above: grow to the known count so the fill paths below only
 1387|       |                     // have to write into elements that already exist.
 1388|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1389|       |                        return;
 1390|       |                     }
 1391|       |                     value.clear();
 1392|       |                     for (size_t i = 0; i < count; ++i) {
 1393|       |                        value.emplace_back();
 1394|       |                     }
 1395|       |                  }
 1396|       |                  else {
 1397|       |                     if (count != value.size()) [[unlikely]] {
 1398|       |                        ctx.error = error_code::exceeded_static_array_size;
 1399|       |                        return;
 1400|       |                     }
 1401|       |                  }
 1402|       |
 1403|       |                  // Check if we need to byteswap
 1404|       |                  const bool need_swap = typed_array::needs_byteswap(scalar_tag);
 1405|       |
 1406|       |                  if constexpr (contiguous<T>) {
 1407|       |                     if (need_swap && sizeof(Scalar) > 1) {
 1408|       |                        // Need to byteswap each scalar in the interleaved data
 1409|       |                        auto* dest = reinterpret_cast<Scalar*>(value.data());
 1410|       |                        const size_t num_scalars = count * 2; // 2 scalars per complex
 1411|       |                        for (size_t i = 0; i < num_scalars; ++i) {
 1412|       |                           Scalar elem;
 1413|       |                           std::memcpy(&elem, it, sizeof(Scalar));
 1414|       |                           cbor_detail::byteswap_element(elem);
 1415|       |                           dest[i] = elem;
 1416|       |                           it += sizeof(Scalar);
 1417|       |                        }
 1418|       |                     }
 1419|       |                     else {
 1420|       |                        // Native endianness or single-byte: bulk read
 1421|       |                        if (byte_len > 0) {
 1422|       |                           std::memcpy(value.data(), it, byte_len);
 1423|       |                           it += byte_len;
 1424|       |                        }
 1425|       |                     }
 1426|       |                  }
 1427|       |                  else {
 1428|       |                     // No contiguous storage to bulk read into, so the interleaved [real, imag] pairs
 1429|       |                     // are reassembled one element at a time.
 1430|       |                     const bool swap_each = need_swap && sizeof(Scalar) > 1;
 1431|       |                     const auto next_element = [&] {
 1432|       |                        Scalar parts[2];
 1433|       |                        std::memcpy(parts, it, sizeof(V));
 1434|       |                        if (swap_each) {
 1435|       |                           cbor_detail::byteswap_element(parts[0]);
 1436|       |                           cbor_detail::byteswap_element(parts[1]);
 1437|       |                        }
 1438|       |                        it += sizeof(V);
 1439|       |                        return V{parts[0], parts[1]};
 1440|       |                     };
 1441|       |
 1442|       |                     if constexpr (set_like) {
 1443|       |                        for (size_t i = 0; i < count; ++i) {
 1444|       |                           value.emplace(next_element());
 1445|       |                        }
 1446|       |                     }
 1447|       |                     else {
 1448|       |                        auto dest = value.begin();
 1449|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
 1450|       |                           *dest = next_element();
 1451|       |                        }
 1452|       |                     }
 1453|       |                  }
 1454|       |                  return; // Done with complex array
 1455|       |               }
 1456|       |               else {
 1457|       |                  // Not a complex array tag - error
 1458|       |                  ctx.error = error_code::syntax_error;
 1459|       |                  return;
 1460|       |               }
 1461|       |            }
 1462|       |         }
 1463|       |
 1464|       |         // Regular CBOR array (major type 4)
 1465|  4.47k|         ++it; // consume the initial byte
 1466|       |
 1467|  4.47k|         if (major_type != major::array) [[unlikely]] {
  ------------------
  |  Branch (1467:14): [True: 17, False: 4.45k]
  ------------------
 1468|     17|            ctx.error = error_code::syntax_error;
 1469|     17|            return;
 1470|     17|         }
 1471|       |
 1472|       |         // The typed and complex array forms above are flat; only this branch descends into elements.
 1473|  4.45k|         depth_guard guard{ctx};
 1474|  4.45k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1474:14): [True: 0, False: 4.45k]
  ------------------
 1475|      0|            return;
 1476|      0|         }
 1477|       |
 1478|  4.45k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1478:14): [True: 804, False: 3.65k]
  ------------------
 1479|       |            // Indefinite-length array. The resizable-only path below grows with resize() from index
 1480|       |            // zero, which drops any prior contents on its own, so it needs no clear() of its own.
 1481|       |            if constexpr (emplace_backable<T> || set_like) {
 1482|       |               value.clear();
 1483|       |            }
 1484|       |            // A target that cannot grow is filled in place, and it is walked with an iterator rather
 1485|       |            // than a subscript because a non-resizable range need not be indexable. The growing cases
 1486|       |            // leave this default constructed: insertion would invalidate it.
 1487|    804|            [[maybe_unused]] decltype(value.begin()) dest{};
 1488|    804|            if constexpr (not growable) {
 1489|    804|               dest = value.begin();
 1490|    804|            }
 1491|    804|            size_t i = 0;
 1492|  2.10k|            while (true) {
  ------------------
  |  Branch (1492:20): [True: 2.08k, Folded]
  ------------------
 1493|  2.08k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1493:20): [True: 69, False: 2.01k]
  ------------------
 1494|     69|                  ctx.error = error_code::unexpected_end;
 1495|     69|                  return;
 1496|     69|               }
 1497|       |
 1498|  2.01k|               uint8_t peek;
 1499|  2.01k|               std::memcpy(&peek, it, 1);
 1500|       |
 1501|  2.01k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1501:20): [True: 564, False: 1.44k]
  ------------------
 1502|    564|                  ++it;
 1503|    564|                  break;
 1504|    564|               }
 1505|       |
 1506|       |               // A break code rather than a count ends this array, so the caller's element limit is
 1507|       |               // enforced as the array grows instead of up front.
 1508|       |               if constexpr (check_max_array_size(Opts) > 0) {
 1509|       |                  if (i >= check_max_array_size(Opts)) [[unlikely]] {
 1510|       |                     ctx.error = error_code::invalid_length;
 1511|       |                     return;
 1512|       |                  }
 1513|       |               }
 1514|       |               if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1515|       |                  if (ctx.max_array_size > 0 && i >= ctx.max_array_size) [[unlikely]] {
 1516|       |                     ctx.error = error_code::invalid_length;
 1517|       |                     return;
 1518|       |                  }
 1519|       |               }
 1520|       |
 1521|  1.44k|               if (exceeds_capacity(value, i + 1, ctx)) [[unlikely]] {
  ------------------
  |  Branch (1521:20): [True: 0, False: 1.44k]
  ------------------
 1522|      0|                  return;
 1523|      0|               }
 1524|       |
 1525|       |               if constexpr (emplace_backable<T>) {
 1526|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1527|       |               }
 1528|       |               else if constexpr (set_like) {
 1529|       |                  V element{};
 1530|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1531|       |                  if (bool(ctx.error)) [[unlikely]]
 1532|       |                     return;
 1533|       |                  value.emplace(std::move(element));
 1534|       |               }
 1535|       |               else if constexpr (resizable<T>) {
 1536|       |                  // Resizable but append-only through resize: grow by one and re-derive the write
 1537|       |                  // position, since growing may invalidate any iterator held across it.
 1538|       |                  value.resize(i + 1);
 1539|       |                  auto slot = value.begin();
 1540|       |                  std::advance(slot, i);
 1541|       |                  parse<CBOR>::op<Opts>(*slot, ctx, it, end);
 1542|       |               }
 1543|  1.44k|               else {
 1544|  1.44k|                  if (i >= value.size()) [[unlikely]] {
  ------------------
  |  Branch (1544:23): [True: 20, False: 1.42k]
  ------------------
 1545|     20|                     ctx.error = error_code::exceeded_static_array_size;
 1546|     20|                     return;
 1547|     20|                  }
 1548|  1.42k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1549|  1.42k|                  ++dest;
 1550|  1.42k|               }
 1551|      0|               ++i;
 1552|       |
 1553|  1.44k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1553:20): [True: 151, False: 1.29k]
  ------------------
 1554|    151|                  return;
 1555|  1.44k|            }
 1556|    804|         }
 1557|  3.65k|         else {
 1558|       |            // Definite-length array
 1559|  3.65k|            uint64_t count = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1560|  3.65k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1560:17): [True: 100, False: 3.55k]
  ------------------
 1561|    100|               return;
 1562|       |
 1563|       |            // Validate count against remaining buffer size (minimum 1 byte per element)
 1564|  3.55k|            if (count > static_cast<uint64_t>(end - it)) [[unlikely]] {
  ------------------
  |  Branch (1564:17): [True: 261, False: 3.29k]
  ------------------
 1565|    261|               ctx.error = error_code::unexpected_end;
 1566|    261|               return;
 1567|    261|            }
 1568|       |
 1569|       |            // Check user-configured array size limit
 1570|       |            if constexpr (check_max_array_size(Opts) > 0) {
 1571|       |               if (count > check_max_array_size(Opts)) [[unlikely]] {
 1572|       |                  ctx.error = error_code::invalid_length;
 1573|       |                  return;
 1574|       |               }
 1575|       |            }
 1576|       |            if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1577|       |               if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1578|       |                  ctx.error = error_code::invalid_length;
 1579|       |                  return;
 1580|       |               }
 1581|       |            }
 1582|       |
 1583|       |            if constexpr (set_like) {
 1584|       |               value.clear();
 1585|       |               for (size_t i = 0; i < count; ++i) {
 1586|       |                  V element{};
 1587|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1588|       |                  if (bool(ctx.error)) [[unlikely]]
 1589|       |                     return;
 1590|       |                  value.emplace(std::move(element));
 1591|       |               }
 1592|       |            }
 1593|       |            else if constexpr (emplace_backable<T> && !resizable<T>) {
 1594|       |               // Append-only: there is no way to size the target up front even though the count is known.
 1595|       |               if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1596|       |                  return;
 1597|       |               }
 1598|       |               value.clear();
 1599|       |               for (size_t i = 0; i < count; ++i) {
 1600|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1601|       |                  if (bool(ctx.error)) [[unlikely]]
 1602|       |                     return;
 1603|       |               }
 1604|       |            }
 1605|  3.29k|            else {
 1606|       |               if constexpr (resizable<T>) {
 1607|       |                  if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1608|       |                     return;
 1609|       |                  }
 1610|       |                  value.resize(static_cast<size_t>(count));
 1611|       |
 1612|       |                  if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1613|       |                     value.shrink_to_fit();
 1614|       |                  }
 1615|       |               }
 1616|  3.29k|               else {
 1617|  3.29k|                  if (count > value.size()) [[unlikely]] {
  ------------------
  |  Branch (1617:23): [True: 47, False: 3.24k]
  ------------------
 1618|     47|                     ctx.error = error_code::exceeded_static_array_size;
 1619|     47|                     return;
 1620|     47|                  }
 1621|  3.29k|               }
 1622|       |
 1623|       |               // Iteration rather than subscripting: std::list resizes but does not index.
 1624|  3.24k|               auto dest = value.begin();
 1625|  5.23k|               for (size_t i = 0; i < count; ++i, ++dest) {
  ------------------
  |  Branch (1625:35): [True: 2.03k, False: 3.20k]
  ------------------
 1626|  2.03k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1627|  2.03k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1627:23): [True: 86, False: 1.94k]
  ------------------
 1628|     86|                     return;
 1629|  2.03k|               }
 1630|  3.29k|            }
 1631|  3.29k|         }
 1632|  4.45k|      }
_ZN3glz11cbor_detail16byteswap_elementImEEvRT_:
  101|  2.34k|      {
  102|       |         if constexpr (sizeof(V) == 2) {
  103|       |            uint16_t bits;
  104|       |            std::memcpy(&bits, &elem, sizeof(V));
  105|       |            bits = std::byteswap(bits);
  106|       |            std::memcpy(&elem, &bits, sizeof(V));
  107|       |         }
  108|       |         else if constexpr (sizeof(V) == 4) {
  109|       |            uint32_t bits;
  110|       |            std::memcpy(&bits, &elem, sizeof(V));
  111|       |            bits = std::byteswap(bits);
  112|       |            std::memcpy(&elem, &bits, sizeof(V));
  113|       |         }
  114|  2.34k|         else if constexpr (sizeof(V) == 8) {
  115|  2.34k|            uint64_t bits;
  116|  2.34k|            std::memcpy(&bits, &elem, sizeof(V));
  117|  2.34k|            bits = std::byteswap(bits);
  118|  2.34k|            std::memcpy(&elem, &bits, sizeof(V));
  119|  2.34k|         }
  120|  2.34k|      }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERmTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  3.46k|      {
  129|       |         if constexpr (const_value_v<T>) {
  130|       |            if constexpr (check_error_on_const_read(Opts)) {
  131|       |               ctx.error = error_code::attempt_const_read;
  132|       |            }
  133|       |            else {
  134|       |               skip_value<CBOR>::op<Opts>(std::forward<Ctx>(ctx), std::forward<It0>(it), end);
  135|       |            }
  136|       |         }
  137|  3.46k|         else {
  138|  3.46k|            using V = std::remove_cvref_t<T>;
  139|  3.46k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  3.46k|                                             end);
  141|  3.46k|         }
  142|  3.46k|      }
_ZN3glz4fromILj2EmE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEmTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  345|  3.46k|      {
  346|  3.46k|         using namespace cbor;
  347|       |
  348|  3.46k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (348:14): [True: 35, False: 3.42k]
  ------------------
  349|     35|            ctx.error = error_code::unexpected_end;
  350|     35|            return;
  351|     35|         }
  352|       |
  353|  3.42k|         uint8_t initial;
  354|  3.42k|         std::memcpy(&initial, it, 1);
  355|  3.42k|         ++it;
  356|       |
  357|  3.42k|         const uint8_t major_type = get_major_type(initial);
  358|  3.42k|         const uint8_t additional_info = get_additional_info(initial);
  359|       |
  360|  3.42k|         if (major_type != major::uint) [[unlikely]] {
  ------------------
  |  Branch (360:14): [True: 159, False: 3.26k]
  ------------------
  361|    159|            ctx.error = error_code::syntax_error;
  362|    159|            return;
  363|    159|         }
  364|       |
  365|  3.26k|         uint64_t result = cbor_detail::decode_arg(ctx, it, end, additional_info);
  366|  3.26k|         if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (366:14): [True: 43, False: 3.22k]
  ------------------
  367|     43|            return;
  368|       |
  369|       |         // Reject a value that does not fit in T, matching the signed reader below and the
  370|       |         // JSON/MessagePack integer readers. Without this a uint16/uint32/uint64 argument is
  371|       |         // silently truncated into a narrower target (e.g. 300 -> uint8_t 44) with success.
  372|  3.22k|         if (result > static_cast<uint64_t>((std::numeric_limits<T>::max)())) [[unlikely]] {
  ------------------
  |  Branch (372:14): [True: 0, False: 3.22k]
  ------------------
  373|      0|            ctx.error = error_code::parse_number_failure;
  374|      0|            return;
  375|      0|         }
  376|       |
  377|  3.22k|         value = static_cast<T>(result);
  378|  3.22k|      }

_ZN3glz12ensure_spaceINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_RT_m:
  210|   121M|   {
  211|   121M|      using Buffer = std::remove_cvref_t<B>;
  212|       |
  213|   121M|      if constexpr (vector_like<Buffer>) {
  214|   121M|         if (required > b.size()) [[unlikely]] {
  ------------------
  |  Branch (214:14): [True: 27.0k, False: 121M]
  ------------------
  215|  27.0k|            grow_buffer(b, required);
  216|  27.0k|         }
  217|   121M|         return true;
  218|       |      }
  219|       |      else if constexpr (has_bounded_capacity<Buffer>) {
  220|       |         if (required > buffer_traits<Buffer>::capacity(b)) [[unlikely]] {
  221|       |            ctx.error = error_code::buffer_overflow;
  222|       |            return false;
  223|       |         }
  224|       |         return true;
  225|       |      }
  226|       |      else {
  227|       |         return true; // Raw pointer or other - trust caller
  228|       |      }
  229|   121M|   }
_ZN3glz11grow_bufferINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvRT_m:
   88|  27.0k|   {
   89|  27.0k|      using traits = buffer_traits<std::remove_cvref_t<B>>;
   90|  27.0k|      if constexpr (requires { traits::grow(b, required); }) {
   91|  27.0k|         traits::grow(b, required);
   92|       |      }
   93|       |      else {
   94|       |         // A user specialization written before `grow` existed: keep the growth it used to get.
   95|       |         b.resize(2 * required);
   96|       |      }
   97|  27.0k|   }
_ZN3glz13buffer_traitsINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE4growERS7_mQL_ZNS_13buffer_traits12is_resizableEE:
   63|  27.0k|      {
   64|  27.0k|         b.resize(2 * required);
   65|  27.0k|      }

_ZN3glz10get_memberIR9my_structRiEEDcOT_OT0_:
  616|  5.71k|   {
  617|  5.71k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  5.71k|      else {
  639|  5.71k|         return element;
  640|  5.71k|      }
  641|  5.71k|   }
_ZN3glz10get_memberIR9my_structRdEEDcOT_OT0_:
  616|  1.60k|   {
  617|  1.60k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  1.60k|      else {
  639|  1.60k|         return element;
  640|  1.60k|      }
  641|  1.60k|   }
_ZN3glz10get_memberIR9my_structRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEDcOT_OT0_:
  616|  3.33k|   {
  617|  3.33k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  3.33k|      else {
  639|  3.33k|         return element;
  640|  3.33k|      }
  641|  3.33k|   }
_ZN3glz10get_memberIR9my_structRNSt3__15arrayImLm3EEEEEDcOT_OT0_:
  616|  4.47k|   {
  617|  4.47k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  4.47k|      else {
  639|  4.47k|         return element;
  640|  4.47k|      }
  641|  4.47k|   }
_ZN3glz8str_viewINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKS5_EES5_OT0_:
  288|  91.5k|   {
  289|  91.5k|      if constexpr (std::same_as<std::decay_t<T>, std::string_view>) {
  290|  91.5k|         return value; // already the answer; rebuilding it from data() and size() costs instructions
  291|       |      }
  292|       |      else if constexpr (!char_array_t<T> && std::is_pointer_v<std::decay_t<T>>) {
  293|       |         return value ? std::string_view{value} : std::string_view{};
  294|       |      }
  295|       |      else if constexpr (has_data<T> && has_size<T>) {
  296|       |         return std::string_view{value.data(), value.size()};
  297|       |      }
  298|       |      else {
  299|       |         return std::string_view{value};
  300|       |      }
  301|  91.5k|   }

_ZN3glz11depth_guardINS_7contextEEC2ERS1_m:
  185|  9.16k|      depth_guard(Ctx& c, const size_t limit = max_recursive_depth_limit) noexcept : ctx(c)
  186|  9.16k|      {
  187|  9.16k|         if (ctx.depth >= limit) [[unlikely]] {
  ------------------
  |  Branch (187:14): [True: 0, False: 9.16k]
  ------------------
  188|      0|            ctx.error = error_code::exceeded_max_recursive_depth;
  189|      0|            return;
  190|      0|         }
  191|  9.16k|         ++ctx.depth;
  192|  9.16k|         entered = true;
  193|  9.16k|      }
_ZNK3glz11depth_guardINS_7contextEEcvbEv:
  198|  9.16k|      explicit operator bool() const noexcept { return entered; }
_ZN3glz11depth_guardINS_7contextEED2Ev:
  195|  9.16k|      {
  196|  9.16k|         if (entered) --ctx.depth;
  ------------------
  |  Branch (196:14): [True: 9.16k, False: 0]
  ------------------
  197|  9.16k|      }
_ZNK3glz9error_ctxcvbEv:
  136|  19.1k|      operator bool() const noexcept { return ec != error_code::none; }
_ZN3glz12indent_guardINS_7contextEEC2ERS1_m:
  211|   214k|      indent_guard(Ctx& c, const size_t indentation_step) noexcept : ctx(c), step(indentation_step)
  212|   214k|      {
  213|   214k|         ctx.depth += step;
  214|   214k|      }
_ZN3glz12indent_guardINS_7contextEED2Ev:
  215|   214k|      ~indent_guard() { ctx.depth -= step; }

_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSA_OSB_:
  219|  19.1k|   {
  220|  19.1k|      format_context_t<Opts.format> ctx{};
  221|  19.1k|      return read<Opts>(value, buffer, ctx);
  222|  19.1k|   }
_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEETkNS_10is_contextERNS_7contextEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSC_OSD_OT2_:
  136|  19.1k|   {
  137|  19.1k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
  138|  19.1k|      using Buffer = std::remove_reference_t<decltype(buffer)>;
  139|       |
  140|  19.1k|      if constexpr (Opts.format != NDJSON) {
  141|  19.1k|         if (buffer.empty()) [[unlikely]] {
  ------------------
  |  Branch (141:14): [True: 0, False: 19.1k]
  ------------------
  142|      0|            ctx.error = error_code::no_read_input;
  143|      0|            return {0, ctx.error, ctx.custom_error_message};
  144|      0|         }
  145|  19.1k|      }
  146|       |
  147|  19.1k|      constexpr bool use_padded = resizable<Buffer> && non_const_buffer<Buffer> && !check_disable_padding(Opts);
  ------------------
  |  Branch (147:35): [Folded, False: 19.1k]
  |  Branch (147:56): [Folded, False: 0]
  |  Branch (147:84): [True: 0, Folded]
  ------------------
  148|       |
  149|  19.1k|      [[maybe_unused]] size_t original_size{};
  150|       |      if constexpr (use_padded) {
  151|       |         // Pad the buffer for SWAR
  152|       |         original_size = buffer.size();
  153|       |         buffer.resize(original_size + padding_bytes);
  154|       |      }
  155|       |
  156|  19.1k|      auto [it, end] = read_iterators<Opts, use_padded>(buffer);
  157|  19.1k|      auto start = it;
  158|  19.1k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (158:11): [True: 0, False: 19.1k]
  ------------------
  159|      0|         goto finish;
  160|      0|      }
  161|       |
  162|       |      // Bound the speculative re-parsing a variant resolution may do, in bytes, relative to this
  163|       |      // input. Seeded per read so a reused context starts fresh. See charge_speculation.
  164|  19.1k|      if constexpr (requires { ctx.speculation_budget; }) {
  165|  19.1k|         const size_t proportional = max_speculative_parse_factor * size_t(end - it);
  166|  19.1k|         ctx.speculation_budget =
  167|  19.1k|            (proportional > min_speculative_parse_bytes ? proportional : min_speculative_parse_bytes) + 2;
  ------------------
  |  Branch (167:14): [True: 650, False: 18.5k]
  ------------------
  168|  19.1k|      }
  169|       |
  170|       |      // A YAML context marks its outermost parse with stream_begin and seeds its expansion budgets
  171|       |      // there, so clearing it here is what makes those budgets per-read like the one above. A
  172|       |      // reused context would otherwise carry a spent budget into the next document and reject a
  173|       |      // valid one, and would leave stream_begin pointing into the buffer of the previous read.
  174|       |      // Nested YAML parses do not route through glz::read, so they still cannot reseed themselves.
  175|       |      if constexpr (requires { ctx.stream_begin; }) {
  176|       |         ctx.stream_begin = nullptr;
  177|       |      }
  178|       |
  179|       |      if constexpr (use_padded) {
  180|       |         parse<Opts.format>::template op<is_padded_on<Opts>()>(value, ctx, it, end);
  181|       |      }
  182|  19.1k|      else {
  183|  19.1k|         parse<Opts.format>::template op<is_padded_off<Opts>()>(value, ctx, it, end);
  184|  19.1k|      }
  185|       |
  186|  19.1k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (186:11): [True: 19.1k, False: 56]
  ------------------
  187|  19.1k|         goto finish;
  188|  19.1k|      }
  189|       |
  190|       |      // The JSON RFC 8259 defines: JSON-text = ws value ws
  191|       |      // So, trailing whitespace is permitted and sometimes we want to
  192|       |      // validate this, even though this memory will not affect Glaze.
  193|       |      if constexpr (check_validate_trailing_whitespace(Opts)) {
  194|       |         if (it < end) {
  195|       |            skip_ws<Opts>(ctx, it, end);
  196|       |            if (bool(ctx.error)) [[unlikely]] {
  197|       |               goto finish;
  198|       |            }
  199|       |            if (it != end) [[unlikely]] {
  200|       |               ctx.error = error_code::syntax_error;
  201|       |            }
  202|       |         }
  203|       |      }
  204|       |
  205|  19.1k|   finish:
  206|  19.1k|      finalize_top_level_read<Opts>(ctx, start, it, end);
  207|       |
  208|       |      if constexpr (use_padded) {
  209|       |         // Restore the original buffer state
  210|       |         buffer.resize(original_size);
  211|       |      }
  212|       |
  213|  19.1k|      return {size_t(it - start), ctx.error, ctx.custom_error_message};
  214|     56|   }
_ZN3glz14read_iteratorsITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEELb0ETkNS_10contiguousERKNSt3__16vectorIcNS2_9allocatorIcEEEEEEDaOT1_:
   40|  19.1k|   {
   41|  19.1k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
   42|       |
   43|  19.1k|      auto it = reinterpret_cast<const char*>(buffer.data());
   44|  19.1k|      auto end = reinterpret_cast<const char*>(buffer.data()); // to be incremented
   45|       |
   46|       |      if constexpr (Padded) {
   47|       |         end += buffer.size() - padding_bytes;
   48|       |      }
   49|  19.1k|      else {
   50|  19.1k|         end += buffer.size();
   51|  19.1k|      }
   52|       |
   53|  19.1k|      return std::pair{it, end};
   54|  19.1k|   }
_ZN3glz16exceeds_capacityINSt3__15arrayImLm3EEETkNS_10is_contextENS_7contextEEEbRT_mRT0_:
   28|  1.44k|   {
   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|  1.44k|      return false;
   36|  1.44k|   }
_ZN3glz23finalize_top_level_readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_PKcS7_S7_:
  115|  19.1k|   {
  116|       |      if constexpr (Opts.format == JSON && !check_null_terminated(Opts)) {
  117|       |         // Deliberately not [[unlikely]]: a body that ends with the buffer lands here on every
  118|       |         // successful read, which is the ordinary case for a registry parsing a wire span.
  119|       |         // start < it, not !=, because a streaming origin can be empty or overshoot on an error
  120|       |         // path; neither is an absent value.
  121|       |         if (ctx.error == error_code::end_reached && ctx.depth == 0 && it == end && start < it) {
  122|       |            context ws_ctx{}; // only written to when skip_ws parses a comment; the result is unused
  123|       |            const char* consumed = start;
  124|       |            skip_ws<Opts>(ws_ctx, consumed, it);
  125|       |            if (consumed == it) {
  126|       |               ctx.error = error_code::no_read_input;
  127|       |            }
  128|       |         }
  129|       |      }
  130|  19.1k|      finalize_read_context<Opts>(ctx);
  131|  19.1k|   }
_ZN3glz21finalize_read_contextITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_:
   76|  19.1k|   {
   77|       |      // A partial read stops as soon as it has the fields it was asked for, so it unwinds through
   78|       |      // its enclosing containers on an error code rather than through their closing braces, and
   79|       |      // none of them decrement depth on the way out. Depth is left standing at whatever nesting the
   80|       |      // last field sat at.
   81|       |      //
   82|       |      // That has to be cleared here rather than left for the next read to trip over. This is the
   83|       |      // one path that reports success with depth still raised, and depth is what settle_end_reached
   84|       |      // reads to tell a completed parse from a truncated one -- so a context reused after a partial
   85|       |      // read would see a later well-formed buffer settle to unexpected_end. Reads that end any
   86|       |      // other way either return depth to zero themselves or carry an error, and a context holding
   87|       |      // an error short-circuits the next read before it parses anything.
   88|       |      if constexpr (check_partial_read(Opts)) {
   89|       |         if (ctx.error == error_code::partial_read_complete) [[likely]] {
   90|       |            ctx.error = error_code::none;
   91|       |            ctx.depth = 0;
   92|       |            return;
   93|       |         }
   94|       |      }
   95|  19.1k|      settle_end_reached(ctx);
   96|  19.1k|   }
_ZN3glz18settle_end_reachedITkNS_10is_contextERNS_7contextEEEvOT_:
   68|  19.1k|   {
   69|  19.1k|      if (ctx.error == error_code::end_reached) {
  ------------------
  |  Branch (69:11): [True: 0, False: 19.1k]
  ------------------
   70|      0|         ctx.error = (ctx.depth == 0) ? error_code::none : error_code::unexpected_end;
  ------------------
  |  Branch (70:22): [True: 0, False: 0]
  ------------------
   71|      0|      }
   72|  19.1k|   }

_ZN3glz21decode_hash_with_sizeILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2723|  15.6k|      {
 2724|  15.6k|         if (n < HashInfo.min_length || n > HashInfo.max_length) [[unlikely]] {
  ------------------
  |  Branch (2724:14): [True: 138, False: 15.4k]
  |  Branch (2724:41): [True: 75, False: 15.4k]
  ------------------
 2725|    213|            return N;
 2726|    213|         }
 2727|  15.4k|         return decode_hash_with_size_impl<Format, T, HashInfo, Type>::op(it, end, n);
 2728|  15.6k|      }
_ZN3glz26decode_hash_with_size_implILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2776|  15.4k|      {
 2777|       |         // unique_index < min_length <= n, so it[unique_index] is within the key (the wrapper has
 2778|       |         // already rejected lengths outside [min_length, max_length]).
 2779|       |         if constexpr (HashInfo.sized_hash) {
 2780|       |            const auto h = bitmix(uint16_t(it[HashInfo.unique_index]) | (uint16_t(n) << 8), HashInfo.seed);
 2781|       |            return HashInfo.table[h % bsize];
 2782|       |         }
 2783|  15.4k|         else {
 2784|       |            if constexpr (N == 2) {
 2785|       |               // Avoids using a hash table
 2786|       |               constexpr auto first_key_char = reflect<T>::keys[0][uindex];
 2787|       |               return size_t(bool(it[uindex] ^ first_key_char));
 2788|       |            }
 2789|  15.4k|            else {
 2790|  15.4k|               return HashInfo.table[uint8_t(it[uindex])];
 2791|  15.4k|            }
 2792|  15.4k|         }
 2793|  15.4k|      }

_ZN3glz3getILm0ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  5.71k|   {
  117|  5.71k|      using D = std::remove_cvref_t<Tup>;
  118|  5.71k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  5.71k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  5.71k|         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|  5.71k|         else {
  128|  5.71k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  5.71k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  5.71k|   }
_ZN3glz3tieIJidNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_5arrayImLm3EEEEEENS_5tupleIJDpRT_EEESD_:
  325|  15.1k|   {
  326|  15.1k|      return {{{ts}...}};
  327|  15.1k|   }
_ZN3glz3getILm1ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  1.60k|   {
  117|  1.60k|      using D = std::remove_cvref_t<Tup>;
  118|  1.60k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  1.60k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  1.60k|         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|  1.60k|         else {
  128|  1.60k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  1.60k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  1.60k|   }
_ZN3glz3getILm2ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  3.33k|   {
  117|  3.33k|      using D = std::remove_cvref_t<Tup>;
  118|  3.33k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  3.33k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  3.33k|         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|  3.33k|         else {
  128|  3.33k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  3.33k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  3.33k|   }
_ZN3glz3getILm3ETkNS_12tuple_detail9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  116|  4.47k|   {
  117|  4.47k|      using D = std::remove_cvref_t<Tup>;
  118|  4.47k|      if constexpr (tuple_detail::is_tuple<D>) {
  119|  4.47k|         static_assert(I < D::N, "glz::get index is out of range");
  120|  4.47k|         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.47k|         else {
  128|  4.47k|            return static_cast<T&&>(static_cast<tuple_detail::elem<I, T>&>(tup).value);
  129|  4.47k|         }
  130|       |      }
  131|       |      else {
  132|       |         return (static_cast<Tup&&>(tup)[I]);
  133|       |      }
  134|  4.47k|   }

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

_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  6.94M|      {
  815|  6.94M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  6.94M|            static_assert(required_padding<T>());
  817|  6.94M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 6.94M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  6.94M|         }
  821|       |
  822|  6.94M|         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|  6.94M|         else {
  832|  6.94M|            write_chars::op<O>(value, ctx, b, ix);
  833|  6.94M|         }
  834|  6.94M|      }
_ZN3glz16required_paddingImEEmv:
  538|  7.48M|   {
  539|  7.48M|      constexpr auto value = []() -> size_t {
  540|  7.48M|         if constexpr (boolean_like<T>) {
  541|  7.48M|            return 8;
  542|  7.48M|         }
  543|  7.48M|         else if constexpr (num_t<T>) {
  544|  7.48M|            if constexpr (std::floating_point<T>) {
  545|  7.48M|               if constexpr (sizeof(T) > 8) {
  546|  7.48M|                  return 64;
  547|  7.48M|               }
  548|  7.48M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  7.48M|                  return zmij::double_buffer_size + 4;
  551|  7.48M|               }
  552|  7.48M|               else {
  553|  7.48M|                  return zmij::float_buffer_size + 4;
  554|  7.48M|               }
  555|  7.48M|            }
  556|  7.48M|            else if constexpr (sizeof(T) > 4) {
  557|  7.48M|               return 24;
  558|  7.48M|            }
  559|  7.48M|            else if constexpr (sizeof(T) > 2) {
  560|  7.48M|               return 16;
  561|  7.48M|            }
  562|  7.48M|            else {
  563|  7.48M|               return 8;
  564|  7.48M|            }
  565|  7.48M|         }
  566|  7.48M|         else if constexpr (nullable_like<T>) {
  567|  7.48M|            if constexpr (has_value_type<T>) {
  568|  7.48M|               return required_padding<typename T::value_type>();
  569|  7.48M|            }
  570|  7.48M|            else if constexpr (has_element_type<T>) {
  571|  7.48M|               return required_padding<typename T::element_type>();
  572|  7.48M|            }
  573|  7.48M|            else {
  574|  7.48M|               return 0;
  575|  7.48M|            }
  576|  7.48M|         }
  577|  7.48M|         else if constexpr (always_null_t<T>) {
  578|  7.48M|            return 8;
  579|  7.48M|         }
  580|  7.48M|         else {
  581|  7.48M|            return 0;
  582|  7.48M|         }
  583|  7.48M|      }();
  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|  7.48M|      return value;
  591|  7.48M|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  5.61M|      {
  815|  5.61M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  5.61M|            static_assert(required_padding<T>());
  817|  5.61M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 5.61M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  5.61M|         }
  821|       |
  822|  5.61M|         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|  5.61M|         else {
  832|  5.61M|            write_chars::op<O>(value, ctx, b, ix);
  833|  5.61M|         }
  834|  5.61M|      }
_ZN3glz16required_paddingIlEEmv:
  538|  5.64M|   {
  539|  5.64M|      constexpr auto value = []() -> size_t {
  540|  5.64M|         if constexpr (boolean_like<T>) {
  541|  5.64M|            return 8;
  542|  5.64M|         }
  543|  5.64M|         else if constexpr (num_t<T>) {
  544|  5.64M|            if constexpr (std::floating_point<T>) {
  545|  5.64M|               if constexpr (sizeof(T) > 8) {
  546|  5.64M|                  return 64;
  547|  5.64M|               }
  548|  5.64M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  5.64M|                  return zmij::double_buffer_size + 4;
  551|  5.64M|               }
  552|  5.64M|               else {
  553|  5.64M|                  return zmij::float_buffer_size + 4;
  554|  5.64M|               }
  555|  5.64M|            }
  556|  5.64M|            else if constexpr (sizeof(T) > 4) {
  557|  5.64M|               return 24;
  558|  5.64M|            }
  559|  5.64M|            else if constexpr (sizeof(T) > 2) {
  560|  5.64M|               return 16;
  561|  5.64M|            }
  562|  5.64M|            else {
  563|  5.64M|               return 8;
  564|  5.64M|            }
  565|  5.64M|         }
  566|  5.64M|         else if constexpr (nullable_like<T>) {
  567|  5.64M|            if constexpr (has_value_type<T>) {
  568|  5.64M|               return required_padding<typename T::value_type>();
  569|  5.64M|            }
  570|  5.64M|            else if constexpr (has_element_type<T>) {
  571|  5.64M|               return required_padding<typename T::element_type>();
  572|  5.64M|            }
  573|  5.64M|            else {
  574|  5.64M|               return 0;
  575|  5.64M|            }
  576|  5.64M|         }
  577|  5.64M|         else if constexpr (always_null_t<T>) {
  578|  5.64M|            return 8;
  579|  5.64M|         }
  580|  5.64M|         else {
  581|  5.64M|            return 0;
  582|  5.64M|         }
  583|  5.64M|      }();
  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|  5.64M|      return value;
  591|  5.64M|   }
_ZN3glz6detail9emit_charINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_cRT_Rm:
 1154|  68.7M|      {
 1155|  68.7M|         if (!ensure_space(ctx, out, ix + 1)) [[unlikely]] {
  ------------------
  |  Branch (1155:14): [True: 0, False: 68.7M]
  ------------------
 1156|      0|            return false;
 1157|      0|         }
 1158|  68.7M|         dump<false>(c, out, ix);
 1159|  68.7M|         return true;
 1160|  68.7M|      }
_ZN3glz6detail14emit_hex_bytesINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEETkNS_10is_contextENS_7contextEPKcEEbRT0_T1_mRT_Rm:
 1190|  2.68M|      {
 1191|  2.68M|         static constexpr char digits[] = "0123456789abcdef";
 1192|       |
 1193|  2.68M|         if (!ensure_space(ctx, out, ix + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (1193:14): [True: 0, False: 2.68M]
  ------------------
 1194|      0|            return false;
 1195|      0|         }
 1196|       |
 1197|  5.85M|         for (uint64_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (1197:31): [True: 3.17M, False: 2.68M]
  ------------------
 1198|  3.17M|            uint8_t b;
 1199|  3.17M|            std::memcpy(&b, data + i, 1);
 1200|  3.17M|            dump<false>(digits[(b >> 4) & 0xf], out, ix);
 1201|  3.17M|            dump<false>(digits[b & 0xf], out, ix);
 1202|  3.17M|         }
 1203|  2.68M|         return true;
 1204|  2.68M|      }
_ZN3glz6detail21emit_untrusted_stringITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEvRT1_NS3_17basic_string_viewIcS6_EERT0_Rm:
 1140|  91.5k|      {
 1141|  91.5k|         to<JSON, std::string_view>::template op<untrusted_string_emit_opts<Opts>>(s, ctx, out, ix);
 1142|  91.5k|      }
_ZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  845|  91.5k|      {
  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|  91.5k|         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|  91.5k|            else {
  945|  91.5k|               const sv str = [&]() -> const sv {
  946|  91.5k|                  if constexpr (array_char_t<T>) {
  947|  91.5k|                     return sv{value.data(), value.size()};
  948|  91.5k|                  }
  949|  91.5k|                  else if constexpr (u8str_t<T>) {
  950|  91.5k|                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  951|  91.5k|                  }
  952|  91.5k|                  else {
  953|  91.5k|                     return str_view<T>(value);
  954|  91.5k|                  }
  955|  91.5k|               }();
  956|  91.5k|               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|  91.5k|               else {
  988|       |                  // Using the original sizing
  989|  91.5k|                  if (!ensure_space(ctx, b, ix + 10 + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (989:23): [True: 0, False: 91.5k]
  ------------------
  990|      0|                     return;
  991|      0|                  }
  992|  91.5k|               }
  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|  91.5k|               else {
 1002|  91.5k|                  std::memcpy(&b[ix], "\"", 1);
 1003|  91.5k|                  ++ix;
 1004|       |
 1005|  91.5k|                  const auto* c = str.data();
 1006|  91.5k|                  const auto* const e = c + n;
 1007|  91.5k|                  const auto start = &b[ix];
 1008|  91.5k|                  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|  91.5k|                  auto write_escape = [&]() {
 1017|  91.5k|                     if constexpr (check_escape_control_characters(Opts)) {
 1018|  91.5k|                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
 1019|  91.5k|                           std::memcpy(data, &escaped, 2);
 1020|  91.5k|                           data += 2;
 1021|  91.5k|                        }
 1022|  91.5k|                        else {
 1023|  91.5k|                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
 1024|  91.5k|                           constexpr char hex_digits[] = "0123456789ABCDEF";
 1025|  91.5k|                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
 1026|  91.5k|                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
 1027|  91.5k|                           std::memcpy(data, unicode_escape, 6);
 1028|  91.5k|                           data += 6;
 1029|  91.5k|                        }
 1030|  91.5k|                     }
 1031|  91.5k|                     else {
 1032|  91.5k|                        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|  91.5k|                           if (char_escape_table[uint8_t(*c)] == 0) [[unlikely]] {
 1039|  91.5k|                              ctx.error = error_code::invalid_control_character;
 1040|  91.5k|                           }
 1041|  91.5k|                        }
 1042|  91.5k|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
 1043|  91.5k|                        data += 2;
 1044|  91.5k|                     }
 1045|  91.5k|                     ++c;
 1046|  91.5k|                  };
 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|  91.5k|#if defined(GLZ_USE_SSE2)
 1055|  91.5k|                  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|  91.5k|                  if (n > 7) {
  ------------------
  |  Branch (1061:23): [True: 8.25k, False: 83.3k]
  ------------------
 1062|  15.8k|                     for (const auto end_m7 = e - 7; c < end_m7;) {
  ------------------
  |  Branch (1062:54): [True: 7.59k, False: 8.25k]
  ------------------
 1063|  7.59k|                        std::memcpy(data, c, 8);
 1064|  7.59k|                        uint64_t swar;
 1065|  7.59k|                        std::memcpy(&swar, c, 8);
 1066|       |                        if constexpr (std::endian::native == std::endian::big) {
 1067|       |                           swar = std::byteswap(swar);
 1068|       |                        }
 1069|       |
 1070|  7.59k|                        constexpr uint64_t lo7_mask = repeat_byte8(0b01111111);
 1071|  7.59k|                        const uint64_t lo7 = swar & lo7_mask;
 1072|  7.59k|                        const uint64_t quote = (lo7 ^ repeat_byte8('"')) + lo7_mask;
 1073|  7.59k|                        const uint64_t backslash = (lo7 ^ repeat_byte8('\\')) + lo7_mask;
 1074|  7.59k|                        const uint64_t less_32 = (swar & repeat_byte8(0b01100000)) + lo7_mask;
 1075|  7.59k|                        uint64_t next = ~((quote & backslash & less_32) | swar);
 1076|       |
 1077|  7.59k|                        next &= repeat_byte8(0b10000000);
 1078|  7.59k|                        if (next == 0) {
  ------------------
  |  Branch (1078:29): [True: 6.34k, False: 1.24k]
  ------------------
 1079|  6.34k|                           data += 8;
 1080|  6.34k|                           c += 8;
 1081|  6.34k|                           continue;
 1082|  6.34k|                        }
 1083|       |
 1084|  1.24k|                        const auto length = (countr_zero(next) >> 3);
 1085|  1.24k|                        c += length;
 1086|  1.24k|                        data += length;
 1087|  1.24k|                        write_escape();
 1088|  1.24k|                     }
 1089|  8.25k|                  }
 1090|       |
 1091|       |                  // Scalar tail
 1092|   140k|                  for (; c < e; ++c) {
  ------------------
  |  Branch (1092:26): [True: 48.9k, False: 91.5k]
  ------------------
 1093|  48.9k|                     if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  ------------------
  |  Branch (1093:79): [True: 882, False: 48.0k]
  ------------------
 1094|    882|                        std::memcpy(data, &escaped, 2);
 1095|    882|                        data += 2;
 1096|    882|                     }
 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|  48.0k|                     else {
 1112|  48.0k|                        if constexpr (check_reject_control_characters(Opts)) {
 1113|  48.0k|                           if (uint8_t(*c) < 0x20) [[unlikely]] {
  ------------------
  |  Branch (1113:32): [True: 561, False: 47.5k]
  ------------------
 1114|    561|                              ctx.error = error_code::invalid_control_character;
 1115|    561|                           }
 1116|  48.0k|                        }
 1117|  48.0k|                        std::memcpy(data, c, 1);
 1118|  48.0k|                        ++data;
 1119|  48.0k|                     }
 1120|  48.9k|                  }
 1121|       |
 1122|  91.5k|                  ix += size_t(data - start);
 1123|       |
 1124|  91.5k|                  std::memcpy(&b[ix], "\"", 1);
 1125|  91.5k|                  ++ix;
 1126|  91.5k|               }
 1127|  91.5k|            }
 1128|  91.5k|         }
 1129|  91.5k|      }
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE_clEv:
  945|  91.5k|               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|  91.5k|                  else {
  953|  91.5k|                     return str_view<T>(value);
  954|  91.5k|                  }
  955|  91.5k|               }();
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj256EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE0_clEv:
 1016|  2.49M|                  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|  2.49M|                     else {
 1032|  2.49M|                        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|  2.49M|                           if (char_escape_table[uint8_t(*c)] == 0) [[unlikely]] {
  ------------------
  |  Branch (1038:32): [True: 2.45M, False: 37.4k]
  ------------------
 1039|  2.45M|                              ctx.error = error_code::invalid_control_character;
 1040|  2.45M|                           }
 1041|  2.49M|                        }
 1042|  2.49M|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
 1043|  2.49M|                        data += 2;
 1044|  2.49M|                     }
 1045|  2.49M|                     ++c;
 1046|  2.49M|                  };
_ZN3glz2toILj10EKmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERS1_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   846k|      {
  815|   846k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   846k|            static_assert(required_padding<T>());
  817|   846k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 846k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   846k|         }
  821|       |
  822|   846k|         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|   846k|         else {
  832|   846k|            write_chars::op<O>(value, ctx, b, ix);
  833|   846k|         }
  834|   846k|      }
_ZN3glz16required_paddingIKmEEmv:
  538|   846k|   {
  539|   846k|      constexpr auto value = []() -> size_t {
  540|   846k|         if constexpr (boolean_like<T>) {
  541|   846k|            return 8;
  542|   846k|         }
  543|   846k|         else if constexpr (num_t<T>) {
  544|   846k|            if constexpr (std::floating_point<T>) {
  545|   846k|               if constexpr (sizeof(T) > 8) {
  546|   846k|                  return 64;
  547|   846k|               }
  548|   846k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   846k|                  return zmij::double_buffer_size + 4;
  551|   846k|               }
  552|   846k|               else {
  553|   846k|                  return zmij::float_buffer_size + 4;
  554|   846k|               }
  555|   846k|            }
  556|   846k|            else if constexpr (sizeof(T) > 4) {
  557|   846k|               return 24;
  558|   846k|            }
  559|   846k|            else if constexpr (sizeof(T) > 2) {
  560|   846k|               return 16;
  561|   846k|            }
  562|   846k|            else {
  563|   846k|               return 8;
  564|   846k|            }
  565|   846k|         }
  566|   846k|         else if constexpr (nullable_like<T>) {
  567|   846k|            if constexpr (has_value_type<T>) {
  568|   846k|               return required_padding<typename T::value_type>();
  569|   846k|            }
  570|   846k|            else if constexpr (has_element_type<T>) {
  571|   846k|               return required_padding<typename T::element_type>();
  572|   846k|            }
  573|   846k|            else {
  574|   846k|               return 0;
  575|   846k|            }
  576|   846k|         }
  577|   846k|         else if constexpr (always_null_t<T>) {
  578|   846k|            return 8;
  579|   846k|         }
  580|   846k|         else {
  581|   846k|            return 0;
  582|   846k|         }
  583|   846k|      }();
  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|   846k|      return value;
  591|   846k|   }
_ZN3glz2toILj10EKlE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERS1_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  2.83M|      {
  815|  2.83M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  2.83M|            static_assert(required_padding<T>());
  817|  2.83M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 2.83M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  2.83M|         }
  821|       |
  822|  2.83M|         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|  2.83M|         else {
  832|  2.83M|            write_chars::op<O>(value, ctx, b, ix);
  833|  2.83M|         }
  834|  2.83M|      }
_ZN3glz16required_paddingIKlEEmv:
  538|  2.83M|   {
  539|  2.83M|      constexpr auto value = []() -> size_t {
  540|  2.83M|         if constexpr (boolean_like<T>) {
  541|  2.83M|            return 8;
  542|  2.83M|         }
  543|  2.83M|         else if constexpr (num_t<T>) {
  544|  2.83M|            if constexpr (std::floating_point<T>) {
  545|  2.83M|               if constexpr (sizeof(T) > 8) {
  546|  2.83M|                  return 64;
  547|  2.83M|               }
  548|  2.83M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  2.83M|                  return zmij::double_buffer_size + 4;
  551|  2.83M|               }
  552|  2.83M|               else {
  553|  2.83M|                  return zmij::float_buffer_size + 4;
  554|  2.83M|               }
  555|  2.83M|            }
  556|  2.83M|            else if constexpr (sizeof(T) > 4) {
  557|  2.83M|               return 24;
  558|  2.83M|            }
  559|  2.83M|            else if constexpr (sizeof(T) > 2) {
  560|  2.83M|               return 16;
  561|  2.83M|            }
  562|  2.83M|            else {
  563|  2.83M|               return 8;
  564|  2.83M|            }
  565|  2.83M|         }
  566|  2.83M|         else if constexpr (nullable_like<T>) {
  567|  2.83M|            if constexpr (has_value_type<T>) {
  568|  2.83M|               return required_padding<typename T::value_type>();
  569|  2.83M|            }
  570|  2.83M|            else if constexpr (has_element_type<T>) {
  571|  2.83M|               return required_padding<typename T::element_type>();
  572|  2.83M|            }
  573|  2.83M|            else {
  574|  2.83M|               return 0;
  575|  2.83M|            }
  576|  2.83M|         }
  577|  2.83M|         else if constexpr (always_null_t<T>) {
  578|  2.83M|            return 8;
  579|  2.83M|         }
  580|  2.83M|         else {
  581|  2.83M|            return 0;
  582|  2.83M|         }
  583|  2.83M|      }();
  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|  2.83M|      return value;
  591|  2.83M|   }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  1.57M|      {
  815|  1.57M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  1.57M|            static_assert(required_padding<T>());
  817|  1.57M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 1.57M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  1.57M|         }
  821|       |
  822|  1.57M|         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.57M|         else {
  832|  1.57M|            write_chars::op<O>(value, ctx, b, ix);
  833|  1.57M|         }
  834|  1.57M|      }
_ZN3glz16required_paddingIdEEmv:
  538|  8.03M|   {
  539|  8.03M|      constexpr auto value = []() -> size_t {
  540|  8.03M|         if constexpr (boolean_like<T>) {
  541|  8.03M|            return 8;
  542|  8.03M|         }
  543|  8.03M|         else if constexpr (num_t<T>) {
  544|  8.03M|            if constexpr (std::floating_point<T>) {
  545|  8.03M|               if constexpr (sizeof(T) > 8) {
  546|  8.03M|                  return 64;
  547|  8.03M|               }
  548|  8.03M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  8.03M|                  return zmij::double_buffer_size + 4;
  551|  8.03M|               }
  552|  8.03M|               else {
  553|  8.03M|                  return zmij::float_buffer_size + 4;
  554|  8.03M|               }
  555|  8.03M|            }
  556|  8.03M|            else if constexpr (sizeof(T) > 4) {
  557|  8.03M|               return 24;
  558|  8.03M|            }
  559|  8.03M|            else if constexpr (sizeof(T) > 2) {
  560|  8.03M|               return 16;
  561|  8.03M|            }
  562|  8.03M|            else {
  563|  8.03M|               return 8;
  564|  8.03M|            }
  565|  8.03M|         }
  566|  8.03M|         else if constexpr (nullable_like<T>) {
  567|  8.03M|            if constexpr (has_value_type<T>) {
  568|  8.03M|               return required_padding<typename T::value_type>();
  569|  8.03M|            }
  570|  8.03M|            else if constexpr (has_element_type<T>) {
  571|  8.03M|               return required_padding<typename T::element_type>();
  572|  8.03M|            }
  573|  8.03M|            else {
  574|  8.03M|               return 0;
  575|  8.03M|            }
  576|  8.03M|         }
  577|  8.03M|         else if constexpr (always_null_t<T>) {
  578|  8.03M|            return 8;
  579|  8.03M|         }
  580|  8.03M|         else {
  581|  8.03M|            return 0;
  582|  8.03M|         }
  583|  8.03M|      }();
  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.03M|      return value;
  591|  8.03M|   }
_ZN3glz2toILj10EfE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   173k|      {
  815|   173k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   173k|            static_assert(required_padding<T>());
  817|   173k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 173k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   173k|         }
  821|       |
  822|   173k|         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|   173k|         else {
  832|   173k|            write_chars::op<O>(value, ctx, b, ix);
  833|   173k|         }
  834|   173k|      }
_ZN3glz16required_paddingIfEEmv:
  538|   173k|   {
  539|   173k|      constexpr auto value = []() -> size_t {
  540|   173k|         if constexpr (boolean_like<T>) {
  541|   173k|            return 8;
  542|   173k|         }
  543|   173k|         else if constexpr (num_t<T>) {
  544|   173k|            if constexpr (std::floating_point<T>) {
  545|   173k|               if constexpr (sizeof(T) > 8) {
  546|   173k|                  return 64;
  547|   173k|               }
  548|   173k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   173k|                  return zmij::double_buffer_size + 4;
  551|   173k|               }
  552|   173k|               else {
  553|   173k|                  return zmij::float_buffer_size + 4;
  554|   173k|               }
  555|   173k|            }
  556|   173k|            else if constexpr (sizeof(T) > 4) {
  557|   173k|               return 24;
  558|   173k|            }
  559|   173k|            else if constexpr (sizeof(T) > 2) {
  560|   173k|               return 16;
  561|   173k|            }
  562|   173k|            else {
  563|   173k|               return 8;
  564|   173k|            }
  565|   173k|         }
  566|   173k|         else if constexpr (nullable_like<T>) {
  567|   173k|            if constexpr (has_value_type<T>) {
  568|   173k|               return required_padding<typename T::value_type>();
  569|   173k|            }
  570|   173k|            else if constexpr (has_element_type<T>) {
  571|   173k|               return required_padding<typename T::element_type>();
  572|   173k|            }
  573|   173k|            else {
  574|   173k|               return 0;
  575|   173k|            }
  576|   173k|         }
  577|   173k|         else if constexpr (always_null_t<T>) {
  578|   173k|            return 8;
  579|   173k|         }
  580|   173k|         else {
  581|   173k|            return 0;
  582|   173k|         }
  583|   173k|      }();
  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|   173k|      return value;
  591|   173k|   }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   214k|      {
  815|   214k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   214k|            static_assert(required_padding<T>());
  817|   214k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 214k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   214k|         }
  821|       |
  822|   214k|         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|   214k|         else {
  832|   214k|            write_chars::op<O>(value, ctx, b, ix);
  833|   214k|         }
  834|   214k|      }
_ZN3glz2toILj10EaE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   514k|      {
  815|   514k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   514k|            static_assert(required_padding<T>());
  817|   514k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 514k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   514k|         }
  821|       |
  822|   514k|         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|   514k|         else {
  832|   514k|            write_chars::op<O>(value, ctx, b, ix);
  833|   514k|         }
  834|   514k|      }
_ZN3glz16required_paddingIaEEmv:
  538|   514k|   {
  539|   514k|      constexpr auto value = []() -> size_t {
  540|   514k|         if constexpr (boolean_like<T>) {
  541|   514k|            return 8;
  542|   514k|         }
  543|   514k|         else if constexpr (num_t<T>) {
  544|   514k|            if constexpr (std::floating_point<T>) {
  545|   514k|               if constexpr (sizeof(T) > 8) {
  546|   514k|                  return 64;
  547|   514k|               }
  548|   514k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   514k|                  return zmij::double_buffer_size + 4;
  551|   514k|               }
  552|   514k|               else {
  553|   514k|                  return zmij::float_buffer_size + 4;
  554|   514k|               }
  555|   514k|            }
  556|   514k|            else if constexpr (sizeof(T) > 4) {
  557|   514k|               return 24;
  558|   514k|            }
  559|   514k|            else if constexpr (sizeof(T) > 2) {
  560|   514k|               return 16;
  561|   514k|            }
  562|   514k|            else {
  563|   514k|               return 8;
  564|   514k|            }
  565|   514k|         }
  566|   514k|         else if constexpr (nullable_like<T>) {
  567|   514k|            if constexpr (has_value_type<T>) {
  568|   514k|               return required_padding<typename T::value_type>();
  569|   514k|            }
  570|   514k|            else if constexpr (has_element_type<T>) {
  571|   514k|               return required_padding<typename T::element_type>();
  572|   514k|            }
  573|   514k|            else {
  574|   514k|               return 0;
  575|   514k|            }
  576|   514k|         }
  577|   514k|         else if constexpr (always_null_t<T>) {
  578|   514k|            return 8;
  579|   514k|         }
  580|   514k|         else {
  581|   514k|            return 0;
  582|   514k|         }
  583|   514k|      }();
  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|   514k|      return value;
  591|   514k|   }
_ZN3glz2toILj10EsE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   715k|      {
  815|   715k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   715k|            static_assert(required_padding<T>());
  817|   715k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 715k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   715k|         }
  821|       |
  822|   715k|         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|   715k|         else {
  832|   715k|            write_chars::op<O>(value, ctx, b, ix);
  833|   715k|         }
  834|   715k|      }
_ZN3glz16required_paddingIsEEmv:
  538|   715k|   {
  539|   715k|      constexpr auto value = []() -> size_t {
  540|   715k|         if constexpr (boolean_like<T>) {
  541|   715k|            return 8;
  542|   715k|         }
  543|   715k|         else if constexpr (num_t<T>) {
  544|   715k|            if constexpr (std::floating_point<T>) {
  545|   715k|               if constexpr (sizeof(T) > 8) {
  546|   715k|                  return 64;
  547|   715k|               }
  548|   715k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   715k|                  return zmij::double_buffer_size + 4;
  551|   715k|               }
  552|   715k|               else {
  553|   715k|                  return zmij::float_buffer_size + 4;
  554|   715k|               }
  555|   715k|            }
  556|   715k|            else if constexpr (sizeof(T) > 4) {
  557|   715k|               return 24;
  558|   715k|            }
  559|   715k|            else if constexpr (sizeof(T) > 2) {
  560|   715k|               return 16;
  561|   715k|            }
  562|   715k|            else {
  563|   715k|               return 8;
  564|   715k|            }
  565|   715k|         }
  566|   715k|         else if constexpr (nullable_like<T>) {
  567|   715k|            if constexpr (has_value_type<T>) {
  568|   715k|               return required_padding<typename T::value_type>();
  569|   715k|            }
  570|   715k|            else if constexpr (has_element_type<T>) {
  571|   715k|               return required_padding<typename T::element_type>();
  572|   715k|            }
  573|   715k|            else {
  574|   715k|               return 0;
  575|   715k|            }
  576|   715k|         }
  577|   715k|         else if constexpr (always_null_t<T>) {
  578|   715k|            return 8;
  579|   715k|         }
  580|   715k|         else {
  581|   715k|            return 0;
  582|   715k|         }
  583|   715k|      }();
  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|   715k|      return value;
  591|   715k|   }
_ZN3glz2toILj10EiE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  19.2k|      {
  815|  19.2k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  19.2k|            static_assert(required_padding<T>());
  817|  19.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 19.2k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  19.2k|         }
  821|       |
  822|  19.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|  19.2k|         else {
  832|  19.2k|            write_chars::op<O>(value, ctx, b, ix);
  833|  19.2k|         }
  834|  19.2k|      }
_ZN3glz16required_paddingIiEEmv:
  538|  19.2k|   {
  539|  19.2k|      constexpr auto value = []() -> size_t {
  540|  19.2k|         if constexpr (boolean_like<T>) {
  541|  19.2k|            return 8;
  542|  19.2k|         }
  543|  19.2k|         else if constexpr (num_t<T>) {
  544|  19.2k|            if constexpr (std::floating_point<T>) {
  545|  19.2k|               if constexpr (sizeof(T) > 8) {
  546|  19.2k|                  return 64;
  547|  19.2k|               }
  548|  19.2k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  19.2k|                  return zmij::double_buffer_size + 4;
  551|  19.2k|               }
  552|  19.2k|               else {
  553|  19.2k|                  return zmij::float_buffer_size + 4;
  554|  19.2k|               }
  555|  19.2k|            }
  556|  19.2k|            else if constexpr (sizeof(T) > 4) {
  557|  19.2k|               return 24;
  558|  19.2k|            }
  559|  19.2k|            else if constexpr (sizeof(T) > 2) {
  560|  19.2k|               return 16;
  561|  19.2k|            }
  562|  19.2k|            else {
  563|  19.2k|               return 8;
  564|  19.2k|            }
  565|  19.2k|         }
  566|  19.2k|         else if constexpr (nullable_like<T>) {
  567|  19.2k|            if constexpr (has_value_type<T>) {
  568|  19.2k|               return required_padding<typename T::value_type>();
  569|  19.2k|            }
  570|  19.2k|            else if constexpr (has_element_type<T>) {
  571|  19.2k|               return required_padding<typename T::element_type>();
  572|  19.2k|            }
  573|  19.2k|            else {
  574|  19.2k|               return 0;
  575|  19.2k|            }
  576|  19.2k|         }
  577|  19.2k|         else if constexpr (always_null_t<T>) {
  578|  19.2k|            return 8;
  579|  19.2k|         }
  580|  19.2k|         else {
  581|  19.2k|            return 0;
  582|  19.2k|         }
  583|  19.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|  19.2k|      return value;
  591|  19.2k|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  30.5k|      {
  815|  30.5k|         if constexpr (not check_write_unchecked(Opts)) {
  816|  30.5k|            static_assert(required_padding<T>());
  817|  30.5k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 30.5k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  30.5k|         }
  821|       |
  822|  30.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|  30.5k|         else {
  832|  30.5k|            write_chars::op<O>(value, ctx, b, ix);
  833|  30.5k|         }
  834|  30.5k|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  1.26M|      {
  815|  1.26M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  1.26M|            static_assert(required_padding<T>());
  817|  1.26M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 1.26M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  1.26M|         }
  821|       |
  822|  1.26M|         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.26M|         else {
  832|  1.26M|            write_chars::op<O>(value, ctx, b, ix);
  833|  1.26M|         }
  834|  1.26M|      }
_ZN3glz16required_paddingIhEEmv:
  538|  2.28M|   {
  539|  2.28M|      constexpr auto value = []() -> size_t {
  540|  2.28M|         if constexpr (boolean_like<T>) {
  541|  2.28M|            return 8;
  542|  2.28M|         }
  543|  2.28M|         else if constexpr (num_t<T>) {
  544|  2.28M|            if constexpr (std::floating_point<T>) {
  545|  2.28M|               if constexpr (sizeof(T) > 8) {
  546|  2.28M|                  return 64;
  547|  2.28M|               }
  548|  2.28M|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|  2.28M|                  return zmij::double_buffer_size + 4;
  551|  2.28M|               }
  552|  2.28M|               else {
  553|  2.28M|                  return zmij::float_buffer_size + 4;
  554|  2.28M|               }
  555|  2.28M|            }
  556|  2.28M|            else if constexpr (sizeof(T) > 4) {
  557|  2.28M|               return 24;
  558|  2.28M|            }
  559|  2.28M|            else if constexpr (sizeof(T) > 2) {
  560|  2.28M|               return 16;
  561|  2.28M|            }
  562|  2.28M|            else {
  563|  2.28M|               return 8;
  564|  2.28M|            }
  565|  2.28M|         }
  566|  2.28M|         else if constexpr (nullable_like<T>) {
  567|  2.28M|            if constexpr (has_value_type<T>) {
  568|  2.28M|               return required_padding<typename T::value_type>();
  569|  2.28M|            }
  570|  2.28M|            else if constexpr (has_element_type<T>) {
  571|  2.28M|               return required_padding<typename T::element_type>();
  572|  2.28M|            }
  573|  2.28M|            else {
  574|  2.28M|               return 0;
  575|  2.28M|            }
  576|  2.28M|         }
  577|  2.28M|         else if constexpr (always_null_t<T>) {
  578|  2.28M|            return 8;
  579|  2.28M|         }
  580|  2.28M|         else {
  581|  2.28M|            return 0;
  582|  2.28M|         }
  583|  2.28M|      }();
  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|  2.28M|      return value;
  591|  2.28M|   }
_ZN3glz2toILj10EtE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   137k|      {
  815|   137k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   137k|            static_assert(required_padding<T>());
  817|   137k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 137k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   137k|         }
  821|       |
  822|   137k|         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|   137k|         else {
  832|   137k|            write_chars::op<O>(value, ctx, b, ix);
  833|   137k|         }
  834|   137k|      }
_ZN3glz16required_paddingItEEmv:
  538|   137k|   {
  539|   137k|      constexpr auto value = []() -> size_t {
  540|   137k|         if constexpr (boolean_like<T>) {
  541|   137k|            return 8;
  542|   137k|         }
  543|   137k|         else if constexpr (num_t<T>) {
  544|   137k|            if constexpr (std::floating_point<T>) {
  545|   137k|               if constexpr (sizeof(T) > 8) {
  546|   137k|                  return 64;
  547|   137k|               }
  548|   137k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   137k|                  return zmij::double_buffer_size + 4;
  551|   137k|               }
  552|   137k|               else {
  553|   137k|                  return zmij::float_buffer_size + 4;
  554|   137k|               }
  555|   137k|            }
  556|   137k|            else if constexpr (sizeof(T) > 4) {
  557|   137k|               return 24;
  558|   137k|            }
  559|   137k|            else if constexpr (sizeof(T) > 2) {
  560|   137k|               return 16;
  561|   137k|            }
  562|   137k|            else {
  563|   137k|               return 8;
  564|   137k|            }
  565|   137k|         }
  566|   137k|         else if constexpr (nullable_like<T>) {
  567|   137k|            if constexpr (has_value_type<T>) {
  568|   137k|               return required_padding<typename T::value_type>();
  569|   137k|            }
  570|   137k|            else if constexpr (has_element_type<T>) {
  571|   137k|               return required_padding<typename T::element_type>();
  572|   137k|            }
  573|   137k|            else {
  574|   137k|               return 0;
  575|   137k|            }
  576|   137k|         }
  577|   137k|         else if constexpr (always_null_t<T>) {
  578|   137k|            return 8;
  579|   137k|         }
  580|   137k|         else {
  581|   137k|            return 0;
  582|   137k|         }
  583|   137k|      }();
  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|   137k|      return value;
  591|   137k|   }
_ZN3glz2toILj10EjE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   320k|      {
  815|   320k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   320k|            static_assert(required_padding<T>());
  817|   320k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 320k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   320k|         }
  821|       |
  822|   320k|         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|   320k|         else {
  832|   320k|            write_chars::op<O>(value, ctx, b, ix);
  833|   320k|         }
  834|   320k|      }
_ZN3glz16required_paddingIjEEmv:
  538|   320k|   {
  539|   320k|      constexpr auto value = []() -> size_t {
  540|   320k|         if constexpr (boolean_like<T>) {
  541|   320k|            return 8;
  542|   320k|         }
  543|   320k|         else if constexpr (num_t<T>) {
  544|   320k|            if constexpr (std::floating_point<T>) {
  545|   320k|               if constexpr (sizeof(T) > 8) {
  546|   320k|                  return 64;
  547|   320k|               }
  548|   320k|               else if constexpr (sizeof(T) > 4) {
  549|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  550|   320k|                  return zmij::double_buffer_size + 4;
  551|   320k|               }
  552|   320k|               else {
  553|   320k|                  return zmij::float_buffer_size + 4;
  554|   320k|               }
  555|   320k|            }
  556|   320k|            else if constexpr (sizeof(T) > 4) {
  557|   320k|               return 24;
  558|   320k|            }
  559|   320k|            else if constexpr (sizeof(T) > 2) {
  560|   320k|               return 16;
  561|   320k|            }
  562|   320k|            else {
  563|   320k|               return 8;
  564|   320k|            }
  565|   320k|         }
  566|   320k|         else if constexpr (nullable_like<T>) {
  567|   320k|            if constexpr (has_value_type<T>) {
  568|   320k|               return required_padding<typename T::value_type>();
  569|   320k|            }
  570|   320k|            else if constexpr (has_element_type<T>) {
  571|   320k|               return required_padding<typename T::element_type>();
  572|   320k|            }
  573|   320k|            else {
  574|   320k|               return 0;
  575|   320k|            }
  576|   320k|         }
  577|   320k|         else if constexpr (always_null_t<T>) {
  578|   320k|            return 8;
  579|   320k|         }
  580|   320k|         else {
  581|   320k|            return 0;
  582|   320k|         }
  583|   320k|      }();
  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|   320k|      return value;
  591|   320k|   }
_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|   543k|      {
  815|   543k|         if constexpr (not check_write_unchecked(Opts)) {
  816|   543k|            static_assert(required_padding<T>());
  817|   543k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 543k]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|   543k|         }
  821|       |
  822|   543k|         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|   543k|         else {
  832|   543k|            write_chars::op<O>(value, ctx, b, ix);
  833|   543k|         }
  834|   543k|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm6EEEtlA6_cLc102ELc97ELc108ELc115ELc101EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|  16.7M|      {
 1165|  16.7M|         static constexpr auto s = str.sv();
 1166|  16.7M|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 16.7M]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|  16.7M|         dump<false>(s, out, ix);
 1170|  16.7M|         return true;
 1171|  16.7M|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm5EEEtlA5_cLc116ELc114ELc117ELc101EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|  3.89M|      {
 1165|  3.89M|         static constexpr auto s = str.sv();
 1166|  3.89M|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 3.89M]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|  3.89M|         dump<false>(s, out, ix);
 1170|  3.89M|         return true;
 1171|  3.89M|      }
_ZN3glz6detail12emit_literalITnNS_14string_literalEXtlNS2_ILm5EEEtlA5_cLc110ELc117ELc108ELc108EEEENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT1_RT0_Rm:
 1164|   306k|      {
 1165|   306k|         static constexpr auto s = str.sv();
 1166|   306k|         if (!ensure_space(ctx, out, ix + s.size())) [[unlikely]] {
  ------------------
  |  Branch (1166:14): [True: 0, False: 306k]
  ------------------
 1167|      0|            return false;
 1168|      0|         }
 1169|   306k|         dump<false>(s, out, ix);
 1170|   306k|         return true;
 1171|   306k|      }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  6.24M|      {
  815|  6.24M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  6.24M|            static_assert(required_padding<T>());
  817|  6.24M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 6.24M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  6.24M|         }
  821|       |
  822|  6.24M|         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|  6.24M|         else {
  832|  6.24M|            write_chars::op<O>(value, ctx, b, ix);
  833|  6.24M|         }
  834|  6.24M|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  814|  1.01M|      {
  815|  1.01M|         if constexpr (not check_write_unchecked(Opts)) {
  816|  1.01M|            static_assert(required_padding<T>());
  817|  1.01M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (817:17): [True: 0, False: 1.01M]
  ------------------
  818|      0|               return;
  819|      0|            }
  820|  1.01M|         }
  821|       |
  822|  1.01M|         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.01M|         else {
  832|  1.01M|            write_chars::op<O>(value, ctx, b, ix);
  833|  1.01M|         }
  834|  1.01M|      }

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

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

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

_ZN3glz7compareILm1EcEEbPKT0_S3_:
  122|  7.31k|   {
  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.31k|      else if constexpr (Count == 1) {
  176|  7.31k|         return *lhs == *rhs;
  177|       |      }
  178|       |      else if constexpr (Count == 0) {
  179|       |         return true;
  180|       |      }
  181|  7.31k|   }
_ZN3glz7compareILm5EcEEbPKT0_S3_:
  122|  3.41k|   {
  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.41k|      else if constexpr (Count == 5) {
  152|  3.41k|         uint32_t l, r;
  153|  3.41k|         std::memcpy(&l, lhs, 4);
  154|  3.41k|         std::memcpy(&r, rhs, 4);
  155|  3.41k|         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.41k|   }
_ZN3glz7compareILm3EcEEbPKT0_S3_:
  122|  4.53k|   {
  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.53k|      else if constexpr (Count == 3) {
  164|  4.53k|         uint16_t l, r;
  165|  4.53k|         std::memcpy(&l, lhs, 2);
  166|  4.53k|         std::memcpy(&r, rhs, 2);
  167|  4.53k|         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.53k|   }

_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10byte_sizedEcEEvT1_RT0_Rm:
  112|  75.0M|   {
  113|       |      if constexpr (Checked && vector_like<B>) {
  114|       |         if (ix == b.size()) [[unlikely]] {
  115|       |            grow_buffer(b, b.size() == 0 ? 64 : ix + 1);
  116|       |         }
  117|       |      }
  118|  75.0M|      assign_maybe_cast(c, b, ix);
  119|  75.0M|      ++ix;
  120|  75.0M|   }
_ZN3glz17assign_maybe_castITkNS_10byte_sizedEcNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvT_RT0_Rm:
   57|  75.0M|   {
   58|  75.0M|      using V = std::decay_t<decltype(b[0])>;
   59|  75.0M|      using C = std::decay_t<decltype(c)>;
   60|  75.0M|      if constexpr (std::same_as<V, C>) {
   61|  75.0M|         b[ix] = c;
   62|       |      }
   63|       |      else {
   64|       |         b[ix] = static_cast<V>(c);
   65|       |      }
   66|  75.0M|   }
_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvNS1_17basic_string_viewIcS4_EERT0_Rm:
  154|  20.9M|   {
  155|  20.9M|      const auto n = str.size();
  156|  20.9M|      if constexpr (vector_like<B>) {
  157|       |         if constexpr (Checked) {
  158|       |            const auto k = ix + n;
  159|       |            if (ix + n > b.size()) [[unlikely]] {
  160|       |               grow_buffer(b, k);
  161|       |            }
  162|       |         }
  163|  20.9M|      }
  164|  20.9M|      std::memcpy(&b[ix], str.data(), n);
  165|  20.9M|      ix += n;
  166|  20.9M|   }

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

_ZN3glz8to_charsIaQsr3stdE7same_asIu14__remove_cvrefIT_EaEEEPcS3_S1_:
  277|   514k|   {
  278|   514k|      *buf = '-';
  279|   514k|      return to_chars(buf + (val < 0), uint8_t(val ^ (val >> 7)) - (val >> 7));
  280|   514k|   }
_ZN3glz8to_charsIiQsr3stdE7same_asIu14__remove_cvrefIT_EiEEEPcS3_S1_:
  213|  1.22M|   {
  214|  1.22M|      *buf = '-';
  215|  1.22M|      return to_chars(buf + (val < 0), uint32_t(val ^ (val >> 31)) - (val >> 31));
  216|  1.22M|   }
_ZN3glz8to_charsIjQsr3stdE7same_asIu14__remove_cvrefIT_EjEEEPcS3_S1_:
  191|  1.22M|   {
  192|  1.22M|      using namespace itoa_impl;
  193|  1.22M|      if (val < 100) {
  ------------------
  |  Branch (193:11): [True: 623k, False: 606k]
  ------------------
  194|   623k|         return u32_2(buf, val);
  195|   623k|      }
  196|   606k|      else if (val < 10000) {
  ------------------
  |  Branch (196:16): [True: 513k, False: 93.0k]
  ------------------
  197|   513k|         return u32_4(buf, val);
  198|   513k|      }
  199|  93.0k|      else if (val < 1000000) {
  ------------------
  |  Branch (199:16): [True: 93.0k, False: 0]
  ------------------
  200|  93.0k|         return u32_6(buf, val);
  201|  93.0k|      }
  202|      0|      else if (val < 100000000) {
  ------------------
  |  Branch (202:16): [True: 0, False: 0]
  ------------------
  203|      0|         return u32_8(buf, val);
  204|      0|      }
  205|      0|      else {
  206|      0|         return u32_10(buf, val);
  207|      0|      }
  208|  1.22M|   }
_ZN3glz9itoa_impl5u32_2EPcj:
   74|  2.62M|      {
   75|  2.62M|         const uint32_t lz = val < 10;
   76|  2.62M|         std::memcpy(buf, char_table + ((val * 2) | lz), 2);
   77|  2.62M|         return buf + 2 - lz;
   78|  2.62M|      }
_ZN3glz9itoa_impl5u32_4EPcj:
   81|   545k|      {
   82|   545k|         const uint32_t aa = (val * 5243) >> 19; // val / 100
   83|   545k|         const uint32_t lz = aa < 10;
   84|   545k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   85|   545k|         std::memcpy(buf + 2 - lz, &digit_pairs[val - aa * 100], 2);
   86|   545k|         return buf + 4 - lz;
   87|   545k|      }
_ZN3glz9itoa_impl5u32_6EPcj:
   90|  93.0k|      {
   91|  93.0k|         const uint32_t aa = uint32_t((uint64_t(val) * 429497) >> 32); // val / 10000
   92|  93.0k|         const uint32_t bbcc = val - aa * 10000;
   93|  93.0k|         const uint32_t bb = (bbcc * 5243) >> 19; // bbcc / 100
   94|  93.0k|         const uint32_t lz = aa < 10;
   95|  93.0k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   96|  93.0k|         std::memcpy(buf + 2 - lz, &digit_pairs[bb], 2);
   97|  93.0k|         std::memcpy(buf + 4 - lz, &digit_pairs[bbcc - bb * 100], 2);
   98|  93.0k|         return buf + 6 - lz;
   99|  93.0k|      }
_ZN3glz8to_charsIsQsr3stdE7same_asIu14__remove_cvrefIT_EsEEEPcS3_S1_:
  306|   715k|   {
  307|   715k|      *buf = '-';
  308|   715k|      return to_chars(buf + (val < 0), uint16_t(val ^ (val >> 15)) - (val >> 15));
  309|   715k|   }
_ZN3glz8to_charsIhQsr3stdE7same_asIu14__remove_cvrefIT_EhEEEPcS3_S1_:
  259|  2.28M|   {
  260|  2.28M|      using namespace itoa_impl;
  261|  2.28M|      if (val < 100) {
  ------------------
  |  Branch (261:11): [True: 1.93M, False: 349k]
  ------------------
  262|  1.93M|         return u32_2(buf, val);
  263|  1.93M|      }
  264|   349k|      else {
  265|       |         // 100-255: 3 digits
  266|   349k|         const uint32_t q = val / 100;
  267|   349k|         *buf = char('0' + q);
  268|   349k|         std::memcpy(buf + 1, &digit_pairs[val - q * 100], 2);
  269|   349k|         return buf + 3;
  270|   349k|      }
  271|  2.28M|   }
_ZN3glz8to_charsItQsr3stdE7same_asIu14__remove_cvrefIT_EtEEEPcS3_S1_:
  286|   137k|   {
  287|   137k|      using namespace itoa_impl;
  288|   137k|      if (val < 100) {
  ------------------
  |  Branch (288:11): [True: 63.1k, False: 74.0k]
  ------------------
  289|  63.1k|         return u32_2(buf, val);
  290|  63.1k|      }
  291|  74.0k|      else if (val < 10000) {
  ------------------
  |  Branch (291:16): [True: 32.4k, False: 41.5k]
  ------------------
  292|  32.4k|         return u32_4(buf, val);
  293|  32.4k|      }
  294|  41.5k|      else {
  295|       |         // 10000-65535: 5 digits
  296|  41.5k|         const uint32_t q = val / 10000;
  297|  41.5k|         *buf = char('0' + q);
  298|  41.5k|         return u64_len_4(buf + 1, val - q * 10000);
  299|  41.5k|      }
  300|   137k|   }
_ZN3glz9itoa_impl9u64_len_4EPcj:
  148|  41.5k|      {
  149|  41.5k|         const uint32_t aa = (val * 5243) >> 19;
  150|  41.5k|         std::memcpy(buf, &digit_pairs[aa], 2);
  151|  41.5k|         std::memcpy(buf + 2, &digit_pairs[val - aa * 100], 2);
  152|  41.5k|         return buf + 4;
  153|  41.5k|      }

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

_ZN3glz8to_charsITkNSt3__114floating_pointEdLb0EEEPcS2_T_:
 1118|  8.03M|   {
 1119|  8.03M|      static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>);
 1120|  8.03M|      return zmij::detail::write<T, OptSize>(val, buf);
 1121|  8.03M|   }
_ZN3glz4zmij6detail5writeIdLb0EEEPcT_S3_:
  975|  8.03M|      {
  976|  8.03M|         using namespace detail_impl;
  977|  8.03M|         using traits = float_traits<Float>;
  978|  8.03M|         auto bits = traits::to_bits(value);
  979|  8.03M|         auto bin_exp = traits::get_exp(bits);
  980|  8.03M|         auto bin_sig = traits::get_sig(bits);
  981|       |
  982|  8.03M|         *buffer = '-';
  983|  8.03M|         buffer += traits::is_negative(bits);
  984|       |
  985|  8.03M|         const auto* c = &consts_v<OptSize>;
  986|  8.03M|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|  8.03M|#define ZMIJ_ASM(x) asm x
  ------------------
  987|  8.03M|         int64_t threshold = traits::num_bits == 64 ? static_cast<int64_t>(c->threshold) : 10'000'000;
  ------------------
  |  Branch (987:30): [True: 8.03M, Folded]
  ------------------
  988|       |
  989|  8.03M|         to_decimal_result dec;
  990|  8.03M|         bool is_normal = unsigned(bin_exp - 1) < unsigned(traits::exp_mask - 1);
  991|  8.03M|         if (!is_normal) [[unlikely]] {
  ------------------
  |  Branch (991:14): [True: 299k, False: 7.73M]
  ------------------
  992|   299k|            if (bin_exp != 0) {
  ------------------
  |  Branch (992:17): [True: 27.8k, False: 272k]
  ------------------
  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|  27.8k|               buffer -= traits::is_negative(bits);
 1000|  27.8k|               memcpy(buffer, "null", 4);
 1001|  27.8k|               return buffer + 4;
 1002|  27.8k|#endif
 1003|  27.8k|            }
 1004|   272k|            if (bin_sig == 0) {
  ------------------
  |  Branch (1004:17): [True: 168k, False: 103k]
  ------------------
 1005|   168k|               memcpy(buffer, "0", 2);
 1006|   168k|               return buffer + 1;
 1007|   168k|            }
 1008|   103k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig, 1, true, *c);
 1009|   103k|            int64_t dec_sig = dec.sig * 10 + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1009:47): [True: 53.2k, False: 50.1k]
  ------------------
 1010|   103k|            int32_t dec_exp = dec.exp;
 1011|   394k|            while (dec_sig < threshold) {
  ------------------
  |  Branch (1011:20): [True: 291k, False: 103k]
  ------------------
 1012|   291k|               dec_sig *= 10;
 1013|   291k|               --dec_exp;
 1014|   291k|            }
 1015|   103k|            int64_t d = static_cast<int64_t>(detail_impl::div10(static_cast<uint64_t>(dec_sig)));
 1016|   103k|            int32_t last_digit = static_cast<int32_t>(dec_sig - d * 10);
 1017|   103k|            dec = {d, dec_exp, last_digit, last_digit != 0};
 1018|   103k|         }
 1019|  7.73M|         else {
 1020|  7.73M|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig | traits::implicit_bit,
 1021|  7.73M|                                                                                     bin_exp, bin_sig != 0, *c);
 1022|  7.73M|         }
 1023|  7.83M|         bool extra_digit = dec.sig >= threshold;
 1024|  7.83M|         int dec_exp = dec.exp + traits::max_digits10 - 2 + extra_digit;
 1025|  7.83M|         if (traits::num_bits == 32 && dec.sig < 1'000'000) [[unlikely]] {
  ------------------
  |  Branch (1025:14): [Folded, False: 7.83M]
  |  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|  7.83M|         char* start = buffer;
 1032|  7.83M|         auto dig = to_digits<traits::num_bits, OptSize>(static_cast<uint64_t>(dec.sig), extra_digit, *c);
 1033|  7.83M|         constexpr int bcd_size = traits::num_bits == 64 ? 16 : 8;
  ------------------
  |  Branch (1033:35): [True: 0, Folded]
  ------------------
 1034|  7.83M|         if (dec_exp >= traits::min_fixed_dec_exp && dec_exp <= traits::max_fixed_dec_exp) {
  ------------------
  |  Branch (1034:14): [True: 1.67M, False: 6.16M]
  |  Branch (1034:54): [True: 1.64M, False: 26.7k]
  ------------------
 1035|  1.64M|            memcpy(start, &zeros_v, 8);
 1036|  1.64M|            const auto& fmt = dec_exp_formats.get<traits>(dec_exp);
 1037|  1.64M|            buffer += fmt.start_pos;
 1038|  1.64M|            memcpy(buffer, &dig.digits, bcd_size);
 1039|  1.64M|            memmove(buffer, buffer + !extra_digit, bcd_size);
 1040|  1.64M|            buffer[bcd_size + extra_digit - 1] = static_cast<char>('0' + (dec.has_last_digit ? dec.last_digit : 0));
  ------------------
  |  Branch (1040:75): [True: 86.5k, False: 1.56M]
  ------------------
 1041|  1.64M|            memmove(start + fmt.shift_pos, start + fmt.point_pos, bcd_size);
 1042|  1.64M|            start[fmt.point_pos] = '.';
 1043|  1.64M|            int num_digits = dec.has_last_digit ? bcd_size : dig.num_digits - 1;
  ------------------
  |  Branch (1043:30): [True: 86.5k, False: 1.56M]
  ------------------
 1044|  1.64M|            return buffer + fmt.exp_pos[num_digits + extra_digit - 1];
 1045|  1.64M|         }
 1046|  6.18M|         buffer += extra_digit;
 1047|  6.18M|         memcpy(buffer, &dig.digits, bcd_size);
 1048|  6.18M|         buffer[bcd_size] = static_cast<char>('0' + dec.last_digit);
 1049|  6.18M|         buffer += dec.has_last_digit ? bcd_size + 1 : dig.num_digits;
  ------------------
  |  Branch (1049:20): [True: 5.82M, False: 366k]
  ------------------
 1050|  6.18M|         start[0] = start[1];
 1051|  6.18M|         start[1] = '.';
 1052|  6.18M|         buffer -= (buffer - 1 == start + 1);
 1053|       |
 1054|  6.18M|         if constexpr (exp_string_table<OptSize>::enable) {
 1055|  6.18M|            uint64_t exp_data = exp_strings_v<OptSize>.data[dec_exp + exp_string_table<OptSize>::offset];
 1056|  6.18M|            int len = int(exp_data >> 48);
 1057|  6.18M|            if (is_big_endian) exp_data = bswap64(exp_data);
  ------------------
  |  Branch (1057:17): [Folded, False: 6.18M]
  ------------------
 1058|  6.18M|            memcpy(buffer, &exp_data, traits::max_exponent10 >= 100 ? 8 : 4);
  ------------------
  |  Branch (1058:39): [True: 6.18M, Folded]
  ------------------
 1059|  6.18M|            return buffer + len;
 1060|  6.18M|         }
 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|  6.18M|         buffer[0] = 'E';
 1067|  6.18M|         buffer[1] = '-';
 1068|  6.18M|         buffer += 1 + unsigned(neg);
 1069|  6.18M|         dec_exp = neg ? -dec_exp : dec_exp;
  ------------------
  |  Branch (1069:20): [True: 0, False: 6.18M]
  ------------------
 1070|  6.18M|         unsigned hundreds_written = 0;
 1071|  6.18M|         if constexpr (traits::max_exponent10 >= 100) {
 1072|  6.18M|            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|  6.18M|            else {
 1077|  6.18M|               digit = static_cast<int32_t>((uint32_t(dec_exp) * div100_sig) >> div100_exp);
 1078|  6.18M|            }
 1079|  6.18M|            *buffer = static_cast<char>('0' + digit);
 1080|  6.18M|            hundreds_written = unsigned(dec_exp >= 100);
 1081|  6.18M|            buffer += hundreds_written;
 1082|  6.18M|            dec_exp -= digit * 100;
 1083|  6.18M|         }
 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|  6.18M|         const char* d2 = digits2(dec_exp);
 1087|  6.18M|         *buffer = d2[0];
 1088|  6.18M|         buffer += hundreds_written | unsigned(dec_exp >= 10);
 1089|  6.18M|         *buffer = d2[1];
 1090|  6.18M|         return buffer + 1;
 1091|  7.83M|      }
_ZN3glz4zmij11detail_impl12float_traitsIdE7to_bitsEd:
  358|  8.03M|         {
  359|  8.03M|            sig_type bits;
  360|  8.03M|            memcpy(&bits, &value, sizeof(value));
  361|  8.03M|            return bits;
  362|  8.03M|         }
_ZN3glz4zmij11detail_impl12float_traitsIdE7get_expEm:
  367|  8.03M|         {
  368|  8.03M|            return static_cast<int32_t>((bits << 1) >> (num_sig_bits + 1));
  369|  8.03M|         }
_ZN3glz4zmij11detail_impl12float_traitsIdE7get_sigEm:
  365|  8.03M|         static auto get_sig(sig_type bits) noexcept -> sig_type { return bits & (implicit_bit - 1); }
_ZN3glz4zmij11detail_impl12float_traitsIdE11is_negativeEm:
  364|  8.06M|         static auto is_negative(sig_type bits) noexcept -> bool { return bits >> (num_bits - 1); }
_ZN3glz4zmij11detail_impl10to_decimalIdmLb0EEENS1_17to_decimal_resultET0_lbRKNS1_9constantsIXT1_EEE:
  868|  7.83M|      {
  869|  7.83M|         using traits = float_traits<Float>;
  870|  7.83M|         int64_t bin_exp = raw_exp - traits::exp_offset;
  871|  7.83M|         constexpr int num_bits = std::numeric_limits<UInt>::digits;
  872|       |
  873|  7.83M|         constexpr uint64_t log10_2_sig = 78'913;
  874|  7.83M|         constexpr int32_t log10_2_exp = 18;
  875|  7.83M|         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|  7.83M|         else {
  881|  7.83M|            dec_exp = compute_dec_exp(bin_exp);
  882|  7.83M|         }
  883|  7.83M|         uint64_t even = 1 - (bin_sig & 1);
  884|  7.83M|         constexpr int32_t extra_shift = exp_shift_table<OptSize>::extra_shift;
  885|       |
  886|  7.83M|         if (!regular) [[unlikely]] {
  ------------------
  |  Branch (886:14): [True: 5.38M, False: 2.45M]
  ------------------
  887|  5.38M|            int32_t irregular_dec_exp = compute_dec_exp(bin_exp, false);
  888|  5.38M|            int32_t shift = compute_exp_shift(bin_exp, irregular_dec_exp + 1) + extra_shift;
  889|  5.38M|            uint128 pow10 = c.pow10_significands[-irregular_dec_exp - 1];
  890|  5.38M|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  891|       |
  892|  5.38M|            int64_t integral = p.hi >> extra_shift;
  893|  5.38M|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  894|       |
  895|  5.38M|            uint64_t half_ulp = pow10.hi >> (extra_shift + 1 - shift);
  896|  5.38M|            bool round_up = half_ulp > ~uint64_t(0) - fractional;
  897|  5.38M|            bool round_down = (half_ulp >> 1) > fractional;
  898|  5.38M|            integral += round_up;
  899|       |
  900|  5.38M|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, (uint64_t(1) << 63) - 1));
  901|  5.38M|            int32_t lo = static_cast<int32_t>(umul128_add_hi64(fractional - (half_ulp >> 1), 10, ~uint64_t(0)));
  902|  5.38M|            if (digit < lo) digit = lo;
  ------------------
  |  Branch (902:17): [True: 207k, False: 5.17M]
  ------------------
  903|  5.38M|            return {integral, irregular_dec_exp, digit, (round_up + round_down) == 0};
  904|  5.38M|         }
  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|  2.45M|         else {
  928|  2.45M|            int32_t shift = exp_shift_table<OptSize>::enable ? exp_shifts_v<OptSize>.data[bin_exp + traits::exp_offset]
  ------------------
  |  Branch (928:29): [True: 2.45M, Folded]
  ------------------
  929|  2.45M|                                                             : compute_exp_shift(bin_exp, dec_exp + 1) + extra_shift;
  930|  2.45M|            ZMIJ_ASM(("" : "+r"(dec_exp)));
  ------------------
  |  |  126|  2.45M|#define ZMIJ_ASM(x) asm x
  ------------------
  931|  2.45M|            uint128 pow10 = c.pow10_significands[-dec_exp - 1];
  932|  2.45M|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  933|  2.45M|            int64_t integral = p.hi >> extra_shift;
  934|  2.45M|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  935|  2.45M|            uint64_t half_ulp = (pow10.hi >> (extra_shift + 1 - shift)) + even;
  936|  2.45M|            bool round_up = fractional + half_ulp < fractional;
  937|  2.45M|            bool round_down = half_ulp > fractional;
  938|  2.45M|            integral += round_up;
  939|       |
  940|  2.45M|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, c.biased_half));
  941|  2.45M|            if (fractional == (1ull << 62)) [[unlikely]] {
  ------------------
  |  Branch (941:17): [True: 32.6k, False: 2.41M]
  ------------------
  942|  32.6k|               digit = 2;
  943|  32.6k|            }
  944|  2.45M|            return {integral, dec_exp, digit, (round_up + round_down) == 0};
  945|  2.45M|         }
  946|  2.45M|      }
_ZN3glz4zmij11detail_impl15compute_dec_expElb:
  333|  13.3M|      {
  334|  13.3M|         assert(bin_exp >= -1334 && bin_exp <= 2620);
  ------------------
  |  Branch (334:10): [True: 13.3M, False: 0]
  |  Branch (334:10): [True: 13.3M, False: 0]
  |  Branch (334:10): [True: 13.3M, False: 0]
  ------------------
  335|  13.3M|         constexpr int log10_3_over_4_sig = 131'072;
  336|  13.3M|         constexpr int log10_2_sig = 315'653, log10_2_exp = 20;
  337|  13.3M|         return static_cast<int32_t>((bin_exp * log10_2_sig - !regular * log10_3_over_4_sig) >> log10_2_exp);
  338|  13.3M|      }
_ZN3glz4zmij11detail_impl17compute_exp_shiftEli:
  457|  5.53M|      {
  458|  5.53M|         assert(dec_exp >= -350 && dec_exp <= 350);
  ------------------
  |  Branch (458:10): [True: 5.53M, False: 0]
  |  Branch (458:10): [True: 5.53M, False: 0]
  |  Branch (458:10): [True: 5.53M, False: 0]
  ------------------
  459|  5.53M|         constexpr int log2_pow10_sig = 217'707, log2_pow10_exp = 16;
  460|  5.53M|         int pow10_bin_exp = -dec_exp * log2_pow10_sig >> log2_pow10_exp;
  461|  5.53M|         return static_cast<int32_t>(bin_exp + pow10_bin_exp + 1);
  462|  5.53M|      }
_ZNK3glz4zmij11detail_impl23pow10_significand_tableILb0EEixEi:
  440|  7.98M|         {
  441|  7.98M|            constexpr int dec_exp_min = -293;
  442|  7.98M|            int i = dec_exp - dec_exp_min;
  443|  7.98M|            if (compress) return compute(i);
  ------------------
  |  Branch (443:17): [Folded, False: 7.98M]
  ------------------
  444|  7.98M|            if (!split_tables) return {data[i * 2], data[i * 2 + 1]};
  ------------------
  |  Branch (444:17): [True: 7.98M, 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|  7.98M|         }
_ZN3glz4zmij11detail_impl13umul192_hi128Emmm:
  308|  7.85M|      {
  309|  7.85M|         uint128_t p = umul128(x_hi, y);
  310|  7.85M|         uint64_t lo = uint64_t(p) + uint64_t(umul128(x_lo, y) >> 64);
  311|  7.85M|         return {uint64_t(p >> 64) + (lo < uint64_t(p)), lo};
  312|  7.85M|      }
_ZN3glz4zmij11detail_impl7umul128Emm:
  265|  15.9M|      {
  266|  15.9M|#if ZMIJ_USE_INT128
  267|  15.9M|         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|  15.9M|      }
_ZN3glz4zmij11detail_impl16umul128_add_hi64Emmm:
  298|  13.2M|      {
  299|  13.2M|#if ZMIJ_USE_INT128
  300|  13.2M|         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|  13.2M|      }
_ZN3glz4zmij11detail_impl5div10Em:
  326|   135k|      {
  327|   135k|         assert(x <= (1ull << 62));
  ------------------
  |  Branch (327:10): [True: 135k, False: 0]
  ------------------
  328|   135k|         constexpr uint64_t div10_sig64 = (1ull << 63) / 5 + 1;
  329|   135k|         return ZMIJ_USE_INT128 ? umul128_hi64(x, div10_sig64) : x / 10;
  ------------------
  |  |  247|   135k|#define ZMIJ_USE_INT128 1
  |  |  ------------------
  |  |  |  Branch (247:25): [True: 135k, Folded]
  |  |  ------------------
  ------------------
  330|   135k|      }
_ZN3glz4zmij11detail_impl12umul128_hi64Emm:
  295|   269k|      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|  7.83M|      {
  810|       |         if constexpr (num_bits == 32) {
  811|       |            auto result = to_bcd8<OptSize>(value);
  812|       |            return {result.bcd + zeros_v, result.len};
  813|       |         }
  814|  7.83M|         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|  7.83M|            uint32_t abbccddee = uint32_t(value / 100'000'000);
  834|  7.83M|            uint32_t ffgghhii = uint32_t(value % 100'000'000);
  835|       |
  836|  7.83M|            const __m128i zeros = _mm_load_si128(m128ptr(&c.zeros));
  837|  7.83M|            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|  7.83M|            auto bcd = _mm_shuffle_epi32(unshuffled_bcd, _MM_SHUFFLE(0, 1, 2, 3));
  843|  7.83M|#endif
  844|       |
  845|  7.83M|            __m128i mask128 = _mm_cmpgt_epi8(bcd, _mm_setzero_si128());
  846|  7.83M|            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|  7.83M|            int len = 63 - clz((mask << 1) | 1);
  851|  7.83M|#endif
  852|  7.83M|            return {_mm_or_si128(bcd, zeros), len};
  853|  7.83M|#endif
  854|  7.83M|         }
  855|  7.83M|      }
_ZN3glz4zmij11detail_impl20to_unshuffled_digitsILb0EEEDv2_xjjRKNS1_9constantsIXT_EEE:
  735|  7.83M|      {
  736|  7.83M|         const __m128i div10k = _mm_load_si128(m128ptr(&c.div10k));
  737|  7.83M|         const __m128i neg10k = _mm_load_si128(m128ptr(&c.neg10k));
  738|  7.83M|         __m128i x = _mm_set_epi64x(bbccddee, ffgghhii);
  739|  7.83M|         __m128i y = _mm_add_epi64(x, _mm_mul_epu32(neg10k, _mm_srli_epi64(_mm_mul_epu32(x, div10k), div10k_exp)));
  740|  7.83M|         return to_bcd_4x4(y, c);
  741|  7.83M|      }
_ZN3glz4zmij11detail_impl10to_bcd_4x4ILb0EEEDv2_xS3_RKNS1_9constantsIXT_EEE:
  712|  7.98M|      {
  713|  7.98M|         const __m128i div100 = _mm_load_si128(m128ptr(&c.div100));
  714|  7.98M|         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|  7.98M|         const __m128i hundred = _mm_load_si128(m128ptr(&c.hundred));
  723|  7.98M|         const __m128i moddiv10 = _mm_load_si128(m128ptr(&c.moddiv10));
  724|       |
  725|  7.98M|         __m128i y_div_100 = _mm_srli_epi16(_mm_mulhi_epu16(y, div100), 3);
  726|  7.98M|         __m128i y_mod_100 = _mm_sub_epi16(y, _mm_mullo_epi16(y_div_100, hundred));
  727|  7.98M|         __m128i z = _mm_or_si128(_mm_slli_epi32(y_mod_100, 16), y_div_100);
  728|  7.98M|         return _mm_sub_epi16(_mm_slli_epi16(z, 8), _mm_mullo_epi16(moddiv10, _mm_mulhi_epu16(z, div10)));
  729|  7.98M|#endif
  730|  7.98M|      }
_ZN3glz4zmij11detail_impl3clzEm:
  187|  7.98M|      {
  188|  7.98M|         assert(x != 0);
  ------------------
  |  Branch (188:10): [True: 7.98M, False: 0]
  ------------------
  189|  7.98M|#if ZMIJ_HAS_BUILTIN(__builtin_clzll)
  190|  7.98M|         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|  7.98M|      }
_ZNK3glz4zmij11detail_impl20dec_exp_format_table3getINS1_12float_traitsIdEEEERKNS2_5entryEi:
  559|  1.64M|         {
  560|  1.64M|            constexpr auto min = traits::min_fixed_dec_exp, max = Traits::max_fixed_dec_exp;
  561|  1.64M|            unsigned i = unsigned(dec_exp - min);
  562|  1.64M|            return data[i <= unsigned(max - min) ? i : num_entries - 1];
  ------------------
  |  Branch (562:25): [True: 1.64M, False: 0]
  ------------------
  563|  1.64M|         }
_ZN3glz8to_charsITkNSt3__114floating_pointEfLb0EEEPcS2_T_:
 1118|   173k|   {
 1119|   173k|      static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>);
 1120|   173k|      return zmij::detail::write<T, OptSize>(val, buf);
 1121|   173k|   }
_ZN3glz4zmij6detail5writeIfLb0EEEPcT_S3_:
  975|   173k|      {
  976|   173k|         using namespace detail_impl;
  977|   173k|         using traits = float_traits<Float>;
  978|   173k|         auto bits = traits::to_bits(value);
  979|   173k|         auto bin_exp = traits::get_exp(bits);
  980|   173k|         auto bin_sig = traits::get_sig(bits);
  981|       |
  982|   173k|         *buffer = '-';
  983|   173k|         buffer += traits::is_negative(bits);
  984|       |
  985|   173k|         const auto* c = &consts_v<OptSize>;
  986|   173k|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|   173k|#define ZMIJ_ASM(x) asm x
  ------------------
  987|   173k|         int64_t threshold = traits::num_bits == 64 ? static_cast<int64_t>(c->threshold) : 10'000'000;
  ------------------
  |  Branch (987:30): [Folded, False: 173k]
  ------------------
  988|       |
  989|   173k|         to_decimal_result dec;
  990|   173k|         bool is_normal = unsigned(bin_exp - 1) < unsigned(traits::exp_mask - 1);
  991|   173k|         if (!is_normal) [[unlikely]] {
  ------------------
  |  Branch (991:14): [True: 58.7k, False: 114k]
  ------------------
  992|  58.7k|            if (bin_exp != 0) {
  ------------------
  |  Branch (992:17): [True: 922, False: 57.8k]
  ------------------
  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|    922|               buffer -= traits::is_negative(bits);
 1000|    922|               memcpy(buffer, "null", 4);
 1001|    922|               return buffer + 4;
 1002|    922|#endif
 1003|    922|            }
 1004|  57.8k|            if (bin_sig == 0) {
  ------------------
  |  Branch (1004:17): [True: 25.8k, False: 31.9k]
  ------------------
 1005|  25.8k|               memcpy(buffer, "0", 2);
 1006|  25.8k|               return buffer + 1;
 1007|  25.8k|            }
 1008|  31.9k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig, 1, true, *c);
 1009|  31.9k|            int64_t dec_sig = dec.sig * 10 + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1009:47): [True: 29.9k, False: 2.04k]
  ------------------
 1010|  31.9k|            int32_t dec_exp = dec.exp;
 1011|   132k|            while (dec_sig < threshold) {
  ------------------
  |  Branch (1011:20): [True: 100k, False: 31.9k]
  ------------------
 1012|   100k|               dec_sig *= 10;
 1013|   100k|               --dec_exp;
 1014|   100k|            }
 1015|  31.9k|            int64_t d = static_cast<int64_t>(detail_impl::div10(static_cast<uint64_t>(dec_sig)));
 1016|  31.9k|            int32_t last_digit = static_cast<int32_t>(dec_sig - d * 10);
 1017|  31.9k|            dec = {d, dec_exp, last_digit, last_digit != 0};
 1018|  31.9k|         }
 1019|   114k|         else {
 1020|   114k|            dec = detail_impl::to_decimal<Float, typename traits::sig_type, OptSize>(bin_sig | traits::implicit_bit,
 1021|   114k|                                                                                     bin_exp, bin_sig != 0, *c);
 1022|   114k|         }
 1023|   146k|         bool extra_digit = dec.sig >= threshold;
 1024|   146k|         int dec_exp = dec.exp + traits::max_digits10 - 2 + extra_digit;
 1025|   146k|         if (traits::num_bits == 32 && dec.sig < 1'000'000) [[unlikely]] {
  ------------------
  |  Branch (1025:14): [True: 146k, Folded]
  |  Branch (1025:40): [True: 8.66k, False: 137k]
  ------------------
 1026|  8.66k|            dec.sig = 10 * dec.sig + (dec.has_last_digit ? dec.last_digit : 0);
  ------------------
  |  Branch (1026:39): [True: 8.35k, False: 309]
  ------------------
 1027|  8.66k|            dec.has_last_digit = false;
 1028|  8.66k|            --dec_exp;
 1029|  8.66k|         }
 1030|       |
 1031|   146k|         char* start = buffer;
 1032|   146k|         auto dig = to_digits<traits::num_bits, OptSize>(static_cast<uint64_t>(dec.sig), extra_digit, *c);
 1033|   146k|         constexpr int bcd_size = traits::num_bits == 64 ? 16 : 8;
  ------------------
  |  Branch (1033:35): [Folded, False: 146k]
  ------------------
 1034|   146k|         if (dec_exp >= traits::min_fixed_dec_exp && dec_exp <= traits::max_fixed_dec_exp) {
  ------------------
  |  Branch (1034:14): [True: 38.6k, False: 107k]
  |  Branch (1034:54): [True: 5.86k, False: 32.7k]
  ------------------
 1035|  5.86k|            memcpy(start, &zeros_v, 8);
 1036|  5.86k|            const auto& fmt = dec_exp_formats.get<traits>(dec_exp);
 1037|  5.86k|            buffer += fmt.start_pos;
 1038|  5.86k|            memcpy(buffer, &dig.digits, bcd_size);
 1039|  5.86k|            memmove(buffer, buffer + !extra_digit, bcd_size);
 1040|  5.86k|            buffer[bcd_size + extra_digit - 1] = static_cast<char>('0' + (dec.has_last_digit ? dec.last_digit : 0));
  ------------------
  |  Branch (1040:75): [True: 3.34k, False: 2.52k]
  ------------------
 1041|  5.86k|            memmove(start + fmt.shift_pos, start + fmt.point_pos, bcd_size);
 1042|  5.86k|            start[fmt.point_pos] = '.';
 1043|  5.86k|            int num_digits = dec.has_last_digit ? bcd_size : dig.num_digits - 1;
  ------------------
  |  Branch (1043:30): [True: 3.34k, False: 2.52k]
  ------------------
 1044|  5.86k|            return buffer + fmt.exp_pos[num_digits + extra_digit - 1];
 1045|  5.86k|         }
 1046|   140k|         buffer += extra_digit;
 1047|   140k|         memcpy(buffer, &dig.digits, bcd_size);
 1048|   140k|         buffer[bcd_size] = static_cast<char>('0' + dec.last_digit);
 1049|   140k|         buffer += dec.has_last_digit ? bcd_size + 1 : dig.num_digits;
  ------------------
  |  Branch (1049:20): [True: 58.1k, False: 82.5k]
  ------------------
 1050|   140k|         start[0] = start[1];
 1051|   140k|         start[1] = '.';
 1052|   140k|         buffer -= (buffer - 1 == start + 1);
 1053|       |
 1054|   140k|         if constexpr (exp_string_table<OptSize>::enable) {
 1055|   140k|            uint64_t exp_data = exp_strings_v<OptSize>.data[dec_exp + exp_string_table<OptSize>::offset];
 1056|   140k|            int len = int(exp_data >> 48);
 1057|   140k|            if (is_big_endian) exp_data = bswap64(exp_data);
  ------------------
  |  Branch (1057:17): [Folded, False: 140k]
  ------------------
 1058|   140k|            memcpy(buffer, &exp_data, traits::max_exponent10 >= 100 ? 8 : 4);
  ------------------
  |  Branch (1058:39): [Folded, False: 140k]
  ------------------
 1059|   140k|            return buffer + len;
 1060|   140k|         }
 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|   140k|         buffer[0] = 'E';
 1067|   140k|         buffer[1] = '-';
 1068|   140k|         buffer += 1 + unsigned(neg);
 1069|   140k|         dec_exp = neg ? -dec_exp : dec_exp;
  ------------------
  |  Branch (1069:20): [True: 0, False: 140k]
  ------------------
 1070|   140k|         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|   140k|         const char* d2 = digits2(dec_exp);
 1087|   140k|         *buffer = d2[0];
 1088|   140k|         buffer += hundreds_written | unsigned(dec_exp >= 10);
 1089|   140k|         *buffer = d2[1];
 1090|   140k|         return buffer + 1;
 1091|   146k|      }
_ZN3glz4zmij11detail_impl12float_traitsIfE7to_bitsEf:
  358|   173k|         {
  359|   173k|            sig_type bits;
  360|   173k|            memcpy(&bits, &value, sizeof(value));
  361|   173k|            return bits;
  362|   173k|         }
_ZN3glz4zmij11detail_impl12float_traitsIfE7get_expEj:
  367|   173k|         {
  368|   173k|            return static_cast<int32_t>((bits << 1) >> (num_sig_bits + 1));
  369|   173k|         }
_ZN3glz4zmij11detail_impl12float_traitsIfE7get_sigEj:
  365|   173k|         static auto get_sig(sig_type bits) noexcept -> sig_type { return bits & (implicit_bit - 1); }
_ZN3glz4zmij11detail_impl12float_traitsIfE11is_negativeEj:
  364|   174k|         static auto is_negative(sig_type bits) noexcept -> bool { return bits >> (num_bits - 1); }
_ZN3glz4zmij11detail_impl10to_decimalIfjLb0EEENS1_17to_decimal_resultET0_lbRKNS1_9constantsIXT1_EEE:
  868|   146k|      {
  869|   146k|         using traits = float_traits<Float>;
  870|   146k|         int64_t bin_exp = raw_exp - traits::exp_offset;
  871|   146k|         constexpr int num_bits = std::numeric_limits<UInt>::digits;
  872|       |
  873|   146k|         constexpr uint64_t log10_2_sig = 78'913;
  874|   146k|         constexpr int32_t log10_2_exp = 18;
  875|   146k|         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|   146k|         else {
  881|   146k|            dec_exp = compute_dec_exp(bin_exp);
  882|   146k|         }
  883|   146k|         uint64_t even = 1 - (bin_sig & 1);
  884|   146k|         constexpr int32_t extra_shift = exp_shift_table<OptSize>::extra_shift;
  885|       |
  886|   146k|         if (!regular) [[unlikely]] {
  ------------------
  |  Branch (886:14): [True: 12.7k, False: 133k]
  ------------------
  887|  12.7k|            int32_t irregular_dec_exp = compute_dec_exp(bin_exp, false);
  888|  12.7k|            int32_t shift = compute_exp_shift(bin_exp, irregular_dec_exp + 1) + extra_shift;
  889|  12.7k|            uint128 pow10 = c.pow10_significands[-irregular_dec_exp - 1];
  890|  12.7k|            uint128 p = umul192_hi128(pow10.hi, pow10.lo, bin_sig << shift);
  891|       |
  892|  12.7k|            int64_t integral = p.hi >> extra_shift;
  893|  12.7k|            uint64_t fractional = p.hi << (64 - extra_shift) | p.lo >> extra_shift;
  894|       |
  895|  12.7k|            uint64_t half_ulp = pow10.hi >> (extra_shift + 1 - shift);
  896|  12.7k|            bool round_up = half_ulp > ~uint64_t(0) - fractional;
  897|  12.7k|            bool round_down = (half_ulp >> 1) > fractional;
  898|  12.7k|            integral += round_up;
  899|       |
  900|  12.7k|            int32_t digit = static_cast<int32_t>(umul128_add_hi64(fractional, 10, (uint64_t(1) << 63) - 1));
  901|  12.7k|            int32_t lo = static_cast<int32_t>(umul128_add_hi64(fractional - (half_ulp >> 1), 10, ~uint64_t(0)));
  902|  12.7k|            if (digit < lo) digit = lo;
  ------------------
  |  Branch (902:17): [True: 4.13k, False: 8.62k]
  ------------------
  903|  12.7k|            return {integral, irregular_dec_exp, digit, (round_up + round_down) == 0};
  904|  12.7k|         }
  905|       |
  906|   133k|         if constexpr (num_bits == 32) {
  907|   133k|            constexpr int32_t float_extra_shift = 34;
  908|   133k|            int32_t shift = compute_exp_shift(bin_exp, dec_exp + 1) + float_extra_shift;
  909|   133k|            uint64_t pow10_hi = c.pow10_significands[-dec_exp - 1].hi;
  910|   133k|            uint64_t p = umul128_hi64(pow10_hi + 1, uint64_t(bin_sig) << shift);
  911|       |
  912|   133k|            int64_t integral = p >> float_extra_shift;
  913|   133k|            uint64_t fractional = p & ((1ull << float_extra_shift) - 1);
  914|       |
  915|   133k|            uint64_t half_ulp = (pow10_hi >> (65 - shift)) + even;
  916|   133k|            bool round_up = (fractional + half_ulp) >> float_extra_shift;
  917|   133k|            bool round_down = half_ulp > fractional;
  918|   133k|            integral += round_up;
  919|       |
  920|   133k|            uint64_t prod = fractional * 10;
  921|   133k|            int32_t digit = static_cast<int32_t>(prod >> float_extra_shift);
  922|   133k|            uint64_t rem = prod & ((1ull << float_extra_shift) - 1);
  923|   133k|            digit +=
  924|   133k|               rem > (1ull << (float_extra_shift - 1)) || (rem == (1ull << (float_extra_shift - 1)) && (digit & 1));
  ------------------
  |  Branch (924:16): [True: 67.6k, False: 66.1k]
  |  Branch (924:60): [True: 494, False: 65.6k]
  |  Branch (924:104): [True: 9, False: 485]
  ------------------
  925|   133k|            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|   133k|      }
_ZN3glz4zmij11detail_impl9to_digitsILi32ELb0EEENS1_10dec_digitsIXT_EEEmbRKNS1_9constantsIXT0_EEE:
  809|   146k|      {
  810|   146k|         if constexpr (num_bits == 32) {
  811|   146k|            auto result = to_bcd8<OptSize>(value);
  812|   146k|            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|   146k|      }
_ZN3glz4zmij11detail_impl7to_bcd8ILb0EEENS1_10bcd_resultEm:
  753|   146k|      {
  754|   146k|         if (!ZMIJ_USE_SSE && !ZMIJ_USE_NEON) {
  ------------------
  |  |   63|   146k|#define ZMIJ_USE_SSE ZMIJ_USE_SIMD
  |  |  ------------------
  |  |  |  |   41|   293k|#define ZMIJ_USE_SIMD 1
  |  |  ------------------
  ------------------
                       if (!ZMIJ_USE_SSE && !ZMIJ_USE_NEON) {
  ------------------
  |  |   55|      0|#define ZMIJ_USE_NEON 0
  ------------------
  |  Branch (754:14): [Folded, False: 146k]
  |  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|   146k|         const auto* c = &consts_v<OptSize>;
  764|   146k|         ZMIJ_ASM(("" : "+r"(c)));
  ------------------
  |  |  126|   146k|#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|   146k|            (abcdefgh << 32) - uint64_t((10000ull << 32) - 1) * ((abcdefgh * div10k_sig) >> div10k_exp);
  781|   146k|         uint64_t bcd = lo_u64(to_bcd_4x4(_mm_set_epi64x(0, abcd_efgh), *c));
  782|   146k|         return {bcd, count_trailing_nonzeros(bcd)};
  783|   146k|#endif
  784|   146k|      }
_ZN3glz4zmij11detail_impl6lo_u64EDv2_x:
  700|   146k|      {
  701|   146k|#if defined(__x86_64__) || defined(_M_X64)
  702|   146k|         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|   146k|      }
_ZN3glz4zmij11detail_impl23count_trailing_nonzerosEm:
  568|   146k|      {
  569|   146k|         if (is_big_endian) x = bswap64(x);
  ------------------
  |  Branch (569:14): [Folded, False: 146k]
  ------------------
  570|   146k|         return (size_t(70) - clz((x << 1) | 1)) / 8;
  571|   146k|      }
_ZNK3glz4zmij11detail_impl20dec_exp_format_table3getINS1_12float_traitsIfEEEERKNS2_5entryEi:
  559|  5.86k|         {
  560|  5.86k|            constexpr auto min = traits::min_fixed_dec_exp, max = Traits::max_fixed_dec_exp;
  561|  5.86k|            unsigned i = unsigned(dec_exp - min);
  562|  5.86k|            return data[i <= unsigned(max - min) ? i : num_entries - 1];
  ------------------
  |  Branch (562:25): [True: 5.86k, False: 0]
  ------------------
  563|  5.86k|         }

