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

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

_ZN11ArduinoJson8V742HB426detail11parseNumberEPKc:
  105|    783|inline Number parseNumber(const char* s) {
  106|    783|  using traits = FloatTraits<JsonFloat>;
  107|    783|  using mantissa_t = largest_type<traits::mantissa_type, JsonUInt>;
  108|    783|  using exponent_t = traits::exponent_type;
  109|       |
  110|    783|  ARDUINOJSON_ASSERT(s != 0);
  ------------------
  |  |   11|    783|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (110:3): [True: 783, False: 0]
  ------------------
  111|       |
  112|    783|  bool is_negative = false;
  113|    783|  switch (*s) {
  ------------------
  |  Branch (113:11): [True: 137, False: 646]
  ------------------
  114|    136|    case '-':
  ------------------
  |  Branch (114:5): [True: 136, False: 647]
  ------------------
  115|    136|      is_negative = true;
  116|    136|      s++;
  117|    136|      break;
  118|      1|    case '+':
  ------------------
  |  Branch (118:5): [True: 1, False: 782]
  ------------------
  119|      1|      s++;
  120|      1|      break;
  121|    783|  }
  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|    783|  if (!isdigit(*s) && *s != '.')
  ------------------
  |  Branch (135:7): [True: 108, False: 675]
  |  Branch (135:23): [True: 25, False: 83]
  ------------------
  136|     25|    return Number();
  137|       |
  138|    758|  mantissa_t mantissa = 0;
  139|    758|  exponent_t exponent_offset = 0;
  140|    758|  const mantissa_t maxUint = JsonUInt(-1);
  141|       |
  142|  8.63k|  while (isdigit(*s)) {
  ------------------
  |  Branch (142:10): [True: 7.92k, False: 707]
  ------------------
  143|  7.92k|    uint8_t digit = uint8_t(*s - '0');
  144|  7.92k|    if (mantissa > maxUint / 10)
  ------------------
  |  Branch (144:9): [True: 50, False: 7.87k]
  ------------------
  145|     50|      break;
  146|  7.87k|    mantissa *= 10;
  147|  7.87k|    if (mantissa > maxUint - digit)
  ------------------
  |  Branch (147:9): [True: 1, False: 7.87k]
  ------------------
  148|      1|      break;
  149|  7.87k|    mantissa += digit;
  150|  7.87k|    s++;
  151|  7.87k|  }
  152|       |
  153|    758|  if (*s == '\0') {
  ------------------
  |  Branch (153:7): [True: 343, False: 415]
  ------------------
  154|    343|    if (is_negative) {
  ------------------
  |  Branch (154:9): [True: 128, False: 215]
  ------------------
  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|    215|    } else {
  161|    215|      return Number(JsonUInt(mantissa));
  162|    215|    }
  163|    343|  }
  164|       |
  165|       |  // avoid mantissa overflow
  166|    654|  while (mantissa > traits::mantissa_max) {
  ------------------
  |  Branch (166:10): [True: 235, False: 419]
  ------------------
  167|    235|    mantissa /= 10;
  168|    235|    exponent_offset++;
  169|    235|  }
  170|       |
  171|       |  // remaing digits can't fit in the mantissa
  172|  28.6k|  while (isdigit(*s)) {
  ------------------
  |  Branch (172:10): [True: 28.2k, False: 419]
  ------------------
  173|  28.2k|    exponent_offset++;
  174|  28.2k|    s++;
  175|  28.2k|  }
  176|       |
  177|    419|  if (*s == '.') {
  ------------------
  |  Branch (177:7): [True: 156, False: 263]
  ------------------
  178|    156|    s++;
  179|  29.6k|    while (isdigit(*s)) {
  ------------------
  |  Branch (179:12): [True: 29.4k, False: 156]
  ------------------
  180|  29.4k|      if (mantissa < traits::mantissa_max / 10) {
  ------------------
  |  Branch (180:11): [True: 29.2k, False: 195]
  ------------------
  181|  29.2k|        mantissa = mantissa * 10 + uint8_t(*s - '0');
  182|  29.2k|        exponent_offset--;
  183|  29.2k|      }
  184|  29.4k|      s++;
  185|  29.4k|    }
  186|    156|  }
  187|       |
  188|    419|  int exponent = 0;
  189|    419|  if (*s == 'e' || *s == 'E') {
  ------------------
  |  Branch (189:7): [True: 63, False: 356]
  |  Branch (189:20): [True: 74, False: 282]
  ------------------
  190|    137|    s++;
  191|    137|    bool negative_exponent = false;
  192|    137|    if (*s == '-') {
  ------------------
  |  Branch (192:9): [True: 52, False: 85]
  ------------------
  193|     52|      negative_exponent = true;
  194|     52|      s++;
  195|     85|    } else if (*s == '+') {
  ------------------
  |  Branch (195:16): [True: 1, False: 84]
  ------------------
  196|      1|      s++;
  197|      1|    }
  198|       |
  199|    570|    while (isdigit(*s)) {
  ------------------
  |  Branch (199:12): [True: 438, False: 132]
  ------------------
  200|    438|      exponent = exponent * 10 + (*s - '0');
  201|    438|      if (exponent + exponent_offset > traits::exponent_max) {
  ------------------
  |  Branch (201:11): [True: 5, False: 433]
  ------------------
  202|      5|        if (negative_exponent)
  ------------------
  |  Branch (202:13): [True: 2, False: 3]
  ------------------
  203|      2|          return Number(is_negative ? -0.0f : 0.0f);
  ------------------
  |  Branch (203:25): [True: 1, False: 1]
  ------------------
  204|      3|        else
  205|      3|          return Number(is_negative ? -traits::inf() : traits::inf());
  ------------------
  |  Branch (205:25): [True: 1, False: 2]
  ------------------
  206|      5|      }
  207|    433|      s++;
  208|    433|    }
  209|    132|    if (negative_exponent)
  ------------------
  |  Branch (209:9): [True: 50, False: 82]
  ------------------
  210|     50|      exponent = -exponent;
  211|    132|  }
  212|    414|  exponent += exponent_offset;
  213|       |
  214|       |  // we should be at the end of the string, otherwise it's an error
  215|    414|  if (*s != '\0')
  ------------------
  |  Branch (215:7): [True: 148, False: 266]
  ------------------
  216|    148|    return Number();
  217|       |
  218|    266|#if ARDUINOJSON_USE_DOUBLE
  219|    266|  bool isDouble = exponent < -FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (219:19): [True: 40, False: 226]
  ------------------
  220|    226|                  exponent > FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (220:19): [True: 42, False: 184]
  ------------------
  221|    184|                  mantissa > FloatTraits<float>::mantissa_max;
  ------------------
  |  Branch (221:19): [True: 98, False: 86]
  ------------------
  222|    266|  if (isDouble) {
  ------------------
  |  Branch (222:7): [True: 180, False: 86]
  ------------------
  223|    180|    auto final_result = multiplyByPowerOfTen(double(mantissa), exponent);
  224|    180|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (224:19): [True: 6, False: 174]
  ------------------
  225|    180|  } else
  226|     86|#endif
  227|     86|  {
  228|     86|    auto final_result = multiplyByPowerOfTen(float(mantissa), exponent);
  229|     86|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (229:19): [True: 1, False: 85]
  ------------------
  230|     86|  }
  231|    266|}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ev:
   52|    173|  Number() : type_(NumberType::Invalid) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ev:
   31|    173|  NumberValue() {}
_ZN11ArduinoJson8V742HB426detail6NumberC2El:
   54|    124|  Number(JsonInteger value) : type_(NumberType::SignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2El:
   33|    124|  NumberValue(JsonInteger x) : asSignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Em:
   55|    215|  Number(JsonUInt value) : type_(NumberType::UnsignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Em:
   34|    215|  NumberValue(JsonUInt x) : asUnsignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ef:
   53|     88|  Number(float value) : type_(NumberType::Float), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ef:
   32|     88|  NumberValue(float x) : asFloat(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ed:
   57|    183|  Number(double value) : type_(NumberType::Double), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ed:
   36|    183|  NumberValue(double x) : asDouble(x) {}

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

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

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

