_ZN17double_conversion6Bignum8RawBigitEi:
   36|  1.15M|Bignum::Chunk& Bignum::RawBigit(const int index) {
   37|  1.15M|  DOUBLE_CONVERSION_ASSERT(static_cast<unsigned>(index) < kBigitCapacity);
  ------------------
  |  |   47|  1.15M|    assert(condition)
  ------------------
  |  Branch (37:3): [True: 1.15M, False: 0]
  ------------------
   38|  1.15M|  return bigits_buffer_[index];
   39|  1.15M|}
_ZNK17double_conversion6Bignum8RawBigitEi:
   42|  20.0k|const Bignum::Chunk& Bignum::RawBigit(const int index) const {
   43|  20.0k|  DOUBLE_CONVERSION_ASSERT(static_cast<unsigned>(index) < kBigitCapacity);
  ------------------
  |  |   47|  20.0k|    assert(condition)
  ------------------
  |  Branch (43:3): [True: 20.0k, False: 0]
  ------------------
   44|  20.0k|  return bigits_buffer_[index];
   45|  20.0k|}
_ZN17double_conversion6Bignum12AssignUInt64Em:
   65|  3.32k|void Bignum::AssignUInt64(uint64_t value) {
   66|  3.32k|  Zero();
   67|  10.7k|  for(int i = 0; value > 0; ++i) {
  ------------------
  |  Branch (67:18): [True: 7.43k, False: 3.32k]
  ------------------
   68|  7.43k|    RawBigit(i) = value & kBigitMask;
   69|  7.43k|    value >>= kBigitSize;
   70|  7.43k|    ++used_bigits_;
   71|  7.43k|  }
   72|  3.32k|}
_ZN17double_conversion6Bignum19AssignDecimalStringENS_6VectorIKcEE:
   97|    773|void Bignum::AssignDecimalString(const Vector<const char> value) {
   98|       |  // 2^64 = 18446744073709551616 > 10^19
   99|    773|  static const int kMaxUint64DecimalDigits = 19;
  100|    773|  Zero();
  101|    773|  int length = value.length();
  102|    773|  unsigned pos = 0;
  103|       |  // Let's just say that each digit needs 4 bits.
  104|  4.45k|  while (length >= kMaxUint64DecimalDigits) {
  ------------------
  |  Branch (104:10): [True: 3.67k, False: 773]
  ------------------
  105|  3.67k|    const uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
  106|  3.67k|    pos += kMaxUint64DecimalDigits;
  107|  3.67k|    length -= kMaxUint64DecimalDigits;
  108|  3.67k|    MultiplyByPowerOfTen(kMaxUint64DecimalDigits);
  109|  3.67k|    AddUInt64(digits);
  110|  3.67k|  }
  111|    773|  const uint64_t digits = ReadUInt64(value, pos, length);
  112|    773|  MultiplyByPowerOfTen(length);
  113|    773|  AddUInt64(digits);
  114|    773|  Clamp();
  115|    773|}
_ZN17double_conversion6Bignum9AddUInt64Em:
  156|  4.45k|void Bignum::AddUInt64(const uint64_t operand) {
  157|  4.45k|  if (operand == 0) {
  ------------------
  |  Branch (157:7): [True: 1.90k, False: 2.55k]
  ------------------
  158|  1.90k|    return;
  159|  1.90k|  }
  160|  2.55k|  Bignum other;
  161|  2.55k|  other.AssignUInt64(operand);
  162|  2.55k|  AddBignum(other);
  163|  2.55k|}
_ZN17double_conversion6Bignum9AddBignumERKS0_:
  166|  2.55k|void Bignum::AddBignum(const Bignum& other) {
  167|  2.55k|  DOUBLE_CONVERSION_ASSERT(IsClamped());
  ------------------
  |  |   47|  2.55k|    assert(condition)
  ------------------
  |  Branch (167:3): [True: 2.55k, False: 0]
  ------------------
  168|  2.55k|  DOUBLE_CONVERSION_ASSERT(other.IsClamped());
  ------------------
  |  |   47|  2.55k|    assert(condition)
  ------------------
  |  Branch (168:3): [True: 2.55k, False: 0]
  ------------------
  169|       |
  170|       |  // If this has a greater exponent than other append zero-bigits to this.
  171|       |  // After this call exponent_ <= other.exponent_.
  172|  2.55k|  Align(other);
  173|       |
  174|       |  // There are two possibilities:
  175|       |  //   aaaaaaaaaaa 0000  (where the 0s represent a's exponent)
  176|       |  //     bbbbb 00000000
  177|       |  //   ----------------
  178|       |  //   ccccccccccc 0000
  179|       |  // or
  180|       |  //    aaaaaaaaaa 0000
  181|       |  //  bbbbbbbbb 0000000
  182|       |  //  -----------------
  183|       |  //  cccccccccccc 0000
  184|       |  // In both cases we might need a carry bigit.
  185|       |
  186|  2.55k|  EnsureCapacity(1 + (std::max)(BigitLength(), other.BigitLength()) - exponent_);
  187|  2.55k|  Chunk carry = 0;
  188|  2.55k|  int bigit_pos = other.exponent_ - exponent_;
  189|  2.55k|  DOUBLE_CONVERSION_ASSERT(bigit_pos >= 0);
  ------------------
  |  |   47|  2.55k|    assert(condition)
  ------------------
  |  Branch (189:3): [True: 2.55k, False: 0]
  ------------------
  190|  2.55k|  for (int i = used_bigits_; i < bigit_pos; ++i) {
  ------------------
  |  Branch (190:30): [True: 0, False: 2.55k]
  ------------------
  191|      0|    RawBigit(i) = 0;
  192|      0|  }
  193|  8.46k|  for (int i = 0; i < other.used_bigits_; ++i) {
  ------------------
  |  Branch (193:19): [True: 5.91k, False: 2.55k]
  ------------------
  194|  5.91k|    const Chunk my = (bigit_pos < used_bigits_) ? RawBigit(bigit_pos) : 0;
  ------------------
  |  Branch (194:22): [True: 4.16k, False: 1.74k]
  ------------------
  195|  5.91k|    const Chunk sum = my + other.RawBigit(i) + carry;
  196|  5.91k|    RawBigit(bigit_pos) = sum & kBigitMask;
  197|  5.91k|    carry = sum >> kBigitSize;
  198|  5.91k|    ++bigit_pos;
  199|  5.91k|  }
  200|  2.91k|  while (carry != 0) {
  ------------------
  |  Branch (200:10): [True: 368, False: 2.55k]
  ------------------
  201|    368|    const Chunk my = (bigit_pos < used_bigits_) ? RawBigit(bigit_pos) : 0;
  ------------------
  |  Branch (201:22): [True: 368, False: 0]
  ------------------
  202|    368|    const Chunk sum = my + carry;
  203|    368|    RawBigit(bigit_pos) = sum & kBigitMask;
  204|    368|    carry = sum >> kBigitSize;
  205|    368|    ++bigit_pos;
  206|    368|  }
  207|  2.55k|  used_bigits_ = static_cast<int16_t>(std::max(bigit_pos, static_cast<int>(used_bigits_)));
  208|       |  DOUBLE_CONVERSION_ASSERT(IsClamped());
  ------------------
  |  |   47|  2.55k|    assert(condition)
  ------------------
  |  Branch (208:3): [True: 2.55k, False: 0]
  ------------------
  209|  2.55k|}
_ZN17double_conversion6Bignum9ShiftLeftEi:
  239|  4.88k|void Bignum::ShiftLeft(const int shift_amount) {
  240|  4.88k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (240:7): [True: 0, False: 4.88k]
  ------------------
  241|      0|    return;
  242|      0|  }
  243|  4.88k|  exponent_ += static_cast<int16_t>(shift_amount / kBigitSize);
  244|  4.88k|  const int local_shift = shift_amount % kBigitSize;
  245|  4.88k|  EnsureCapacity(used_bigits_ + 1);
  246|  4.88k|  BigitsShiftLeft(local_shift);
  247|  4.88k|}
_ZN17double_conversion6Bignum16MultiplyByUInt32Ej:
  250|  7.68k|void Bignum::MultiplyByUInt32(const uint32_t factor) {
  251|  7.68k|  if (factor == 1) {
  ------------------
  |  Branch (251:7): [True: 0, False: 7.68k]
  ------------------
  252|      0|    return;
  253|      0|  }
  254|  7.68k|  if (factor == 0) {
  ------------------
  |  Branch (254:7): [True: 0, False: 7.68k]
  ------------------
  255|      0|    Zero();
  256|      0|    return;
  257|      0|  }
  258|  7.68k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (258:7): [True: 0, False: 7.68k]
  ------------------
  259|      0|    return;
  260|      0|  }
  261|       |  // The product of a bigit with the factor is of size kBigitSize + 32.
  262|       |  // Assert that this number + 1 (for the carry) fits into double chunk.
  263|  7.68k|  DOUBLE_CONVERSION_ASSERT(kDoubleChunkSize >= kBigitSize + 32 + 1);
  ------------------
  |  |   47|  7.68k|    assert(condition)
  ------------------
  |  Branch (263:3): [True: 7.68k, Folded]
  ------------------
  264|  7.68k|  DoubleChunk carry = 0;
  265|   235k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (265:19): [True: 228k, False: 7.68k]
  ------------------
  266|   228k|    const DoubleChunk product = static_cast<DoubleChunk>(factor) * RawBigit(i) + carry;
  267|   228k|    RawBigit(i) = static_cast<Chunk>(product & kBigitMask);
  268|   228k|    carry = (product >> kBigitSize);
  269|   228k|  }
  270|  13.6k|  while (carry != 0) {
  ------------------
  |  Branch (270:10): [True: 5.95k, False: 7.68k]
  ------------------
  271|  5.95k|    EnsureCapacity(used_bigits_ + 1);
  272|  5.95k|    RawBigit(used_bigits_) = carry & kBigitMask;
  273|  5.95k|    used_bigits_++;
  274|  5.95k|    carry >>= kBigitSize;
  275|  5.95k|  }
  276|  7.68k|}
_ZN17double_conversion6Bignum16MultiplyByUInt64Em:
  279|  4.52k|void Bignum::MultiplyByUInt64(const uint64_t factor) {
  280|  4.52k|  if (factor == 1) {
  ------------------
  |  Branch (280:7): [True: 0, False: 4.52k]
  ------------------
  281|      0|    return;
  282|      0|  }
  283|  4.52k|  if (factor == 0) {
  ------------------
  |  Branch (283:7): [True: 0, False: 4.52k]
  ------------------
  284|      0|    Zero();
  285|      0|    return;
  286|      0|  }
  287|  4.52k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (287:7): [True: 0, False: 4.52k]
  ------------------
  288|      0|    return;
  289|      0|  }
  290|  4.52k|  DOUBLE_CONVERSION_ASSERT(kBigitSize < 32);
  ------------------
  |  |   47|  4.52k|    assert(condition)
  ------------------
  |  Branch (290:3): [True: 4.52k, Folded]
  ------------------
  291|  4.52k|  uint64_t carry = 0;
  292|  4.52k|  const uint64_t low = factor & 0xFFFFFFFF;
  293|  4.52k|  const uint64_t high = factor >> 32;
  294|  91.5k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (294:19): [True: 87.0k, False: 4.52k]
  ------------------
  295|  87.0k|    const uint64_t product_low = low * RawBigit(i);
  296|  87.0k|    const uint64_t product_high = high * RawBigit(i);
  297|  87.0k|    const uint64_t tmp = (carry & kBigitMask) + product_low;
  298|  87.0k|    RawBigit(i) = tmp & kBigitMask;
  299|  87.0k|    carry = (carry >> kBigitSize) + (tmp >> kBigitSize) +
  300|  87.0k|        (product_high << (32 - kBigitSize));
  301|  87.0k|  }
  302|  14.7k|  while (carry != 0) {
  ------------------
  |  Branch (302:10): [True: 10.1k, False: 4.52k]
  ------------------
  303|  10.1k|    EnsureCapacity(used_bigits_ + 1);
  304|  10.1k|    RawBigit(used_bigits_) = carry & kBigitMask;
  305|  10.1k|    used_bigits_++;
  306|  10.1k|    carry >>= kBigitSize;
  307|  10.1k|  }
  308|  4.52k|}
_ZN17double_conversion6Bignum20MultiplyByPowerOfTenEi:
  311|  5.22k|void Bignum::MultiplyByPowerOfTen(const int exponent) {
  312|  5.22k|  static const uint64_t kFive27 = DOUBLE_CONVERSION_UINT64_2PART_C(0x6765c793, fa10079d);
  ------------------
  |  |  195|  5.22k|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  313|  5.22k|  static const uint16_t kFive1 = 5;
  314|  5.22k|  static const uint16_t kFive2 = kFive1 * 5;
  315|  5.22k|  static const uint16_t kFive3 = kFive2 * 5;
  316|  5.22k|  static const uint16_t kFive4 = kFive3 * 5;
  317|  5.22k|  static const uint16_t kFive5 = kFive4 * 5;
  318|  5.22k|  static const uint16_t kFive6 = kFive5 * 5;
  319|  5.22k|  static const uint32_t kFive7 = kFive6 * 5;
  320|  5.22k|  static const uint32_t kFive8 = kFive7 * 5;
  321|  5.22k|  static const uint32_t kFive9 = kFive8 * 5;
  322|  5.22k|  static const uint32_t kFive10 = kFive9 * 5;
  323|  5.22k|  static const uint32_t kFive11 = kFive10 * 5;
  324|  5.22k|  static const uint32_t kFive12 = kFive11 * 5;
  325|  5.22k|  static const uint32_t kFive13 = kFive12 * 5;
  326|  5.22k|  static const uint32_t kFive1_to_12[] =
  327|  5.22k|      { kFive1, kFive2, kFive3, kFive4, kFive5, kFive6,
  328|  5.22k|        kFive7, kFive8, kFive9, kFive10, kFive11, kFive12 };
  329|       |
  330|  5.22k|  DOUBLE_CONVERSION_ASSERT(exponent >= 0);
  ------------------
  |  |   47|  5.22k|    assert(condition)
  ------------------
  |  Branch (330:3): [True: 5.22k, False: 0]
  ------------------
  331|       |
  332|  5.22k|  if (exponent == 0) {
  ------------------
  |  Branch (332:7): [True: 342, False: 4.88k]
  ------------------
  333|    342|    return;
  334|    342|  }
  335|  4.88k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (335:7): [True: 773, False: 4.11k]
  ------------------
  336|    773|    return;
  337|    773|  }
  338|       |  // We shift by exponent at the end just before returning.
  339|  4.11k|  int remaining_exponent = exponent;
  340|  8.63k|  while (remaining_exponent >= 27) {
  ------------------
  |  Branch (340:10): [True: 4.52k, False: 4.11k]
  ------------------
  341|  4.52k|    MultiplyByUInt64(kFive27);
  342|  4.52k|    remaining_exponent -= 27;
  343|  4.52k|  }
  344|  7.82k|  while (remaining_exponent >= 13) {
  ------------------
  |  Branch (344:10): [True: 3.71k, False: 4.11k]
  ------------------
  345|  3.71k|    MultiplyByUInt32(kFive13);
  346|  3.71k|    remaining_exponent -= 13;
  347|  3.71k|  }
  348|  4.11k|  if (remaining_exponent > 0) {
  ------------------
  |  Branch (348:7): [True: 3.96k, False: 144]
  ------------------
  349|  3.96k|    MultiplyByUInt32(kFive1_to_12[remaining_exponent - 1]);
  350|  3.96k|  }
  351|  4.11k|  ShiftLeft(exponent);
  352|  4.11k|}
_ZNK17double_conversion6Bignum11BigitOrZeroEi:
  633|  6.01k|Bignum::Chunk Bignum::BigitOrZero(const int index) const {
  634|  6.01k|  if (index >= BigitLength()) {
  ------------------
  |  Branch (634:7): [True: 0, False: 6.01k]
  ------------------
  635|      0|    return 0;
  636|      0|  }
  637|  6.01k|  if (index < exponent_) {
  ------------------
  |  Branch (637:7): [True: 271, False: 5.74k]
  ------------------
  638|    271|    return 0;
  639|    271|  }
  640|  5.74k|  return RawBigit(index - exponent_);
  641|  6.01k|}
_ZN17double_conversion6Bignum7CompareERKS0_S2_:
  644|    773|int Bignum::Compare(const Bignum& a, const Bignum& b) {
  645|    773|  DOUBLE_CONVERSION_ASSERT(a.IsClamped());
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (645:3): [True: 773, False: 0]
  ------------------
  646|    773|  DOUBLE_CONVERSION_ASSERT(b.IsClamped());
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (646:3): [True: 773, False: 0]
  ------------------
  647|    773|  const int bigit_length_a = a.BigitLength();
  648|    773|  const int bigit_length_b = b.BigitLength();
  649|    773|  if (bigit_length_a < bigit_length_b) {
  ------------------
  |  Branch (649:7): [True: 6, False: 767]
  ------------------
  650|      6|    return -1;
  651|      6|  }
  652|    767|  if (bigit_length_a > bigit_length_b) {
  ------------------
  |  Branch (652:7): [True: 0, False: 767]
  ------------------
  653|      0|    return +1;
  654|      0|  }
  655|  3.10k|  for (int i = bigit_length_a - 1; i >= (std::min)(a.exponent_, b.exponent_); --i) {
  ------------------
  |  Branch (655:36): [True: 3.00k, False: 99]
  ------------------
  656|  3.00k|    const Chunk bigit_a = a.BigitOrZero(i);
  657|  3.00k|    const Chunk bigit_b = b.BigitOrZero(i);
  658|  3.00k|    if (bigit_a < bigit_b) {
  ------------------
  |  Branch (658:9): [True: 224, False: 2.78k]
  ------------------
  659|    224|      return -1;
  660|    224|    }
  661|  2.78k|    if (bigit_a > bigit_b) {
  ------------------
  |  Branch (661:9): [True: 444, False: 2.33k]
  ------------------
  662|    444|      return +1;
  663|    444|    }
  664|       |    // Otherwise they are equal up to this digit. Try the next digit.
  665|  2.78k|  }
  666|     99|  return 0;
  667|    767|}
_ZN17double_conversion6Bignum5ClampEv:
  715|    773|void Bignum::Clamp() {
  716|    773|  while (used_bigits_ > 0 && RawBigit(used_bigits_ - 1) == 0) {
  ------------------
  |  Branch (716:10): [True: 773, False: 0]
  |  Branch (716:30): [True: 0, False: 773]
  ------------------
  717|      0|    used_bigits_--;
  718|      0|  }
  719|    773|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (719:7): [True: 0, False: 773]
  ------------------
  720|       |    // Zero.
  721|      0|    exponent_ = 0;
  722|      0|  }
  723|    773|}
_ZN17double_conversion6Bignum5AlignERKS0_:
  726|  2.55k|void Bignum::Align(const Bignum& other) {
  727|  2.55k|  if (exponent_ > other.exponent_) {
  ------------------
  |  Branch (727:7): [True: 0, False: 2.55k]
  ------------------
  728|       |    // If "X" represents a "hidden" bigit (by the exponent) then we are in the
  729|       |    // following case (a == this, b == other):
  730|       |    // a:  aaaaaaXXXX   or a:   aaaaaXXX
  731|       |    // b:     bbbbbbX      b: bbbbbbbbXX
  732|       |    // We replace some of the hidden digits (X) of a with 0 digits.
  733|       |    // a:  aaaaaa000X   or a:   aaaaa0XX
  734|      0|    const int zero_bigits = exponent_ - other.exponent_;
  735|      0|    EnsureCapacity(used_bigits_ + zero_bigits);
  736|      0|    for (int i = used_bigits_ - 1; i >= 0; --i) {
  ------------------
  |  Branch (736:36): [True: 0, False: 0]
  ------------------
  737|      0|      RawBigit(i + zero_bigits) = RawBigit(i);
  738|      0|    }
  739|      0|    for (int i = 0; i < zero_bigits; ++i) {
  ------------------
  |  Branch (739:21): [True: 0, False: 0]
  ------------------
  740|      0|      RawBigit(i) = 0;
  741|      0|    }
  742|      0|    used_bigits_ += static_cast<int16_t>(zero_bigits);
  743|      0|    exponent_ -= static_cast<int16_t>(zero_bigits);
  744|       |
  745|      0|    DOUBLE_CONVERSION_ASSERT(used_bigits_ >= 0);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (745:5): [True: 0, False: 0]
  ------------------
  746|      0|    DOUBLE_CONVERSION_ASSERT(exponent_ >= 0);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (746:5): [True: 0, False: 0]
  ------------------
  747|      0|  }
  748|  2.55k|}
_ZN17double_conversion6Bignum15BigitsShiftLeftEi:
  751|  4.88k|void Bignum::BigitsShiftLeft(const int shift_amount) {
  752|  4.88k|  DOUBLE_CONVERSION_ASSERT(shift_amount < kBigitSize);
  ------------------
  |  |   47|  4.88k|    assert(condition)
  ------------------
  |  Branch (752:3): [True: 4.88k, False: 0]
  ------------------
  753|  4.88k|  DOUBLE_CONVERSION_ASSERT(shift_amount >= 0);
  ------------------
  |  |   47|  4.88k|    assert(condition)
  ------------------
  |  Branch (753:3): [True: 4.88k, False: 0]
  ------------------
  754|  4.88k|  Chunk carry = 0;
  755|   137k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (755:19): [True: 132k, False: 4.88k]
  ------------------
  756|   132k|    const Chunk new_carry = RawBigit(i) >> (kBigitSize - shift_amount);
  757|   132k|    RawBigit(i) = ((RawBigit(i) << shift_amount) + carry) & kBigitMask;
  758|   132k|    carry = new_carry;
  759|   132k|  }
  760|  4.88k|  if (carry != 0) {
  ------------------
  |  Branch (760:7): [True: 3.05k, False: 1.83k]
  ------------------
  761|  3.05k|    RawBigit(used_bigits_) = carry;
  762|  3.05k|    used_bigits_++;
  763|  3.05k|  }
  764|  4.88k|}
bignum.cc:_ZN17double_conversionL10ReadUInt64ENS_6VectorIKcEEii:
   86|  4.45k|                           const int digits_to_read) {
   87|  4.45k|  uint64_t result = 0;
   88|  80.6k|  for (int i = from; i < from + digits_to_read; ++i) {
  ------------------
  |  Branch (88:22): [True: 76.1k, False: 4.45k]
  ------------------
   89|  76.1k|    const int digit = buffer[i] - '0';
   90|  76.1k|    DOUBLE_CONVERSION_ASSERT(0 <= digit && digit <= 9);
  ------------------
  |  |   47|  76.1k|    assert(condition)
  ------------------
  |  Branch (90:5): [True: 76.1k, False: 0]
  |  Branch (90:5): [True: 76.1k, False: 0]
  |  Branch (90:5): [True: 76.1k, False: 0]
  ------------------
   91|  76.1k|    result = result * 10 + digit;
   92|  76.1k|  }
   93|  4.45k|  return result;
   94|  4.45k|}

_ZN17double_conversion6BignumC2Ev:
   42|  4.09k|  Bignum() : used_bigits_(0), exponent_(0) {}
_ZN17double_conversion6Bignum14EnsureCapacityEi:
  114|  23.5k|  static void EnsureCapacity(const int size) {
  115|  23.5k|    if (size > kBigitCapacity) {
  ------------------
  |  Branch (115:9): [True: 0, False: 23.5k]
  ------------------
  116|      0|      DOUBLE_CONVERSION_UNREACHABLE();
  ------------------
  |  |   77|      0|#define DOUBLE_CONVERSION_UNREACHABLE()   (abort())
  ------------------
  117|      0|    }
  118|  23.5k|  }
_ZNK17double_conversion6Bignum9IsClampedEv:
  121|  9.19k|  bool IsClamped() const {
  122|  9.19k|    return used_bigits_ == 0 || RawBigit(used_bigits_ - 1) != 0;
  ------------------
  |  Branch (122:12): [True: 773, False: 8.42k]
  |  Branch (122:33): [True: 8.42k, False: 0]
  ------------------
  123|  9.19k|  }
_ZN17double_conversion6Bignum4ZeroEv:
  124|  4.09k|  void Zero() {
  125|  4.09k|    used_bigits_ = 0;
  126|  4.09k|    exponent_ = 0;
  127|  4.09k|  }
_ZNK17double_conversion6Bignum11BigitLengthEv:
  133|  12.6k|  int BigitLength() const { return used_bigits_ + exponent_; }

_ZN17double_conversion16PowersOfTenCache32GetCachedPowerForDecimalExponentEiPNS_5DiyFpEPi:
  161|  1.36k|                                      int* found_exponent) {
  162|  1.36k|  DOUBLE_CONVERSION_ASSERT(kMinDecimalExponent <= requested_exponent);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (162:3): [True: 1.36k, False: 0]
  ------------------
  163|  1.36k|  DOUBLE_CONVERSION_ASSERT(requested_exponent < kMaxDecimalExponent + kDecimalExponentDistance);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (163:3): [True: 1.36k, False: 0]
  ------------------
  164|  1.36k|  int index =
  165|  1.36k|      (requested_exponent + kCachedPowersOffset) / kDecimalExponentDistance;
  166|  1.36k|  CachedPower cached_power = kCachedPowers[index];
  167|  1.36k|  *power = DiyFp(cached_power.significand, cached_power.binary_exponent);
  168|  1.36k|  *found_exponent = cached_power.decimal_exponent;
  169|  1.36k|  DOUBLE_CONVERSION_ASSERT(*found_exponent <= requested_exponent);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (169:3): [True: 1.36k, False: 0]
  ------------------
  170|  1.36k|  DOUBLE_CONVERSION_ASSERT(requested_exponent < *found_exponent + kDecimalExponentDistance);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (170:3): [True: 1.36k, False: 0]
  ------------------
  171|  1.36k|}

_ZN17double_conversion5DiyFpC2Ev:
   45|  2.73k|  DiyFp() : f_(0), e_(0) {}
_ZN17double_conversion5DiyFpC2Emi:
   46|  6.12k|  DiyFp(const uint64_t significand, const int32_t exponent) : f_(significand), e_(exponent) {}
_ZN17double_conversion5DiyFp8MultiplyERKS0_:
   68|  2.62k|  void Multiply(const DiyFp& other) {
   69|       |    // Simply "emulates" a 128 bit multiplication.
   70|       |    // However: the resulting number only contains 64 bits. The least
   71|       |    // significant 64 bits are only used for rounding the most significant 64
   72|       |    // bits.
   73|  2.62k|    const uint64_t kM32 = 0xFFFFFFFFU;
   74|  2.62k|    const uint64_t a = f_ >> 32;
   75|  2.62k|    const uint64_t b = f_ & kM32;
   76|  2.62k|    const uint64_t c = other.f_ >> 32;
   77|  2.62k|    const uint64_t d = other.f_ & kM32;
   78|  2.62k|    const uint64_t ac = a * c;
   79|  2.62k|    const uint64_t bc = b * c;
   80|  2.62k|    const uint64_t ad = a * d;
   81|  2.62k|    const uint64_t bd = b * d;
   82|       |    // By adding 1U << 31 to tmp we round the final result.
   83|       |    // Halfway cases will be rounded up.
   84|  2.62k|    const uint64_t tmp = (bd >> 32) + (ad & kM32) + (bc & kM32) + (1U << 31);
   85|  2.62k|    e_ += other.e_ + 64;
   86|  2.62k|    f_ = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32);
   87|  2.62k|  }
_ZN17double_conversion5DiyFp9NormalizeEv:
   96|  2.73k|  void Normalize() {
   97|  2.73k|    DOUBLE_CONVERSION_ASSERT(f_ != 0);
  ------------------
  |  |   47|  2.73k|    assert(condition)
  ------------------
  |  Branch (97:5): [True: 2.73k, False: 0]
  ------------------
   98|  2.73k|    uint64_t significand = f_;
   99|  2.73k|    int32_t exponent = e_;
  100|       |
  101|       |    // This method is mainly called for normalizing boundaries. In general,
  102|       |    // boundaries need to be shifted by 10 bits, and we optimize for this case.
  103|  2.73k|    const uint64_t k10MSBits = DOUBLE_CONVERSION_UINT64_2PART_C(0xFFC00000, 00000000);
  ------------------
  |  |  195|  2.73k|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  104|  5.78k|    while ((significand & k10MSBits) == 0) {
  ------------------
  |  Branch (104:12): [True: 3.05k, False: 2.73k]
  ------------------
  105|  3.05k|      significand <<= 10;
  106|  3.05k|      exponent -= 10;
  107|  3.05k|    }
  108|  7.14k|    while ((significand & kUint64MSB) == 0) {
  ------------------
  |  Branch (108:12): [True: 4.40k, False: 2.73k]
  ------------------
  109|  4.40k|      significand <<= 1;
  110|  4.40k|      exponent--;
  111|  4.40k|    }
  112|  2.73k|    f_ = significand;
  113|  2.73k|    e_ = exponent;
  114|  2.73k|  }
_ZNK17double_conversion5DiyFp1fEv:
  122|  5.20k|  uint64_t f() const { return f_; }
_ZNK17double_conversion5DiyFp1eEv:
  123|  11.1k|  int32_t e() const { return e_; }
_ZN17double_conversion5DiyFp5set_fEm:
  125|    329|  void set_f(uint64_t new_value) { f_ = new_value; }
_ZN17double_conversion5DiyFp5set_eEi:
  126|     59|  void set_e(int32_t new_value) { e_ = new_value; }

_ZN17double_conversion6Double8InfinityEv:
  236|    912|  static double Infinity() {
  237|    912|    return Double(kInfinity).value();
  238|    912|  }
_ZN17double_conversion6DoubleC2Em:
   56|  1.41k|  explicit Double(uint64_t d64) : d64_(d64) {}
_ZNK17double_conversion6Double5valueEv:
  220|  2.78k|  double value() const { return uint64_to_double(d64_); }
string-to-double.cc:_ZN17double_conversionL16uint64_to_doubleEm:
   37|      4|static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
_ZN17double_conversion6Double3NaNEv:
  240|      2|  static double NaN() {
  241|      2|    return Double(kNaN).value();
  242|      2|  }
_ZN17double_conversion6DoubleC2Ed:
   55|  1.37k|  explicit Double(double d) : d64_(double_to_uint64(d)) {}
_ZN17double_conversion6DoubleC2ENS_5DiyFpE:
   58|  1.36k|    : d64_(DiyFpToUint64(diy_fp)) {}
_ZNK17double_conversion6Double8AsUint64Ev:
   86|  4.97k|  uint64_t AsUint64() const {
   87|  4.97k|    return d64_;
   88|  4.97k|  }
_ZNK17double_conversion6Double10NextDoubleEv:
   91|    500|  double NextDouble() const {
   92|    500|    if (d64_ == kInfinity) return Double(kInfinity).value();
  ------------------
  |  Branch (92:9): [True: 0, False: 500]
  ------------------
   93|    500|    if (Sign() < 0 && Significand() == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 500]
  |  Branch (93:23): [True: 0, False: 0]
  ------------------
   94|       |      // -0.0
   95|      0|      return 0.0;
   96|      0|    }
   97|    500|    if (Sign() < 0) {
  ------------------
  |  Branch (97:9): [True: 0, False: 500]
  ------------------
   98|      0|      return Double(d64_ - 1).value();
   99|    500|    } else {
  100|    500|      return Double(d64_ + 1).value();
  101|    500|    }
  102|    500|  }
_ZNK17double_conversion6Double8ExponentEv:
  114|    773|  int Exponent() const {
  115|    773|    if (IsDenormal()) return kDenormalExponent;
  ------------------
  |  Branch (115:9): [True: 88, False: 685]
  ------------------
  116|       |
  117|    685|    uint64_t d64 = AsUint64();
  118|    685|    int biased_e =
  119|    685|        static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize);
  120|    685|    return biased_e - kExponentBias;
  121|    773|  }
_ZNK17double_conversion6Double11SignificandEv:
  123|    872|  uint64_t Significand() const {
  124|    872|    uint64_t d64 = AsUint64();
  125|    872|    uint64_t significand = d64 & kSignificandMask;
  126|    872|    if (!IsDenormal()) {
  ------------------
  |  Branch (126:9): [True: 784, False: 88]
  ------------------
  127|    784|      return significand + kHiddenBit;
  128|    784|    } else {
  129|     88|      return significand;
  130|     88|    }
  131|    872|  }
_ZNK17double_conversion6Double10IsDenormalEv:
  134|  1.64k|  bool IsDenormal() const {
  135|  1.64k|    uint64_t d64 = AsUint64();
  136|  1.64k|    return (d64 & kExponentMask) == 0;
  137|  1.64k|  }
_ZNK17double_conversion6Double4SignEv:
  175|  1.77k|  int Sign() const {
  176|  1.77k|    uint64_t d64 = AsUint64();
  177|  1.77k|    return (d64 & kSignMask) == 0? 1: -1;
  ------------------
  |  Branch (177:12): [True: 1.77k, False: 0]
  ------------------
  178|  1.77k|  }
_ZNK17double_conversion6Double13UpperBoundaryEv:
  182|    773|  DiyFp UpperBoundary() const {
  183|    773|    DOUBLE_CONVERSION_ASSERT(Sign() > 0);
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (183:5): [True: 773, False: 0]
  ------------------
  184|    773|    return DiyFp(Significand() * 2 + 1, Exponent() - 1);
  185|    773|  }
_ZN17double_conversion6Double34SignificandSizeForOrderOfMagnitudeEi:
  228|  1.36k|  static int SignificandSizeForOrderOfMagnitude(int order) {
  229|  1.36k|    if (order >= (kDenormalExponent + kSignificandSize)) {
  ------------------
  |  Branch (229:9): [True: 1.18k, False: 180]
  ------------------
  230|  1.18k|      return kSignificandSize;
  231|  1.18k|    }
  232|    180|    if (order <= kDenormalExponent) return 0;
  ------------------
  |  Branch (232:9): [True: 39, False: 141]
  ------------------
  233|    141|    return order - kDenormalExponent;
  234|    180|  }
_ZN17double_conversion6Double13DiyFpToUint64ENS_5DiyFpE:
  256|  1.36k|  static uint64_t DiyFpToUint64(DiyFp diy_fp) {
  257|  1.36k|    uint64_t significand = diy_fp.f();
  258|  1.36k|    int exponent = diy_fp.e();
  259|  1.38k|    while (significand > kHiddenBit + kSignificandMask) {
  ------------------
  |  Branch (259:12): [True: 17, False: 1.36k]
  ------------------
  260|     17|      significand >>= 1;
  261|     17|      exponent++;
  262|     17|    }
  263|  1.36k|    if (exponent >= kMaxExponent) {
  ------------------
  |  Branch (263:9): [True: 4, False: 1.36k]
  ------------------
  264|      4|      return kInfinity;
  265|      4|    }
  266|  1.36k|    if (exponent < kDenormalExponent) {
  ------------------
  |  Branch (266:9): [True: 28, False: 1.33k]
  ------------------
  267|     28|      return 0;
  268|     28|    }
  269|  1.33k|    while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) {
  ------------------
  |  Branch (269:12): [True: 1.18k, False: 153]
  |  Branch (269:44): [True: 0, False: 1.18k]
  ------------------
  270|      0|      significand <<= 1;
  271|      0|      exponent--;
  272|      0|    }
  273|  1.33k|    uint64_t biased_exponent;
  274|  1.33k|    if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) {
  ------------------
  |  Branch (274:9): [True: 153, False: 1.18k]
  |  Branch (274:42): [True: 152, False: 1]
  ------------------
  275|    152|      biased_exponent = 0;
  276|  1.18k|    } else {
  277|  1.18k|      biased_exponent = static_cast<uint64_t>(exponent + kExponentBias);
  278|  1.18k|    }
  279|  1.33k|    return (significand & kSignificandMask) |
  280|  1.33k|        (biased_exponent << kPhysicalSignificandSize);
  281|  1.36k|  }
strtod.cc:_ZN17double_conversionL16uint64_to_doubleEm:
   37|  2.77k|static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
strtod.cc:_ZN17double_conversionL16double_to_uint64Ed:
   36|  1.37k|static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }

_ZNK17double_conversion23StringToDoubleConverter14StringToDoubleEPKciPi:
  786|  2.94k|    int* processed_characters_count) const {
  787|  2.94k|  return StringToIeee(buffer, length, true, processed_characters_count);
  788|  2.94k|}
_ZNK17double_conversion23StringToDoubleConverter12StringToIeeeIPKcEEdT_ibPi:
  457|  2.94k|    int* processed_characters_count) const {
  458|  2.94k|  Iterator current = input;
  459|  2.94k|  Iterator end = input + length;
  460|       |
  461|  2.94k|  *processed_characters_count = 0;
  462|       |
  463|  2.94k|  const bool allow_trailing_junk = (flags_ & ALLOW_TRAILING_JUNK) != 0;
  464|  2.94k|  const bool allow_leading_spaces = (flags_ & ALLOW_LEADING_SPACES) != 0;
  465|  2.94k|  const bool allow_trailing_spaces = (flags_ & ALLOW_TRAILING_SPACES) != 0;
  466|  2.94k|  const bool allow_spaces_after_sign = (flags_ & ALLOW_SPACES_AFTER_SIGN) != 0;
  467|  2.94k|  const bool allow_case_insensitivity = (flags_ & ALLOW_CASE_INSENSITIVITY) != 0;
  468|       |
  469|       |  // To make sure that iterator dereferencing is valid the following
  470|       |  // convention is used:
  471|       |  // 1. Each '++current' statement is followed by check for equality to 'end'.
  472|       |  // 2. If AdvanceToNonspace returned false then current == end.
  473|       |  // 3. If 'current' becomes equal to 'end' the function returns or goes to
  474|       |  // 'parsing_done'.
  475|       |  // 4. 'current' is not dereferenced after the 'parsing_done' label.
  476|       |  // 5. Code before 'parsing_done' may rely on 'current != end'.
  477|  2.94k|  if (current == end) return empty_string_value_;
  ------------------
  |  Branch (477:7): [True: 0, False: 2.94k]
  ------------------
  478|       |
  479|  2.94k|  if (allow_leading_spaces || allow_trailing_spaces) {
  ------------------
  |  Branch (479:7): [True: 2.94k, False: 0]
  |  Branch (479:31): [True: 0, False: 0]
  ------------------
  480|  2.94k|    if (!AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (480:9): [True: 14, False: 2.93k]
  ------------------
  481|     14|      *processed_characters_count = static_cast<int>(current - input);
  482|     14|      return empty_string_value_;
  483|     14|    }
  484|  2.93k|    if (!allow_leading_spaces && (input != current)) {
  ------------------
  |  Branch (484:9): [True: 0, False: 2.93k]
  |  Branch (484:34): [True: 0, False: 0]
  ------------------
  485|       |      // No leading spaces allowed, but AdvanceToNonspace moved forward.
  486|      0|      return junk_string_value_;
  487|      0|    }
  488|  2.93k|  }
  489|       |
  490|       |  // Exponent will be adjusted if insignificant digits of the integer part
  491|       |  // or insignificant leading zeros of the fractional part are dropped.
  492|  2.93k|  int exponent = 0;
  493|  2.93k|  int significant_digits = 0;
  494|  2.93k|  int insignificant_digits = 0;
  495|  2.93k|  bool nonzero_digit_dropped = false;
  496|       |
  497|  2.93k|  bool sign = false;
  498|       |
  499|  2.93k|  if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (499:7): [True: 13, False: 2.91k]
  |  Branch (499:26): [True: 129, False: 2.79k]
  ------------------
  500|    142|    sign = (*current == '-');
  501|    142|    ++current;
  502|    142|    Iterator next_non_space = current;
  503|       |    // Skip following spaces (if allowed).
  504|    142|    if (!AdvanceToNonspace(&next_non_space, end)) return junk_string_value_;
  ------------------
  |  Branch (504:9): [True: 16, False: 126]
  ------------------
  505|    126|    if (!allow_spaces_after_sign && (current != next_non_space)) {
  ------------------
  |  Branch (505:9): [True: 0, False: 126]
  |  Branch (505:37): [True: 0, False: 0]
  ------------------
  506|      0|      return junk_string_value_;
  507|      0|    }
  508|    126|    current = next_non_space;
  509|    126|  }
  510|       |
  511|  2.91k|  if (infinity_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
  ------------------
  |  |   39|  2.91k|#define DOUBLE_CONVERSION_NULLPTR nullptr
  ------------------
  |  Branch (511:7): [True: 2.91k, False: 0]
  ------------------
  512|  2.91k|    if (ConsumeFirstCharacter(*current, infinity_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (512:9): [True: 10, False: 2.90k]
  ------------------
  513|     10|      if (!ConsumeSubString(&current, end, infinity_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (513:11): [True: 8, False: 2]
  ------------------
  514|      8|        return junk_string_value_;
  515|      8|      }
  516|       |
  517|      2|      if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (517:13): [True: 2, False: 0]
  |  Branch (517:38): [True: 0, False: 0]
  |  Branch (517:62): [True: 0, False: 0]
  ------------------
  518|      0|        return junk_string_value_;
  519|      0|      }
  520|      2|      if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (520:11): [True: 0, False: 2]
  |  Branch (520:35): [True: 0, False: 0]
  ------------------
  521|      0|        return junk_string_value_;
  522|      0|      }
  523|       |
  524|      2|      *processed_characters_count = static_cast<int>(current - input);
  525|      2|      return sign ? -Double::Infinity() : Double::Infinity();
  ------------------
  |  Branch (525:14): [True: 1, False: 1]
  ------------------
  526|      2|    }
  527|  2.91k|  }
  528|       |
  529|  2.90k|  if (nan_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
  ------------------
  |  |   39|  2.90k|#define DOUBLE_CONVERSION_NULLPTR nullptr
  ------------------
  |  Branch (529:7): [True: 2.90k, False: 0]
  ------------------
  530|  2.90k|    if (ConsumeFirstCharacter(*current, nan_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (530:9): [True: 10, False: 2.89k]
  ------------------
  531|     10|      if (!ConsumeSubString(&current, end, nan_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (531:11): [True: 8, False: 2]
  ------------------
  532|      8|        return junk_string_value_;
  533|      8|      }
  534|       |
  535|      2|      if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (535:13): [True: 2, False: 0]
  |  Branch (535:38): [True: 0, False: 0]
  |  Branch (535:62): [True: 0, False: 0]
  ------------------
  536|      0|        return junk_string_value_;
  537|      0|      }
  538|      2|      if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (538:11): [True: 0, False: 2]
  |  Branch (538:35): [True: 0, False: 0]
  ------------------
  539|      0|        return junk_string_value_;
  540|      0|      }
  541|       |
  542|      2|      *processed_characters_count = static_cast<int>(current - input);
  543|      2|      return sign ? -Double::NaN() : Double::NaN();
  ------------------
  |  Branch (543:14): [True: 1, False: 1]
  ------------------
  544|      2|    }
  545|  2.90k|  }
  546|       |
  547|  2.89k|  bool leading_zero = false;
  548|  2.89k|  if (*current == '0') {
  ------------------
  |  Branch (548:7): [True: 936, False: 1.96k]
  ------------------
  549|    936|    if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (549:9): [True: 2, False: 934]
  ------------------
  550|      2|      *processed_characters_count = static_cast<int>(current - input);
  551|      2|      return SignedZero(sign);
  552|      2|    }
  553|       |
  554|    934|    leading_zero = true;
  555|       |
  556|       |    // It could be hexadecimal value.
  557|    934|    if (((flags_ & ALLOW_HEX) || (flags_ & ALLOW_HEX_FLOATS)) &&
  ------------------
  |  Branch (557:10): [True: 934, False: 0]
  |  Branch (557:34): [True: 0, False: 0]
  ------------------
  558|    934|        (*current == 'x' || *current == 'X')) {
  ------------------
  |  Branch (558:10): [True: 253, False: 681]
  |  Branch (558:29): [True: 393, False: 288]
  ------------------
  559|    646|      ++current;
  560|       |
  561|    646|      if (current == end) return junk_string_value_;  // "0x"
  ------------------
  |  Branch (561:11): [True: 2, False: 644]
  ------------------
  562|       |
  563|    644|      bool parse_as_hex_float = (flags_ & ALLOW_HEX_FLOATS) &&
  ------------------
  |  Branch (563:33): [True: 644, False: 0]
  ------------------
  564|    644|                IsHexFloatString(current, end, separator_, allow_trailing_junk);
  ------------------
  |  Branch (564:17): [True: 222, False: 422]
  ------------------
  565|       |
  566|    644|      if (!parse_as_hex_float && !isDigit(*current, 16)) {
  ------------------
  |  Branch (566:11): [True: 422, False: 222]
  |  Branch (566:34): [True: 90, False: 332]
  ------------------
  567|     90|        return junk_string_value_;
  568|     90|      }
  569|       |
  570|    554|      bool result_is_junk;
  571|    554|      double result = RadixStringToIeee<4>(&current,
  572|    554|                                           end,
  573|    554|                                           sign,
  574|    554|                                           separator_,
  575|    554|                                           parse_as_hex_float,
  576|    554|                                           allow_trailing_junk,
  577|    554|                                           junk_string_value_,
  578|    554|                                           read_as_double,
  579|    554|                                           &result_is_junk);
  580|    554|      if (!result_is_junk) {
  ------------------
  |  Branch (580:11): [True: 554, False: 0]
  ------------------
  581|    554|        if (allow_trailing_spaces) AdvanceToNonspace(&current, end);
  ------------------
  |  Branch (581:13): [True: 554, False: 0]
  ------------------
  582|    554|        *processed_characters_count = static_cast<int>(current - input);
  583|    554|      }
  584|    554|      return result;
  585|    644|    }
  586|       |
  587|       |    // Ignore leading zeros in the integer part.
  588|    668|    while (*current == '0') {
  ------------------
  |  Branch (588:12): [True: 388, False: 280]
  ------------------
  589|    388|      if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (589:11): [True: 8, False: 380]
  ------------------
  590|      8|        *processed_characters_count = static_cast<int>(current - input);
  591|      8|        return SignedZero(sign);
  592|      8|      }
  593|    388|    }
  594|    288|  }
  595|       |
  596|  2.24k|  bool octal = leading_zero && (flags_ & ALLOW_OCTALS) != 0;
  ------------------
  |  Branch (596:16): [True: 280, False: 1.96k]
  |  Branch (596:32): [True: 280, False: 0]
  ------------------
  597|       |
  598|       |  // The longest form of simplified number is: "-<significant digits>.1eXXX\0".
  599|  2.24k|  const int kBufferSize = kMaxSignificantDigits + 10;
  600|  2.24k|  DOUBLE_CONVERSION_STACK_UNINITIALIZED char
  ------------------
  |  |  104|  2.24k|#define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
  ------------------
  601|  2.24k|      buffer[kBufferSize];  // NOLINT: size is known at compile time.
  602|  2.24k|  int buffer_pos = 0;
  603|       |
  604|       |  // Copy significant digits of the integer part (if any) to the buffer.
  605|  73.9k|  while (*current >= '0' && *current <= '9') {
  ------------------
  |  Branch (605:10): [True: 73.5k, False: 475]
  |  Branch (605:29): [True: 72.5k, False: 991]
  ------------------
  606|  72.5k|    if (significant_digits < kMaxSignificantDigits) {
  ------------------
  |  Branch (606:9): [True: 72.1k, False: 399]
  ------------------
  607|  72.1k|      DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  72.1k|    assert(condition)
  ------------------
  |  Branch (607:7): [True: 72.1k, False: 0]
  ------------------
  608|  72.1k|      buffer[buffer_pos++] = static_cast<char>(*current);
  609|  72.1k|      significant_digits++;
  610|       |      // Will later check if it's an octal in the buffer.
  611|  72.1k|    } else {
  612|    399|      insignificant_digits++;  // Move the digit into the exponential part.
  613|    399|      nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
  ------------------
  |  Branch (613:31): [True: 194, False: 205]
  |  Branch (613:56): [True: 14, False: 191]
  ------------------
  614|    399|    }
  615|  72.5k|    octal = octal && *current < '8';
  ------------------
  |  Branch (615:13): [True: 6.38k, False: 66.1k]
  |  Branch (615:22): [True: 6.38k, False: 2]
  ------------------
  616|  72.5k|    if (Advance(&current, separator_, 10, end)) goto parsing_done;
  ------------------
  |  Branch (616:9): [True: 774, False: 71.7k]
  ------------------
  617|  72.5k|  }
  618|       |
  619|  1.46k|  if (significant_digits == 0) {
  ------------------
  |  Branch (619:7): [True: 275, False: 1.19k]
  ------------------
  620|    275|    octal = false;
  621|    275|  }
  622|       |
  623|  1.46k|  if (*current == '.') {
  ------------------
  |  Branch (623:7): [True: 374, False: 1.09k]
  ------------------
  624|    374|    if (octal && !allow_trailing_junk) return junk_string_value_;
  ------------------
  |  Branch (624:9): [True: 1, False: 373]
  |  Branch (624:18): [True: 0, False: 1]
  ------------------
  625|    374|    if (octal) goto parsing_done;
  ------------------
  |  Branch (625:9): [True: 1, False: 373]
  ------------------
  626|       |
  627|    373|    if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (627:9): [True: 3, False: 370]
  ------------------
  628|      3|      if (significant_digits == 0 && !leading_zero) {
  ------------------
  |  Branch (628:11): [True: 2, False: 1]
  |  Branch (628:38): [True: 1, False: 1]
  ------------------
  629|      1|        return junk_string_value_;
  630|      2|      } else {
  631|      2|        goto parsing_done;
  632|      2|      }
  633|      3|    }
  634|       |
  635|    370|    if (significant_digits == 0) {
  ------------------
  |  Branch (635:9): [True: 140, False: 230]
  ------------------
  636|       |      // octal = false;
  637|       |      // Integer part consists of 0 or is absent. Significant digits start after
  638|       |      // leading zeros (if any).
  639|  2.19M|      while (*current == '0') {
  ------------------
  |  Branch (639:14): [True: 2.19M, False: 127]
  ------------------
  640|  2.19M|        if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (640:13): [True: 13, False: 2.19M]
  ------------------
  641|     13|          *processed_characters_count = static_cast<int>(current - input);
  642|     13|          return SignedZero(sign);
  643|     13|        }
  644|  2.19M|        exponent--;  // Move this 0 into the exponent.
  645|  2.19M|      }
  646|    140|    }
  647|       |
  648|       |    // There is a fractional part.
  649|       |    // We don't emit a '.', but adjust the exponent instead.
  650|   265k|    while (*current >= '0' && *current <= '9') {
  ------------------
  |  Branch (650:12): [True: 265k, False: 28]
  |  Branch (650:31): [True: 265k, False: 71]
  ------------------
  651|   265k|      if (significant_digits < kMaxSignificantDigits) {
  ------------------
  |  Branch (651:11): [True: 66.2k, False: 199k]
  ------------------
  652|  66.2k|        DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  66.2k|    assert(condition)
  ------------------
  |  Branch (652:9): [True: 66.2k, False: 0]
  ------------------
  653|  66.2k|        buffer[buffer_pos++] = static_cast<char>(*current);
  654|  66.2k|        significant_digits++;
  655|  66.2k|        exponent--;
  656|   199k|      } else {
  657|       |        // Ignore insignificant digits in the fractional part.
  658|   199k|        nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
  ------------------
  |  Branch (658:33): [True: 195, False: 198k]
  |  Branch (658:58): [True: 13, False: 198k]
  ------------------
  659|   199k|      }
  660|   265k|      if (Advance(&current, separator_, 10, end)) goto parsing_done;
  ------------------
  |  Branch (660:11): [True: 258, False: 265k]
  ------------------
  661|   265k|    }
  662|    357|  }
  663|       |
  664|  1.19k|  if (!leading_zero && exponent == 0 && significant_digits == 0) {
  ------------------
  |  Branch (664:7): [True: 1.12k, False: 63]
  |  Branch (664:24): [True: 1.05k, False: 77]
  |  Branch (664:41): [True: 92, False: 959]
  ------------------
  665|       |    // If leading_zeros is true then the string contains zeros.
  666|       |    // If exponent < 0 then string was [+-]\.0*...
  667|       |    // If significant_digits != 0 the string is not equal to 0.
  668|       |    // Otherwise there are no digits in the string.
  669|     92|    return junk_string_value_;
  670|     92|  }
  671|       |
  672|       |  // Parse exponential part.
  673|  1.09k|  if (*current == 'e' || *current == 'E') {
  ------------------
  |  Branch (673:7): [True: 503, False: 596]
  |  Branch (673:26): [True: 502, False: 94]
  ------------------
  674|  1.00k|    if (octal && !allow_trailing_junk) return junk_string_value_;
  ------------------
  |  Branch (674:9): [True: 1, False: 1.00k]
  |  Branch (674:18): [True: 0, False: 1]
  ------------------
  675|  1.00k|    if (octal) goto parsing_done;
  ------------------
  |  Branch (675:9): [True: 1, False: 1.00k]
  ------------------
  676|  1.00k|    Iterator junk_begin = current;
  677|  1.00k|    ++current;
  678|  1.00k|    if (current == end) {
  ------------------
  |  Branch (678:9): [True: 3, False: 1.00k]
  ------------------
  679|      3|      if (allow_trailing_junk) {
  ------------------
  |  Branch (679:11): [True: 3, False: 0]
  ------------------
  680|      3|        current = junk_begin;
  681|      3|        goto parsing_done;
  682|      3|      } else {
  683|      0|        return junk_string_value_;
  684|      0|      }
  685|      3|    }
  686|  1.00k|    char exponen_sign = '+';
  687|  1.00k|    if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (687:9): [True: 1, False: 1.00k]
  |  Branch (687:28): [True: 362, False: 638]
  ------------------
  688|    363|      exponen_sign = static_cast<char>(*current);
  689|    363|      ++current;
  690|    363|      if (current == end) {
  ------------------
  |  Branch (690:11): [True: 2, False: 361]
  ------------------
  691|      2|        if (allow_trailing_junk) {
  ------------------
  |  Branch (691:13): [True: 2, False: 0]
  ------------------
  692|      2|          current = junk_begin;
  693|      2|          goto parsing_done;
  694|      2|        } else {
  695|      0|          return junk_string_value_;
  696|      0|        }
  697|      2|      }
  698|    363|    }
  699|       |
  700|    999|    if (current == end || *current < '0' || *current > '9') {
  ------------------
  |  Branch (700:9): [True: 0, False: 999]
  |  Branch (700:27): [True: 17, False: 982]
  |  Branch (700:45): [True: 6, False: 976]
  ------------------
  701|     23|      if (allow_trailing_junk) {
  ------------------
  |  Branch (701:11): [True: 23, False: 0]
  ------------------
  702|     23|        current = junk_begin;
  703|     23|        goto parsing_done;
  704|     23|      } else {
  705|      0|        return junk_string_value_;
  706|      0|      }
  707|     23|    }
  708|       |
  709|    976|    const int max_exponent = INT_MAX / 2;
  710|    976|    DOUBLE_CONVERSION_ASSERT(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
  ------------------
  |  |   47|    976|    assert(condition)
  ------------------
  |  Branch (710:5): [True: 976, False: 0]
  |  Branch (710:5): [True: 976, False: 0]
  |  Branch (710:5): [True: 976, False: 0]
  ------------------
  711|    976|    int num = 0;
  712|  3.69k|    do {
  713|       |      // Check overflow.
  714|  3.69k|      int digit = *current - '0';
  715|  3.69k|      if (num >= max_exponent / 10
  ------------------
  |  Branch (715:11): [True: 378, False: 3.31k]
  ------------------
  716|    378|          && !(num == max_exponent / 10 && digit <= max_exponent % 10)) {
  ------------------
  |  Branch (716:16): [True: 7, False: 371]
  |  Branch (716:44): [True: 3, False: 4]
  ------------------
  717|    375|        num = max_exponent;
  718|  3.31k|      } else {
  719|  3.31k|        num = num * 10 + digit;
  720|  3.31k|      }
  721|  3.69k|      ++current;
  722|  3.69k|    } while (current != end && *current >= '0' && *current <= '9');
  ------------------
  |  Branch (722:14): [True: 2.73k, False: 960]
  |  Branch (722:32): [True: 2.72k, False: 8]
  |  Branch (722:51): [True: 2.71k, False: 8]
  ------------------
  723|       |
  724|    976|    exponent += (exponen_sign == '-' ? -num : num);
  ------------------
  |  Branch (724:18): [True: 361, False: 615]
  ------------------
  725|    976|  }
  726|       |
  727|  1.07k|  if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (727:9): [True: 1.07k, False: 0]
  |  Branch (727:34): [True: 0, False: 0]
  |  Branch (727:58): [True: 0, False: 0]
  ------------------
  728|      0|    return junk_string_value_;
  729|      0|  }
  730|  1.07k|  if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (730:7): [True: 0, False: 1.07k]
  |  Branch (730:31): [True: 0, False: 0]
  ------------------
  731|      0|    return junk_string_value_;
  732|      0|  }
  733|  1.07k|  if (allow_trailing_spaces) {
  ------------------
  |  Branch (733:7): [True: 1.07k, False: 0]
  ------------------
  734|  1.07k|    AdvanceToNonspace(&current, end);
  735|  1.07k|  }
  736|       |
  737|  2.13k|  parsing_done:
  738|  2.13k|  exponent += insignificant_digits;
  739|       |
  740|  2.13k|  if (octal) {
  ------------------
  |  Branch (740:7): [True: 215, False: 1.91k]
  ------------------
  741|    215|    double result;
  742|    215|    bool result_is_junk;
  743|    215|    char* start = buffer;
  744|    215|    result = RadixStringToIeee<3>(&start,
  745|    215|                                  buffer + buffer_pos,
  746|    215|                                  sign,
  747|    215|                                  separator_,
  748|    215|                                  false, // Don't parse as hex_float.
  749|    215|                                  allow_trailing_junk,
  750|    215|                                  junk_string_value_,
  751|    215|                                  read_as_double,
  752|    215|                                  &result_is_junk);
  753|    215|    DOUBLE_CONVERSION_ASSERT(!result_is_junk);
  ------------------
  |  |   47|    215|    assert(condition)
  ------------------
  |  Branch (753:5): [True: 215, False: 0]
  ------------------
  754|    215|    *processed_characters_count = static_cast<int>(current - input);
  755|    215|    return result;
  756|    215|  }
  757|       |
  758|  1.91k|  if (nonzero_digit_dropped) {
  ------------------
  |  Branch (758:7): [True: 27, False: 1.89k]
  ------------------
  759|     27|    buffer[buffer_pos++] = '1';
  760|     27|    exponent--;
  761|     27|  }
  762|       |
  763|  1.91k|  DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  1.91k|    assert(condition)
  ------------------
  |  Branch (763:3): [True: 1.91k, False: 0]
  ------------------
  764|  1.91k|  buffer[buffer_pos] = '\0';
  765|       |
  766|       |  // Code above ensures there are no leading zeros and the buffer has fewer than
  767|       |  // kMaxSignificantDecimalDigits characters. Trim trailing zeros.
  768|  1.91k|  Vector<const char> chars(buffer, buffer_pos);
  769|  1.91k|  chars = TrimTrailingZeros(chars);
  770|  1.91k|  exponent += buffer_pos - chars.length();
  771|       |
  772|  1.91k|  double converted;
  773|  1.91k|  if (read_as_double) {
  ------------------
  |  Branch (773:7): [True: 1.91k, False: 0]
  ------------------
  774|  1.91k|    converted = StrtodTrimmed(chars, exponent);
  775|  1.91k|  } else {
  776|      0|    converted = StrtofTrimmed(chars, exponent);
  777|      0|  }
  778|  1.91k|  *processed_characters_count = static_cast<int>(current - input);
  779|  1.91k|  return sign? -converted: converted;
  ------------------
  |  Branch (779:10): [True: 2, False: 1.91k]
  ------------------
  780|  1.91k|}
string-to-double.cc:_ZN17double_conversionL17AdvanceToNonspaceIPKcEEbPT_S3_:
  155|  4.71k|static inline bool AdvanceToNonspace(Iterator* current, Iterator end) {
  156|  6.41k|  while (*current != end) {
  ------------------
  |  Branch (156:10): [True: 4.98k, False: 1.43k]
  ------------------
  157|  4.98k|    if (!isWhitespace(**current)) return true;
  ------------------
  |  Branch (157:9): [True: 3.27k, False: 1.70k]
  ------------------
  158|  1.70k|    ++*current;
  159|  1.70k|  }
  160|  1.43k|  return false;
  161|  4.71k|}
string-to-double.cc:_ZN17double_conversionL12isWhitespaceEi:
  139|  4.98k|static bool isWhitespace(int x) {
  140|  4.98k|  if (x < 128) {
  ------------------
  |  Branch (140:7): [True: 4.98k, False: 0]
  ------------------
  141|  29.0k|    for (int i = 0; i < kWhitespaceTable7Length; i++) {
  ------------------
  |  Branch (141:21): [True: 25.7k, False: 3.27k]
  ------------------
  142|  25.7k|      if (kWhitespaceTable7[i] == x) return true;
  ------------------
  |  Branch (142:11): [True: 1.70k, False: 24.0k]
  ------------------
  143|  25.7k|    }
  144|  4.98k|  } else {
  145|      0|    for (int i = 0; i < kWhitespaceTable16Length; i++) {
  ------------------
  |  Branch (145:21): [True: 0, False: 0]
  ------------------
  146|      0|      if (kWhitespaceTable16[i] == x) return true;
  ------------------
  |  Branch (146:11): [True: 0, False: 0]
  ------------------
  147|      0|    }
  148|      0|  }
  149|  3.27k|  return false;
  150|  4.98k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_121ConsumeFirstCharacterIcEEbT_PKcb:
  111|  5.82k|                                         bool case_insensitivity) {
  112|  5.82k|  const uint32_t c = CodeUnit(ch);
  113|  5.82k|  const uint32_t first = CodeUnit(str[0]);
  114|  5.82k|  return case_insensitivity ? ToLower(c) == first : c == first;
  ------------------
  |  Branch (114:10): [True: 5.82k, False: 0]
  ------------------
  115|  5.82k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_18CodeUnitEc:
   57|  11.7k|inline uint32_t CodeUnit(char ch) {
   58|  11.7k|  return static_cast<unsigned char>(ch);
   59|  11.7k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_17ToLowerEj:
   65|  5.86k|inline uint32_t ToLower(uint32_t ch) {
   66|  5.86k|  if (ch > 0x7F) return ch;
  ------------------
  |  Branch (66:7): [True: 59, False: 5.80k]
  ------------------
   67|  5.80k|  static const std::ctype<char>& cType =
   68|  5.80k|      std::use_facet<std::ctype<char> >(std::locale::classic());
   69|  5.80k|  return static_cast<unsigned char>(cType.tolower(static_cast<char>(ch)));
   70|  5.86k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_116ConsumeSubStringIPKcEEbPT_S4_S3_b:
   99|     20|                             bool allow_case_insensitivity) {
  100|     20|  if (allow_case_insensitivity) {
  ------------------
  |  Branch (100:7): [True: 20, False: 0]
  ------------------
  101|     20|    return ConsumeSubStringImpl(current, end, substring, ToLower);
  102|     20|  } else {
  103|      0|    return ConsumeSubStringImpl(current, end, substring, Pass);
  104|      0|  }
  105|     20|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_120ConsumeSubStringImplIPKcPFjjEEEbPT_S6_S3_T0_:
   80|     20|                                        Converter converter) {
   81|     20|  DOUBLE_CONVERSION_ASSERT(converter(CodeUnit(**current)) == CodeUnit(*substring));
  ------------------
  |  |   47|     20|    assert(condition)
  ------------------
  |  Branch (81:3): [True: 20, False: 0]
  ------------------
   82|     31|  for (substring++; *substring != '\0'; substring++) {
  ------------------
  |  Branch (82:21): [True: 27, False: 4]
  ------------------
   83|     27|    ++*current;
   84|     27|    if (*current == end ||
  ------------------
  |  Branch (84:9): [True: 6, False: 21]
  ------------------
   85|     21|        converter(CodeUnit(**current)) != CodeUnit(*substring)) {
  ------------------
  |  Branch (85:9): [True: 10, False: 11]
  ------------------
   86|     16|      return false;
   87|     16|    }
   88|     27|  }
   89|      4|  ++*current;
   90|      4|  return true;
   91|     20|}
string-to-double.cc:_ZN17double_conversionL7AdvanceIPKcEEbPT_tiRS3_:
  206|  8.75M|static bool Advance (Iterator* it, uc16 separator, int base, Iterator& end) {
  207|  8.75M|  if (separator == StringToDoubleConverter::kNoSeparator) {
  ------------------
  |  Branch (207:7): [True: 8.75M, False: 0]
  ------------------
  208|  8.75M|    ++(*it);
  209|  8.75M|    return *it == end;
  210|  8.75M|  }
  211|      0|  if (!isDigit(**it, base)) {
  ------------------
  |  Branch (211:7): [True: 0, False: 0]
  ------------------
  212|      0|    ++(*it);
  213|      0|    return *it == end;
  214|      0|  }
  215|      0|  ++(*it);
  216|      0|  if (*it == end) return true;
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|  if (*it + 1 == end) return false;
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|  if (**it == separator && isDigit(*(*it + 1), base)) {
  ------------------
  |  Branch (218:7): [True: 0, False: 0]
  |  Branch (218:28): [True: 0, False: 0]
  ------------------
  219|      0|    ++(*it);
  220|      0|  }
  221|      0|  return *it == end;
  222|      0|}
string-to-double.cc:_ZN17double_conversionL10SignedZeroEb:
  171|     31|static double SignedZero(bool sign) {
  172|     31|  return sign ? -0.0 : 0.0;
  ------------------
  |  Branch (172:10): [True: 0, False: 31]
  ------------------
  173|     31|}
string-to-double.cc:_ZN17double_conversionL16IsHexFloatStringIPKcEEbT_S3_tb:
  235|    866|                             bool allow_trailing_junk) {
  236|    866|  DOUBLE_CONVERSION_ASSERT(start != end);
  ------------------
  |  |   47|    866|    assert(condition)
  ------------------
  |  Branch (236:3): [True: 866, False: 0]
  ------------------
  237|       |
  238|    866|  Iterator current = start;
  239|       |
  240|    866|  bool saw_digit = false;
  241|  1.62M|  while (isDigit(*current, 16)) {
  ------------------
  |  Branch (241:10): [True: 1.62M, False: 654]
  ------------------
  242|  1.62M|    saw_digit = true;
  243|  1.62M|    if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (243:9): [True: 212, False: 1.62M]
  ------------------
  244|  1.62M|  }
  245|    654|  if (*current == '.') {
  ------------------
  |  Branch (245:7): [True: 133, False: 521]
  ------------------
  246|    133|    if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (246:9): [True: 5, False: 128]
  ------------------
  247|  2.39M|    while (isDigit(*current, 16)) {
  ------------------
  |  Branch (247:12): [True: 2.39M, False: 110]
  ------------------
  248|  2.39M|      saw_digit = true;
  249|  2.39M|      if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (249:11): [True: 18, False: 2.39M]
  ------------------
  250|  2.39M|    }
  251|    128|  }
  252|    631|  if (!saw_digit) return false;
  ------------------
  |  Branch (252:7): [True: 68, False: 563]
  ------------------
  253|    563|  if (*current != 'p' && *current != 'P') return false;
  ------------------
  |  Branch (253:7): [True: 250, False: 313]
  |  Branch (253:26): [True: 97, False: 153]
  ------------------
  254|       |  // The separator is only allowed between significand digits, not in the
  255|       |  // exponent, so advance through the exponent with no separator.
  256|    466|  const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  257|    466|  if (Advance(&current, kNoSeparator, 16, end)) return false;
  ------------------
  |  Branch (257:7): [True: 4, False: 462]
  ------------------
  258|    462|  if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (258:7): [True: 4, False: 458]
  |  Branch (258:26): [True: 65, False: 393]
  ------------------
  259|     69|    if (Advance(&current, kNoSeparator, 16, end)) return false;
  ------------------
  |  Branch (259:9): [True: 2, False: 67]
  ------------------
  260|     69|  }
  261|    460|  if (!isDigit(*current, 10)) return false;
  ------------------
  |  Branch (261:7): [True: 16, False: 444]
  ------------------
  262|    444|  if (Advance(&current, kNoSeparator, 16, end)) return true;
  ------------------
  |  Branch (262:7): [True: 218, False: 226]
  ------------------
  263|  2.04k|  while (isDigit(*current, 10)) {
  ------------------
  |  Branch (263:10): [True: 2.01k, False: 36]
  ------------------
  264|  2.01k|    if (Advance(&current, kNoSeparator, 16, end)) return true;
  ------------------
  |  Branch (264:9): [True: 190, False: 1.82k]
  ------------------
  265|  2.01k|  }
  266|     36|  return allow_trailing_junk || !AdvanceToNonspace(&current, end);
  ------------------
  |  Branch (266:10): [True: 36, False: 0]
  |  Branch (266:33): [True: 0, False: 0]
  ------------------
  267|    226|}
string-to-double.cc:_ZN17double_conversionL7isDigitEii:
  164|  5.11M|static bool isDigit(int x, int radix) {
  165|  5.11M|  return (x >= '0' && x <= '9' && x < '0' + radix)
  ------------------
  |  Branch (165:11): [True: 5.11M, False: 350]
  |  Branch (165:23): [True: 4.91M, False: 196k]
  |  Branch (165:35): [True: 4.91M, False: 0]
  ------------------
  166|   196k|      || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
  ------------------
  |  Branch (166:11): [True: 196k, False: 52]
  |  Branch (166:25): [True: 192k, False: 4.06k]
  |  Branch (166:37): [True: 192k, False: 366]
  ------------------
  167|  4.48k|      || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
  ------------------
  |  Branch (167:11): [True: 4.43k, False: 52]
  |  Branch (167:25): [True: 4.09k, False: 342]
  |  Branch (167:37): [True: 3.52k, False: 571]
  ------------------
  168|  5.11M|}
string-to-double.cc:_ZN17double_conversionL17RadixStringToIeeeILi4EPKcEEdPT0_S3_btbbdbPb:
  283|    554|                                bool* result_is_junk) {
  284|    554|  DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    554|    assert(condition)
  ------------------
  |  Branch (284:3): [True: 554, False: 0]
  ------------------
  285|    554|  DOUBLE_CONVERSION_ASSERT(!parse_as_hex_float ||
  ------------------
  |  |   47|    554|    assert(condition)
  ------------------
  |  Branch (285:3): [True: 332, False: 222]
  |  Branch (285:3): [True: 222, False: 0]
  |  Branch (285:3): [True: 554, False: 0]
  ------------------
  286|    554|      IsHexFloatString(*current, end, separator, allow_trailing_junk));
  287|       |
  288|    554|  const int kDoubleSize = Double::kSignificandSize;
  289|    554|  const int kSingleSize = Single::kSignificandSize;
  290|    554|  const int kSignificandSize = read_as_double? kDoubleSize: kSingleSize;
  ------------------
  |  Branch (290:32): [True: 554, False: 0]
  ------------------
  291|       |
  292|    554|  *result_is_junk = true;
  293|       |
  294|    554|  int64_t number = 0;
  295|    554|  int exponent = 0;
  296|    554|  const int radix = (1 << radix_log_2);
  297|       |  // Whether we have encountered a '.' and are parsing the decimal digits.
  298|       |  // Only relevant if parse_as_hex_float is true.
  299|    554|  bool post_decimal = false;
  300|       |
  301|       |  // Skip leading 0s.
  302|    987|  while (**current == '0') {
  ------------------
  |  Branch (302:10): [True: 441, False: 546]
  ------------------
  303|    441|    if (Advance(current, separator, radix, end)) {
  ------------------
  |  Branch (303:9): [True: 8, False: 433]
  ------------------
  304|      8|      *result_is_junk = false;
  305|      8|      return SignedZero(sign);
  306|      8|    }
  307|    441|  }
  308|       |
  309|  1.10M|  while (true) {
  ------------------
  |  Branch (309:10): [True: 1.10M, Folded]
  ------------------
  310|  1.10M|    int digit;
  311|  1.10M|    if (IsDecimalDigitForRadix(**current, radix)) {
  ------------------
  |  Branch (311:9): [True: 1.10M, False: 2.30k]
  ------------------
  312|  1.10M|      digit = static_cast<char>(**current) - '0';
  313|  1.10M|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (313:11): [True: 1.10M, False: 1.21k]
  ------------------
  314|  1.10M|    } else if (IsCharacterDigitForRadix(**current, radix, 'a')) {
  ------------------
  |  Branch (314:16): [True: 908, False: 1.39k]
  ------------------
  315|    908|      digit = static_cast<char>(**current) - 'a' + 10;
  316|    908|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (316:11): [True: 51, False: 857]
  ------------------
  317|  1.39k|    } else if (IsCharacterDigitForRadix(**current, radix, 'A')) {
  ------------------
  |  Branch (317:16): [True: 1.07k, False: 319]
  ------------------
  318|  1.07k|      digit = static_cast<char>(**current) - 'A' + 10;
  319|  1.07k|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (319:11): [True: 100, False: 979]
  ------------------
  320|  1.07k|    } else if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (320:16): [True: 227, False: 92]
  |  Branch (320:38): [True: 36, False: 191]
  ------------------
  321|     36|      post_decimal = true;
  322|     36|      Advance(current, separator, radix, end);
  323|     36|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|     36|    assert(condition)
  ------------------
  |  Branch (323:7): [True: 36, False: 0]
  ------------------
  324|     36|      continue;
  325|    283|    } else if (parse_as_hex_float && (**current == 'p' || **current == 'P')) {
  ------------------
  |  Branch (325:16): [True: 191, False: 92]
  |  Branch (325:39): [True: 133, False: 58]
  |  Branch (325:59): [True: 58, False: 0]
  ------------------
  326|    191|      break;
  327|    191|    } else {
  328|     92|      if (allow_trailing_junk || !AdvanceToNonspace(current, end)) {
  ------------------
  |  Branch (328:11): [True: 92, False: 0]
  |  Branch (328:34): [True: 0, False: 0]
  ------------------
  329|     92|        break;
  330|     92|      } else {
  331|      0|        return junk_string_value;
  332|      0|      }
  333|     92|    }
  334|       |
  335|  1.10M|    number = number * radix + digit;
  336|  1.10M|    int overflow = static_cast<int>(number >> kSignificandSize);
  337|  1.10M|    if (overflow != 0) {
  ------------------
  |  Branch (337:9): [True: 138, False: 1.10M]
  ------------------
  338|       |      // Overflow occurred. Need to determine which direction to round the
  339|       |      // result.
  340|    138|      int overflow_bits_count = 1;
  341|    396|      while (overflow > 1) {
  ------------------
  |  Branch (341:14): [True: 258, False: 138]
  ------------------
  342|    258|        overflow_bits_count++;
  343|    258|        overflow >>= 1;
  344|    258|      }
  345|       |
  346|    138|      int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
  347|    138|      int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
  348|    138|      number >>= overflow_bits_count;
  349|    138|      exponent += overflow_bits_count;
  350|       |
  351|    138|      bool zero_tail = true;
  352|  1.09M|      for (;;) {
  353|  1.09M|        if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (353:13): [True: 79, False: 1.09M]
  ------------------
  354|  1.09M|        if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (354:13): [True: 525k, False: 567k]
  |  Branch (354:35): [True: 2, False: 525k]
  ------------------
  355|       |          // Just run over the '.'. We are just trying to see whether there is
  356|       |          // a non-zero digit somewhere.
  357|      2|          Advance(current, separator, radix, end);
  358|      2|          DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      2|    assert(condition)
  ------------------
  |  Branch (358:11): [True: 2, False: 0]
  ------------------
  359|      2|          post_decimal = true;
  360|      2|        }
  361|  1.09M|        if (!isDigit(**current, radix)) break;
  ------------------
  |  Branch (361:13): [True: 59, False: 1.09M]
  ------------------
  362|  1.09M|        zero_tail = zero_tail && **current == '0';
  ------------------
  |  Branch (362:21): [True: 183k, False: 909k]
  |  Branch (362:34): [True: 183k, False: 90]
  ------------------
  363|  1.09M|        if (!post_decimal) {
  ------------------
  |  Branch (363:13): [True: 1.09M, False: 345]
  ------------------
  364|  1.09M|          if (exponent <= INT_MAX - radix_log_2) {
  ------------------
  |  Branch (364:15): [True: 1.09M, False: 0]
  ------------------
  365|  1.09M|            exponent += radix_log_2;
  366|  1.09M|          } else {
  367|      0|            exponent = INT_MAX;
  368|      0|          }
  369|  1.09M|        }
  370|  1.09M|      }
  371|       |
  372|    138|      if (!parse_as_hex_float &&
  ------------------
  |  Branch (372:11): [True: 107, False: 31]
  ------------------
  373|    107|          !allow_trailing_junk &&
  ------------------
  |  Branch (373:11): [True: 0, False: 107]
  ------------------
  374|      0|          AdvanceToNonspace(current, end)) {
  ------------------
  |  Branch (374:11): [True: 0, False: 0]
  ------------------
  375|      0|        return junk_string_value;
  376|      0|      }
  377|       |
  378|    138|      int middle_value = (1 << (overflow_bits_count - 1));
  379|    138|      if (dropped_bits > middle_value) {
  ------------------
  |  Branch (379:11): [True: 41, False: 97]
  ------------------
  380|     41|        number++;  // Rounding up.
  381|     97|      } else if (dropped_bits == middle_value) {
  ------------------
  |  Branch (381:18): [True: 20, False: 77]
  ------------------
  382|       |        // Rounding to even to consistency with decimals: half-way case rounds
  383|       |        // up if significant part is odd and down otherwise.
  384|     20|        if ((number & 1) != 0 || !zero_tail) {
  ------------------
  |  Branch (384:13): [True: 12, False: 8]
  |  Branch (384:34): [True: 5, False: 3]
  ------------------
  385|     17|          number++;  // Rounding up.
  386|     17|        }
  387|     20|      }
  388|       |
  389|       |      // Rounding up may cause overflow.
  390|    138|      if ((number & ((int64_t)1 << kSignificandSize)) != 0) {
  ------------------
  |  Branch (390:11): [True: 4, False: 134]
  ------------------
  391|      4|        exponent++;
  392|      4|        number >>= 1;
  393|      4|      }
  394|    138|      break;
  395|    138|    }
  396|  1.10M|    if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (396:9): [True: 125, False: 1.10M]
  ------------------
  397|  1.10M|  }
  398|       |
  399|    546|  DOUBLE_CONVERSION_ASSERT(number < ((int64_t)1 << kSignificandSize));
  ------------------
  |  |   47|    546|    assert(condition)
  ------------------
  |  Branch (399:3): [True: 546, False: 0]
  ------------------
  400|    546|  DOUBLE_CONVERSION_ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
  ------------------
  |  |   47|    546|    assert(condition)
  ------------------
  |  Branch (400:3): [True: 546, False: 0]
  ------------------
  401|       |
  402|    546|  *result_is_junk = false;
  403|       |
  404|    546|  if (parse_as_hex_float) {
  ------------------
  |  Branch (404:7): [True: 222, False: 324]
  ------------------
  405|    222|    DOUBLE_CONVERSION_ASSERT(**current == 'p' || **current == 'P');
  ------------------
  |  |   47|    222|    assert(condition)
  ------------------
  |  Branch (405:5): [True: 148, False: 74]
  |  Branch (405:5): [True: 74, False: 0]
  |  Branch (405:5): [True: 222, False: 0]
  ------------------
  406|       |    // The separator is only allowed between significand digits, not in the
  407|       |    // exponent, so advance through the exponent with no separator. This must
  408|       |    // match IsHexFloatString, which validated the string the same way.
  409|    222|    const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  410|    222|    Advance(current, kNoSeparator, radix, end);
  411|    222|    DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    222|    assert(condition)
  ------------------
  |  Branch (411:5): [True: 222, False: 0]
  ------------------
  412|    222|    bool is_negative = false;
  413|    222|    if (**current == '+') {
  ------------------
  |  Branch (413:9): [True: 1, False: 221]
  ------------------
  414|      1|      Advance(current, kNoSeparator, radix, end);
  415|      1|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      1|    assert(condition)
  ------------------
  |  Branch (415:7): [True: 1, False: 0]
  ------------------
  416|    221|    } else if (**current == '-') {
  ------------------
  |  Branch (416:16): [True: 32, False: 189]
  ------------------
  417|     32|      is_negative = true;
  418|     32|      Advance(current, kNoSeparator, radix, end);
  419|     32|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|     32|    assert(condition)
  ------------------
  |  Branch (419:7): [True: 32, False: 0]
  ------------------
  420|     32|    }
  421|    222|    int written_exponent = 0;
  422|  1.24k|    while (IsDecimalDigitForRadix(**current, 10)) {
  ------------------
  |  Branch (422:12): [True: 1.22k, False: 18]
  ------------------
  423|       |      // No need to read exponents if they are too big. That could potentially overflow
  424|       |      // the `written_exponent` variable.
  425|  1.22k|      if (abs(written_exponent) <= 100 * Double::kMaxExponent) {
  ------------------
  |  Branch (425:11): [True: 965, False: 262]
  ------------------
  426|    965|        written_exponent = 10 * written_exponent + **current - '0';
  427|    965|      }
  428|  1.22k|      if (Advance(current, kNoSeparator, radix, end)) break;
  ------------------
  |  Branch (428:11): [True: 204, False: 1.02k]
  ------------------
  429|  1.22k|    }
  430|    222|    if (is_negative) written_exponent = -written_exponent;
  ------------------
  |  Branch (430:9): [True: 32, False: 190]
  ------------------
  431|    222|    exponent += written_exponent;
  432|    222|  }
  433|       |
  434|    546|  if (exponent == 0 || number == 0) {
  ------------------
  |  Branch (434:7): [True: 225, False: 321]
  |  Branch (434:24): [True: 22, False: 299]
  ------------------
  435|    247|    if (sign) {
  ------------------
  |  Branch (435:9): [True: 54, False: 193]
  ------------------
  436|     54|      if (number == 0) return -0.0;
  ------------------
  |  Branch (436:11): [True: 1, False: 53]
  ------------------
  437|     53|      number = -number;
  438|     53|    }
  439|    246|    return static_cast<double>(number);
  440|    247|  }
  441|       |
  442|    299|  DOUBLE_CONVERSION_ASSERT(number != 0);
  ------------------
  |  |   47|    299|    assert(condition)
  ------------------
  |  Branch (442:3): [True: 299, False: 0]
  ------------------
  443|       |  // number is an exact integer below 2^kSignificandSize, so number * 2^exponent
  444|       |  // can be formed directly. Double(DiyFp(number, exponent)) would instead assume
  445|       |  // a normalized significand: a hex-float like "0x1p1000" or "0x2p-1075" reaches
  446|       |  // here with a small number and a large exponent, which DiyFpToUint64 then reads
  447|       |  // as an overflow (infinity) or underflow (zero) rather than the finite result.
  448|    299|  double result = ldexp(static_cast<double>(number), exponent);
  449|    299|  return sign ? -result : result;
  ------------------
  |  Branch (449:10): [True: 1, False: 298]
  ------------------
  450|    299|}
string-to-double.cc:_ZN17double_conversionL22IsDecimalDigitForRadixEii:
  189|  1.11M|static bool inline IsDecimalDigitForRadix(int c, int radix) {
  190|  1.11M|  return '0' <= c && c <= '9' && (c - '0') < radix;
  ------------------
  |  Branch (190:10): [True: 1.11M, False: 98]
  |  Branch (190:22): [True: 1.11M, False: 2.22k]
  |  Branch (190:34): [True: 1.11M, False: 0]
  ------------------
  191|  1.11M|}
string-to-double.cc:_ZN17double_conversionL24IsCharacterDigitForRadixEiic:
  200|  3.70k|static bool IsCharacterDigitForRadix(int c, int radix, char a_character) {
  201|  3.70k|  return radix > 10 && c >= a_character && c < a_character + radix - 10;
  ------------------
  |  Branch (201:10): [True: 3.70k, False: 0]
  |  Branch (201:24): [True: 2.37k, False: 1.33k]
  |  Branch (201:44): [True: 1.98k, False: 385]
  ------------------
  202|  3.70k|}
string-to-double.cc:_ZN17double_conversionL17RadixStringToIeeeILi3EPcEEdPT0_S2_btbbdbPb:
  283|    215|                                bool* result_is_junk) {
  284|    215|  DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    215|    assert(condition)
  ------------------
  |  Branch (284:3): [True: 215, False: 0]
  ------------------
  285|    215|  DOUBLE_CONVERSION_ASSERT(!parse_as_hex_float ||
  ------------------
  |  |   47|    215|    assert(condition)
  ------------------
  |  Branch (285:3): [True: 215, False: 0]
  |  Branch (285:3): [True: 0, False: 0]
  |  Branch (285:3): [True: 215, False: 0]
  ------------------
  286|    215|      IsHexFloatString(*current, end, separator, allow_trailing_junk));
  287|       |
  288|    215|  const int kDoubleSize = Double::kSignificandSize;
  289|    215|  const int kSingleSize = Single::kSignificandSize;
  290|    215|  const int kSignificandSize = read_as_double? kDoubleSize: kSingleSize;
  ------------------
  |  Branch (290:32): [True: 215, False: 0]
  ------------------
  291|       |
  292|    215|  *result_is_junk = true;
  293|       |
  294|    215|  int64_t number = 0;
  295|    215|  int exponent = 0;
  296|    215|  const int radix = (1 << radix_log_2);
  297|       |  // Whether we have encountered a '.' and are parsing the decimal digits.
  298|       |  // Only relevant if parse_as_hex_float is true.
  299|    215|  bool post_decimal = false;
  300|       |
  301|       |  // Skip leading 0s.
  302|    215|  while (**current == '0') {
  ------------------
  |  Branch (302:10): [True: 0, False: 215]
  ------------------
  303|      0|    if (Advance(current, separator, radix, end)) {
  ------------------
  |  Branch (303:9): [True: 0, False: 0]
  ------------------
  304|      0|      *result_is_junk = false;
  305|      0|      return SignedZero(sign);
  306|      0|    }
  307|      0|  }
  308|       |
  309|  2.84k|  while (true) {
  ------------------
  |  Branch (309:10): [True: 2.84k, Folded]
  ------------------
  310|  2.84k|    int digit;
  311|  2.84k|    if (IsDecimalDigitForRadix(**current, radix)) {
  ------------------
  |  Branch (311:9): [True: 2.84k, False: 0]
  ------------------
  312|  2.84k|      digit = static_cast<char>(**current) - '0';
  313|  2.84k|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (313:11): [True: 0, False: 2.84k]
  ------------------
  314|  2.84k|    } else if (IsCharacterDigitForRadix(**current, radix, 'a')) {
  ------------------
  |  Branch (314:16): [True: 0, False: 0]
  ------------------
  315|      0|      digit = static_cast<char>(**current) - 'a' + 10;
  316|      0|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (316:11): [True: 0, False: 0]
  ------------------
  317|      0|    } else if (IsCharacterDigitForRadix(**current, radix, 'A')) {
  ------------------
  |  Branch (317:16): [True: 0, False: 0]
  ------------------
  318|      0|      digit = static_cast<char>(**current) - 'A' + 10;
  319|      0|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (319:11): [True: 0, False: 0]
  ------------------
  320|      0|    } else if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (320:16): [True: 0, False: 0]
  |  Branch (320:38): [True: 0, False: 0]
  ------------------
  321|      0|      post_decimal = true;
  322|      0|      Advance(current, separator, radix, end);
  323|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (323:7): [True: 0, False: 0]
  ------------------
  324|      0|      continue;
  325|      0|    } else if (parse_as_hex_float && (**current == 'p' || **current == 'P')) {
  ------------------
  |  Branch (325:16): [True: 0, False: 0]
  |  Branch (325:39): [True: 0, False: 0]
  |  Branch (325:59): [True: 0, False: 0]
  ------------------
  326|      0|      break;
  327|      0|    } else {
  328|      0|      if (allow_trailing_junk || !AdvanceToNonspace(current, end)) {
  ------------------
  |  Branch (328:11): [True: 0, False: 0]
  |  Branch (328:34): [True: 0, False: 0]
  ------------------
  329|      0|        break;
  330|      0|      } else {
  331|      0|        return junk_string_value;
  332|      0|      }
  333|      0|    }
  334|       |
  335|  2.84k|    number = number * radix + digit;
  336|  2.84k|    int overflow = static_cast<int>(number >> kSignificandSize);
  337|  2.84k|    if (overflow != 0) {
  ------------------
  |  Branch (337:9): [True: 103, False: 2.74k]
  ------------------
  338|       |      // Overflow occurred. Need to determine which direction to round the
  339|       |      // result.
  340|    103|      int overflow_bits_count = 1;
  341|    127|      while (overflow > 1) {
  ------------------
  |  Branch (341:14): [True: 24, False: 103]
  ------------------
  342|     24|        overflow_bits_count++;
  343|     24|        overflow >>= 1;
  344|     24|      }
  345|       |
  346|    103|      int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
  347|    103|      int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
  348|    103|      number >>= overflow_bits_count;
  349|    103|      exponent += overflow_bits_count;
  350|       |
  351|    103|      bool zero_tail = true;
  352|  3.64k|      for (;;) {
  353|  3.64k|        if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (353:13): [True: 103, False: 3.53k]
  ------------------
  354|  3.53k|        if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (354:13): [True: 0, False: 3.53k]
  |  Branch (354:35): [True: 0, False: 0]
  ------------------
  355|       |          // Just run over the '.'. We are just trying to see whether there is
  356|       |          // a non-zero digit somewhere.
  357|      0|          Advance(current, separator, radix, end);
  358|      0|          DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (358:11): [True: 0, False: 0]
  ------------------
  359|      0|          post_decimal = true;
  360|      0|        }
  361|  3.53k|        if (!isDigit(**current, radix)) break;
  ------------------
  |  Branch (361:13): [True: 0, False: 3.53k]
  ------------------
  362|  3.53k|        zero_tail = zero_tail && **current == '0';
  ------------------
  |  Branch (362:21): [True: 1.85k, False: 1.68k]
  |  Branch (362:34): [True: 1.81k, False: 38]
  ------------------
  363|  3.53k|        if (!post_decimal) {
  ------------------
  |  Branch (363:13): [True: 3.53k, False: 0]
  ------------------
  364|  3.53k|          if (exponent <= INT_MAX - radix_log_2) {
  ------------------
  |  Branch (364:15): [True: 3.53k, False: 0]
  ------------------
  365|  3.53k|            exponent += radix_log_2;
  366|  3.53k|          } else {
  367|      0|            exponent = INT_MAX;
  368|      0|          }
  369|  3.53k|        }
  370|  3.53k|      }
  371|       |
  372|    103|      if (!parse_as_hex_float &&
  ------------------
  |  Branch (372:11): [True: 103, False: 0]
  ------------------
  373|    103|          !allow_trailing_junk &&
  ------------------
  |  Branch (373:11): [True: 0, False: 103]
  ------------------
  374|      0|          AdvanceToNonspace(current, end)) {
  ------------------
  |  Branch (374:11): [True: 0, False: 0]
  ------------------
  375|      0|        return junk_string_value;
  376|      0|      }
  377|       |
  378|    103|      int middle_value = (1 << (overflow_bits_count - 1));
  379|    103|      if (dropped_bits > middle_value) {
  ------------------
  |  Branch (379:11): [True: 3, False: 100]
  ------------------
  380|      3|        number++;  // Rounding up.
  381|    100|      } else if (dropped_bits == middle_value) {
  ------------------
  |  Branch (381:18): [True: 42, False: 58]
  ------------------
  382|       |        // Rounding to even to consistency with decimals: half-way case rounds
  383|       |        // up if significant part is odd and down otherwise.
  384|     42|        if ((number & 1) != 0 || !zero_tail) {
  ------------------
  |  Branch (384:13): [True: 23, False: 19]
  |  Branch (384:34): [True: 6, False: 13]
  ------------------
  385|     29|          number++;  // Rounding up.
  386|     29|        }
  387|     42|      }
  388|       |
  389|       |      // Rounding up may cause overflow.
  390|    103|      if ((number & ((int64_t)1 << kSignificandSize)) != 0) {
  ------------------
  |  Branch (390:11): [True: 3, False: 100]
  ------------------
  391|      3|        exponent++;
  392|      3|        number >>= 1;
  393|      3|      }
  394|    103|      break;
  395|    103|    }
  396|  2.74k|    if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (396:9): [True: 112, False: 2.62k]
  ------------------
  397|  2.74k|  }
  398|       |
  399|    215|  DOUBLE_CONVERSION_ASSERT(number < ((int64_t)1 << kSignificandSize));
  ------------------
  |  |   47|    215|    assert(condition)
  ------------------
  |  Branch (399:3): [True: 215, False: 0]
  ------------------
  400|    215|  DOUBLE_CONVERSION_ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
  ------------------
  |  |   47|    215|    assert(condition)
  ------------------
  |  Branch (400:3): [True: 215, False: 0]
  ------------------
  401|       |
  402|    215|  *result_is_junk = false;
  403|       |
  404|    215|  if (parse_as_hex_float) {
  ------------------
  |  Branch (404:7): [True: 0, False: 215]
  ------------------
  405|      0|    DOUBLE_CONVERSION_ASSERT(**current == 'p' || **current == 'P');
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (405:5): [True: 0, False: 0]
  |  Branch (405:5): [True: 0, False: 0]
  |  Branch (405:5): [True: 0, False: 0]
  ------------------
  406|       |    // The separator is only allowed between significand digits, not in the
  407|       |    // exponent, so advance through the exponent with no separator. This must
  408|       |    // match IsHexFloatString, which validated the string the same way.
  409|      0|    const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  410|      0|    Advance(current, kNoSeparator, radix, end);
  411|      0|    DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (411:5): [True: 0, False: 0]
  ------------------
  412|      0|    bool is_negative = false;
  413|      0|    if (**current == '+') {
  ------------------
  |  Branch (413:9): [True: 0, False: 0]
  ------------------
  414|      0|      Advance(current, kNoSeparator, radix, end);
  415|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (415:7): [True: 0, False: 0]
  ------------------
  416|      0|    } else if (**current == '-') {
  ------------------
  |  Branch (416:16): [True: 0, False: 0]
  ------------------
  417|      0|      is_negative = true;
  418|      0|      Advance(current, kNoSeparator, radix, end);
  419|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (419:7): [True: 0, False: 0]
  ------------------
  420|      0|    }
  421|      0|    int written_exponent = 0;
  422|      0|    while (IsDecimalDigitForRadix(**current, 10)) {
  ------------------
  |  Branch (422:12): [True: 0, False: 0]
  ------------------
  423|       |      // No need to read exponents if they are too big. That could potentially overflow
  424|       |      // the `written_exponent` variable.
  425|      0|      if (abs(written_exponent) <= 100 * Double::kMaxExponent) {
  ------------------
  |  Branch (425:11): [True: 0, False: 0]
  ------------------
  426|      0|        written_exponent = 10 * written_exponent + **current - '0';
  427|      0|      }
  428|      0|      if (Advance(current, kNoSeparator, radix, end)) break;
  ------------------
  |  Branch (428:11): [True: 0, False: 0]
  ------------------
  429|      0|    }
  430|      0|    if (is_negative) written_exponent = -written_exponent;
  ------------------
  |  Branch (430:9): [True: 0, False: 0]
  ------------------
  431|      0|    exponent += written_exponent;
  432|      0|  }
  433|       |
  434|    215|  if (exponent == 0 || number == 0) {
  ------------------
  |  Branch (434:7): [True: 112, False: 103]
  |  Branch (434:24): [True: 0, False: 103]
  ------------------
  435|    112|    if (sign) {
  ------------------
  |  Branch (435:9): [True: 53, False: 59]
  ------------------
  436|     53|      if (number == 0) return -0.0;
  ------------------
  |  Branch (436:11): [True: 0, False: 53]
  ------------------
  437|     53|      number = -number;
  438|     53|    }
  439|    112|    return static_cast<double>(number);
  440|    112|  }
  441|       |
  442|    103|  DOUBLE_CONVERSION_ASSERT(number != 0);
  ------------------
  |  |   47|    103|    assert(condition)
  ------------------
  |  Branch (442:3): [True: 103, False: 0]
  ------------------
  443|       |  // number is an exact integer below 2^kSignificandSize, so number * 2^exponent
  444|       |  // can be formed directly. Double(DiyFp(number, exponent)) would instead assume
  445|       |  // a normalized significand: a hex-float like "0x1p1000" or "0x2p-1075" reaches
  446|       |  // here with a small number and a large exponent, which DiyFpToUint64 then reads
  447|       |  // as an overflow (infinity) or underflow (zero) rather than the finite result.
  448|    103|  double result = ldexp(static_cast<double>(number), exponent);
  449|    103|  return sign ? -result : result;
  ------------------
  |  Branch (449:10): [True: 1, False: 102]
  ------------------
  450|    103|}
string-to-double.cc:_ZN17double_conversionL7AdvanceIPcEEbPT_tiRS2_:
  206|  6.38k|static bool Advance (Iterator* it, uc16 separator, int base, Iterator& end) {
  207|  6.38k|  if (separator == StringToDoubleConverter::kNoSeparator) {
  ------------------
  |  Branch (207:7): [True: 6.38k, False: 0]
  ------------------
  208|  6.38k|    ++(*it);
  209|  6.38k|    return *it == end;
  210|  6.38k|  }
  211|      0|  if (!isDigit(**it, base)) {
  ------------------
  |  Branch (211:7): [True: 0, False: 0]
  ------------------
  212|      0|    ++(*it);
  213|      0|    return *it == end;
  214|      0|  }
  215|      0|  ++(*it);
  216|      0|  if (*it == end) return true;
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|  if (*it + 1 == end) return false;
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|  if (**it == separator && isDigit(*(*it + 1), base)) {
  ------------------
  |  Branch (218:7): [True: 0, False: 0]
  |  Branch (218:28): [True: 0, False: 0]
  ------------------
  219|      0|    ++(*it);
  220|      0|  }
  221|      0|  return *it == end;
  222|      0|}

_ZN17double_conversion23StringToDoubleConverterC2EiddPKcS2_t:
  173|  2.94k|      : flags_(flags),
  174|  2.94k|        empty_string_value_(empty_string_value),
  175|  2.94k|        junk_string_value_(junk_string_value),
  176|  2.94k|        infinity_symbol_(infinity_symbol),
  177|  2.94k|        nan_symbol_(nan_symbol),
  178|  2.94k|        separator_(separator) {
  179|  2.94k|  }

_ZN17double_conversion13StrtodTrimmedENS_6VectorIKcEEi:
  466|  1.91k|double StrtodTrimmed(Vector<const char> trimmed, int exponent) {
  467|  1.91k|  DOUBLE_CONVERSION_ASSERT(trimmed.length() <= kMaxSignificantDecimalDigits);
  ------------------
  |  |   47|  1.91k|    assert(condition)
  ------------------
  |  Branch (467:3): [True: 1.91k, False: 0]
  ------------------
  468|  1.91k|  DOUBLE_CONVERSION_ASSERT(AssertTrimmedDigits(trimmed));
  ------------------
  |  |   47|  1.91k|    assert(condition)
  ------------------
  |  Branch (468:3): [True: 1.91k, False: 0]
  ------------------
  469|  1.91k|  double guess;
  470|  1.91k|  const bool is_correct = ComputeGuess(trimmed, exponent, &guess);
  471|  1.91k|  if (is_correct) {
  ------------------
  |  Branch (471:7): [True: 1.14k, False: 773]
  ------------------
  472|  1.14k|    return guess;
  473|  1.14k|  }
  474|    773|  DiyFp upper_boundary = Double(guess).UpperBoundary();
  475|    773|  int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
  476|    773|  if (comparison < 0) {
  ------------------
  |  Branch (476:7): [True: 230, False: 543]
  ------------------
  477|    230|    return guess;
  478|    543|  } else if (comparison > 0) {
  ------------------
  |  Branch (478:14): [True: 444, False: 99]
  ------------------
  479|    444|    return Double(guess).NextDouble();
  480|    444|  } else if ((Double(guess).Significand() & 1) == 0) {
  ------------------
  |  Branch (480:14): [True: 43, False: 56]
  ------------------
  481|       |    // Round towards even.
  482|     43|    return guess;
  483|     56|  } else {
  484|     56|    return Double(guess).NextDouble();
  485|     56|  }
  486|    773|}
strtod.cc:_ZN17double_conversionL19AssertTrimmedDigitsERKNS_6VectorIKcEE:
  457|  1.91k|static bool AssertTrimmedDigits(const Vector<const char>& buffer) {
  458|   129k|  for(int i = 0; i < buffer.length(); ++i) {
  ------------------
  |  Branch (458:18): [True: 127k, False: 1.91k]
  ------------------
  459|   127k|    if(!IsDigit(buffer[i])) {
  ------------------
  |  Branch (459:8): [True: 0, False: 127k]
  ------------------
  460|      0|      return false;
  461|      0|    }
  462|   127k|  }
  463|  1.91k|  return (buffer.length() == 0) || (IsNonZeroDigit(buffer[0]) && IsNonZeroDigit(buffer[buffer.length()-1]));
  ------------------
  |  Branch (463:10): [True: 69, False: 1.85k]
  |  Branch (463:37): [True: 1.85k, False: 0]
  |  Branch (463:66): [True: 1.85k, False: 0]
  ------------------
  464|  1.91k|}
strtod.cc:_ZN17double_conversionL7IsDigitEc:
  444|   127k|static bool IsDigit(const char d) {
  445|   127k|  return ('0' <= d) && (d <= '9');
  ------------------
  |  Branch (445:10): [True: 127k, False: 0]
  |  Branch (445:24): [True: 127k, False: 0]
  ------------------
  446|   127k|}
strtod.cc:_ZN17double_conversionL14IsNonZeroDigitEc:
  448|  3.70k|static bool IsNonZeroDigit(const char d) {
  449|  3.70k|  return ('1' <= d) && (d <= '9');
  ------------------
  |  Branch (449:10): [True: 3.70k, False: 0]
  |  Branch (449:24): [True: 3.70k, False: 0]
  ------------------
  450|  3.70k|}
strtod.cc:_ZN17double_conversionL12ComputeGuessENS_6VectorIKcEEiPd:
  420|  1.91k|                         double* guess) {
  421|  1.91k|  if (trimmed.length() == 0) {
  ------------------
  |  Branch (421:7): [True: 69, False: 1.85k]
  ------------------
  422|     69|    *guess = 0.0;
  423|     69|    return true;
  424|     69|  }
  425|  1.85k|  if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
  ------------------
  |  Branch (425:7): [True: 136, False: 1.71k]
  ------------------
  426|    136|    *guess = Double::Infinity();
  427|    136|    return true;
  428|    136|  }
  429|  1.71k|  if (exponent + trimmed.length() <= kMinDecimalPower) {
  ------------------
  |  Branch (429:7): [True: 66, False: 1.64k]
  ------------------
  430|     66|    *guess = 0.0;
  431|     66|    return true;
  432|     66|  }
  433|       |
  434|  1.64k|  if (DoubleStrtod(trimmed, exponent, guess) ||
  ------------------
  |  Branch (434:7): [True: 281, False: 1.36k]
  ------------------
  435|  1.36k|      DiyFpStrtod(trimmed, exponent, guess)) {
  ------------------
  |  Branch (435:7): [True: 593, False: 774]
  ------------------
  436|    874|    return true;
  437|    874|  }
  438|    774|  if (*guess == Double::Infinity()) {
  ------------------
  |  Branch (438:7): [True: 1, False: 773]
  ------------------
  439|      1|    return true;
  440|      1|  }
  441|    773|  return false;
  442|    774|}
strtod.cc:_ZN17double_conversionL12DoubleStrtodENS_6VectorIKcEEiPd:
  192|  1.64k|                         double* result) {
  193|       |#if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
  194|       |  // Avoid "unused parameter" warnings
  195|       |  (void) trimmed;
  196|       |  (void) exponent;
  197|       |  (void) result;
  198|       |  // On x86 the floating-point stack can be 64 or 80 bits wide. If it is
  199|       |  // 80 bits wide (as is the case on Linux) then double-rounding occurs and the
  200|       |  // result is not accurate.
  201|       |  // We know that Windows32 uses 64 bits and is therefore accurate.
  202|       |  return false;
  203|       |#else
  204|  1.64k|  if (trimmed.length() <= kMaxExactDoubleIntegerDecimalDigits) {
  ------------------
  |  Branch (204:7): [True: 895, False: 753]
  ------------------
  205|    895|    int read_digits;
  206|       |    // The trimmed input fits into a double.
  207|       |    // If the 10^exponent (resp. 10^-exponent) fits into a double too then we
  208|       |    // can compute the result-double simply by multiplying (resp. dividing) the
  209|       |    // two numbers.
  210|       |    // This is possible because IEEE guarantees that floating-point operations
  211|       |    // return the best possible approximation.
  212|    895|    if (exponent < 0 && -exponent < kExactPowersOfTenSize) {
  ------------------
  |  Branch (212:9): [True: 297, False: 598]
  |  Branch (212:25): [True: 74, False: 223]
  ------------------
  213|       |      // 10^-exponent fits into a double.
  214|     74|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  215|     74|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|     74|    assert(condition)
  ------------------
  |  Branch (215:7): [True: 74, False: 0]
  ------------------
  216|     74|      *result /= exact_powers_of_ten[-exponent];
  217|     74|      return true;
  218|     74|    }
  219|    821|    if (0 <= exponent && exponent < kExactPowersOfTenSize) {
  ------------------
  |  Branch (219:9): [True: 598, False: 223]
  |  Branch (219:26): [True: 152, False: 446]
  ------------------
  220|       |      // 10^exponent fits into a double.
  221|    152|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  222|    152|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|    152|    assert(condition)
  ------------------
  |  Branch (222:7): [True: 152, False: 0]
  ------------------
  223|    152|      *result *= exact_powers_of_ten[exponent];
  224|    152|      return true;
  225|    152|    }
  226|    669|    int remaining_digits =
  227|    669|        kMaxExactDoubleIntegerDecimalDigits - trimmed.length();
  228|    669|    if ((0 <= exponent) &&
  ------------------
  |  Branch (228:9): [True: 446, False: 223]
  ------------------
  229|    446|        (exponent - remaining_digits < kExactPowersOfTenSize)) {
  ------------------
  |  Branch (229:9): [True: 55, False: 391]
  ------------------
  230|       |      // The trimmed string was short and we can multiply it with
  231|       |      // 10^remaining_digits. As a result the remaining exponent now fits
  232|       |      // into a double too.
  233|     55|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  234|     55|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|     55|    assert(condition)
  ------------------
  |  Branch (234:7): [True: 55, False: 0]
  ------------------
  235|     55|      *result *= exact_powers_of_ten[remaining_digits];
  236|     55|      *result *= exact_powers_of_ten[exponent - remaining_digits];
  237|     55|      return true;
  238|     55|    }
  239|    669|  }
  240|  1.36k|  return false;
  241|  1.64k|#endif
  242|  1.64k|}
strtod.cc:_ZN17double_conversionL10ReadUint64ENS_6VectorIKcEEPi:
  152|  1.64k|                           int* number_of_read_digits) {
  153|  1.64k|  uint64_t result = 0;
  154|  1.64k|  int i = 0;
  155|  19.7k|  while (i < buffer.length() && result <= (kMaxUint64 / 10 - 1)) {
  ------------------
  |  Branch (155:10): [True: 18.4k, False: 1.29k]
  |  Branch (155:33): [True: 18.0k, False: 351]
  ------------------
  156|  18.0k|    int digit = buffer[i++] - '0';
  157|  18.0k|    DOUBLE_CONVERSION_ASSERT(0 <= digit && digit <= 9);
  ------------------
  |  |   47|  18.0k|    assert(condition)
  ------------------
  |  Branch (157:5): [True: 18.0k, False: 0]
  |  Branch (157:5): [True: 18.0k, False: 0]
  |  Branch (157:5): [True: 18.0k, False: 0]
  ------------------
  158|  18.0k|    result = 10 * result + digit;
  159|  18.0k|  }
  160|  1.64k|  *number_of_read_digits = i;
  161|  1.64k|  return result;
  162|  1.64k|}
strtod.cc:_ZN17double_conversionL11DiyFpStrtodENS_6VectorIKcEEiPd:
  272|  1.36k|                        double* result) {
  273|  1.36k|  DiyFp input;
  274|  1.36k|  int remaining_decimals;
  275|  1.36k|  ReadDiyFp(buffer, &input, &remaining_decimals);
  276|       |  // Since we may have dropped some digits the input is not accurate.
  277|       |  // If remaining_decimals is different than 0 than the error is at most
  278|       |  // .5 ulp (unit in the last place).
  279|       |  // We don't want to deal with fractions and therefore keep a common
  280|       |  // denominator.
  281|  1.36k|  const int kDenominatorLog = 3;
  282|  1.36k|  const int kDenominator = 1 << kDenominatorLog;
  283|       |  // Move the remaining decimals into the exponent.
  284|  1.36k|  exponent += remaining_decimals;
  285|  1.36k|  uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
  ------------------
  |  Branch (285:21): [True: 1.01k, False: 351]
  ------------------
  286|       |
  287|  1.36k|  int old_e = input.e();
  288|  1.36k|  input.Normalize();
  289|  1.36k|  error <<= old_e - input.e();
  290|       |
  291|  1.36k|  DOUBLE_CONVERSION_ASSERT(exponent <= PowersOfTenCache::kMaxDecimalExponent);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (291:3): [True: 1.36k, False: 0]
  ------------------
  292|  1.36k|  if (exponent < PowersOfTenCache::kMinDecimalExponent) {
  ------------------
  |  Branch (292:7): [True: 0, False: 1.36k]
  ------------------
  293|      0|    *result = 0.0;
  294|      0|    return true;
  295|      0|  }
  296|  1.36k|  DiyFp cached_power;
  297|  1.36k|  int cached_decimal_exponent;
  298|  1.36k|  PowersOfTenCache::GetCachedPowerForDecimalExponent(exponent,
  299|  1.36k|                                                     &cached_power,
  300|  1.36k|                                                     &cached_decimal_exponent);
  301|       |
  302|  1.36k|  if (cached_decimal_exponent != exponent) {
  ------------------
  |  Branch (302:7): [True: 1.25k, False: 113]
  ------------------
  303|  1.25k|    int adjustment_exponent = exponent - cached_decimal_exponent;
  304|  1.25k|    DiyFp adjustment_power = AdjustmentPowerOfTen(adjustment_exponent);
  305|  1.25k|    input.Multiply(adjustment_power);
  306|  1.25k|    if (kMaxUint64DecimalDigits - buffer.length() >= adjustment_exponent) {
  ------------------
  |  Branch (306:9): [True: 552, False: 702]
  ------------------
  307|       |      // The product of input with the adjustment power fits into a 64 bit
  308|       |      // integer.
  309|    552|      DOUBLE_CONVERSION_ASSERT(DiyFp::kSignificandSize == 64);
  ------------------
  |  |   47|    552|    assert(condition)
  ------------------
  |  Branch (309:7): [True: 552, Folded]
  ------------------
  310|    702|    } else {
  311|       |      // The adjustment power is exact. There is hence only an error of 0.5.
  312|    702|      error += kDenominator / 2;
  313|    702|    }
  314|  1.25k|  }
  315|       |
  316|  1.36k|  input.Multiply(cached_power);
  317|       |  // The error introduced by a multiplication of a*b equals
  318|       |  //   error_a + error_b + error_a*error_b/2^64 + 0.5
  319|       |  // Substituting a with 'input' and b with 'cached_power' we have
  320|       |  //   error_b = 0.5  (all cached powers have an error of less than 0.5 ulp),
  321|       |  //   error_ab = 0 or 1 / kDenominator > error_a*error_b/ 2^64
  322|  1.36k|  int error_b = kDenominator / 2;
  323|  1.36k|  int error_ab = (error == 0 ? 0 : 1);  // We round up to 1.
  ------------------
  |  Branch (323:19): [True: 637, False: 730]
  ------------------
  324|  1.36k|  int fixed_error = kDenominator / 2;
  325|  1.36k|  error += error_b + error_ab + fixed_error;
  326|       |
  327|  1.36k|  old_e = input.e();
  328|  1.36k|  input.Normalize();
  329|  1.36k|  error <<= old_e - input.e();
  330|       |
  331|       |  // See if the double's significand changes if we add/subtract the error.
  332|  1.36k|  int order_of_magnitude = DiyFp::kSignificandSize + input.e();
  333|  1.36k|  int effective_significand_size =
  334|  1.36k|      Double::SignificandSizeForOrderOfMagnitude(order_of_magnitude);
  335|  1.36k|  int precision_digits_count =
  336|  1.36k|      DiyFp::kSignificandSize - effective_significand_size;
  337|  1.36k|  if (precision_digits_count + kDenominatorLog >= DiyFp::kSignificandSize) {
  ------------------
  |  Branch (337:7): [True: 59, False: 1.30k]
  ------------------
  338|       |    // This can only happen for very small denormals. In this case the
  339|       |    // half-way multiplied by the denominator exceeds the range of an uint64.
  340|       |    // Simply shift everything to the right.
  341|     59|    int shift_amount = (precision_digits_count + kDenominatorLog) -
  342|     59|        DiyFp::kSignificandSize + 1;
  343|     59|    input.set_f(input.f() >> shift_amount);
  344|     59|    input.set_e(input.e() + shift_amount);
  345|       |    // We add 1 for the lost precision of error, and kDenominator for
  346|       |    // the lost precision of input.f().
  347|     59|    error = (error >> shift_amount) + 1 + kDenominator;
  348|     59|    precision_digits_count -= shift_amount;
  349|     59|  }
  350|       |  // We use uint64_ts now. This only works if the DiyFp uses uint64_ts too.
  351|  1.36k|  DOUBLE_CONVERSION_ASSERT(DiyFp::kSignificandSize == 64);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (351:3): [True: 1.36k, Folded]
  ------------------
  352|  1.36k|  DOUBLE_CONVERSION_ASSERT(precision_digits_count < 64);
  ------------------
  |  |   47|  1.36k|    assert(condition)
  ------------------
  |  Branch (352:3): [True: 1.36k, False: 0]
  ------------------
  353|  1.36k|  uint64_t one64 = 1;
  354|  1.36k|  uint64_t precision_bits_mask = (one64 << precision_digits_count) - 1;
  355|  1.36k|  uint64_t precision_bits = input.f() & precision_bits_mask;
  356|  1.36k|  uint64_t half_way = one64 << (precision_digits_count - 1);
  357|  1.36k|  precision_bits *= kDenominator;
  358|  1.36k|  half_way *= kDenominator;
  359|  1.36k|  DiyFp rounded_input(input.f() >> precision_digits_count,
  360|  1.36k|                      input.e() + precision_digits_count);
  361|  1.36k|  if (precision_bits >= half_way + error) {
  ------------------
  |  Branch (361:7): [True: 270, False: 1.09k]
  ------------------
  362|    270|    rounded_input.set_f(rounded_input.f() + 1);
  363|    270|  }
  364|       |  // If the last_bits are too close to the half-way case than we are too
  365|       |  // inaccurate and round down. In this case we return false so that we can
  366|       |  // fall back to a more precise algorithm.
  367|       |
  368|  1.36k|  *result = Double(rounded_input).value();
  369|  1.36k|  if (half_way - error < precision_bits && precision_bits < half_way + error) {
  ------------------
  |  Branch (369:7): [True: 1.04k, False: 323]
  |  Branch (369:44): [True: 774, False: 270]
  ------------------
  370|       |    // Too imprecise. The caller will have to fall back to a slower version.
  371|       |    // However the returned number is guaranteed to be either the correct
  372|       |    // double, or the next-lower double.
  373|    774|    return false;
  374|    774|  } else {
  375|    593|    return true;
  376|    593|  }
  377|  1.36k|}
strtod.cc:_ZN17double_conversionL9ReadDiyFpENS_6VectorIKcEEPNS_5DiyFpEPi:
  171|  1.36k|                      int* remaining_decimals) {
  172|  1.36k|  int read_digits;
  173|  1.36k|  uint64_t significand = ReadUint64(buffer, &read_digits);
  174|  1.36k|  if (buffer.length() == read_digits) {
  ------------------
  |  Branch (174:7): [True: 1.01k, False: 351]
  ------------------
  175|  1.01k|    *result = DiyFp(significand, 0);
  176|  1.01k|    *remaining_decimals = 0;
  177|  1.01k|  } else {
  178|       |    // Round the significand.
  179|    351|    if (buffer[read_digits] >= '5') {
  ------------------
  |  Branch (179:9): [True: 83, False: 268]
  ------------------
  180|     83|      significand++;
  181|     83|    }
  182|       |    // Compute the binary exponent.
  183|    351|    int exponent = 0;
  184|    351|    *result = DiyFp(significand, exponent);
  185|    351|    *remaining_decimals = buffer.length() - read_digits;
  186|    351|  }
  187|  1.36k|}
strtod.cc:_ZN17double_conversionL20AdjustmentPowerOfTenEi:
  247|  1.25k|static DiyFp AdjustmentPowerOfTen(int exponent) {
  248|  1.25k|  DOUBLE_CONVERSION_ASSERT(0 < exponent);
  ------------------
  |  |   47|  1.25k|    assert(condition)
  ------------------
  |  Branch (248:3): [True: 1.25k, False: 0]
  ------------------
  249|  1.25k|  DOUBLE_CONVERSION_ASSERT(exponent < PowersOfTenCache::kDecimalExponentDistance);
  ------------------
  |  |   47|  1.25k|    assert(condition)
  ------------------
  |  Branch (249:3): [True: 1.25k, False: 0]
  ------------------
  250|       |  // Simply hardcode the remaining powers for the given decimal exponent
  251|       |  // distance.
  252|  1.25k|  DOUBLE_CONVERSION_ASSERT(PowersOfTenCache::kDecimalExponentDistance == 8);
  ------------------
  |  |   47|  1.25k|    assert(condition)
  ------------------
  |  Branch (252:3): [True: 1.25k, Folded]
  ------------------
  253|  1.25k|  switch (exponent) {
  254|    176|    case 1: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xa0000000, 00000000), -60);
  ------------------
  |  |  195|    176|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (254:5): [True: 176, False: 1.07k]
  ------------------
  255|    106|    case 2: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc8000000, 00000000), -57);
  ------------------
  |  |  195|    106|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (255:5): [True: 106, False: 1.14k]
  ------------------
  256|    110|    case 3: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xfa000000, 00000000), -54);
  ------------------
  |  |  195|    110|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (256:5): [True: 110, False: 1.14k]
  ------------------
  257|    413|    case 4: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0x9c400000, 00000000), -50);
  ------------------
  |  |  195|    413|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (257:5): [True: 413, False: 841]
  ------------------
  258|    155|    case 5: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc3500000, 00000000), -47);
  ------------------
  |  |  195|    155|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (258:5): [True: 155, False: 1.09k]
  ------------------
  259|    126|    case 6: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xf4240000, 00000000), -44);
  ------------------
  |  |  195|    126|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (259:5): [True: 126, False: 1.12k]
  ------------------
  260|    168|    case 7: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0x98968000, 00000000), -40);
  ------------------
  |  |  195|    168|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (260:5): [True: 168, False: 1.08k]
  ------------------
  261|      0|    default:
  ------------------
  |  Branch (261:5): [True: 0, False: 1.25k]
  ------------------
  262|      0|      DOUBLE_CONVERSION_UNREACHABLE();
  ------------------
  |  |   77|      0|#define DOUBLE_CONVERSION_UNREACHABLE()   (abort())
  ------------------
  263|  1.25k|  }
  264|  1.25k|}
strtod.cc:_ZN17double_conversionL22CompareBufferWithDiyFpENS_6VectorIKcEEiNS_5DiyFpE:
  390|    773|                                  DiyFp diy_fp) {
  391|    773|  DOUBLE_CONVERSION_ASSERT(buffer.length() + exponent <= kMaxDecimalPower + 1);
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (391:3): [True: 773, False: 0]
  ------------------
  392|    773|  DOUBLE_CONVERSION_ASSERT(buffer.length() + exponent > kMinDecimalPower);
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (392:3): [True: 773, False: 0]
  ------------------
  393|    773|  DOUBLE_CONVERSION_ASSERT(buffer.length() <= kMaxSignificantDecimalDigits);
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (393:3): [True: 773, False: 0]
  ------------------
  394|       |  // Make sure that the Bignum will be able to hold all our numbers.
  395|       |  // Our Bignum implementation has a separate field for exponents. Shifts will
  396|       |  // consume at most one bigit (< 64 bits).
  397|       |  // ln(10) == 3.3219...
  398|    773|  DOUBLE_CONVERSION_ASSERT(((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits);
  ------------------
  |  |   47|    773|    assert(condition)
  ------------------
  |  Branch (398:3): [True: 773, Folded]
  ------------------
  399|    773|  Bignum buffer_bignum;
  400|    773|  Bignum diy_fp_bignum;
  401|    773|  buffer_bignum.AssignDecimalString(buffer);
  402|    773|  diy_fp_bignum.AssignUInt64(diy_fp.f());
  403|    773|  if (exponent >= 0) {
  ------------------
  |  Branch (403:7): [True: 442, False: 331]
  ------------------
  404|    442|    buffer_bignum.MultiplyByPowerOfTen(exponent);
  405|    442|  } else {
  406|    331|    diy_fp_bignum.MultiplyByPowerOfTen(-exponent);
  407|    331|  }
  408|    773|  if (diy_fp.e() > 0) {
  ------------------
  |  Branch (408:7): [True: 428, False: 345]
  ------------------
  409|    428|    diy_fp_bignum.ShiftLeft(diy_fp.e());
  410|    428|  } else {
  411|    345|    buffer_bignum.ShiftLeft(-diy_fp.e());
  412|    345|  }
  413|    773|  return Bignum::Compare(buffer_bignum, diy_fp_bignum);
  414|    773|}

_ZN17double_conversion17TrimTrailingZerosENS_6VectorIKcEE:
   53|  1.91k|inline Vector<const char> TrimTrailingZeros(Vector<const char> buffer) {
   54|  6.57k|  for (int i = buffer.length() - 1; i >= 0; --i) {
  ------------------
  |  Branch (54:37): [True: 6.50k, False: 69]
  ------------------
   55|  6.50k|    if (buffer[i] != '0') {
  ------------------
  |  Branch (55:9): [True: 1.85k, False: 4.65k]
  ------------------
   56|  1.85k|      return buffer.SubVector(0, i + 1);
   57|  1.85k|    }
   58|  6.50k|  }
   59|     69|  return Vector<const char>(buffer.start(), 0);
   60|  1.91k|}

_ZN17double_conversion7BitCastIdmEET_RKT0_:
  395|  2.78k|Dest BitCast(const Source& source) {
  396|       |  // Compile time assertion: sizeof(Dest) == sizeof(Source)
  397|       |  // A compile error here means your Dest and Source have different sizes.
  398|  2.78k|#if __cplusplus >= 201103L
  399|  2.78k|  static_assert(sizeof(Dest) == sizeof(Source),
  400|  2.78k|                "source and destination size mismatch");
  401|       |#else
  402|       |  DOUBLE_CONVERSION_UNUSED
  403|       |  typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
  404|       |#endif
  405|       |
  406|  2.78k|  Dest dest;
  407|  2.78k|  memmove(&dest, &source, sizeof(dest));
  408|  2.78k|  return dest;
  409|  2.78k|}
_ZN17double_conversion6VectorIKcEC2EPS1_i:
  252|  3.83k|  Vector(T* data, int len) : start_(data), length_(len) {
  253|       |    DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != DOUBLE_CONVERSION_NULLPTR));
  ------------------
  |  |   47|  3.83k|    assert(condition)
  ------------------
  |  Branch (253:5): [True: 3.70k, False: 0]
  |  Branch (253:5): [True: 3.70k, False: 0]
  |  Branch (253:5): [True: 138, False: 3.70k]
  |  Branch (253:5): [True: 3.83k, False: 0]
  ------------------
  254|  3.83k|  }
_ZNK17double_conversion6VectorIKcEixEi:
  275|   232k|  T& operator[](int index) const {
  276|   232k|    DOUBLE_CONVERSION_ASSERT(0 <= index && index < length_);
  ------------------
  |  |   47|   232k|    assert(condition)
  ------------------
  |  Branch (276:5): [True: 232k, False: 0]
  |  Branch (276:5): [True: 232k, False: 0]
  |  Branch (276:5): [True: 232k, False: 0]
  ------------------
  277|   232k|    return start_[index];
  278|   232k|  }
_ZN17double_conversion6VectorIKcE9SubVectorEii:
  258|  1.85k|  Vector<T> SubVector(int from, int to) {
  259|  1.85k|    DOUBLE_CONVERSION_ASSERT(to <= length_);
  ------------------
  |  |   47|  1.85k|    assert(condition)
  ------------------
  |  Branch (259:5): [True: 1.85k, False: 0]
  ------------------
  260|  1.85k|    DOUBLE_CONVERSION_ASSERT(from < to);
  ------------------
  |  |   47|  1.85k|    assert(condition)
  ------------------
  |  Branch (260:5): [True: 1.85k, False: 0]
  ------------------
  261|  1.85k|    DOUBLE_CONVERSION_ASSERT(0 <= from);
  ------------------
  |  |   47|  1.85k|    assert(condition)
  ------------------
  |  Branch (261:5): [True: 1.85k, False: 0]
  ------------------
  262|  1.85k|    return Vector<T>(start() + from, to - from);
  263|  1.85k|  }
_ZNK17double_conversion6VectorIKcE5startEv:
  272|  1.91k|  T* start() const { return start_; }
_ZNK17double_conversion6VectorIKcE6lengthEv:
  266|   172k|  int length() const { return length_; }
_ZN17double_conversion7BitCastImdEET_RKT0_:
  395|  1.37k|Dest BitCast(const Source& source) {
  396|       |  // Compile time assertion: sizeof(Dest) == sizeof(Source)
  397|       |  // A compile error here means your Dest and Source have different sizes.
  398|  1.37k|#if __cplusplus >= 201103L
  399|  1.37k|  static_assert(sizeof(Dest) == sizeof(Source),
  400|  1.37k|                "source and destination size mismatch");
  401|       |#else
  402|       |  DOUBLE_CONVERSION_UNUSED
  403|       |  typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
  404|       |#endif
  405|       |
  406|  1.37k|  Dest dest;
  407|  1.37k|  memmove(&dest, &source, sizeof(dest));
  408|  1.37k|  return dest;
  409|  1.37k|}

LLVMFuzzerTestOneInput:
   23|  2.94k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   24|  2.94k|  StringToDoubleConverter converter(
   25|  2.94k|      StringToDoubleConverter::ALLOW_HEX |
   26|  2.94k|          StringToDoubleConverter::ALLOW_OCTALS |
   27|  2.94k|          StringToDoubleConverter::ALLOW_TRAILING_JUNK |
   28|  2.94k|          StringToDoubleConverter::ALLOW_LEADING_SPACES |
   29|  2.94k|          StringToDoubleConverter::ALLOW_TRAILING_SPACES |
   30|  2.94k|          StringToDoubleConverter::ALLOW_SPACES_AFTER_SIGN |
   31|  2.94k|          StringToDoubleConverter::ALLOW_CASE_INSENSIBILITY |
   32|  2.94k|          StringToDoubleConverter::ALLOW_HEX_FLOATS,
   33|  2.94k|      /*empty_string_value=*/0.0,
   34|  2.94k|      /*junk_string_value=*/0.0, "inf", "nan");
   35|  2.94k|  int num_digits_unused;
   36|  2.94k|  converter.StringToDouble(reinterpret_cast<const char*>(data), size,
   37|  2.94k|                           &num_digits_unused);
   38|  2.94k|  return 0;
   39|  2.94k|}

