_ZN17double_conversion6Bignum8RawBigitEi:
   36|  1.11M|Bignum::Chunk& Bignum::RawBigit(const int index) {
   37|  1.11M|  DOUBLE_CONVERSION_ASSERT(static_cast<unsigned>(index) < kBigitCapacity);
  ------------------
  |  |   47|  1.11M|    assert(condition)
  ------------------
  |  Branch (37:3): [True: 1.11M, False: 0]
  ------------------
   38|  1.11M|  return bigits_buffer_[index];
   39|  1.11M|}
_ZNK17double_conversion6Bignum8RawBigitEi:
   42|  19.4k|const Bignum::Chunk& Bignum::RawBigit(const int index) const {
   43|  19.4k|  DOUBLE_CONVERSION_ASSERT(static_cast<unsigned>(index) < kBigitCapacity);
  ------------------
  |  |   47|  19.4k|    assert(condition)
  ------------------
  |  Branch (43:3): [True: 19.4k, False: 0]
  ------------------
   44|  19.4k|  return bigits_buffer_[index];
   45|  19.4k|}
_ZN17double_conversion6Bignum12AssignUInt64Em:
   65|  3.19k|void Bignum::AssignUInt64(uint64_t value) {
   66|  3.19k|  Zero();
   67|  10.3k|  for(int i = 0; value > 0; ++i) {
  ------------------
  |  Branch (67:18): [True: 7.15k, False: 3.19k]
  ------------------
   68|  7.15k|    RawBigit(i) = value & kBigitMask;
   69|  7.15k|    value >>= kBigitSize;
   70|  7.15k|    ++used_bigits_;
   71|  7.15k|  }
   72|  3.19k|}
_ZN17double_conversion6Bignum19AssignDecimalStringENS_6VectorIKcEE:
   97|    758|void Bignum::AssignDecimalString(const Vector<const char> value) {
   98|       |  // 2^64 = 18446744073709551616 > 10^19
   99|    758|  static const int kMaxUint64DecimalDigits = 19;
  100|    758|  Zero();
  101|    758|  int length = value.length();
  102|    758|  unsigned pos = 0;
  103|       |  // Let's just say that each digit needs 4 bits.
  104|  4.30k|  while (length >= kMaxUint64DecimalDigits) {
  ------------------
  |  Branch (104:10): [True: 3.55k, False: 758]
  ------------------
  105|  3.55k|    const uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
  106|  3.55k|    pos += kMaxUint64DecimalDigits;
  107|  3.55k|    length -= kMaxUint64DecimalDigits;
  108|  3.55k|    MultiplyByPowerOfTen(kMaxUint64DecimalDigits);
  109|  3.55k|    AddUInt64(digits);
  110|  3.55k|  }
  111|    758|  const uint64_t digits = ReadUInt64(value, pos, length);
  112|    758|  MultiplyByPowerOfTen(length);
  113|    758|  AddUInt64(digits);
  114|    758|  Clamp();
  115|    758|}
_ZN17double_conversion6Bignum9AddUInt64Em:
  156|  4.30k|void Bignum::AddUInt64(const uint64_t operand) {
  157|  4.30k|  if (operand == 0) {
  ------------------
  |  Branch (157:7): [True: 1.87k, False: 2.43k]
  ------------------
  158|  1.87k|    return;
  159|  1.87k|  }
  160|  2.43k|  Bignum other;
  161|  2.43k|  other.AssignUInt64(operand);
  162|  2.43k|  AddBignum(other);
  163|  2.43k|}
_ZN17double_conversion6Bignum9AddBignumERKS0_:
  166|  2.43k|void Bignum::AddBignum(const Bignum& other) {
  167|  2.43k|  DOUBLE_CONVERSION_ASSERT(IsClamped());
  ------------------
  |  |   47|  2.43k|    assert(condition)
  ------------------
  |  Branch (167:3): [True: 2.43k, False: 0]
  ------------------
  168|  2.43k|  DOUBLE_CONVERSION_ASSERT(other.IsClamped());
  ------------------
  |  |   47|  2.43k|    assert(condition)
  ------------------
  |  Branch (168:3): [True: 2.43k, 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.43k|  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.43k|  EnsureCapacity(1 + (std::max)(BigitLength(), other.BigitLength()) - exponent_);
  187|  2.43k|  Chunk carry = 0;
  188|  2.43k|  int bigit_pos = other.exponent_ - exponent_;
  189|  2.43k|  DOUBLE_CONVERSION_ASSERT(bigit_pos >= 0);
  ------------------
  |  |   47|  2.43k|    assert(condition)
  ------------------
  |  Branch (189:3): [True: 2.43k, False: 0]
  ------------------
  190|  2.43k|  for (int i = used_bigits_; i < bigit_pos; ++i) {
  ------------------
  |  Branch (190:30): [True: 0, False: 2.43k]
  ------------------
  191|      0|    RawBigit(i) = 0;
  192|      0|  }
  193|  8.09k|  for (int i = 0; i < other.used_bigits_; ++i) {
  ------------------
  |  Branch (193:19): [True: 5.66k, False: 2.43k]
  ------------------
  194|  5.66k|    const Chunk my = (bigit_pos < used_bigits_) ? RawBigit(bigit_pos) : 0;
  ------------------
  |  Branch (194:22): [True: 3.95k, False: 1.70k]
  ------------------
  195|  5.66k|    const Chunk sum = my + other.RawBigit(i) + carry;
  196|  5.66k|    RawBigit(bigit_pos) = sum & kBigitMask;
  197|  5.66k|    carry = sum >> kBigitSize;
  198|  5.66k|    ++bigit_pos;
  199|  5.66k|  }
  200|  2.84k|  while (carry != 0) {
  ------------------
  |  Branch (200:10): [True: 409, False: 2.43k]
  ------------------
  201|    409|    const Chunk my = (bigit_pos < used_bigits_) ? RawBigit(bigit_pos) : 0;
  ------------------
  |  Branch (201:22): [True: 409, False: 0]
  ------------------
  202|    409|    const Chunk sum = my + carry;
  203|    409|    RawBigit(bigit_pos) = sum & kBigitMask;
  204|    409|    carry = sum >> kBigitSize;
  205|    409|    ++bigit_pos;
  206|    409|  }
  207|  2.43k|  used_bigits_ = static_cast<int16_t>(std::max(bigit_pos, static_cast<int>(used_bigits_)));
  208|       |  DOUBLE_CONVERSION_ASSERT(IsClamped());
  ------------------
  |  |   47|  2.43k|    assert(condition)
  ------------------
  |  Branch (208:3): [True: 2.43k, False: 0]
  ------------------
  209|  2.43k|}
_ZN17double_conversion6Bignum9ShiftLeftEi:
  239|  4.72k|void Bignum::ShiftLeft(const int shift_amount) {
  240|  4.72k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (240:7): [True: 0, False: 4.72k]
  ------------------
  241|      0|    return;
  242|      0|  }
  243|  4.72k|  exponent_ += static_cast<int16_t>(shift_amount / kBigitSize);
  244|  4.72k|  const int local_shift = shift_amount % kBigitSize;
  245|  4.72k|  EnsureCapacity(used_bigits_ + 1);
  246|  4.72k|  BigitsShiftLeft(local_shift);
  247|  4.72k|}
_ZN17double_conversion6Bignum16MultiplyByUInt32Ej:
  250|  7.40k|void Bignum::MultiplyByUInt32(const uint32_t factor) {
  251|  7.40k|  if (factor == 1) {
  ------------------
  |  Branch (251:7): [True: 0, False: 7.40k]
  ------------------
  252|      0|    return;
  253|      0|  }
  254|  7.40k|  if (factor == 0) {
  ------------------
  |  Branch (254:7): [True: 0, False: 7.40k]
  ------------------
  255|      0|    Zero();
  256|      0|    return;
  257|      0|  }
  258|  7.40k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (258:7): [True: 0, False: 7.40k]
  ------------------
  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.40k|  DOUBLE_CONVERSION_ASSERT(kDoubleChunkSize >= kBigitSize + 32 + 1);
  ------------------
  |  |   47|  7.40k|    assert(condition)
  ------------------
  |  Branch (263:3): [True: 7.40k, Folded]
  ------------------
  264|  7.40k|  DoubleChunk carry = 0;
  265|   225k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (265:19): [True: 218k, False: 7.40k]
  ------------------
  266|   218k|    const DoubleChunk product = static_cast<DoubleChunk>(factor) * RawBigit(i) + carry;
  267|   218k|    RawBigit(i) = static_cast<Chunk>(product & kBigitMask);
  268|   218k|    carry = (product >> kBigitSize);
  269|   218k|  }
  270|  13.1k|  while (carry != 0) {
  ------------------
  |  Branch (270:10): [True: 5.75k, False: 7.40k]
  ------------------
  271|  5.75k|    EnsureCapacity(used_bigits_ + 1);
  272|  5.75k|    RawBigit(used_bigits_) = carry & kBigitMask;
  273|  5.75k|    used_bigits_++;
  274|  5.75k|    carry >>= kBigitSize;
  275|  5.75k|  }
  276|  7.40k|}
_ZN17double_conversion6Bignum16MultiplyByUInt64Em:
  279|  4.49k|void Bignum::MultiplyByUInt64(const uint64_t factor) {
  280|  4.49k|  if (factor == 1) {
  ------------------
  |  Branch (280:7): [True: 0, False: 4.49k]
  ------------------
  281|      0|    return;
  282|      0|  }
  283|  4.49k|  if (factor == 0) {
  ------------------
  |  Branch (283:7): [True: 0, False: 4.49k]
  ------------------
  284|      0|    Zero();
  285|      0|    return;
  286|      0|  }
  287|  4.49k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (287:7): [True: 0, False: 4.49k]
  ------------------
  288|      0|    return;
  289|      0|  }
  290|  4.49k|  DOUBLE_CONVERSION_ASSERT(kBigitSize < 32);
  ------------------
  |  |   47|  4.49k|    assert(condition)
  ------------------
  |  Branch (290:3): [True: 4.49k, Folded]
  ------------------
  291|  4.49k|  uint64_t carry = 0;
  292|  4.49k|  const uint64_t low = factor & 0xFFFFFFFF;
  293|  4.49k|  const uint64_t high = factor >> 32;
  294|  91.8k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (294:19): [True: 87.3k, False: 4.49k]
  ------------------
  295|  87.3k|    const uint64_t product_low = low * RawBigit(i);
  296|  87.3k|    const uint64_t product_high = high * RawBigit(i);
  297|  87.3k|    const uint64_t tmp = (carry & kBigitMask) + product_low;
  298|  87.3k|    RawBigit(i) = tmp & kBigitMask;
  299|  87.3k|    carry = (carry >> kBigitSize) + (tmp >> kBigitSize) +
  300|  87.3k|        (product_high << (32 - kBigitSize));
  301|  87.3k|  }
  302|  14.6k|  while (carry != 0) {
  ------------------
  |  Branch (302:10): [True: 10.1k, False: 4.49k]
  ------------------
  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.49k|}
_ZN17double_conversion6Bignum20MultiplyByPowerOfTenEi:
  311|  5.06k|void Bignum::MultiplyByPowerOfTen(const int exponent) {
  312|  5.06k|  static const uint64_t kFive27 = DOUBLE_CONVERSION_UINT64_2PART_C(0x6765c793, fa10079d);
  ------------------
  |  |  195|  5.06k|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  313|  5.06k|  static const uint16_t kFive1 = 5;
  314|  5.06k|  static const uint16_t kFive2 = kFive1 * 5;
  315|  5.06k|  static const uint16_t kFive3 = kFive2 * 5;
  316|  5.06k|  static const uint16_t kFive4 = kFive3 * 5;
  317|  5.06k|  static const uint16_t kFive5 = kFive4 * 5;
  318|  5.06k|  static const uint16_t kFive6 = kFive5 * 5;
  319|  5.06k|  static const uint32_t kFive7 = kFive6 * 5;
  320|  5.06k|  static const uint32_t kFive8 = kFive7 * 5;
  321|  5.06k|  static const uint32_t kFive9 = kFive8 * 5;
  322|  5.06k|  static const uint32_t kFive10 = kFive9 * 5;
  323|  5.06k|  static const uint32_t kFive11 = kFive10 * 5;
  324|  5.06k|  static const uint32_t kFive12 = kFive11 * 5;
  325|  5.06k|  static const uint32_t kFive13 = kFive12 * 5;
  326|  5.06k|  static const uint32_t kFive1_to_12[] =
  327|  5.06k|      { kFive1, kFive2, kFive3, kFive4, kFive5, kFive6,
  328|  5.06k|        kFive7, kFive8, kFive9, kFive10, kFive11, kFive12 };
  329|       |
  330|  5.06k|  DOUBLE_CONVERSION_ASSERT(exponent >= 0);
  ------------------
  |  |   47|  5.06k|    assert(condition)
  ------------------
  |  Branch (330:3): [True: 5.06k, False: 0]
  ------------------
  331|       |
  332|  5.06k|  if (exponent == 0) {
  ------------------
  |  Branch (332:7): [True: 346, False: 4.72k]
  ------------------
  333|    346|    return;
  334|    346|  }
  335|  4.72k|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (335:7): [True: 758, False: 3.96k]
  ------------------
  336|    758|    return;
  337|    758|  }
  338|       |  // We shift by exponent at the end just before returning.
  339|  3.96k|  int remaining_exponent = exponent;
  340|  8.46k|  while (remaining_exponent >= 27) {
  ------------------
  |  Branch (340:10): [True: 4.49k, False: 3.96k]
  ------------------
  341|  4.49k|    MultiplyByUInt64(kFive27);
  342|  4.49k|    remaining_exponent -= 27;
  343|  4.49k|  }
  344|  7.53k|  while (remaining_exponent >= 13) {
  ------------------
  |  Branch (344:10): [True: 3.57k, False: 3.96k]
  ------------------
  345|  3.57k|    MultiplyByUInt32(kFive13);
  346|  3.57k|    remaining_exponent -= 13;
  347|  3.57k|  }
  348|  3.96k|  if (remaining_exponent > 0) {
  ------------------
  |  Branch (348:7): [True: 3.83k, False: 130]
  ------------------
  349|  3.83k|    MultiplyByUInt32(kFive1_to_12[remaining_exponent - 1]);
  350|  3.83k|  }
  351|  3.96k|  ShiftLeft(exponent);
  352|  3.96k|}
_ZNK17double_conversion6Bignum11BigitOrZeroEi:
  633|  6.02k|Bignum::Chunk Bignum::BigitOrZero(const int index) const {
  634|  6.02k|  if (index >= BigitLength()) {
  ------------------
  |  Branch (634:7): [True: 0, False: 6.02k]
  ------------------
  635|      0|    return 0;
  636|      0|  }
  637|  6.02k|  if (index < exponent_) {
  ------------------
  |  Branch (637:7): [True: 273, False: 5.75k]
  ------------------
  638|    273|    return 0;
  639|    273|  }
  640|  5.75k|  return RawBigit(index - exponent_);
  641|  6.02k|}
_ZN17double_conversion6Bignum7CompareERKS0_S2_:
  644|    758|int Bignum::Compare(const Bignum& a, const Bignum& b) {
  645|    758|  DOUBLE_CONVERSION_ASSERT(a.IsClamped());
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (645:3): [True: 758, False: 0]
  ------------------
  646|    758|  DOUBLE_CONVERSION_ASSERT(b.IsClamped());
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (646:3): [True: 758, False: 0]
  ------------------
  647|    758|  const int bigit_length_a = a.BigitLength();
  648|    758|  const int bigit_length_b = b.BigitLength();
  649|    758|  if (bigit_length_a < bigit_length_b) {
  ------------------
  |  Branch (649:7): [True: 5, False: 753]
  ------------------
  650|      5|    return -1;
  651|      5|  }
  652|    753|  if (bigit_length_a > bigit_length_b) {
  ------------------
  |  Branch (652:7): [True: 0, False: 753]
  ------------------
  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.01k, False: 97]
  ------------------
  656|  3.01k|    const Chunk bigit_a = a.BigitOrZero(i);
  657|  3.01k|    const Chunk bigit_b = b.BigitOrZero(i);
  658|  3.01k|    if (bigit_a < bigit_b) {
  ------------------
  |  Branch (658:9): [True: 203, False: 2.80k]
  ------------------
  659|    203|      return -1;
  660|    203|    }
  661|  2.80k|    if (bigit_a > bigit_b) {
  ------------------
  |  Branch (661:9): [True: 453, False: 2.35k]
  ------------------
  662|    453|      return +1;
  663|    453|    }
  664|       |    // Otherwise they are equal up to this digit. Try the next digit.
  665|  2.80k|  }
  666|     97|  return 0;
  667|    753|}
_ZN17double_conversion6Bignum5ClampEv:
  715|    758|void Bignum::Clamp() {
  716|    758|  while (used_bigits_ > 0 && RawBigit(used_bigits_ - 1) == 0) {
  ------------------
  |  Branch (716:10): [True: 758, False: 0]
  |  Branch (716:30): [True: 0, False: 758]
  ------------------
  717|      0|    used_bigits_--;
  718|      0|  }
  719|    758|  if (used_bigits_ == 0) {
  ------------------
  |  Branch (719:7): [True: 0, False: 758]
  ------------------
  720|       |    // Zero.
  721|      0|    exponent_ = 0;
  722|      0|  }
  723|    758|}
_ZN17double_conversion6Bignum5AlignERKS0_:
  726|  2.43k|void Bignum::Align(const Bignum& other) {
  727|  2.43k|  if (exponent_ > other.exponent_) {
  ------------------
  |  Branch (727:7): [True: 0, False: 2.43k]
  ------------------
  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.43k|}
_ZN17double_conversion6Bignum15BigitsShiftLeftEi:
  751|  4.72k|void Bignum::BigitsShiftLeft(const int shift_amount) {
  752|  4.72k|  DOUBLE_CONVERSION_ASSERT(shift_amount < kBigitSize);
  ------------------
  |  |   47|  4.72k|    assert(condition)
  ------------------
  |  Branch (752:3): [True: 4.72k, False: 0]
  ------------------
  753|  4.72k|  DOUBLE_CONVERSION_ASSERT(shift_amount >= 0);
  ------------------
  |  |   47|  4.72k|    assert(condition)
  ------------------
  |  Branch (753:3): [True: 4.72k, False: 0]
  ------------------
  754|  4.72k|  Chunk carry = 0;
  755|   131k|  for (int i = 0; i < used_bigits_; ++i) {
  ------------------
  |  Branch (755:19): [True: 127k, False: 4.72k]
  ------------------
  756|   127k|    const Chunk new_carry = RawBigit(i) >> (kBigitSize - shift_amount);
  757|   127k|    RawBigit(i) = ((RawBigit(i) << shift_amount) + carry) & kBigitMask;
  758|   127k|    carry = new_carry;
  759|   127k|  }
  760|  4.72k|  if (carry != 0) {
  ------------------
  |  Branch (760:7): [True: 2.93k, False: 1.79k]
  ------------------
  761|  2.93k|    RawBigit(used_bigits_) = carry;
  762|  2.93k|    used_bigits_++;
  763|  2.93k|  }
  764|  4.72k|}
bignum.cc:_ZN17double_conversionL10ReadUInt64ENS_6VectorIKcEEii:
   86|  4.30k|                           const int digits_to_read) {
   87|  4.30k|  uint64_t result = 0;
   88|  77.8k|  for (int i = from; i < from + digits_to_read; ++i) {
  ------------------
  |  Branch (88:22): [True: 73.5k, False: 4.30k]
  ------------------
   89|  73.5k|    const int digit = buffer[i] - '0';
   90|  73.5k|    DOUBLE_CONVERSION_ASSERT(0 <= digit && digit <= 9);
  ------------------
  |  |   47|  73.5k|    assert(condition)
  ------------------
  |  Branch (90:5): [True: 73.5k, False: 0]
  |  Branch (90:5): [True: 73.5k, False: 0]
  |  Branch (90:5): [True: 73.5k, False: 0]
  ------------------
   91|  73.5k|    result = result * 10 + digit;
   92|  73.5k|  }
   93|  4.30k|  return result;
   94|  4.30k|}

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

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

_ZN17double_conversion5DiyFpC2Ev:
   45|  2.68k|  DiyFp() : f_(0), e_(0) {}
_ZN17double_conversion5DiyFpC2Emi:
   46|  6.01k|  DiyFp(const uint64_t significand, const int32_t exponent) : f_(significand), e_(exponent) {}
_ZN17double_conversion5DiyFp8MultiplyERKS0_:
   68|  2.57k|  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.57k|    const uint64_t kM32 = 0xFFFFFFFFU;
   74|  2.57k|    const uint64_t a = f_ >> 32;
   75|  2.57k|    const uint64_t b = f_ & kM32;
   76|  2.57k|    const uint64_t c = other.f_ >> 32;
   77|  2.57k|    const uint64_t d = other.f_ & kM32;
   78|  2.57k|    const uint64_t ac = a * c;
   79|  2.57k|    const uint64_t bc = b * c;
   80|  2.57k|    const uint64_t ad = a * d;
   81|  2.57k|    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.57k|    const uint64_t tmp = (bd >> 32) + (ad & kM32) + (bc & kM32) + (1U << 31);
   85|  2.57k|    e_ += other.e_ + 64;
   86|  2.57k|    f_ = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32);
   87|  2.57k|  }
_ZN17double_conversion5DiyFp9NormalizeEv:
   96|  2.68k|  void Normalize() {
   97|  2.68k|    DOUBLE_CONVERSION_ASSERT(f_ != 0);
  ------------------
  |  |   47|  2.68k|    assert(condition)
  ------------------
  |  Branch (97:5): [True: 2.68k, False: 0]
  ------------------
   98|  2.68k|    uint64_t significand = f_;
   99|  2.68k|    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.68k|    const uint64_t k10MSBits = DOUBLE_CONVERSION_UINT64_2PART_C(0xFFC00000, 00000000);
  ------------------
  |  |  195|  2.68k|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  104|  5.70k|    while ((significand & k10MSBits) == 0) {
  ------------------
  |  Branch (104:12): [True: 3.02k, False: 2.68k]
  ------------------
  105|  3.02k|      significand <<= 10;
  106|  3.02k|      exponent -= 10;
  107|  3.02k|    }
  108|  7.05k|    while ((significand & kUint64MSB) == 0) {
  ------------------
  |  Branch (108:12): [True: 4.36k, False: 2.68k]
  ------------------
  109|  4.36k|      significand <<= 1;
  110|  4.36k|      exponent--;
  111|  4.36k|    }
  112|  2.68k|    f_ = significand;
  113|  2.68k|    e_ = exponent;
  114|  2.68k|  }
_ZNK17double_conversion5DiyFp1fEv:
  122|  5.12k|  uint64_t f() const { return f_; }
_ZNK17double_conversion5DiyFp1eEv:
  123|  10.9k|  int32_t e() const { return e_; }
_ZN17double_conversion5DiyFp5set_fEm:
  125|    335|  void set_f(uint64_t new_value) { f_ = new_value; }
_ZN17double_conversion5DiyFp5set_eEi:
  126|     58|  void set_e(int32_t new_value) { e_ = new_value; }

_ZN17double_conversion6Double8InfinityEv:
  236|    914|  static double Infinity() {
  237|    914|    return Double(kInfinity).value();
  238|    914|  }
_ZN17double_conversion6DoubleC2Em:
   56|  1.41k|  explicit Double(uint64_t d64) : d64_(d64) {}
_ZNK17double_conversion6Double5valueEv:
  220|  2.75k|  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.35k|  explicit Double(double d) : d64_(double_to_uint64(d)) {}
_ZN17double_conversion6DoubleC2ENS_5DiyFpE:
   58|  1.34k|    : d64_(DiyFpToUint64(diy_fp)) {}
_ZNK17double_conversion6Double8AsUint64Ev:
   86|  4.89k|  uint64_t AsUint64() const {
   87|  4.89k|    return d64_;
   88|  4.89k|  }
_ZNK17double_conversion6Double10NextDoubleEv:
   91|    498|  double NextDouble() const {
   92|    498|    if (d64_ == kInfinity) return Double(kInfinity).value();
  ------------------
  |  Branch (92:9): [True: 0, False: 498]
  ------------------
   93|    498|    if (Sign() < 0 && Significand() == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 498]
  |  Branch (93:23): [True: 0, False: 0]
  ------------------
   94|       |      // -0.0
   95|      0|      return 0.0;
   96|      0|    }
   97|    498|    if (Sign() < 0) {
  ------------------
  |  Branch (97:9): [True: 0, False: 498]
  ------------------
   98|      0|      return Double(d64_ - 1).value();
   99|    498|    } else {
  100|    498|      return Double(d64_ + 1).value();
  101|    498|    }
  102|    498|  }
_ZNK17double_conversion6Double8ExponentEv:
  114|    758|  int Exponent() const {
  115|    758|    if (IsDenormal()) return kDenormalExponent;
  ------------------
  |  Branch (115:9): [True: 90, False: 668]
  ------------------
  116|       |
  117|    668|    uint64_t d64 = AsUint64();
  118|    668|    int biased_e =
  119|    668|        static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize);
  120|    668|    return biased_e - kExponentBias;
  121|    758|  }
_ZNK17double_conversion6Double11SignificandEv:
  123|    855|  uint64_t Significand() const {
  124|    855|    uint64_t d64 = AsUint64();
  125|    855|    uint64_t significand = d64 & kSignificandMask;
  126|    855|    if (!IsDenormal()) {
  ------------------
  |  Branch (126:9): [True: 765, False: 90]
  ------------------
  127|    765|      return significand + kHiddenBit;
  128|    765|    } else {
  129|     90|      return significand;
  130|     90|    }
  131|    855|  }
_ZNK17double_conversion6Double10IsDenormalEv:
  134|  1.61k|  bool IsDenormal() const {
  135|  1.61k|    uint64_t d64 = AsUint64();
  136|  1.61k|    return (d64 & kExponentMask) == 0;
  137|  1.61k|  }
_ZNK17double_conversion6Double4SignEv:
  175|  1.75k|  int Sign() const {
  176|  1.75k|    uint64_t d64 = AsUint64();
  177|  1.75k|    return (d64 & kSignMask) == 0? 1: -1;
  ------------------
  |  Branch (177:12): [True: 1.75k, False: 0]
  ------------------
  178|  1.75k|  }
_ZNK17double_conversion6Double13UpperBoundaryEv:
  182|    758|  DiyFp UpperBoundary() const {
  183|    758|    DOUBLE_CONVERSION_ASSERT(Sign() > 0);
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (183:5): [True: 758, False: 0]
  ------------------
  184|    758|    return DiyFp(Significand() * 2 + 1, Exponent() - 1);
  185|    758|  }
_ZN17double_conversion6Double34SignificandSizeForOrderOfMagnitudeEi:
  228|  1.34k|  static int SignificandSizeForOrderOfMagnitude(int order) {
  229|  1.34k|    if (order >= (kDenormalExponent + kSignificandSize)) {
  ------------------
  |  Branch (229:9): [True: 1.16k, False: 183]
  ------------------
  230|  1.16k|      return kSignificandSize;
  231|  1.16k|    }
  232|    183|    if (order <= kDenormalExponent) return 0;
  ------------------
  |  Branch (232:9): [True: 39, False: 144]
  ------------------
  233|    144|    return order - kDenormalExponent;
  234|    183|  }
_ZN17double_conversion6Double13DiyFpToUint64ENS_5DiyFpE:
  256|  1.34k|  static uint64_t DiyFpToUint64(DiyFp diy_fp) {
  257|  1.34k|    uint64_t significand = diy_fp.f();
  258|  1.34k|    int exponent = diy_fp.e();
  259|  1.36k|    while (significand > kHiddenBit + kSignificandMask) {
  ------------------
  |  Branch (259:12): [True: 18, False: 1.34k]
  ------------------
  260|     18|      significand >>= 1;
  261|     18|      exponent++;
  262|     18|    }
  263|  1.34k|    if (exponent >= kMaxExponent) {
  ------------------
  |  Branch (263:9): [True: 4, False: 1.33k]
  ------------------
  264|      4|      return kInfinity;
  265|      4|    }
  266|  1.33k|    if (exponent < kDenormalExponent) {
  ------------------
  |  Branch (266:9): [True: 29, False: 1.31k]
  ------------------
  267|     29|      return 0;
  268|     29|    }
  269|  1.31k|    while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) {
  ------------------
  |  Branch (269:12): [True: 1.15k, False: 155]
  |  Branch (269:44): [True: 0, False: 1.15k]
  ------------------
  270|      0|      significand <<= 1;
  271|      0|      exponent--;
  272|      0|    }
  273|  1.31k|    uint64_t biased_exponent;
  274|  1.31k|    if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) {
  ------------------
  |  Branch (274:9): [True: 155, False: 1.15k]
  |  Branch (274:42): [True: 154, False: 1]
  ------------------
  275|    154|      biased_exponent = 0;
  276|  1.15k|    } else {
  277|  1.15k|      biased_exponent = static_cast<uint64_t>(exponent + kExponentBias);
  278|  1.15k|    }
  279|  1.31k|    return (significand & kSignificandMask) |
  280|  1.31k|        (biased_exponent << kPhysicalSignificandSize);
  281|  1.33k|  }
strtod.cc:_ZN17double_conversionL16uint64_to_doubleEm:
   37|  2.75k|static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
strtod.cc:_ZN17double_conversionL16double_to_uint64Ed:
   36|  1.35k|static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }

_ZNK17double_conversion23StringToDoubleConverter14StringToDoubleEPKciPi:
  817|  2.89k|    int* processed_characters_count) const {
  818|  2.89k|  return StringToIeee(buffer, length, true, processed_characters_count);
  819|  2.89k|}
_ZNK17double_conversion23StringToDoubleConverter12StringToIeeeIPKcEEdT_ibPi:
  485|  2.89k|    int* processed_characters_count) const {
  486|  2.89k|  Iterator current = input;
  487|  2.89k|  Iterator end = input + length;
  488|       |
  489|  2.89k|  *processed_characters_count = 0;
  490|       |
  491|  2.89k|  const bool allow_trailing_junk = (flags_ & ALLOW_TRAILING_JUNK) != 0;
  492|  2.89k|  const bool allow_leading_spaces = (flags_ & ALLOW_LEADING_SPACES) != 0;
  493|  2.89k|  const bool allow_trailing_spaces = (flags_ & ALLOW_TRAILING_SPACES) != 0;
  494|  2.89k|  const bool allow_spaces_after_sign = (flags_ & ALLOW_SPACES_AFTER_SIGN) != 0;
  495|  2.89k|  const bool allow_case_insensitivity = (flags_ & ALLOW_CASE_INSENSITIVITY) != 0;
  496|       |
  497|       |  // To make sure that iterator dereferencing is valid the following
  498|       |  // convention is used:
  499|       |  // 1. Each '++current' statement is followed by check for equality to 'end'.
  500|       |  // 2. If AdvanceToNonspace returned false then current == end.
  501|       |  // 3. If 'current' becomes equal to 'end' the function returns or goes to
  502|       |  // 'parsing_done'.
  503|       |  // 4. 'current' is not dereferenced after the 'parsing_done' label.
  504|       |  // 5. Code before 'parsing_done' may rely on 'current != end'.
  505|  2.89k|  if (current == end) return empty_string_value_;
  ------------------
  |  Branch (505:7): [True: 0, False: 2.89k]
  ------------------
  506|       |
  507|  2.89k|  if (allow_leading_spaces || allow_trailing_spaces) {
  ------------------
  |  Branch (507:7): [True: 2.89k, False: 0]
  |  Branch (507:31): [True: 0, False: 0]
  ------------------
  508|  2.89k|    if (!AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (508:9): [True: 14, False: 2.88k]
  ------------------
  509|     14|      *processed_characters_count = static_cast<int>(current - input);
  510|     14|      return empty_string_value_;
  511|     14|    }
  512|  2.88k|    if (!allow_leading_spaces && (input != current)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 2.88k]
  |  Branch (512:34): [True: 0, False: 0]
  ------------------
  513|       |      // No leading spaces allowed, but AdvanceToNonspace moved forward.
  514|      0|      return junk_string_value_;
  515|      0|    }
  516|  2.88k|  }
  517|       |
  518|       |  // Exponent will be adjusted if insignificant digits of the integer part
  519|       |  // or insignificant leading zeros of the fractional part are dropped.
  520|  2.88k|  int exponent = 0;
  521|  2.88k|  int significant_digits = 0;
  522|  2.88k|  int insignificant_digits = 0;
  523|  2.88k|  bool nonzero_digit_dropped = false;
  524|       |
  525|  2.88k|  bool sign = false;
  526|       |
  527|  2.88k|  if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (527:7): [True: 10, False: 2.87k]
  |  Branch (527:26): [True: 134, False: 2.74k]
  ------------------
  528|    144|    sign = (*current == '-');
  529|    144|    ++current;
  530|    144|    Iterator next_non_space = current;
  531|       |    // Skip following spaces (if allowed).
  532|    144|    if (!AdvanceToNonspace(&next_non_space, end)) return junk_string_value_;
  ------------------
  |  Branch (532:9): [True: 18, False: 126]
  ------------------
  533|    126|    if (!allow_spaces_after_sign && (current != next_non_space)) {
  ------------------
  |  Branch (533:9): [True: 0, False: 126]
  |  Branch (533:37): [True: 0, False: 0]
  ------------------
  534|      0|      return junk_string_value_;
  535|      0|    }
  536|    126|    current = next_non_space;
  537|    126|  }
  538|       |
  539|  2.86k|  if (infinity_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
  ------------------
  |  |   39|  2.86k|#define DOUBLE_CONVERSION_NULLPTR nullptr
  ------------------
  |  Branch (539:7): [True: 2.86k, False: 0]
  ------------------
  540|  2.86k|    if (ConsumeFirstCharacter(*current, infinity_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (540:9): [True: 9, False: 2.85k]
  ------------------
  541|      9|      if (!ConsumeSubString(&current, end, infinity_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (541:11): [True: 7, False: 2]
  ------------------
  542|      7|        return junk_string_value_;
  543|      7|      }
  544|       |
  545|      2|      if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (545:13): [True: 2, False: 0]
  |  Branch (545:38): [True: 0, False: 0]
  |  Branch (545:62): [True: 0, False: 0]
  ------------------
  546|      0|        return junk_string_value_;
  547|      0|      }
  548|      2|      if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (548:11): [True: 0, False: 2]
  |  Branch (548:35): [True: 0, False: 0]
  ------------------
  549|      0|        return junk_string_value_;
  550|      0|      }
  551|       |
  552|      2|      *processed_characters_count = static_cast<int>(current - input);
  553|      2|      return sign ? -Double::Infinity() : Double::Infinity();
  ------------------
  |  Branch (553:14): [True: 1, False: 1]
  ------------------
  554|      2|    }
  555|  2.86k|  }
  556|       |
  557|  2.85k|  if (nan_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
  ------------------
  |  |   39|  2.85k|#define DOUBLE_CONVERSION_NULLPTR nullptr
  ------------------
  |  Branch (557:7): [True: 2.85k, False: 0]
  ------------------
  558|  2.85k|    if (ConsumeFirstCharacter(*current, nan_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (558:9): [True: 11, False: 2.84k]
  ------------------
  559|     11|      if (!ConsumeSubString(&current, end, nan_symbol_, allow_case_insensitivity)) {
  ------------------
  |  Branch (559:11): [True: 9, False: 2]
  ------------------
  560|      9|        return junk_string_value_;
  561|      9|      }
  562|       |
  563|      2|      if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (563:13): [True: 2, False: 0]
  |  Branch (563:38): [True: 0, False: 0]
  |  Branch (563:62): [True: 0, False: 0]
  ------------------
  564|      0|        return junk_string_value_;
  565|      0|      }
  566|      2|      if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (566:11): [True: 0, False: 2]
  |  Branch (566:35): [True: 0, False: 0]
  ------------------
  567|      0|        return junk_string_value_;
  568|      0|      }
  569|       |
  570|      2|      *processed_characters_count = static_cast<int>(current - input);
  571|      2|      return sign ? -Double::NaN() : Double::NaN();
  ------------------
  |  Branch (571:14): [True: 1, False: 1]
  ------------------
  572|      2|    }
  573|  2.85k|  }
  574|       |
  575|  2.84k|  bool leading_zero = false;
  576|  2.84k|  if (*current == '0') {
  ------------------
  |  Branch (576:7): [True: 890, False: 1.95k]
  ------------------
  577|    890|    if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (577:9): [True: 2, False: 888]
  ------------------
  578|      2|      *processed_characters_count = static_cast<int>(current - input);
  579|      2|      return SignedZero(sign);
  580|      2|    }
  581|       |
  582|    888|    leading_zero = true;
  583|       |
  584|       |    // It could be hexadecimal value.
  585|    888|    if (((flags_ & ALLOW_HEX) || (flags_ & ALLOW_HEX_FLOATS)) &&
  ------------------
  |  Branch (585:10): [True: 888, False: 0]
  |  Branch (585:34): [True: 0, False: 0]
  ------------------
  586|    888|        (*current == 'x' || *current == 'X')) {
  ------------------
  |  Branch (586:10): [True: 250, False: 638]
  |  Branch (586:29): [True: 358, False: 280]
  ------------------
  587|    608|      ++current;
  588|       |
  589|    608|      if (current == end) return junk_string_value_;  // "0x"
  ------------------
  |  Branch (589:11): [True: 2, False: 606]
  ------------------
  590|       |
  591|    606|      bool parse_as_hex_float = (flags_ & ALLOW_HEX_FLOATS) &&
  ------------------
  |  Branch (591:33): [True: 606, False: 0]
  ------------------
  592|    606|                IsHexFloatString(current, end, separator_, allow_trailing_junk,
  ------------------
  |  Branch (592:17): [True: 202, False: 404]
  ------------------
  593|    606|                                 allow_trailing_spaces);
  594|       |
  595|    606|      if (!parse_as_hex_float && !isDigit(*current, 16)) {
  ------------------
  |  Branch (595:11): [True: 404, False: 202]
  |  Branch (595:34): [True: 76, False: 328]
  ------------------
  596|     76|        return junk_string_value_;
  597|     76|      }
  598|       |
  599|    530|      bool result_is_junk;
  600|    530|      double result = RadixStringToIeee<4>(&current,
  601|    530|                                           end,
  602|    530|                                           sign,
  603|    530|                                           separator_,
  604|    530|                                           parse_as_hex_float,
  605|    530|                                           allow_trailing_junk,
  606|    530|                                           allow_trailing_spaces,
  607|    530|                                           junk_string_value_,
  608|    530|                                           read_as_double,
  609|    530|                                           &result_is_junk);
  610|    530|      if (!result_is_junk) {
  ------------------
  |  Branch (610:11): [True: 530, False: 0]
  ------------------
  611|    530|        if (allow_trailing_spaces) AdvanceToNonspace(&current, end);
  ------------------
  |  Branch (611:13): [True: 530, False: 0]
  ------------------
  612|    530|        *processed_characters_count = static_cast<int>(current - input);
  613|    530|      }
  614|    530|      return result;
  615|    606|    }
  616|       |
  617|       |    // Ignore leading zeros in the integer part.
  618|    671|    while (*current == '0') {
  ------------------
  |  Branch (618:12): [True: 400, False: 271]
  ------------------
  619|    400|      if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (619:11): [True: 9, False: 391]
  ------------------
  620|      9|        *processed_characters_count = static_cast<int>(current - input);
  621|      9|        return SignedZero(sign);
  622|      9|      }
  623|    400|    }
  624|    280|  }
  625|       |
  626|  2.22k|  bool octal = leading_zero && (flags_ & ALLOW_OCTALS) != 0;
  ------------------
  |  Branch (626:16): [True: 271, False: 1.95k]
  |  Branch (626:32): [True: 271, False: 0]
  ------------------
  627|       |
  628|       |  // The longest form of simplified number is: "-<significant digits>.1eXXX\0".
  629|  2.22k|  const int kBufferSize = kMaxSignificantDigits + 10;
  630|  2.22k|  DOUBLE_CONVERSION_STACK_UNINITIALIZED char
  ------------------
  |  |  104|  2.22k|#define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
  ------------------
  631|  2.22k|      buffer[kBufferSize];  // NOLINT: size is known at compile time.
  632|  2.22k|  int buffer_pos = 0;
  633|       |
  634|       |  // Copy significant digits of the integer part (if any) to the buffer.
  635|  67.1k|  while (*current >= '0' && *current <= '9') {
  ------------------
  |  Branch (635:10): [True: 66.6k, False: 471]
  |  Branch (635:29): [True: 65.6k, False: 1.00k]
  ------------------
  636|  65.6k|    if (significant_digits < kMaxSignificantDigits) {
  ------------------
  |  Branch (636:9): [True: 65.2k, False: 396]
  ------------------
  637|  65.2k|      DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  65.2k|    assert(condition)
  ------------------
  |  Branch (637:7): [True: 65.2k, False: 0]
  ------------------
  638|  65.2k|      buffer[buffer_pos++] = static_cast<char>(*current);
  639|  65.2k|      significant_digits++;
  640|       |      // Will later check if it's an octal in the buffer.
  641|  65.2k|    } else {
  642|    396|      insignificant_digits++;  // Move the digit into the exponential part.
  643|    396|      nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
  ------------------
  |  Branch (643:31): [True: 194, False: 202]
  |  Branch (643:56): [True: 10, False: 192]
  ------------------
  644|    396|    }
  645|  65.6k|    octal = octal && *current < '8';
  ------------------
  |  Branch (645:13): [True: 6.28k, False: 59.3k]
  |  Branch (645:22): [True: 6.28k, False: 4]
  ------------------
  646|  65.6k|    if (Advance(&current, separator_, 10, end)) goto parsing_done;
  ------------------
  |  Branch (646:9): [True: 749, False: 64.9k]
  ------------------
  647|  65.6k|  }
  648|       |
  649|  1.47k|  if (significant_digits == 0) {
  ------------------
  |  Branch (649:7): [True: 248, False: 1.23k]
  ------------------
  650|    248|    octal = false;
  651|    248|  }
  652|       |
  653|  1.47k|  if (*current == '.') {
  ------------------
  |  Branch (653:7): [True: 384, False: 1.09k]
  ------------------
  654|    384|    if (octal && !allow_trailing_junk) return junk_string_value_;
  ------------------
  |  Branch (654:9): [True: 1, False: 383]
  |  Branch (654:18): [True: 0, False: 1]
  ------------------
  655|    384|    if (octal) goto parsing_done;
  ------------------
  |  Branch (655:9): [True: 1, False: 383]
  ------------------
  656|       |
  657|    383|    if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (657:9): [True: 3, False: 380]
  ------------------
  658|      3|      if (significant_digits == 0 && !leading_zero) {
  ------------------
  |  Branch (658:11): [True: 2, False: 1]
  |  Branch (658:38): [True: 1, False: 1]
  ------------------
  659|      1|        return junk_string_value_;
  660|      2|      } else {
  661|      2|        goto parsing_done;
  662|      2|      }
  663|      3|    }
  664|       |
  665|    380|    if (significant_digits == 0) {
  ------------------
  |  Branch (665:9): [True: 142, False: 238]
  ------------------
  666|       |      // octal = false;
  667|       |      // Integer part consists of 0 or is absent. Significant digits start after
  668|       |      // leading zeros (if any).
  669|  3.61M|      while (*current == '0') {
  ------------------
  |  Branch (669:14): [True: 3.61M, False: 129]
  ------------------
  670|  3.61M|        if (Advance(&current, separator_, 10, end)) {
  ------------------
  |  Branch (670:13): [True: 13, False: 3.61M]
  ------------------
  671|     13|          *processed_characters_count = static_cast<int>(current - input);
  672|     13|          return SignedZero(sign);
  673|     13|        }
  674|  3.61M|        exponent--;  // Move this 0 into the exponent.
  675|  3.61M|      }
  676|    142|    }
  677|       |
  678|       |    // There is a fractional part.
  679|       |    // We don't emit a '.', but adjust the exponent instead.
  680|   811k|    while (*current >= '0' && *current <= '9') {
  ------------------
  |  Branch (680:12): [True: 811k, False: 34]
  |  Branch (680:31): [True: 811k, False: 78]
  ------------------
  681|   811k|      if (significant_digits < kMaxSignificantDigits) {
  ------------------
  |  Branch (681:11): [True: 66.8k, False: 744k]
  ------------------
  682|  66.8k|        DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  66.8k|    assert(condition)
  ------------------
  |  Branch (682:9): [True: 66.8k, False: 0]
  ------------------
  683|  66.8k|        buffer[buffer_pos++] = static_cast<char>(*current);
  684|  66.8k|        significant_digits++;
  685|  66.8k|        exponent--;
  686|   744k|      } else {
  687|       |        // Ignore insignificant digits in the fractional part.
  688|   744k|        nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
  ------------------
  |  Branch (688:33): [True: 714k, False: 30.6k]
  |  Branch (688:58): [True: 15, False: 30.6k]
  ------------------
  689|   744k|      }
  690|   811k|      if (Advance(&current, separator_, 10, end)) goto parsing_done;
  ------------------
  |  Branch (690:11): [True: 255, False: 811k]
  ------------------
  691|   811k|    }
  692|    367|  }
  693|       |
  694|  1.20k|  if (!leading_zero && exponent == 0 && significant_digits == 0) {
  ------------------
  |  Branch (694:7): [True: 1.15k, False: 53]
  |  Branch (694:24): [True: 1.06k, False: 88]
  |  Branch (694:41): [True: 77, False: 988]
  ------------------
  695|       |    // If leading_zeros is true then the string contains zeros.
  696|       |    // If exponent < 0 then string was [+-]\.0*...
  697|       |    // If significant_digits != 0 the string is not equal to 0.
  698|       |    // Otherwise there are no digits in the string.
  699|     77|    return junk_string_value_;
  700|     77|  }
  701|       |
  702|       |  // Parse exponential part.
  703|  1.12k|  if (*current == 'e' || *current == 'E') {
  ------------------
  |  Branch (703:7): [True: 544, False: 585]
  |  Branch (703:26): [True: 487, False: 98]
  ------------------
  704|  1.03k|    if (octal && !allow_trailing_junk) return junk_string_value_;
  ------------------
  |  Branch (704:9): [True: 1, False: 1.03k]
  |  Branch (704:18): [True: 0, False: 1]
  ------------------
  705|  1.03k|    if (octal) goto parsing_done;
  ------------------
  |  Branch (705:9): [True: 1, False: 1.03k]
  ------------------
  706|  1.03k|    Iterator junk_begin = current;
  707|  1.03k|    ++current;
  708|  1.03k|    if (current == end) {
  ------------------
  |  Branch (708:9): [True: 4, False: 1.02k]
  ------------------
  709|      4|      if (allow_trailing_junk) {
  ------------------
  |  Branch (709:11): [True: 4, False: 0]
  ------------------
  710|      4|        current = junk_begin;
  711|      4|        goto parsing_done;
  712|      4|      } else {
  713|      0|        return junk_string_value_;
  714|      0|      }
  715|      4|    }
  716|  1.02k|    char exponen_sign = '+';
  717|  1.02k|    if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (717:9): [True: 1, False: 1.02k]
  |  Branch (717:28): [True: 370, False: 655]
  ------------------
  718|    371|      exponen_sign = static_cast<char>(*current);
  719|    371|      ++current;
  720|    371|      if (current == end) {
  ------------------
  |  Branch (720:11): [True: 2, False: 369]
  ------------------
  721|      2|        if (allow_trailing_junk) {
  ------------------
  |  Branch (721:13): [True: 2, False: 0]
  ------------------
  722|      2|          current = junk_begin;
  723|      2|          goto parsing_done;
  724|      2|        } else {
  725|      0|          return junk_string_value_;
  726|      0|        }
  727|      2|      }
  728|    371|    }
  729|       |
  730|  1.02k|    if (current == end || *current < '0' || *current > '9') {
  ------------------
  |  Branch (730:9): [True: 0, False: 1.02k]
  |  Branch (730:27): [True: 16, False: 1.00k]
  |  Branch (730:45): [True: 5, False: 1.00k]
  ------------------
  731|     21|      if (allow_trailing_junk) {
  ------------------
  |  Branch (731:11): [True: 21, False: 0]
  ------------------
  732|     21|        current = junk_begin;
  733|     21|        goto parsing_done;
  734|     21|      } else {
  735|      0|        return junk_string_value_;
  736|      0|      }
  737|     21|    }
  738|       |
  739|  1.00k|    const int max_exponent = INT_MAX / 2;
  740|  1.00k|    DOUBLE_CONVERSION_ASSERT(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
  ------------------
  |  |   47|  1.00k|    assert(condition)
  ------------------
  |  Branch (740:5): [True: 1.00k, False: 0]
  |  Branch (740:5): [True: 1.00k, False: 0]
  |  Branch (740:5): [True: 1.00k, False: 0]
  ------------------
  741|  1.00k|    int num = 0;
  742|  4.18k|    do {
  743|       |      // Check overflow.
  744|  4.18k|      int digit = *current - '0';
  745|  4.18k|      if (num >= max_exponent / 10
  ------------------
  |  Branch (745:11): [True: 695, False: 3.48k]
  ------------------
  746|    695|          && !(num == max_exponent / 10 && digit <= max_exponent % 10)) {
  ------------------
  |  Branch (746:16): [True: 7, False: 688]
  |  Branch (746:44): [True: 5, False: 2]
  ------------------
  747|    690|        num = max_exponent;
  748|  3.49k|      } else {
  749|  3.49k|        num = num * 10 + digit;
  750|  3.49k|      }
  751|  4.18k|      ++current;
  752|  4.18k|    } while (current != end && *current >= '0' && *current <= '9');
  ------------------
  |  Branch (752:14): [True: 3.19k, False: 986]
  |  Branch (752:32): [True: 3.18k, False: 10]
  |  Branch (752:51): [True: 3.18k, False: 7]
  ------------------
  753|       |
  754|  1.00k|    exponent += (exponen_sign == '-' ? -num : num);
  ------------------
  |  Branch (754:18): [True: 369, False: 634]
  ------------------
  755|  1.00k|  }
  756|       |
  757|  1.10k|  if (!(allow_trailing_spaces || allow_trailing_junk) && (current != end)) {
  ------------------
  |  Branch (757:9): [True: 1.10k, False: 0]
  |  Branch (757:34): [True: 0, False: 0]
  |  Branch (757:58): [True: 0, False: 0]
  ------------------
  758|      0|    return junk_string_value_;
  759|      0|  }
  760|  1.10k|  if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
  ------------------
  |  Branch (760:7): [True: 0, False: 1.10k]
  |  Branch (760:31): [True: 0, False: 0]
  ------------------
  761|      0|    return junk_string_value_;
  762|      0|  }
  763|  1.10k|  if (allow_trailing_spaces) {
  ------------------
  |  Branch (763:7): [True: 1.10k, False: 0]
  ------------------
  764|  1.10k|    AdvanceToNonspace(&current, end);
  765|  1.10k|  }
  766|       |
  767|  2.13k|  parsing_done:
  768|  2.13k|  exponent += insignificant_digits;
  769|       |
  770|  2.13k|  if (octal) {
  ------------------
  |  Branch (770:7): [True: 216, False: 1.92k]
  ------------------
  771|    216|    double result;
  772|    216|    bool result_is_junk;
  773|    216|    char* start = buffer;
  774|    216|    result = RadixStringToIeee<3>(&start,
  775|    216|                                  buffer + buffer_pos,
  776|    216|                                  sign,
  777|    216|                                  separator_,
  778|    216|                                  false, // Don't parse as hex_float.
  779|    216|                                  allow_trailing_junk,
  780|    216|                                  allow_trailing_spaces,
  781|    216|                                  junk_string_value_,
  782|    216|                                  read_as_double,
  783|    216|                                  &result_is_junk);
  784|    216|    DOUBLE_CONVERSION_ASSERT(!result_is_junk);
  ------------------
  |  |   47|    216|    assert(condition)
  ------------------
  |  Branch (784:5): [True: 216, False: 0]
  ------------------
  785|    216|    *processed_characters_count = static_cast<int>(current - input);
  786|    216|    return result;
  787|    216|  }
  788|       |
  789|  1.92k|  if (nonzero_digit_dropped) {
  ------------------
  |  Branch (789:7): [True: 25, False: 1.89k]
  ------------------
  790|     25|    buffer[buffer_pos++] = '1';
  791|     25|    exponent--;
  792|     25|  }
  793|       |
  794|  1.92k|  DOUBLE_CONVERSION_ASSERT(buffer_pos < kBufferSize);
  ------------------
  |  |   47|  1.92k|    assert(condition)
  ------------------
  |  Branch (794:3): [True: 1.92k, False: 0]
  ------------------
  795|  1.92k|  buffer[buffer_pos] = '\0';
  796|       |
  797|       |  // Code above ensures there are no leading zeros and the buffer has fewer than
  798|       |  // kMaxSignificantDecimalDigits characters. Trim trailing zeros.
  799|  1.92k|  Vector<const char> chars(buffer, buffer_pos);
  800|  1.92k|  chars = TrimTrailingZeros(chars);
  801|  1.92k|  exponent += buffer_pos - chars.length();
  802|       |
  803|  1.92k|  double converted;
  804|  1.92k|  if (read_as_double) {
  ------------------
  |  Branch (804:7): [True: 1.92k, False: 0]
  ------------------
  805|  1.92k|    converted = StrtodTrimmed(chars, exponent);
  806|  1.92k|  } else {
  807|      0|    converted = StrtofTrimmed(chars, exponent);
  808|      0|  }
  809|  1.92k|  *processed_characters_count = static_cast<int>(current - input);
  810|  1.92k|  return sign? -converted: converted;
  ------------------
  |  Branch (810:10): [True: 1, False: 1.91k]
  ------------------
  811|  1.92k|}
string-to-double.cc:_ZN17double_conversionL17AdvanceToNonspaceIPKcEEbPT_S3_:
  156|  4.67k|static inline bool AdvanceToNonspace(Iterator* current, Iterator end) {
  157|  6.38k|  while (*current != end) {
  ------------------
  |  Branch (157:10): [True: 4.93k, False: 1.44k]
  ------------------
  158|  4.93k|    if (!isWhitespace(**current)) return true;
  ------------------
  |  Branch (158:9): [True: 3.22k, False: 1.70k]
  ------------------
  159|  1.70k|    ++*current;
  160|  1.70k|  }
  161|  1.44k|  return false;
  162|  4.67k|}
string-to-double.cc:_ZN17double_conversionL12isWhitespaceEi:
  140|  4.93k|static bool isWhitespace(int x) {
  141|  4.93k|  if (x < 128) {
  ------------------
  |  Branch (141:7): [True: 4.93k, False: 0]
  ------------------
  142|  29.5k|    for (int i = 0; i < kWhitespaceTable7Length; i++) {
  ------------------
  |  Branch (142:21): [True: 26.3k, False: 3.22k]
  ------------------
  143|  26.3k|      if (kWhitespaceTable7[i] == x) return true;
  ------------------
  |  Branch (143:11): [True: 1.70k, False: 24.6k]
  ------------------
  144|  26.3k|    }
  145|  4.93k|  } else {
  146|      0|    for (int i = 0; i < kWhitespaceTable16Length; i++) {
  ------------------
  |  Branch (146:21): [True: 0, False: 0]
  ------------------
  147|      0|      if (kWhitespaceTable16[i] == x) return true;
  ------------------
  |  Branch (147:11): [True: 0, False: 0]
  ------------------
  148|      0|    }
  149|      0|  }
  150|  3.22k|  return false;
  151|  4.93k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_121ConsumeFirstCharacterIcEEbT_PKcb:
  112|  5.72k|                                         bool case_insensitivity) {
  113|  5.72k|  const uint32_t c = CodeUnit(ch);
  114|  5.72k|  const uint32_t first = CodeUnit(str[0]);
  115|  5.72k|  return case_insensitivity ? ToLower(c) == ToLower(first) : c == first;
  ------------------
  |  Branch (115:10): [True: 5.72k, False: 0]
  ------------------
  116|  5.72k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_18CodeUnitEc:
   57|  11.5k|inline uint32_t CodeUnit(char ch) {
   58|  11.5k|  return static_cast<unsigned char>(ch);
   59|  11.5k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_17ToLowerEj:
   65|  11.5k|inline uint32_t ToLower(uint32_t ch) {
   66|  11.5k|  if (ch > 0x7F) return ch;
  ------------------
  |  Branch (66:7): [True: 41, False: 11.4k]
  ------------------
   67|  11.4k|  static const std::ctype<char>& cType =
   68|  11.4k|      std::use_facet<std::ctype<char> >(std::locale::classic());
   69|  11.4k|  return static_cast<unsigned char>(cType.tolower(static_cast<char>(ch)));
   70|  11.5k|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_116ConsumeSubStringIPKcEEbPT_S4_S3_b:
  100|     20|                             bool allow_case_insensitivity) {
  101|     20|  if (allow_case_insensitivity) {
  ------------------
  |  Branch (101:7): [True: 20, False: 0]
  ------------------
  102|     20|    return ConsumeSubStringImpl(current, end, substring, ToLower);
  103|     20|  } else {
  104|      0|    return ConsumeSubStringImpl(current, end, substring, Pass);
  105|      0|  }
  106|     20|}
string-to-double.cc:_ZN17double_conversion12_GLOBAL__N_120ConsumeSubStringImplIPKcPFjjEEEbPT_S6_S3_T0_:
   80|     20|                                        Converter converter) {
   81|     20|  DOUBLE_CONVERSION_ASSERT(
  ------------------
  |  |   47|     20|    assert(condition)
  ------------------
  |  Branch (81:3): [True: 20, False: 0]
  ------------------
   82|     20|      converter(CodeUnit(**current)) == converter(CodeUnit(*substring)));
   83|     30|  for (substring++; *substring != '\0'; substring++) {
  ------------------
  |  Branch (83:21): [True: 26, False: 4]
  ------------------
   84|     26|    ++*current;
   85|     26|    if (*current == end ||
  ------------------
  |  Branch (85:9): [True: 5, False: 21]
  ------------------
   86|     21|        converter(CodeUnit(**current)) != converter(CodeUnit(*substring))) {
  ------------------
  |  Branch (86:9): [True: 11, False: 10]
  ------------------
   87|     16|      return false;
   88|     16|    }
   89|     26|  }
   90|      4|  ++*current;
   91|      4|  return true;
   92|     20|}
string-to-double.cc:_ZN17double_conversionL7AdvanceIPKcEEbPT_tiRS3_:
  207|  9.93M|static bool Advance (Iterator* it, uc16 separator, int base, Iterator& end) {
  208|  9.93M|  if (separator == StringToDoubleConverter::kNoSeparator) {
  ------------------
  |  Branch (208:7): [True: 9.93M, False: 0]
  ------------------
  209|  9.93M|    ++(*it);
  210|  9.93M|    return *it == end;
  211|  9.93M|  }
  212|      0|  if (!isDigit(**it, base)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 0]
  ------------------
  213|      0|    ++(*it);
  214|      0|    return *it == end;
  215|      0|  }
  216|      0|  ++(*it);
  217|      0|  if (*it == end) return true;
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|  if (*it + 1 == end) return false;
  ------------------
  |  Branch (218:7): [True: 0, False: 0]
  ------------------
  219|      0|  if (**it == separator && isDigit(*(*it + 1), base)) {
  ------------------
  |  Branch (219:7): [True: 0, False: 0]
  |  Branch (219:28): [True: 0, False: 0]
  ------------------
  220|      0|    ++(*it);
  221|      0|  }
  222|      0|  return *it == end;
  223|      0|}
string-to-double.cc:_ZN17double_conversionL10SignedZeroEb:
  172|     32|static double SignedZero(bool sign) {
  173|     32|  return sign ? -0.0 : 0.0;
  ------------------
  |  Branch (173:10): [True: 1, False: 31]
  ------------------
  174|     32|}
string-to-double.cc:_ZN17double_conversionL16IsHexFloatStringIPKcEEbT_S3_tbb:
  237|    808|                             bool allow_trailing_spaces) {
  238|    808|  DOUBLE_CONVERSION_ASSERT(start != end);
  ------------------
  |  |   47|    808|    assert(condition)
  ------------------
  |  Branch (238:3): [True: 808, False: 0]
  ------------------
  239|       |
  240|    808|  Iterator current = start;
  241|       |
  242|    808|  bool saw_digit = false;
  243|  1.05M|  while (isDigit(*current, 16)) {
  ------------------
  |  Branch (243:10): [True: 1.05M, False: 594]
  ------------------
  244|  1.05M|    saw_digit = true;
  245|  1.05M|    if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (245:9): [True: 214, False: 1.05M]
  ------------------
  246|  1.05M|  }
  247|    594|  if (*current == '.') {
  ------------------
  |  Branch (247:7): [True: 125, False: 469]
  ------------------
  248|    125|    if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (248:9): [True: 5, False: 120]
  ------------------
  249|  2.21M|    while (isDigit(*current, 16)) {
  ------------------
  |  Branch (249:12): [True: 2.21M, False: 103]
  ------------------
  250|  2.21M|      saw_digit = true;
  251|  2.21M|      if (Advance(&current, separator, 16, end)) return false;
  ------------------
  |  Branch (251:11): [True: 17, False: 2.21M]
  ------------------
  252|  2.21M|    }
  253|    120|  }
  254|    572|  if (!saw_digit) return false;
  ------------------
  |  Branch (254:7): [True: 56, False: 516]
  ------------------
  255|    516|  if (*current != 'p' && *current != 'P') return false;
  ------------------
  |  Branch (255:7): [True: 227, False: 289]
  |  Branch (255:26): [True: 89, False: 138]
  ------------------
  256|       |  // The separator is only allowed between significand digits, not in the
  257|       |  // exponent, so advance through the exponent with no separator.
  258|    427|  const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  259|    427|  if (Advance(&current, kNoSeparator, 16, end)) return false;
  ------------------
  |  Branch (259:7): [True: 2, False: 425]
  ------------------
  260|    425|  if (*current == '+' || *current == '-') {
  ------------------
  |  Branch (260:7): [True: 4, False: 421]
  |  Branch (260:26): [True: 61, False: 360]
  ------------------
  261|     65|    if (Advance(&current, kNoSeparator, 16, end)) return false;
  ------------------
  |  Branch (261:9): [True: 2, False: 63]
  ------------------
  262|     65|  }
  263|    423|  if (!isDigit(*current, 10)) return false;
  ------------------
  |  Branch (263:7): [True: 19, False: 404]
  ------------------
  264|    404|  if (Advance(&current, kNoSeparator, 16, end)) return true;
  ------------------
  |  Branch (264:7): [True: 214, False: 190]
  ------------------
  265|  1.97k|  while (isDigit(*current, 10)) {
  ------------------
  |  Branch (265:10): [True: 1.93k, False: 36]
  ------------------
  266|  1.93k|    if (Advance(&current, kNoSeparator, 16, end)) return true;
  ------------------
  |  Branch (266:9): [True: 154, False: 1.78k]
  ------------------
  267|  1.93k|  }
  268|       |  // Trailing whitespace is junk unless ALLOW_TRAILING_SPACES is set, as it is
  269|       |  // for decimal numbers.
  270|     36|  if (allow_trailing_junk) return true;
  ------------------
  |  Branch (270:7): [True: 36, False: 0]
  ------------------
  271|      0|  return allow_trailing_spaces && !AdvanceToNonspace(&current, end);
  ------------------
  |  Branch (271:10): [True: 0, False: 0]
  |  Branch (271:35): [True: 0, False: 0]
  ------------------
  272|     36|}
string-to-double.cc:_ZN17double_conversionL7isDigitEii:
  165|  4.32M|static bool isDigit(int x, int radix) {
  166|  4.32M|  return (x >= '0' && x <= '9' && x < '0' + radix)
  ------------------
  |  Branch (166:11): [True: 4.32M, False: 321]
  |  Branch (166:23): [True: 4.29M, False: 38.4k]
  |  Branch (166:35): [True: 4.29M, False: 0]
  ------------------
  167|  38.7k|      || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
  ------------------
  |  Branch (167:11): [True: 38.6k, False: 55]
  |  Branch (167:25): [True: 35.9k, False: 2.79k]
  |  Branch (167:37): [True: 35.5k, False: 335]
  ------------------
  168|  3.18k|      || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
  ------------------
  |  Branch (168:11): [True: 3.13k, False: 55]
  |  Branch (168:25): [True: 2.82k, False: 308]
  |  Branch (168:37): [True: 2.30k, False: 519]
  ------------------
  169|  4.32M|}
string-to-double.cc:_ZN17double_conversionL17RadixStringToIeeeILi4EPKcEEdPT0_S3_btbbbdbPb:
  289|    530|                                bool* result_is_junk) {
  290|    530|  DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    530|    assert(condition)
  ------------------
  |  Branch (290:3): [True: 530, False: 0]
  ------------------
  291|    530|  DOUBLE_CONVERSION_ASSERT(!parse_as_hex_float ||
  ------------------
  |  |   47|    530|    assert(condition)
  ------------------
  |  Branch (291:3): [True: 328, False: 202]
  |  Branch (291:3): [True: 202, False: 0]
  |  Branch (291:3): [True: 530, False: 0]
  ------------------
  292|    530|      IsHexFloatString(*current, end, separator, allow_trailing_junk,
  293|    530|                       allow_trailing_spaces));
  294|       |
  295|    530|  const int kDoubleSize = Double::kSignificandSize;
  296|    530|  const int kSingleSize = Single::kSignificandSize;
  297|       |  // A hex-float is formed here as a double and rounded to float by the caller
  298|       |  // (StringToFloat casts the result). Rounding the significand to single
  299|       |  // precision here would double-round both subnormal floats and floats whose
  300|       |  // exact significand exceeds 53 bits, so keep the full double significand and
  301|       |  // round it to odd, which makes that final single-precision cast correct.
  302|    530|  const bool round_hex_float_to_single = parse_as_hex_float && !read_as_double;
  ------------------
  |  Branch (302:42): [True: 202, False: 328]
  |  Branch (302:64): [True: 0, False: 202]
  ------------------
  303|    530|  const int kSignificandSize =
  304|    530|      (read_as_double || parse_as_hex_float) ? kDoubleSize : kSingleSize;
  ------------------
  |  Branch (304:8): [True: 530, False: 0]
  |  Branch (304:26): [True: 0, False: 0]
  ------------------
  305|       |
  306|    530|  *result_is_junk = true;
  307|       |
  308|    530|  int64_t number = 0;
  309|    530|  int exponent = 0;
  310|    530|  const int radix = (1 << radix_log_2);
  311|       |  // Whether we have encountered a '.' and are parsing the decimal digits.
  312|       |  // Only relevant if parse_as_hex_float is true.
  313|    530|  bool post_decimal = false;
  314|       |
  315|       |  // Skip leading 0s.
  316|    967|  while (**current == '0') {
  ------------------
  |  Branch (316:10): [True: 445, False: 522]
  ------------------
  317|    445|    if (Advance(current, separator, radix, end)) {
  ------------------
  |  Branch (317:9): [True: 8, False: 437]
  ------------------
  318|      8|      *result_is_junk = false;
  319|      8|      return SignedZero(sign);
  320|      8|    }
  321|    445|  }
  322|       |
  323|  1.10M|  while (true) {
  ------------------
  |  Branch (323:10): [True: 1.10M, Folded]
  ------------------
  324|  1.10M|    int digit;
  325|  1.10M|    if (IsDecimalDigitForRadix(**current, radix)) {
  ------------------
  |  Branch (325:9): [True: 1.10M, False: 2.25k]
  ------------------
  326|  1.10M|      digit = static_cast<char>(**current) - '0';
  327|  1.10M|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (327:11): [True: 1.10M, False: 1.14k]
  ------------------
  328|  1.10M|    } else if (IsCharacterDigitForRadix(**current, radix, 'a')) {
  ------------------
  |  Branch (328:16): [True: 1.04k, False: 1.20k]
  ------------------
  329|  1.04k|      digit = static_cast<char>(**current) - 'a' + 10;
  330|  1.04k|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (330:11): [True: 71, False: 971]
  ------------------
  331|  1.20k|    } else if (IsCharacterDigitForRadix(**current, radix, 'A')) {
  ------------------
  |  Branch (331:16): [True: 910, False: 299]
  ------------------
  332|    910|      digit = static_cast<char>(**current) - 'A' + 10;
  333|    910|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (333:11): [True: 61, False: 849]
  ------------------
  334|    910|    } else if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (334:16): [True: 212, False: 87]
  |  Branch (334:38): [True: 37, False: 175]
  ------------------
  335|     37|      post_decimal = true;
  336|     37|      Advance(current, separator, radix, end);
  337|     37|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|     37|    assert(condition)
  ------------------
  |  Branch (337:7): [True: 37, False: 0]
  ------------------
  338|     37|      continue;
  339|    262|    } else if (parse_as_hex_float && (**current == 'p' || **current == 'P')) {
  ------------------
  |  Branch (339:16): [True: 175, False: 87]
  |  Branch (339:39): [True: 116, False: 59]
  |  Branch (339:59): [True: 59, False: 0]
  ------------------
  340|    175|      break;
  341|    175|    } else {
  342|       |      // Trailing whitespace is junk unless ALLOW_TRAILING_SPACES is set, as it
  343|       |      // is for decimal numbers.
  344|     87|      if (allow_trailing_junk ||
  ------------------
  |  Branch (344:11): [True: 87, False: 0]
  ------------------
  345|     87|          (allow_trailing_spaces && !AdvanceToNonspace(current, end))) {
  ------------------
  |  Branch (345:12): [True: 0, False: 0]
  |  Branch (345:37): [True: 0, False: 0]
  ------------------
  346|     87|        break;
  347|     87|      } else {
  348|      0|        return junk_string_value;
  349|      0|      }
  350|     87|    }
  351|       |
  352|  1.10M|    number = number * radix + digit;
  353|  1.10M|    int overflow = static_cast<int>(number >> kSignificandSize);
  354|  1.10M|    if (overflow != 0) {
  ------------------
  |  Branch (354:9): [True: 135, False: 1.10M]
  ------------------
  355|       |      // Overflow occurred. Need to determine which direction to round the
  356|       |      // result.
  357|    135|      int overflow_bits_count = 1;
  358|    387|      while (overflow > 1) {
  ------------------
  |  Branch (358:14): [True: 252, False: 135]
  ------------------
  359|    252|        overflow_bits_count++;
  360|    252|        overflow >>= 1;
  361|    252|      }
  362|       |
  363|    135|      int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
  364|    135|      int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
  365|    135|      number >>= overflow_bits_count;
  366|    135|      exponent += overflow_bits_count;
  367|       |
  368|    135|      bool zero_tail = true;
  369|  1.05M|      for (;;) {
  370|  1.05M|        if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (370:13): [True: 81, False: 1.05M]
  ------------------
  371|  1.05M|        if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (371:13): [True: 710, False: 1.05M]
  |  Branch (371:35): [True: 1, False: 709]
  ------------------
  372|       |          // Just run over the '.'. We are just trying to see whether there is
  373|       |          // a non-zero digit somewhere.
  374|      1|          Advance(current, separator, radix, end);
  375|      1|          DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      1|    assert(condition)
  ------------------
  |  Branch (375:11): [True: 1, False: 0]
  ------------------
  376|      1|          post_decimal = true;
  377|      1|        }
  378|  1.05M|        if (!isDigit(**current, radix)) break;
  ------------------
  |  Branch (378:13): [True: 54, False: 1.05M]
  ------------------
  379|  1.05M|        zero_tail = zero_tail && **current == '0';
  ------------------
  |  Branch (379:21): [True: 57.3k, False: 995k]
  |  Branch (379:34): [True: 57.3k, False: 84]
  ------------------
  380|  1.05M|        if (!post_decimal) {
  ------------------
  |  Branch (380:13): [True: 1.05M, False: 344]
  ------------------
  381|  1.05M|          if (exponent <= INT_MAX - radix_log_2) {
  ------------------
  |  Branch (381:15): [True: 1.05M, False: 0]
  ------------------
  382|  1.05M|            exponent += radix_log_2;
  383|  1.05M|          } else {
  384|      0|            exponent = INT_MAX;
  385|      0|          }
  386|  1.05M|        }
  387|  1.05M|      }
  388|       |
  389|    135|      if (!parse_as_hex_float && !allow_trailing_junk) {
  ------------------
  |  Branch (389:11): [True: 108, False: 27]
  |  Branch (389:34): [True: 0, False: 108]
  ------------------
  390|      0|        if (allow_trailing_spaces ? AdvanceToNonspace(current, end)
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|                                  : *current != end) {
  392|      0|          return junk_string_value;
  393|      0|        }
  394|      0|      }
  395|       |
  396|    135|      if (round_hex_float_to_single) {
  ------------------
  |  Branch (396:11): [True: 0, False: 135]
  ------------------
  397|       |        // Round the significand to odd: set the lowest kept bit whenever any
  398|       |        // bit was dropped. The caller rounds this double to float; rounding to
  399|       |        // nearest here would double-round, but round-to-odd leaves that final
  400|       |        // single rounding correct for normal and subnormal results alike.
  401|      0|        if (dropped_bits != 0 || !zero_tail) {
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  |  Branch (401:34): [True: 0, False: 0]
  ------------------
  402|      0|          number |= 1;
  403|      0|        }
  404|    135|      } else {
  405|    135|        int middle_value = (1 << (overflow_bits_count - 1));
  406|    135|        if (dropped_bits > middle_value) {
  ------------------
  |  Branch (406:13): [True: 38, False: 97]
  ------------------
  407|     38|          number++;  // Rounding up.
  408|     97|        } else if (dropped_bits == middle_value) {
  ------------------
  |  Branch (408:20): [True: 20, False: 77]
  ------------------
  409|       |          // Rounding to even to consistency with decimals: half-way case rounds
  410|       |          // up if significant part is odd and down otherwise.
  411|     20|          if ((number & 1) != 0 || !zero_tail) {
  ------------------
  |  Branch (411:15): [True: 10, False: 10]
  |  Branch (411:36): [True: 9, False: 1]
  ------------------
  412|     19|            number++;  // Rounding up.
  413|     19|          }
  414|     20|        }
  415|       |
  416|       |        // Rounding up may cause overflow.
  417|    135|        if ((number & ((int64_t)1 << kSignificandSize)) != 0) {
  ------------------
  |  Branch (417:13): [True: 3, False: 132]
  ------------------
  418|      3|          exponent++;
  419|      3|          number >>= 1;
  420|      3|        }
  421|    135|      }
  422|    135|      break;
  423|    135|    }
  424|  1.10M|    if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (424:9): [True: 125, False: 1.10M]
  ------------------
  425|  1.10M|  }
  426|       |
  427|    522|  DOUBLE_CONVERSION_ASSERT(number < ((int64_t)1 << kSignificandSize));
  ------------------
  |  |   47|    522|    assert(condition)
  ------------------
  |  Branch (427:3): [True: 522, False: 0]
  ------------------
  428|    522|  DOUBLE_CONVERSION_ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
  ------------------
  |  |   47|    522|    assert(condition)
  ------------------
  |  Branch (428:3): [True: 522, False: 0]
  ------------------
  429|       |
  430|    522|  *result_is_junk = false;
  431|       |
  432|    522|  if (parse_as_hex_float) {
  ------------------
  |  Branch (432:7): [True: 202, False: 320]
  ------------------
  433|    202|    DOUBLE_CONVERSION_ASSERT(**current == 'p' || **current == 'P');
  ------------------
  |  |   47|    202|    assert(condition)
  ------------------
  |  Branch (433:5): [True: 136, False: 66]
  |  Branch (433:5): [True: 66, False: 0]
  |  Branch (433:5): [True: 202, False: 0]
  ------------------
  434|       |    // The separator is only allowed between significand digits, not in the
  435|       |    // exponent, so advance through the exponent with no separator. This must
  436|       |    // match IsHexFloatString, which validated the string the same way.
  437|    202|    const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  438|    202|    Advance(current, kNoSeparator, radix, end);
  439|    202|    DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    202|    assert(condition)
  ------------------
  |  Branch (439:5): [True: 202, False: 0]
  ------------------
  440|    202|    bool is_negative = false;
  441|    202|    if (**current == '+') {
  ------------------
  |  Branch (441:9): [True: 1, False: 201]
  ------------------
  442|      1|      Advance(current, kNoSeparator, radix, end);
  443|      1|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      1|    assert(condition)
  ------------------
  |  Branch (443:7): [True: 1, False: 0]
  ------------------
  444|    201|    } else if (**current == '-') {
  ------------------
  |  Branch (444:16): [True: 30, False: 171]
  ------------------
  445|     30|      is_negative = true;
  446|     30|      Advance(current, kNoSeparator, radix, end);
  447|     30|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|     30|    assert(condition)
  ------------------
  |  Branch (447:7): [True: 30, False: 0]
  ------------------
  448|     30|    }
  449|    202|    int written_exponent = 0;
  450|  1.18k|    while (IsDecimalDigitForRadix(**current, 10)) {
  ------------------
  |  Branch (450:12): [True: 1.17k, False: 18]
  ------------------
  451|       |      // No need to read exponents if they are too big. That could potentially overflow
  452|       |      // the `written_exponent` variable.
  453|  1.17k|      if (abs(written_exponent) <= 100 * Double::kMaxExponent) {
  ------------------
  |  Branch (453:11): [True: 839, False: 331]
  ------------------
  454|    839|        written_exponent = 10 * written_exponent + **current - '0';
  455|    839|      }
  456|  1.17k|      if (Advance(current, kNoSeparator, radix, end)) break;
  ------------------
  |  Branch (456:11): [True: 184, False: 986]
  ------------------
  457|  1.17k|    }
  458|    202|    if (is_negative) written_exponent = -written_exponent;
  ------------------
  |  Branch (458:9): [True: 30, False: 172]
  ------------------
  459|    202|    exponent += written_exponent;
  460|    202|  }
  461|       |
  462|    522|  if (exponent == 0 || number == 0) {
  ------------------
  |  Branch (462:7): [True: 222, False: 300]
  |  Branch (462:24): [True: 37, False: 263]
  ------------------
  463|    259|    if (sign) {
  ------------------
  |  Branch (463:9): [True: 54, False: 205]
  ------------------
  464|     54|      if (number == 0) return -0.0;
  ------------------
  |  Branch (464:11): [True: 1, False: 53]
  ------------------
  465|     53|      number = -number;
  466|     53|    }
  467|    258|    return static_cast<double>(number);
  468|    259|  }
  469|       |
  470|    263|  DOUBLE_CONVERSION_ASSERT(number != 0);
  ------------------
  |  |   47|    263|    assert(condition)
  ------------------
  |  Branch (470:3): [True: 263, False: 0]
  ------------------
  471|       |  // number is an exact integer below 2^kSignificandSize, so number * 2^exponent
  472|       |  // can be formed directly. Double(DiyFp(number, exponent)) would instead assume
  473|       |  // a normalized significand: a hex-float like "0x1p1000" or "0x2p-1075" reaches
  474|       |  // here with a small number and a large exponent, which DiyFpToUint64 then reads
  475|       |  // as an overflow (infinity) or underflow (zero) rather than the finite result.
  476|    263|  double result = ldexp(static_cast<double>(number), exponent);
  477|    263|  return sign ? -result : result;
  ------------------
  |  Branch (477:10): [True: 2, False: 261]
  ------------------
  478|    263|}
string-to-double.cc:_ZN17double_conversionL22IsDecimalDigitForRadixEii:
  190|  1.11M|static bool inline IsDecimalDigitForRadix(int c, int radix) {
  191|  1.11M|  return '0' <= c && c <= '9' && (c - '0') < radix;
  ------------------
  |  Branch (191:10): [True: 1.11M, False: 97]
  |  Branch (191:22): [True: 1.11M, False: 2.17k]
  |  Branch (191:34): [True: 1.11M, False: 0]
  ------------------
  192|  1.11M|}
string-to-double.cc:_ZN17double_conversionL24IsCharacterDigitForRadixEiic:
  201|  3.46k|static bool IsCharacterDigitForRadix(int c, int radix, char a_character) {
  202|  3.46k|  return radix > 10 && c >= a_character && c < a_character + radix - 10;
  ------------------
  |  Branch (202:10): [True: 3.46k, False: 0]
  |  Branch (202:24): [True: 2.29k, False: 1.16k]
  |  Branch (202:44): [True: 1.95k, False: 346]
  ------------------
  203|  3.46k|}
string-to-double.cc:_ZN17double_conversionL17RadixStringToIeeeILi3EPcEEdPT0_S2_btbbbdbPb:
  289|    216|                                bool* result_is_junk) {
  290|    216|  DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|    216|    assert(condition)
  ------------------
  |  Branch (290:3): [True: 216, False: 0]
  ------------------
  291|    216|  DOUBLE_CONVERSION_ASSERT(!parse_as_hex_float ||
  ------------------
  |  |   47|    216|    assert(condition)
  ------------------
  |  Branch (291:3): [True: 216, False: 0]
  |  Branch (291:3): [True: 0, False: 0]
  |  Branch (291:3): [True: 216, False: 0]
  ------------------
  292|    216|      IsHexFloatString(*current, end, separator, allow_trailing_junk,
  293|    216|                       allow_trailing_spaces));
  294|       |
  295|    216|  const int kDoubleSize = Double::kSignificandSize;
  296|    216|  const int kSingleSize = Single::kSignificandSize;
  297|       |  // A hex-float is formed here as a double and rounded to float by the caller
  298|       |  // (StringToFloat casts the result). Rounding the significand to single
  299|       |  // precision here would double-round both subnormal floats and floats whose
  300|       |  // exact significand exceeds 53 bits, so keep the full double significand and
  301|       |  // round it to odd, which makes that final single-precision cast correct.
  302|    216|  const bool round_hex_float_to_single = parse_as_hex_float && !read_as_double;
  ------------------
  |  Branch (302:42): [True: 0, False: 216]
  |  Branch (302:64): [True: 0, False: 0]
  ------------------
  303|    216|  const int kSignificandSize =
  304|    216|      (read_as_double || parse_as_hex_float) ? kDoubleSize : kSingleSize;
  ------------------
  |  Branch (304:8): [True: 216, False: 0]
  |  Branch (304:26): [True: 0, False: 0]
  ------------------
  305|       |
  306|    216|  *result_is_junk = true;
  307|       |
  308|    216|  int64_t number = 0;
  309|    216|  int exponent = 0;
  310|    216|  const int radix = (1 << radix_log_2);
  311|       |  // Whether we have encountered a '.' and are parsing the decimal digits.
  312|       |  // Only relevant if parse_as_hex_float is true.
  313|    216|  bool post_decimal = false;
  314|       |
  315|       |  // Skip leading 0s.
  316|    216|  while (**current == '0') {
  ------------------
  |  Branch (316:10): [True: 0, False: 216]
  ------------------
  317|      0|    if (Advance(current, separator, radix, end)) {
  ------------------
  |  Branch (317:9): [True: 0, False: 0]
  ------------------
  318|      0|      *result_is_junk = false;
  319|      0|      return SignedZero(sign);
  320|      0|    }
  321|      0|  }
  322|       |
  323|  2.85k|  while (true) {
  ------------------
  |  Branch (323:10): [True: 2.85k, Folded]
  ------------------
  324|  2.85k|    int digit;
  325|  2.85k|    if (IsDecimalDigitForRadix(**current, radix)) {
  ------------------
  |  Branch (325:9): [True: 2.85k, False: 0]
  ------------------
  326|  2.85k|      digit = static_cast<char>(**current) - '0';
  327|  2.85k|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (327:11): [True: 0, False: 2.85k]
  ------------------
  328|  2.85k|    } else if (IsCharacterDigitForRadix(**current, radix, 'a')) {
  ------------------
  |  Branch (328:16): [True: 0, False: 0]
  ------------------
  329|      0|      digit = static_cast<char>(**current) - 'a' + 10;
  330|      0|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (330:11): [True: 0, False: 0]
  ------------------
  331|      0|    } else if (IsCharacterDigitForRadix(**current, radix, 'A')) {
  ------------------
  |  Branch (331:16): [True: 0, False: 0]
  ------------------
  332|      0|      digit = static_cast<char>(**current) - 'A' + 10;
  333|      0|      if (post_decimal) exponent -= radix_log_2;
  ------------------
  |  Branch (333:11): [True: 0, False: 0]
  ------------------
  334|      0|    } else if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (334:16): [True: 0, False: 0]
  |  Branch (334:38): [True: 0, False: 0]
  ------------------
  335|      0|      post_decimal = true;
  336|      0|      Advance(current, separator, radix, end);
  337|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (337:7): [True: 0, False: 0]
  ------------------
  338|      0|      continue;
  339|      0|    } else if (parse_as_hex_float && (**current == 'p' || **current == 'P')) {
  ------------------
  |  Branch (339:16): [True: 0, False: 0]
  |  Branch (339:39): [True: 0, False: 0]
  |  Branch (339:59): [True: 0, False: 0]
  ------------------
  340|      0|      break;
  341|      0|    } else {
  342|       |      // Trailing whitespace is junk unless ALLOW_TRAILING_SPACES is set, as it
  343|       |      // is for decimal numbers.
  344|      0|      if (allow_trailing_junk ||
  ------------------
  |  Branch (344:11): [True: 0, False: 0]
  ------------------
  345|      0|          (allow_trailing_spaces && !AdvanceToNonspace(current, end))) {
  ------------------
  |  Branch (345:12): [True: 0, False: 0]
  |  Branch (345:37): [True: 0, False: 0]
  ------------------
  346|      0|        break;
  347|      0|      } else {
  348|      0|        return junk_string_value;
  349|      0|      }
  350|      0|    }
  351|       |
  352|  2.85k|    number = number * radix + digit;
  353|  2.85k|    int overflow = static_cast<int>(number >> kSignificandSize);
  354|  2.85k|    if (overflow != 0) {
  ------------------
  |  Branch (354:9): [True: 103, False: 2.74k]
  ------------------
  355|       |      // Overflow occurred. Need to determine which direction to round the
  356|       |      // result.
  357|    103|      int overflow_bits_count = 1;
  358|    129|      while (overflow > 1) {
  ------------------
  |  Branch (358:14): [True: 26, False: 103]
  ------------------
  359|     26|        overflow_bits_count++;
  360|     26|        overflow >>= 1;
  361|     26|      }
  362|       |
  363|    103|      int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
  364|    103|      int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
  365|    103|      number >>= overflow_bits_count;
  366|    103|      exponent += overflow_bits_count;
  367|       |
  368|    103|      bool zero_tail = true;
  369|  3.51k|      for (;;) {
  370|  3.51k|        if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (370:13): [True: 103, False: 3.41k]
  ------------------
  371|  3.41k|        if (parse_as_hex_float && **current == '.') {
  ------------------
  |  Branch (371:13): [True: 0, False: 3.41k]
  |  Branch (371:35): [True: 0, False: 0]
  ------------------
  372|       |          // Just run over the '.'. We are just trying to see whether there is
  373|       |          // a non-zero digit somewhere.
  374|      0|          Advance(current, separator, radix, end);
  375|      0|          DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (375:11): [True: 0, False: 0]
  ------------------
  376|      0|          post_decimal = true;
  377|      0|        }
  378|  3.41k|        if (!isDigit(**current, radix)) break;
  ------------------
  |  Branch (378:13): [True: 0, False: 3.41k]
  ------------------
  379|  3.41k|        zero_tail = zero_tail && **current == '0';
  ------------------
  |  Branch (379:21): [True: 1.95k, False: 1.45k]
  |  Branch (379:34): [True: 1.91k, False: 34]
  ------------------
  380|  3.41k|        if (!post_decimal) {
  ------------------
  |  Branch (380:13): [True: 3.41k, False: 0]
  ------------------
  381|  3.41k|          if (exponent <= INT_MAX - radix_log_2) {
  ------------------
  |  Branch (381:15): [True: 3.41k, False: 0]
  ------------------
  382|  3.41k|            exponent += radix_log_2;
  383|  3.41k|          } else {
  384|      0|            exponent = INT_MAX;
  385|      0|          }
  386|  3.41k|        }
  387|  3.41k|      }
  388|       |
  389|    103|      if (!parse_as_hex_float && !allow_trailing_junk) {
  ------------------
  |  Branch (389:11): [True: 103, False: 0]
  |  Branch (389:34): [True: 0, False: 103]
  ------------------
  390|      0|        if (allow_trailing_spaces ? AdvanceToNonspace(current, end)
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|                                  : *current != end) {
  392|      0|          return junk_string_value;
  393|      0|        }
  394|      0|      }
  395|       |
  396|    103|      if (round_hex_float_to_single) {
  ------------------
  |  Branch (396:11): [True: 0, False: 103]
  ------------------
  397|       |        // Round the significand to odd: set the lowest kept bit whenever any
  398|       |        // bit was dropped. The caller rounds this double to float; rounding to
  399|       |        // nearest here would double-round, but round-to-odd leaves that final
  400|       |        // single rounding correct for normal and subnormal results alike.
  401|      0|        if (dropped_bits != 0 || !zero_tail) {
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  |  Branch (401:34): [True: 0, False: 0]
  ------------------
  402|      0|          number |= 1;
  403|      0|        }
  404|    103|      } else {
  405|    103|        int middle_value = (1 << (overflow_bits_count - 1));
  406|    103|        if (dropped_bits > middle_value) {
  ------------------
  |  Branch (406:13): [True: 6, False: 97]
  ------------------
  407|      6|          number++;  // Rounding up.
  408|     97|        } else if (dropped_bits == middle_value) {
  ------------------
  |  Branch (408:20): [True: 42, False: 55]
  ------------------
  409|       |          // Rounding to even to consistency with decimals: half-way case rounds
  410|       |          // up if significant part is odd and down otherwise.
  411|     42|          if ((number & 1) != 0 || !zero_tail) {
  ------------------
  |  Branch (411:15): [True: 27, False: 15]
  |  Branch (411:36): [True: 5, False: 10]
  ------------------
  412|     32|            number++;  // Rounding up.
  413|     32|          }
  414|     42|        }
  415|       |
  416|       |        // Rounding up may cause overflow.
  417|    103|        if ((number & ((int64_t)1 << kSignificandSize)) != 0) {
  ------------------
  |  Branch (417:13): [True: 1, False: 102]
  ------------------
  418|      1|          exponent++;
  419|      1|          number >>= 1;
  420|      1|        }
  421|    103|      }
  422|    103|      break;
  423|    103|    }
  424|  2.74k|    if (Advance(current, separator, radix, end)) break;
  ------------------
  |  Branch (424:9): [True: 113, False: 2.63k]
  ------------------
  425|  2.74k|  }
  426|       |
  427|    216|  DOUBLE_CONVERSION_ASSERT(number < ((int64_t)1 << kSignificandSize));
  ------------------
  |  |   47|    216|    assert(condition)
  ------------------
  |  Branch (427:3): [True: 216, False: 0]
  ------------------
  428|    216|  DOUBLE_CONVERSION_ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
  ------------------
  |  |   47|    216|    assert(condition)
  ------------------
  |  Branch (428:3): [True: 216, False: 0]
  ------------------
  429|       |
  430|    216|  *result_is_junk = false;
  431|       |
  432|    216|  if (parse_as_hex_float) {
  ------------------
  |  Branch (432:7): [True: 0, False: 216]
  ------------------
  433|      0|    DOUBLE_CONVERSION_ASSERT(**current == 'p' || **current == 'P');
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (433:5): [True: 0, False: 0]
  |  Branch (433:5): [True: 0, False: 0]
  |  Branch (433:5): [True: 0, False: 0]
  ------------------
  434|       |    // The separator is only allowed between significand digits, not in the
  435|       |    // exponent, so advance through the exponent with no separator. This must
  436|       |    // match IsHexFloatString, which validated the string the same way.
  437|      0|    const uc16 kNoSeparator = StringToDoubleConverter::kNoSeparator;
  438|      0|    Advance(current, kNoSeparator, radix, end);
  439|      0|    DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (439:5): [True: 0, False: 0]
  ------------------
  440|      0|    bool is_negative = false;
  441|      0|    if (**current == '+') {
  ------------------
  |  Branch (441:9): [True: 0, False: 0]
  ------------------
  442|      0|      Advance(current, kNoSeparator, radix, end);
  443|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (443:7): [True: 0, False: 0]
  ------------------
  444|      0|    } else if (**current == '-') {
  ------------------
  |  Branch (444:16): [True: 0, False: 0]
  ------------------
  445|      0|      is_negative = true;
  446|      0|      Advance(current, kNoSeparator, radix, end);
  447|      0|      DOUBLE_CONVERSION_ASSERT(*current != end);
  ------------------
  |  |   47|      0|    assert(condition)
  ------------------
  |  Branch (447:7): [True: 0, False: 0]
  ------------------
  448|      0|    }
  449|      0|    int written_exponent = 0;
  450|      0|    while (IsDecimalDigitForRadix(**current, 10)) {
  ------------------
  |  Branch (450:12): [True: 0, False: 0]
  ------------------
  451|       |      // No need to read exponents if they are too big. That could potentially overflow
  452|       |      // the `written_exponent` variable.
  453|      0|      if (abs(written_exponent) <= 100 * Double::kMaxExponent) {
  ------------------
  |  Branch (453:11): [True: 0, False: 0]
  ------------------
  454|      0|        written_exponent = 10 * written_exponent + **current - '0';
  455|      0|      }
  456|      0|      if (Advance(current, kNoSeparator, radix, end)) break;
  ------------------
  |  Branch (456:11): [True: 0, False: 0]
  ------------------
  457|      0|    }
  458|      0|    if (is_negative) written_exponent = -written_exponent;
  ------------------
  |  Branch (458:9): [True: 0, False: 0]
  ------------------
  459|      0|    exponent += written_exponent;
  460|      0|  }
  461|       |
  462|    216|  if (exponent == 0 || number == 0) {
  ------------------
  |  Branch (462:7): [True: 113, False: 103]
  |  Branch (462:24): [True: 0, False: 103]
  ------------------
  463|    113|    if (sign) {
  ------------------
  |  Branch (463:9): [True: 53, False: 60]
  ------------------
  464|     53|      if (number == 0) return -0.0;
  ------------------
  |  Branch (464:11): [True: 0, False: 53]
  ------------------
  465|     53|      number = -number;
  466|     53|    }
  467|    113|    return static_cast<double>(number);
  468|    113|  }
  469|       |
  470|    103|  DOUBLE_CONVERSION_ASSERT(number != 0);
  ------------------
  |  |   47|    103|    assert(condition)
  ------------------
  |  Branch (470:3): [True: 103, False: 0]
  ------------------
  471|       |  // number is an exact integer below 2^kSignificandSize, so number * 2^exponent
  472|       |  // can be formed directly. Double(DiyFp(number, exponent)) would instead assume
  473|       |  // a normalized significand: a hex-float like "0x1p1000" or "0x2p-1075" reaches
  474|       |  // here with a small number and a large exponent, which DiyFpToUint64 then reads
  475|       |  // as an overflow (infinity) or underflow (zero) rather than the finite result.
  476|    103|  double result = ldexp(static_cast<double>(number), exponent);
  477|    103|  return sign ? -result : result;
  ------------------
  |  Branch (477:10): [True: 1, False: 102]
  ------------------
  478|    103|}
string-to-double.cc:_ZN17double_conversionL7AdvanceIPcEEbPT_tiRS2_:
  207|  6.26k|static bool Advance (Iterator* it, uc16 separator, int base, Iterator& end) {
  208|  6.26k|  if (separator == StringToDoubleConverter::kNoSeparator) {
  ------------------
  |  Branch (208:7): [True: 6.26k, False: 0]
  ------------------
  209|  6.26k|    ++(*it);
  210|  6.26k|    return *it == end;
  211|  6.26k|  }
  212|      0|  if (!isDigit(**it, base)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 0]
  ------------------
  213|      0|    ++(*it);
  214|      0|    return *it == end;
  215|      0|  }
  216|      0|  ++(*it);
  217|      0|  if (*it == end) return true;
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|  if (*it + 1 == end) return false;
  ------------------
  |  Branch (218:7): [True: 0, False: 0]
  ------------------
  219|      0|  if (**it == separator && isDigit(*(*it + 1), base)) {
  ------------------
  |  Branch (219:7): [True: 0, False: 0]
  |  Branch (219:28): [True: 0, False: 0]
  ------------------
  220|      0|    ++(*it);
  221|      0|  }
  222|      0|  return *it == end;
  223|      0|}

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

_ZN17double_conversion13StrtodTrimmedENS_6VectorIKcEEi:
  482|  1.92k|double StrtodTrimmed(Vector<const char> trimmed, int exponent) {
  483|  1.92k|  DOUBLE_CONVERSION_ASSERT(trimmed.length() <= kMaxSignificantDecimalDigits);
  ------------------
  |  |   47|  1.92k|    assert(condition)
  ------------------
  |  Branch (483:3): [True: 1.92k, False: 0]
  ------------------
  484|  1.92k|  DOUBLE_CONVERSION_ASSERT(AssertTrimmedDigits(trimmed));
  ------------------
  |  |   47|  1.92k|    assert(condition)
  ------------------
  |  Branch (484:3): [True: 1.92k, False: 0]
  ------------------
  485|  1.92k|  double guess;
  486|  1.92k|  const bool is_correct = ComputeGuess(trimmed, exponent, &guess);
  487|  1.92k|  if (is_correct) {
  ------------------
  |  Branch (487:7): [True: 1.16k, False: 758]
  ------------------
  488|  1.16k|    return guess;
  489|  1.16k|  }
  490|    758|  DiyFp upper_boundary = Double(guess).UpperBoundary();
  491|    758|  int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
  492|    758|  if (comparison < 0) {
  ------------------
  |  Branch (492:7): [True: 208, False: 550]
  ------------------
  493|    208|    return guess;
  494|    550|  } else if (comparison > 0) {
  ------------------
  |  Branch (494:14): [True: 453, False: 97]
  ------------------
  495|    453|    return Double(guess).NextDouble();
  496|    453|  } else if ((Double(guess).Significand() & 1) == 0) {
  ------------------
  |  Branch (496:14): [True: 52, False: 45]
  ------------------
  497|       |    // Round towards even.
  498|     52|    return guess;
  499|     52|  } else {
  500|     45|    return Double(guess).NextDouble();
  501|     45|  }
  502|    758|}
strtod.cc:_ZN17double_conversionL19AssertTrimmedDigitsERKNS_6VectorIKcEE:
  473|  1.92k|static bool AssertTrimmedDigits(const Vector<const char>& buffer) {
  474|   120k|  for(int i = 0; i < buffer.length(); ++i) {
  ------------------
  |  Branch (474:18): [True: 119k, False: 1.92k]
  ------------------
  475|   119k|    if(!IsDigit(buffer[i])) {
  ------------------
  |  Branch (475:8): [True: 0, False: 119k]
  ------------------
  476|      0|      return false;
  477|      0|    }
  478|   119k|  }
  479|  1.92k|  return (buffer.length() == 0) || (IsNonZeroDigit(buffer[0]) && IsNonZeroDigit(buffer[buffer.length()-1]));
  ------------------
  |  Branch (479:10): [True: 59, False: 1.86k]
  |  Branch (479:37): [True: 1.86k, False: 0]
  |  Branch (479:66): [True: 1.86k, False: 0]
  ------------------
  480|  1.92k|}
strtod.cc:_ZN17double_conversionL7IsDigitEc:
  460|   119k|static bool IsDigit(const char d) {
  461|   119k|  return ('0' <= d) && (d <= '9');
  ------------------
  |  Branch (461:10): [True: 119k, False: 0]
  |  Branch (461:24): [True: 119k, False: 0]
  ------------------
  462|   119k|}
strtod.cc:_ZN17double_conversionL14IsNonZeroDigitEc:
  464|  3.72k|static bool IsNonZeroDigit(const char d) {
  465|  3.72k|  return ('1' <= d) && (d <= '9');
  ------------------
  |  Branch (465:10): [True: 3.72k, False: 0]
  |  Branch (465:24): [True: 3.72k, False: 0]
  ------------------
  466|  3.72k|}
strtod.cc:_ZN17double_conversionL12ComputeGuessENS_6VectorIKcEEiPd:
  435|  1.92k|                         double* guess) {
  436|  1.92k|  if (trimmed.length() == 0) {
  ------------------
  |  Branch (436:7): [True: 59, False: 1.86k]
  ------------------
  437|     59|    *guess = 0.0;
  438|     59|    return true;
  439|     59|  }
  440|  1.86k|  exponent = ClampExponent(exponent);
  441|  1.86k|  if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
  ------------------
  |  Branch (441:7): [True: 153, False: 1.70k]
  ------------------
  442|    153|    *guess = Double::Infinity();
  443|    153|    return true;
  444|    153|  }
  445|  1.70k|  if (exponent + trimmed.length() <= kMinDecimalPower) {
  ------------------
  |  Branch (445:7): [True: 75, False: 1.63k]
  ------------------
  446|     75|    *guess = 0.0;
  447|     75|    return true;
  448|     75|  }
  449|       |
  450|  1.63k|  if (DoubleStrtod(trimmed, exponent, guess) ||
  ------------------
  |  Branch (450:7): [True: 290, False: 1.34k]
  ------------------
  451|  1.34k|      DiyFpStrtod(trimmed, exponent, guess)) {
  ------------------
  |  Branch (451:7): [True: 584, False: 759]
  ------------------
  452|    874|    return true;
  453|    874|  }
  454|    759|  if (*guess == Double::Infinity()) {
  ------------------
  |  Branch (454:7): [True: 1, False: 758]
  ------------------
  455|      1|    return true;
  456|      1|  }
  457|    758|  return false;
  458|    759|}
strtod.cc:_ZN17double_conversionL13ClampExponentEi:
  128|  1.86k|static int ClampExponent(int exponent) {
  129|  1.86k|  const int kMaxExponent = INT_MAX / 2;
  130|  1.86k|  if (exponent > kMaxExponent) return kMaxExponent;
  ------------------
  |  Branch (130:7): [True: 1, False: 1.86k]
  ------------------
  131|  1.86k|  if (exponent < -kMaxExponent) return -kMaxExponent;
  ------------------
  |  Branch (131:7): [True: 4, False: 1.85k]
  ------------------
  132|  1.85k|  return exponent;
  133|  1.86k|}
strtod.cc:_ZN17double_conversionL12DoubleStrtodENS_6VectorIKcEEiPd:
  207|  1.63k|                         double* result) {
  208|       |#if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
  209|       |  // Avoid "unused parameter" warnings
  210|       |  (void) trimmed;
  211|       |  (void) exponent;
  212|       |  (void) result;
  213|       |  // On x86 the floating-point stack can be 64 or 80 bits wide. If it is
  214|       |  // 80 bits wide (as is the case on Linux) then double-rounding occurs and the
  215|       |  // result is not accurate.
  216|       |  // We know that Windows32 uses 64 bits and is therefore accurate.
  217|       |  return false;
  218|       |#else
  219|  1.63k|  if (trimmed.length() <= kMaxExactDoubleIntegerDecimalDigits) {
  ------------------
  |  Branch (219:7): [True: 900, False: 733]
  ------------------
  220|    900|    int read_digits;
  221|       |    // The trimmed input fits into a double.
  222|       |    // If the 10^exponent (resp. 10^-exponent) fits into a double too then we
  223|       |    // can compute the result-double simply by multiplying (resp. dividing) the
  224|       |    // two numbers.
  225|       |    // This is possible because IEEE guarantees that floating-point operations
  226|       |    // return the best possible approximation.
  227|    900|    if (exponent < 0 && -exponent < kExactPowersOfTenSize) {
  ------------------
  |  Branch (227:9): [True: 304, False: 596]
  |  Branch (227:25): [True: 78, False: 226]
  ------------------
  228|       |      // 10^-exponent fits into a double.
  229|     78|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  230|     78|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|     78|    assert(condition)
  ------------------
  |  Branch (230:7): [True: 78, False: 0]
  ------------------
  231|     78|      *result /= exact_powers_of_ten[-exponent];
  232|     78|      return true;
  233|     78|    }
  234|    822|    if (0 <= exponent && exponent < kExactPowersOfTenSize) {
  ------------------
  |  Branch (234:9): [True: 596, False: 226]
  |  Branch (234:26): [True: 154, False: 442]
  ------------------
  235|       |      // 10^exponent fits into a double.
  236|    154|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  237|    154|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|    154|    assert(condition)
  ------------------
  |  Branch (237:7): [True: 154, False: 0]
  ------------------
  238|    154|      *result *= exact_powers_of_ten[exponent];
  239|    154|      return true;
  240|    154|    }
  241|    668|    int remaining_digits =
  242|    668|        kMaxExactDoubleIntegerDecimalDigits - trimmed.length();
  243|    668|    if ((0 <= exponent) &&
  ------------------
  |  Branch (243:9): [True: 442, False: 226]
  ------------------
  244|    442|        (exponent - remaining_digits < kExactPowersOfTenSize)) {
  ------------------
  |  Branch (244:9): [True: 58, False: 384]
  ------------------
  245|       |      // The trimmed string was short and we can multiply it with
  246|       |      // 10^remaining_digits. As a result the remaining exponent now fits
  247|       |      // into a double too.
  248|     58|      *result = static_cast<double>(ReadUint64(trimmed, &read_digits));
  249|     58|      DOUBLE_CONVERSION_ASSERT(read_digits == trimmed.length());
  ------------------
  |  |   47|     58|    assert(condition)
  ------------------
  |  Branch (249:7): [True: 58, False: 0]
  ------------------
  250|     58|      *result *= exact_powers_of_ten[remaining_digits];
  251|     58|      *result *= exact_powers_of_ten[exponent - remaining_digits];
  252|     58|      return true;
  253|     58|    }
  254|    668|  }
  255|  1.34k|  return false;
  256|  1.63k|#endif
  257|  1.63k|}
strtod.cc:_ZN17double_conversionL10ReadUint64ENS_6VectorIKcEEPi:
  167|  1.63k|                           int* number_of_read_digits) {
  168|  1.63k|  uint64_t result = 0;
  169|  1.63k|  int i = 0;
  170|  19.3k|  while (i < buffer.length() && result <= (kMaxUint64 / 10 - 1)) {
  ------------------
  |  Branch (170:10): [True: 18.0k, False: 1.28k]
  |  Branch (170:33): [True: 17.7k, False: 349]
  ------------------
  171|  17.7k|    int digit = buffer[i++] - '0';
  172|  17.7k|    DOUBLE_CONVERSION_ASSERT(0 <= digit && digit <= 9);
  ------------------
  |  |   47|  17.7k|    assert(condition)
  ------------------
  |  Branch (172:5): [True: 17.7k, False: 0]
  |  Branch (172:5): [True: 17.7k, False: 0]
  |  Branch (172:5): [True: 17.7k, False: 0]
  ------------------
  173|  17.7k|    result = 10 * result + digit;
  174|  17.7k|  }
  175|  1.63k|  *number_of_read_digits = i;
  176|  1.63k|  return result;
  177|  1.63k|}
strtod.cc:_ZN17double_conversionL11DiyFpStrtodENS_6VectorIKcEEiPd:
  287|  1.34k|                        double* result) {
  288|  1.34k|  DiyFp input;
  289|  1.34k|  int remaining_decimals;
  290|  1.34k|  ReadDiyFp(buffer, &input, &remaining_decimals);
  291|       |  // Since we may have dropped some digits the input is not accurate.
  292|       |  // If remaining_decimals is different than 0 than the error is at most
  293|       |  // .5 ulp (unit in the last place).
  294|       |  // We don't want to deal with fractions and therefore keep a common
  295|       |  // denominator.
  296|  1.34k|  const int kDenominatorLog = 3;
  297|  1.34k|  const int kDenominator = 1 << kDenominatorLog;
  298|       |  // Move the remaining decimals into the exponent.
  299|  1.34k|  exponent += remaining_decimals;
  300|  1.34k|  uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
  ------------------
  |  Branch (300:21): [True: 994, False: 349]
  ------------------
  301|       |
  302|  1.34k|  int old_e = input.e();
  303|  1.34k|  input.Normalize();
  304|  1.34k|  error <<= old_e - input.e();
  305|       |
  306|  1.34k|  DOUBLE_CONVERSION_ASSERT(exponent <= PowersOfTenCache::kMaxDecimalExponent);
  ------------------
  |  |   47|  1.34k|    assert(condition)
  ------------------
  |  Branch (306:3): [True: 1.34k, False: 0]
  ------------------
  307|  1.34k|  if (exponent < PowersOfTenCache::kMinDecimalExponent) {
  ------------------
  |  Branch (307:7): [True: 0, False: 1.34k]
  ------------------
  308|      0|    *result = 0.0;
  309|      0|    return true;
  310|      0|  }
  311|  1.34k|  DiyFp cached_power;
  312|  1.34k|  int cached_decimal_exponent;
  313|  1.34k|  PowersOfTenCache::GetCachedPowerForDecimalExponent(exponent,
  314|  1.34k|                                                     &cached_power,
  315|  1.34k|                                                     &cached_decimal_exponent);
  316|       |
  317|  1.34k|  if (cached_decimal_exponent != exponent) {
  ------------------
  |  Branch (317:7): [True: 1.23k, False: 112]
  ------------------
  318|  1.23k|    int adjustment_exponent = exponent - cached_decimal_exponent;
  319|  1.23k|    DiyFp adjustment_power = AdjustmentPowerOfTen(adjustment_exponent);
  320|  1.23k|    input.Multiply(adjustment_power);
  321|  1.23k|    if (kMaxUint64DecimalDigits - buffer.length() >= adjustment_exponent) {
  ------------------
  |  Branch (321:9): [True: 554, False: 677]
  ------------------
  322|       |      // The product of input with the adjustment power fits into a 64 bit
  323|       |      // integer.
  324|    554|      DOUBLE_CONVERSION_ASSERT(DiyFp::kSignificandSize == 64);
  ------------------
  |  |   47|    554|    assert(condition)
  ------------------
  |  Branch (324:7): [True: 554, Folded]
  ------------------
  325|    677|    } else {
  326|       |      // The adjustment power is exact. There is hence only an error of 0.5.
  327|    677|      error += kDenominator / 2;
  328|    677|    }
  329|  1.23k|  }
  330|       |
  331|  1.34k|  input.Multiply(cached_power);
  332|       |  // The error introduced by a multiplication of a*b equals
  333|       |  //   error_a + error_b + error_a*error_b/2^64 + 0.5
  334|       |  // Substituting a with 'input' and b with 'cached_power' we have
  335|       |  //   error_b = 0.5  (all cached powers have an error of less than 0.5 ulp),
  336|       |  //   error_ab = 0 or 1 / kDenominator > error_a*error_b/ 2^64
  337|  1.34k|  int error_b = kDenominator / 2;
  338|  1.34k|  int error_ab = (error == 0 ? 0 : 1);  // We round up to 1.
  ------------------
  |  Branch (338:19): [True: 630, False: 713]
  ------------------
  339|  1.34k|  int fixed_error = kDenominator / 2;
  340|  1.34k|  error += error_b + error_ab + fixed_error;
  341|       |
  342|  1.34k|  old_e = input.e();
  343|  1.34k|  input.Normalize();
  344|  1.34k|  error <<= old_e - input.e();
  345|       |
  346|       |  // See if the double's significand changes if we add/subtract the error.
  347|  1.34k|  int order_of_magnitude = DiyFp::kSignificandSize + input.e();
  348|  1.34k|  int effective_significand_size =
  349|  1.34k|      Double::SignificandSizeForOrderOfMagnitude(order_of_magnitude);
  350|  1.34k|  int precision_digits_count =
  351|  1.34k|      DiyFp::kSignificandSize - effective_significand_size;
  352|  1.34k|  if (precision_digits_count + kDenominatorLog >= DiyFp::kSignificandSize) {
  ------------------
  |  Branch (352:7): [True: 58, False: 1.28k]
  ------------------
  353|       |    // This can only happen for very small denormals. In this case the
  354|       |    // half-way multiplied by the denominator exceeds the range of an uint64.
  355|       |    // Simply shift everything to the right.
  356|     58|    int shift_amount = (precision_digits_count + kDenominatorLog) -
  357|     58|        DiyFp::kSignificandSize + 1;
  358|     58|    input.set_f(input.f() >> shift_amount);
  359|     58|    input.set_e(input.e() + shift_amount);
  360|       |    // We add 1 for the lost precision of error, and kDenominator for
  361|       |    // the lost precision of input.f().
  362|     58|    error = (error >> shift_amount) + 1 + kDenominator;
  363|     58|    precision_digits_count -= shift_amount;
  364|     58|  }
  365|       |  // We use uint64_ts now. This only works if the DiyFp uses uint64_ts too.
  366|  1.34k|  DOUBLE_CONVERSION_ASSERT(DiyFp::kSignificandSize == 64);
  ------------------
  |  |   47|  1.34k|    assert(condition)
  ------------------
  |  Branch (366:3): [True: 1.34k, Folded]
  ------------------
  367|  1.34k|  DOUBLE_CONVERSION_ASSERT(precision_digits_count < 64);
  ------------------
  |  |   47|  1.34k|    assert(condition)
  ------------------
  |  Branch (367:3): [True: 1.34k, False: 0]
  ------------------
  368|  1.34k|  uint64_t one64 = 1;
  369|  1.34k|  uint64_t precision_bits_mask = (one64 << precision_digits_count) - 1;
  370|  1.34k|  uint64_t precision_bits = input.f() & precision_bits_mask;
  371|  1.34k|  uint64_t half_way = one64 << (precision_digits_count - 1);
  372|  1.34k|  precision_bits *= kDenominator;
  373|  1.34k|  half_way *= kDenominator;
  374|  1.34k|  DiyFp rounded_input(input.f() >> precision_digits_count,
  375|  1.34k|                      input.e() + precision_digits_count);
  376|  1.34k|  if (precision_bits >= half_way + error) {
  ------------------
  |  Branch (376:7): [True: 277, False: 1.06k]
  ------------------
  377|    277|    rounded_input.set_f(rounded_input.f() + 1);
  378|    277|  }
  379|       |  // If the last_bits are too close to the half-way case than we are too
  380|       |  // inaccurate and round down. In this case we return false so that we can
  381|       |  // fall back to a more precise algorithm.
  382|       |
  383|  1.34k|  *result = Double(rounded_input).value();
  384|  1.34k|  if (half_way - error < precision_bits && precision_bits < half_way + error) {
  ------------------
  |  Branch (384:7): [True: 1.03k, False: 307]
  |  Branch (384:44): [True: 759, False: 277]
  ------------------
  385|       |    // Too imprecise. The caller will have to fall back to a slower version.
  386|       |    // However the returned number is guaranteed to be either the correct
  387|       |    // double, or the next-lower double.
  388|    759|    return false;
  389|    759|  } else {
  390|    584|    return true;
  391|    584|  }
  392|  1.34k|}
strtod.cc:_ZN17double_conversionL9ReadDiyFpENS_6VectorIKcEEPNS_5DiyFpEPi:
  186|  1.34k|                      int* remaining_decimals) {
  187|  1.34k|  int read_digits;
  188|  1.34k|  uint64_t significand = ReadUint64(buffer, &read_digits);
  189|  1.34k|  if (buffer.length() == read_digits) {
  ------------------
  |  Branch (189:7): [True: 994, False: 349]
  ------------------
  190|    994|    *result = DiyFp(significand, 0);
  191|    994|    *remaining_decimals = 0;
  192|    994|  } else {
  193|       |    // Round the significand.
  194|    349|    if (buffer[read_digits] >= '5') {
  ------------------
  |  Branch (194:9): [True: 91, False: 258]
  ------------------
  195|     91|      significand++;
  196|     91|    }
  197|       |    // Compute the binary exponent.
  198|    349|    int exponent = 0;
  199|    349|    *result = DiyFp(significand, exponent);
  200|    349|    *remaining_decimals = buffer.length() - read_digits;
  201|    349|  }
  202|  1.34k|}
strtod.cc:_ZN17double_conversionL20AdjustmentPowerOfTenEi:
  262|  1.23k|static DiyFp AdjustmentPowerOfTen(int exponent) {
  263|  1.23k|  DOUBLE_CONVERSION_ASSERT(0 < exponent);
  ------------------
  |  |   47|  1.23k|    assert(condition)
  ------------------
  |  Branch (263:3): [True: 1.23k, False: 0]
  ------------------
  264|  1.23k|  DOUBLE_CONVERSION_ASSERT(exponent < PowersOfTenCache::kDecimalExponentDistance);
  ------------------
  |  |   47|  1.23k|    assert(condition)
  ------------------
  |  Branch (264:3): [True: 1.23k, False: 0]
  ------------------
  265|       |  // Simply hardcode the remaining powers for the given decimal exponent
  266|       |  // distance.
  267|  1.23k|  DOUBLE_CONVERSION_ASSERT(PowersOfTenCache::kDecimalExponentDistance == 8);
  ------------------
  |  |   47|  1.23k|    assert(condition)
  ------------------
  |  Branch (267:3): [True: 1.23k, Folded]
  ------------------
  268|  1.23k|  switch (exponent) {
  269|    169|    case 1: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xa0000000, 00000000), -60);
  ------------------
  |  |  195|    169|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (269:5): [True: 169, False: 1.06k]
  ------------------
  270|    103|    case 2: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc8000000, 00000000), -57);
  ------------------
  |  |  195|    103|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (270:5): [True: 103, False: 1.12k]
  ------------------
  271|    126|    case 3: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xfa000000, 00000000), -54);
  ------------------
  |  |  195|    126|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (271:5): [True: 126, False: 1.10k]
  ------------------
  272|    393|    case 4: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0x9c400000, 00000000), -50);
  ------------------
  |  |  195|    393|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (272:5): [True: 393, False: 838]
  ------------------
  273|    156|    case 5: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc3500000, 00000000), -47);
  ------------------
  |  |  195|    156|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (273:5): [True: 156, False: 1.07k]
  ------------------
  274|    114|    case 6: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xf4240000, 00000000), -44);
  ------------------
  |  |  195|    114|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (274:5): [True: 114, False: 1.11k]
  ------------------
  275|    170|    case 7: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0x98968000, 00000000), -40);
  ------------------
  |  |  195|    170|#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
  ------------------
  |  Branch (275:5): [True: 170, False: 1.06k]
  ------------------
  276|      0|    default:
  ------------------
  |  Branch (276:5): [True: 0, False: 1.23k]
  ------------------
  277|      0|      DOUBLE_CONVERSION_UNREACHABLE();
  ------------------
  |  |   77|      0|#define DOUBLE_CONVERSION_UNREACHABLE()   (abort())
  ------------------
  278|  1.23k|  }
  279|  1.23k|}
strtod.cc:_ZN17double_conversionL22CompareBufferWithDiyFpENS_6VectorIKcEEiNS_5DiyFpE:
  405|    758|                                  DiyFp diy_fp) {
  406|    758|  DOUBLE_CONVERSION_ASSERT(buffer.length() + exponent <= kMaxDecimalPower + 1);
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (406:3): [True: 758, False: 0]
  ------------------
  407|    758|  DOUBLE_CONVERSION_ASSERT(buffer.length() + exponent > kMinDecimalPower);
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (407:3): [True: 758, False: 0]
  ------------------
  408|    758|  DOUBLE_CONVERSION_ASSERT(buffer.length() <= kMaxSignificantDecimalDigits);
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (408:3): [True: 758, False: 0]
  ------------------
  409|       |  // Make sure that the Bignum will be able to hold all our numbers.
  410|       |  // Our Bignum implementation has a separate field for exponents. Shifts will
  411|       |  // consume at most one bigit (< 64 bits).
  412|       |  // ln(10) == 3.3219...
  413|    758|  DOUBLE_CONVERSION_ASSERT(((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits);
  ------------------
  |  |   47|    758|    assert(condition)
  ------------------
  |  Branch (413:3): [True: 758, Folded]
  ------------------
  414|    758|  Bignum buffer_bignum;
  415|    758|  Bignum diy_fp_bignum;
  416|    758|  buffer_bignum.AssignDecimalString(buffer);
  417|    758|  diy_fp_bignum.AssignUInt64(diy_fp.f());
  418|    758|  if (exponent >= 0) {
  ------------------
  |  Branch (418:7): [True: 432, False: 326]
  ------------------
  419|    432|    buffer_bignum.MultiplyByPowerOfTen(exponent);
  420|    432|  } else {
  421|    326|    diy_fp_bignum.MultiplyByPowerOfTen(-exponent);
  422|    326|  }
  423|    758|  if (diy_fp.e() > 0) {
  ------------------
  |  Branch (423:7): [True: 402, False: 356]
  ------------------
  424|    402|    diy_fp_bignum.ShiftLeft(diy_fp.e());
  425|    402|  } else {
  426|    356|    buffer_bignum.ShiftLeft(-diy_fp.e());
  427|    356|  }
  428|    758|  return Bignum::Compare(buffer_bignum, diy_fp_bignum);
  429|    758|}

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

_ZN17double_conversion7BitCastIdmEET_RKT0_:
  395|  2.75k|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.75k|#if __cplusplus >= 201103L
  399|  2.75k|  static_assert(sizeof(Dest) == sizeof(Source),
  400|  2.75k|                "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.75k|  Dest dest;
  407|  2.75k|  memmove(&dest, &source, sizeof(dest));
  408|  2.75k|  return dest;
  409|  2.75k|}
_ZN17double_conversion6VectorIKcEC2EPS1_i:
  252|  3.84k|  Vector(T* data, int len) : start_(data), length_(len) {
  253|       |    DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != DOUBLE_CONVERSION_NULLPTR));
  ------------------
  |  |   47|  3.84k|    assert(condition)
  ------------------
  |  Branch (253:5): [True: 3.72k, False: 0]
  |  Branch (253:5): [True: 3.72k, False: 0]
  |  Branch (253:5): [True: 118, False: 3.72k]
  |  Branch (253:5): [True: 3.84k, False: 0]
  ------------------
  254|  3.84k|  }
_ZNK17double_conversion6VectorIKcEixEi:
  275|   223k|  T& operator[](int index) const {
  276|   223k|    DOUBLE_CONVERSION_ASSERT(0 <= index && index < length_);
  ------------------
  |  |   47|   223k|    assert(condition)
  ------------------
  |  Branch (276:5): [True: 223k, False: 0]
  |  Branch (276:5): [True: 223k, False: 0]
  |  Branch (276:5): [True: 223k, False: 0]
  ------------------
  277|   223k|    return start_[index];
  278|   223k|  }
_ZN17double_conversion6VectorIKcE9SubVectorEii:
  258|  1.86k|  Vector<T> SubVector(int from, int to) {
  259|  1.86k|    DOUBLE_CONVERSION_ASSERT(to <= length_);
  ------------------
  |  |   47|  1.86k|    assert(condition)
  ------------------
  |  Branch (259:5): [True: 1.86k, False: 0]
  ------------------
  260|  1.86k|    DOUBLE_CONVERSION_ASSERT(from < to);
  ------------------
  |  |   47|  1.86k|    assert(condition)
  ------------------
  |  Branch (260:5): [True: 1.86k, False: 0]
  ------------------
  261|  1.86k|    DOUBLE_CONVERSION_ASSERT(0 <= from);
  ------------------
  |  |   47|  1.86k|    assert(condition)
  ------------------
  |  Branch (261:5): [True: 1.86k, False: 0]
  ------------------
  262|  1.86k|    return Vector<T>(start() + from, to - from);
  263|  1.86k|  }
_ZNK17double_conversion6VectorIKcE5startEv:
  272|  1.92k|  T* start() const { return start_; }
_ZNK17double_conversion6VectorIKcE6lengthEv:
  266|   163k|  int length() const { return length_; }
_ZN17double_conversion7BitCastImdEET_RKT0_:
  395|  1.35k|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.35k|#if __cplusplus >= 201103L
  399|  1.35k|  static_assert(sizeof(Dest) == sizeof(Source),
  400|  1.35k|                "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.35k|  Dest dest;
  407|  1.35k|  memmove(&dest, &source, sizeof(dest));
  408|  1.35k|  return dest;
  409|  1.35k|}

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

