LLVMFuzzerTestOneInput:
    3|    780|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    4|       |  // Make a copy to ensure the input is null-terminated
    5|    780|  std::string str(reinterpret_cast<const char*>(data), size);
    6|       |
    7|    780|  ArduinoJson::detail::parseNumber(str.c_str());
    8|       |
    9|    780|  return 0;
   10|    780|}

_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE3infEv:
   70|      3|  static T inf() {
   71|      3|    return forge(0x7ff0000000000000);
   72|      3|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE5forgeEm:
  101|     31|  static T forge(uint64_t bits) {
  102|     31|    return alias_cast<T>(bits);
  103|     31|  }
_ZN11ArduinoJson8V742HB426detail20multiplyByPowerOfTenIdiEET_S3_T0_:
  197|    167|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|    167|  using traits = FloatTraits<TFloat>;
  199|       |
  200|    167|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 67, False: 100]
  ------------------
  201|    167|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|    167|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 100, False: 67]
  ------------------
  204|    100|    e = TExponent(-e);
  205|       |
  206|  1.01k|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 871, False: 139]
  ------------------
  207|    871|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 28, False: 843]
  ------------------
  208|     28|      return traits::nan();
  209|    843|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 494, False: 349]
  ------------------
  210|    494|      m *= powersOfTen[index];
  211|    843|    e >>= 1;
  212|    843|  }
  213|    139|  return m;
  214|    167|}
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE25positiveBinaryPowersOfTenEv:
   32|     67|  static pgm_array<T, 9> positiveBinaryPowersOfTen() {
   33|     67|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(  //
  ------------------
  |  |   45|     67|      static type const name[] = __VA_ARGS__;
  ------------------
   34|     67|        uint64_t, factors,
   35|     67|        {
   36|     67|            0x4024000000000000,  // 1e1
   37|     67|            0x4059000000000000,  // 1e2
   38|     67|            0x40C3880000000000,  // 1e4
   39|     67|            0x4197D78400000000,  // 1e8
   40|     67|            0x4341C37937E08000,  // 1e16
   41|     67|            0x4693B8B5B5056E17,  // 1e32
   42|     67|            0x4D384F03E93FF9F5,  // 1e64
   43|     67|            0x5A827748F9301D32,  // 1e128
   44|     67|            0x75154FDD7F73BF3C,  // 1e256
   45|     67|        });
   46|     67|    return pgm_array<T, 9>(reinterpret_cast<const T*>(factors));
   47|     67|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE25negativeBinaryPowersOfTenEv:
   49|    100|  static pgm_array<T, 9> negativeBinaryPowersOfTen() {
   50|    100|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(  //
  ------------------
  |  |   45|    100|      static type const name[] = __VA_ARGS__;
  ------------------
   51|    100|        uint64_t, factors,
   52|    100|        {
   53|    100|            0x3FB999999999999A,  // 1e-1
   54|    100|            0x3F847AE147AE147B,  // 1e-2
   55|    100|            0x3F1A36E2EB1C432D,  // 1e-4
   56|    100|            0x3E45798EE2308C3A,  // 1e-8
   57|    100|            0x3C9CD2B297D889BC,  // 1e-16
   58|    100|            0x3949F623D5A8A733,  // 1e-32
   59|    100|            0x32A50FFD44F4A73D,  // 1e-64
   60|    100|            0x255BBA08CF8C979D,  // 1e-128
   61|    100|            0x0AC8062864AC6F43   // 1e-256
   62|    100|        });
   63|    100|    return pgm_array<T, 9>(reinterpret_cast<const T*>(factors));
   64|    100|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE3nanEv:
   66|     28|  static T nan() {
   67|     28|    return forge(0x7ff8000000000000);
   68|     28|  }
_ZN11ArduinoJson8V742HB426detail20multiplyByPowerOfTenIfiEET_S3_T0_:
  197|     94|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|     94|  using traits = FloatTraits<TFloat>;
  199|       |
  200|     94|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 18, False: 76]
  ------------------
  201|     94|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|     94|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 76, False: 18]
  ------------------
  204|     76|    e = TExponent(-e);
  205|       |
  206|    314|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 220, False: 94]
  ------------------
  207|    220|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 0, False: 220]
  ------------------
  208|      0|      return traits::nan();
  209|    220|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 128, False: 92]
  ------------------
  210|    128|      m *= powersOfTen[index];
  211|    220|    e >>= 1;
  212|    220|  }
  213|     94|  return m;
  214|     94|}
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25positiveBinaryPowersOfTenEv:
  116|     18|  static pgm_array<T, 6> positiveBinaryPowersOfTen() {
  117|     18|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     18|      static type const name[] = __VA_ARGS__;
  ------------------
  118|     18|                                     {
  119|     18|                                         0x41200000,  // 1e1f
  120|     18|                                         0x42c80000,  // 1e2f
  121|     18|                                         0x461c4000,  // 1e4f
  122|     18|                                         0x4cbebc20,  // 1e8f
  123|     18|                                         0x5a0e1bca,  // 1e16f
  124|     18|                                         0x749dc5ae   // 1e32f
  125|     18|                                     });
  126|     18|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  127|     18|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25negativeBinaryPowersOfTenEv:
  129|     76|  static pgm_array<T, 6> negativeBinaryPowersOfTen() {
  130|     76|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     76|      static type const name[] = __VA_ARGS__;
  ------------------
  131|     76|                                     {
  132|     76|                                         0x3dcccccd,  // 1e-1f
  133|     76|                                         0x3c23d70a,  // 1e-2f
  134|     76|                                         0x38d1b717,  // 1e-4f
  135|     76|                                         0x322bcc77,  // 1e-8f
  136|     76|                                         0x24e69595,  // 1e-16f
  137|     76|                                         0x0a4fb11f   // 1e-32f
  138|     76|                                     });
  139|     76|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  140|     76|  }

_ZN11ArduinoJson8V742HB426detail11parseNumberEPKc:
  105|    780|inline Number parseNumber(const char* s) {
  106|    780|  using traits = FloatTraits<JsonFloat>;
  107|    780|  using mantissa_t = largest_type<traits::mantissa_type, JsonUInt>;
  108|    780|  using exponent_t = traits::exponent_type;
  109|       |
  110|    780|  ARDUINOJSON_ASSERT(s != 0);
  ------------------
  |  |   11|    780|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (110:3): [True: 780, False: 0]
  ------------------
  111|       |
  112|    780|  bool is_negative = false;
  113|    780|  switch (*s) {
  ------------------
  |  Branch (113:11): [True: 142, False: 638]
  ------------------
  114|    141|    case '-':
  ------------------
  |  Branch (114:5): [True: 141, False: 639]
  ------------------
  115|    141|      is_negative = true;
  116|    141|      s++;
  117|    141|      break;
  118|      1|    case '+':
  ------------------
  |  Branch (118:5): [True: 1, False: 779]
  ------------------
  119|      1|      s++;
  120|      1|      break;
  121|    780|  }
  122|       |
  123|       |#if ARDUINOJSON_ENABLE_NAN
  124|       |  if (*s == 'n' || *s == 'N') {
  125|       |    return Number(traits::nan());
  126|       |  }
  127|       |#endif
  128|       |
  129|       |#if ARDUINOJSON_ENABLE_INFINITY
  130|       |  if (*s == 'i' || *s == 'I') {
  131|       |    return Number(is_negative ? -traits::inf() : traits::inf());
  132|       |  }
  133|       |#endif
  134|       |
  135|    780|  if (!isdigit(*s) && *s != '.')
  ------------------
  |  Branch (135:7): [True: 107, False: 673]
  |  Branch (135:23): [True: 23, False: 84]
  ------------------
  136|     23|    return Number();
  137|       |
  138|    757|  mantissa_t mantissa = 0;
  139|    757|  exponent_t exponent_offset = 0;
  140|    757|  const mantissa_t maxUint = JsonUInt(-1);
  141|       |
  142|  8.39k|  while (isdigit(*s)) {
  ------------------
  |  Branch (142:10): [True: 7.68k, False: 712]
  ------------------
  143|  7.68k|    uint8_t digit = uint8_t(*s - '0');
  144|  7.68k|    if (mantissa > maxUint / 10)
  ------------------
  |  Branch (144:9): [True: 44, False: 7.63k]
  ------------------
  145|     44|      break;
  146|  7.63k|    mantissa *= 10;
  147|  7.63k|    if (mantissa > maxUint - digit)
  ------------------
  |  Branch (147:9): [True: 1, False: 7.63k]
  ------------------
  148|      1|      break;
  149|  7.63k|    mantissa += digit;
  150|  7.63k|    s++;
  151|  7.63k|  }
  152|       |
  153|    757|  if (*s == '\0') {
  ------------------
  |  Branch (153:7): [True: 340, False: 417]
  ------------------
  154|    340|    if (is_negative) {
  ------------------
  |  Branch (154:9): [True: 128, False: 212]
  ------------------
  155|    128|      const mantissa_t sintMantissaMax = mantissa_t(1)
  156|    128|                                         << (sizeof(JsonInteger) * 8 - 1);
  157|    128|      if (mantissa <= sintMantissaMax) {
  ------------------
  |  Branch (157:11): [True: 124, False: 4]
  ------------------
  158|    124|        return Number(JsonInteger(~mantissa + 1));
  159|    124|      }
  160|    212|    } else {
  161|    212|      return Number(JsonUInt(mantissa));
  162|    212|    }
  163|    340|  }
  164|       |
  165|       |  // avoid mantissa overflow
  166|    647|  while (mantissa > traits::mantissa_max) {
  ------------------
  |  Branch (166:10): [True: 226, False: 421]
  ------------------
  167|    226|    mantissa /= 10;
  168|    226|    exponent_offset++;
  169|    226|  }
  170|       |
  171|       |  // remaing digits can't fit in the mantissa
  172|  24.1k|  while (isdigit(*s)) {
  ------------------
  |  Branch (172:10): [True: 23.7k, False: 421]
  ------------------
  173|  23.7k|    exponent_offset++;
  174|  23.7k|    s++;
  175|  23.7k|  }
  176|       |
  177|    421|  if (*s == '.') {
  ------------------
  |  Branch (177:7): [True: 155, False: 266]
  ------------------
  178|    155|    s++;
  179|  29.9k|    while (isdigit(*s)) {
  ------------------
  |  Branch (179:12): [True: 29.8k, False: 155]
  ------------------
  180|  29.8k|      if (mantissa < traits::mantissa_max / 10) {
  ------------------
  |  Branch (180:11): [True: 29.5k, False: 210]
  ------------------
  181|  29.5k|        mantissa = mantissa * 10 + uint8_t(*s - '0');
  182|  29.5k|        exponent_offset--;
  183|  29.5k|      }
  184|  29.8k|      s++;
  185|  29.8k|    }
  186|    155|  }
  187|       |
  188|    421|  int exponent = 0;
  189|    421|  if (*s == 'e' || *s == 'E') {
  ------------------
  |  Branch (189:7): [True: 67, False: 354]
  |  Branch (189:20): [True: 69, False: 285]
  ------------------
  190|    136|    s++;
  191|    136|    bool negative_exponent = false;
  192|    136|    if (*s == '-') {
  ------------------
  |  Branch (192:9): [True: 55, False: 81]
  ------------------
  193|     55|      negative_exponent = true;
  194|     55|      s++;
  195|     81|    } else if (*s == '+') {
  ------------------
  |  Branch (195:16): [True: 1, False: 80]
  ------------------
  196|      1|      s++;
  197|      1|    }
  198|       |
  199|    735|    while (isdigit(*s)) {
  ------------------
  |  Branch (199:12): [True: 603, False: 132]
  ------------------
  200|    603|      exponent = exponent * 10 + (*s - '0');
  201|    603|      if (exponent + exponent_offset > traits::exponent_max) {
  ------------------
  |  Branch (201:11): [True: 4, False: 599]
  ------------------
  202|      4|        if (negative_exponent)
  ------------------
  |  Branch (202:13): [True: 1, False: 3]
  ------------------
  203|      1|          return Number(is_negative ? -0.0f : 0.0f);
  ------------------
  |  Branch (203:25): [True: 0, False: 1]
  ------------------
  204|      3|        else
  205|      3|          return Number(is_negative ? -traits::inf() : traits::inf());
  ------------------
  |  Branch (205:25): [True: 1, False: 2]
  ------------------
  206|      4|      }
  207|    599|      s++;
  208|    599|    }
  209|    132|    if (negative_exponent)
  ------------------
  |  Branch (209:9): [True: 54, False: 78]
  ------------------
  210|     54|      exponent = -exponent;
  211|    132|  }
  212|    417|  exponent += exponent_offset;
  213|       |
  214|       |  // we should be at the end of the string, otherwise it's an error
  215|    417|  if (*s != '\0')
  ------------------
  |  Branch (215:7): [True: 156, False: 261]
  ------------------
  216|    156|    return Number();
  217|       |
  218|    261|#if ARDUINOJSON_USE_DOUBLE
  219|    261|  bool isDouble = exponent < -FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (219:19): [True: 41, False: 220]
  ------------------
  220|    220|                  exponent > FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (220:19): [True: 35, False: 185]
  ------------------
  221|    185|                  mantissa > FloatTraits<float>::mantissa_max;
  ------------------
  |  Branch (221:19): [True: 91, False: 94]
  ------------------
  222|    261|  if (isDouble) {
  ------------------
  |  Branch (222:7): [True: 167, False: 94]
  ------------------
  223|    167|    auto final_result = multiplyByPowerOfTen(double(mantissa), exponent);
  224|    167|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (224:19): [True: 8, False: 159]
  ------------------
  225|    167|  } else
  226|     94|#endif
  227|     94|  {
  228|     94|    auto final_result = multiplyByPowerOfTen(float(mantissa), exponent);
  229|     94|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (229:19): [True: 2, False: 92]
  ------------------
  230|     94|  }
  231|    261|}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ev:
   52|    179|  Number() : type_(NumberType::Invalid) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ev:
   31|    179|  NumberValue() {}
_ZN11ArduinoJson8V742HB426detail6NumberC2El:
   54|    124|  Number(JsonInteger value) : type_(NumberType::SignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2El:
   33|    124|  NumberValue(JsonInteger x) : asSignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Em:
   55|    212|  Number(JsonUInt value) : type_(NumberType::UnsignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Em:
   34|    212|  NumberValue(JsonUInt x) : asUnsignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ef:
   53|     95|  Number(float value) : type_(NumberType::Float), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ef:
   32|     95|  NumberValue(float x) : asFloat(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ed:
   57|    170|  Number(double value) : type_(NumberType::Double), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ed:
   36|    170|  NumberValue(double x) : asDouble(x) {}

_ZN11ArduinoJson8V742HB426detail10alias_castIdmEET_T0_:
   24|     31|T alias_cast(F raw_data) {
   25|     31|  alias_cast_t<T, F> ac;
   26|     31|  ac.raw = raw_data;
   27|     31|  return ac.data;
   28|     31|}

_ZN11ArduinoJson8V742HB426detail7isdigitEc:
   12|  64.0k|inline bool isdigit(char c) {
   13|  64.0k|  return '0' <= c && c <= '9';
  ------------------
  |  Branch (13:10): [True: 62.8k, False: 1.19k]
  |  Branch (13:22): [True: 62.4k, False: 331]
  ------------------
   14|  64.0k|}

_ZN11ArduinoJson8V742HB426detail9pgm_arrayIdLm9EEC2EPKd:
   71|    167|  explicit pgm_array(const T* ptr) : ptr_(ptr) {}
_ZN11ArduinoJson8V742HB426detail7pgm_ptrIdEC2EPKd:
   58|    167|  explicit pgm_ptr(const T* ptr) : ptr_(ptr) {}
_ZNK11ArduinoJson8V742HB426detail9pgm_arrayIdLm9EE4sizeEv:
   78|    871|  size_t size() const {
   79|    871|    return N;
   80|    871|  }
_ZNK11ArduinoJson8V742HB426detail9pgm_arrayIdLm9EEixEm:
   73|    494|  T operator[](size_t index) const {
   74|    494|    ARDUINOJSON_ASSERT(index < N);
  ------------------
  |  |   11|    494|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (74:5): [True: 494, False: 0]
  ------------------
   75|    494|    return ptr_[intptr_t(index)];
   76|    494|  }
_ZNK11ArduinoJson8V742HB426detail7pgm_ptrIdEixEl:
   60|    494|  T operator[](intptr_t index) const {
   61|    494|    return pgm_read(ptr_ + index);
   62|    494|  }
_ZN11ArduinoJson8V742HB426detail8pgm_readIdEET_PKS3_:
   49|    494|inline T pgm_read(const T* p) {
   50|    494|  return *p;
   51|    494|}
_ZN11ArduinoJson8V742HB426detail9pgm_arrayIfLm6EEC2EPKf:
   71|     94|  explicit pgm_array(const T* ptr) : ptr_(ptr) {}
_ZN11ArduinoJson8V742HB426detail7pgm_ptrIfEC2EPKf:
   58|     94|  explicit pgm_ptr(const T* ptr) : ptr_(ptr) {}
_ZNK11ArduinoJson8V742HB426detail9pgm_arrayIfLm6EE4sizeEv:
   78|    220|  size_t size() const {
   79|    220|    return N;
   80|    220|  }
_ZNK11ArduinoJson8V742HB426detail9pgm_arrayIfLm6EEixEm:
   73|    128|  T operator[](size_t index) const {
   74|    128|    ARDUINOJSON_ASSERT(index < N);
  ------------------
  |  |   11|    128|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (74:5): [True: 128, False: 0]
  ------------------
   75|    128|    return ptr_[intptr_t(index)];
   76|    128|  }
_ZNK11ArduinoJson8V742HB426detail7pgm_ptrIfEixEl:
   60|    128|  T operator[](intptr_t index) const {
   61|    128|    return pgm_read(ptr_ + index);
   62|    128|  }
_ZN11ArduinoJson8V742HB426detail8pgm_readIfEET_PKS3_:
   49|    128|inline T pgm_read(const T* p) {
   50|    128|  return *p;
   51|    128|}

