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

_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE3infEv:
   70|      2|  static T inf() {
   71|      2|    return forge(0x7ff0000000000000);
   72|      2|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE5forgeEm:
  101|     31|  static T forge(uint64_t bits) {
  102|     31|    return alias_cast<T>(bits);
  103|     31|  }
_ZN11ArduinoJson8V742HB426detail20multiplyByPowerOfTenIdiEET_S3_T0_:
  197|    171|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|    171|  using traits = FloatTraits<TFloat>;
  199|       |
  200|    171|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 68, False: 103]
  ------------------
  201|    171|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|    171|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 103, False: 68]
  ------------------
  204|    103|    e = TExponent(-e);
  205|       |
  206|    992|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 850, False: 142]
  ------------------
  207|    850|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 29, False: 821]
  ------------------
  208|     29|      return traits::nan();
  209|    821|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 497, False: 324]
  ------------------
  210|    497|      m *= powersOfTen[index];
  211|    821|    e >>= 1;
  212|    821|  }
  213|    142|  return m;
  214|    171|}
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIdLm8EE25positiveBinaryPowersOfTenEv:
   32|     68|  static pgm_array<T, 9> positiveBinaryPowersOfTen() {
   33|     68|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(  //
  ------------------
  |  |   45|     68|      static type const name[] = __VA_ARGS__;
  ------------------
   34|     68|        uint64_t, factors,
   35|     68|        {
   36|     68|            0x4024000000000000,  // 1e1
   37|     68|            0x4059000000000000,  // 1e2
   38|     68|            0x40C3880000000000,  // 1e4
   39|     68|            0x4197D78400000000,  // 1e8
   40|     68|            0x4341C37937E08000,  // 1e16
   41|     68|            0x4693B8B5B5056E17,  // 1e32
   42|     68|            0x4D384F03E93FF9F5,  // 1e64
   43|     68|            0x5A827748F9301D32,  // 1e128
   44|     68|            0x75154FDD7F73BF3C,  // 1e256
   45|     68|        });
   46|     68|    return pgm_array<T, 9>(reinterpret_cast<const T*>(factors));
   47|     68|  }
_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|     29|  static T nan() {
   67|     29|    return forge(0x7ff8000000000000);
   68|     29|  }
_ZN11ArduinoJson8V742HB426detail20multiplyByPowerOfTenIfiEET_S3_T0_:
  197|     88|inline TFloat multiplyByPowerOfTen(TFloat m, TExponent e) {
  198|     88|  using traits = FloatTraits<TFloat>;
  199|       |
  200|     88|  auto powersOfTen = e > 0 ? traits::positiveBinaryPowersOfTen()
  ------------------
  |  Branch (200:22): [True: 16, False: 72]
  ------------------
  201|     88|                           : traits::negativeBinaryPowersOfTen();
  202|       |
  203|     88|  if (e <= 0)
  ------------------
  |  Branch (203:7): [True: 72, False: 16]
  ------------------
  204|     72|    e = TExponent(-e);
  205|       |
  206|    264|  for (uint8_t index = 0; e != 0; index++) {
  ------------------
  |  Branch (206:27): [True: 176, False: 88]
  ------------------
  207|    176|    if (index >= powersOfTen.size())
  ------------------
  |  Branch (207:9): [True: 0, False: 176]
  ------------------
  208|      0|      return traits::nan();
  209|    176|    if (e & 1)
  ------------------
  |  Branch (209:9): [True: 111, False: 65]
  ------------------
  210|    111|      m *= powersOfTen[index];
  211|    176|    e >>= 1;
  212|    176|  }
  213|     88|  return m;
  214|     88|}
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25positiveBinaryPowersOfTenEv:
  116|     16|  static pgm_array<T, 6> positiveBinaryPowersOfTen() {
  117|     16|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     16|      static type const name[] = __VA_ARGS__;
  ------------------
  118|     16|                                     {
  119|     16|                                         0x41200000,  // 1e1f
  120|     16|                                         0x42c80000,  // 1e2f
  121|     16|                                         0x461c4000,  // 1e4f
  122|     16|                                         0x4cbebc20,  // 1e8f
  123|     16|                                         0x5a0e1bca,  // 1e16f
  124|     16|                                         0x749dc5ae   // 1e32f
  125|     16|                                     });
  126|     16|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  127|     16|  }
_ZN11ArduinoJson8V742HB426detail11FloatTraitsIfLm4EE25negativeBinaryPowersOfTenEv:
  129|     72|  static pgm_array<T, 6> negativeBinaryPowersOfTen() {
  130|     72|    ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
  ------------------
  |  |   45|     72|      static type const name[] = __VA_ARGS__;
  ------------------
  131|     72|                                     {
  132|     72|                                         0x3dcccccd,  // 1e-1f
  133|     72|                                         0x3c23d70a,  // 1e-2f
  134|     72|                                         0x38d1b717,  // 1e-4f
  135|     72|                                         0x322bcc77,  // 1e-8f
  136|     72|                                         0x24e69595,  // 1e-16f
  137|     72|                                         0x0a4fb11f   // 1e-32f
  138|     72|                                     });
  139|     72|    return pgm_array<T, 6>(reinterpret_cast<const T*>(factors));
  140|     72|  }

_ZN11ArduinoJson8V742HB426detail11parseNumberEPKc:
  105|    777|inline Number parseNumber(const char* s) {
  106|    777|  using traits = FloatTraits<JsonFloat>;
  107|    777|  using mantissa_t = largest_type<traits::mantissa_type, JsonUInt>;
  108|    777|  using exponent_t = traits::exponent_type;
  109|       |
  110|    777|  ARDUINOJSON_ASSERT(s != 0);
  ------------------
  |  |   11|    777|#  define ARDUINOJSON_ASSERT(X) assert(X)
  ------------------
  |  Branch (110:3): [True: 777, False: 0]
  ------------------
  111|       |
  112|    777|  bool is_negative = false;
  113|    777|  switch (*s) {
  ------------------
  |  Branch (113:11): [True: 137, False: 640]
  ------------------
  114|    136|    case '-':
  ------------------
  |  Branch (114:5): [True: 136, False: 641]
  ------------------
  115|    136|      is_negative = true;
  116|    136|      s++;
  117|    136|      break;
  118|      1|    case '+':
  ------------------
  |  Branch (118:5): [True: 1, False: 776]
  ------------------
  119|      1|      s++;
  120|      1|      break;
  121|    777|  }
  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|    777|  if (!isdigit(*s) && *s != '.')
  ------------------
  |  Branch (135:7): [True: 105, False: 672]
  |  Branch (135:23): [True: 22, False: 83]
  ------------------
  136|     22|    return Number();
  137|       |
  138|    755|  mantissa_t mantissa = 0;
  139|    755|  exponent_t exponent_offset = 0;
  140|    755|  const mantissa_t maxUint = JsonUInt(-1);
  141|       |
  142|  8.59k|  while (isdigit(*s)) {
  ------------------
  |  Branch (142:10): [True: 7.88k, False: 708]
  ------------------
  143|  7.88k|    uint8_t digit = uint8_t(*s - '0');
  144|  7.88k|    if (mantissa > maxUint / 10)
  ------------------
  |  Branch (144:9): [True: 43, False: 7.84k]
  ------------------
  145|     43|      break;
  146|  7.84k|    mantissa *= 10;
  147|  7.84k|    if (mantissa > maxUint - digit)
  ------------------
  |  Branch (147:9): [True: 4, False: 7.84k]
  ------------------
  148|      4|      break;
  149|  7.84k|    mantissa += digit;
  150|  7.84k|    s++;
  151|  7.84k|  }
  152|       |
  153|    755|  if (*s == '\0') {
  ------------------
  |  Branch (153:7): [True: 344, False: 411]
  ------------------
  154|    344|    if (is_negative) {
  ------------------
  |  Branch (154:9): [True: 129, False: 215]
  ------------------
  155|    129|      const mantissa_t sintMantissaMax = mantissa_t(1)
  156|    129|                                         << (sizeof(JsonInteger) * 8 - 1);
  157|    129|      if (mantissa <= sintMantissaMax) {
  ------------------
  |  Branch (157:11): [True: 126, False: 3]
  ------------------
  158|    126|        return Number(JsonInteger(~mantissa + 1));
  159|    126|      }
  160|    215|    } else {
  161|    215|      return Number(JsonUInt(mantissa));
  162|    215|    }
  163|    344|  }
  164|       |
  165|       |  // avoid mantissa overflow
  166|    647|  while (mantissa > traits::mantissa_max) {
  ------------------
  |  Branch (166:10): [True: 233, False: 414]
  ------------------
  167|    233|    mantissa /= 10;
  168|    233|    exponent_offset++;
  169|    233|  }
  170|       |
  171|       |  // remaing digits can't fit in the mantissa
  172|  26.5k|  while (isdigit(*s)) {
  ------------------
  |  Branch (172:10): [True: 26.1k, False: 414]
  ------------------
  173|  26.1k|    exponent_offset++;
  174|  26.1k|    s++;
  175|  26.1k|  }
  176|       |
  177|    414|  if (*s == '.') {
  ------------------
  |  Branch (177:7): [True: 149, False: 265]
  ------------------
  178|    149|    s++;
  179|  33.2k|    while (isdigit(*s)) {
  ------------------
  |  Branch (179:12): [True: 33.1k, False: 149]
  ------------------
  180|  33.1k|      if (mantissa < traits::mantissa_max / 10) {
  ------------------
  |  Branch (180:11): [True: 32.8k, False: 260]
  ------------------
  181|  32.8k|        mantissa = mantissa * 10 + uint8_t(*s - '0');
  182|  32.8k|        exponent_offset--;
  183|  32.8k|      }
  184|  33.1k|      s++;
  185|  33.1k|    }
  186|    149|  }
  187|       |
  188|    414|  int exponent = 0;
  189|    414|  if (*s == 'e' || *s == 'E') {
  ------------------
  |  Branch (189:7): [True: 76, False: 338]
  |  Branch (189:20): [True: 66, False: 272]
  ------------------
  190|    142|    s++;
  191|    142|    bool negative_exponent = false;
  192|    142|    if (*s == '-') {
  ------------------
  |  Branch (192:9): [True: 48, False: 94]
  ------------------
  193|     48|      negative_exponent = true;
  194|     48|      s++;
  195|     94|    } else if (*s == '+') {
  ------------------
  |  Branch (195:16): [True: 1, False: 93]
  ------------------
  196|      1|      s++;
  197|      1|    }
  198|       |
  199|    714|    while (isdigit(*s)) {
  ------------------
  |  Branch (199:12): [True: 575, False: 139]
  ------------------
  200|    575|      exponent = exponent * 10 + (*s - '0');
  201|    575|      if (exponent + exponent_offset > traits::exponent_max) {
  ------------------
  |  Branch (201:11): [True: 3, False: 572]
  ------------------
  202|      3|        if (negative_exponent)
  ------------------
  |  Branch (202:13): [True: 1, False: 2]
  ------------------
  203|      1|          return Number(is_negative ? -0.0f : 0.0f);
  ------------------
  |  Branch (203:25): [True: 0, False: 1]
  ------------------
  204|      2|        else
  205|      2|          return Number(is_negative ? -traits::inf() : traits::inf());
  ------------------
  |  Branch (205:25): [True: 1, False: 1]
  ------------------
  206|      3|      }
  207|    572|      s++;
  208|    572|    }
  209|    139|    if (negative_exponent)
  ------------------
  |  Branch (209:9): [True: 47, False: 92]
  ------------------
  210|     47|      exponent = -exponent;
  211|    139|  }
  212|    411|  exponent += exponent_offset;
  213|       |
  214|       |  // we should be at the end of the string, otherwise it's an error
  215|    411|  if (*s != '\0')
  ------------------
  |  Branch (215:7): [True: 152, False: 259]
  ------------------
  216|    152|    return Number();
  217|       |
  218|    259|#if ARDUINOJSON_USE_DOUBLE
  219|    259|  bool isDouble = exponent < -FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (219:19): [True: 38, False: 221]
  ------------------
  220|    221|                  exponent > FloatTraits<float>::exponent_max ||
  ------------------
  |  Branch (220:19): [True: 39, False: 182]
  ------------------
  221|    182|                  mantissa > FloatTraits<float>::mantissa_max;
  ------------------
  |  Branch (221:19): [True: 94, False: 88]
  ------------------
  222|    259|  if (isDouble) {
  ------------------
  |  Branch (222:7): [True: 171, False: 88]
  ------------------
  223|    171|    auto final_result = multiplyByPowerOfTen(double(mantissa), exponent);
  224|    171|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (224:19): [True: 5, False: 166]
  ------------------
  225|    171|  } else
  226|     88|#endif
  227|     88|  {
  228|     88|    auto final_result = multiplyByPowerOfTen(float(mantissa), exponent);
  229|     88|    return Number(is_negative ? -final_result : final_result);
  ------------------
  |  Branch (229:19): [True: 1, False: 87]
  ------------------
  230|     88|  }
  231|    259|}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ev:
   52|    174|  Number() : type_(NumberType::Invalid) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ev:
   31|    174|  NumberValue() {}
_ZN11ArduinoJson8V742HB426detail6NumberC2El:
   54|    126|  Number(JsonInteger value) : type_(NumberType::SignedInteger), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2El:
   33|    126|  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|     89|  Number(float value) : type_(NumberType::Float), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ef:
   32|     89|  NumberValue(float x) : asFloat(x) {}
_ZN11ArduinoJson8V742HB426detail6NumberC2Ed:
   57|    173|  Number(double value) : type_(NumberType::Double), value_(value) {}
_ZN11ArduinoJson8V742HB426detail11NumberValueC2Ed:
   36|    173|  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|  69.9k|inline bool isdigit(char c) {
   13|  69.9k|  return '0' <= c && c <= '9';
  ------------------
  |  Branch (13:10): [True: 68.7k, False: 1.18k]
  |  Branch (13:22): [True: 68.3k, False: 328]
  ------------------
   14|  69.9k|}

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

