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

_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|    169|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|    169|  using traits = FloatTraits<TFloat>;
  199|       |
  200|    169|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 67, False: 102]
  ------------------
  201|    169|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|    169|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 102, False: 67]
  ------------------
  204|    102|    e = TExponent(-e);
  205|       |
  206|  1.03k|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 899, False: 139]
  ------------------
  207|    899|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 30, False: 869]
  ------------------
  208|     30|      return traits::nan();
  209|    869|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 529, False: 340]
  ------------------
  210|    529|      m *= powersOfTen[index];
  211|    869|    e >>= 1;
  212|    869|  }
  213|    139|  return m;
  214|    169|}
_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|    102|  static pgm_array<T, 9> negativeBinaryPowersOfTen() {
   50|    102|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(  //
  ------------------
  |  |   45|    102|      static type const name[] = __VA_ARGS__;
  ------------------
   51|    102|        uint64_t, factors,
   52|    102|        {
   53|    102|            0x3FB999999999999A,  // 1e-1
   54|    102|            0x3F847AE147AE147B,  // 1e-2
   55|    102|            0x3F1A36E2EB1C432D,  // 1e-4
   56|    102|            0x3E45798EE2308C3A,  // 1e-8
   57|    102|            0x3C9CD2B297D889BC,  // 1e-16
   58|    102|            0x3949F623D5A8A733,  // 1e-32
   59|    102|            0x32A50FFD44F4A73D,  // 1e-64
   60|    102|            0x255BBA08CF8C979D,  // 1e-128
   61|    102|            0x0AC8062864AC6F43   // 1e-256
   62|    102|        });
   63|    102|    return pgm_array<T, 9>(reinterpret_cast<const T*>(factors));
   64|    102|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE3nanEv:
   66|     30|  static T nan() {
   67|     30|    return forge(0x7ff8000000000000);
   68|     30|  }
_ZN11ArduinoJson8V742HB426detail20multiplyByPowerOfTenIfiEET_S3_T0_:
  197|     87|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|     87|  using traits = FloatTraits<TFloat>;
  199|       |
  200|     87|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 14, False: 73]
  ------------------
  201|     87|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|     87|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 73, False: 14]
  ------------------
  204|     73|    e = TExponent(-e);
  205|       |
  206|    258|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 171, False: 87]
  ------------------
  207|    171|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 0, False: 171]
  ------------------
  208|      0|      return traits::nan();
  209|    171|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 109, False: 62]
  ------------------
  210|    109|      m *= powersOfTen[index];
  211|    171|    e >>= 1;
  212|    171|  }
  213|     87|  return m;
  214|     87|}
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25positiveBinaryPowersOfTenEv:
  116|     14|  static pgm_array<T, 6> positiveBinaryPowersOfTen() {
  117|     14|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     14|      static type const name[] = __VA_ARGS__;
  ------------------
  118|     14|                                     {
  119|     14|                                         0x41200000,  // 1e1f
  120|     14|                                         0x42c80000,  // 1e2f
  121|     14|                                         0x461c4000,  // 1e4f
  122|     14|                                         0x4cbebc20,  // 1e8f
  123|     14|                                         0x5a0e1bca,  // 1e16f
  124|     14|                                         0x749dc5ae   // 1e32f
  125|     14|                                     });
  126|     14|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  127|     14|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25negativeBinaryPowersOfTenEv:
  129|     73|  static pgm_array<T, 6> negativeBinaryPowersOfTen() {
  130|     73|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     73|      static type const name[] = __VA_ARGS__;
  ------------------
  131|     73|                                     {
  132|     73|                                         0x3dcccccd,  // 1e-1f
  133|     73|                                         0x3c23d70a,  // 1e-2f
  134|     73|                                         0x38d1b717,  // 1e-4f
  135|     73|                                         0x322bcc77,  // 1e-8f
  136|     73|                                         0x24e69595,  // 1e-16f
  137|     73|                                         0x0a4fb11f   // 1e-32f
  138|     73|                                     });
  139|     73|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  140|     73|  }

_ZN11ArduinoJson8V742HB426detail11parseNumberEPKc:
  105|    790|inline Number parseNumber(const char* s) {
  106|    790|  using traits = FloatTraits<JsonFloat>;
  107|    790|  using mantissa_t = largest_type<traits::mantissa_type, JsonUInt>;
  108|    790|  using exponent_t = traits::exponent_type;
  109|       |
  110|    790|  ARDUINOJSON_ASSERT(s != 0);
  ------------------
  |  |   11|    790|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (110:3): [True: 790, False: 0]
  ------------------
  111|       |
  112|    790|  bool is_negative = false;
  113|    790|  switch (*s) {
  ------------------
  |  Branch (113:11): [True: 138, False: 652]
  ------------------
  114|    137|    case '-':
  ------------------
  |  Branch (114:5): [True: 137, False: 653]
  ------------------
  115|    137|      is_negative = true;
  116|    137|      s++;
  117|    137|      break;
  118|      1|    case '+':
  ------------------
  |  Branch (118:5): [True: 1, False: 789]
  ------------------
  119|      1|      s++;
  120|      1|      break;
  121|    790|  }
  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|    790|  if (!isdigit(*s) && *s != '.')
  ------------------
  |  Branch (135:7): [True: 99, False: 691]
  |  Branch (135:23): [True: 19, False: 80]
  ------------------
  136|     19|    return Number();
  137|       |
  138|    771|  mantissa_t mantissa = 0;
  139|    771|  exponent_t exponent_offset = 0;
  140|    771|  const mantissa_t maxUint = JsonUInt(-1);
  141|       |
  142|  8.50k|  while (isdigit(*s)) {
  ------------------
  |  Branch (142:10): [True: 7.77k, False: 728]
  ------------------
  143|  7.77k|    uint8_t digit = uint8_t(*s - '0');
  144|  7.77k|    if (mantissa > maxUint / 10)
  ------------------
  |  Branch (144:9): [True: 42, False: 7.73k]
  ------------------
  145|     42|      break;
  146|  7.73k|    mantissa *= 10;
  147|  7.73k|    if (mantissa > maxUint - digit)
  ------------------
  |  Branch (147:9): [True: 1, False: 7.73k]
  ------------------
  148|      1|      break;
  149|  7.73k|    mantissa += digit;
  150|  7.73k|    s++;
  151|  7.73k|  }
  152|       |
  153|    771|  if (*s == '\0') {
  ------------------
  |  Branch (153:7): [True: 347, False: 424]
  ------------------
  154|    347|    if (is_negative) {
  ------------------
  |  Branch (154:9): [True: 130, False: 217]
  ------------------
  155|    130|      const mantissa_t sintMantissaMax = mantissa_t(1)
  156|    130|                                         << (sizeof(JsonInteger) * 8 - 1);
  157|    130|      if (mantissa <= sintMantissaMax) {
  ------------------
  |  Branch (157:11): [True: 128, False: 2]
  ------------------
  158|    128|        return Number(JsonInteger(~mantissa + 1));
  159|    128|      }
  160|    217|    } else {
  161|    217|      return Number(JsonUInt(mantissa));
  162|    217|    }
  163|    347|  }
  164|       |
  165|       |  // avoid mantissa overflow
  166|    638|  while (mantissa > traits::mantissa_max) {
  ------------------
  |  Branch (166:10): [True: 212, False: 426]
  ------------------
  167|    212|    mantissa /= 10;
  168|    212|    exponent_offset++;
  169|    212|  }
  170|       |
  171|       |  // remaing digits can't fit in the mantissa
  172|  36.1k|  while (isdigit(*s)) {
  ------------------
  |  Branch (172:10): [True: 35.7k, False: 426]
  ------------------
  173|  35.7k|    exponent_offset++;
  174|  35.7k|    s++;
  175|  35.7k|  }
  176|       |
  177|    426|  if (*s == '.') {
  ------------------
  |  Branch (177:7): [True: 152, False: 274]
  ------------------
  178|    152|    s++;
  179|  30.5k|    while (isdigit(*s)) {
  ------------------
  |  Branch (179:12): [True: 30.4k, False: 152]
  ------------------
  180|  30.4k|      if (mantissa < traits::mantissa_max / 10) {
  ------------------
  |  Branch (180:11): [True: 30.1k, False: 319]
  ------------------
  181|  30.1k|        mantissa = mantissa * 10 + uint8_t(*s - '0');
  182|  30.1k|        exponent_offset--;
  183|  30.1k|      }
  184|  30.4k|      s++;
  185|  30.4k|    }
  186|    152|  }
  187|       |
  188|    426|  int exponent = 0;
  189|    426|  if (*s == 'e' || *s == 'E') {
  ------------------
  |  Branch (189:7): [True: 53, False: 373]
  |  Branch (189:20): [True: 83, False: 290]
  ------------------
  190|    136|    s++;
  191|    136|    bool negative_exponent = false;
  192|    136|    if (*s == '-') {
  ------------------
  |  Branch (192:9): [True: 53, False: 83]
  ------------------
  193|     53|      negative_exponent = true;
  194|     53|      s++;
  195|     83|    } else if (*s == '+') {
  ------------------
  |  Branch (195:16): [True: 1, False: 82]
  ------------------
  196|      1|      s++;
  197|      1|    }
  198|       |
  199|    541|    while (isdigit(*s)) {
  ------------------
  |  Branch (199:12): [True: 410, False: 131]
  ------------------
  200|    410|      exponent = exponent * 10 + (*s - '0');
  201|    410|      if (exponent + exponent_offset > traits::exponent_max) {
  ------------------
  |  Branch (201:11): [True: 5, False: 405]
  ------------------
  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: 0, False: 2]
  ------------------
  204|      3|        else
  205|      3|          return Number(is_negative ? -traits::inf() : traits::inf());
  ------------------
  |  Branch (205:25): [True: 1, False: 2]
  ------------------
  206|      5|      }
  207|    405|      s++;
  208|    405|    }
  209|    131|    if (negative_exponent)
  ------------------
  |  Branch (209:9): [True: 51, False: 80]
  ------------------
  210|     51|      exponent = -exponent;
  211|    131|  }
  212|    421|  exponent += exponent_offset;
  213|       |
  214|       |  // we should be at the end of the string, otherwise it's an error
  215|    421|  if (*s != '\0')
  ------------------
  |  Branch (215:7): [True: 165, False: 256]
  ------------------
  216|    165|    return Number();
  217|       |
  218|    256|#if ARDUINOJSON_USE_DOUBLE
  219|    256|  bool isDouble = exponent < -FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (219:19): [True: 41, False: 215]
  ------------------
  220|    215|                  exponent > FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (220:19): [True: 40, False: 175]
  ------------------
  221|    175|                  mantissa > FloatTraits<float>::mantissa_max;
  ------------------
  |  Branch (221:19): [True: 88, False: 87]
  ------------------
  222|    256|  if (isDouble) {
  ------------------
  |  Branch (222:7): [True: 169, False: 87]
  ------------------
  223|    169|    auto final_result = multiplyByPowerOfTen(double(mantissa), exponent);
  224|    169|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (224:19): [True: 3, False: 166]
  ------------------
  225|    169|  } else
  226|     87|#endif
  227|     87|  {
  228|     87|    auto final_result = multiplyByPowerOfTen(float(mantissa), exponent);
  229|     87|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (229:19): [True: 1, False: 86]
  ------------------
  230|     87|  }
  231|    256|}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ev:
   52|    184|  Number() : type_(NumberType::Invalid) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ev:
   31|    184|  NumberValue() {}
_ZN11ArduinoJson8V742HB426detail6NumberC2El:
   54|    128|  Number(JsonInteger value) : type_(NumberType::SignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2El:
   33|    128|  NumberValue(JsonInteger x) : asSignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Em:
   55|    217|  Number(JsonUInt value) : type_(NumberType::UnsignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Em:
   34|    217|  NumberValue(JsonUInt x) : asUnsignedInteger(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ef:
   53|     89|  Number(float value) : type_(NumberType::Float), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ef:
   32|     89|  NumberValue(float x) : asFloat(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ed:
   57|    172|  Number(double value) : type_(NumberType::Double), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ed:
   36|    172|  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|  76.6k|inline bool isdigit(char c) {
   13|  76.6k|  return '0' <= c && c <= '9';
  ------------------
  |  Branch (13:10): [True: 75.3k, False: 1.22k]
  |  Branch (13:22): [True: 75.0k, False: 307]
  ------------------
   14|  76.6k|}

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

