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

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

_ZN3glz4cbor14get_major_typeEh:
  128|  37.5M|   [[nodiscard]] GLZ_ALWAYS_INLINE constexpr uint8_t get_major_type(uint8_t initial) noexcept { return initial >> 5; }
_ZN3glz4cbor19get_additional_infoEh:
  132|  37.5M|   {
  133|  37.5M|      return initial & 0x1f;
  134|  37.5M|   }
_ZN3glz4cbor12initial_byteEhh:
  123|  12.3M|   {
  124|  12.3M|      return static_cast<uint8_t>((major_type << 5) | (additional_info & 0x1f));
  125|  12.3M|   }
_ZN3glz4cbor11decode_halfEt:
  139|  3.14M|   {
  140|  3.14M|      const int sign = (half >> 15) & 1;
  141|  3.14M|      const int exp = (half >> 10) & 0x1f;
  142|  3.14M|      const int mant = half & 0x3ff;
  143|       |
  144|  3.14M|      double val;
  145|  3.14M|      if (exp == 0) {
  ------------------
  |  Branch (145:11): [True: 3.05M, False: 88.8k]
  ------------------
  146|       |         // Subnormal or zero
  147|  3.05M|         val = std::ldexp(static_cast<double>(mant), -24);
  148|  3.05M|      }
  149|  88.8k|      else if (exp != 31) {
  ------------------
  |  Branch (149:16): [True: 82.8k, False: 6.00k]
  ------------------
  150|       |         // Normal number
  151|  82.8k|         val = std::ldexp(static_cast<double>(mant + 1024), exp - 25);
  152|  82.8k|      }
  153|  6.00k|      else {
  154|       |         // Infinity or NaN
  155|  6.00k|         val = (mant == 0) ? std::numeric_limits<double>::infinity() : std::numeric_limits<double>::quiet_NaN();
  ------------------
  |  Branch (155:16): [True: 1.42k, False: 4.58k]
  ------------------
  156|  6.00k|      }
  157|       |
  158|  3.14M|      return sign ? -val : val;
  ------------------
  |  Branch (158:14): [True: 74.1k, False: 3.07M]
  ------------------
  159|  3.14M|   }
_ZN3glz4cbor11typed_array7matchesImEEbNS1_16typed_array_infoE:
  402|  1.95k|      {
  403|  1.95k|         if (!info.valid || info.element_size != sizeof(T)) {
  ------------------
  |  Branch (403:14): [True: 72, False: 1.87k]
  |  Branch (403:29): [True: 40, False: 1.83k]
  ------------------
  404|    112|            return false;
  405|    112|         }
  406|       |         if constexpr (std::floating_point<T>) {
  407|       |            // Tags 83 and 87 are IEEE binary128, which is not the 80-bit extended long double that
  408|       |            // shares its 16-byte storage on x86-64, so no float Glaze can write or read matches them.
  409|       |            return info.is_float && info.element_size <= 8;
  410|       |         }
  411|  1.83k|         else {
  412|  1.83k|            return !info.is_float && info.is_signed == std::is_signed_v<T>;
  ------------------
  |  Branch (412:20): [True: 1.82k, False: 12]
  |  Branch (412:38): [True: 1.81k, False: 16]
  ------------------
  413|  1.83k|         }
  414|  1.83k|      }
_ZN3glz4cbor11typed_array8get_infoEm:
  313|   545k|      {
  314|   545k|         typed_array_info info{};
  315|       |
  316|   545k|         if (tag < 64 || tag > 87 || tag == 76) {
  ------------------
  |  Branch (316:14): [True: 367k, False: 177k]
  |  Branch (316:26): [True: 19.3k, False: 158k]
  |  Branch (316:38): [True: 217, False: 158k]
  ------------------
  317|   387k|            return info; // Not a typed array tag
  318|   387k|         }
  319|       |
  320|   158k|         info.valid = true;
  321|       |
  322|   158k|         if (tag >= 64 && tag <= 71) {
  ------------------
  |  Branch (322:14): [True: 158k, False: 0]
  |  Branch (322:27): [True: 18.6k, False: 139k]
  ------------------
  323|       |            // Unsigned integers
  324|  18.6k|            info.is_signed = false;
  325|  18.6k|            info.is_float = false;
  326|  18.6k|            if (tag == 64 || tag == 68) {
  ------------------
  |  Branch (326:17): [True: 746, False: 17.8k]
  |  Branch (326:30): [True: 1.87k, False: 15.9k]
  ------------------
  327|  2.62k|               info.element_size = 1;
  328|  2.62k|               info.is_little_endian = true; // Doesn't matter for 1 byte
  329|  2.62k|            }
  330|  15.9k|            else if (tag == 65 || tag == 69) {
  ------------------
  |  Branch (330:22): [True: 510, False: 15.4k]
  |  Branch (330:35): [True: 1.93k, False: 13.5k]
  ------------------
  331|  2.44k|               info.element_size = 2;
  332|  2.44k|               info.is_little_endian = (tag == 69);
  333|  2.44k|            }
  334|  13.5k|            else if (tag == 66 || tag == 70) {
  ------------------
  |  Branch (334:22): [True: 828, False: 12.7k]
  |  Branch (334:35): [True: 2.14k, False: 10.5k]
  ------------------
  335|  2.97k|               info.element_size = 4;
  336|  2.97k|               info.is_little_endian = (tag == 70);
  337|  2.97k|            }
  338|  10.5k|            else {
  339|  10.5k|               info.element_size = 8;
  340|  10.5k|               info.is_little_endian = (tag == 71);
  341|  10.5k|            }
  342|  18.6k|         }
  343|   139k|         else if (tag >= 72 && tag <= 79) {
  ------------------
  |  Branch (343:19): [True: 139k, False: 0]
  |  Branch (343:32): [True: 85.9k, False: 53.8k]
  ------------------
  344|       |            // Signed integers
  345|  85.9k|            info.is_signed = true;
  346|  85.9k|            info.is_float = false;
  347|  85.9k|            if (tag == 72) {
  ------------------
  |  Branch (347:17): [True: 568, False: 85.4k]
  ------------------
  348|    568|               info.element_size = 1;
  349|    568|               info.is_little_endian = true;
  350|    568|            }
  351|  85.4k|            else if (tag == 73 || tag == 77) {
  ------------------
  |  Branch (351:22): [True: 375, False: 85.0k]
  |  Branch (351:35): [True: 70.5k, False: 14.5k]
  ------------------
  352|  70.8k|               info.element_size = 2;
  353|  70.8k|               info.is_little_endian = (tag == 77);
  354|  70.8k|            }
  355|  14.5k|            else if (tag == 74 || tag == 78) {
  ------------------
  |  Branch (355:22): [True: 4.42k, False: 10.0k]
  |  Branch (355:35): [True: 564, False: 9.53k]
  ------------------
  356|  4.98k|               info.element_size = 4;
  357|  4.98k|               info.is_little_endian = (tag == 78);
  358|  4.98k|            }
  359|  9.53k|            else {
  360|  9.53k|               info.element_size = 8;
  361|  9.53k|               info.is_little_endian = (tag == 79);
  362|  9.53k|            }
  363|  85.9k|         }
  364|  53.8k|         else {
  365|       |            // Floating point (80-87)
  366|  53.8k|            info.is_signed = true; // Floats can be negative
  367|  53.8k|            info.is_float = true;
  368|  53.8k|            if (tag == 80 || tag == 84) {
  ------------------
  |  Branch (368:17): [True: 16.2k, False: 37.5k]
  |  Branch (368:30): [True: 1.12k, False: 36.4k]
  ------------------
  369|  17.4k|               info.element_size = 2; // float16
  370|  17.4k|               info.is_little_endian = (tag == 84);
  371|  17.4k|            }
  372|  36.4k|            else if (tag == 81 || tag == 85) {
  ------------------
  |  Branch (372:22): [True: 29.8k, False: 6.54k]
  |  Branch (372:35): [True: 630, False: 5.91k]
  ------------------
  373|  30.4k|               info.element_size = 4; // float32
  374|  30.4k|               info.is_little_endian = (tag == 85);
  375|  30.4k|            }
  376|  5.91k|            else if (tag == 82 || tag == 86) {
  ------------------
  |  Branch (376:22): [True: 1.52k, False: 4.38k]
  |  Branch (376:35): [True: 4.37k, False: 13]
  ------------------
  377|  5.89k|               info.element_size = 8; // float64
  378|  5.89k|               info.is_little_endian = (tag == 86);
  379|  5.89k|            }
  380|     13|            else {
  381|     13|               info.element_size = 16; // float128
  382|     13|               info.is_little_endian = (tag == 87);
  383|     13|            }
  384|  53.8k|         }
  385|       |
  386|   158k|         return info;
  387|   545k|      }
_ZN3glz4cbor11typed_array14needs_byteswapEm:
  418|  78.7k|      {
  419|  78.7k|         const auto info = get_info(tag);
  420|  78.7k|         if (!info.valid || info.element_size == 1) {
  ------------------
  |  Branch (420:14): [True: 0, False: 78.7k]
  |  Branch (420:29): [True: 1.57k, False: 77.1k]
  ------------------
  421|  1.57k|            return false;
  422|  1.57k|         }
  423|  77.1k|         constexpr bool native_is_le = (std::endian::native == std::endian::little);
  424|  77.1k|         return native_is_le != info.is_little_endian;
  425|  78.7k|      }

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

_ZN3glz12ensure_spaceINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10is_contextENS_7contextEEEbRT0_RT_m:
  181|  99.9M|   {
  182|  99.9M|      using Buffer = std::remove_cvref_t<B>;
  183|       |
  184|  99.9M|      if constexpr (vector_like<Buffer>) {
  185|  99.9M|         if (required > b.size()) [[unlikely]] {
  ------------------
  |  Branch (185:14): [True: 25.3k, False: 99.9M]
  ------------------
  186|       |            // 2× growth amortizes repeated reallocations to O(n) total cost.
  187|  25.3k|            b.resize(2 * required);
  188|  25.3k|         }
  189|  99.9M|         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|  99.9M|   }

_ZN3glz10get_memberIR9my_structRiEEDcOT_OT0_:
  616|  9.63k|   {
  617|  9.63k|      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|  9.63k|      else {
  639|  9.63k|         return element;
  640|  9.63k|      }
  641|  9.63k|   }
_ZN3glz10get_memberIR9my_structRdEEDcOT_OT0_:
  616|  1.71k|   {
  617|  1.71k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  1.71k|      else {
  639|  1.71k|         return element;
  640|  1.71k|      }
  641|  1.71k|   }
_ZN3glz10get_memberIR9my_structRNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEDcOT_OT0_:
  616|  3.57k|   {
  617|  3.57k|      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.57k|      else {
  639|  3.57k|         return element;
  640|  3.57k|      }
  641|  3.57k|   }
_ZN3glz10get_memberIR9my_structRNSt3__15arrayImLm3EEEEEDcOT_OT0_:
  616|  5.15k|   {
  617|  5.15k|      using V = std::decay_t<decltype(element)>;
  618|       |      if constexpr (std::is_member_object_pointer_v<V>) {
  619|       |         return value.*element;
  620|       |      }
  621|       |      else if constexpr (std::is_member_function_pointer_v<V>) {
  622|       |         return element;
  623|       |      }
  624|       |      else if constexpr (std::invocable<Element, Value> && not eigen_t<Element>) {
  625|       |         // Eigen places a static_assert inside of the operator()(), so we must target
  626|       |         // matrix types and reject them from the invocable check
  627|       |         // Eigen ought to put the check in the `enable_if` for operator()()
  628|       |         return std::invoke(std::forward<Element>(element), std::forward<Value>(value));
  629|       |      }
  630|       |      else if constexpr (std::is_pointer_v<V> && !std::is_reference_v<Element>) {
  631|       |         if constexpr (std::invocable<decltype(*element), Value>) {
  632|       |            return std::invoke(*element, std::forward<Value>(value));
  633|       |         }
  634|       |         else {
  635|       |            return *element;
  636|       |         }
  637|       |      }
  638|  5.15k|      else {
  639|  5.15k|         return element;
  640|  5.15k|      }
  641|  5.15k|   }
_ZN3glz8str_viewINSt3__117basic_string_viewIcNS1_11char_traitsIcEEEERKS5_EES5_OT0_:
  288|  64.6k|   {
  289|  64.6k|      if constexpr (std::same_as<std::decay_t<T>, std::string_view>) {
  290|  64.6k|         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|  64.6k|   }

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

_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSA_OSB_:
  219|  18.2k|   {
  220|  18.2k|      format_context_t<Opts.format> ctx{};
  221|  18.2k|      return read<Opts>(value, buffer, ctx);
  222|  18.2k|   }
_ZN3glz4readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEE9my_structTkNS_10contiguousERKNSt3__16vectorIcNS3_9allocatorIcEEEETkNS_10is_contextERNS_7contextEQaa14read_supportedIT0_XdtT_6formatEEnt18is_input_streamingIT1_EEENS_9error_ctxERSC_OSD_OT2_:
  136|  18.2k|   {
  137|  18.2k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
  138|  18.2k|      using Buffer = std::remove_reference_t<decltype(buffer)>;
  139|       |
  140|  18.2k|      if constexpr (Opts.format != NDJSON) {
  141|  18.2k|         if (buffer.empty()) [[unlikely]] {
  ------------------
  |  Branch (141:14): [True: 0, False: 18.2k]
  ------------------
  142|      0|            ctx.error = error_code::no_read_input;
  143|      0|            return {0, ctx.error, ctx.custom_error_message};
  144|      0|         }
  145|  18.2k|      }
  146|       |
  147|  18.2k|      constexpr bool use_padded = resizable<Buffer> && non_const_buffer<Buffer> && !check_disable_padding(Opts);
  ------------------
  |  Branch (147:35): [Folded, False: 18.2k]
  |  Branch (147:56): [Folded, False: 0]
  |  Branch (147:84): [True: 0, Folded]
  ------------------
  148|       |
  149|  18.2k|      [[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|  18.2k|      auto [it, end] = read_iterators<Opts, use_padded>(buffer);
  157|  18.2k|      auto start = it;
  158|  18.2k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (158:11): [True: 0, False: 18.2k]
  ------------------
  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|  18.2k|      if constexpr (requires { ctx.speculation_budget; }) {
  165|  18.2k|         const size_t proportional = max_speculative_parse_factor * size_t(end - it);
  166|  18.2k|         ctx.speculation_budget =
  167|  18.2k|            (proportional > min_speculative_parse_bytes ? proportional : min_speculative_parse_bytes) + 2;
  ------------------
  |  Branch (167:14): [True: 590, False: 17.6k]
  ------------------
  168|  18.2k|      }
  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|  18.2k|      else {
  183|  18.2k|         parse<Opts.format>::template op<is_padded_off<Opts>()>(value, ctx, it, end);
  184|  18.2k|      }
  185|       |
  186|  18.2k|      if (bool(ctx.error)) [[unlikely]] {
  ------------------
  |  Branch (186:11): [True: 18.1k, False: 63]
  ------------------
  187|  18.1k|         goto finish;
  188|  18.1k|      }
  189|       |
  190|       |      // The JSON RFC 8259 defines: JSON-text = ws value ws
  191|       |      // So, trailing whitespace is permitted and sometimes we want to
  192|       |      // validate this, even though this memory will not affect Glaze.
  193|       |      if constexpr (check_validate_trailing_whitespace(Opts)) {
  194|       |         if (it < end) {
  195|       |            skip_ws<Opts>(ctx, it, end);
  196|       |            if (bool(ctx.error)) [[unlikely]] {
  197|       |               goto finish;
  198|       |            }
  199|       |            if (it != end) [[unlikely]] {
  200|       |               ctx.error = error_code::syntax_error;
  201|       |            }
  202|       |         }
  203|       |      }
  204|       |
  205|  18.2k|   finish:
  206|  18.2k|      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|  18.2k|      return {size_t(it - start), ctx.error, ctx.custom_error_message};
  214|     63|   }
_ZN3glz14read_iteratorsITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEELb0ETkNS_10contiguousERKNSt3__16vectorIcNS2_9allocatorIcEEEEEEDaOT1_:
   40|  18.2k|   {
   41|  18.2k|      static_assert(sizeof(decltype(*buffer.data())) == 1);
   42|       |
   43|  18.2k|      auto it = reinterpret_cast<const char*>(buffer.data());
   44|  18.2k|      auto end = reinterpret_cast<const char*>(buffer.data()); // to be incremented
   45|       |
   46|       |      if constexpr (Padded) {
   47|       |         end += buffer.size() - padding_bytes;
   48|       |      }
   49|  18.2k|      else {
   50|  18.2k|         end += buffer.size();
   51|  18.2k|      }
   52|       |
   53|  18.2k|      return std::pair{it, end};
   54|  18.2k|   }
_ZN3glz16exceeds_capacityINSt3__15arrayImLm3EEETkNS_10is_contextENS_7contextEEEbRT_mRT0_:
   28|  1.72k|   {
   29|       |      if constexpr (fixed_capacity_container<decltype(value)>) {
   30|       |         if (n > value.max_size()) [[unlikely]] {
   31|       |            ctx.error = error_code::exceeded_static_array_size;
   32|       |            return true;
   33|       |         }
   34|       |      }
   35|  1.72k|      return false;
   36|  1.72k|   }
_ZN3glz23finalize_top_level_readITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_PKcS7_S7_:
  115|  18.2k|   {
  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|  18.2k|      finalize_read_context<Opts>(ctx);
  131|  18.2k|   }
_ZN3glz21finalize_read_contextITnDaXtlNS_4optsELj2ELb1ELb0ELb1ELb1EEETkNS_10is_contextERNS_7contextEEEvOT0_:
   76|  18.2k|   {
   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|  18.2k|      settle_end_reached(ctx);
   96|  18.2k|   }
_ZN3glz18settle_end_reachedITkNS_10is_contextERNS_7contextEEEvOT_:
   68|  18.2k|   {
   69|  18.2k|      if (ctx.error == error_code::end_reached) {
  ------------------
  |  Branch (69:11): [True: 0, False: 18.2k]
  ------------------
   70|      0|         ctx.error = (ctx.depth == 0) ? error_code::none : error_code::unexpected_end;
  ------------------
  |  Branch (70:22): [True: 0, False: 0]
  ------------------
   71|      0|      }
   72|  18.2k|   }

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

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

_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  11.5M|      {
  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|  11.5M|         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|  11.5M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  11.5M|            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|  11.5M|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  11.5M|               const auto end = glz::to_chars_40kb(start, value);
  356|  11.5M|               ix += size_t(end - start);
  357|  11.5M|            }
  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|  11.5M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  13.5M|      {
  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|  13.5M|         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|  13.5M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  13.5M|            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|  13.5M|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  13.5M|               const auto end = glz::to_chars_40kb(start, value);
  356|  13.5M|               ix += size_t(end - start);
  357|  13.5M|            }
  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|  13.5M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   448k|      {
  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|   448k|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|   448k|         if constexpr (std::floating_point<V>) {
  222|   448k|            using opts_type = std::decay_t<decltype(Opts)>;
  223|   448k|            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|   448k|            else if constexpr (is_any_of<V, float, double>) {
  319|   448k|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|   448k|               const auto end = glz::to_chars(start, value);
  321|   448k|               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|   448k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERfTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   172k|      {
  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|   172k|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|   172k|         if constexpr (std::floating_point<V>) {
  222|   172k|            using opts_type = std::decay_t<decltype(Opts)>;
  223|   172k|            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|   172k|            else if constexpr (is_any_of<V, float, double>) {
  319|   172k|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|   172k|               const auto end = glz::to_chars(start, value);
  321|   172k|               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|   172k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERaTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  21.1k|      {
  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|  21.1k|         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|  21.1k|         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|  21.1k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  21.1k|            const auto end = glz::to_chars(start, value);
  344|  21.1k|            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|  21.1k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERsTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  1.67M|      {
  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|  1.67M|         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|  1.67M|         else if constexpr (is_any_of<V, int8_t, uint8_t, int16_t, uint16_t>) {
  340|       |            // Small integers: always use to_chars (400B tables)
  341|       |            // The 40KB digit_quads table doesn't help for these small ranges
  342|  1.67M|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|  1.67M|            const auto end = glz::to_chars(start, value);
  344|  1.67M|            ix += size_t(end - start);
  345|       |         }
  346|       |         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  348|       |            if constexpr (is_size_optimized(Opts)) {
  349|       |               // Size mode: use glz::to_chars (400B lookup tables)
  350|       |               const auto end = glz::to_chars(start, value);
  351|       |               ix += size_t(end - start);
  352|       |            }
  353|       |            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|       |               const auto end = glz::to_chars_40kb(start, value);
  356|       |               ix += size_t(end - start);
  357|       |            }
  358|       |         }
  359|       |         else if constexpr (std::integral<V>) {
  360|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  361|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  362|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  363|       |            if constexpr (is_size_optimized(Opts)) {
  364|       |               // Size mode: use glz::to_chars (400B lookup tables)
  365|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  366|       |               ix += size_t(end - start);
  367|       |            }
  368|       |            else {
  369|       |               // Normal mode: use to_chars_40kb
  370|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  371|       |               ix += size_t(end - start);
  372|       |            }
  373|       |         }
  374|       |         else {
  375|       |            static_assert(false_v<V>, "type is not supported");
  376|       |         }
  377|  1.67M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERiTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  85.0k|      {
  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|  85.0k|         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|  85.0k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  85.0k|            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|  85.0k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  85.0k|               const auto end = glz::to_chars_40kb(start, value);
  356|  85.0k|               ix += size_t(end - start);
  357|  85.0k|            }
  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|  85.0k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERlTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  46.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|  46.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|  46.6k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  46.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|  46.6k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  46.6k|               const auto end = glz::to_chars_40kb(start, value);
  356|  46.6k|               ix += size_t(end - start);
  357|  46.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|  46.6k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   583k|      {
  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|   583k|         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|   583k|         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|   583k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|   583k|            const auto end = glz::to_chars(start, value);
  344|   583k|            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|   583k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERtTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   150k|      {
  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|   150k|         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|   150k|         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|   150k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|   150k|            const auto end = glz::to_chars(start, value);
  344|   150k|            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|   150k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERjTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   250k|      {
  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|   250k|         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|   250k|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|   250k|            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|   250k|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|   250k|               const auto end = glz::to_chars_40kb(start, value);
  356|   250k|               ix += size_t(end - start);
  357|   250k|            }
  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|   250k|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERmTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  1.18M|      {
  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|  1.18M|         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|  1.18M|         else if constexpr (is_any_of<V, int32_t, uint32_t, int64_t, uint64_t>) {
  347|  1.18M|            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|  1.18M|            else {
  354|       |               // Normal mode: use to_chars_40kb (40KB digit_quads table)
  355|  1.18M|               const auto end = glz::to_chars_40kb(start, value);
  356|  1.18M|               ix += size_t(end - start);
  357|  1.18M|            }
  358|       |         }
  359|       |         else if constexpr (std::integral<V>) {
  360|       |            // Handle other integral types (char, wchar_t, etc.) by casting to sized types
  361|       |            using X = std::decay_t<decltype(sized_integer_conversion<V>())>;
  362|       |            const auto start = reinterpret_cast<char*>(&b[ix]);
  363|       |            if constexpr (is_size_optimized(Opts)) {
  364|       |               // Size mode: use glz::to_chars (400B lookup tables)
  365|       |               const auto end = glz::to_chars(start, static_cast<X>(value));
  366|       |               ix += size_t(end - start);
  367|       |            }
  368|       |            else {
  369|       |               // Normal mode: use to_chars_40kb
  370|       |               const auto end = glz::to_chars_40kb(start, static_cast<X>(value));
  371|       |               ix += size_t(end - start);
  372|       |            }
  373|       |         }
  374|       |         else {
  375|       |            static_assert(false_v<V>, "type is not supported");
  376|       |         }
  377|  1.18M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKdTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|  3.09M|      {
  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|  3.09M|         using V = std::decay_t<decltype(value)>;
  220|       |
  221|  3.09M|         if constexpr (std::floating_point<V>) {
  222|  3.09M|            using opts_type = std::decay_t<decltype(Opts)>;
  223|  3.09M|            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|  3.09M|            else if constexpr (is_any_of<V, float, double>) {
  319|  3.09M|               const auto start = reinterpret_cast<char*>(&b[ix]);
  320|  3.09M|               const auto end = glz::to_chars(start, value);
  321|  3.09M|               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|  3.09M|      }
_ZN3glz11write_chars2opITnDaXtlNS_4optsELj10ELb1ELb0ELb1ELb1ELb0ELb0ELb0ELb0ELj128EEERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEETkNS_5num_tERKhTkNS_10is_contextERNS_7contextEmEEvOT1_OT2_OT0_RT3_:
  205|   309k|      {
  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|   309k|         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|   309k|         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|   309k|            const auto start = reinterpret_cast<char*>(&b[ix]);
  343|   309k|            const auto end = glz::to_chars(start, value);
  344|   309k|            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|   309k|      }

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

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

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

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

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

_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEETkNS_10byte_sizedEcEEvT1_RT0_Rm:
   98|  68.0M|   {
   99|       |      if constexpr (Checked && vector_like<B>) {
  100|       |         if (ix == b.size()) [[unlikely]] {
  101|       |            b.resize(b.size() == 0 ? 128 : b.size() * 2);
  102|       |         }
  103|       |      }
  104|  68.0M|      assign_maybe_cast(c, b, ix);
  105|  68.0M|      ++ix;
  106|  68.0M|   }
_ZN3glz17assign_maybe_castITkNS_10byte_sizedEcNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvT_RT0_Rm:
   55|  68.0M|   {
   56|  68.0M|      using V = std::decay_t<decltype(b[0])>;
   57|  68.0M|      using C = std::decay_t<decltype(c)>;
   58|  68.0M|      if constexpr (std::same_as<V, C>) {
   59|  68.0M|         b[ix] = c;
   60|       |      }
   61|       |      else {
   62|       |         b[ix] = static_cast<V>(c);
   63|       |      }
   64|  68.0M|   }
_ZN3glz4dumpILb0ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEvNS1_17basic_string_viewIcS4_EERT0_Rm:
  140|  4.05M|   {
  141|  4.05M|      const auto n = str.size();
  142|  4.05M|      if constexpr (vector_like<B>) {
  143|       |         if constexpr (Checked) {
  144|       |            const auto k = ix + n;
  145|       |            if (ix + n > b.size()) [[unlikely]] {
  146|       |               b.resize(2 * k);
  147|       |            }
  148|       |         }
  149|  4.05M|      }
  150|  4.05M|      std::memcpy(&b[ix], str.data(), n);
  151|  4.05M|      ix += n;
  152|  4.05M|   }

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

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

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

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

