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

_ZN3glz12cbor_to_jsonITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__16vectorIcNS2_9allocatorIcEEEENS2_12basic_stringIcNS2_11char_traitsIcEES5_EEEENS_9error_ctxERKT0_RT1_:
  746|  8.46k|   {
  747|  8.46k|      size_t ix{}; // write index
  748|       |
  749|  8.46k|      auto* it = cbor.data();
  750|  8.46k|      auto* end = it + cbor.size();
  751|       |
  752|  8.46k|      context ctx{};
  753|       |
  754|  2.67M|      while (it < end) {
  ------------------
  |  Branch (754:14): [True: 2.67M, False: 4.19k]
  ------------------
  755|  2.67M|         detail::cbor_to_json_value<Opts>(ctx, it, end, out, ix, 0);
  756|  2.67M|         if (bool(ctx.error)) {
  ------------------
  |  Branch (756:14): [True: 4.26k, False: 2.66M]
  ------------------
  757|  4.26k|            return {0, ctx.error};
  758|  4.26k|         }
  759|  2.67M|      }
  760|       |
  761|  4.19k|      if constexpr (resizable<JSONBuffer>) {
  762|  4.19k|         out.resize(ix);
  763|  4.19k|      }
  764|       |
  765|  4.19k|      return {};
  766|  8.46k|   }
_ZN3glz6detail18cbor_to_json_valueITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
   86|  3.52M|      {
   87|  3.52M|         using namespace cbor;
   88|       |
   89|       |         // Check recursion depth limit
   90|  3.52M|         if (recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (90:14): [True: 3, False: 3.52M]
  ------------------
   91|      3|            ctx.error = error_code::exceeded_max_recursive_depth;
   92|      3|            return;
   93|      3|         }
   94|       |
   95|  3.52M|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (95:14): [True: 677, False: 3.52M]
  ------------------
   96|    677|            ctx.error = error_code::unexpected_end;
   97|    677|            return;
   98|    677|         }
   99|       |
  100|  3.52M|         uint8_t initial;
  101|  3.52M|         std::memcpy(&initial, it, 1);
  102|  3.52M|         ++it;
  103|       |
  104|  3.52M|         const uint8_t major_type = get_major_type(initial);
  105|  3.52M|         const uint8_t additional_info = get_additional_info(initial);
  106|       |
  107|  3.52M|         switch (major_type) {
  108|  2.45M|         case major::uint: {
  ------------------
  |  Branch (108:10): [True: 2.45M, False: 1.07M]
  ------------------
  109|       |            // Unsigned integer
  110|  2.45M|            const uint64_t value = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  111|  2.45M|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (111:17): [True: 151, False: 2.45M]
  ------------------
  112|    151|               return;
  113|  2.45M|            to<JSON, uint64_t>::template op<Opts>(value, ctx, out, ix);
  114|  2.45M|            break;
  115|  2.45M|         }
  116|       |
  117|  46.1k|         case major::nint: {
  ------------------
  |  Branch (117:10): [True: 46.1k, False: 3.47M]
  ------------------
  118|       |            // Negative integer: -1 - n
  119|  46.1k|            const uint64_t n = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  120|  46.1k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (120:17): [True: 121, False: 46.0k]
  ------------------
  121|    121|               return;
  122|       |            // Use two's complement trick for safe conversion
  123|  46.0k|            const int64_t value = static_cast<int64_t>(~n);
  124|  46.0k|            to<JSON, int64_t>::template op<Opts>(value, ctx, out, ix);
  125|  46.0k|            break;
  126|  46.1k|         }
  127|       |
  128|   234k|         case major::bstr: {
  ------------------
  |  Branch (128:10): [True: 234k, False: 3.28M]
  ------------------
  129|       |            // Byte string - encode as base64 in JSON
  130|   234k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (130:17): [True: 6.82k, False: 227k]
  ------------------
  131|       |               // Indefinite-length byte string - collect chunks first
  132|  6.82k|               std::vector<uint8_t> bytes;
  133|   149k|               while (true) {
  ------------------
  |  Branch (133:23): [True: 149k, Folded]
  ------------------
  134|   149k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (134:23): [True: 98, False: 149k]
  ------------------
  135|     98|                     ctx.error = error_code::unexpected_end;
  136|     98|                     return;
  137|     98|                  }
  138|   149k|                  uint8_t chunk_initial;
  139|   149k|                  std::memcpy(&chunk_initial, it, 1);
  140|       |
  141|   149k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (141:23): [True: 6.58k, False: 142k]
  ------------------
  142|  6.58k|                     ++it;
  143|  6.58k|                     break;
  144|  6.58k|                  }
  145|       |
  146|   142k|                  ++it;
  147|   142k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  148|   142k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  149|       |
  150|   142k|                  if (chunk_major != major::bstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (150:23): [True: 26, False: 142k]
  |  Branch (150:53): [True: 3, False: 142k]
  ------------------
  151|     29|                     ctx.error = error_code::syntax_error;
  152|     29|                     return;
  153|     29|                  }
  154|       |
  155|   142k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  156|   142k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (156:23): [True: 6, False: 142k]
  ------------------
  157|      6|                     return;
  158|       |
  159|   142k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (159:23): [True: 111, False: 142k]
  ------------------
  160|    111|                     ctx.error = error_code::unexpected_end;
  161|    111|                     return;
  162|    111|                  }
  163|       |
  164|   142k|                  if (chunk_len > 0) {
  ------------------
  |  Branch (164:23): [True: 141k, False: 923]
  ------------------
  165|   141k|                     const size_t old_size = bytes.size();
  166|   141k|                     bytes.resize(old_size + chunk_len);
  167|   141k|                     std::memcpy(bytes.data() + old_size, it, chunk_len);
  168|   141k|                     it += chunk_len;
  169|   141k|                  }
  170|   142k|               }
  171|       |               // Write as base64-encoded string
  172|  6.58k|               dump('"', out, ix);
  173|       |               // Simple hex encoding for now (TODO: proper base64)
  174|  1.72M|               for (uint8_t b : bytes) {
  ------------------
  |  Branch (174:31): [True: 1.72M, False: 6.58k]
  ------------------
  175|  1.72M|                  static constexpr char hex[] = "0123456789abcdef";
  176|  1.72M|                  dump(hex[(b >> 4) & 0xf], out, ix);
  177|  1.72M|                  dump(hex[b & 0xf], out, ix);
  178|  1.72M|               }
  179|  6.58k|               dump('"', out, ix);
  180|  6.58k|            }
  181|   227k|            else {
  182|   227k|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  183|   227k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (183:20): [True: 23, False: 227k]
  ------------------
  184|     23|                  return;
  185|       |
  186|   227k|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (186:20): [True: 205, False: 227k]
  ------------------
  187|    205|                  ctx.error = error_code::unexpected_end;
  188|    205|                  return;
  189|    205|               }
  190|       |
  191|       |               // Write as hex-encoded string
  192|   227k|               dump('"', out, ix);
  193|  1.47M|               for (uint64_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (193:37): [True: 1.24M, False: 227k]
  ------------------
  194|  1.24M|                  static constexpr char hex[] = "0123456789abcdef";
  195|  1.24M|                  uint8_t b;
  196|  1.24M|                  std::memcpy(&b, it + i, 1);
  197|  1.24M|                  dump(hex[(b >> 4) & 0xf], out, ix);
  198|  1.24M|                  dump(hex[b & 0xf], out, ix);
  199|  1.24M|               }
  200|   227k|               dump('"', out, ix);
  201|   227k|               it += length;
  202|   227k|            }
  203|   234k|            break;
  204|   234k|         }
  205|       |
  206|   234k|         case major::tstr: {
  ------------------
  |  Branch (206:10): [True: 35.5k, False: 3.48M]
  ------------------
  207|       |            // Text string
  208|  35.5k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (208:17): [True: 6.13k, False: 29.4k]
  ------------------
  209|       |               // Indefinite-length text string - concatenate chunks
  210|  6.13k|               std::string str;
  211|   114k|               while (true) {
  ------------------
  |  Branch (211:23): [True: 114k, Folded]
  ------------------
  212|   114k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (212:23): [True: 171, False: 114k]
  ------------------
  213|    171|                     ctx.error = error_code::unexpected_end;
  214|    171|                     return;
  215|    171|                  }
  216|   114k|                  uint8_t chunk_initial;
  217|   114k|                  std::memcpy(&chunk_initial, it, 1);
  218|       |
  219|   114k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (219:23): [True: 5.62k, False: 108k]
  ------------------
  220|  5.62k|                     ++it;
  221|  5.62k|                     break;
  222|  5.62k|                  }
  223|       |
  224|   108k|                  ++it;
  225|   108k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  226|   108k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  227|       |
  228|   108k|                  if (chunk_major != major::tstr || chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (228:23): [True: 60, False: 108k]
  |  Branch (228:53): [True: 3, False: 108k]
  ------------------
  229|     63|                     ctx.error = error_code::syntax_error;
  230|     63|                     return;
  231|     63|                  }
  232|       |
  233|   108k|                  const uint64_t chunk_len = cbor_to_json_decode_arg(ctx, it, end, chunk_info);
  234|   108k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (234:23): [True: 84, False: 108k]
  ------------------
  235|     84|                     return;
  236|       |
  237|   108k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (237:23): [True: 196, False: 108k]
  ------------------
  238|    196|                     ctx.error = error_code::unexpected_end;
  239|    196|                     return;
  240|    196|                  }
  241|       |
  242|   108k|                  str.append(reinterpret_cast<const char*>(it), chunk_len);
  243|   108k|                  it += chunk_len;
  244|   108k|               }
  245|  5.62k|               to<JSON, std::string_view>::template op<Opts>(str, ctx, out, ix);
  246|  5.62k|            }
  247|  29.4k|            else {
  248|  29.4k|               const uint64_t length = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  249|  29.4k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (249:20): [True: 181, False: 29.2k]
  ------------------
  250|    181|                  return;
  251|       |
  252|  29.2k|               if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (252:20): [True: 408, False: 28.8k]
  ------------------
  253|    408|                  ctx.error = error_code::unexpected_end;
  254|    408|                  return;
  255|    408|               }
  256|       |
  257|  28.8k|               const sv value{reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  258|  28.8k|               to<JSON, sv>::template op<Opts>(value, ctx, out, ix);
  259|  28.8k|               it += length;
  260|  28.8k|            }
  261|  34.4k|            break;
  262|  35.5k|         }
  263|       |
  264|  66.1k|         case major::array: {
  ------------------
  |  Branch (264:10): [True: 66.1k, False: 3.45M]
  ------------------
  265|  66.1k|            dump('[', out, ix);
  266|       |
  267|  66.1k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (267:17): [True: 2.99k, False: 63.1k]
  ------------------
  268|       |               // Indefinite-length array
  269|  2.99k|               bool first = true;
  270|   210k|               while (true) {
  ------------------
  |  Branch (270:23): [True: 210k, Folded]
  ------------------
  271|   210k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (271:23): [True: 101, False: 210k]
  ------------------
  272|    101|                     ctx.error = error_code::unexpected_end;
  273|    101|                     return;
  274|    101|                  }
  275|   210k|                  uint8_t peek;
  276|   210k|                  std::memcpy(&peek, it, 1);
  277|       |
  278|   210k|                  if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (278:23): [True: 1.39k, False: 209k]
  ------------------
  279|  1.39k|                     ++it;
  280|  1.39k|                     break;
  281|  1.39k|                  }
  282|       |
  283|   209k|                  if (!first) {
  ------------------
  |  Branch (283:23): [True: 206k, False: 2.87k]
  ------------------
  284|   206k|                     dump(',', out, ix);
  285|       |                     if constexpr (Opts.prettify) {
  286|       |                        dump(' ', out, ix);
  287|       |                     }
  288|   206k|                  }
  289|   209k|                  first = false;
  290|       |
  291|   209k|                  cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  292|   209k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (292:23): [True: 1.50k, False: 207k]
  ------------------
  293|  1.50k|                     return;
  294|   209k|               }
  295|  2.99k|            }
  296|  63.1k|            else {
  297|  63.1k|               const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  298|  63.1k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (298:20): [True: 96, False: 63.0k]
  ------------------
  299|     96|                  return;
  300|       |
  301|   506k|               for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (301:37): [True: 449k, False: 57.4k]
  ------------------
  302|   449k|                  if (i > 0) {
  ------------------
  |  Branch (302:23): [True: 441k, False: 8.03k]
  ------------------
  303|   441k|                     dump(',', out, ix);
  304|       |                     if constexpr (Opts.prettify) {
  305|       |                        dump(' ', out, ix);
  306|       |                     }
  307|   441k|                  }
  308|   449k|                  cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  309|   449k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (309:23): [True: 5.59k, False: 443k]
  ------------------
  310|  5.59k|                     return;
  311|   449k|               }
  312|  63.0k|            }
  313|       |
  314|  58.8k|            dump(']', out, ix);
  315|  58.8k|            break;
  316|  66.1k|         }
  317|       |
  318|  78.4k|         case major::map: {
  ------------------
  |  Branch (318:10): [True: 78.4k, False: 3.44M]
  ------------------
  319|  78.4k|            dump('{', out, ix);
  320|       |            if constexpr (Opts.prettify) {
  321|       |               ctx.depth += check_indentation_width(Opts);
  322|       |            }
  323|       |
  324|  78.4k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (324:17): [True: 1.94k, False: 76.4k]
  ------------------
  325|       |               // Indefinite-length map
  326|  1.94k|               bool first = true;
  327|  55.0k|               while (true) {
  ------------------
  |  Branch (327:23): [True: 55.0k, Folded]
  ------------------
  328|  55.0k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (328:23): [True: 146, False: 54.9k]
  ------------------
  329|    146|                     ctx.error = error_code::unexpected_end;
  330|    146|                     return;
  331|    146|                  }
  332|  54.9k|                  uint8_t peek;
  333|  54.9k|                  std::memcpy(&peek, it, 1);
  334|       |
  335|  54.9k|                  if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (335:23): [True: 854, False: 54.0k]
  ------------------
  336|    854|                     ++it;
  337|    854|                     break;
  338|    854|                  }
  339|       |
  340|  54.0k|                  if (!first) {
  ------------------
  |  Branch (340:23): [True: 52.2k, False: 1.84k]
  ------------------
  341|  52.2k|                     dump(',', out, ix);
  342|  52.2k|                  }
  343|       |                  if constexpr (Opts.prettify) {
  344|       |                     dump('\n', out, ix);
  345|       |                     dumpn(check_indentation_char(Opts), ctx.depth, out, ix);
  346|       |                  }
  347|  54.0k|                  first = false;
  348|       |
  349|       |                  // Key (must be string for JSON compatibility)
  350|  54.0k|                  cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  351|  54.0k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (351:23): [True: 177, False: 53.8k]
  ------------------
  352|    177|                     return;
  353|       |
  354|       |                  if constexpr (Opts.prettify) {
  355|       |                     dump(": ", out, ix);
  356|       |                  }
  357|  53.8k|                  else {
  358|  53.8k|                     dump(':', out, ix);
  359|  53.8k|                  }
  360|       |
  361|       |                  // Value
  362|  53.8k|                  cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  363|  53.8k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (363:23): [True: 768, False: 53.1k]
  ------------------
  364|    768|                     return;
  365|  53.8k|               }
  366|  1.94k|            }
  367|  76.4k|            else {
  368|  76.4k|               const uint64_t count = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  369|  76.4k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (369:20): [True: 85, False: 76.3k]
  ------------------
  370|     85|                  return;
  371|       |
  372|   112k|               for (uint64_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (372:37): [True: 38.1k, False: 74.1k]
  ------------------
  373|  38.1k|                  if (i > 0) {
  ------------------
  |  Branch (373:23): [True: 35.1k, False: 2.95k]
  ------------------
  374|  35.1k|                     dump(',', out, ix);
  375|  35.1k|                  }
  376|       |                  if constexpr (Opts.prettify) {
  377|       |                     dump('\n', out, ix);
  378|       |                     dumpn(check_indentation_char(Opts), ctx.depth, out, ix);
  379|       |                  }
  380|       |
  381|       |                  // Key
  382|  38.1k|                  cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  383|  38.1k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (383:23): [True: 725, False: 37.3k]
  ------------------
  384|    725|                     return;
  385|       |
  386|       |                  if constexpr (Opts.prettify) {
  387|       |                     dump(": ", out, ix);
  388|       |                  }
  389|  37.3k|                  else {
  390|  37.3k|                     dump(':', out, ix);
  391|  37.3k|                  }
  392|       |
  393|       |                  // Value
  394|  37.3k|                  cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  395|  37.3k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (395:23): [True: 1.54k, False: 35.8k]
  ------------------
  396|  1.54k|                     return;
  397|  37.3k|               }
  398|  76.3k|            }
  399|       |
  400|       |            if constexpr (Opts.prettify) {
  401|       |               ctx.depth -= check_indentation_width(Opts);
  402|       |               if (additional_info != 0 || additional_info == info::indefinite) {
  403|       |                  dump('\n', out, ix);
  404|       |                  dumpn(check_indentation_char(Opts), ctx.depth, out, ix);
  405|       |               }
  406|       |            }
  407|  74.9k|            dump('}', out, ix);
  408|  74.9k|            break;
  409|  78.4k|         }
  410|       |
  411|  67.4k|         case major::tag: {
  ------------------
  |  Branch (411:10): [True: 67.4k, False: 3.45M]
  ------------------
  412|       |            // Semantic tag - for JSON output, we skip the tag and output the content
  413|       |            // Some tags could have special handling (e.g., datetime)
  414|  67.4k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  415|  67.4k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (415:17): [True: 42, False: 67.4k]
  ------------------
  416|     42|               return;
  417|       |
  418|       |            // Check for typed arrays (RFC 8746)
  419|  67.4k|            const auto ta_info = typed_array::get_info(tag_num);
  420|  67.4k|            if (ta_info.valid) {
  ------------------
  |  Branch (420:17): [True: 29.2k, False: 38.1k]
  ------------------
  421|       |               // It's a typed array - read the byte string and convert elements
  422|  29.2k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (422:20): [True: 51, False: 29.1k]
  ------------------
  423|     51|                  ctx.error = error_code::unexpected_end;
  424|     51|                  return;
  425|     51|               }
  426|       |
  427|  29.1k|               uint8_t bstr_initial;
  428|  29.1k|               std::memcpy(&bstr_initial, it, 1);
  429|  29.1k|               ++it;
  430|       |
  431|  29.1k|               if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (431:20): [True: 14, False: 29.1k]
  ------------------
  432|     14|                  ctx.error = error_code::syntax_error;
  433|     14|                  return;
  434|     14|               }
  435|       |
  436|  29.1k|               const uint64_t byte_len = cbor_to_json_decode_arg(ctx, it, end, get_additional_info(bstr_initial));
  437|  29.1k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (437:20): [True: 63, False: 29.0k]
  ------------------
  438|     63|                  return;
  439|       |
  440|  29.0k|               if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (440:20): [True: 169, False: 28.9k]
  ------------------
  441|    169|                  ctx.error = error_code::unexpected_end;
  442|    169|                  return;
  443|    169|               }
  444|       |
  445|  28.9k|               if (byte_len % ta_info.element_size != 0) [[unlikely]] {
  ------------------
  |  Branch (445:20): [True: 3, False: 28.9k]
  ------------------
  446|      3|                  ctx.error = error_code::syntax_error;
  447|      3|                  return;
  448|      3|               }
  449|       |
  450|  28.9k|               const size_t count = byte_len / ta_info.element_size;
  451|  28.9k|               const bool need_swap = typed_array::needs_byteswap(tag_num);
  452|       |
  453|  28.9k|               dump('[', out, ix);
  454|       |
  455|  1.07M|               for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (455:35): [True: 1.05M, False: 28.9k]
  ------------------
  456|  1.05M|                  if (i > 0) {
  ------------------
  |  Branch (456:23): [True: 1.03M, False: 11.6k]
  ------------------
  457|  1.03M|                     dump(',', out, ix);
  458|  1.03M|                  }
  459|       |
  460|       |                  // Read and optionally byteswap the element
  461|  1.05M|                  if (ta_info.is_float) {
  ------------------
  |  Branch (461:23): [True: 501k, False: 548k]
  ------------------
  462|   501k|                     if (ta_info.element_size == 4) {
  ------------------
  |  Branch (462:26): [True: 381k, False: 120k]
  ------------------
  463|   381k|                        float val;
  464|   381k|                        std::memcpy(&val, it, 4);
  465|   381k|                        if (need_swap) {
  ------------------
  |  Branch (465:29): [True: 374k, False: 7.32k]
  ------------------
  466|   374k|                           uint32_t bits;
  467|   374k|                           std::memcpy(&bits, &val, 4);
  468|   374k|                           bits = std::byteswap(bits);
  469|   374k|                           std::memcpy(&val, &bits, 4);
  470|   374k|                        }
  471|   381k|                        to<JSON, float>::template op<Opts>(val, ctx, out, ix);
  472|   381k|                     }
  473|   120k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (473:31): [True: 120k, False: 2]
  ------------------
  474|   120k|                        double val;
  475|   120k|                        std::memcpy(&val, it, 8);
  476|   120k|                        if (need_swap) {
  ------------------
  |  Branch (476:29): [True: 38.4k, False: 81.6k]
  ------------------
  477|  38.4k|                           uint64_t bits;
  478|  38.4k|                           std::memcpy(&bits, &val, 8);
  479|  38.4k|                           bits = std::byteswap(bits);
  480|  38.4k|                           std::memcpy(&val, &bits, 8);
  481|  38.4k|                        }
  482|   120k|                        to<JSON, double>::template op<Opts>(val, ctx, out, ix);
  483|   120k|                     }
  484|      2|                     else {
  485|      2|                        ctx.error = error_code::syntax_error;
  486|      2|                        return;
  487|      2|                     }
  488|   501k|                  }
  489|   548k|                  else if (ta_info.is_signed) {
  ------------------
  |  Branch (489:28): [True: 195k, False: 353k]
  ------------------
  490|   195k|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (490:26): [True: 69.2k, False: 125k]
  ------------------
  491|  69.2k|                        int8_t val;
  492|  69.2k|                        std::memcpy(&val, it, 1);
  493|  69.2k|                        to<JSON, int8_t>::template op<Opts>(val, ctx, out, ix);
  494|  69.2k|                     }
  495|   125k|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (495:31): [True: 16.8k, False: 109k]
  ------------------
  496|  16.8k|                        int16_t val;
  497|  16.8k|                        std::memcpy(&val, it, 2);
  498|  16.8k|                        if (need_swap) {
  ------------------
  |  Branch (498:29): [True: 1.46k, False: 15.3k]
  ------------------
  499|  1.46k|                           uint16_t bits;
  500|  1.46k|                           std::memcpy(&bits, &val, 2);
  501|  1.46k|                           bits = std::byteswap(bits);
  502|  1.46k|                           std::memcpy(&val, &bits, 2);
  503|  1.46k|                        }
  504|  16.8k|                        to<JSON, int16_t>::template op<Opts>(val, ctx, out, ix);
  505|  16.8k|                     }
  506|   109k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (506:31): [True: 39.3k, False: 69.6k]
  ------------------
  507|  39.3k|                        int32_t val;
  508|  39.3k|                        std::memcpy(&val, it, 4);
  509|  39.3k|                        if (need_swap) {
  ------------------
  |  Branch (509:29): [True: 4.64k, False: 34.7k]
  ------------------
  510|  4.64k|                           uint32_t bits;
  511|  4.64k|                           std::memcpy(&bits, &val, 4);
  512|  4.64k|                           bits = std::byteswap(bits);
  513|  4.64k|                           std::memcpy(&val, &bits, 4);
  514|  4.64k|                        }
  515|  39.3k|                        to<JSON, int32_t>::template op<Opts>(val, ctx, out, ix);
  516|  39.3k|                     }
  517|  69.6k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (517:31): [True: 69.6k, False: 0]
  ------------------
  518|  69.6k|                        int64_t val;
  519|  69.6k|                        std::memcpy(&val, it, 8);
  520|  69.6k|                        if (need_swap) {
  ------------------
  |  Branch (520:29): [True: 20.3k, False: 49.3k]
  ------------------
  521|  20.3k|                           uint64_t bits;
  522|  20.3k|                           std::memcpy(&bits, &val, 8);
  523|  20.3k|                           bits = std::byteswap(bits);
  524|  20.3k|                           std::memcpy(&val, &bits, 8);
  525|  20.3k|                        }
  526|  69.6k|                        to<JSON, int64_t>::template op<Opts>(val, ctx, out, ix);
  527|  69.6k|                     }
  528|   195k|                  }
  529|   353k|                  else {
  530|       |                     // Unsigned
  531|   353k|                     if (ta_info.element_size == 1) {
  ------------------
  |  Branch (531:26): [True: 201k, False: 151k]
  ------------------
  532|   201k|                        uint8_t val;
  533|   201k|                        std::memcpy(&val, it, 1);
  534|   201k|                        to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  535|   201k|                     }
  536|   151k|                     else if (ta_info.element_size == 2) {
  ------------------
  |  Branch (536:31): [True: 50.2k, False: 101k]
  ------------------
  537|  50.2k|                        uint16_t val;
  538|  50.2k|                        std::memcpy(&val, it, 2);
  539|  50.2k|                        if (need_swap) {
  ------------------
  |  Branch (539:29): [True: 1.35k, False: 48.8k]
  ------------------
  540|  1.35k|                           val = std::byteswap(val);
  541|  1.35k|                        }
  542|  50.2k|                        to<JSON, uint16_t>::template op<Opts>(val, ctx, out, ix);
  543|  50.2k|                     }
  544|   101k|                     else if (ta_info.element_size == 4) {
  ------------------
  |  Branch (544:31): [True: 18.4k, False: 83.2k]
  ------------------
  545|  18.4k|                        uint32_t val;
  546|  18.4k|                        std::memcpy(&val, it, 4);
  547|  18.4k|                        if (need_swap) {
  ------------------
  |  Branch (547:29): [True: 16.2k, False: 2.14k]
  ------------------
  548|  16.2k|                           val = std::byteswap(val);
  549|  16.2k|                        }
  550|  18.4k|                        to<JSON, uint32_t>::template op<Opts>(val, ctx, out, ix);
  551|  18.4k|                     }
  552|  83.2k|                     else if (ta_info.element_size == 8) {
  ------------------
  |  Branch (552:31): [True: 83.2k, False: 0]
  ------------------
  553|  83.2k|                        uint64_t val;
  554|  83.2k|                        std::memcpy(&val, it, 8);
  555|  83.2k|                        if (need_swap) {
  ------------------
  |  Branch (555:29): [True: 6.85k, False: 76.3k]
  ------------------
  556|  6.85k|                           val = std::byteswap(val);
  557|  6.85k|                        }
  558|  83.2k|                        to<JSON, uint64_t>::template op<Opts>(val, ctx, out, ix);
  559|  83.2k|                     }
  560|   353k|                  }
  561|       |
  562|  1.05M|                  it += ta_info.element_size;
  563|  1.05M|               }
  564|       |
  565|  28.9k|               dump(']', out, ix);
  566|  28.9k|            }
  567|  38.1k|            else {
  568|       |               // Other tags - just output the tagged content
  569|  38.1k|               cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  570|  38.1k|            }
  571|  67.1k|            break;
  572|  67.4k|         }
  573|       |
  574|   542k|         case major::simple: {
  ------------------
  |  Branch (574:10): [True: 542k, False: 2.97M]
  ------------------
  575|   542k|            switch (additional_info) {
  576|   220k|            case simple::false_value:
  ------------------
  |  Branch (576:13): [True: 220k, False: 321k]
  ------------------
  577|   220k|               dump("false", out, ix);
  578|   220k|               break;
  579|  44.1k|            case simple::true_value:
  ------------------
  |  Branch (579:13): [True: 44.1k, False: 497k]
  ------------------
  580|  44.1k|               dump("true", out, ix);
  581|  44.1k|               break;
  582|  6.31k|            case simple::null_value:
  ------------------
  |  Branch (582:13): [True: 6.31k, False: 535k]
  ------------------
  583|  9.97k|            case simple::undefined:
  ------------------
  |  Branch (583:13): [True: 3.66k, False: 538k]
  ------------------
  584|  9.97k|               dump("null", out, ix);
  585|  9.97k|               break;
  586|   228k|            case simple::float16: {
  ------------------
  |  Branch (586:13): [True: 228k, False: 313k]
  ------------------
  587|   228k|               if ((it + 2) > end) [[unlikely]] {
  ------------------
  |  Branch (587:20): [True: 27, False: 228k]
  ------------------
  588|     27|                  ctx.error = error_code::unexpected_end;
  589|     27|                  return;
  590|     27|               }
  591|   228k|               uint16_t half;
  592|   228k|               std::memcpy(&half, it, 2);
  593|   228k|               if constexpr (std::endian::native == std::endian::little) {
  594|   228k|                  half = std::byteswap(half);
  595|   228k|               }
  596|   228k|               it += 2;
  597|   228k|               const double value = decode_half(half);
  598|   228k|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  599|   228k|               break;
  600|   228k|            }
  601|  10.8k|            case simple::float32: {
  ------------------
  |  Branch (601:13): [True: 10.8k, False: 531k]
  ------------------
  602|  10.8k|               if ((it + 4) > end) [[unlikely]] {
  ------------------
  |  Branch (602:20): [True: 16, False: 10.8k]
  ------------------
  603|     16|                  ctx.error = error_code::unexpected_end;
  604|     16|                  return;
  605|     16|               }
  606|  10.8k|               uint32_t bits;
  607|  10.8k|               std::memcpy(&bits, it, 4);
  608|  10.8k|               if constexpr (std::endian::native == std::endian::little) {
  609|  10.8k|                  bits = std::byteswap(bits);
  610|  10.8k|               }
  611|  10.8k|               float value;
  612|  10.8k|               std::memcpy(&value, &bits, 4);
  613|  10.8k|               it += 4;
  614|  10.8k|               to<JSON, float>::template op<Opts>(value, ctx, out, ix);
  615|  10.8k|               break;
  616|  10.8k|            }
  617|  7.09k|            case simple::float64: {
  ------------------
  |  Branch (617:13): [True: 7.09k, False: 535k]
  ------------------
  618|  7.09k|               if ((it + 8) > end) [[unlikely]] {
  ------------------
  |  Branch (618:20): [True: 25, False: 7.07k]
  ------------------
  619|     25|                  ctx.error = error_code::unexpected_end;
  620|     25|                  return;
  621|     25|               }
  622|  7.07k|               uint64_t bits;
  623|  7.07k|               std::memcpy(&bits, it, 8);
  624|  7.07k|               if constexpr (std::endian::native == std::endian::little) {
  625|  7.07k|                  bits = std::byteswap(bits);
  626|  7.07k|               }
  627|  7.07k|               double value;
  628|  7.07k|               std::memcpy(&value, &bits, 8);
  629|  7.07k|               it += 8;
  630|  7.07k|               to<JSON, double>::template op<Opts>(value, ctx, out, ix);
  631|  7.07k|               break;
  632|  7.09k|            }
  633|    220|            case simple::break_code:
  ------------------
  |  Branch (633:13): [True: 220, False: 541k]
  ------------------
  634|    220|               ctx.error = error_code::syntax_error; // Unexpected break
  635|    220|               break;
  636|  20.5k|            default:
  ------------------
  |  Branch (636:13): [True: 20.5k, False: 521k]
  ------------------
  637|  20.5k|               if (additional_info < 24) {
  ------------------
  |  Branch (637:20): [True: 17.5k, False: 3.01k]
  ------------------
  638|       |                  // Simple value 0-23 - output as number
  639|  17.5k|                  to<JSON, uint8_t>::template op<Opts>(additional_info, ctx, out, ix);
  640|  17.5k|               }
  641|  3.01k|               else if (additional_info == 24) {
  ------------------
  |  Branch (641:25): [True: 2.99k, False: 29]
  ------------------
  642|       |                  // Simple value in next byte
  643|  2.99k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (643:23): [True: 2, False: 2.98k]
  ------------------
  644|      2|                     ctx.error = error_code::unexpected_end;
  645|      2|                     return;
  646|      2|                  }
  647|  2.98k|                  uint8_t val;
  648|  2.98k|                  std::memcpy(&val, it, 1);
  649|  2.98k|                  ++it;
  650|  2.98k|                  to<JSON, uint8_t>::template op<Opts>(val, ctx, out, ix);
  651|  2.98k|               }
  652|     29|               else {
  653|     29|                  ctx.error = error_code::syntax_error;
  654|     29|               }
  655|  20.5k|               break;
  656|   542k|            }
  657|   542k|            break;
  658|   542k|         }
  659|       |
  660|   542k|         default:
  ------------------
  |  Branch (660:10): [True: 0, False: 3.52M]
  ------------------
  661|      0|            ctx.error = error_code::syntax_error;
  662|      0|            break;
  663|  3.52M|         }
  664|  3.52M|      }
_ZN3glz6detail23cbor_to_json_decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   17|  3.27M|      {
   18|  3.27M|         using namespace cbor;
   19|       |
   20|  3.27M|         if (additional_info < 24) {
  ------------------
  |  Branch (20:14): [True: 3.07M, False: 198k]
  ------------------
   21|  3.07M|            return additional_info;
   22|  3.07M|         }
   23|       |
   24|   198k|         switch (additional_info) {
   25|   150k|         case info::uint8_follows: {
  ------------------
  |  Branch (25:10): [True: 150k, False: 47.6k]
  ------------------
   26|   150k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (26:17): [True: 62, False: 150k]
  ------------------
   27|     62|               ctx.error = error_code::unexpected_end;
   28|     62|               return 0;
   29|     62|            }
   30|   150k|            uint8_t val;
   31|   150k|            std::memcpy(&val, it, 1);
   32|   150k|            ++it;
   33|   150k|            return val;
   34|   150k|         }
   35|  11.2k|         case info::uint16_follows: {
  ------------------
  |  Branch (35:10): [True: 11.2k, False: 186k]
  ------------------
   36|  11.2k|            if ((it + 2) > end) [[unlikely]] {
  ------------------
  |  Branch (36:17): [True: 72, False: 11.1k]
  ------------------
   37|     72|               ctx.error = error_code::unexpected_end;
   38|     72|               return 0;
   39|     72|            }
   40|  11.1k|            uint16_t val;
   41|  11.1k|            std::memcpy(&val, it, 2);
   42|  11.1k|            if constexpr (std::endian::native == std::endian::little) {
   43|  11.1k|               val = std::byteswap(val);
   44|  11.1k|            }
   45|  11.1k|            it += 2;
   46|  11.1k|            return val;
   47|  11.2k|         }
   48|  17.0k|         case info::uint32_follows: {
  ------------------
  |  Branch (48:10): [True: 17.0k, False: 181k]
  ------------------
   49|  17.0k|            if ((it + 4) > end) [[unlikely]] {
  ------------------
  |  Branch (49:17): [True: 164, False: 16.8k]
  ------------------
   50|    164|               ctx.error = error_code::unexpected_end;
   51|    164|               return 0;
   52|    164|            }
   53|  16.8k|            uint32_t val;
   54|  16.8k|            std::memcpy(&val, it, 4);
   55|  16.8k|            if constexpr (std::endian::native == std::endian::little) {
   56|  16.8k|               val = std::byteswap(val);
   57|  16.8k|            }
   58|  16.8k|            it += 4;
   59|  16.8k|            return val;
   60|  17.0k|         }
   61|  19.2k|         case info::uint64_follows: {
  ------------------
  |  Branch (61:10): [True: 19.2k, False: 178k]
  ------------------
   62|  19.2k|            if ((it + 8) > end) [[unlikely]] {
  ------------------
  |  Branch (62:17): [True: 466, False: 18.8k]
  ------------------
   63|    466|               ctx.error = error_code::unexpected_end;
   64|    466|               return 0;
   65|    466|            }
   66|  18.8k|            uint64_t val;
   67|  18.8k|            std::memcpy(&val, it, 8);
   68|  18.8k|            if constexpr (std::endian::native == std::endian::little) {
   69|  18.8k|               val = std::byteswap(val);
   70|  18.8k|            }
   71|  18.8k|            it += 8;
   72|  18.8k|            return val;
   73|  19.2k|         }
   74|    128|         default:
  ------------------
  |  Branch (74:10): [True: 128, False: 197k]
  ------------------
   75|    128|            ctx.error = error_code::syntax_error;
   76|    128|            return 0;
   77|   198k|         }
   78|   198k|      }
_ZN3glz6detail16cbor_to_json_keyITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERNS_7contextERPKcSE_RmEEvOT1_OT2_OT3_RT0_OT4_j:
  676|  95.0k|      {
  677|  95.0k|         using namespace cbor;
  678|       |
  679|  95.0k|         if (recursive_depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (679:14): [True: 1, False: 95.0k]
  ------------------
  680|      1|            ctx.error = error_code::exceeded_max_recursive_depth;
  681|      1|            return;
  682|      1|         }
  683|       |
  684|  95.0k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (684:14): [True: 343, False: 94.6k]
  ------------------
  685|    343|            ctx.error = error_code::unexpected_end;
  686|    343|            return;
  687|    343|         }
  688|       |
  689|  94.6k|         uint8_t initial;
  690|  94.6k|         std::memcpy(&initial, it, 1);
  691|  94.6k|         const uint8_t major_type = get_major_type(initial);
  692|  94.6k|         const uint8_t additional_info = get_additional_info(initial);
  693|       |
  694|  94.6k|         switch (major_type) {
  695|  9.63k|         case major::tstr:
  ------------------
  |  Branch (695:10): [True: 9.63k, False: 85.0k]
  ------------------
  696|  59.5k|         case major::bstr:
  ------------------
  |  Branch (696:10): [True: 49.8k, False: 44.8k]
  ------------------
  697|       |            // Both already emit as a JSON string (tstr escaped, bstr hex-quoted).
  698|  59.5k|            cbor_to_json_value<Opts>(ctx, it, end, out, ix, recursive_depth);
  699|  59.5k|            return;
  700|  2.89k|         case major::tag: {
  ------------------
  |  Branch (700:10): [True: 2.89k, False: 91.7k]
  ------------------
  701|       |            // Unwrap the tag and key-check the tagged content, so e.g. a tag-0
  702|       |            // datetime text key still emits as a string. Typed-array tags
  703|       |            // (RFC 8746) decode to a JSON array and are rejected below.
  704|  2.89k|            ++it;
  705|  2.89k|            const uint64_t tag_num = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  706|  2.89k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (706:17): [True: 15, False: 2.88k]
  ------------------
  707|     15|               return;
  708|  2.88k|            if (typed_array::get_info(tag_num).valid) [[unlikely]] {
  ------------------
  |  Branch (708:17): [True: 15, False: 2.86k]
  ------------------
  709|     15|               ctx.error = error_code::syntax_error;
  710|     15|               return;
  711|     15|            }
  712|  2.86k|            cbor_to_json_key<Opts>(ctx, it, end, out, ix, recursive_depth + 1);
  713|  2.86k|            return;
  714|  2.88k|         }
  715|  15.7k|         case major::uint: {
  ------------------
  |  Branch (715:10): [True: 15.7k, False: 78.8k]
  ------------------
  716|  15.7k|            ++it;
  717|  15.7k|            const uint64_t value = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  718|  15.7k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (718:17): [True: 14, False: 15.7k]
  ------------------
  719|     14|               return;
  720|  15.7k|            dump('"', out, ix);
  721|  15.7k|            to<JSON, uint64_t>::template op<Opts>(value, ctx, out, ix);
  722|  15.7k|            dump('"', out, ix);
  723|  15.7k|            return;
  724|  15.7k|         }
  725|  16.2k|         case major::nint: {
  ------------------
  |  Branch (725:10): [True: 16.2k, False: 78.4k]
  ------------------
  726|  16.2k|            ++it;
  727|  16.2k|            const uint64_t n = cbor_to_json_decode_arg(ctx, it, end, additional_info);
  728|  16.2k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (728:17): [True: 11, False: 16.2k]
  ------------------
  729|     11|               return;
  730|  16.2k|            const int64_t value = static_cast<int64_t>(~n);
  731|  16.2k|            dump('"', out, ix);
  732|  16.2k|            to<JSON, int64_t>::template op<Opts>(value, ctx, out, ix);
  733|  16.2k|            dump('"', out, ix);
  734|  16.2k|            return;
  735|  16.2k|         }
  736|    251|         default:
  ------------------
  |  Branch (736:10): [True: 251, False: 94.4k]
  ------------------
  737|    251|            ctx.error = error_code::syntax_error;
  738|    251|            return;
  739|  94.6k|         }
  740|  94.6k|      }

_ZN3glz4cbor14get_major_typeEh:
  128|  4.06M|   [[nodiscard]] GLZ_ALWAYS_INLINE constexpr uint8_t get_major_type(uint8_t initial) noexcept { return initial >> 5; }
_ZN3glz4cbor19get_additional_infoEh:
  132|  4.06M|   {
  133|  4.06M|      return initial & 0x1f;
  134|  4.06M|   }
_ZN3glz4cbor12initial_byteEhh:
  123|   665k|   {
  124|   665k|      return static_cast<uint8_t>((major_type << 5) | (additional_info & 0x1f));
  125|   665k|   }
_ZN3glz4cbor11decode_halfEt:
  139|   229k|   {
  140|   229k|      const int sign = (half >> 15) & 1;
  141|   229k|      const int exp = (half >> 10) & 0x1f;
  142|   229k|      const int mant = half & 0x3ff;
  143|       |
  144|   229k|      double val;
  145|   229k|      if (exp == 0) {
  ------------------
  |  Branch (145:11): [True: 222k, False: 7.03k]
  ------------------
  146|       |         // Subnormal or zero
  147|   222k|         val = std::ldexp(static_cast<double>(mant), -24);
  148|   222k|      }
  149|  7.03k|      else if (exp != 31) {
  ------------------
  |  Branch (149:16): [True: 6.41k, False: 620]
  ------------------
  150|       |         // Normal number
  151|  6.41k|         val = std::ldexp(static_cast<double>(mant + 1024), exp - 25);
  152|  6.41k|      }
  153|    620|      else {
  154|       |         // Infinity or NaN
  155|    620|         val = (mant == 0) ? std::numeric_limits<double>::infinity() : std::numeric_limits<double>::quiet_NaN();
  ------------------
  |  Branch (155:16): [True: 20, False: 600]
  ------------------
  156|    620|      }
  157|       |
  158|   229k|      return sign ? -val : val;
  ------------------
  |  Branch (158:14): [True: 5.09k, False: 224k]
  ------------------
  159|   229k|   }
_ZN3glz4cbor11typed_array7matchesImEEbNS1_16typed_array_infoE:
  387|    968|      {
  388|    968|         if (!info.valid || info.element_size != sizeof(T)) {
  ------------------
  |  Branch (388:14): [True: 46, False: 922]
  |  Branch (388:29): [True: 32, False: 890]
  ------------------
  389|     78|            return false;
  390|     78|         }
  391|       |         if constexpr (std::floating_point<T>) {
  392|       |            // Tags 83 and 87 are IEEE binary128, which is not the 80-bit extended long double that
  393|       |            // shares its 16-byte storage on x86-64, so no float Glaze can write or read matches them.
  394|       |            return info.is_float && info.element_size <= 8;
  395|       |         }
  396|    890|         else {
  397|    890|            return !info.is_float && info.is_signed == std::is_signed_v<T>;
  ------------------
  |  Branch (397:20): [True: 738, False: 152]
  |  Branch (397:38): [True: 636, False: 102]
  ------------------
  398|    890|         }
  399|    890|      }
_ZN3glz4cbor11typed_array8get_infoEm:
  298|   100k|      {
  299|   100k|         typed_array_info info{};
  300|       |
  301|   100k|         if (tag < 64 || tag > 87 || tag == 76) {
  ------------------
  |  Branch (301:14): [True: 31.9k, False: 68.7k]
  |  Branch (301:26): [True: 8.47k, False: 60.2k]
  |  Branch (301:38): [True: 659, False: 59.6k]
  ------------------
  302|  41.0k|            return info; // Not a typed array tag
  303|  41.0k|         }
  304|       |
  305|  59.6k|         info.valid = true;
  306|       |
  307|  59.6k|         if (tag >= 64 && tag <= 71) {
  ------------------
  |  Branch (307:14): [True: 59.6k, False: 0]
  |  Branch (307:27): [True: 17.2k, False: 42.3k]
  ------------------
  308|       |            // Unsigned integers
  309|  17.2k|            info.is_signed = false;
  310|  17.2k|            info.is_float = false;
  311|  17.2k|            if (tag == 64 || tag == 68) {
  ------------------
  |  Branch (311:17): [True: 942, False: 16.3k]
  |  Branch (311:30): [True: 1.14k, False: 15.1k]
  ------------------
  312|  2.08k|               info.element_size = 1;
  313|  2.08k|               info.is_little_endian = true; // Doesn't matter for 1 byte
  314|  2.08k|            }
  315|  15.1k|            else if (tag == 65 || tag == 69) {
  ------------------
  |  Branch (315:22): [True: 453, False: 14.7k]
  |  Branch (315:35): [True: 936, False: 13.8k]
  ------------------
  316|  1.38k|               info.element_size = 2;
  317|  1.38k|               info.is_little_endian = (tag == 69);
  318|  1.38k|            }
  319|  13.8k|            else if (tag == 66 || tag == 70) {
  ------------------
  |  Branch (319:22): [True: 781, False: 13.0k]
  |  Branch (319:35): [True: 440, False: 12.5k]
  ------------------
  320|  1.22k|               info.element_size = 4;
  321|  1.22k|               info.is_little_endian = (tag == 70);
  322|  1.22k|            }
  323|  12.5k|            else {
  324|  12.5k|               info.element_size = 8;
  325|  12.5k|               info.is_little_endian = (tag == 71);
  326|  12.5k|            }
  327|  17.2k|         }
  328|  42.3k|         else if (tag >= 72 && tag <= 79) {
  ------------------
  |  Branch (328:19): [True: 42.3k, False: 0]
  |  Branch (328:32): [True: 35.2k, False: 7.13k]
  ------------------
  329|       |            // Signed integers
  330|  35.2k|            info.is_signed = true;
  331|  35.2k|            info.is_float = false;
  332|  35.2k|            if (tag == 72) {
  ------------------
  |  Branch (332:17): [True: 1.12k, False: 34.0k]
  ------------------
  333|  1.12k|               info.element_size = 1;
  334|  1.12k|               info.is_little_endian = true;
  335|  1.12k|            }
  336|  34.0k|            else if (tag == 73 || tag == 77) {
  ------------------
  |  Branch (336:22): [True: 25.3k, False: 8.73k]
  |  Branch (336:35): [True: 773, False: 7.96k]
  ------------------
  337|  26.1k|               info.element_size = 2;
  338|  26.1k|               info.is_little_endian = (tag == 77);
  339|  26.1k|            }
  340|  7.96k|            else if (tag == 74 || tag == 78) {
  ------------------
  |  Branch (340:22): [True: 670, False: 7.29k]
  |  Branch (340:35): [True: 501, False: 6.79k]
  ------------------
  341|  1.17k|               info.element_size = 4;
  342|  1.17k|               info.is_little_endian = (tag == 78);
  343|  1.17k|            }
  344|  6.79k|            else {
  345|  6.79k|               info.element_size = 8;
  346|  6.79k|               info.is_little_endian = (tag == 79);
  347|  6.79k|            }
  348|  35.2k|         }
  349|  7.13k|         else {
  350|       |            // Floating point (80-87)
  351|  7.13k|            info.is_signed = true; // Floats can be negative
  352|  7.13k|            info.is_float = true;
  353|  7.13k|            if (tag == 80 || tag == 84) {
  ------------------
  |  Branch (353:17): [True: 830, False: 6.30k]
  |  Branch (353:30): [True: 462, False: 5.84k]
  ------------------
  354|  1.29k|               info.element_size = 2; // float16
  355|  1.29k|               info.is_little_endian = (tag == 84);
  356|  1.29k|            }
  357|  5.84k|            else if (tag == 81 || tag == 85) {
  ------------------
  |  Branch (357:22): [True: 3.05k, False: 2.79k]
  |  Branch (357:35): [True: 1.18k, False: 1.61k]
  ------------------
  358|  4.23k|               info.element_size = 4; // float32
  359|  4.23k|               info.is_little_endian = (tag == 85);
  360|  4.23k|            }
  361|  1.61k|            else if (tag == 82 || tag == 86) {
  ------------------
  |  Branch (361:22): [True: 906, False: 709]
  |  Branch (361:35): [True: 397, False: 312]
  ------------------
  362|  1.30k|               info.element_size = 8; // float64
  363|  1.30k|               info.is_little_endian = (tag == 86);
  364|  1.30k|            }
  365|    312|            else {
  366|    312|               info.element_size = 16; // float128
  367|    312|               info.is_little_endian = (tag == 87);
  368|    312|            }
  369|  7.13k|         }
  370|       |
  371|  59.6k|         return info;
  372|   100k|      }
_ZN3glz4cbor11typed_array14needs_byteswapEm:
  403|  29.4k|      {
  404|  29.4k|         const auto info = get_info(tag);
  405|  29.4k|         if (!info.valid || info.element_size == 1) {
  ------------------
  |  Branch (405:14): [True: 0, False: 29.4k]
  |  Branch (405:29): [True: 1.59k, False: 27.8k]
  ------------------
  406|  1.59k|            return false;
  407|  1.59k|         }
  408|  27.8k|         constexpr bool native_is_le = (std::endian::native == std::endian::little);
  409|  27.8k|         return native_is_le != info.is_little_endian;
  410|  29.4k|      }

_ZN3glz9read_cborITkNS_14read_supportedIL_ZNS_4CBOREEEE9my_structRKNSt3__16vectorIcNS3_9allocatorIcEEEEEENS3_8expectedIT_NS_9error_ctxEEEOT0_:
 2365|  16.9k|   {
 2366|  16.9k|      T value{};
 2367|  16.9k|      const auto pe = read<opts{.format = CBOR}>(value, std::forward<Buffer>(buffer));
 2368|  16.9k|      if (pe) [[unlikely]] {
  ------------------
  |  Branch (2368:11): [True: 16.8k, False: 99]
  ------------------
 2369|  16.8k|         return unexpected(pe);
 2370|  16.8k|      }
 2371|     99|      return value;
 2372|  16.9k|   }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEER9my_structTkNS_10is_contextERNS_7contextERPKcS9_EEvOT0_OT1_OT2_T3_:
  128|  16.9k|      {
  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|  16.9k|         else {
  138|  16.9k|            using V = std::remove_cvref_t<T>;
  139|  16.9k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  16.9k|                                             end);
  141|  16.9k|         }
  142|  16.9k|      }
_ZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_:
 1466|  16.9k|      {
 1467|  16.9k|         using namespace cbor;
 1468|       |
 1469|  16.9k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1469:14): [True: 0, False: 16.9k]
  ------------------
 1470|      0|            ctx.error = error_code::unexpected_end;
 1471|      0|            return;
 1472|      0|         }
 1473|       |
 1474|  16.9k|         uint8_t initial;
 1475|  16.9k|         std::memcpy(&initial, it, 1);
 1476|  16.9k|         ++it;
 1477|       |
 1478|  16.9k|         const uint8_t major_type = get_major_type(initial);
 1479|  16.9k|         const uint8_t additional_info = get_additional_info(initial);
 1480|       |
 1481|  16.9k|         if (major_type != major::map) [[unlikely]] {
  ------------------
  |  Branch (1481:14): [True: 12.8k, False: 4.04k]
  ------------------
 1482|  12.8k|            ctx.error = error_code::syntax_error;
 1483|  12.8k|            return;
 1484|  12.8k|         }
 1485|       |
 1486|  4.04k|         depth_guard guard{ctx};
 1487|  4.04k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1487:14): [True: 0, False: 4.04k]
  ------------------
 1488|      0|            return;
 1489|      0|         }
 1490|       |
 1491|  4.04k|         static constexpr auto N = reflect<T>::size;
 1492|       |         if constexpr (N == 0) {
 1493|       |            (void)value;
 1494|       |         }
 1495|       |
 1496|  4.04k|         uint64_t n_keys;
 1497|  4.04k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1497:14): [True: 1.05k, False: 2.98k]
  ------------------
 1498|       |            // Handle indefinite map by counting as we go
 1499|  1.05k|            n_keys = (std::numeric_limits<uint64_t>::max)();
 1500|  1.05k|         }
 1501|  2.98k|         else {
 1502|  2.98k|            n_keys = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1503|  2.98k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1503:17): [True: 77, False: 2.90k]
  ------------------
 1504|     77|               return;
 1505|  2.98k|         }
 1506|       |
 1507|  17.0k|         for (uint64_t key_idx = 0; key_idx < n_keys; ++key_idx) {
  ------------------
  |  Branch (1507:37): [True: 14.6k, False: 2.37k]
  ------------------
 1508|  14.6k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1508:17): [True: 594, False: 14.0k]
  ------------------
 1509|    594|               ctx.error = error_code::unexpected_end;
 1510|    594|               return;
 1511|    594|            }
 1512|       |
 1513|       |            // Check for break in indefinite map
 1514|  14.0k|            if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1514:17): [True: 8.12k, False: 5.91k]
  ------------------
 1515|  8.12k|               uint8_t peek;
 1516|  8.12k|               std::memcpy(&peek, it, 1);
 1517|  8.12k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1517:20): [True: 16, False: 8.11k]
  ------------------
 1518|     16|                  ++it;
 1519|     16|                  break;
 1520|     16|               }
 1521|  8.12k|            }
 1522|       |
 1523|       |            // Read key
 1524|  14.0k|            uint8_t key_initial;
 1525|  14.0k|            std::memcpy(&key_initial, it, 1);
 1526|  14.0k|            ++it;
 1527|       |
 1528|  14.0k|            const uint8_t key_major = get_major_type(key_initial);
 1529|  14.0k|            const uint8_t key_info = get_additional_info(key_initial);
 1530|       |
 1531|  14.0k|            if (key_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (1531:17): [True: 667, False: 13.3k]
  ------------------
 1532|    667|               ctx.error = error_code::syntax_error;
 1533|    667|               return;
 1534|    667|            }
 1535|       |
 1536|  13.3k|            uint64_t key_len = cbor_detail::decode_arg(ctx, it, end, key_info);
 1537|  13.3k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1537:17): [True: 97, False: 13.2k]
  ------------------
 1538|     97|               return;
 1539|       |
 1540|  13.2k|            if (static_cast<uint64_t>(end - it) < key_len) [[unlikely]] {
  ------------------
  |  Branch (1540:17): [True: 219, False: 13.0k]
  ------------------
 1541|    219|               ctx.error = error_code::unexpected_end;
 1542|    219|               return;
 1543|    219|            }
 1544|       |
 1545|  13.0k|            if constexpr (N > 0) {
 1546|  13.0k|               static constexpr auto HashInfo = hash_info<T>;
 1547|       |
 1548|       |               // decode_hash_with_size pre-screens the key length against [min_length, max_length],
 1549|       |               // so no call-site length filter is needed here (the buffer bound above still applies).
 1550|  13.0k|               const auto index = decode_hash_with_size<CBOR, T, HashInfo, HashInfo.type>::op(it, end, key_len);
 1551|       |
 1552|  13.0k|               if (index < N) [[likely]] {
  ------------------
  |  Branch (1552:20): [True: 12.8k, False: 169]
  ------------------
 1553|  12.8k|                  const sv key{reinterpret_cast<const char*>(it), static_cast<size_t>(key_len)};
 1554|  12.8k|                  it += key_len;
 1555|       |
 1556|  12.8k|                  visit<N>(
 1557|  12.8k|                     [&]<size_t I>() {
 1558|  12.8k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1559|  12.8k|                        static constexpr auto Length = TargetKey.size();
 1560|  12.8k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
 1561|  12.8k|                           if constexpr (reflectable<T>) {
 1562|  12.8k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1563|  12.8k|                           }
 1564|  12.8k|                           else {
 1565|  12.8k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1566|  12.8k|                           }
 1567|  12.8k|                        }
 1568|  12.8k|                        else {
 1569|  12.8k|                           if constexpr (Opts.error_on_unknown_keys) {
 1570|  12.8k|                              ctx.error = error_code::unknown_key;
 1571|  12.8k|                              return;
 1572|  12.8k|                           }
 1573|  12.8k|                           else {
 1574|  12.8k|                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1575|  12.8k|                              if (bool(ctx.error)) [[unlikely]]
 1576|  12.8k|                                 return;
 1577|  12.8k|                           }
 1578|  12.8k|                        }
 1579|  12.8k|                     },
 1580|  12.8k|                     index);
 1581|       |
 1582|  12.8k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1582:23): [True: 2.11k, False: 10.7k]
  ------------------
 1583|  2.11k|                     return;
 1584|  12.8k|               }
 1585|    169|               else [[unlikely]] {
 1586|    169|                  if constexpr (Opts.error_on_unknown_keys) {
 1587|    169|                     ctx.error = error_code::unknown_key;
 1588|    169|                     return;
 1589|       |                  }
 1590|       |                  else {
 1591|       |                     it += key_len;
 1592|       |                     skip_value<CBOR>::op<Opts>(ctx, it, end);
 1593|       |                     if (bool(ctx.error)) [[unlikely]]
 1594|       |                        return;
 1595|       |                  }
 1596|    169|               }
 1597|       |            }
 1598|       |            else if constexpr (Opts.error_on_unknown_keys) {
 1599|       |               ctx.error = error_code::unknown_key;
 1600|       |               return;
 1601|       |            }
 1602|       |            else {
 1603|       |               it += key_len;
 1604|       |               skip_value<CBOR>::op<Opts>(ctx, it, end);
 1605|       |               if (bool(ctx.error)) [[unlikely]]
 1606|       |                  return;
 1607|       |            }
 1608|  13.0k|         }
 1609|  3.96k|      }
_ZN3glz11cbor_detail10decode_argITkNS_10is_contextENS_7contextEPKcS4_EEmRT_RT0_T1_h:
   29|   152k|      {
   30|   152k|         using namespace cbor;
   31|       |
   32|   152k|         if (additional_info < 24) {
  ------------------
  |  Branch (32:14): [True: 23.1k, False: 129k]
  ------------------
   33|  23.1k|            return additional_info;
   34|  23.1k|         }
   35|       |
   36|   129k|         switch (additional_info) {
   37|   120k|         case info::uint8_follows: {
  ------------------
  |  Branch (37:10): [True: 120k, False: 8.97k]
  ------------------
   38|   120k|            if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (38:17): [True: 30, False: 120k]
  ------------------
   39|     30|               ctx.error = error_code::unexpected_end;
   40|     30|               return 0;
   41|     30|            }
   42|   120k|            uint8_t val;
   43|   120k|            std::memcpy(&val, it, 1);
   44|   120k|            ++it;
   45|   120k|            return val;
   46|   120k|         }
   47|  2.04k|         case info::uint16_follows: {
  ------------------
  |  Branch (47:10): [True: 2.04k, False: 127k]
  ------------------
   48|  2.04k|            if ((it + 2) > end) [[unlikely]] {
  ------------------
  |  Branch (48:17): [True: 57, False: 1.99k]
  ------------------
   49|     57|               ctx.error = error_code::unexpected_end;
   50|     57|               return 0;
   51|     57|            }
   52|  1.99k|            uint16_t val;
   53|  1.99k|            std::memcpy(&val, it, 2);
   54|  1.99k|            if constexpr (std::endian::native == std::endian::little) {
   55|  1.99k|               val = std::byteswap(val);
   56|  1.99k|            }
   57|  1.99k|            it += 2;
   58|  1.99k|            return val;
   59|  2.04k|         }
   60|  4.26k|         case info::uint32_follows: {
  ------------------
  |  Branch (60:10): [True: 4.26k, False: 125k]
  ------------------
   61|  4.26k|            if ((it + 4) > end) [[unlikely]] {
  ------------------
  |  Branch (61:17): [True: 136, False: 4.13k]
  ------------------
   62|    136|               ctx.error = error_code::unexpected_end;
   63|    136|               return 0;
   64|    136|            }
   65|  4.13k|            uint32_t val;
   66|  4.13k|            std::memcpy(&val, it, 4);
   67|  4.13k|            if constexpr (std::endian::native == std::endian::little) {
   68|  4.13k|               val = std::byteswap(val);
   69|  4.13k|            }
   70|  4.13k|            it += 4;
   71|  4.13k|            return val;
   72|  4.26k|         }
   73|  2.60k|         case info::uint64_follows: {
  ------------------
  |  Branch (73:10): [True: 2.60k, False: 127k]
  ------------------
   74|  2.60k|            if ((it + 8) > end) [[unlikely]] {
  ------------------
  |  Branch (74:17): [True: 387, False: 2.22k]
  ------------------
   75|    387|               ctx.error = error_code::unexpected_end;
   76|    387|               return 0;
   77|    387|            }
   78|  2.22k|            uint64_t val;
   79|  2.22k|            std::memcpy(&val, it, 8);
   80|  2.22k|            if constexpr (std::endian::native == std::endian::little) {
   81|  2.22k|               val = std::byteswap(val);
   82|  2.22k|            }
   83|  2.22k|            it += 8;
   84|  2.22k|            return val;
   85|  2.60k|         }
   86|     47|         default:
  ------------------
  |  Branch (86:10): [True: 47, False: 129k]
  ------------------
   87|     47|            ctx.error = error_code::syntax_error;
   88|     47|            return 0;
   89|   129k|         }
   90|   129k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm0EEEDav:
 1557|  3.76k|                     [&]<size_t I>() {
 1558|  3.76k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1559|  3.76k|                        static constexpr auto Length = TargetKey.size();
 1560|  3.76k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1560:29): [True: 3.76k, False: 5]
  |  Branch (1560:52): [True: 3.76k, False: 0]
  ------------------
 1561|  3.76k|                           if constexpr (reflectable<T>) {
 1562|  3.76k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1563|       |                           }
 1564|       |                           else {
 1565|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1566|       |                           }
 1567|  3.76k|                        }
 1568|      5|                        else {
 1569|      5|                           if constexpr (Opts.error_on_unknown_keys) {
 1570|      5|                              ctx.error = error_code::unknown_key;
 1571|      5|                              return;
 1572|       |                           }
 1573|       |                           else {
 1574|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1575|       |                              if (bool(ctx.error)) [[unlikely]]
 1576|       |                                 return;
 1577|       |                           }
 1578|      5|                        }
 1579|  3.76k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERiTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  3.76k|      {
  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.76k|         else {
  138|  3.76k|            using V = std::remove_cvref_t<T>;
  139|  3.76k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  3.76k|                                             end);
  141|  3.76k|         }
  142|  3.76k|      }
_ZN3glz4fromILj2EiE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEiTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  380|  3.76k|      {
  381|  3.76k|         using namespace cbor;
  382|       |
  383|  3.76k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (383:14): [True: 6, False: 3.75k]
  ------------------
  384|      6|            ctx.error = error_code::unexpected_end;
  385|      6|            return;
  386|      6|         }
  387|       |
  388|  3.75k|         uint8_t initial;
  389|  3.75k|         std::memcpy(&initial, it, 1);
  390|  3.75k|         ++it;
  391|       |
  392|  3.75k|         const uint8_t major_type = get_major_type(initial);
  393|  3.75k|         const uint8_t additional_info = get_additional_info(initial);
  394|       |
  395|  3.75k|         if (major_type == major::uint) {
  ------------------
  |  Branch (395:14): [True: 1.72k, False: 2.03k]
  ------------------
  396|  1.72k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  397|  1.72k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (397:17): [True: 75, False: 1.65k]
  ------------------
  398|     75|               return;
  399|       |
  400|       |            // Range check: n must fit in T's positive range
  401|  1.65k|            constexpr auto max_val = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  402|  1.65k|            if (n > max_val) [[unlikely]] {
  ------------------
  |  Branch (402:17): [True: 65, False: 1.58k]
  ------------------
  403|     65|               ctx.error = error_code::parse_number_failure;
  404|     65|               return;
  405|     65|            }
  406|  1.58k|            value = static_cast<T>(n);
  407|  1.58k|         }
  408|  2.03k|         else if (major_type == major::nint) {
  ------------------
  |  Branch (408:19): [True: 2.01k, False: 12]
  ------------------
  409|  2.01k|            uint64_t n = cbor_detail::decode_arg(ctx, it, end, additional_info);
  410|  2.01k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (410:17): [True: 78, False: 1.94k]
  ------------------
  411|     78|               return;
  412|       |
  413|       |            // CBOR negative value = -1 - n
  414|       |            // For T's range [-2^(bits-1), 2^(bits-1)-1], max valid n = 2^(bits-1) - 1
  415|  1.94k|            constexpr auto max_n = static_cast<uint64_t>((std::numeric_limits<T>::max)());
  416|       |
  417|  1.94k|            if (n > max_n) [[unlikely]] {
  ------------------
  |  Branch (417:17): [True: 69, False: 1.87k]
  ------------------
  418|     69|               ctx.error = error_code::parse_number_failure;
  419|     69|               return;
  420|     69|            }
  421|       |
  422|       |            // Safe computation using two's complement identity:
  423|       |            // ~n = -1 - n (bitwise NOT)
  424|  1.87k|            value = static_cast<T>(~n);
  425|  1.87k|         }
  426|     12|         else [[unlikely]] {
  427|     12|            ctx.error = error_code::syntax_error;
  428|     12|         }
  429|  3.75k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm1EEEDav:
 1557|  1.47k|                     [&]<size_t I>() {
 1558|  1.47k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1559|  1.47k|                        static constexpr auto Length = TargetKey.size();
 1560|  1.47k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1560:29): [True: 1.47k, False: 5]
  |  Branch (1560:52): [True: 1.47k, False: 0]
  ------------------
 1561|  1.47k|                           if constexpr (reflectable<T>) {
 1562|  1.47k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1563|       |                           }
 1564|       |                           else {
 1565|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1566|       |                           }
 1567|  1.47k|                        }
 1568|      5|                        else {
 1569|      5|                           if constexpr (Opts.error_on_unknown_keys) {
 1570|      5|                              ctx.error = error_code::unknown_key;
 1571|      5|                              return;
 1572|       |                           }
 1573|       |                           else {
 1574|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1575|       |                              if (bool(ctx.error)) [[unlikely]]
 1576|       |                                 return;
 1577|       |                           }
 1578|      5|                        }
 1579|  1.47k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERdTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  1.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|  1.47k|         else {
  138|  1.47k|            using V = std::remove_cvref_t<T>;
  139|  1.47k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  1.47k|                                             end);
  141|  1.47k|         }
  142|  1.47k|      }
_ZN3glz4fromILj2EdE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEdTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  438|  1.47k|      {
  439|  1.47k|         using namespace cbor;
  440|       |
  441|  1.47k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (441:14): [True: 7, False: 1.46k]
  ------------------
  442|      7|            ctx.error = error_code::unexpected_end;
  443|      7|            return;
  444|      7|         }
  445|       |
  446|  1.46k|         uint8_t initial;
  447|  1.46k|         std::memcpy(&initial, it, 1);
  448|  1.46k|         ++it;
  449|       |
  450|  1.46k|         const uint8_t major_type = get_major_type(initial);
  451|  1.46k|         const uint8_t additional_info = get_additional_info(initial);
  452|       |
  453|  1.46k|         if (major_type != major::simple) [[unlikely]] {
  ------------------
  |  Branch (453:14): [True: 21, False: 1.44k]
  ------------------
  454|     21|            ctx.error = error_code::syntax_error;
  455|     21|            return;
  456|     21|         }
  457|       |
  458|  1.44k|         switch (additional_info) {
  459|  1.03k|         case simple::float16: {
  ------------------
  |  Branch (459:10): [True: 1.03k, False: 408]
  ------------------
  460|  1.03k|            if ((it + 2) > end) [[unlikely]] {
  ------------------
  |  Branch (460:17): [True: 19, False: 1.01k]
  ------------------
  461|     19|               ctx.error = error_code::unexpected_end;
  462|     19|               return;
  463|     19|            }
  464|  1.01k|            uint16_t half;
  465|  1.01k|            std::memcpy(&half, it, 2);
  466|  1.01k|            if constexpr (std::endian::native == std::endian::little) {
  467|  1.01k|               half = std::byteswap(half);
  468|  1.01k|            }
  469|  1.01k|            it += 2;
  470|  1.01k|            value = static_cast<T>(decode_half(half));
  471|  1.01k|            break;
  472|  1.03k|         }
  473|    198|         case simple::float32: {
  ------------------
  |  Branch (473:10): [True: 198, False: 1.24k]
  ------------------
  474|    198|            if ((it + 4) > end) [[unlikely]] {
  ------------------
  |  Branch (474:17): [True: 4, False: 194]
  ------------------
  475|      4|               ctx.error = error_code::unexpected_end;
  476|      4|               return;
  477|      4|            }
  478|    194|            uint32_t bits;
  479|    194|            std::memcpy(&bits, it, 4);
  480|    194|            if constexpr (std::endian::native == std::endian::little) {
  481|    194|               bits = std::byteswap(bits);
  482|    194|            }
  483|    194|            float f;
  484|    194|            std::memcpy(&f, &bits, 4);
  485|    194|            it += 4;
  486|    194|            value = static_cast<T>(f);
  487|    194|            break;
  488|    198|         }
  489|    206|         case simple::float64: {
  ------------------
  |  Branch (489:10): [True: 206, False: 1.23k]
  ------------------
  490|    206|            if ((it + 8) > end) [[unlikely]] {
  ------------------
  |  Branch (490:17): [True: 4, False: 202]
  ------------------
  491|      4|               ctx.error = error_code::unexpected_end;
  492|      4|               return;
  493|      4|            }
  494|    202|            uint64_t bits;
  495|    202|            std::memcpy(&bits, it, 8);
  496|    202|            if constexpr (std::endian::native == std::endian::little) {
  497|    202|               bits = std::byteswap(bits);
  498|    202|            }
  499|    202|            double d;
  500|    202|            std::memcpy(&d, &bits, 8);
  501|    202|            it += 8;
  502|    202|            value = static_cast<T>(d);
  503|    202|            break;
  504|    206|         }
  505|      4|         default:
  ------------------
  |  Branch (505:10): [True: 4, False: 1.44k]
  ------------------
  506|      4|            ctx.error = error_code::syntax_error;
  507|  1.44k|         }
  508|  1.44k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm2EEEDav:
 1557|  3.13k|                     [&]<size_t I>() {
 1558|  3.13k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1559|  3.13k|                        static constexpr auto Length = TargetKey.size();
 1560|  3.13k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1560:29): [True: 3.13k, False: 4]
  |  Branch (1560:52): [True: 3.08k, False: 49]
  ------------------
 1561|  3.08k|                           if constexpr (reflectable<T>) {
 1562|  3.08k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1563|       |                           }
 1564|       |                           else {
 1565|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1566|       |                           }
 1567|  3.08k|                        }
 1568|     53|                        else {
 1569|     53|                           if constexpr (Opts.error_on_unknown_keys) {
 1570|     53|                              ctx.error = error_code::unknown_key;
 1571|     53|                              return;
 1572|       |                           }
 1573|       |                           else {
 1574|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1575|       |                              if (bool(ctx.error)) [[unlikely]]
 1576|       |                                 return;
 1577|       |                           }
 1578|     53|                        }
 1579|  3.13k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEETkNS_10is_contextERNS_7contextERPKcSF_EEvOT0_OT1_OT2_T3_:
  128|  3.08k|      {
  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.08k|         else {
  138|  3.08k|            using V = std::remove_cvref_t<T>;
  139|  3.08k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  3.08k|                                             end);
  141|  3.08k|         }
  142|  3.08k|      }
_ZN3glz4fromILj2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES7_TkNS_10is_contextENS_7contextEPKcSD_EEvRT0_RT1_RT2_T3_:
  517|  3.08k|      {
  518|  3.08k|         using namespace cbor;
  519|       |
  520|  3.08k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (520:14): [True: 3, False: 3.07k]
  ------------------
  521|      3|            ctx.error = error_code::unexpected_end;
  522|      3|            return;
  523|      3|         }
  524|       |
  525|  3.07k|         uint8_t initial;
  526|  3.07k|         std::memcpy(&initial, it, 1);
  527|  3.07k|         ++it;
  528|       |
  529|  3.07k|         const uint8_t major_type = get_major_type(initial);
  530|  3.07k|         const uint8_t additional_info = get_additional_info(initial);
  531|       |
  532|  3.07k|         if (major_type != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (532:14): [True: 9, False: 3.07k]
  ------------------
  533|      9|            ctx.error = error_code::syntax_error;
  534|      9|            return;
  535|      9|         }
  536|       |
  537|  3.07k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (537:14): [True: 1.45k, False: 1.62k]
  ------------------
  538|       |            // Indefinite-length text string
  539|       |            if constexpr (string_view_t<T>) {
  540|       |               // Cannot read indefinite string into string_view
  541|       |               ctx.error = error_code::syntax_error;
  542|       |               return;
  543|       |            }
  544|  1.45k|            else {
  545|  1.45k|               if constexpr (resizable<T>) {
  546|  1.45k|                  value.clear();
  547|  1.45k|               }
  548|  1.45k|               size_t offset = 0; // fill position for fixed-size targets
  549|   123k|               while (true) {
  ------------------
  |  Branch (549:23): [True: 123k, Folded]
  ------------------
  550|   123k|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (550:23): [True: 84, False: 123k]
  ------------------
  551|     84|                     ctx.error = error_code::unexpected_end;
  552|     84|                     return;
  553|     84|                  }
  554|       |
  555|   123k|                  uint8_t chunk_initial;
  556|   123k|                  std::memcpy(&chunk_initial, it, 1);
  557|       |
  558|       |                  // Check for break code
  559|   123k|                  if (chunk_initial == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (559:23): [True: 976, False: 122k]
  ------------------
  560|    976|                     ++it;
  561|    976|                     break;
  562|    976|                  }
  563|       |
  564|   122k|                  const uint8_t chunk_major = get_major_type(chunk_initial);
  565|   122k|                  const uint8_t chunk_info = get_additional_info(chunk_initial);
  566|       |
  567|       |                  // Chunks must be text strings with definite length
  568|   122k|                  if (chunk_major != major::tstr) [[unlikely]] {
  ------------------
  |  Branch (568:23): [True: 108, False: 122k]
  ------------------
  569|    108|                     ctx.error = error_code::syntax_error;
  570|    108|                     return;
  571|    108|                  }
  572|   122k|                  if (chunk_info == info::indefinite) [[unlikely]] {
  ------------------
  |  Branch (572:23): [True: 2, False: 122k]
  ------------------
  573|      2|                     ctx.error = error_code::syntax_error;
  574|      2|                     return;
  575|      2|                  }
  576|       |
  577|   122k|                  ++it;
  578|   122k|                  uint64_t chunk_len = cbor_detail::decode_arg(ctx, it, end, chunk_info);
  579|   122k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (579:23): [True: 83, False: 122k]
  ------------------
  580|     83|                     return;
  581|       |
  582|   122k|                  if (static_cast<uint64_t>(end - it) < chunk_len) [[unlikely]] {
  ------------------
  |  Branch (582:23): [True: 197, False: 122k]
  ------------------
  583|    197|                     ctx.error = error_code::unexpected_end;
  584|    197|                     return;
  585|    197|                  }
  586|       |
  587|       |                  if constexpr (array_char_t<T>) {
  588|       |                     // Fixed-size std::array<char, N>: accumulate with bounds checking.
  589|       |                     if (offset + chunk_len > value.size()) [[unlikely]] {
  590|       |                        ctx.error = error_code::syntax_error;
  591|       |                        return;
  592|       |                     }
  593|       |                     std::memcpy(value.data() + offset, it, chunk_len);
  594|       |                     offset += static_cast<size_t>(chunk_len);
  595|       |                  }
  596|   122k|                  else {
  597|   122k|                     value.append(reinterpret_cast<const char*>(it), chunk_len);
  598|   122k|                  }
  599|   122k|                  it += chunk_len;
  600|   122k|               }
  601|       |               if constexpr (array_char_t<T>) {
  602|       |                  // Zero-fill any unused tail of the fixed-size buffer.
  603|       |                  if (offset < value.size()) {
  604|       |                     std::memset(value.data() + offset, 0, value.size() - offset);
  605|       |                  }
  606|       |               }
  607|    976|            }
  608|  1.45k|         }
  609|  1.62k|         else {
  610|       |            // Definite-length text string
  611|  1.62k|            uint64_t length = cbor_detail::decode_arg(ctx, it, end, additional_info);
  612|  1.62k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (612:17): [True: 82, False: 1.53k]
  ------------------
  613|     82|               return;
  614|       |
  615|  1.53k|            if (static_cast<uint64_t>(end - it) < length) [[unlikely]] {
  ------------------
  |  Branch (615:17): [True: 180, False: 1.35k]
  ------------------
  616|    180|               ctx.error = error_code::unexpected_end;
  617|    180|               return;
  618|    180|            }
  619|       |
  620|       |            // Check user-configured string length limit
  621|       |            if constexpr (check_max_string_length(Opts) > 0) {
  622|       |               if (length > check_max_string_length(Opts)) [[unlikely]] {
  623|       |                  ctx.error = error_code::invalid_length;
  624|       |                  return;
  625|       |               }
  626|       |            }
  627|       |            if constexpr (has_runtime_max_string_length<std::decay_t<decltype(ctx)>>) {
  628|       |               if (ctx.max_string_length > 0 && length > ctx.max_string_length) [[unlikely]] {
  629|       |                  ctx.error = error_code::invalid_length;
  630|       |                  return;
  631|       |               }
  632|       |            }
  633|       |
  634|       |            if constexpr (string_view_t<T>) {
  635|       |               value = {reinterpret_cast<const char*>(it), static_cast<size_t>(length)};
  636|       |            }
  637|       |            else if constexpr (array_char_t<T>) {
  638|       |               // Fixed-size std::array<char, N>: bounds-check, copy, zero-fill remainder.
  639|       |               if (length > value.size()) [[unlikely]] {
  640|       |                  ctx.error = error_code::syntax_error;
  641|       |                  return;
  642|       |               }
  643|       |               std::memcpy(value.data(), it, length);
  644|       |               if (length < value.size()) {
  645|       |                  std::memset(value.data() + static_cast<size_t>(length), 0,
  646|       |                              value.size() - static_cast<size_t>(length));
  647|       |               }
  648|       |            }
  649|  1.35k|            else {
  650|  1.35k|               value.assign(reinterpret_cast<const char*>(it), length);
  651|  1.35k|            }
  652|  1.35k|            it += length;
  653|  1.35k|         }
  654|  3.07k|      }
_ZZN3glz4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES1_TkNS_10is_contextENS_7contextEPKcS7_EEvRT0_RT1_RT2_T3_ENKUlTnmvE_clILm3EEEDav:
 1557|  4.49k|                     [&]<size_t I>() {
 1558|  4.49k|                        static constexpr auto TargetKey = get<I>(reflect<T>::keys);
 1559|  4.49k|                        static constexpr auto Length = TargetKey.size();
 1560|  4.49k|                        if ((Length == key_len) && compare<Length>(TargetKey.data(), key.data())) [[likely]] {
  ------------------
  |  Branch (1560:29): [True: 4.49k, False: 6]
  |  Branch (1560:52): [True: 4.42k, False: 72]
  ------------------
 1561|  4.42k|                           if constexpr (reflectable<T>) {
 1562|  4.42k|                              parse<CBOR>::op<Opts>(get_member(value, get<I>(to_tie(value))), ctx, it, end);
 1563|       |                           }
 1564|       |                           else {
 1565|       |                              parse<CBOR>::op<Opts>(get_member(value, get<I>(reflect<T>::values)), ctx, it, end);
 1566|       |                           }
 1567|  4.42k|                        }
 1568|     78|                        else {
 1569|     78|                           if constexpr (Opts.error_on_unknown_keys) {
 1570|     78|                              ctx.error = error_code::unknown_key;
 1571|     78|                              return;
 1572|       |                           }
 1573|       |                           else {
 1574|       |                              skip_value<CBOR>::op<Opts>(ctx, it, end);
 1575|       |                              if (bool(ctx.error)) [[unlikely]]
 1576|       |                                 return;
 1577|       |                           }
 1578|     78|                        }
 1579|  4.49k|                     },
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERNSt3__15arrayImLm3EEETkNS_10is_contextERNS_7contextERPKcSB_EEvOT0_OT1_OT2_T3_:
  128|  4.42k|      {
  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.42k|         else {
  138|  4.42k|            using V = std::remove_cvref_t<T>;
  139|  4.42k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  4.42k|                                             end);
  141|  4.42k|         }
  142|  4.42k|      }
_ZN3glz4fromILj2ENSt3__15arrayImLm3EEEE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES3_TkNS_10is_contextENS_7contextEPKcS9_EEvRT0_RT1_RT2_T3_:
  812|  4.42k|      {
  813|  4.42k|         using namespace cbor;
  814|  4.42k|         using V = range_value_t<std::remove_cvref_t<T>>;
  815|       |
  816|       |         // Set-like containers (std::set, std::unordered_set, ...) can neither be resized nor
  817|       |         // back-inserted into: each element is parsed into a temporary and then emplaced.
  818|  4.42k|         constexpr bool set_like = !resizable<T> && !emplace_backable<T> && emplaceable<T>;
  ------------------
  |  Branch (818:36): [True: 0, Folded]
  |  Branch (818:53): [True: 0, Folded]
  |  Branch (818:77): [Folded, False: 0]
  ------------------
  819|       |         // Everything else either has a fixed size the input must fit, or grows to match the input.
  820|       |         // The definite- and indefinite-length branches below must agree on which is which, or the
  821|       |         // same container would accept one framing of an array and reject the other.
  822|  4.42k|         constexpr bool growable = resizable<T> || emplace_backable<T> || set_like;
  ------------------
  |  Branch (822:36): [Folded, False: 0]
  |  Branch (822:52): [Folded, False: 0]
  |  Branch (822:75): [Folded, False: 0]
  ------------------
  823|       |
  824|  4.42k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (824:14): [True: 3, False: 4.41k]
  ------------------
  825|      3|            ctx.error = error_code::unexpected_end;
  826|      3|            return;
  827|      3|         }
  828|       |
  829|  4.41k|         uint8_t initial;
  830|  4.41k|         std::memcpy(&initial, it, 1);
  831|       |
  832|  4.41k|         const uint8_t major_type = get_major_type(initial);
  833|  4.41k|         const uint8_t additional_info = get_additional_info(initial);
  834|       |
  835|       |         // Check for RFC 8746 typed array (tag + byte string)
  836|  4.41k|         if constexpr (num_t<V> && !std::same_as<V, bool>) {
  837|  4.41k|            if (major_type == major::tag) {
  ------------------
  |  Branch (837:17): [True: 982, False: 3.43k]
  ------------------
  838|    982|               ++it; // consume the tag initial byte
  839|       |
  840|       |               // Decode the tag number
  841|    982|               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
  842|    982|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (842:20): [True: 14, False: 968]
  ------------------
  843|     14|                  return;
  844|       |
  845|       |               // Verify the tag describes exactly this element type, not merely one of its width
  846|    968|               if (typed_array::matches<V>(typed_array::get_info(tag_num))) {
  ------------------
  |  Branch (846:20): [True: 636, False: 332]
  ------------------
  847|       |                  // Read the byte string
  848|    636|                  if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (848:23): [True: 1, False: 635]
  ------------------
  849|      1|                     ctx.error = error_code::unexpected_end;
  850|      1|                     return;
  851|      1|                  }
  852|       |
  853|    635|                  uint8_t bstr_initial;
  854|    635|                  std::memcpy(&bstr_initial, it, 1);
  855|    635|                  ++it;
  856|       |
  857|    635|                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
  ------------------
  |  Branch (857:23): [True: 1, False: 634]
  ------------------
  858|      1|                     ctx.error = error_code::syntax_error;
  859|      1|                     return;
  860|      1|                  }
  861|       |
  862|    634|                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
  863|    634|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (863:23): [True: 19, False: 615]
  ------------------
  864|     19|                     return;
  865|       |
  866|    615|                  if (byte_len % sizeof(V) != 0) [[unlikely]] {
  ------------------
  |  Branch (866:23): [True: 8, False: 607]
  ------------------
  867|      8|                     ctx.error = error_code::syntax_error;
  868|      8|                     return;
  869|      8|                  }
  870|       |
  871|    607|                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
  ------------------
  |  Branch (871:23): [True: 22, False: 585]
  ------------------
  872|     22|                     ctx.error = error_code::unexpected_end;
  873|     22|                     return;
  874|     22|                  }
  875|       |
  876|    585|                  const size_t count = byte_len / sizeof(V);
  877|       |
  878|       |                  // Check user-configured array size limit
  879|       |                  if constexpr (check_max_array_size(Opts) > 0) {
  880|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
  881|       |                        ctx.error = error_code::invalid_length;
  882|       |                        return;
  883|       |                     }
  884|       |                  }
  885|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
  886|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
  887|       |                        ctx.error = error_code::invalid_length;
  888|       |                        return;
  889|       |                     }
  890|       |                  }
  891|       |
  892|       |                  if constexpr (set_like) {
  893|       |                     value.clear();
  894|       |                  }
  895|       |                  else if constexpr (resizable<T>) {
  896|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
  897|       |                        return;
  898|       |                     }
  899|       |                     value.resize(count);
  900|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
  901|       |                        value.shrink_to_fit();
  902|       |                     }
  903|       |                  }
  904|    585|                  else {
  905|    585|                     if (count != value.size()) [[unlikely]] {
  ------------------
  |  Branch (905:26): [True: 19, False: 566]
  ------------------
  906|     19|                        ctx.error = error_code::exceeded_static_array_size;
  907|     19|                        return;
  908|     19|                     }
  909|    585|                  }
  910|       |
  911|       |                  // Check if we need to byteswap
  912|    566|                  const bool need_swap = typed_array::needs_byteswap(tag_num);
  913|       |
  914|    585|                  if constexpr (contiguous<T>) {
  915|    585|                     if (need_swap && sizeof(V) > 1) {
  ------------------
  |  Branch (915:26): [True: 496, False: 89]
  |  Branch (915:39): [True: 0, Folded]
  ------------------
  916|       |                        // Need to byteswap each element
  917|  1.98k|                        for (size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (917:44): [True: 1.48k, False: 496]
  ------------------
  918|  1.48k|                           V elem;
  919|  1.48k|                           std::memcpy(&elem, it, sizeof(V));
  920|  1.48k|                           cbor_detail::byteswap_element(elem);
  921|  1.48k|                           value[i] = elem;
  922|  1.48k|                           it += sizeof(V);
  923|  1.48k|                        }
  924|    496|                     }
  925|     89|                     else {
  926|       |                        // Native endianness or single-byte: bulk read
  927|     89|                        if (byte_len > 0) {
  ------------------
  |  Branch (927:29): [True: 70, False: 19]
  ------------------
  928|     70|                           std::memcpy(value.data(), it, byte_len);
  929|     70|                           it += byte_len;
  930|     70|                        }
  931|     89|                     }
  932|       |                  }
  933|       |                  else {
  934|       |                     // std::list, std::set and friends have no contiguous storage to bulk read into,
  935|       |                     // so each element is decoded on its own.
  936|       |                     const bool swap_each = need_swap && sizeof(V) > 1;
  937|       |                     const auto next_element = [&] {
  938|       |                        V elem;
  939|       |                        std::memcpy(&elem, it, sizeof(V));
  940|       |                        if (swap_each) {
  941|       |                           cbor_detail::byteswap_element(elem);
  942|       |                        }
  943|       |                        it += sizeof(V);
  944|       |                        return elem;
  945|       |                     };
  946|       |
  947|       |                     if constexpr (set_like) {
  948|       |                        for (size_t i = 0; i < count; ++i) {
  949|       |                           value.emplace(next_element());
  950|       |                        }
  951|       |                     }
  952|       |                     else {
  953|       |                        auto dest = value.begin();
  954|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
  955|       |                           *dest = next_element();
  956|       |                        }
  957|       |                     }
  958|       |                  }
  959|    585|                  return; // Done with typed array
  960|    607|               }
  961|    332|               else {
  962|       |                  // Not a matching typed array tag - error
  963|    332|                  ctx.error = error_code::syntax_error;
  964|    332|                  return;
  965|    332|               }
  966|    968|            }
  967|  4.41k|         }
  968|       |
  969|       |         // Check for complex array (tag 43001 with nested typed array)
  970|       |         if constexpr (complex_t<V>) {
  971|       |            if (major_type == major::tag) {
  972|       |               ++it; // consume the tag initial byte
  973|       |
  974|       |               // Decode the tag number
  975|       |               const uint64_t tag_num = cbor_detail::decode_arg(ctx, it, end, additional_info);
  976|       |               if (bool(ctx.error)) [[unlikely]]
  977|       |                  return;
  978|       |
  979|       |               // Check for tag 43001 (complex array)
  980|       |               if (tag_num == semantic_tag::complex_array) {
  981|       |                  using Scalar = typename V::value_type;
  982|       |
  983|       |                  // Read nested typed array tag
  984|       |                  if (it >= end) [[unlikely]] {
  985|       |                     ctx.error = error_code::unexpected_end;
  986|       |                     return;
  987|       |                  }
  988|       |
  989|       |                  uint8_t ta_initial;
  990|       |                  std::memcpy(&ta_initial, it, 1);
  991|       |                  ++it;
  992|       |
  993|       |                  if (get_major_type(ta_initial) != major::tag) [[unlikely]] {
  994|       |                     ctx.error = error_code::syntax_error;
  995|       |                     return;
  996|       |                  }
  997|       |
  998|       |                  const uint64_t scalar_tag = cbor_detail::decode_arg(ctx, it, end, get_additional_info(ta_initial));
  999|       |                  if (bool(ctx.error)) [[unlikely]]
 1000|       |                     return;
 1001|       |
 1002|       |                  // Verify the tag describes exactly this scalar type, not merely one of its width
 1003|       |                  if (!typed_array::matches<Scalar>(typed_array::get_info(scalar_tag))) [[unlikely]] {
 1004|       |                     ctx.error = error_code::syntax_error;
 1005|       |                     return;
 1006|       |                  }
 1007|       |
 1008|       |                  // Read the byte string
 1009|       |                  if (it >= end) [[unlikely]] {
 1010|       |                     ctx.error = error_code::unexpected_end;
 1011|       |                     return;
 1012|       |                  }
 1013|       |
 1014|       |                  uint8_t bstr_initial;
 1015|       |                  std::memcpy(&bstr_initial, it, 1);
 1016|       |                  ++it;
 1017|       |
 1018|       |                  if (get_major_type(bstr_initial) != major::bstr) [[unlikely]] {
 1019|       |                     ctx.error = error_code::syntax_error;
 1020|       |                     return;
 1021|       |                  }
 1022|       |
 1023|       |                  const uint64_t byte_len = cbor_detail::decode_arg(ctx, it, end, get_additional_info(bstr_initial));
 1024|       |                  if (bool(ctx.error)) [[unlikely]]
 1025|       |                     return;
 1026|       |
 1027|       |                  // Each complex has 2 scalars
 1028|       |                  constexpr size_t complex_byte_size = sizeof(V); // sizeof(complex<T>) = 2 * sizeof(T)
 1029|       |                  if (byte_len % complex_byte_size != 0) [[unlikely]] {
 1030|       |                     ctx.error = error_code::syntax_error;
 1031|       |                     return;
 1032|       |                  }
 1033|       |
 1034|       |                  if (static_cast<uint64_t>(end - it) < byte_len) [[unlikely]] {
 1035|       |                     ctx.error = error_code::unexpected_end;
 1036|       |                     return;
 1037|       |                  }
 1038|       |
 1039|       |                  const size_t count = byte_len / complex_byte_size;
 1040|       |
 1041|       |                  // Check user-configured array size limit
 1042|       |                  if constexpr (check_max_array_size(Opts) > 0) {
 1043|       |                     if (count > check_max_array_size(Opts)) [[unlikely]] {
 1044|       |                        ctx.error = error_code::invalid_length;
 1045|       |                        return;
 1046|       |                     }
 1047|       |                  }
 1048|       |                  if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1049|       |                     if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1050|       |                        ctx.error = error_code::invalid_length;
 1051|       |                        return;
 1052|       |                     }
 1053|       |                  }
 1054|       |
 1055|       |                  if constexpr (set_like) {
 1056|       |                     value.clear();
 1057|       |                  }
 1058|       |                  else if constexpr (resizable<T>) {
 1059|       |                     if (exceeds_capacity(value, count, ctx)) [[unlikely]] {
 1060|       |                        return;
 1061|       |                     }
 1062|       |                     value.resize(count);
 1063|       |                     if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1064|       |                        value.shrink_to_fit();
 1065|       |                     }
 1066|       |                  }
 1067|       |                  else {
 1068|       |                     if (count != value.size()) [[unlikely]] {
 1069|       |                        ctx.error = error_code::exceeded_static_array_size;
 1070|       |                        return;
 1071|       |                     }
 1072|       |                  }
 1073|       |
 1074|       |                  // Check if we need to byteswap
 1075|       |                  const bool need_swap = typed_array::needs_byteswap(scalar_tag);
 1076|       |
 1077|       |                  if constexpr (contiguous<T>) {
 1078|       |                     if (need_swap && sizeof(Scalar) > 1) {
 1079|       |                        // Need to byteswap each scalar in the interleaved data
 1080|       |                        auto* dest = reinterpret_cast<Scalar*>(value.data());
 1081|       |                        const size_t num_scalars = count * 2; // 2 scalars per complex
 1082|       |                        for (size_t i = 0; i < num_scalars; ++i) {
 1083|       |                           Scalar elem;
 1084|       |                           std::memcpy(&elem, it, sizeof(Scalar));
 1085|       |                           cbor_detail::byteswap_element(elem);
 1086|       |                           dest[i] = elem;
 1087|       |                           it += sizeof(Scalar);
 1088|       |                        }
 1089|       |                     }
 1090|       |                     else {
 1091|       |                        // Native endianness or single-byte: bulk read
 1092|       |                        if (byte_len > 0) {
 1093|       |                           std::memcpy(value.data(), it, byte_len);
 1094|       |                           it += byte_len;
 1095|       |                        }
 1096|       |                     }
 1097|       |                  }
 1098|       |                  else {
 1099|       |                     // No contiguous storage to bulk read into, so the interleaved [real, imag] pairs
 1100|       |                     // are reassembled one element at a time.
 1101|       |                     const bool swap_each = need_swap && sizeof(Scalar) > 1;
 1102|       |                     const auto next_element = [&] {
 1103|       |                        Scalar parts[2];
 1104|       |                        std::memcpy(parts, it, sizeof(V));
 1105|       |                        if (swap_each) {
 1106|       |                           cbor_detail::byteswap_element(parts[0]);
 1107|       |                           cbor_detail::byteswap_element(parts[1]);
 1108|       |                        }
 1109|       |                        it += sizeof(V);
 1110|       |                        return V{parts[0], parts[1]};
 1111|       |                     };
 1112|       |
 1113|       |                     if constexpr (set_like) {
 1114|       |                        for (size_t i = 0; i < count; ++i) {
 1115|       |                           value.emplace(next_element());
 1116|       |                        }
 1117|       |                     }
 1118|       |                     else {
 1119|       |                        auto dest = value.begin();
 1120|       |                        for (size_t i = 0; i < count; ++i, ++dest) {
 1121|       |                           *dest = next_element();
 1122|       |                        }
 1123|       |                     }
 1124|       |                  }
 1125|       |                  return; // Done with complex array
 1126|       |               }
 1127|       |               else {
 1128|       |                  // Not a complex array tag - error
 1129|       |                  ctx.error = error_code::syntax_error;
 1130|       |                  return;
 1131|       |               }
 1132|       |            }
 1133|       |         }
 1134|       |
 1135|       |         // Regular CBOR array (major type 4)
 1136|  4.41k|         ++it; // consume the initial byte
 1137|       |
 1138|  4.41k|         if (major_type != major::array) [[unlikely]] {
  ------------------
  |  Branch (1138:14): [True: 13, False: 4.40k]
  ------------------
 1139|     13|            ctx.error = error_code::syntax_error;
 1140|     13|            return;
 1141|     13|         }
 1142|       |
 1143|       |         // The typed and complex array forms above are flat; only this branch descends into elements.
 1144|  4.40k|         depth_guard guard{ctx};
 1145|  4.40k|         if (!guard) [[unlikely]] {
  ------------------
  |  Branch (1145:14): [True: 0, False: 4.40k]
  ------------------
 1146|      0|            return;
 1147|      0|         }
 1148|       |
 1149|  4.40k|         if (additional_info == info::indefinite) {
  ------------------
  |  Branch (1149:14): [True: 1.56k, False: 2.84k]
  ------------------
 1150|       |            // Indefinite-length array. The resizable-only path below grows with resize() from index
 1151|       |            // zero, which drops any prior contents on its own, so it needs no clear() of its own.
 1152|       |            if constexpr (emplace_backable<T> || set_like) {
 1153|       |               value.clear();
 1154|       |            }
 1155|       |            // A target that cannot grow is filled in place, and it is walked with an iterator rather
 1156|       |            // than a subscript because a non-resizable range need not be indexable. The growing cases
 1157|       |            // leave this default constructed: insertion would invalidate it.
 1158|  1.56k|            [[maybe_unused]] decltype(value.begin()) dest{};
 1159|  1.56k|            if constexpr (not growable) {
 1160|  1.56k|               dest = value.begin();
 1161|  1.56k|            }
 1162|  1.56k|            size_t i = 0;
 1163|  4.81k|            while (true) {
  ------------------
  |  Branch (1163:20): [True: 4.79k, Folded]
  ------------------
 1164|  4.79k|               if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (1164:20): [True: 70, False: 4.72k]
  ------------------
 1165|     70|                  ctx.error = error_code::unexpected_end;
 1166|     70|                  return;
 1167|     70|               }
 1168|       |
 1169|  4.72k|               uint8_t peek;
 1170|  4.72k|               std::memcpy(&peek, it, 1);
 1171|       |
 1172|  4.72k|               if (peek == initial_byte(major::simple, simple::break_code)) {
  ------------------
  |  Branch (1172:20): [True: 1.44k, False: 3.28k]
  ------------------
 1173|  1.44k|                  ++it;
 1174|  1.44k|                  break;
 1175|  1.44k|               }
 1176|       |
 1177|       |               // A break code rather than a count ends this array, so the caller's element limit is
 1178|       |               // enforced as the array grows instead of up front.
 1179|       |               if constexpr (check_max_array_size(Opts) > 0) {
 1180|       |                  if (i >= check_max_array_size(Opts)) [[unlikely]] {
 1181|       |                     ctx.error = error_code::invalid_length;
 1182|       |                     return;
 1183|       |                  }
 1184|       |               }
 1185|       |               if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1186|       |                  if (ctx.max_array_size > 0 && i >= ctx.max_array_size) [[unlikely]] {
 1187|       |                     ctx.error = error_code::invalid_length;
 1188|       |                     return;
 1189|       |                  }
 1190|       |               }
 1191|       |
 1192|  3.28k|               if (exceeds_capacity(value, i + 1, ctx)) [[unlikely]] {
  ------------------
  |  Branch (1192:20): [True: 0, False: 3.28k]
  ------------------
 1193|      0|                  return;
 1194|      0|               }
 1195|       |
 1196|       |               if constexpr (emplace_backable<T>) {
 1197|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1198|       |               }
 1199|       |               else if constexpr (set_like) {
 1200|       |                  V element{};
 1201|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1202|       |                  if (bool(ctx.error)) [[unlikely]]
 1203|       |                     return;
 1204|       |                  value.emplace(std::move(element));
 1205|       |               }
 1206|       |               else if constexpr (resizable<T>) {
 1207|       |                  // Resizable but append-only through resize: grow by one and re-derive the write
 1208|       |                  // position, since growing may invalidate any iterator held across it.
 1209|       |                  value.resize(i + 1);
 1210|       |                  auto slot = value.begin();
 1211|       |                  std::advance(slot, i);
 1212|       |                  parse<CBOR>::op<Opts>(*slot, ctx, it, end);
 1213|       |               }
 1214|  3.28k|               else {
 1215|  3.28k|                  if (i >= value.size()) [[unlikely]] {
  ------------------
  |  Branch (1215:23): [True: 16, False: 3.26k]
  ------------------
 1216|     16|                     ctx.error = error_code::exceeded_static_array_size;
 1217|     16|                     return;
 1218|     16|                  }
 1219|  3.26k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1220|  3.26k|                  ++dest;
 1221|  3.26k|               }
 1222|      0|               ++i;
 1223|       |
 1224|  3.28k|               if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1224:20): [True: 36, False: 3.24k]
  ------------------
 1225|     36|                  return;
 1226|  3.28k|            }
 1227|  1.56k|         }
 1228|  2.84k|         else {
 1229|       |            // Definite-length array
 1230|  2.84k|            uint64_t count = cbor_detail::decode_arg(ctx, it, end, additional_info);
 1231|  2.84k|            if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1231:17): [True: 84, False: 2.75k]
  ------------------
 1232|     84|               return;
 1233|       |
 1234|       |            // Validate count against remaining buffer size (minimum 1 byte per element)
 1235|  2.75k|            if (count > static_cast<uint64_t>(end - it)) [[unlikely]] {
  ------------------
  |  Branch (1235:17): [True: 152, False: 2.60k]
  ------------------
 1236|    152|               ctx.error = error_code::unexpected_end;
 1237|    152|               return;
 1238|    152|            }
 1239|       |
 1240|       |            // Check user-configured array size limit
 1241|       |            if constexpr (check_max_array_size(Opts) > 0) {
 1242|       |               if (count > check_max_array_size(Opts)) [[unlikely]] {
 1243|       |                  ctx.error = error_code::invalid_length;
 1244|       |                  return;
 1245|       |               }
 1246|       |            }
 1247|       |            if constexpr (has_runtime_max_array_size<std::decay_t<decltype(ctx)>>) {
 1248|       |               if (ctx.max_array_size > 0 && count > ctx.max_array_size) [[unlikely]] {
 1249|       |                  ctx.error = error_code::invalid_length;
 1250|       |                  return;
 1251|       |               }
 1252|       |            }
 1253|       |
 1254|       |            if constexpr (set_like) {
 1255|       |               value.clear();
 1256|       |               for (size_t i = 0; i < count; ++i) {
 1257|       |                  V element{};
 1258|       |                  parse<CBOR>::op<Opts>(element, ctx, it, end);
 1259|       |                  if (bool(ctx.error)) [[unlikely]]
 1260|       |                     return;
 1261|       |                  value.emplace(std::move(element));
 1262|       |               }
 1263|       |            }
 1264|       |            else if constexpr (emplace_backable<T> && !resizable<T>) {
 1265|       |               // Append-only: there is no way to size the target up front even though the count is known.
 1266|       |               if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1267|       |                  return;
 1268|       |               }
 1269|       |               value.clear();
 1270|       |               for (size_t i = 0; i < count; ++i) {
 1271|       |                  parse<CBOR>::op<Opts>(value.emplace_back(), ctx, it, end);
 1272|       |                  if (bool(ctx.error)) [[unlikely]]
 1273|       |                     return;
 1274|       |               }
 1275|       |            }
 1276|  2.60k|            else {
 1277|       |               if constexpr (resizable<T>) {
 1278|       |                  if (exceeds_capacity(value, static_cast<size_t>(count), ctx)) [[unlikely]] {
 1279|       |                     return;
 1280|       |                  }
 1281|       |                  value.resize(static_cast<size_t>(count));
 1282|       |
 1283|       |                  if constexpr (check_shrink_to_fit(Opts) && has_shrink_to_fit<T>) {
 1284|       |                     value.shrink_to_fit();
 1285|       |                  }
 1286|       |               }
 1287|  2.60k|               else {
 1288|  2.60k|                  if (count > value.size()) [[unlikely]] {
  ------------------
  |  Branch (1288:23): [True: 9, False: 2.59k]
  ------------------
 1289|      9|                     ctx.error = error_code::exceeded_static_array_size;
 1290|      9|                     return;
 1291|      9|                  }
 1292|  2.60k|               }
 1293|       |
 1294|       |               // Iteration rather than subscripting: std::list resizes but does not index.
 1295|  2.59k|               auto dest = value.begin();
 1296|  4.61k|               for (size_t i = 0; i < count; ++i, ++dest) {
  ------------------
  |  Branch (1296:35): [True: 2.07k, False: 2.53k]
  ------------------
 1297|  2.07k|                  parse<CBOR>::op<Opts>(*dest, ctx, it, end);
 1298|  2.07k|                  if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (1298:23): [True: 66, False: 2.01k]
  ------------------
 1299|     66|                     return;
 1300|  2.07k|               }
 1301|  2.60k|            }
 1302|  2.60k|         }
 1303|  4.40k|      }
_ZN3glz11cbor_detail16byteswap_elementImEEvRT_:
  101|  1.48k|      {
  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|  1.48k|         else if constexpr (sizeof(V) == 8) {
  115|  1.48k|            uint64_t bits;
  116|  1.48k|            std::memcpy(&bits, &elem, sizeof(V));
  117|  1.48k|            bits = std::byteswap(bits);
  118|  1.48k|            std::memcpy(&elem, &bits, sizeof(V));
  119|  1.48k|         }
  120|  1.48k|      }
_ZN3glz5parseILj2EE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEERmTkNS_10is_contextERNS_7contextERPKcS8_EEvOT0_OT1_OT2_T3_:
  128|  5.34k|      {
  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.34k|         else {
  138|  5.34k|            using V = std::remove_cvref_t<T>;
  139|  5.34k|            from<CBOR, V>::template op<Opts>(std::forward<T>(value), std::forward<Ctx>(ctx), std::forward<It0>(it),
  140|  5.34k|                                             end);
  141|  5.34k|         }
  142|  5.34k|      }
_ZN3glz4fromILj2EmE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEEmTkNS_10is_contextENS_7contextEPKcS6_EEvRT0_RT1_RT2_T3_:
  345|  5.34k|      {
  346|  5.34k|         using namespace cbor;
  347|       |
  348|  5.34k|         if (it >= end) [[unlikely]] {
  ------------------
  |  Branch (348:14): [True: 33, False: 5.31k]
  ------------------
  349|     33|            ctx.error = error_code::unexpected_end;
  350|     33|            return;
  351|     33|         }
  352|       |
  353|  5.31k|         uint8_t initial;
  354|  5.31k|         std::memcpy(&initial, it, 1);
  355|  5.31k|         ++it;
  356|       |
  357|  5.31k|         const uint8_t major_type = get_major_type(initial);
  358|  5.31k|         const uint8_t additional_info = get_additional_info(initial);
  359|       |
  360|  5.31k|         if (major_type != major::uint) [[unlikely]] {
  ------------------
  |  Branch (360:14): [True: 21, False: 5.29k]
  ------------------
  361|     21|            ctx.error = error_code::syntax_error;
  362|     21|            return;
  363|     21|         }
  364|       |
  365|  5.29k|         uint64_t result = cbor_detail::decode_arg(ctx, it, end, additional_info);
  366|  5.29k|         if (bool(ctx.error)) [[unlikely]]
  ------------------
  |  Branch (366:14): [True: 48, False: 5.24k]
  ------------------
  367|     48|            return;
  368|       |
  369|  5.24k|         value = static_cast<T>(result);
  370|  5.24k|      }

_ZN3glz12ensure_spaceINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_RT_m:
  181|  3.88M|   {
  182|  3.88M|      using Buffer = std::remove_cvref_t<B>;
  183|       |
  184|  3.88M|      if constexpr (vector_like<Buffer>) {
  185|  3.88M|         if (required > b.size()) [[unlikely]] {
  ------------------
  |  Branch (185:14): [True: 8.23k, False: 3.87M]
  ------------------
  186|       |            // 2× growth amortizes repeated reallocations to O(n) total cost.
  187|  8.23k|            b.resize(2 * required);
  188|  8.23k|         }
  189|  3.88M|         return true;
  190|       |      }
  191|       |      else if constexpr (has_bounded_capacity<Buffer>) {
  192|       |         if (required > buffer_traits<Buffer>::capacity(b)) [[unlikely]] {
  193|       |            ctx.error = error_code::buffer_overflow;
  194|       |            return false;
  195|       |         }
  196|       |         return true;
  197|       |      }
  198|       |      else {
  199|       |         return true; // Raw pointer or other - trust caller
  200|       |      }
  201|  3.88M|   }

_ZN3glz10get_memberIR9my_structRiEEDcOT_OT0_:
  616|  3.76k|   {
  617|  3.76k|      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.76k|      else {
  639|  3.76k|         return element;
  640|  3.76k|      }
  641|  3.76k|   }
_ZN3glz10get_memberIR9my_structRdEEDcOT_OT0_:
  616|  1.47k|   {
  617|  1.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|  1.47k|      else {
  639|  1.47k|         return element;
  640|  1.47k|      }
  641|  1.47k|   }
_ZN3glz10get_memberIR9my_structRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEDcOT_OT0_:
  616|  3.08k|   {
  617|  3.08k|      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.08k|      else {
  639|  3.08k|         return element;
  640|  3.08k|      }
  641|  3.08k|   }
_ZN3glz10get_memberIR9my_structRNSt3__15arrayImLm3EEEEEDcOT_OT0_:
  616|  4.42k|   {
  617|  4.42k|      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.42k|      else {
  639|  4.42k|         return element;
  640|  4.42k|      }
  641|  4.42k|   }
_ZN3glz8str_viewINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEES5_OT0_:
  288|  5.62k|   {
  289|  5.62k|      if constexpr (std::same_as<std::decay_t<T>, std::string_view>) {
  290|  5.62k|         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|  5.62k|   }
_ZN3glz8str_viewINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKS5_EES5_OT0_:
  288|  28.8k|   {
  289|  28.8k|      if constexpr (std::same_as<std::decay_t<T>, std::string_view>) {
  290|  28.8k|         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|  28.8k|   }

_ZN3glz11depth_guardINS_7contextEEC2ERS1_:
  174|  7.46k|      depth_guard(Ctx& c) noexcept : ctx(c)
  175|  7.46k|      {
  176|  7.46k|         if (ctx.depth >= max_recursive_depth_limit) [[unlikely]] {
  ------------------
  |  Branch (176:14): [True: 0, False: 7.46k]
  ------------------
  177|      0|            ctx.error = error_code::exceeded_max_recursive_depth;
  178|      0|            return;
  179|      0|         }
  180|  7.46k|         ++ctx.depth;
  181|  7.46k|         entered = true;
  182|  7.46k|      }
_ZNK3glz11depth_guardINS_7contextEEcvbEv:
  187|  7.46k|      explicit operator bool() const noexcept { return entered; }
_ZN3glz11depth_guardINS_7contextEED2Ev:
  184|  7.46k|      {
  185|  7.46k|         if (entered) --ctx.depth;
  ------------------
  |  Branch (185:14): [True: 7.46k, False: 0]
  ------------------
  186|  7.46k|      }
_ZNK3glz9error_ctxcvbEv:
  129|  16.9k|      operator bool() const noexcept { return ec != error_code::none; }

_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSA_OSB_:
  219|  16.9k|   {
  220|  16.9k|      format_context_t<Opts.format> ctx{};
  221|  16.9k|      return read<Opts>(value, buffer, ctx);
  222|  16.9k|   }
_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEETkNS_10is_contextERNS_7contextEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSC_OSD_OT2_:
  136|  16.9k|   {
  137|  16.9k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
  138|  16.9k|      using Buffer = std::remove_reference_t<decltype(buffer)>;
  139|       |
  140|  16.9k|      if constexpr (Opts.format != NDJSON) {
  141|  16.9k|         if (buffer.empty()) [[unlikely]] {
  ------------------
  |  Branch (141:14): [True: 0, False: 16.9k]
  ------------------
  142|      0|            ctx.error = error_code::no_read_input;
  143|      0|            return {0, ctx.error, ctx.custom_error_message};
  144|      0|         }
  145|  16.9k|      }
  146|       |
  147|  16.9k|      constexpr bool use_padded = resizable<Buffer> && non_const_buffer<Buffer> && !check_disable_padding(Opts);
  ------------------
  |  Branch (147:35): [Folded, False: 16.9k]
  |  Branch (147:56): [Folded, False: 0]
  |  Branch (147:84): [True: 0, Folded]
  ------------------
  148|       |
  149|  16.9k|      [[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|  16.9k|      auto [it, end] = read_iterators<Opts, use_padded>(buffer);
  157|  16.9k|      auto start = it;
  158|  16.9k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (158:11): [True: 0, False: 16.9k]
  ------------------
  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|  16.9k|      if constexpr (requires { ctx.speculation_budget; }) {
  165|  16.9k|         const size_t proportional = max_speculative_parse_factor * size_t(end - it);
  166|  16.9k|         ctx.speculation_budget =
  167|  16.9k|            (proportional > min_speculative_parse_bytes ? proportional : min_speculative_parse_bytes) + 2;
  ------------------
  |  Branch (167:14): [True: 170, False: 16.7k]
  ------------------
  168|  16.9k|      }
  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|  16.9k|      else {
  183|  16.9k|         parse<Opts.format>::template op<is_padded_off<Opts>()>(value, ctx, it, end);
  184|  16.9k|      }
  185|       |
  186|  16.9k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (186:11): [True: 16.8k, False: 99]
  ------------------
  187|  16.8k|         goto finish;
  188|  16.8k|      }
  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|  16.9k|   finish:
  206|  16.9k|      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|  16.9k|      return {size_t(it - start), ctx.error, ctx.custom_error_message};
  214|     99|   }
_ZN3glz14read_iteratorsITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEELb0ETkNS_10contiguousERKNSt3__16vectorIcNS2_9allocatorIcEEEEEEDaOT1_:
   40|  16.9k|   {
   41|  16.9k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
   42|       |
   43|  16.9k|      auto it = reinterpret_cast<const char*>(buffer.data());
   44|  16.9k|      auto end = reinterpret_cast<const char*>(buffer.data()); // to be incremented
   45|       |
   46|       |      if constexpr (Padded) {
   47|       |         end += buffer.size() - padding_bytes;
   48|       |      }
   49|  16.9k|      else {
   50|  16.9k|         end += buffer.size();
   51|  16.9k|      }
   52|       |
   53|  16.9k|      return std::pair{it, end};
   54|  16.9k|   }
_ZN3glz16exceeds_capacityINSt3__15arrayImLm3EEETkNS_10is_contextENS_7contextEEEbRT_mRT0_:
   28|  3.28k|   {
   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|  3.28k|      return false;
   36|  3.28k|   }
_ZN3glz23finalize_top_level_readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_PKcS7_S7_:
  115|  16.9k|   {
  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|  16.9k|      finalize_read_context<Opts>(ctx);
  131|  16.9k|   }
_ZN3glz21finalize_read_contextITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_:
   76|  16.9k|   {
   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|  16.9k|      settle_end_reached(ctx);
   96|  16.9k|   }
_ZN3glz18settle_end_reachedITkNS_10is_contextERNS_7contextEEEvOT_:
   68|  16.9k|   {
   69|  16.9k|      if (ctx.error == error_code::end_reached) {
  ------------------
  |  Branch (69:11): [True: 0, False: 16.9k]
  ------------------
   70|      0|         ctx.error = (ctx.depth == 0) ? error_code::none : error_code::unexpected_end;
  ------------------
  |  Branch (70:22): [True: 0, False: 0]
  ------------------
   71|      0|      }
   72|  16.9k|   }

_ZN3glz21decode_hash_with_sizeILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2685|  13.0k|      {
 2686|  13.0k|         if (n < HashInfo.min_length || n > HashInfo.max_length) [[unlikely]] {
  ------------------
  |  Branch (2686:14): [True: 40, False: 13.0k]
  |  Branch (2686:41): [True: 46, False: 12.9k]
  ------------------
 2687|     86|            return N;
 2688|     86|         }
 2689|  12.9k|         return decode_hash_with_size_impl<Format, T, HashInfo, Type>::op(it, end, n);
 2690|  13.0k|      }
_ZN3glz26decode_hash_with_size_implILj2E9my_structXtlNS_11hash_info_tIS1_Lm256EEELNS_9hash_typeE1EtlNSt3__15arrayIhLm256EEEtlA256_hLh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh3ELh4ELh4ELh1ELh4ELh4ELh4ELh2ELh0ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4ELh4EEELm1ELm5EEELS4_1EE2opIRPKcSD_EEmOT_OT0_m:
 2738|  12.9k|      {
 2739|       |         // unique_index < min_length <= n, so it[unique_index] is within the key (the wrapper has
 2740|       |         // already rejected lengths outside [min_length, max_length]).
 2741|       |         if constexpr (HashInfo.sized_hash) {
 2742|       |            const auto h = bitmix(uint16_t(it[HashInfo.unique_index]) | (uint16_t(n) << 8), HashInfo.seed);
 2743|       |            return HashInfo.table[h % bsize];
 2744|       |         }
 2745|  12.9k|         else {
 2746|       |            if constexpr (N == 2) {
 2747|       |               // Avoids using a hash table
 2748|       |               constexpr auto first_key_char = reflect<T>::keys[0][uindex];
 2749|       |               return size_t(bool(it[uindex] ^ first_key_char));
 2750|       |            }
 2751|  12.9k|            else {
 2752|  12.9k|               return HashInfo.table[uint8_t(it[uindex])];
 2753|  12.9k|            }
 2754|  12.9k|         }
 2755|  12.9k|      }

_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  2.46M|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  2.46M|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  2.46M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  2.46M|            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|  2.46M|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  2.46M|               const auto end = glz::to_chars_40kb(start, value);
  356|  2.46M|               ix += size_t(end - start);
  357|  2.46M|            }
  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|  2.46M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  62.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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  62.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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  62.2k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  62.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|  62.2k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  62.2k|               const auto end = glz::to_chars_40kb(start, value);
  356|  62.2k|               ix += size_t(end - start);
  357|  62.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|  62.2k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   392k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|   392k|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|   392k|         if constexpr (std::floating_point<V>) {
  222|   392k|            using opts_type = std::decay_t<decltype(Opts)>;
  223|   392k|            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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|   392k|            else if constexpr (is_any_of<V, float, double>) {
  319|   392k|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|   392k|               const auto end = glz::to_chars(start, value);
  321|   392k|               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|   392k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   127k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|   127k|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|   127k|         if constexpr (std::floating_point<V>) {
  222|   127k|            using opts_type = std::decay_t<decltype(Opts)>;
  223|   127k|            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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|   127k|            else if constexpr (is_any_of<V, float, double>) {
  319|   127k|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|   127k|               const auto end = glz::to_chars(start, value);
  321|   127k|               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|   127k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  69.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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  69.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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  69.2k|         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|  69.2k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  69.2k|            const auto end = glz::to_chars(start, value);
  344|  69.2k|            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|  69.2k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  16.8k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  16.8k|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  16.8k|         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|  16.8k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  16.8k|            const auto end = glz::to_chars(start, value);
  344|  16.8k|            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|  16.8k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  39.3k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  39.3k|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  39.3k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  39.3k|            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|  39.3k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  39.3k|               const auto end = glz::to_chars_40kb(start, value);
  356|  39.3k|               ix += size_t(end - start);
  357|  39.3k|            }
  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|  39.3k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  69.6k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  69.6k|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  69.6k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  69.6k|            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|  69.6k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  69.6k|               const auto end = glz::to_chars_40kb(start, value);
  356|  69.6k|               ix += size_t(end - start);
  357|  69.6k|            }
  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|  69.6k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   204k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|   204k|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|   204k|         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|   204k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|   204k|            const auto end = glz::to_chars(start, value);
  344|   204k|            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|   204k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  50.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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  50.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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  50.2k|         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|  50.2k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  50.2k|            const auto end = glz::to_chars(start, value);
  344|  50.2k|            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|  50.2k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  18.4k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  18.4k|         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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  18.4k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  18.4k|            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|  18.4k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  18.4k|               const auto end = glz::to_chars_40kb(start, value);
  356|  18.4k|               ix += size_t(end - start);
  357|  18.4k|            }
  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|  18.4k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  83.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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  83.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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  83.2k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  83.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|  83.2k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  83.2k|               const auto end = glz::to_chars_40kb(start, value);
  356|  83.2k|               ix += size_t(end - start);
  357|  83.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|  83.2k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   228k|      {
  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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|   228k|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|   228k|         if constexpr (std::floating_point<V>) {
  222|   228k|            using opts_type = std::decay_t<decltype(Opts)>;
  223|   228k|            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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|   228k|            else if constexpr (is_any_of<V, float, double>) {
  319|   228k|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|   228k|               const auto end = glz::to_chars(start, value);
  321|   228k|               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|   228k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  17.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|       |               b.resize(2 * k);
  216|       |            }
  217|       |         }
  218|       |
  219|  17.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|       |                        b.resize(2 * (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|       |                     b.resize(2 * (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|  17.5k|         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|  17.5k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  17.5k|            const auto end = glz::to_chars(start, value);
  344|  17.5k|            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|  17.5k|      }

_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  2.46M|      {
  738|  2.46M|         if constexpr (not check_write_unchecked(Opts)) {
  739|  2.46M|            static_assert(required_padding<T>());
  740|  2.46M|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 2.46M]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  2.46M|         }
  744|       |
  745|  2.46M|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  2.46M|         else {
  755|  2.46M|            write_chars::op<O>(value, ctx, b, ix);
  756|  2.46M|         }
  757|  2.46M|      }
_ZN3glz16required_paddingImEEmv:
  461|  2.54M|   {
  462|  2.54M|      constexpr auto value = []() -> size_t {
  463|  2.54M|         if constexpr (boolean_like<T>) {
  464|  2.54M|            return 8;
  465|  2.54M|         }
  466|  2.54M|         else if constexpr (num_t<T>) {
  467|  2.54M|            if constexpr (std::floating_point<T>) {
  468|  2.54M|               if constexpr (sizeof(T) > 8) {
  469|  2.54M|                  return 64;
  470|  2.54M|               }
  471|  2.54M|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  2.54M|                  return zmij::double_buffer_size + 4;
  474|  2.54M|               }
  475|  2.54M|               else {
  476|  2.54M|                  return zmij::float_buffer_size + 4;
  477|  2.54M|               }
  478|  2.54M|            }
  479|  2.54M|            else if constexpr (sizeof(T) > 4) {
  480|  2.54M|               return 24;
  481|  2.54M|            }
  482|  2.54M|            else if constexpr (sizeof(T) > 2) {
  483|  2.54M|               return 16;
  484|  2.54M|            }
  485|  2.54M|            else {
  486|  2.54M|               return 8;
  487|  2.54M|            }
  488|  2.54M|         }
  489|  2.54M|         else if constexpr (nullable_like<T>) {
  490|  2.54M|            if constexpr (has_value_type<T>) {
  491|  2.54M|               return required_padding<typename T::value_type>();
  492|  2.54M|            }
  493|  2.54M|            else if constexpr (has_element_type<T>) {
  494|  2.54M|               return required_padding<typename T::element_type>();
  495|  2.54M|            }
  496|  2.54M|            else {
  497|  2.54M|               return 0;
  498|  2.54M|            }
  499|  2.54M|         }
  500|  2.54M|         else if constexpr (always_null_t<T>) {
  501|  2.54M|            return 8;
  502|  2.54M|         }
  503|  2.54M|         else {
  504|  2.54M|            return 0;
  505|  2.54M|         }
  506|  2.54M|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  2.54M|      return value;
  514|  2.54M|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  62.2k|      {
  738|  62.2k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  62.2k|            static_assert(required_padding<T>());
  740|  62.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 62.2k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  62.2k|         }
  744|       |
  745|  62.2k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  62.2k|         else {
  755|  62.2k|            write_chars::op<O>(value, ctx, b, ix);
  756|  62.2k|         }
  757|  62.2k|      }
_ZN3glz16required_paddingIlEEmv:
  461|   131k|   {
  462|   131k|      constexpr auto value = []() -> size_t {
  463|   131k|         if constexpr (boolean_like<T>) {
  464|   131k|            return 8;
  465|   131k|         }
  466|   131k|         else if constexpr (num_t<T>) {
  467|   131k|            if constexpr (std::floating_point<T>) {
  468|   131k|               if constexpr (sizeof(T) > 8) {
  469|   131k|                  return 64;
  470|   131k|               }
  471|   131k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|   131k|                  return zmij::double_buffer_size + 4;
  474|   131k|               }
  475|   131k|               else {
  476|   131k|                  return zmij::float_buffer_size + 4;
  477|   131k|               }
  478|   131k|            }
  479|   131k|            else if constexpr (sizeof(T) > 4) {
  480|   131k|               return 24;
  481|   131k|            }
  482|   131k|            else if constexpr (sizeof(T) > 2) {
  483|   131k|               return 16;
  484|   131k|            }
  485|   131k|            else {
  486|   131k|               return 8;
  487|   131k|            }
  488|   131k|         }
  489|   131k|         else if constexpr (nullable_like<T>) {
  490|   131k|            if constexpr (has_value_type<T>) {
  491|   131k|               return required_padding<typename T::value_type>();
  492|   131k|            }
  493|   131k|            else if constexpr (has_element_type<T>) {
  494|   131k|               return required_padding<typename T::element_type>();
  495|   131k|            }
  496|   131k|            else {
  497|   131k|               return 0;
  498|   131k|            }
  499|   131k|         }
  500|   131k|         else if constexpr (always_null_t<T>) {
  501|   131k|            return 8;
  502|   131k|         }
  503|   131k|         else {
  504|   131k|            return 0;
  505|   131k|         }
  506|   131k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|   131k|      return value;
  514|   131k|   }
_ZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEESD_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  768|  5.62k|      {
  769|       |         if constexpr (check_string_as_number(Opts)) {
  770|       |            const sv str = [&]() -> const sv {
  771|       |               if constexpr (array_char_t<T>) {
  772|       |                  const auto* start = value.data();
  773|       |                  const auto* end = static_cast<const char*>(std::memchr(start, '\0', value.size()));
  774|       |                  return sv{start, end ? size_t(end - start) : value.size()};
  775|       |               }
  776|       |               else if constexpr (u8str_t<T>) {
  777|       |                  return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  778|       |               }
  779|       |               else {
  780|       |                  return str_view<T>(value);
  781|       |               }
  782|       |            }();
  783|       |            if (!ensure_space(ctx, b, ix + str.size() + write_padding_bytes)) [[unlikely]] {
  784|       |               return;
  785|       |            }
  786|       |            dump_maybe_empty<false>(str, b, ix);
  787|       |         }
  788|       |         else if constexpr (char_t<T>) {
  789|       |            if constexpr (check_unquoted(Opts)) {
  790|       |               dump(value, b, ix);
  791|       |            }
  792|       |            else {
  793|       |               // 8 bytes is enough for quotes and escaped character (worst case: \uXXXX = 6 + 2 quotes)
  794|       |               if (!ensure_space(ctx, b, ix + 8)) [[unlikely]] {
  795|       |                  return;
  796|       |               }
  797|       |
  798|       |               std::memcpy(&b[ix], "\"", 1);
  799|       |               ++ix;
  800|       |               if (const auto escaped = char_escape_table[uint8_t(value)]; escaped) {
  801|       |                  std::memcpy(&b[ix], &escaped, 2);
  802|       |                  ix += 2;
  803|       |               }
  804|       |               else if (value == '\0') {
  805|       |                  // null character treated as empty string
  806|       |               }
  807|       |               else if constexpr (check_escape_control_characters(Opts)) {
  808|       |                  if (uint8_t(value) < 0x20) {
  809|       |                     // Write as \uXXXX format
  810|       |                     char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  811|       |                     constexpr char hex_digits[] = "0123456789ABCDEF";
  812|       |                     unicode_escape[4] = hex_digits[(value >> 4) & 0xF];
  813|       |                     unicode_escape[5] = hex_digits[value & 0xF];
  814|       |                     std::memcpy(&b[ix], unicode_escape, 6);
  815|       |                     ix += 6;
  816|       |                  }
  817|       |                  else {
  818|       |                     std::memcpy(&b[ix], &value, 1);
  819|       |                     ++ix;
  820|       |                  }
  821|       |               }
  822|       |               else {
  823|       |                  std::memcpy(&b[ix], &value, 1);
  824|       |                  ++ix;
  825|       |               }
  826|       |               std::memcpy(&b[ix], "\"", 1);
  827|       |               ++ix;
  828|       |            }
  829|       |         }
  830|  5.62k|         else {
  831|       |            if constexpr (check_raw_string(Opts)) {
  832|       |               const sv str = [&]() -> const sv {
  833|       |                  if constexpr (u8str_t<T>) {
  834|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  835|       |                  }
  836|       |                  else {
  837|       |                     return str_view<T>(value);
  838|       |                  }
  839|       |               }();
  840|       |
  841|       |               // We need space for quotes and the string length: 2 + n.
  842|       |               // Use +8 for extra buffer
  843|       |               if (!ensure_space(ctx, b, ix + 8 + str.size())) [[unlikely]] {
  844|       |                  return;
  845|       |               }
  846|       |               // now we don't have to check writing
  847|       |
  848|       |               if constexpr (not check_unquoted(Opts)) {
  849|       |                  std::memcpy(&b[ix], "\"", 1);
  850|       |                  ++ix;
  851|       |               }
  852|       |               if (str.size()) [[likely]] {
  853|       |                  const auto n = str.size();
  854|       |                  std::memcpy(&b[ix], str.data(), n);
  855|       |                  ix += n;
  856|       |               }
  857|       |               if constexpr (not check_unquoted(Opts)) {
  858|       |                  std::memcpy(&b[ix], "\"", 1);
  859|       |                  ++ix;
  860|       |               }
  861|       |            }
  862|  5.62k|            else {
  863|  5.62k|               const sv str = [&]() -> const sv {
  864|  5.62k|                  if constexpr (array_char_t<T>) {
  865|  5.62k|                     return sv{value.data(), value.size()};
  866|  5.62k|                  }
  867|  5.62k|                  else if constexpr (u8str_t<T>) {
  868|  5.62k|                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  869|  5.62k|                  }
  870|  5.62k|                  else {
  871|  5.62k|                     return str_view<T>(value);
  872|  5.62k|                  }
  873|  5.62k|               }();
  874|  5.62k|               const auto n = str.size();
  875|       |
  876|       |               // In the case n == 0 we need two characters for quotes.
  877|       |               // For each individual character we need room for two characters to handle escapes.
  878|       |               // When using Unicode escapes, we might need up to 6 characters (\uXXXX) per character
  879|       |               if constexpr (check_escape_control_characters(Opts)) {
  880|       |                  // We need 2 + 6 * n characters in the worst case (all control chars)
  881|       |                  if (!ensure_space(ctx, b, ix + 10 + 6 * n)) [[unlikely]] {
  882|       |                     return;
  883|       |                  }
  884|       |               }
  885|  5.62k|               else {
  886|       |                  // Using the original sizing
  887|  5.62k|                  if (!ensure_space(ctx, b, ix + 10 + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (887:23): [True: 0, False: 5.62k]
  ------------------
  888|      0|                     return;
  889|      0|                  }
  890|  5.62k|               }
  891|       |               // now we don't have to check writing
  892|       |
  893|       |               if constexpr (check_unquoted(Opts)) {
  894|       |                  if (n) {
  895|       |                     std::memcpy(&b[ix], str.data(), n);
  896|       |                     ix += n;
  897|       |                  }
  898|       |               }
  899|  5.62k|               else {
  900|  5.62k|                  std::memcpy(&b[ix], "\"", 1);
  901|  5.62k|                  ++ix;
  902|       |
  903|  5.62k|                  const auto* c = str.data();
  904|  5.62k|                  const auto* const e = c + n;
  905|  5.62k|                  const auto start = &b[ix];
  906|  5.62k|                  auto data = start;
  907|       |
  908|       |                  // By default we don't escape control characters for performance. Invalid JSON characters
  909|       |                  // result in null characters in the output, making the JSON invalid — these would then be
  910|       |                  // detected upon reading. Enable the `escape_control_characters` option to properly escape
  911|       |                  // control characters (0x00–0x1F) as \uXXXX sequences.
  912|       |
  913|       |                  // Escape handler: writes the escaped form of *c into data, advances both pointers
  914|  5.62k|                  auto write_escape = [&]() {
  915|  5.62k|                     if constexpr (check_escape_control_characters(Opts)) {
  916|  5.62k|                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  917|  5.62k|                           std::memcpy(data, &escaped, 2);
  918|  5.62k|                           data += 2;
  919|  5.62k|                        }
  920|  5.62k|                        else {
  921|  5.62k|                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  922|  5.62k|                           constexpr char hex_digits[] = "0123456789ABCDEF";
  923|  5.62k|                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  924|  5.62k|                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  925|  5.62k|                           std::memcpy(data, unicode_escape, 6);
  926|  5.62k|                           data += 6;
  927|  5.62k|                        }
  928|  5.62k|                     }
  929|  5.62k|                     else {
  930|  5.62k|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
  931|  5.62k|                        data += 2;
  932|  5.62k|                     }
  933|  5.62k|                     ++c;
  934|  5.62k|                  };
  935|       |
  936|       |                  // Adding a helper here means adding a branch to string_escape_simd() in
  937|       |                  // simd/backends.hpp, which names the widest one this cascade invokes, and a row
  938|       |                  // to known_builds in tests/json_test/utf8_validation_test.cpp, which checks it.
  939|       |#if defined(GLZ_USE_AVX2)
  940|       |                  detail::avx2_string_escape(c, e, data, n, write_escape);
  941|       |#endif
  942|  5.62k|#if defined(GLZ_USE_SSE2)
  943|  5.62k|                  detail::sse2_string_escape(c, e, data, n, write_escape);
  944|       |#elif defined(GLZ_USE_NEON)
  945|       |                  detail::neon_string_escape(c, e, data, n, write_escape);
  946|       |#endif
  947|       |
  948|       |                  // SWAR: 8 bytes at a time
  949|  5.62k|                  if (n > 7) {
  ------------------
  |  Branch (949:23): [True: 4.15k, False: 1.46k]
  ------------------
  950|  7.71k|                     for (const auto end_m7 = e - 7; c < end_m7;) {
  ------------------
  |  Branch (950:54): [True: 3.55k, False: 4.15k]
  ------------------
  951|  3.55k|                        std::memcpy(data, c, 8);
  952|  3.55k|                        uint64_t swar;
  953|  3.55k|                        std::memcpy(&swar, c, 8);
  954|       |                        if constexpr (std::endian::native == std::endian::big) {
  955|       |                           swar = std::byteswap(swar);
  956|       |                        }
  957|       |
  958|  3.55k|                        constexpr uint64_t lo7_mask = repeat_byte8(0b01111111);
  959|  3.55k|                        const uint64_t lo7 = swar & lo7_mask;
  960|  3.55k|                        const uint64_t quote = (lo7 ^ repeat_byte8('"')) + lo7_mask;
  961|  3.55k|                        const uint64_t backslash = (lo7 ^ repeat_byte8('\\')) + lo7_mask;
  962|  3.55k|                        const uint64_t less_32 = (swar & repeat_byte8(0b01100000)) + lo7_mask;
  963|  3.55k|                        uint64_t next = ~((quote & backslash & less_32) | swar);
  964|       |
  965|  3.55k|                        next &= repeat_byte8(0b10000000);
  966|  3.55k|                        if (next == 0) {
  ------------------
  |  Branch (966:29): [True: 2.23k, False: 1.31k]
  ------------------
  967|  2.23k|                           data += 8;
  968|  2.23k|                           c += 8;
  969|  2.23k|                           continue;
  970|  2.23k|                        }
  971|       |
  972|  1.31k|                        const auto length = (countr_zero(next) >> 3);
  973|  1.31k|                        c += length;
  974|  1.31k|                        data += length;
  975|  1.31k|                        write_escape();
  976|  1.31k|                     }
  977|  4.15k|                  }
  978|       |
  979|       |                  // Scalar tail
  980|  21.5k|                  for (; c < e; ++c) {
  ------------------
  |  Branch (980:26): [True: 15.8k, False: 5.62k]
  ------------------
  981|  15.8k|                     if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  ------------------
  |  Branch (981:79): [True: 603, False: 15.2k]
  ------------------
  982|    603|                        std::memcpy(data, &escaped, 2);
  983|    603|                        data += 2;
  984|    603|                     }
  985|       |                     else if constexpr (check_escape_control_characters(Opts)) {
  986|       |                        if (uint8_t(*c) < 0x20) {
  987|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  988|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
  989|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  990|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  991|       |                           std::memcpy(data, unicode_escape, 6);
  992|       |                           data += 6;
  993|       |                        }
  994|       |                        else {
  995|       |                           std::memcpy(data, c, 1);
  996|       |                           ++data;
  997|       |                        }
  998|       |                     }
  999|  15.2k|                     else {
 1000|  15.2k|                        std::memcpy(data, c, 1);
 1001|  15.2k|                        ++data;
 1002|  15.2k|                     }
 1003|  15.8k|                  }
 1004|       |
 1005|  5.62k|                  ix += size_t(data - start);
 1006|       |
 1007|  5.62k|                  std::memcpy(&b[ix], "\"", 1);
 1008|  5.62k|                  ++ix;
 1009|  5.62k|               }
 1010|  5.62k|            }
 1011|  5.62k|         }
 1012|  5.62k|      }
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEESD_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE_clEv:
  863|  5.62k|               const sv str = [&]() -> const sv {
  864|       |                  if constexpr (array_char_t<T>) {
  865|       |                     return sv{value.data(), value.size()};
  866|       |                  }
  867|       |                  else if constexpr (u8str_t<T>) {
  868|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  869|       |                  }
  870|  5.62k|                  else {
  871|  5.62k|                     return str_view<T>(value);
  872|  5.62k|                  }
  873|  5.62k|               }();
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEESD_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE0_clEv:
  914|   145k|                  auto write_escape = [&]() {
  915|       |                     if constexpr (check_escape_control_characters(Opts)) {
  916|       |                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  917|       |                           std::memcpy(data, &escaped, 2);
  918|       |                           data += 2;
  919|       |                        }
  920|       |                        else {
  921|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  922|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
  923|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  924|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  925|       |                           std::memcpy(data, unicode_escape, 6);
  926|       |                           data += 6;
  927|       |                        }
  928|       |                     }
  929|   145k|                     else {
  930|   145k|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
  931|   145k|                        data += 2;
  932|   145k|                     }
  933|   145k|                     ++c;
  934|   145k|                  };
_ZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  768|  28.8k|      {
  769|       |         if constexpr (check_string_as_number(Opts)) {
  770|       |            const sv str = [&]() -> const sv {
  771|       |               if constexpr (array_char_t<T>) {
  772|       |                  const auto* start = value.data();
  773|       |                  const auto* end = static_cast<const char*>(std::memchr(start, '\0', value.size()));
  774|       |                  return sv{start, end ? size_t(end - start) : value.size()};
  775|       |               }
  776|       |               else if constexpr (u8str_t<T>) {
  777|       |                  return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  778|       |               }
  779|       |               else {
  780|       |                  return str_view<T>(value);
  781|       |               }
  782|       |            }();
  783|       |            if (!ensure_space(ctx, b, ix + str.size() + write_padding_bytes)) [[unlikely]] {
  784|       |               return;
  785|       |            }
  786|       |            dump_maybe_empty<false>(str, b, ix);
  787|       |         }
  788|       |         else if constexpr (char_t<T>) {
  789|       |            if constexpr (check_unquoted(Opts)) {
  790|       |               dump(value, b, ix);
  791|       |            }
  792|       |            else {
  793|       |               // 8 bytes is enough for quotes and escaped character (worst case: \uXXXX = 6 + 2 quotes)
  794|       |               if (!ensure_space(ctx, b, ix + 8)) [[unlikely]] {
  795|       |                  return;
  796|       |               }
  797|       |
  798|       |               std::memcpy(&b[ix], "\"", 1);
  799|       |               ++ix;
  800|       |               if (const auto escaped = char_escape_table[uint8_t(value)]; escaped) {
  801|       |                  std::memcpy(&b[ix], &escaped, 2);
  802|       |                  ix += 2;
  803|       |               }
  804|       |               else if (value == '\0') {
  805|       |                  // null character treated as empty string
  806|       |               }
  807|       |               else if constexpr (check_escape_control_characters(Opts)) {
  808|       |                  if (uint8_t(value) < 0x20) {
  809|       |                     // Write as \uXXXX format
  810|       |                     char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  811|       |                     constexpr char hex_digits[] = "0123456789ABCDEF";
  812|       |                     unicode_escape[4] = hex_digits[(value >> 4) & 0xF];
  813|       |                     unicode_escape[5] = hex_digits[value & 0xF];
  814|       |                     std::memcpy(&b[ix], unicode_escape, 6);
  815|       |                     ix += 6;
  816|       |                  }
  817|       |                  else {
  818|       |                     std::memcpy(&b[ix], &value, 1);
  819|       |                     ++ix;
  820|       |                  }
  821|       |               }
  822|       |               else {
  823|       |                  std::memcpy(&b[ix], &value, 1);
  824|       |                  ++ix;
  825|       |               }
  826|       |               std::memcpy(&b[ix], "\"", 1);
  827|       |               ++ix;
  828|       |            }
  829|       |         }
  830|  28.8k|         else {
  831|       |            if constexpr (check_raw_string(Opts)) {
  832|       |               const sv str = [&]() -> const sv {
  833|       |                  if constexpr (u8str_t<T>) {
  834|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  835|       |                  }
  836|       |                  else {
  837|       |                     return str_view<T>(value);
  838|       |                  }
  839|       |               }();
  840|       |
  841|       |               // We need space for quotes and the string length: 2 + n.
  842|       |               // Use +8 for extra buffer
  843|       |               if (!ensure_space(ctx, b, ix + 8 + str.size())) [[unlikely]] {
  844|       |                  return;
  845|       |               }
  846|       |               // now we don't have to check writing
  847|       |
  848|       |               if constexpr (not check_unquoted(Opts)) {
  849|       |                  std::memcpy(&b[ix], "\"", 1);
  850|       |                  ++ix;
  851|       |               }
  852|       |               if (str.size()) [[likely]] {
  853|       |                  const auto n = str.size();
  854|       |                  std::memcpy(&b[ix], str.data(), n);
  855|       |                  ix += n;
  856|       |               }
  857|       |               if constexpr (not check_unquoted(Opts)) {
  858|       |                  std::memcpy(&b[ix], "\"", 1);
  859|       |                  ++ix;
  860|       |               }
  861|       |            }
  862|  28.8k|            else {
  863|  28.8k|               const sv str = [&]() -> const sv {
  864|  28.8k|                  if constexpr (array_char_t<T>) {
  865|  28.8k|                     return sv{value.data(), value.size()};
  866|  28.8k|                  }
  867|  28.8k|                  else if constexpr (u8str_t<T>) {
  868|  28.8k|                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  869|  28.8k|                  }
  870|  28.8k|                  else {
  871|  28.8k|                     return str_view<T>(value);
  872|  28.8k|                  }
  873|  28.8k|               }();
  874|  28.8k|               const auto n = str.size();
  875|       |
  876|       |               // In the case n == 0 we need two characters for quotes.
  877|       |               // For each individual character we need room for two characters to handle escapes.
  878|       |               // When using Unicode escapes, we might need up to 6 characters (\uXXXX) per character
  879|       |               if constexpr (check_escape_control_characters(Opts)) {
  880|       |                  // We need 2 + 6 * n characters in the worst case (all control chars)
  881|       |                  if (!ensure_space(ctx, b, ix + 10 + 6 * n)) [[unlikely]] {
  882|       |                     return;
  883|       |                  }
  884|       |               }
  885|  28.8k|               else {
  886|       |                  // Using the original sizing
  887|  28.8k|                  if (!ensure_space(ctx, b, ix + 10 + 2 * n)) [[unlikely]] {
  ------------------
  |  Branch (887:23): [True: 0, False: 28.8k]
  ------------------
  888|      0|                     return;
  889|      0|                  }
  890|  28.8k|               }
  891|       |               // now we don't have to check writing
  892|       |
  893|       |               if constexpr (check_unquoted(Opts)) {
  894|       |                  if (n) {
  895|       |                     std::memcpy(&b[ix], str.data(), n);
  896|       |                     ix += n;
  897|       |                  }
  898|       |               }
  899|  28.8k|               else {
  900|  28.8k|                  std::memcpy(&b[ix], "\"", 1);
  901|  28.8k|                  ++ix;
  902|       |
  903|  28.8k|                  const auto* c = str.data();
  904|  28.8k|                  const auto* const e = c + n;
  905|  28.8k|                  const auto start = &b[ix];
  906|  28.8k|                  auto data = start;
  907|       |
  908|       |                  // By default we don't escape control characters for performance. Invalid JSON characters
  909|       |                  // result in null characters in the output, making the JSON invalid — these would then be
  910|       |                  // detected upon reading. Enable the `escape_control_characters` option to properly escape
  911|       |                  // control characters (0x00–0x1F) as \uXXXX sequences.
  912|       |
  913|       |                  // Escape handler: writes the escaped form of *c into data, advances both pointers
  914|  28.8k|                  auto write_escape = [&]() {
  915|  28.8k|                     if constexpr (check_escape_control_characters(Opts)) {
  916|  28.8k|                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  917|  28.8k|                           std::memcpy(data, &escaped, 2);
  918|  28.8k|                           data += 2;
  919|  28.8k|                        }
  920|  28.8k|                        else {
  921|  28.8k|                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  922|  28.8k|                           constexpr char hex_digits[] = "0123456789ABCDEF";
  923|  28.8k|                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  924|  28.8k|                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  925|  28.8k|                           std::memcpy(data, unicode_escape, 6);
  926|  28.8k|                           data += 6;
  927|  28.8k|                        }
  928|  28.8k|                     }
  929|  28.8k|                     else {
  930|  28.8k|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
  931|  28.8k|                        data += 2;
  932|  28.8k|                     }
  933|  28.8k|                     ++c;
  934|  28.8k|                  };
  935|       |
  936|       |                  // Adding a helper here means adding a branch to string_escape_simd() in
  937|       |                  // simd/backends.hpp, which names the widest one this cascade invokes, and a row
  938|       |                  // to known_builds in tests/json_test/utf8_validation_test.cpp, which checks it.
  939|       |#if defined(GLZ_USE_AVX2)
  940|       |                  detail::avx2_string_escape(c, e, data, n, write_escape);
  941|       |#endif
  942|  28.8k|#if defined(GLZ_USE_SSE2)
  943|  28.8k|                  detail::sse2_string_escape(c, e, data, n, write_escape);
  944|       |#elif defined(GLZ_USE_NEON)
  945|       |                  detail::neon_string_escape(c, e, data, n, write_escape);
  946|       |#endif
  947|       |
  948|       |                  // SWAR: 8 bytes at a time
  949|  28.8k|                  if (n > 7) {
  ------------------
  |  Branch (949:23): [True: 6.71k, False: 22.1k]
  ------------------
  950|  22.2k|                     for (const auto end_m7 = e - 7; c < end_m7;) {
  ------------------
  |  Branch (950:54): [True: 15.5k, False: 6.71k]
  ------------------
  951|  15.5k|                        std::memcpy(data, c, 8);
  952|  15.5k|                        uint64_t swar;
  953|  15.5k|                        std::memcpy(&swar, c, 8);
  954|       |                        if constexpr (std::endian::native == std::endian::big) {
  955|       |                           swar = std::byteswap(swar);
  956|       |                        }
  957|       |
  958|  15.5k|                        constexpr uint64_t lo7_mask = repeat_byte8(0b01111111);
  959|  15.5k|                        const uint64_t lo7 = swar & lo7_mask;
  960|  15.5k|                        const uint64_t quote = (lo7 ^ repeat_byte8('"')) + lo7_mask;
  961|  15.5k|                        const uint64_t backslash = (lo7 ^ repeat_byte8('\\')) + lo7_mask;
  962|  15.5k|                        const uint64_t less_32 = (swar & repeat_byte8(0b01100000)) + lo7_mask;
  963|  15.5k|                        uint64_t next = ~((quote & backslash & less_32) | swar);
  964|       |
  965|  15.5k|                        next &= repeat_byte8(0b10000000);
  966|  15.5k|                        if (next == 0) {
  ------------------
  |  Branch (966:29): [True: 1.38k, False: 14.1k]
  ------------------
  967|  1.38k|                           data += 8;
  968|  1.38k|                           c += 8;
  969|  1.38k|                           continue;
  970|  1.38k|                        }
  971|       |
  972|  14.1k|                        const auto length = (countr_zero(next) >> 3);
  973|  14.1k|                        c += length;
  974|  14.1k|                        data += length;
  975|  14.1k|                        write_escape();
  976|  14.1k|                     }
  977|  6.71k|                  }
  978|       |
  979|       |                  // Scalar tail
  980|  90.0k|                  for (; c < e; ++c) {
  ------------------
  |  Branch (980:26): [True: 61.1k, False: 28.8k]
  ------------------
  981|  61.1k|                     if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  ------------------
  |  Branch (981:79): [True: 596, False: 60.6k]
  ------------------
  982|    596|                        std::memcpy(data, &escaped, 2);
  983|    596|                        data += 2;
  984|    596|                     }
  985|       |                     else if constexpr (check_escape_control_characters(Opts)) {
  986|       |                        if (uint8_t(*c) < 0x20) {
  987|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  988|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
  989|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  990|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  991|       |                           std::memcpy(data, unicode_escape, 6);
  992|       |                           data += 6;
  993|       |                        }
  994|       |                        else {
  995|       |                           std::memcpy(data, c, 1);
  996|       |                           ++data;
  997|       |                        }
  998|       |                     }
  999|  60.6k|                     else {
 1000|  60.6k|                        std::memcpy(data, c, 1);
 1001|  60.6k|                        ++data;
 1002|  60.6k|                     }
 1003|  61.1k|                  }
 1004|       |
 1005|  28.8k|                  ix += size_t(data - start);
 1006|       |
 1007|  28.8k|                  std::memcpy(&b[ix], "\"", 1);
 1008|  28.8k|                  ++ix;
 1009|  28.8k|               }
 1010|  28.8k|            }
 1011|  28.8k|         }
 1012|  28.8k|      }
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE_clEv:
  863|  28.8k|               const sv str = [&]() -> const sv {
  864|       |                  if constexpr (array_char_t<T>) {
  865|       |                     return sv{value.data(), value.size()};
  866|       |                  }
  867|       |                  else if constexpr (u8str_t<T>) {
  868|       |                     return sv{reinterpret_cast<const char*>(value.data()), value.size()};
  869|       |                  }
  870|  28.8k|                  else {
  871|  28.8k|                     return str_view<T>(value);
  872|  28.8k|                  }
  873|  28.8k|               }();
_ZZN3glz2toILj10ENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS1_12basic_stringIcS4_NS1_9allocatorIcEEEERKS5_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_ENKUlvE0_clEv:
  914|  2.20M|                  auto write_escape = [&]() {
  915|       |                     if constexpr (check_escape_control_characters(Opts)) {
  916|       |                        if (const auto escaped = char_escape_table[uint8_t(*c)]; escaped) {
  917|       |                           std::memcpy(data, &escaped, 2);
  918|       |                           data += 2;
  919|       |                        }
  920|       |                        else {
  921|       |                           char unicode_escape[6] = {'\\', 'u', '0', '0', '0', '0'};
  922|       |                           constexpr char hex_digits[] = "0123456789ABCDEF";
  923|       |                           unicode_escape[4] = hex_digits[(uint8_t(*c) >> 4) & 0xF];
  924|       |                           unicode_escape[5] = hex_digits[uint8_t(*c) & 0xF];
  925|       |                           std::memcpy(data, unicode_escape, 6);
  926|       |                           data += 6;
  927|       |                        }
  928|       |                     }
  929|  2.20M|                     else {
  930|  2.20M|                        std::memcpy(data, &char_escape_table[uint8_t(*c)], 2);
  931|  2.20M|                        data += 2;
  932|  2.20M|                     }
  933|  2.20M|                     ++c;
  934|  2.20M|                  };
_ZN3glz2toILj10EfE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|   392k|      {
  738|   392k|         if constexpr (not check_write_unchecked(Opts)) {
  739|   392k|            static_assert(required_padding<T>());
  740|   392k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 392k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|   392k|         }
  744|       |
  745|   392k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|   392k|         else {
  755|   392k|            write_chars::op<O>(value, ctx, b, ix);
  756|   392k|         }
  757|   392k|      }
_ZN3glz16required_paddingIfEEmv:
  461|   392k|   {
  462|   392k|      constexpr auto value = []() -> size_t {
  463|   392k|         if constexpr (boolean_like<T>) {
  464|   392k|            return 8;
  465|   392k|         }
  466|   392k|         else if constexpr (num_t<T>) {
  467|   392k|            if constexpr (std::floating_point<T>) {
  468|   392k|               if constexpr (sizeof(T) > 8) {
  469|   392k|                  return 64;
  470|   392k|               }
  471|   392k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|   392k|                  return zmij::double_buffer_size + 4;
  474|   392k|               }
  475|   392k|               else {
  476|   392k|                  return zmij::float_buffer_size + 4;
  477|   392k|               }
  478|   392k|            }
  479|   392k|            else if constexpr (sizeof(T) > 4) {
  480|   392k|               return 24;
  481|   392k|            }
  482|   392k|            else if constexpr (sizeof(T) > 2) {
  483|   392k|               return 16;
  484|   392k|            }
  485|   392k|            else {
  486|   392k|               return 8;
  487|   392k|            }
  488|   392k|         }
  489|   392k|         else if constexpr (nullable_like<T>) {
  490|   392k|            if constexpr (has_value_type<T>) {
  491|   392k|               return required_padding<typename T::value_type>();
  492|   392k|            }
  493|   392k|            else if constexpr (has_element_type<T>) {
  494|   392k|               return required_padding<typename T::element_type>();
  495|   392k|            }
  496|   392k|            else {
  497|   392k|               return 0;
  498|   392k|            }
  499|   392k|         }
  500|   392k|         else if constexpr (always_null_t<T>) {
  501|   392k|            return 8;
  502|   392k|         }
  503|   392k|         else {
  504|   392k|            return 0;
  505|   392k|         }
  506|   392k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|   392k|      return value;
  514|   392k|   }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|   127k|      {
  738|   127k|         if constexpr (not check_write_unchecked(Opts)) {
  739|   127k|            static_assert(required_padding<T>());
  740|   127k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 127k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|   127k|         }
  744|       |
  745|   127k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|   127k|         else {
  755|   127k|            write_chars::op<O>(value, ctx, b, ix);
  756|   127k|         }
  757|   127k|      }
_ZN3glz16required_paddingIdEEmv:
  461|   355k|   {
  462|   355k|      constexpr auto value = []() -> size_t {
  463|   355k|         if constexpr (boolean_like<T>) {
  464|   355k|            return 8;
  465|   355k|         }
  466|   355k|         else if constexpr (num_t<T>) {
  467|   355k|            if constexpr (std::floating_point<T>) {
  468|   355k|               if constexpr (sizeof(T) > 8) {
  469|   355k|                  return 64;
  470|   355k|               }
  471|   355k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|   355k|                  return zmij::double_buffer_size + 4;
  474|   355k|               }
  475|   355k|               else {
  476|   355k|                  return zmij::float_buffer_size + 4;
  477|   355k|               }
  478|   355k|            }
  479|   355k|            else if constexpr (sizeof(T) > 4) {
  480|   355k|               return 24;
  481|   355k|            }
  482|   355k|            else if constexpr (sizeof(T) > 2) {
  483|   355k|               return 16;
  484|   355k|            }
  485|   355k|            else {
  486|   355k|               return 8;
  487|   355k|            }
  488|   355k|         }
  489|   355k|         else if constexpr (nullable_like<T>) {
  490|   355k|            if constexpr (has_value_type<T>) {
  491|   355k|               return required_padding<typename T::value_type>();
  492|   355k|            }
  493|   355k|            else if constexpr (has_element_type<T>) {
  494|   355k|               return required_padding<typename T::element_type>();
  495|   355k|            }
  496|   355k|            else {
  497|   355k|               return 0;
  498|   355k|            }
  499|   355k|         }
  500|   355k|         else if constexpr (always_null_t<T>) {
  501|   355k|            return 8;
  502|   355k|         }
  503|   355k|         else {
  504|   355k|            return 0;
  505|   355k|         }
  506|   355k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|   355k|      return value;
  514|   355k|   }
_ZN3glz2toILj10EaE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  69.2k|      {
  738|  69.2k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  69.2k|            static_assert(required_padding<T>());
  740|  69.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 69.2k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  69.2k|         }
  744|       |
  745|  69.2k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  69.2k|         else {
  755|  69.2k|            write_chars::op<O>(value, ctx, b, ix);
  756|  69.2k|         }
  757|  69.2k|      }
_ZN3glz16required_paddingIaEEmv:
  461|  69.2k|   {
  462|  69.2k|      constexpr auto value = []() -> size_t {
  463|  69.2k|         if constexpr (boolean_like<T>) {
  464|  69.2k|            return 8;
  465|  69.2k|         }
  466|  69.2k|         else if constexpr (num_t<T>) {
  467|  69.2k|            if constexpr (std::floating_point<T>) {
  468|  69.2k|               if constexpr (sizeof(T) > 8) {
  469|  69.2k|                  return 64;
  470|  69.2k|               }
  471|  69.2k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  69.2k|                  return zmij::double_buffer_size + 4;
  474|  69.2k|               }
  475|  69.2k|               else {
  476|  69.2k|                  return zmij::float_buffer_size + 4;
  477|  69.2k|               }
  478|  69.2k|            }
  479|  69.2k|            else if constexpr (sizeof(T) > 4) {
  480|  69.2k|               return 24;
  481|  69.2k|            }
  482|  69.2k|            else if constexpr (sizeof(T) > 2) {
  483|  69.2k|               return 16;
  484|  69.2k|            }
  485|  69.2k|            else {
  486|  69.2k|               return 8;
  487|  69.2k|            }
  488|  69.2k|         }
  489|  69.2k|         else if constexpr (nullable_like<T>) {
  490|  69.2k|            if constexpr (has_value_type<T>) {
  491|  69.2k|               return required_padding<typename T::value_type>();
  492|  69.2k|            }
  493|  69.2k|            else if constexpr (has_element_type<T>) {
  494|  69.2k|               return required_padding<typename T::element_type>();
  495|  69.2k|            }
  496|  69.2k|            else {
  497|  69.2k|               return 0;
  498|  69.2k|            }
  499|  69.2k|         }
  500|  69.2k|         else if constexpr (always_null_t<T>) {
  501|  69.2k|            return 8;
  502|  69.2k|         }
  503|  69.2k|         else {
  504|  69.2k|            return 0;
  505|  69.2k|         }
  506|  69.2k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  69.2k|      return value;
  514|  69.2k|   }
_ZN3glz2toILj10EsE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  16.8k|      {
  738|  16.8k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  16.8k|            static_assert(required_padding<T>());
  740|  16.8k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 16.8k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  16.8k|         }
  744|       |
  745|  16.8k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  16.8k|         else {
  755|  16.8k|            write_chars::op<O>(value, ctx, b, ix);
  756|  16.8k|         }
  757|  16.8k|      }
_ZN3glz16required_paddingIsEEmv:
  461|  16.8k|   {
  462|  16.8k|      constexpr auto value = []() -> size_t {
  463|  16.8k|         if constexpr (boolean_like<T>) {
  464|  16.8k|            return 8;
  465|  16.8k|         }
  466|  16.8k|         else if constexpr (num_t<T>) {
  467|  16.8k|            if constexpr (std::floating_point<T>) {
  468|  16.8k|               if constexpr (sizeof(T) > 8) {
  469|  16.8k|                  return 64;
  470|  16.8k|               }
  471|  16.8k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  16.8k|                  return zmij::double_buffer_size + 4;
  474|  16.8k|               }
  475|  16.8k|               else {
  476|  16.8k|                  return zmij::float_buffer_size + 4;
  477|  16.8k|               }
  478|  16.8k|            }
  479|  16.8k|            else if constexpr (sizeof(T) > 4) {
  480|  16.8k|               return 24;
  481|  16.8k|            }
  482|  16.8k|            else if constexpr (sizeof(T) > 2) {
  483|  16.8k|               return 16;
  484|  16.8k|            }
  485|  16.8k|            else {
  486|  16.8k|               return 8;
  487|  16.8k|            }
  488|  16.8k|         }
  489|  16.8k|         else if constexpr (nullable_like<T>) {
  490|  16.8k|            if constexpr (has_value_type<T>) {
  491|  16.8k|               return required_padding<typename T::value_type>();
  492|  16.8k|            }
  493|  16.8k|            else if constexpr (has_element_type<T>) {
  494|  16.8k|               return required_padding<typename T::element_type>();
  495|  16.8k|            }
  496|  16.8k|            else {
  497|  16.8k|               return 0;
  498|  16.8k|            }
  499|  16.8k|         }
  500|  16.8k|         else if constexpr (always_null_t<T>) {
  501|  16.8k|            return 8;
  502|  16.8k|         }
  503|  16.8k|         else {
  504|  16.8k|            return 0;
  505|  16.8k|         }
  506|  16.8k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  16.8k|      return value;
  514|  16.8k|   }
_ZN3glz2toILj10EiE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  39.3k|      {
  738|  39.3k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  39.3k|            static_assert(required_padding<T>());
  740|  39.3k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 39.3k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  39.3k|         }
  744|       |
  745|  39.3k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  39.3k|         else {
  755|  39.3k|            write_chars::op<O>(value, ctx, b, ix);
  756|  39.3k|         }
  757|  39.3k|      }
_ZN3glz16required_paddingIiEEmv:
  461|  39.3k|   {
  462|  39.3k|      constexpr auto value = []() -> size_t {
  463|  39.3k|         if constexpr (boolean_like<T>) {
  464|  39.3k|            return 8;
  465|  39.3k|         }
  466|  39.3k|         else if constexpr (num_t<T>) {
  467|  39.3k|            if constexpr (std::floating_point<T>) {
  468|  39.3k|               if constexpr (sizeof(T) > 8) {
  469|  39.3k|                  return 64;
  470|  39.3k|               }
  471|  39.3k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  39.3k|                  return zmij::double_buffer_size + 4;
  474|  39.3k|               }
  475|  39.3k|               else {
  476|  39.3k|                  return zmij::float_buffer_size + 4;
  477|  39.3k|               }
  478|  39.3k|            }
  479|  39.3k|            else if constexpr (sizeof(T) > 4) {
  480|  39.3k|               return 24;
  481|  39.3k|            }
  482|  39.3k|            else if constexpr (sizeof(T) > 2) {
  483|  39.3k|               return 16;
  484|  39.3k|            }
  485|  39.3k|            else {
  486|  39.3k|               return 8;
  487|  39.3k|            }
  488|  39.3k|         }
  489|  39.3k|         else if constexpr (nullable_like<T>) {
  490|  39.3k|            if constexpr (has_value_type<T>) {
  491|  39.3k|               return required_padding<typename T::value_type>();
  492|  39.3k|            }
  493|  39.3k|            else if constexpr (has_element_type<T>) {
  494|  39.3k|               return required_padding<typename T::element_type>();
  495|  39.3k|            }
  496|  39.3k|            else {
  497|  39.3k|               return 0;
  498|  39.3k|            }
  499|  39.3k|         }
  500|  39.3k|         else if constexpr (always_null_t<T>) {
  501|  39.3k|            return 8;
  502|  39.3k|         }
  503|  39.3k|         else {
  504|  39.3k|            return 0;
  505|  39.3k|         }
  506|  39.3k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  39.3k|      return value;
  514|  39.3k|   }
_ZN3glz2toILj10ElE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  69.6k|      {
  738|  69.6k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  69.6k|            static_assert(required_padding<T>());
  740|  69.6k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 69.6k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  69.6k|         }
  744|       |
  745|  69.6k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  69.6k|         else {
  755|  69.6k|            write_chars::op<O>(value, ctx, b, ix);
  756|  69.6k|         }
  757|  69.6k|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|   204k|      {
  738|   204k|         if constexpr (not check_write_unchecked(Opts)) {
  739|   204k|            static_assert(required_padding<T>());
  740|   204k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 204k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|   204k|         }
  744|       |
  745|   204k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|   204k|         else {
  755|   204k|            write_chars::op<O>(value, ctx, b, ix);
  756|   204k|         }
  757|   204k|      }
_ZN3glz16required_paddingIhEEmv:
  461|   222k|   {
  462|   222k|      constexpr auto value = []() -> size_t {
  463|   222k|         if constexpr (boolean_like<T>) {
  464|   222k|            return 8;
  465|   222k|         }
  466|   222k|         else if constexpr (num_t<T>) {
  467|   222k|            if constexpr (std::floating_point<T>) {
  468|   222k|               if constexpr (sizeof(T) > 8) {
  469|   222k|                  return 64;
  470|   222k|               }
  471|   222k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|   222k|                  return zmij::double_buffer_size + 4;
  474|   222k|               }
  475|   222k|               else {
  476|   222k|                  return zmij::float_buffer_size + 4;
  477|   222k|               }
  478|   222k|            }
  479|   222k|            else if constexpr (sizeof(T) > 4) {
  480|   222k|               return 24;
  481|   222k|            }
  482|   222k|            else if constexpr (sizeof(T) > 2) {
  483|   222k|               return 16;
  484|   222k|            }
  485|   222k|            else {
  486|   222k|               return 8;
  487|   222k|            }
  488|   222k|         }
  489|   222k|         else if constexpr (nullable_like<T>) {
  490|   222k|            if constexpr (has_value_type<T>) {
  491|   222k|               return required_padding<typename T::value_type>();
  492|   222k|            }
  493|   222k|            else if constexpr (has_element_type<T>) {
  494|   222k|               return required_padding<typename T::element_type>();
  495|   222k|            }
  496|   222k|            else {
  497|   222k|               return 0;
  498|   222k|            }
  499|   222k|         }
  500|   222k|         else if constexpr (always_null_t<T>) {
  501|   222k|            return 8;
  502|   222k|         }
  503|   222k|         else {
  504|   222k|            return 0;
  505|   222k|         }
  506|   222k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|   222k|      return value;
  514|   222k|   }
_ZN3glz2toILj10EtE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  50.2k|      {
  738|  50.2k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  50.2k|            static_assert(required_padding<T>());
  740|  50.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 50.2k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  50.2k|         }
  744|       |
  745|  50.2k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  50.2k|         else {
  755|  50.2k|            write_chars::op<O>(value, ctx, b, ix);
  756|  50.2k|         }
  757|  50.2k|      }
_ZN3glz16required_paddingItEEmv:
  461|  50.2k|   {
  462|  50.2k|      constexpr auto value = []() -> size_t {
  463|  50.2k|         if constexpr (boolean_like<T>) {
  464|  50.2k|            return 8;
  465|  50.2k|         }
  466|  50.2k|         else if constexpr (num_t<T>) {
  467|  50.2k|            if constexpr (std::floating_point<T>) {
  468|  50.2k|               if constexpr (sizeof(T) > 8) {
  469|  50.2k|                  return 64;
  470|  50.2k|               }
  471|  50.2k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  50.2k|                  return zmij::double_buffer_size + 4;
  474|  50.2k|               }
  475|  50.2k|               else {
  476|  50.2k|                  return zmij::float_buffer_size + 4;
  477|  50.2k|               }
  478|  50.2k|            }
  479|  50.2k|            else if constexpr (sizeof(T) > 4) {
  480|  50.2k|               return 24;
  481|  50.2k|            }
  482|  50.2k|            else if constexpr (sizeof(T) > 2) {
  483|  50.2k|               return 16;
  484|  50.2k|            }
  485|  50.2k|            else {
  486|  50.2k|               return 8;
  487|  50.2k|            }
  488|  50.2k|         }
  489|  50.2k|         else if constexpr (nullable_like<T>) {
  490|  50.2k|            if constexpr (has_value_type<T>) {
  491|  50.2k|               return required_padding<typename T::value_type>();
  492|  50.2k|            }
  493|  50.2k|            else if constexpr (has_element_type<T>) {
  494|  50.2k|               return required_padding<typename T::element_type>();
  495|  50.2k|            }
  496|  50.2k|            else {
  497|  50.2k|               return 0;
  498|  50.2k|            }
  499|  50.2k|         }
  500|  50.2k|         else if constexpr (always_null_t<T>) {
  501|  50.2k|            return 8;
  502|  50.2k|         }
  503|  50.2k|         else {
  504|  50.2k|            return 0;
  505|  50.2k|         }
  506|  50.2k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  50.2k|      return value;
  514|  50.2k|   }
_ZN3glz2toILj10EjE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  18.4k|      {
  738|  18.4k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  18.4k|            static_assert(required_padding<T>());
  740|  18.4k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 18.4k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  18.4k|         }
  744|       |
  745|  18.4k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  18.4k|         else {
  755|  18.4k|            write_chars::op<O>(value, ctx, b, ix);
  756|  18.4k|         }
  757|  18.4k|      }
_ZN3glz16required_paddingIjEEmv:
  461|  18.4k|   {
  462|  18.4k|      constexpr auto value = []() -> size_t {
  463|  18.4k|         if constexpr (boolean_like<T>) {
  464|  18.4k|            return 8;
  465|  18.4k|         }
  466|  18.4k|         else if constexpr (num_t<T>) {
  467|  18.4k|            if constexpr (std::floating_point<T>) {
  468|  18.4k|               if constexpr (sizeof(T) > 8) {
  469|  18.4k|                  return 64;
  470|  18.4k|               }
  471|  18.4k|               else if constexpr (sizeof(T) > 4) {
  472|       |                  // zmij scratch + 4 for optional quotes and trailing comma.
  473|  18.4k|                  return zmij::double_buffer_size + 4;
  474|  18.4k|               }
  475|  18.4k|               else {
  476|  18.4k|                  return zmij::float_buffer_size + 4;
  477|  18.4k|               }
  478|  18.4k|            }
  479|  18.4k|            else if constexpr (sizeof(T) > 4) {
  480|  18.4k|               return 24;
  481|  18.4k|            }
  482|  18.4k|            else if constexpr (sizeof(T) > 2) {
  483|  18.4k|               return 16;
  484|  18.4k|            }
  485|  18.4k|            else {
  486|  18.4k|               return 8;
  487|  18.4k|            }
  488|  18.4k|         }
  489|  18.4k|         else if constexpr (nullable_like<T>) {
  490|  18.4k|            if constexpr (has_value_type<T>) {
  491|  18.4k|               return required_padding<typename T::value_type>();
  492|  18.4k|            }
  493|  18.4k|            else if constexpr (has_element_type<T>) {
  494|  18.4k|               return required_padding<typename T::element_type>();
  495|  18.4k|            }
  496|  18.4k|            else {
  497|  18.4k|               return 0;
  498|  18.4k|            }
  499|  18.4k|         }
  500|  18.4k|         else if constexpr (always_null_t<T>) {
  501|  18.4k|            return 8;
  502|  18.4k|         }
  503|  18.4k|         else {
  504|  18.4k|            return 0;
  505|  18.4k|         }
  506|  18.4k|      }();
  507|       |
  508|       |      if constexpr (value >= (write_padding_bytes - 16)) {
  509|       |         // we always require 16 bytes available from write_padding_bytes
  510|       |         // for opening and closing characters
  511|       |         return 0;
  512|       |      }
  513|  18.4k|      return value;
  514|  18.4k|   }
_ZN3glz2toILj10EmE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  83.2k|      {
  738|  83.2k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  83.2k|            static_assert(required_padding<T>());
  740|  83.2k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 83.2k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  83.2k|         }
  744|       |
  745|  83.2k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  83.2k|         else {
  755|  83.2k|            write_chars::op<O>(value, ctx, b, ix);
  756|  83.2k|         }
  757|  83.2k|      }
_ZN3glz2toILj10EdE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|   228k|      {
  738|   228k|         if constexpr (not check_write_unchecked(Opts)) {
  739|   228k|            static_assert(required_padding<T>());
  740|   228k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 228k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|   228k|         }
  744|       |
  745|   228k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|   228k|         else {
  755|   228k|            write_chars::op<O>(value, ctx, b, ix);
  756|   228k|         }
  757|   228k|      }
_ZN3glz2toILj10EhE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  737|  17.5k|      {
  738|  17.5k|         if constexpr (not check_write_unchecked(Opts)) {
  739|  17.5k|            static_assert(required_padding<T>());
  740|  17.5k|            if (!ensure_space(ctx, b, ix + required_padding<T>())) [[unlikely]] {
  ------------------
  |  Branch (740:17): [True: 0, False: 17.5k]
  ------------------
  741|      0|               return;
  742|      0|            }
  743|  17.5k|         }
  744|       |
  745|  17.5k|         static constexpr auto O = write_unchecked_on<Opts>();
  746|       |
  747|       |         if constexpr (check_quoted_num(Opts)) {
  748|       |            std::memcpy(&b[ix], "\"", 1);
  749|       |            ++ix;
  750|       |            write_chars::op<O>(value, ctx, b, ix);
  751|       |            std::memcpy(&b[ix], "\"", 1);
  752|       |            ++ix;
  753|       |         }
  754|  17.5k|         else {
  755|  17.5k|            write_chars::op<O>(value, ctx, b, ix);
  756|  17.5k|         }
  757|  17.5k|      }

_ZN3glz6to_tieIR9my_structLm4EQleT0_L_ZNS_6detail25max_pure_reflection_countEEEEDcOT_:
  137|  12.7k|   {
  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|  12.7k|      else if constexpr (N == 4) {
  154|  12.7k|         auto& [p0, p1, p2, p3] = t;
  155|  12.7k|         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|  12.7k|   }

_ZN3glz6detail18sse2_string_escapeIcRZNS_2toILj10ENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEESF_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_EUlvE0_EEvRPKcST_RPT_mSN_:
   17|  5.62k|   {
   18|       |      // SSE2: 16 bytes at a time with direct comparison instructions
   19|  5.62k|      if (n > 15) {
  ------------------
  |  Branch (19:11): [True: 3.52k, False: 2.10k]
  ------------------
   20|  3.52k|         const __m128i quote_vec = _mm_set1_epi8('"');
   21|  3.52k|         const __m128i bs_vec = _mm_set1_epi8('\\');
   22|  3.52k|         const __m128i ctrl_mask = _mm_set1_epi8(static_cast<int8_t>(0xE0));
   23|  3.52k|         const __m128i zero = _mm_setzero_si128();
   24|       |
   25|   512k|         for (const char* end_m15 = e - 15; c < end_m15;) {
  ------------------
  |  Branch (25:45): [True: 509k, False: 3.52k]
  ------------------
   26|   509k|            __m128i v = _mm_loadu_si128(reinterpret_cast<const __m128i*>(c));
   27|   509k|            _mm_storeu_si128(reinterpret_cast<__m128i*>(data), v);
   28|       |
   29|   509k|            const uint32_t mask = static_cast<uint32_t>(
   30|   509k|               _mm_movemask_epi8(_mm_or_si128(_mm_or_si128(_mm_cmpeq_epi8(v, quote_vec), _mm_cmpeq_epi8(v, bs_vec)),
   31|   509k|                                              _mm_cmpeq_epi8(_mm_and_si128(v, ctrl_mask), zero))));
   32|       |
   33|   509k|            if (mask == 0) {
  ------------------
  |  Branch (33:17): [True: 365k, False: 144k]
  ------------------
   34|   365k|               data += 16;
   35|   365k|               c += 16;
   36|   365k|               continue;
   37|   365k|            }
   38|       |
   39|   144k|            const uint32_t length = countr_zero(mask);
   40|   144k|            c += length;
   41|   144k|            data += length;
   42|   144k|            write_escape();
   43|   144k|         }
   44|  3.52k|      }
   45|  5.62k|   }
_ZN3glz6detail18sse2_string_escapeIcRZNS_2toILj10ENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEE2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1EEERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEERKS7_TkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_EUlvE0_EEvRPKcSV_RPT_mSP_:
   17|  28.8k|   {
   18|       |      // SSE2: 16 bytes at a time with direct comparison instructions
   19|  28.8k|      if (n > 15) {
  ------------------
  |  Branch (19:11): [True: 4.64k, False: 24.1k]
  ------------------
   20|  4.64k|         const __m128i quote_vec = _mm_set1_epi8('"');
   21|  4.64k|         const __m128i bs_vec = _mm_set1_epi8('\\');
   22|  4.64k|         const __m128i ctrl_mask = _mm_set1_epi8(static_cast<int8_t>(0xE0));
   23|  4.64k|         const __m128i zero = _mm_setzero_si128();
   24|       |
   25|  2.28M|         for (const char* end_m15 = e - 15; c < end_m15;) {
  ------------------
  |  Branch (25:45): [True: 2.28M, False: 4.64k]
  ------------------
   26|  2.28M|            __m128i v = _mm_loadu_si128(reinterpret_cast<const __m128i*>(c));
   27|  2.28M|            _mm_storeu_si128(reinterpret_cast<__m128i*>(data), v);
   28|       |
   29|  2.28M|            const uint32_t mask = static_cast<uint32_t>(
   30|  2.28M|               _mm_movemask_epi8(_mm_or_si128(_mm_or_si128(_mm_cmpeq_epi8(v, quote_vec), _mm_cmpeq_epi8(v, bs_vec)),
   31|  2.28M|                                              _mm_cmpeq_epi8(_mm_and_si128(v, ctrl_mask), zero))));
   32|       |
   33|  2.28M|            if (mask == 0) {
  ------------------
  |  Branch (33:17): [True: 94.6k, False: 2.18M]
  ------------------
   34|  94.6k|               data += 16;
   35|  94.6k|               c += 16;
   36|  94.6k|               continue;
   37|  94.6k|            }
   38|       |
   39|  2.18M|            const uint32_t length = countr_zero(mask);
   40|  2.18M|            c += length;
   41|  2.18M|            data += length;
   42|  2.18M|            write_escape();
   43|  2.18M|         }
   44|  4.64k|      }
   45|  28.8k|   }

_ZN3glz3getILm0ETkNS_6tuplet9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  432|  3.76k|   {
  433|  3.76k|      return static_cast<Tup&&>(tup)[tuplet::tag<I>()];
  434|  3.76k|   }
_ZNO3glz6tuplet10tuple_elemILm0ERiEixENSt3__117integral_constantImLm0EEE:
  113|  3.76k|         constexpr decltype(auto) operator[](tag<I>) && { return (std::move(*this).value); }
_ZN3glz3tieIJidNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_5arrayImLm3EEEEEENS_5tupleIJDpRT_EEESD_:
  442|  12.7k|   {
  443|  12.7k|      return {t...};
  444|  12.7k|   }
_ZN3glz3getILm1ETkNS_6tuplet9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  432|  1.47k|   {
  433|  1.47k|      return static_cast<Tup&&>(tup)[tuplet::tag<I>()];
  434|  1.47k|   }
_ZNO3glz6tuplet10tuple_elemILm1ERdEixENSt3__117integral_constantImLm1EEE:
  113|  1.47k|         constexpr decltype(auto) operator[](tag<I>) && { return (std::move(*this).value); }
_ZN3glz3getILm2ETkNS_6tuplet9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  432|  3.08k|   {
  433|  3.08k|      return static_cast<Tup&&>(tup)[tuplet::tag<I>()];
  434|  3.08k|   }
_ZNO3glz6tuplet10tuple_elemILm2ERNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEixENS2_17integral_constantImLm2EEE:
  113|  3.08k|         constexpr decltype(auto) operator[](tag<I>) && { return (std::move(*this).value); }
_ZN3glz3getILm3ETkNS_6tuplet9indexableENS_5tupleIJRiRdRNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS5_5arrayImLm3EEEEEEEEDcOT0_:
  432|  4.42k|   {
  433|  4.42k|      return static_cast<Tup&&>(tup)[tuplet::tag<I>()];
  434|  4.42k|   }
_ZNO3glz6tuplet10tuple_elemILm3ERNSt3__15arrayImLm3EEEEixENS2_17integral_constantImLm3EEE:
  113|  4.42k|         constexpr decltype(auto) operator[](tag<I>) && { return (std::move(*this).value); }

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

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

_ZN3glz4dumpILb1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10byte_sizedEcEEvT1_RT0_Rm:
   82|  8.67M|   {
   83|  8.67M|      if constexpr (Checked && vector_like<B>) {
   84|  8.67M|         if (ix == b.size()) [[unlikely]] {
  ------------------
  |  Branch (84:14): [True: 5.13k, False: 8.66M]
  ------------------
   85|  5.13k|            b.resize(b.size() == 0 ? 128 : b.size() * 2);
  ------------------
  |  Branch (85:22): [True: 3.97k, False: 1.16k]
  ------------------
   86|  5.13k|         }
   87|  8.67M|      }
   88|  8.67M|      assign_maybe_cast(c, b, ix);
   89|  8.67M|      ++ix;
   90|  8.67M|   }
_ZN3glz17assign_maybe_castITkNS_10byte_sizedEcNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvT_RT0_Rm:
   55|  8.67M|   {
   56|  8.67M|      using V = std::decay_t<decltype(b[0])>;
   57|  8.67M|      using C = std::decay_t<decltype(c)>;
   58|  8.67M|      if constexpr (std::same_as<V, C>) {
   59|  8.67M|         b[ix] = c;
   60|       |      }
   61|       |      else {
   62|       |         b[ix] = static_cast<V>(c);
   63|       |      }
   64|  8.67M|   }
_ZN3glz4dumpILb1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvNS1_17basic_string_viewIcS4_EERT0_Rm:
  124|   275k|   {
  125|   275k|      const auto n = str.size();
  126|   275k|      if constexpr (vector_like<B>) {
  127|   275k|         if constexpr (Checked) {
  128|   275k|            const auto k = ix + n;
  129|   275k|            if (ix + n > b.size()) [[unlikely]] {
  ------------------
  |  Branch (129:17): [True: 728, False: 274k]
  ------------------
  130|    728|               b.resize(2 * k);
  131|    728|            }
  132|   275k|         }
  133|   275k|      }
  134|   275k|      std::memcpy(&b[ix], str.data(), n);
  135|   275k|      ix += n;
  136|   275k|   }

_ZN3glz5visitILm4EZNS_4fromILj2E9my_structE2opITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEES2_TkNS_10is_contextENS_7contextEPKcS8_EEvRT0_RT1_RT2_T3_EUlTnmvE_EEvOS9_m:
   81|  12.8k|   {
   82|  12.8k|      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|  12.8k|         else if constexpr (N == 4) {
  116|  12.8k|            switch (index) {
  117|  3.76k|            case 0:
  ------------------
  |  Branch (117:13): [True: 3.76k, False: 9.11k]
  ------------------
  118|  3.76k|               lambda.template operator()<0>();
  119|  3.76k|               break;
  120|  1.47k|            case 1:
  ------------------
  |  Branch (120:13): [True: 1.47k, False: 11.4k]
  ------------------
  121|  1.47k|               lambda.template operator()<1>();
  122|  1.47k|               break;
  123|  3.13k|            case 2:
  ------------------
  |  Branch (123:13): [True: 3.13k, False: 9.74k]
  ------------------
  124|  3.13k|               lambda.template operator()<2>();
  125|  3.13k|               break;
  126|  4.49k|            case 3:
  ------------------
  |  Branch (126:13): [True: 4.49k, False: 8.37k]
  ------------------
  127|  4.49k|               lambda.template operator()<3>();
  128|  4.49k|               break;
  129|      0|            default:
  ------------------
  |  Branch (129:13): [True: 0, False: 12.8k]
  ------------------
  130|      0|               std::unreachable();
  131|  12.8k|            }
  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|  12.8k|      }
  329|  12.8k|   }

_ZN3glz8to_charsIaQsr3stdE7same_asIu14__remove_cvrefIT_EaEEEPcS3_S1_:
  277|  69.2k|   {
  278|  69.2k|      *buf = '-';
  279|  69.2k|      return to_chars(buf + (val < 0), uint8_t(val ^ (val >> 7)) - (val >> 7));
  280|  69.2k|   }
_ZN3glz8to_charsIiQsr3stdE7same_asIu14__remove_cvrefIT_EiEEEPcS3_S1_:
  213|  86.1k|   {
  214|  86.1k|      *buf = '-';
  215|  86.1k|      return to_chars(buf + (val < 0), uint32_t(val ^ (val >> 31)) - (val >> 31));
  216|  86.1k|   }
_ZN3glz8to_charsIjQsr3stdE7same_asIu14__remove_cvrefIT_EjEEEPcS3_S1_:
  191|  86.1k|   {
  192|  86.1k|      using namespace itoa_impl;
  193|  86.1k|      if (val < 100) {
  ------------------
  |  Branch (193:11): [True: 77.7k, False: 8.32k]
  ------------------
  194|  77.7k|         return u32_2(buf, val);
  195|  77.7k|      }
  196|  8.32k|      else if (val < 10000) {
  ------------------
  |  Branch (196:16): [True: 7.02k, False: 1.29k]
  ------------------
  197|  7.02k|         return u32_4(buf, val);
  198|  7.02k|      }
  199|  1.29k|      else if (val < 1000000) {
  ------------------
  |  Branch (199:16): [True: 1.29k, False: 0]
  ------------------
  200|  1.29k|         return u32_6(buf, val);
  201|  1.29k|      }
  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|  86.1k|   }
_ZN3glz9itoa_impl5u32_2EPcj:
   74|   234k|      {
   75|   234k|         const uint32_t lz = val < 10;
   76|   234k|         std::memcpy(buf, char_table + ((val * 2) | lz), 2);
   77|   234k|         return buf + 2 - lz;
   78|   234k|      }
_ZN3glz9itoa_impl5u32_4EPcj:
   81|  36.4k|      {
   82|  36.4k|         const uint32_t aa = (val * 5243) >> 19; // val / 100
   83|  36.4k|         const uint32_t lz = aa < 10;
   84|  36.4k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   85|  36.4k|         std::memcpy(buf + 2 - lz, &digit_pairs[val - aa * 100], 2);
   86|  36.4k|         return buf + 4 - lz;
   87|  36.4k|      }
_ZN3glz9itoa_impl5u32_6EPcj:
   90|  1.29k|      {
   91|  1.29k|         const uint32_t aa = uint32_t((uint64_t(val) * 429497) >> 32); // val / 10000
   92|  1.29k|         const uint32_t bbcc = val - aa * 10000;
   93|  1.29k|         const uint32_t bb = (bbcc * 5243) >> 19; // bbcc / 100
   94|  1.29k|         const uint32_t lz = aa < 10;
   95|  1.29k|         std::memcpy(buf, char_table + ((aa * 2) | lz), 2);
   96|  1.29k|         std::memcpy(buf + 2 - lz, &digit_pairs[bb], 2);
   97|  1.29k|         std::memcpy(buf + 4 - lz, &digit_pairs[bbcc - bb * 100], 2);
   98|  1.29k|         return buf + 6 - lz;
   99|  1.29k|      }
_ZN3glz8to_charsIsQsr3stdE7same_asIu14__remove_cvrefIT_EsEEEPcS3_S1_:
  306|  16.8k|   {
  307|  16.8k|      *buf = '-';
  308|  16.8k|      return to_chars(buf + (val < 0), uint16_t(val ^ (val >> 15)) - (val >> 15));
  309|  16.8k|   }
_ZN3glz8to_charsIhQsr3stdE7same_asIu14__remove_cvrefIT_EhEEEPcS3_S1_:
  259|   222k|   {
  260|   222k|      using namespace itoa_impl;
  261|   222k|      if (val < 100) {
  ------------------
  |  Branch (261:11): [True: 153k, False: 68.6k]
  ------------------
  262|   153k|         return u32_2(buf, val);
  263|   153k|      }
  264|  68.6k|      else {
  265|       |         // 100-255: 3 digits
  266|  68.6k|         const uint32_t q = val / 100;
  267|  68.6k|         *buf = char('0' + q);
  268|  68.6k|         std::memcpy(buf + 1, &digit_pairs[val - q * 100], 2);
  269|  68.6k|         return buf + 3;
  270|  68.6k|      }
  271|   222k|   }
_ZN3glz8to_charsItQsr3stdE7same_asIu14__remove_cvrefIT_EtEEEPcS3_S1_:
  286|  50.2k|   {
  287|  50.2k|      using namespace itoa_impl;
  288|  50.2k|      if (val < 100) {
  ------------------
  |  Branch (288:11): [True: 2.99k, False: 47.2k]
  ------------------
  289|  2.99k|         return u32_2(buf, val);
  290|  2.99k|      }
  291|  47.2k|      else if (val < 10000) {
  ------------------
  |  Branch (291:16): [True: 29.4k, False: 17.7k]
  ------------------
  292|  29.4k|         return u32_4(buf, val);
  293|  29.4k|      }
  294|  17.7k|      else {
  295|       |         // 10000-65535: 5 digits
  296|  17.7k|         const uint32_t q = val / 10000;
  297|  17.7k|         *buf = char('0' + q);
  298|  17.7k|         return u64_len_4(buf + 1, val - q * 10000);
  299|  17.7k|      }
  300|  50.2k|   }
_ZN3glz9itoa_impl9u64_len_4EPcj:
  148|  17.7k|      {
  149|  17.7k|         const uint32_t aa = (val * 5243) >> 19;
  150|  17.7k|         std::memcpy(buf, &digit_pairs[aa], 2);
  151|  17.7k|         std::memcpy(buf + 2, &digit_pairs[val - aa * 100], 2);
  152|  17.7k|         return buf + 4;
  153|  17.7k|      }

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

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

