_ZNK5draco28AttributeOctahedronTransform28CopyToAttributeTransformDataEPNS_22AttributeTransformDataE:
   36|    261|    AttributeTransformData *out_data) const {
   37|    261|  out_data->set_transform_type(ATTRIBUTE_OCTAHEDRON_TRANSFORM);
   38|    261|  out_data->AppendParameterValue(quantization_bits_);
   39|    261|}
_ZN5draco28AttributeOctahedronTransform25InverseTransformAttributeERKNS_14PointAttributeEPS1_:
   49|    217|    const PointAttribute &attribute, PointAttribute *target_attribute) {
   50|    217|  if (target_attribute->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (50:7): [True: 0, False: 217]
  ------------------
   51|      0|    return false;
   52|      0|  }
   53|       |
   54|    217|  const int num_points = target_attribute->size();
   55|    217|  const int num_components = target_attribute->num_components();
   56|    217|  if (num_components != 3) {
  ------------------
  |  Branch (56:7): [True: 0, False: 217]
  ------------------
   57|      0|    return false;
   58|      0|  }
   59|    217|  constexpr int kEntrySize = sizeof(float) * 3;
   60|    217|  float att_val[3];
   61|    217|  const int32_t *source_attribute_data = reinterpret_cast<const int32_t *>(
   62|    217|      attribute.GetAddress(AttributeValueIndex(0)));
   63|    217|  uint8_t *target_address =
   64|    217|      target_attribute->GetAddress(AttributeValueIndex(0));
   65|    217|  OctahedronToolBox octahedron_tool_box;
   66|    217|  if (!octahedron_tool_box.SetQuantizationBits(quantization_bits_)) {
  ------------------
  |  Branch (66:7): [True: 151, False: 66]
  ------------------
   67|    151|    return false;
   68|    151|  }
   69|   273k|  for (uint32_t i = 0; i < num_points; ++i) {
  ------------------
  |  Branch (69:24): [True: 273k, False: 66]
  ------------------
   70|   273k|    const int32_t s = *source_attribute_data++;
   71|   273k|    const int32_t t = *source_attribute_data++;
   72|   273k|    octahedron_tool_box.QuantizedOctahedralCoordsToUnitVector(s, t, att_val);
   73|       |
   74|       |    // Store the decoded floating point values into the attribute buffer.
   75|   273k|    std::memcpy(target_address, att_val, kEntrySize);
   76|   273k|    target_address += kEntrySize;
   77|   273k|  }
   78|     66|  return true;
   79|    217|}
_ZN5draco28AttributeOctahedronTransform16DecodeParametersERKNS_14PointAttributeEPNS_13DecoderBufferE:
   95|    747|    const PointAttribute &attribute, DecoderBuffer *decoder_buffer) {
   96|    747|  uint8_t quantization_bits;
   97|    747|  if (!decoder_buffer->Decode(&quantization_bits)) {
  ------------------
  |  Branch (97:7): [True: 486, False: 261]
  ------------------
   98|    486|    return false;
   99|    486|  }
  100|    261|  quantization_bits_ = quantization_bits;
  101|    261|  return true;
  102|    747|}

_ZN5draco28AttributeOctahedronTransformC2Ev:
   28|    936|  AttributeOctahedronTransform() : quantization_bits_(-1) {}

_ZNK5draco30AttributeQuantizationTransform28CopyToAttributeTransformDataEPNS_22AttributeTransformDataE:
   49|    109|    AttributeTransformData *out_data) const {
   50|    109|  out_data->set_transform_type(ATTRIBUTE_QUANTIZATION_TRANSFORM);
   51|    109|  out_data->AppendParameterValue(quantization_bits_);
   52|  2.12k|  for (int i = 0; i < min_values_.size(); ++i) {
  ------------------
  |  Branch (52:19): [True: 2.01k, False: 109]
  ------------------
   53|  2.01k|    out_data->AppendParameterValue(min_values_[i]);
   54|  2.01k|  }
   55|    109|  out_data->AppendParameterValue(range_);
   56|    109|}
_ZN5draco30AttributeQuantizationTransform25InverseTransformAttributeERKNS_14PointAttributeEPS1_:
   72|    106|    const PointAttribute &attribute, PointAttribute *target_attribute) {
   73|    106|  if (target_attribute->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (73:7): [True: 0, False: 106]
  ------------------
   74|      0|    return false;
   75|      0|  }
   76|       |
   77|       |  // Convert all quantized values back to floats.
   78|    106|  const int32_t max_quantized_value =
   79|    106|      (1u << static_cast<uint32_t>(quantization_bits_)) - 1;
   80|    106|  const int num_components = target_attribute->num_components();
   81|    106|  const int entry_size = sizeof(float) * num_components;
   82|    106|  const std::unique_ptr<float[]> att_val(new float[num_components]);
   83|    106|  int quant_val_id = 0;
   84|    106|  int out_byte_pos = 0;
   85|    106|  Dequantizer dequantizer;
   86|    106|  if (!dequantizer.Init(range_, max_quantized_value)) {
  ------------------
  |  Branch (86:7): [True: 0, False: 106]
  ------------------
   87|      0|    return false;
   88|      0|  }
   89|    106|  const int32_t *const source_attribute_data =
   90|    106|      reinterpret_cast<const int32_t *>(
   91|    106|          attribute.GetAddress(AttributeValueIndex(0)));
   92|       |
   93|    106|  const int num_values = target_attribute->size();
   94|       |
   95|   207k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (95:24): [True: 207k, False: 106]
  ------------------
   96|  4.14M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (96:21): [True: 3.94M, False: 207k]
  ------------------
   97|  3.94M|      float value =
   98|  3.94M|          dequantizer.DequantizeFloat(source_attribute_data[quant_val_id++]);
   99|  3.94M|      value = value + min_values_[c];
  100|  3.94M|      att_val[c] = value;
  101|  3.94M|    }
  102|       |    // Store the floating point value into the attribute buffer.
  103|   207k|    target_attribute->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  104|   207k|    out_byte_pos += entry_size;
  105|   207k|  }
  106|    106|  return true;
  107|    106|}
_ZN5draco30AttributeQuantizationTransform19IsQuantizationValidEi:
  110|    184|    int quantization_bits) {
  111|       |  // Currently we allow only up to 30 bit quantization.
  112|    184|  return quantization_bits >= 1 && quantization_bits <= 30;
  ------------------
  |  Branch (112:10): [True: 160, False: 24]
  |  Branch (112:36): [True: 112, False: 48]
  ------------------
  113|    184|}
_ZN5draco30AttributeQuantizationTransform16DecodeParametersERKNS_14PointAttributeEPNS_13DecoderBufferE:
  196|    276|    const PointAttribute &attribute, DecoderBuffer *decoder_buffer) {
  197|    276|  min_values_.resize(attribute.num_components());
  198|    276|  if (!decoder_buffer->Decode(&min_values_[0],
  ------------------
  |  Branch (198:7): [True: 87, False: 189]
  ------------------
  199|    276|                              sizeof(float) * min_values_.size())) {
  200|     87|    return false;
  201|     87|  }
  202|    189|  if (!decoder_buffer->Decode(&range_)) {
  ------------------
  |  Branch (202:7): [True: 3, False: 186]
  ------------------
  203|      3|    return false;
  204|      3|  }
  205|    186|  uint8_t quantization_bits;
  206|    186|  if (!decoder_buffer->Decode(&quantization_bits)) {
  ------------------
  |  Branch (206:7): [True: 2, False: 184]
  ------------------
  207|      2|    return false;
  208|      2|  }
  209|    184|  if (!IsQuantizationValid(quantization_bits)) {
  ------------------
  |  Branch (209:7): [True: 72, False: 112]
  ------------------
  210|     72|    return false;
  211|     72|  }
  212|    112|  quantization_bits_ = quantization_bits;
  213|    112|  return true;
  214|    184|}

_ZN5draco30AttributeQuantizationTransformC2Ev:
   29|    381|  AttributeQuantizationTransform() : quantization_bits_(-1), range_(0.f) {}

_ZNK5draco18AttributeTransform19TransferToAttributeEPNS_14PointAttributeE:
   19|    370|bool AttributeTransform::TransferToAttribute(PointAttribute *attribute) const {
   20|    370|  std::unique_ptr<AttributeTransformData> transform_data(
   21|    370|      new AttributeTransformData());
   22|    370|  this->CopyToAttributeTransformData(transform_data.get());
   23|    370|  attribute->SetAttributeTransformData(std::move(transform_data));
   24|    370|  return true;
   25|    370|}

_ZN5draco18AttributeTransformD2Ev:
   29|  1.31k|  virtual ~AttributeTransform() = default;

_ZN5draco22AttributeTransformDataC2Ev:
   32|    370|  AttributeTransformData() : transform_type_(ATTRIBUTE_INVALID_TRANSFORM) {}
_ZN5draco22AttributeTransformData18set_transform_typeENS_22AttributeTransformTypeE:
   37|    370|  void set_transform_type(AttributeTransformType type) {
   38|    370|    transform_type_ = type;
   39|    370|  }
_ZN5draco22AttributeTransformDataC2ERKS0_:
   33|     49|  AttributeTransformData(const AttributeTransformData &data) = default;
_ZN5draco22AttributeTransformData20AppendParameterValueIiEEvRKT_:
   60|    370|  void AppendParameterValue(const DataTypeT &in_data) {
   61|    370|    SetParameterValue(static_cast<int>(buffer_.data_size()), in_data);
   62|    370|  }
_ZN5draco22AttributeTransformData17SetParameterValueIiEEviRKT_:
   51|    370|  void SetParameterValue(int byte_offset, const DataTypeT &in_data) {
   52|    370|    if (byte_offset + sizeof(DataTypeT) > buffer_.data_size()) {
  ------------------
  |  Branch (52:9): [True: 370, False: 0]
  ------------------
   53|    370|      buffer_.Resize(byte_offset + sizeof(DataTypeT));
   54|    370|    }
   55|    370|    buffer_.Write(byte_offset, &in_data, sizeof(DataTypeT));
   56|    370|  }
_ZN5draco22AttributeTransformData20AppendParameterValueIfEEvRKT_:
   60|  2.12k|  void AppendParameterValue(const DataTypeT &in_data) {
   61|  2.12k|    SetParameterValue(static_cast<int>(buffer_.data_size()), in_data);
   62|  2.12k|  }
_ZN5draco22AttributeTransformData17SetParameterValueIfEEviRKT_:
   51|  2.12k|  void SetParameterValue(int byte_offset, const DataTypeT &in_data) {
   52|  2.12k|    if (byte_offset + sizeof(DataTypeT) > buffer_.data_size()) {
  ------------------
  |  Branch (52:9): [True: 2.12k, False: 0]
  ------------------
   53|  2.12k|      buffer_.Resize(byte_offset + sizeof(DataTypeT));
   54|  2.12k|    }
   55|  2.12k|    buffer_.Write(byte_offset, &in_data, sizeof(DataTypeT));
   56|  2.12k|  }

_ZN5draco17GeometryAttributeC2Ev:
   20|  49.3k|    : buffer_(nullptr),
   21|  49.3k|      num_components_(1),
   22|  49.3k|      data_type_(DT_FLOAT32),
   23|  49.3k|      byte_stride_(0),
   24|  49.3k|      byte_offset_(0),
   25|  49.3k|      attribute_type_(INVALID),
   26|  49.3k|      unique_id_(0) {}
_ZN5draco17GeometryAttribute4InitENS0_4TypeEPNS_10DataBufferEhNS_8DataTypeEbll:
   31|  49.3k|                             int64_t byte_stride, int64_t byte_offset) {
   32|  49.3k|  buffer_ = buffer;
   33|  49.3k|  if (buffer) {
  ------------------
  |  Branch (33:7): [True: 0, False: 49.3k]
  ------------------
   34|      0|    buffer_descriptor_.buffer_id = buffer->buffer_id();
   35|      0|    buffer_descriptor_.buffer_update_count = buffer->update_count();
   36|      0|  }
   37|  49.3k|  num_components_ = num_components;
   38|  49.3k|  data_type_ = data_type;
   39|  49.3k|  normalized_ = normalized;
   40|  49.3k|  byte_stride_ = byte_stride;
   41|  49.3k|  byte_offset_ = byte_offset;
   42|  49.3k|  attribute_type_ = attribute_type;
   43|  49.3k|}
_ZN5draco17GeometryAttribute8CopyFromERKS0_:
   45|    714|bool GeometryAttribute::CopyFrom(const GeometryAttribute &src_att) {
   46|    714|  num_components_ = src_att.num_components_;
   47|    714|  data_type_ = src_att.data_type_;
   48|    714|  normalized_ = src_att.normalized_;
   49|    714|  byte_stride_ = src_att.byte_stride_;
   50|    714|  byte_offset_ = src_att.byte_offset_;
   51|    714|  attribute_type_ = src_att.attribute_type_;
   52|    714|  buffer_descriptor_ = src_att.buffer_descriptor_;
   53|    714|  unique_id_ = src_att.unique_id_;
   54|    714|  if (src_att.buffer_ == nullptr) {
  ------------------
  |  Branch (54:7): [True: 0, False: 714]
  ------------------
   55|      0|    buffer_ = nullptr;
   56|    714|  } else {
   57|    714|    if (buffer_ == nullptr) {
  ------------------
  |  Branch (57:9): [True: 0, False: 714]
  ------------------
   58|      0|      return false;
   59|      0|    }
   60|    714|    buffer_->Update(src_att.buffer_->data(), src_att.buffer_->data_size());
   61|    714|  }
   62|       |#ifdef DRACO_TRANSCODER_SUPPORTED
   63|       |  name_ = src_att.name_;
   64|       |#endif
   65|    714|  return true;
   66|    714|}
_ZN5draco17GeometryAttribute11ResetBufferEPNS_10DataBufferEll:
  102|  20.4k|                                    int64_t byte_offset) {
  103|  20.4k|  buffer_ = buffer;
  104|  20.4k|  buffer_descriptor_.buffer_id = buffer->buffer_id();
  105|  20.4k|  buffer_descriptor_.buffer_update_count = buffer->update_count();
  106|  20.4k|  byte_stride_ = byte_stride;
  107|  20.4k|  byte_offset_ = byte_offset;
  108|  20.4k|}

_ZNK5draco17GeometryAttribute10GetBytePosENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  118|  19.5M|  inline int64_t GetBytePos(AttributeValueIndex att_index) const {
  119|  19.5M|    return byte_offset_ + byte_stride_ * att_index.value();
  120|  19.5M|  }
_ZNK5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  122|  19.5M|  inline const uint8_t *GetAddress(AttributeValueIndex att_index) const {
  123|  19.5M|    const int64_t byte_pos = GetBytePos(att_index);
  124|  19.5M|    return buffer_->data() + byte_pos;
  125|  19.5M|  }
_ZN5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  126|  12.7k|  inline uint8_t *GetAddress(AttributeValueIndex att_index) {
  127|  12.7k|    const int64_t byte_pos = GetBytePos(att_index);
  128|  12.7k|    return buffer_->data() + byte_pos;
  129|  12.7k|  }
_ZNK5draco17GeometryAttribute14IsAddressValidEPKh:
  130|  58.5M|  inline bool IsAddressValid(const uint8_t *address) const {
  131|  58.5M|    return ((buffer_->data() + buffer_->data_size()) > address);
  132|  58.5M|  }
_ZNK5draco17GeometryAttribute14attribute_typeEv:
  266|  95.5k|  Type attribute_type() const { return attribute_type_; }
_ZNK5draco17GeometryAttribute9data_typeEv:
  269|  25.0k|  DataType data_type() const { return data_type_; }
_ZNK5draco17GeometryAttribute14num_componentsEv:
  273|  46.9k|  uint8_t num_components() const { return num_components_; }
_ZNK5draco17GeometryAttribute11byte_strideEv:
  282|    582|  int64_t byte_stride() const { return byte_stride_; }
_ZNK5draco17GeometryAttribute9unique_idEv:
  287|  9.67k|  uint32_t unique_id() const { return unique_id_; }
_ZN5draco17GeometryAttribute13set_unique_idEj:
  288|   128k|  void set_unique_id(uint32_t id) { unique_id_ = id; }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  19.4M|  bool ConvertValue(AttributeValueIndex att_index, OutT *out_value) const {
  230|  19.4M|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  19.4M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  19.4M|                    OutT *out_val) const {
  180|  19.4M|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 19.4M]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  19.4M|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 19.4M]
  ------------------
  185|      0|        return ConvertTypedValue<int8_t, OutT>(att_id, out_num_components,
  186|      0|                                               out_val);
  187|      0|      case DT_UINT8:
  ------------------
  |  Branch (187:7): [True: 0, False: 19.4M]
  ------------------
  188|      0|        return ConvertTypedValue<uint8_t, OutT>(att_id, out_num_components,
  189|      0|                                                out_val);
  190|      0|      case DT_INT16:
  ------------------
  |  Branch (190:7): [True: 0, False: 19.4M]
  ------------------
  191|      0|        return ConvertTypedValue<int16_t, OutT>(att_id, out_num_components,
  192|      0|                                                out_val);
  193|      0|      case DT_UINT16:
  ------------------
  |  Branch (193:7): [True: 0, False: 19.4M]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  19.4M|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 19.4M, False: 0]
  ------------------
  197|  19.4M|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  19.4M|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 19.4M]
  ------------------
  200|      0|        return ConvertTypedValue<uint32_t, OutT>(att_id, out_num_components,
  201|      0|                                                 out_val);
  202|      0|      case DT_INT64:
  ------------------
  |  Branch (202:7): [True: 0, False: 19.4M]
  ------------------
  203|      0|        return ConvertTypedValue<int64_t, OutT>(att_id, out_num_components,
  204|      0|                                                out_val);
  205|      0|      case DT_UINT64:
  ------------------
  |  Branch (205:7): [True: 0, False: 19.4M]
  ------------------
  206|      0|        return ConvertTypedValue<uint64_t, OutT>(att_id, out_num_components,
  207|      0|                                                 out_val);
  208|      0|      case DT_FLOAT32:
  ------------------
  |  Branch (208:7): [True: 0, False: 19.4M]
  ------------------
  209|      0|        return ConvertTypedValue<float, OutT>(att_id, out_num_components,
  210|      0|                                              out_val);
  211|      0|      case DT_FLOAT64:
  ------------------
  |  Branch (211:7): [True: 0, False: 19.4M]
  ------------------
  212|      0|        return ConvertTypedValue<double, OutT>(att_id, out_num_components,
  213|      0|                                               out_val);
  214|      0|      case DT_BOOL:
  ------------------
  |  Branch (214:7): [True: 0, False: 19.4M]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 19.4M]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  19.4M|    }
  221|  19.4M|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIilEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  19.4M|                         OutT *out_value) const {
  307|  19.4M|    const uint8_t *src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  77.9M|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 58.4M, False: 19.4M]
  ------------------
  311|  58.4M|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 58.4M]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  58.4M|      const T in_value = *reinterpret_cast<const T *>(src_address);
  315|  58.4M|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 58.4M]
  ------------------
  316|  58.4M|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  58.4M|      src_address += sizeof(T);
  320|  58.4M|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  19.4M|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 19.4M]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  19.4M|    return true;
  326|  19.4M|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIilEEbRKT_bPT0_:
  364|  58.4M|                                    OutT *out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  58.4M|    if (std::is_integral<OutT>::value) {
  ------------------
  |  Branch (366:9): [True: 58.4M, Folded]
  ------------------
  367|       |      // Make sure the |in_value| fits within the range of values that OutT
  368|       |      // is able to represent. Perform the check only for integral types.
  369|  58.4M|      if (!std::is_same<T, bool>::value && std::is_integral<T>::value) {
  ------------------
  |  Branch (369:11): [True: 0, Folded]
  |  Branch (369:44): [True: 0, Folded]
  ------------------
  370|  58.4M|        static constexpr OutT kOutMin =
  371|  58.4M|            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  ------------------
  |  Branch (371:13): [True: 0, Folded]
  ------------------
  372|  58.4M|        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (372:13): [True: 0, False: 58.4M]
  |  Branch (372:35): [True: 0, False: 58.4M]
  ------------------
  373|      0|          return false;
  374|      0|        }
  375|  58.4M|      }
  376|       |
  377|       |      // Check conversion of floating point |in_value| to integral value OutT.
  378|  58.4M|      if (std::is_floating_point<T>::value) {
  ------------------
  |  Branch (378:11): [Folded, False: 58.4M]
  ------------------
  379|       |        // Make sure the floating point |in_value| is not NaN and not Inf as
  380|       |        // integral type OutT is unable to represent these values.
  381|      0|        if (sizeof(in_value) > sizeof(double)) {
  ------------------
  |  Branch (381:13): [Folded, False: 0]
  ------------------
  382|      0|          if (std::isnan(static_cast<long double>(in_value)) ||
  ------------------
  |  Branch (382:15): [True: 0, False: 0]
  ------------------
  383|      0|              std::isinf(static_cast<long double>(in_value))) {
  ------------------
  |  Branch (383:15): [True: 0, False: 0]
  ------------------
  384|      0|            return false;
  385|      0|          }
  386|      0|        } else if (sizeof(in_value) > sizeof(float)) {
  ------------------
  |  Branch (386:20): [Folded, False: 0]
  ------------------
  387|      0|          if (std::isnan(static_cast<double>(in_value)) ||
  ------------------
  |  Branch (387:15): [True: 0, False: 0]
  ------------------
  388|      0|              std::isinf(static_cast<double>(in_value))) {
  ------------------
  |  Branch (388:15): [True: 0, False: 0]
  ------------------
  389|      0|            return false;
  390|      0|          }
  391|      0|        } else {
  392|      0|          if (std::isnan(static_cast<float>(in_value)) ||
  ------------------
  |  Branch (392:15): [True: 0, False: 0]
  ------------------
  393|      0|              std::isinf(static_cast<float>(in_value))) {
  ------------------
  |  Branch (393:15): [True: 0, False: 0]
  ------------------
  394|      0|            return false;
  395|      0|          }
  396|      0|        }
  397|       |
  398|       |        // Make sure the floating point |in_value| fits within the range of
  399|       |        // values that integral type OutT is able to represent.
  400|      0|        if (in_value < std::numeric_limits<OutT>::min() ||
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            in_value >= std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  ------------------
  402|      0|          return false;
  403|      0|        }
  404|      0|      }
  405|  58.4M|    }
  406|       |
  407|  58.4M|    if (std::is_integral<T>::value && std::is_floating_point<OutT>::value &&
  ------------------
  |  Branch (407:9): [True: 0, Folded]
  |  Branch (407:39): [Folded, False: 0]
  ------------------
  408|      0|        normalized) {
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|       |      // When converting integer to floating point, normalize the value if
  410|       |      // necessary.
  411|      0|      *out_value = static_cast<OutT>(in_value);
  412|      0|      *out_value /= static_cast<OutT>(std::numeric_limits<T>::max());
  413|  58.4M|    } else if (std::is_floating_point<T>::value &&
  ------------------
  |  Branch (413:16): [Folded, False: 58.4M]
  ------------------
  414|      0|               std::is_integral<OutT>::value && normalized) {
  ------------------
  |  Branch (414:16): [True: 0, Folded]
  |  Branch (414:49): [True: 0, False: 0]
  ------------------
  415|       |      // Converting from floating point to a normalized integer.
  416|      0|      if (in_value > 1 || in_value < 0) {
  ------------------
  |  Branch (416:11): [True: 0, False: 0]
  |  Branch (416:27): [True: 0, False: 0]
  ------------------
  417|       |        // Normalized float values need to be between 0 and 1.
  418|      0|        return false;
  419|      0|      }
  420|       |      // TODO(ostava): Consider allowing float to normalized integer conversion
  421|       |      // for 64-bit integer types. Currently it doesn't work because we don't
  422|       |      // have a floating point type that could store all 64 bit integers.
  423|      0|      if (sizeof(OutT) > 4) {
  ------------------
  |  Branch (423:11): [True: 0, Folded]
  ------------------
  424|      0|        return false;
  425|      0|      }
  426|       |      // Expand the float to the range of the output integer and round it to the
  427|       |      // nearest representable value. Use doubles for the math to ensure the
  428|       |      // integer values are represented properly during the conversion process.
  429|      0|      *out_value = static_cast<OutT>(std::floor(
  430|      0|          in_value * static_cast<double>(std::numeric_limits<OutT>::max()) +
  431|      0|          0.5));
  432|  58.4M|    } else {
  433|  58.4M|      *out_value = static_cast<OutT>(in_value);
  434|  58.4M|    }
  435|       |
  436|       |    // TODO(ostava): Add handling of normalized attributes when converting
  437|       |    // between different integer representations. If the attribute is
  438|       |    // normalized, integer values should be converted as if they represent 0-1
  439|       |    // range. E.g. when we convert uint16 to uint8, the range <0, 2^16 - 1>
  440|       |    // should be converted to range <0, 2^8 - 1>.
  441|  58.4M|    return true;
  442|  58.4M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  54.0k|  bool ConvertValue(AttributeValueIndex att_index, OutT *out_value) const {
  230|  54.0k|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  54.0k|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  54.0k|                    OutT *out_val) const {
  180|  54.0k|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 54.0k]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  54.0k|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 54.0k]
  ------------------
  185|      0|        return ConvertTypedValue<int8_t, OutT>(att_id, out_num_components,
  186|      0|                                               out_val);
  187|      0|      case DT_UINT8:
  ------------------
  |  Branch (187:7): [True: 0, False: 54.0k]
  ------------------
  188|      0|        return ConvertTypedValue<uint8_t, OutT>(att_id, out_num_components,
  189|      0|                                                out_val);
  190|      0|      case DT_INT16:
  ------------------
  |  Branch (190:7): [True: 0, False: 54.0k]
  ------------------
  191|      0|        return ConvertTypedValue<int16_t, OutT>(att_id, out_num_components,
  192|      0|                                                out_val);
  193|      0|      case DT_UINT16:
  ------------------
  |  Branch (193:7): [True: 0, False: 54.0k]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  54.0k|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 54.0k, False: 0]
  ------------------
  197|  54.0k|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  54.0k|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 54.0k]
  ------------------
  200|      0|        return ConvertTypedValue<uint32_t, OutT>(att_id, out_num_components,
  201|      0|                                                 out_val);
  202|      0|      case DT_INT64:
  ------------------
  |  Branch (202:7): [True: 0, False: 54.0k]
  ------------------
  203|      0|        return ConvertTypedValue<int64_t, OutT>(att_id, out_num_components,
  204|      0|                                                out_val);
  205|      0|      case DT_UINT64:
  ------------------
  |  Branch (205:7): [True: 0, False: 54.0k]
  ------------------
  206|      0|        return ConvertTypedValue<uint64_t, OutT>(att_id, out_num_components,
  207|      0|                                                 out_val);
  208|      0|      case DT_FLOAT32:
  ------------------
  |  Branch (208:7): [True: 0, False: 54.0k]
  ------------------
  209|      0|        return ConvertTypedValue<float, OutT>(att_id, out_num_components,
  210|      0|                                              out_val);
  211|      0|      case DT_FLOAT64:
  ------------------
  |  Branch (211:7): [True: 0, False: 54.0k]
  ------------------
  212|      0|        return ConvertTypedValue<double, OutT>(att_id, out_num_components,
  213|      0|                                               out_val);
  214|      0|      case DT_BOOL:
  ------------------
  |  Branch (214:7): [True: 0, False: 54.0k]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 54.0k]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  54.0k|    }
  221|  54.0k|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIifEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  54.0k|                         OutT *out_value) const {
  307|  54.0k|    const uint8_t *src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|   216k|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 162k, False: 54.0k]
  ------------------
  311|   162k|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 162k]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|   162k|      const T in_value = *reinterpret_cast<const T *>(src_address);
  315|   162k|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 162k]
  ------------------
  316|   162k|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|   162k|      src_address += sizeof(T);
  320|   162k|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  54.0k|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 54.0k]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  54.0k|    return true;
  326|  54.0k|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIifEEbRKT_bPT0_:
  364|   162k|                                    OutT *out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|   162k|    if (std::is_integral<OutT>::value) {
  ------------------
  |  Branch (366:9): [Folded, False: 162k]
  ------------------
  367|       |      // Make sure the |in_value| fits within the range of values that OutT
  368|       |      // is able to represent. Perform the check only for integral types.
  369|      0|      if (!std::is_same<T, bool>::value && std::is_integral<T>::value) {
  ------------------
  |  Branch (369:11): [True: 0, Folded]
  |  Branch (369:44): [True: 0, Folded]
  ------------------
  370|      0|        static constexpr OutT kOutMin =
  371|      0|            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  ------------------
  |  Branch (371:13): [True: 0, Folded]
  ------------------
  372|      0|        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (372:13): [True: 0, False: 0]
  |  Branch (372:35): [True: 0, False: 0]
  ------------------
  373|      0|          return false;
  374|      0|        }
  375|      0|      }
  376|       |
  377|       |      // Check conversion of floating point |in_value| to integral value OutT.
  378|      0|      if (std::is_floating_point<T>::value) {
  ------------------
  |  Branch (378:11): [Folded, False: 0]
  ------------------
  379|       |        // Make sure the floating point |in_value| is not NaN and not Inf as
  380|       |        // integral type OutT is unable to represent these values.
  381|      0|        if (sizeof(in_value) > sizeof(double)) {
  ------------------
  |  Branch (381:13): [Folded, False: 0]
  ------------------
  382|      0|          if (std::isnan(static_cast<long double>(in_value)) ||
  ------------------
  |  Branch (382:15): [True: 0, False: 0]
  ------------------
  383|      0|              std::isinf(static_cast<long double>(in_value))) {
  ------------------
  |  Branch (383:15): [True: 0, False: 0]
  ------------------
  384|      0|            return false;
  385|      0|          }
  386|      0|        } else if (sizeof(in_value) > sizeof(float)) {
  ------------------
  |  Branch (386:20): [Folded, False: 0]
  ------------------
  387|      0|          if (std::isnan(static_cast<double>(in_value)) ||
  ------------------
  |  Branch (387:15): [True: 0, False: 0]
  ------------------
  388|      0|              std::isinf(static_cast<double>(in_value))) {
  ------------------
  |  Branch (388:15): [True: 0, False: 0]
  ------------------
  389|      0|            return false;
  390|      0|          }
  391|      0|        } else {
  392|      0|          if (std::isnan(static_cast<float>(in_value)) ||
  ------------------
  |  Branch (392:15): [True: 0, False: 0]
  ------------------
  393|      0|              std::isinf(static_cast<float>(in_value))) {
  ------------------
  |  Branch (393:15): [True: 0, False: 0]
  ------------------
  394|      0|            return false;
  395|      0|          }
  396|      0|        }
  397|       |
  398|       |        // Make sure the floating point |in_value| fits within the range of
  399|       |        // values that integral type OutT is able to represent.
  400|      0|        if (in_value < std::numeric_limits<OutT>::min() ||
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            in_value >= std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  ------------------
  402|      0|          return false;
  403|      0|        }
  404|      0|      }
  405|      0|    }
  406|       |
  407|   162k|    if (std::is_integral<T>::value && std::is_floating_point<OutT>::value &&
  ------------------
  |  Branch (407:9): [True: 0, Folded]
  |  Branch (407:39): [True: 0, Folded]
  ------------------
  408|   162k|        normalized) {
  ------------------
  |  Branch (408:9): [True: 0, False: 162k]
  ------------------
  409|       |      // When converting integer to floating point, normalize the value if
  410|       |      // necessary.
  411|      0|      *out_value = static_cast<OutT>(in_value);
  412|      0|      *out_value /= static_cast<OutT>(std::numeric_limits<T>::max());
  413|   162k|    } else if (std::is_floating_point<T>::value &&
  ------------------
  |  Branch (413:16): [Folded, False: 162k]
  ------------------
  414|      0|               std::is_integral<OutT>::value && normalized) {
  ------------------
  |  Branch (414:16): [Folded, False: 0]
  |  Branch (414:49): [True: 0, False: 0]
  ------------------
  415|       |      // Converting from floating point to a normalized integer.
  416|      0|      if (in_value > 1 || in_value < 0) {
  ------------------
  |  Branch (416:11): [True: 0, False: 0]
  |  Branch (416:27): [True: 0, False: 0]
  ------------------
  417|       |        // Normalized float values need to be between 0 and 1.
  418|      0|        return false;
  419|      0|      }
  420|       |      // TODO(ostava): Consider allowing float to normalized integer conversion
  421|       |      // for 64-bit integer types. Currently it doesn't work because we don't
  422|       |      // have a floating point type that could store all 64 bit integers.
  423|      0|      if (sizeof(OutT) > 4) {
  ------------------
  |  Branch (423:11): [Folded, False: 0]
  ------------------
  424|      0|        return false;
  425|      0|      }
  426|       |      // Expand the float to the range of the output integer and round it to the
  427|       |      // nearest representable value. Use doubles for the math to ensure the
  428|       |      // integer values are represented properly during the conversion process.
  429|      0|      *out_value = static_cast<OutT>(std::floor(
  430|      0|          in_value * static_cast<double>(std::numeric_limits<OutT>::max()) +
  431|      0|          0.5));
  432|   162k|    } else {
  433|   162k|      *out_value = static_cast<OutT>(in_value);
  434|   162k|    }
  435|       |
  436|       |    // TODO(ostava): Add handling of normalized attributes when converting
  437|       |    // between different integer representations. If the attribute is
  438|       |    // normalized, integer values should be converted as if they represent 0-1
  439|       |    // range. E.g. when we convert uint16 to uint8, the range <0, 2^16 - 1>
  440|       |    // should be converted to range <0, 2^8 - 1>.
  441|   162k|    return true;
  442|   162k|  }

_ZN5draco14PointAttributeC2ERKNS_17GeometryAttributeE:
   31|  49.3k|    : GeometryAttribute(att),
   32|  49.3k|      num_unique_entries_(0),
   33|  49.3k|      identity_mapping_(false) {}
_ZN5draco14PointAttribute8CopyFromERKS0_:
   46|    714|void PointAttribute::CopyFrom(const PointAttribute &src_att) {
   47|    714|  if (buffer() == nullptr) {
  ------------------
  |  Branch (47:7): [True: 0, False: 714]
  ------------------
   48|       |    // If the destination attribute doesn't have a valid buffer, create it.
   49|      0|    attribute_buffer_ = std::unique_ptr<DataBuffer>(new DataBuffer());
   50|      0|    ResetBuffer(attribute_buffer_.get(), 0, 0);
   51|      0|  }
   52|    714|  if (!GeometryAttribute::CopyFrom(src_att)) {
  ------------------
  |  Branch (52:7): [True: 0, False: 714]
  ------------------
   53|      0|    return;
   54|      0|  }
   55|    714|  identity_mapping_ = src_att.identity_mapping_;
   56|    714|  num_unique_entries_ = src_att.num_unique_entries_;
   57|    714|  indices_map_ = src_att.indices_map_;
   58|    714|  if (src_att.attribute_transform_data_) {
  ------------------
  |  Branch (58:7): [True: 49, False: 665]
  ------------------
   59|     49|    attribute_transform_data_ = std::unique_ptr<AttributeTransformData>(
   60|     49|        new AttributeTransformData(*src_att.attribute_transform_data_));
   61|    665|  } else {
   62|    665|    attribute_transform_data_ = nullptr;
   63|    665|  }
   64|    714|}
_ZN5draco14PointAttribute5ResetEm:
   66|  20.4k|bool PointAttribute::Reset(size_t num_attribute_values) {
   67|  20.4k|  if (attribute_buffer_ == nullptr) {
  ------------------
  |  Branch (67:7): [True: 20.4k, False: 0]
  ------------------
   68|  20.4k|    attribute_buffer_ = std::unique_ptr<DataBuffer>(new DataBuffer());
   69|  20.4k|  }
   70|  20.4k|  const int64_t entry_size = DataTypeLength(data_type()) * num_components();
   71|  20.4k|  if (!attribute_buffer_->Update(nullptr, num_attribute_values * entry_size)) {
  ------------------
  |  Branch (71:7): [True: 0, False: 20.4k]
  ------------------
   72|      0|    return false;
   73|      0|  }
   74|       |  // Assign the new buffer to the parent attribute.
   75|  20.4k|  ResetBuffer(attribute_buffer_.get(), entry_size, 0);
   76|  20.4k|  num_unique_entries_ = static_cast<uint32_t>(num_attribute_values);
   77|  20.4k|  return true;
   78|  20.4k|}

_ZNK5draco14PointAttribute4sizeEv:
   55|  12.8k|  size_t size() const { return num_unique_entries_; }
_ZNK5draco14PointAttribute12mapped_indexENS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   56|  44.0M|  AttributeValueIndex mapped_index(PointIndex point_index) const {
   57|  44.0M|    if (identity_mapping_) {
  ------------------
  |  Branch (57:9): [True: 0, False: 44.0M]
  ------------------
   58|      0|      return AttributeValueIndex(point_index.value());
   59|      0|    }
   60|  44.0M|    return indices_map_[point_index];
   61|  44.0M|  }
_ZNK5draco14PointAttribute6bufferEv:
   62|  1.41M|  DataBuffer *buffer() const { return attribute_buffer_.get(); }
_ZNK5draco14PointAttribute19is_mapping_identityEv:
   63|  24.5M|  bool is_mapping_identity() const { return identity_mapping_; }
_ZNK5draco14PointAttribute16indices_map_sizeEv:
   64|  24.5M|  size_t indices_map_size() const {
   65|  24.5M|    if (is_mapping_identity()) {
  ------------------
  |  Branch (65:9): [True: 0, False: 24.5M]
  ------------------
   66|      0|      return 0;
   67|      0|    }
   68|  24.5M|    return indices_map_.size();
   69|  24.5M|  }
_ZN5draco14PointAttribute18SetIdentityMappingEv:
   88|  12.3k|  void SetIdentityMapping() {
   89|  12.3k|    identity_mapping_ = true;
   90|  12.3k|    indices_map_.clear();
   91|  12.3k|  }
_ZN5draco14PointAttribute18SetExplicitMappingEm:
   94|  16.4k|  void SetExplicitMapping(size_t num_points) {
   95|  16.4k|    identity_mapping_ = false;
   96|  16.4k|    indices_map_.resize(num_points, kInvalidAttributeValueIndex);
   97|  16.4k|  }
_ZN5draco14PointAttribute16SetPointMapEntryENS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEE:
  101|  66.5M|                        AttributeValueIndex entry_index) {
  102|  66.5M|    DRACO_DCHECK(!identity_mapping_);
  103|  66.5M|    indices_map_[point_index] = entry_index;
  104|  66.5M|  }
_ZN5draco14PointAttribute25SetAttributeTransformDataENSt3__110unique_ptrINS_22AttributeTransformDataENS1_14default_deleteIS3_EEEE:
  129|    370|      std::unique_ptr<AttributeTransformData> transform_data) {
  130|    370|    attribute_transform_data_ = std::move(transform_data);
  131|    370|  }

_ZN5draco17AttributesDecoderC2Ev:
   22|  20.9k|    : point_cloud_decoder_(nullptr), point_cloud_(nullptr) {}
_ZN5draco17AttributesDecoder4InitEPNS_17PointCloudDecoderEPNS_10PointCloudE:
   24|  20.9k|bool AttributesDecoder::Init(PointCloudDecoder *decoder, PointCloud *pc) {
   25|  20.9k|  point_cloud_decoder_ = decoder;
   26|  20.9k|  point_cloud_ = pc;
   27|  20.9k|  return true;
   28|  20.9k|}
_ZN5draco17AttributesDecoder27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   30|  7.69k|bool AttributesDecoder::DecodeAttributesDecoderData(DecoderBuffer *in_buffer) {
   31|       |  // Decode and create attributes.
   32|  7.69k|  uint32_t num_attributes;
   33|  7.69k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   34|  7.69k|  if (point_cloud_decoder_->bitstream_version() <
  ------------------
  |  Branch (34:7): [True: 39, False: 7.65k]
  ------------------
   35|  7.69k|      DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  7.69k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
   36|     39|    if (!in_buffer->Decode(&num_attributes)) {
  ------------------
  |  Branch (36:9): [True: 1, False: 38]
  ------------------
   37|      1|      return false;
   38|      1|    }
   39|     39|  } else
   40|  7.65k|#endif
   41|  7.65k|  {
   42|  7.65k|    if (!DecodeVarint(&num_attributes, in_buffer)) {
  ------------------
  |  Branch (42:9): [True: 13, False: 7.64k]
  ------------------
   43|     13|      return false;
   44|     13|    }
   45|  7.65k|  }
   46|       |
   47|       |  // Check that decoded number of attributes is valid.
   48|  7.68k|  if (num_attributes == 0) {
  ------------------
  |  Branch (48:7): [True: 7, False: 7.67k]
  ------------------
   49|      7|    return false;
   50|      7|  }
   51|  7.67k|  if (num_attributes > 5 * in_buffer->remaining_size()) {
  ------------------
  |  Branch (51:7): [True: 30, False: 7.64k]
  ------------------
   52|       |    // The decoded number of attributes is unreasonably high, because at least
   53|       |    // five bytes of attribute descriptor data per attribute are expected.
   54|     30|    return false;
   55|     30|  }
   56|       |
   57|       |  // Decode attribute descriptor data.
   58|  7.64k|  point_attribute_ids_.resize(num_attributes);
   59|  7.64k|  PointCloud *pc = point_cloud_;
   60|  47.3k|  for (uint32_t i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:24): [True: 39.7k, False: 7.57k]
  ------------------
   61|       |    // Decode attribute descriptor data.
   62|  39.7k|    uint8_t att_type, data_type, num_components, normalized;
   63|  39.7k|    if (!in_buffer->Decode(&att_type)) {
  ------------------
  |  Branch (63:9): [True: 7, False: 39.7k]
  ------------------
   64|      7|      return false;
   65|      7|    }
   66|  39.7k|    if (!in_buffer->Decode(&data_type)) {
  ------------------
  |  Branch (66:9): [True: 2, False: 39.7k]
  ------------------
   67|      2|      return false;
   68|      2|    }
   69|  39.7k|    if (!in_buffer->Decode(&num_components)) {
  ------------------
  |  Branch (69:9): [True: 4, False: 39.7k]
  ------------------
   70|      4|      return false;
   71|      4|    }
   72|  39.7k|    if (!in_buffer->Decode(&normalized)) {
  ------------------
  |  Branch (72:9): [True: 6, False: 39.7k]
  ------------------
   73|      6|      return false;
   74|      6|    }
   75|  39.7k|    if (att_type >= GeometryAttribute::NAMED_ATTRIBUTES_COUNT) {
  ------------------
  |  Branch (75:9): [True: 32, False: 39.7k]
  ------------------
   76|     32|      return false;
   77|     32|    }
   78|  39.7k|    if (data_type == DT_INVALID || data_type >= DT_TYPES_COUNT) {
  ------------------
  |  Branch (78:9): [True: 5, False: 39.7k]
  |  Branch (78:36): [True: 3, False: 39.7k]
  ------------------
   79|      8|      return false;
   80|      8|    }
   81|       |
   82|       |    // Check decoded attribute descriptor data.
   83|  39.7k|    if (num_components == 0) {
  ------------------
  |  Branch (83:9): [True: 1, False: 39.7k]
  ------------------
   84|      1|      return false;
   85|      1|    }
   86|       |
   87|       |    // Add the attribute to the point cloud.
   88|  39.7k|    const DataType draco_dt = static_cast<DataType>(data_type);
   89|  39.7k|    GeometryAttribute ga;
   90|  39.7k|    ga.Init(static_cast<GeometryAttribute::Type>(att_type), nullptr,
   91|  39.7k|            num_components, draco_dt, normalized > 0,
   92|  39.7k|            DataTypeLength(draco_dt) * num_components, 0);
   93|  39.7k|    uint32_t unique_id;
   94|  39.7k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   95|  39.7k|    if (point_cloud_decoder_->bitstream_version() <
  ------------------
  |  Branch (95:9): [True: 139, False: 39.5k]
  ------------------
   96|  39.7k|        DRACO_BITSTREAM_VERSION(1, 3)) {
  ------------------
  |  |  115|  39.7k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
   97|    139|      uint16_t custom_id;
   98|    139|      if (!in_buffer->Decode(&custom_id)) {
  ------------------
  |  Branch (98:11): [True: 2, False: 137]
  ------------------
   99|      2|        return false;
  100|      2|      }
  101|       |      // TODO(draco-eng): Add "custom_id" to attribute metadata.
  102|    137|      unique_id = static_cast<uint32_t>(custom_id);
  103|    137|      ga.set_unique_id(unique_id);
  104|    137|    } else
  105|  39.5k|#endif
  106|  39.5k|    {
  107|  39.5k|      if (!DecodeVarint(&unique_id, in_buffer)) {
  ------------------
  |  Branch (107:11): [True: 6, False: 39.5k]
  ------------------
  108|      6|        return false;
  109|      6|      }
  110|  39.5k|      ga.set_unique_id(unique_id);
  111|  39.5k|    }
  112|  39.6k|    const int att_id = pc->AddAttribute(
  113|  39.6k|        std::unique_ptr<PointAttribute>(new PointAttribute(ga)));
  114|  39.6k|    pc->attribute(att_id)->set_unique_id(unique_id);
  115|  39.6k|    point_attribute_ids_[i] = att_id;
  116|       |
  117|       |    // Update the inverse map.
  118|  39.6k|    if (att_id >=
  ------------------
  |  Branch (118:9): [True: 39.6k, False: 0]
  ------------------
  119|  39.6k|        static_cast<int32_t>(point_attribute_to_local_id_map_.size())) {
  120|  39.6k|      point_attribute_to_local_id_map_.resize(att_id + 1, -1);
  121|  39.6k|    }
  122|  39.6k|    point_attribute_to_local_id_map_[att_id] = i;
  123|  39.6k|  }
  124|  7.57k|  return true;
  125|  7.64k|}

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|  81.4k|  int32_t GetAttributeId(int i) const override {
   45|  81.4k|    return point_attribute_ids_[i];
   46|  81.4k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|  47.4k|  int32_t GetNumAttributes() const override {
   48|  47.4k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|  47.4k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  48.5k|  PointCloudDecoder *GetDecoder() const override {
   51|  48.5k|    return point_cloud_decoder_;
   52|  48.5k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  4.63k|  bool DecodeAttributes(DecoderBuffer *in_buffer) override {
   56|  4.63k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 1.80k, False: 2.83k]
  ------------------
   57|  1.80k|      return false;
   58|  1.80k|    }
   59|  2.83k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 649, False: 2.18k]
  ------------------
   60|    649|      return false;
   61|    649|    }
   62|  2.18k|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 223, False: 1.96k]
  ------------------
   63|    223|      return false;
   64|    223|    }
   65|  1.96k|    return true;
   66|  2.18k|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  2.48k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  2.48k|    const int id_map_size =
   71|  2.48k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  2.48k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2.48k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  2.48k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  2.48k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  20.9k|  virtual ~AttributesDecoder() = default;

_ZN5draco26AttributesDecoderInterfaceD2Ev:
   34|  20.9k|  virtual ~AttributesDecoderInterface() = default;
_ZN5draco26AttributesDecoderInterfaceC2Ev:
   33|  20.9k|  AttributesDecoderInterface() = default;

_ZN5draco15LinearSequencerC2Ei:
   26|  17.9k|  explicit LinearSequencer(int32_t num_points) : num_points_(num_points) {}
_ZN5draco15LinearSequencer34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   28|  2.70k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   29|  2.70k|    attribute->SetIdentityMapping();
   30|  2.70k|    return true;
   31|  2.70k|  }
_ZN5draco15LinearSequencer24GenerateSequenceInternalEv:
   34|  1.64k|  bool GenerateSequenceInternal() override {
   35|  1.64k|    if (num_points_ < 0) {
  ------------------
  |  Branch (35:9): [True: 5, False: 1.63k]
  ------------------
   36|      5|      return false;
   37|      5|    }
   38|  1.63k|    out_point_ids()->resize(num_points_);
   39|   563M|    for (int i = 0; i < num_points_; ++i) {
  ------------------
  |  Branch (39:21): [True: 563M, False: 1.63k]
  ------------------
   40|   563M|      out_point_ids()->at(i) = PointIndex(i);
   41|   563M|    }
   42|  1.63k|    return true;
   43|  1.64k|  }

_ZN5draco32MeshAttributeIndicesEncodingDataC2Ev:
   28|  22.8k|  MeshAttributeIndicesEncodingData() : num_values(0) {}
_ZN5draco32MeshAttributeIndicesEncodingData4InitEi:
   30|  9.19k|  void Init(int num_vertices) {
   31|  9.19k|    vertex_to_encoded_attribute_value_index_map.resize(num_vertices);
   32|       |
   33|       |    // We expect to store one value for each vertex.
   34|  9.19k|    encoded_attribute_value_index_to_corner_map.reserve(num_vertices);
   35|  9.19k|  }

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  2.70k|      : quantization_bits_(-1),
   54|  2.70k|        max_quantized_value_(-1),
   55|  2.70k|        max_value_(-1),
   56|  2.70k|        dequantization_scale_(1.f),
   57|  2.70k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  2.45k|  bool SetQuantizationBits(int32_t q) {
   60|  2.45k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 851, False: 1.60k]
  |  Branch (60:18): [True: 72, False: 1.53k]
  ------------------
   61|    923|      return false;
   62|    923|    }
   63|  1.53k|    quantization_bits_ = q;
   64|  1.53k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  1.53k|    max_value_ = max_quantized_value_ - 1;
   66|  1.53k|    dequantization_scale_ = 2.f / max_value_;
   67|  1.53k|    center_value_ = max_value_ / 2;
   68|  1.53k|    return true;
   69|  2.45k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  3.15M|                                           int32_t *out_t) const {
   77|  3.15M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 3.09k, False: 3.15M]
  |  Branch (77:20): [True: 0, False: 3.09k]
  |  Branch (77:32): [True: 3.09k, False: 3.15M]
  |  Branch (77:42): [True: 0, False: 3.09k]
  ------------------
   78|  3.15M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 1.93M, False: 1.22M]
  |  Branch (78:29): [True: 4.36k, False: 1.93M]
  ------------------
   79|  4.36k|      s = max_value_;
   80|  4.36k|      t = max_value_;
   81|  3.15M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 3.09k, False: 3.15M]
  |  Branch (81:26): [True: 866, False: 2.22k]
  ------------------
   82|    866|      t = center_value_ - (t - center_value_);
   83|  3.15M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 1.93M, False: 1.22M]
  |  Branch (83:35): [True: 4.59k, False: 1.92M]
  ------------------
   84|  4.59k|      t = center_value_ + (center_value_ - t);
   85|  3.14M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 1.92M, False: 1.21M]
  |  Branch (85:35): [True: 201, False: 1.92M]
  ------------------
   86|    201|      s = center_value_ + (center_value_ - s);
   87|  3.14M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 3.99k, False: 3.14M]
  |  Branch (87:26): [True: 1.71k, False: 2.28k]
  ------------------
   88|  1.71k|      s = center_value_ - (s - center_value_);
   89|  1.71k|    }
   90|       |
   91|  3.15M|    *out_s = s;
   92|  3.15M|    *out_t = t;
   93|  3.15M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  3.15M|                                                       int32_t *out_t) const {
  100|  3.15M|    DRACO_DCHECK_EQ(
  101|  3.15M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  3.15M|        center_value_);
  103|  3.15M|    int32_t s, t;
  104|  3.15M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.63M, False: 1.52M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.63M|      s = (int_vec[1] + center_value_);
  107|  1.63M|      t = (int_vec[2] + center_value_);
  108|  1.63M|    } else {
  109|       |      // Left hemisphere.
  110|  1.52M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 43.8k, False: 1.47M]
  ------------------
  111|  43.8k|        s = std::abs(int_vec[2]);
  112|  1.47M|      } else {
  113|  1.47M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.47M|      }
  115|  1.52M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 48.8k, False: 1.47M]
  ------------------
  116|  48.8k|        t = std::abs(int_vec[1]);
  117|  1.47M|      } else {
  118|  1.47M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.47M|      }
  120|  1.52M|    }
  121|  3.15M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  3.15M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   273k|                                                    float *out_vector) const {
  199|   273k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   273k|                                 in_t * dequantization_scale_ - 1.f,
  201|   273k|                                 out_vector);
  202|   273k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.47M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  2.47M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.47M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.47M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.47M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.47M|    const uint32_t st =
  212|  2.47M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.47M|    return st <= center_value_;
  214|  2.47M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  2.62M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  2.62M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  2.62M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  2.62M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  2.62M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  2.62M|    int32_t sign_s = 0;
  223|  2.62M|    int32_t sign_t = 0;
  224|  2.62M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 2.52M, False: 105k]
  |  Branch (224:20): [True: 2.46M, False: 58.3k]
  ------------------
  225|  2.46M|      sign_s = 1;
  226|  2.46M|      sign_t = 1;
  227|  2.46M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 107k, False: 56.4k]
  |  Branch (227:27): [True: 57.2k, False: 50.2k]
  ------------------
  228|  57.2k|      sign_s = -1;
  229|  57.2k|      sign_t = -1;
  230|   106k|    } else {
  231|   106k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 56.4k, False: 50.2k]
  ------------------
  232|   106k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 50.2k, False: 56.4k]
  ------------------
  233|   106k|    }
  234|       |
  235|       |    // Perform the addition and subtraction using unsigned integers to avoid
  236|       |    // signed integer overflows for bad data. Note that the result will be
  237|       |    // unchanged for non-overflowing cases.
  238|  2.62M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  2.62M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  2.62M|    uint32_t us = *s;
  241|  2.62M|    uint32_t ut = *t;
  242|  2.62M|    us = us + us - corner_point_s;
  243|  2.62M|    ut = ut + ut - corner_point_t;
  244|  2.62M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 2.51M, False: 106k]
  ------------------
  245|  2.51M|      uint32_t temp = us;
  246|  2.51M|      us = -ut;
  247|  2.51M|      ut = -temp;
  248|  2.51M|    } else {
  249|   106k|      std::swap(us, ut);
  250|   106k|    }
  251|  2.62M|    us = us + corner_point_s;
  252|  2.62M|    ut = ut + corner_point_t;
  253|       |
  254|  2.62M|    *s = us;
  255|  2.62M|    *t = ut;
  256|  2.62M|    *s /= 2;
  257|  2.62M|    *t /= 2;
  258|  2.62M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  4.95M|  int32_t ModMax(int32_t x) const {
  273|  4.95M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 1.14k, False: 4.95M]
  ------------------
  274|  1.14k|      return x - this->max_quantized_value();
  275|  1.14k|    }
  276|  4.95M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 780, False: 4.95M]
  ------------------
  277|    780|      return x + this->max_quantized_value();
  278|    780|    }
  279|  4.95M|    return x;
  280|  4.95M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.45k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  1.92k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  14.8M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   273k|                                           float *out_vector) const {
  299|       |    // Background about the encoding:
  300|       |    //   A normal is encoded in a normalized space <s, t> depicted below. The
  301|       |    //   encoding correponds to an octahedron that is unwrapped to a 2D plane.
  302|       |    //   During encoding, a normal is projected to the surface of the octahedron
  303|       |    //   and the projection is then unwrapped to the 2D plane. Decoding is the
  304|       |    //   reverse of this process.
  305|       |    //   All points in the central diamond are located on triangles on the
  306|       |    //   right "hemisphere" of the octahedron while all points outside of the
  307|       |    //   diamond are on the left hemisphere (basically, they would have to be
  308|       |    //   wrapped along the diagonal edges to form the octahedron). The central
  309|       |    //   point corresponds to the right most vertex of the octahedron and all
  310|       |    //   corners of the plane correspond to the left most vertex of the
  311|       |    //   octahedron.
  312|       |    //
  313|       |    // t
  314|       |    // ^ *-----*-----*
  315|       |    // | |    /|\    |
  316|       |    //   |   / | \   |
  317|       |    //   |  /  |  \  |
  318|       |    //   | /   |   \ |
  319|       |    //   *-----*---- *
  320|       |    //   | \   |   / |
  321|       |    //   |  \  |  /  |
  322|       |    //   |   \ | /   |
  323|       |    //   |    \|/    |
  324|       |    //   *-----*-----*  --> s
  325|       |
  326|       |    // Note that the input |in_s_scaled| and |in_t_scaled| are already scaled to
  327|       |    // <-1, 1> range. This way, the central point is at coordinate (0, 0).
  328|   273k|    float y = in_s_scaled;
  329|   273k|    float z = in_t_scaled;
  330|       |
  331|       |    // Remaining coordinate can be computed by projecting the (y, z) values onto
  332|       |    // the surface of the octahedron.
  333|   273k|    const float x = 1.f - std::abs(y) - std::abs(z);
  334|       |
  335|       |    // |x| is essentially a signed distance from the diagonal edges of the
  336|       |    // diamond shown on the figure above. It is positive for all points in the
  337|       |    // diamond (right hemisphere) and negative for all points outside the
  338|       |    // diamond (left hemisphere). For all points on the left hemisphere we need
  339|       |    // to update their (y, z) coordinates to account for the wrapping along
  340|       |    // the edges of the diamond.
  341|   273k|    float x_offset = -x;
  342|   273k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 21.4k, False: 251k]
  ------------------
  343|       |
  344|       |    // This will do nothing for the points on the right hemisphere but it will
  345|       |    // mirror the (y, z) location along the nearest diagonal edge of the
  346|       |    // diamond.
  347|   273k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 14.6k, False: 258k]
  ------------------
  348|   273k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 13.8k, False: 259k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   273k|    const float norm_squared = x * x + y * y + z * z;
  352|   273k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 273k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   273k|    } else {
  357|   273k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   273k|      out_vector[0] = x * d;
  359|   273k|      out_vector[1] = y * d;
  360|   273k|      out_vector[2] = z * d;
  361|   273k|    }
  362|   273k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  3.15M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  3.15M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  3.15M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  3.15M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  3.15M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  3.15M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  3.15M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 2.92M, False: 233k]
  ------------------
  181|  2.92M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  2.92M|    } else {
  183|   233k|      vec[0] =
  184|   233k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   233k|          abs_sum;
  186|   233k|      vec[1] =
  187|   233k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   233k|          abs_sum;
  189|   233k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 125k, False: 108k]
  ------------------
  190|   125k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   125k|      } else {
  192|   108k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|   108k|      }
  194|   233k|    }
  195|  3.15M|  }

_ZN5draco15PointsSequencerC2Ev:
   29|  20.9k|  PointsSequencer() : out_point_ids_(nullptr) {}
_ZN5draco15PointsSequencer16GenerateSequenceEPNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   33|  4.64k|  bool GenerateSequence(std::vector<PointIndex> *out_point_ids) {
   34|  4.64k|    out_point_ids_ = out_point_ids;
   35|  4.64k|    return GenerateSequenceInternal();
   36|  4.64k|  }
_ZN5draco15PointsSequencer10AddPointIdENS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   39|  8.21M|  void AddPointId(PointIndex point_id) { out_point_ids_->push_back(point_id); }
_ZNK5draco15PointsSequencer13out_point_idsEv:
   55|   563M|  std::vector<PointIndex> *out_point_ids() const { return out_point_ids_; }
_ZN5draco15PointsSequencerD2Ev:
   30|  20.9k|  virtual ~PointsSequencer() = default;

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    256|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    256|            attribute, transform, mesh_data),
   52|    256|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    243|                                                                *buffer) {
  194|    243|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    243|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    243|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 27, False: 216]
  ------------------
  196|       |    // Decode prediction mode.
  197|     27|    uint8_t mode;
  198|     27|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 0, False: 27]
  ------------------
  199|      0|      return false;
  200|      0|    }
  201|       |
  202|     27|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 22, False: 5]
  ------------------
  203|       |      // Unsupported mode.
  204|     22|      return false;
  205|     22|    }
  206|     27|  }
  207|    221|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.01k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 839, False: 179]
  ------------------
  211|    839|    uint32_t num_flags;
  212|    839|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 3, False: 836]
  ------------------
  213|      3|      return false;
  214|      3|    }
  215|    836|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 23, False: 813]
  ------------------
  216|     23|      return false;
  217|     23|    }
  218|    813|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 433, False: 380]
  ------------------
  219|    433|      is_crease_edge_[i].resize(num_flags);
  220|    433|      RAnsBitDecoder decoder;
  221|    433|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 16, False: 417]
  ------------------
  222|     16|        return false;
  223|     16|      }
  224|  1.13M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.13M, False: 417]
  ------------------
  225|  1.13M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.13M|      }
  227|    417|      decoder.EndDecoding();
  228|    417|    }
  229|    813|  }
  230|    179|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    179|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    221|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    172|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    172|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    172|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|    860|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 688, False: 172]
  ------------------
   93|    688|    pred_vals[i].resize(num_components, 0);
   94|    688|  }
   95|    172|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    172|                                         out_data);
   97|       |
   98|    172|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    172|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    172|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    172|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    172|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    172|  const int corner_map_size =
  109|    172|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   477k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 477k, False: 128]
  ------------------
  111|   477k|    const CornerIndex start_corner_id =
  112|   477k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   477k|    CornerIndex corner_id(start_corner_id);
  115|   477k|    int num_parallelograms = 0;
  116|   477k|    bool first_pass = true;
  117|  1.12M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 670k, False: 450k]
  ------------------
  118|   670k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 73.9k, False: 596k]
  ------------------
  119|   670k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   670k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  73.9k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  73.9k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 482, False: 73.5k]
  ------------------
  127|    482|          break;
  128|    482|        }
  129|  73.9k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   670k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 637k, False: 32.7k]
  ------------------
  134|   637k|        corner_id = table->SwingLeft(corner_id);
  135|   637k|      } else {
  136|  32.7k|        corner_id = table->SwingRight(corner_id);
  137|  32.7k|      }
  138|   670k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 27.0k, False: 643k]
  ------------------
  139|  27.0k|        break;
  140|  27.0k|      }
  141|   643k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 468k, False: 174k]
  |  Branch (141:47): [True: 450k, False: 18.8k]
  ------------------
  142|   450k|        first_pass = false;
  143|   450k|        corner_id = table->SwingRight(start_corner_id);
  144|   450k|      }
  145|   643k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   477k|    int num_used_parallelograms = 0;
  150|   477k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 47.1k, False: 430k]
  ------------------
  151|  7.19M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 7.15M, False: 47.1k]
  ------------------
  152|  7.15M|        multi_pred_vals[i] = 0;
  153|  7.15M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   121k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 73.9k, False: 47.0k]
  ------------------
  156|  73.9k|        const int context = num_parallelograms - 1;
  157|  73.9k|        const int pos = is_crease_edge_pos[context]++;
  158|  73.9k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 44, False: 73.9k]
  ------------------
  159|     44|          return false;
  160|     44|        }
  161|  73.9k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  73.9k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 9.84k, False: 64.0k]
  ------------------
  163|  9.84k|          ++num_used_parallelograms;
  164|  1.34M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 1.33M, False: 9.84k]
  ------------------
  165|  1.33M|            multi_pred_vals[j] =
  166|  1.33M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  1.33M|          }
  168|  9.84k|        }
  169|  73.9k|      }
  170|  47.1k|    }
  171|   477k|    const int dst_offset = p * num_components;
  172|   477k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 473k, False: 3.93k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   473k|      const int src_offset = (p - 1) * num_components;
  176|   473k|      this->transform().ComputeOriginalValue(
  177|   473k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   473k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   554k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 550k, False: 3.93k]
  ------------------
  181|   550k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   550k|      }
  183|  3.93k|      this->transform().ComputeOriginalValue(
  184|  3.93k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  3.93k|    }
  186|   477k|  }
  187|    128|  return true;
  188|    172|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    301|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    301|            attribute, transform, mesh_data),
   52|    301|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    299|                                                                *buffer) {
  194|    299|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    299|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    299|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 3, False: 296]
  ------------------
  196|       |    // Decode prediction mode.
  197|      3|    uint8_t mode;
  198|      3|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 2]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 1, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      1|      return false;
  205|      1|    }
  206|      2|  }
  207|    297|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.35k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.10k, False: 247]
  ------------------
  211|  1.10k|    uint32_t num_flags;
  212|  1.10k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 6, False: 1.10k]
  ------------------
  213|      6|      return false;
  214|      6|    }
  215|  1.10k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 35, False: 1.06k]
  ------------------
  216|     35|      return false;
  217|     35|    }
  218|  1.06k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 467, False: 600]
  ------------------
  219|    467|      is_crease_edge_[i].resize(num_flags);
  220|    467|      RAnsBitDecoder decoder;
  221|    467|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 9, False: 458]
  ------------------
  222|      9|        return false;
  223|      9|      }
  224|   603k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 602k, False: 458]
  ------------------
  225|   602k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|   602k|      }
  227|    458|      decoder.EndDecoding();
  228|    458|    }
  229|  1.06k|  }
  230|    247|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    247|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    297|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    224|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    224|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    224|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.12k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 896, False: 224]
  ------------------
   93|    896|    pred_vals[i].resize(num_components, 0);
   94|    896|  }
   95|    224|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    224|                                         out_data);
   97|       |
   98|    224|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    224|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    224|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    224|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    224|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    224|  const int corner_map_size =
  109|    224|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   133k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 133k, False: 139]
  ------------------
  111|   133k|    const CornerIndex start_corner_id =
  112|   133k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   133k|    CornerIndex corner_id(start_corner_id);
  115|   133k|    int num_parallelograms = 0;
  116|   133k|    bool first_pass = true;
  117|   814k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 780k, False: 33.5k]
  ------------------
  118|   780k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 229k, False: 550k]
  ------------------
  119|   780k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   780k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|   229k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|   229k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 619, False: 229k]
  ------------------
  127|    619|          break;
  128|    619|        }
  129|   229k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   779k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 704k, False: 75.3k]
  ------------------
  134|   704k|        corner_id = table->SwingLeft(corner_id);
  135|   704k|      } else {
  136|  75.3k|        corner_id = table->SwingRight(corner_id);
  137|  75.3k|      }
  138|   779k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 99.0k, False: 680k]
  ------------------
  139|  99.0k|        break;
  140|  99.0k|      }
  141|   680k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 65.0k, False: 615k]
  |  Branch (141:47): [True: 33.5k, False: 31.4k]
  ------------------
  142|  33.5k|        first_pass = false;
  143|  33.5k|        corner_id = table->SwingRight(start_corner_id);
  144|  33.5k|      }
  145|   680k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   133k|    int num_used_parallelograms = 0;
  150|   133k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 132k, False: 1.08k]
  ------------------
  151|  10.5M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 10.4M, False: 132k]
  ------------------
  152|  10.4M|        multi_pred_vals[i] = 0;
  153|  10.4M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   361k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 229k, False: 132k]
  ------------------
  156|   229k|        const int context = num_parallelograms - 1;
  157|   229k|        const int pos = is_crease_edge_pos[context]++;
  158|   229k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 85, False: 229k]
  ------------------
  159|     85|          return false;
  160|     85|        }
  161|   229k|        const bool is_crease = is_crease_edge_[context][pos];
  162|   229k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 10.4k, False: 218k]
  ------------------
  163|  10.4k|          ++num_used_parallelograms;
  164|   969k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 958k, False: 10.4k]
  ------------------
  165|   958k|            multi_pred_vals[j] =
  166|   958k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|   958k|          }
  168|  10.4k|        }
  169|   229k|      }
  170|   132k|    }
  171|   133k|    const int dst_offset = p * num_components;
  172|   133k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 128k, False: 4.62k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   128k|      const int src_offset = (p - 1) * num_components;
  176|   128k|      this->transform().ComputeOriginalValue(
  177|   128k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   128k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   379k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 375k, False: 4.62k]
  ------------------
  181|   375k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   375k|      }
  183|  4.62k|      this->transform().ComputeOriginalValue(
  184|  4.62k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  4.62k|    }
  186|   133k|  }
  187|    139|  return true;
  188|    224|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.41k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.41k|    mesh_ = mesh;
   39|  2.41k|    corner_table_ = table;
   40|  2.41k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.41k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.41k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  14.9M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  10.5M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  10.5M|    return vertex_to_data_map_;
   48|  10.5M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  5.72M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  5.72M|    return data_to_corner_map_;
   51|  5.72M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.46k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.46k|    mesh_ = mesh;
   39|  2.46k|    corner_table_ = table;
   40|  2.46k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.46k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.46k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  13.4M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  11.7M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  11.7M|    return vertex_to_data_map_;
   48|  11.7M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.27M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  2.27M|    return data_to_corner_map_;
   51|  2.27M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  2.41k|      : mesh_(nullptr),
   31|  2.41k|        corner_table_(nullptr),
   32|  2.41k|        vertex_to_data_map_(nullptr),
   33|  2.41k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  2.46k|      : mesh_(nullptr),
   31|  2.46k|        corner_table_(nullptr),
   32|  2.46k|        vertex_to_data_map_(nullptr),
   33|  2.46k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   724k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   320k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  1.08M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   271k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  1.99k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  1.99k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  6.80M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.09k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.09k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  2.94M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    201|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    201|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    195|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    195|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    207|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    207|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    163|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    163|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    401|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    201|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    201|    DRACO_DCHECK_EQ(i, 0);
   70|    201|    (void)i;
   71|    201|    return GeometryAttribute::POSITION;
   72|    201|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    201|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    201|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 201]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    201|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 200]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    200|    predictor_.SetPositionAttribute(*att);
   82|    200|    return true;
   83|    201|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    198|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    198|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 192]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    192|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    192|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    192|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 62, False: 130]
  ------------------
  150|     62|    uint8_t prediction_mode;
  151|     62|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 61]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     61|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 60]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     60|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 60]
  ------------------
  160|     60|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     60|  }
  164|    190|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    190|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 8, False: 182]
  ------------------
  168|      8|    return false;
  169|      8|  }
  170|       |
  171|    182|  return true;
  172|    190|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    182|                                      const PointIndex *entry_to_point_id_map) {
  103|    182|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    182|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    182|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    182|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    182|  const int corner_map_size =
  111|    182|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    182|  VectorD<int32_t, 3> pred_normal_3d;
  114|    182|  int32_t pred_normal_oct[2];
  115|       |
  116|   724k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 724k, False: 182]
  ------------------
  117|   724k|    const CornerIndex corner_id =
  118|   724k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   724k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   724k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   724k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   724k|                    octahedron_tool_box_.center_value());
  125|   724k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 479k, False: 245k]
  ------------------
  126|   479k|      pred_normal_3d = -pred_normal_3d;
  127|   479k|    }
  128|   724k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   724k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   724k|    const int data_offset = data_id * 2;
  132|   724k|    this->transform().ComputeOriginalValue(
  133|   724k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   724k|  }
  135|    182|  flip_normal_bit_decoder_.EndDecoding();
  136|    182|  return true;
  137|    182|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    182|  void SetQuantizationBits(int q) {
   85|    182|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    182|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    388|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    195|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    195|    DRACO_DCHECK_EQ(i, 0);
   70|    195|    (void)i;
   71|    195|    return GeometryAttribute::POSITION;
   72|    195|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    194|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    194|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 194]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    194|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 193]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    193|    predictor_.SetPositionAttribute(*att);
   82|    193|    return true;
   83|    194|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    193|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    193|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 187]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    187|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    187|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    187|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 27, False: 160]
  ------------------
  150|     27|    uint8_t prediction_mode;
  151|     27|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 26]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     26|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 25]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     25|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 25]
  ------------------
  160|     25|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     25|  }
  164|    185|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    185|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 181]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    181|  return true;
  172|    185|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    181|                                      const PointIndex *entry_to_point_id_map) {
  103|    181|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    181|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    181|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    181|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    181|  const int corner_map_size =
  111|    181|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    181|  VectorD<int32_t, 3> pred_normal_3d;
  114|    181|  int32_t pred_normal_oct[2];
  115|       |
  116|   320k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 320k, False: 181]
  ------------------
  117|   320k|    const CornerIndex corner_id =
  118|   320k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   320k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   320k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   320k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   320k|                    octahedron_tool_box_.center_value());
  125|   320k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 271k, False: 48.8k]
  ------------------
  126|   271k|      pred_normal_3d = -pred_normal_3d;
  127|   271k|    }
  128|   320k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   320k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   320k|    const int data_offset = data_id * 2;
  132|   320k|    this->transform().ComputeOriginalValue(
  133|   320k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   320k|  }
  135|    181|  flip_normal_bit_decoder_.EndDecoding();
  136|    181|  return true;
  137|    181|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    181|  void SetQuantizationBits(int q) {
   85|    181|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    181|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    412|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    207|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    207|    DRACO_DCHECK_EQ(i, 0);
   70|    207|    (void)i;
   71|    207|    return GeometryAttribute::POSITION;
   72|    207|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    207|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    207|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 207]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    207|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 205]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    205|    predictor_.SetPositionAttribute(*att);
   82|    205|    return true;
   83|    207|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    205|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    205|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 10, False: 195]
  ------------------
  145|     10|    return false;
  146|     10|  }
  147|       |
  148|    195|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    195|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    195|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 58, False: 137]
  ------------------
  150|     58|    uint8_t prediction_mode;
  151|     58|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 57]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     57|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 5, False: 52]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      5|      return false;
  157|      5|    }
  158|       |
  159|     52|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 52]
  ------------------
  160|     52|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     52|  }
  164|    189|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    189|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 5, False: 184]
  ------------------
  168|      5|    return false;
  169|      5|  }
  170|       |
  171|    184|  return true;
  172|    189|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    184|                                      const PointIndex *entry_to_point_id_map) {
  103|    184|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    184|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    184|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    184|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    184|  const int corner_map_size =
  111|    184|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    184|  VectorD<int32_t, 3> pred_normal_3d;
  114|    184|  int32_t pred_normal_oct[2];
  115|       |
  116|  1.08M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 1.08M, False: 184]
  ------------------
  117|  1.08M|    const CornerIndex corner_id =
  118|  1.08M|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|  1.08M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|  1.08M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|  1.08M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|  1.08M|                    octahedron_tool_box_.center_value());
  125|  1.08M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 446k, False: 641k]
  ------------------
  126|   446k|      pred_normal_3d = -pred_normal_3d;
  127|   446k|    }
  128|  1.08M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|  1.08M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|  1.08M|    const int data_offset = data_id * 2;
  132|  1.08M|    this->transform().ComputeOriginalValue(
  133|  1.08M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|  1.08M|  }
  135|    184|  flip_normal_bit_decoder_.EndDecoding();
  136|    184|  return true;
  137|    184|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    184|  void SetQuantizationBits(int q) {
   85|    184|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    184|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    324|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    163|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    163|    DRACO_DCHECK_EQ(i, 0);
   70|    163|    (void)i;
   71|    163|    return GeometryAttribute::POSITION;
   72|    163|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    163|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    163|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 163]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    163|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 161]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    161|    predictor_.SetPositionAttribute(*att);
   82|    161|    return true;
   83|    163|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    160|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    160|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 154]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    154|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    154|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    154|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 25, False: 129]
  ------------------
  150|     25|    uint8_t prediction_mode;
  151|     25|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 24]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     24|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 23]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     23|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 23]
  ------------------
  160|     23|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     23|  }
  164|    152|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    152|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 2, False: 150]
  ------------------
  168|      2|    return false;
  169|      2|  }
  170|       |
  171|    150|  return true;
  172|    152|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    150|                                      const PointIndex *entry_to_point_id_map) {
  103|    150|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    150|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    150|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    150|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    150|  const int corner_map_size =
  111|    150|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    150|  VectorD<int32_t, 3> pred_normal_3d;
  114|    150|  int32_t pred_normal_oct[2];
  115|       |
  116|   271k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 271k, False: 150]
  ------------------
  117|   271k|    const CornerIndex corner_id =
  118|   271k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   271k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   271k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   271k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   271k|                    octahedron_tool_box_.center_value());
  125|   271k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 201k, False: 69.7k]
  ------------------
  126|   201k|      pred_normal_3d = -pred_normal_3d;
  127|   201k|    }
  128|   271k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   271k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   271k|    const int data_offset = data_id * 2;
  132|   271k|    this->transform().ComputeOriginalValue(
  133|   271k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   271k|  }
  135|    150|  flip_normal_bit_decoder_.EndDecoding();
  136|    150|  return true;
  137|    150|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    150|  void SetQuantizationBits(int q) {
   85|    150|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    150|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    446|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    446|            attribute, transform, mesh_data),
   37|    446|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    890|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    446|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    446|    DRACO_DCHECK_EQ(i, 0);
   70|    446|    (void)i;
   71|    446|    return GeometryAttribute::POSITION;
   72|    446|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    445|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    445|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 445]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    445|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 444]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    444|    predictor_.SetPositionAttribute(*att);
   82|    444|    return true;
   83|    445|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    443|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    443|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 21, False: 422]
  ------------------
  145|     21|    return false;
  146|     21|  }
  147|       |
  148|    422|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    422|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    422|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 225, False: 197]
  ------------------
  150|    225|    uint8_t prediction_mode;
  151|    225|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 225]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|    225|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 7, False: 218]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      7|      return false;
  157|      7|    }
  158|       |
  159|    218|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 218]
  ------------------
  160|    218|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    218|  }
  164|    415|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    415|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 23, False: 392]
  ------------------
  168|     23|    return false;
  169|     23|  }
  170|       |
  171|    392|  return true;
  172|    415|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    392|                                      const PointIndex *entry_to_point_id_map) {
  103|    392|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    392|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    392|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    392|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    392|  const int corner_map_size =
  111|    392|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    392|  VectorD<int32_t, 3> pred_normal_3d;
  114|    392|  int32_t pred_normal_oct[2];
  115|       |
  116|   500k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 500k, False: 392]
  ------------------
  117|   500k|    const CornerIndex corner_id =
  118|   500k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   500k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   500k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   500k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   500k|                    octahedron_tool_box_.center_value());
  125|   500k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 379k, False: 120k]
  ------------------
  126|   379k|      pred_normal_3d = -pred_normal_3d;
  127|   379k|    }
  128|   500k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   500k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   500k|    const int data_offset = data_id * 2;
  132|   500k|    this->transform().ComputeOriginalValue(
  133|   500k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   500k|  }
  135|    392|  flip_normal_bit_decoder_.EndDecoding();
  136|    392|  return true;
  137|    392|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    392|  void SetQuantizationBits(int q) {
   85|    392|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    392|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    434|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    434|            attribute, transform, mesh_data),
   37|    434|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    866|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    434|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    434|    DRACO_DCHECK_EQ(i, 0);
   70|    434|    (void)i;
   71|    434|    return GeometryAttribute::POSITION;
   72|    434|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    433|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    433|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 433]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    433|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 432]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    432|    predictor_.SetPositionAttribute(*att);
   82|    432|    return true;
   83|    433|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    432|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    432|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 44, False: 388]
  ------------------
  145|     44|    return false;
  146|     44|  }
  147|       |
  148|    388|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    388|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    388|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 148, False: 240]
  ------------------
  150|    148|    uint8_t prediction_mode;
  151|    148|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 147]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    147|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 146]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|    146|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 146]
  ------------------
  160|    146|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    146|  }
  164|    386|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    386|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 27, False: 359]
  ------------------
  168|     27|    return false;
  169|     27|  }
  170|       |
  171|    359|  return true;
  172|    386|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    359|                                      const PointIndex *entry_to_point_id_map) {
  103|    359|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    359|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    359|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    359|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    359|  const int corner_map_size =
  111|    359|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    359|  VectorD<int32_t, 3> pred_normal_3d;
  114|    359|  int32_t pred_normal_oct[2];
  115|       |
  116|   252k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 251k, False: 359]
  ------------------
  117|   251k|    const CornerIndex corner_id =
  118|   251k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   251k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   251k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   251k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   251k|                    octahedron_tool_box_.center_value());
  125|   251k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 131k, False: 119k]
  ------------------
  126|   131k|      pred_normal_3d = -pred_normal_3d;
  127|   131k|    }
  128|   251k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   251k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   251k|    const int data_offset = data_id * 2;
  132|   251k|    this->transform().ComputeOriginalValue(
  133|   251k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   251k|  }
  135|    359|  flip_normal_bit_decoder_.EndDecoding();
  136|    359|  return true;
  137|    359|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    359|  void SetQuantizationBits(int q) {
   85|    359|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    359|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    201|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    201|            attribute, transform, mesh_data),
   37|    201|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    195|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    195|            attribute, transform, mesh_data),
   37|    195|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    207|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    207|            attribute, transform, mesh_data),
   37|    207|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    163|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    163|            attribute, transform, mesh_data),
   37|    163|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    261|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    261|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 53, False: 208]
  ------------------
  105|     53|      this->normal_prediction_mode_ = mode;
  106|     53|      return true;
  107|    208|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 208, False: 0]
  ------------------
  108|    208|      this->normal_prediction_mode_ = mode;
  109|    208|      return true;
  110|    208|    }
  111|      0|    return false;
  112|    261|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   724k|                             DataTypeT *prediction) override {
   42|   724k|    DRACO_DCHECK(this->IsInitialized());
   43|   724k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   724k|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|   724k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   724k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   724k|    VectorD<int64_t, 3> normal;
   53|   724k|    CornerIndex c_next, c_prev;
   54|  1.48M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 761k, False: 724k]
  ------------------
   55|       |      // Getting corners.
   56|   761k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 294, False: 761k]
  ------------------
   57|    294|        c_next = corner_table->Next(corner_id);
   58|    294|        c_prev = corner_table->Previous(corner_id);
   59|   761k|      } else {
   60|   761k|        c_next = corner_table->Next(cit.Corner());
   61|   761k|        c_prev = corner_table->Previous(cit.Corner());
   62|   761k|      }
   63|   761k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   761k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   761k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   761k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   761k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   761k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   761k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   761k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   761k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   761k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   761k|      cit.Next();
   81|   761k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   724k|    constexpr int64_t upper_bound = 1 << 29;
   85|   724k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 196, False: 724k]
  ------------------
   86|    196|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    196|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 57, False: 139]
  ------------------
   88|     57|        const int64_t quotient = abs_sum / upper_bound;
   89|     57|        normal = normal / quotient;
   90|     57|      }
   91|   724k|    } else {
   92|   724k|      const int64_t abs_sum = normal.AbsSum();
   93|   724k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.46k, False: 720k]
  ------------------
   94|  3.46k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.46k|        normal = normal / quotient;
   96|  3.46k|      }
   97|   724k|    }
   98|   724k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   724k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   724k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   724k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   724k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    220|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    220|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 23, False: 197]
  ------------------
  105|     23|      this->normal_prediction_mode_ = mode;
  106|     23|      return true;
  107|    197|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 197, False: 0]
  ------------------
  108|    197|      this->normal_prediction_mode_ = mode;
  109|    197|      return true;
  110|    197|    }
  111|      0|    return false;
  112|    220|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   320k|                             DataTypeT *prediction) override {
   42|   320k|    DRACO_DCHECK(this->IsInitialized());
   43|   320k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   320k|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|   320k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   320k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   320k|    VectorD<int64_t, 3> normal;
   53|   320k|    CornerIndex c_next, c_prev;
   54|  2.23M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.91M, False: 320k]
  ------------------
   55|       |      // Getting corners.
   56|  1.91M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 138, False: 1.91M]
  ------------------
   57|    138|        c_next = corner_table->Next(corner_id);
   58|    138|        c_prev = corner_table->Previous(corner_id);
   59|  1.91M|      } else {
   60|  1.91M|        c_next = corner_table->Next(cit.Corner());
   61|  1.91M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.91M|      }
   63|  1.91M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.91M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.91M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.91M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.91M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.91M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.91M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.91M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.91M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.91M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.91M|      cit.Next();
   81|  1.91M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   320k|    constexpr int64_t upper_bound = 1 << 29;
   85|   320k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 92, False: 320k]
  ------------------
   86|     92|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     92|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 26, False: 66]
  ------------------
   88|     26|        const int64_t quotient = abs_sum / upper_bound;
   89|     26|        normal = normal / quotient;
   90|     26|      }
   91|   320k|    } else {
   92|   320k|      const int64_t abs_sum = normal.AbsSum();
   93|   320k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 85.4k, False: 235k]
  ------------------
   94|  85.4k|        const int64_t quotient = abs_sum / upper_bound;
   95|  85.4k|        normal = normal / quotient;
   96|  85.4k|      }
   97|   320k|    }
   98|   320k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   320k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   320k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   320k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   320k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    259|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    259|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 51, False: 208]
  ------------------
  105|     51|      this->normal_prediction_mode_ = mode;
  106|     51|      return true;
  107|    208|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 208, False: 0]
  ------------------
  108|    208|      this->normal_prediction_mode_ = mode;
  109|    208|      return true;
  110|    208|    }
  111|      0|    return false;
  112|    259|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.08M|                             DataTypeT *prediction) override {
   42|  1.08M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.08M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.08M|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|  1.08M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.08M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.08M|    VectorD<int64_t, 3> normal;
   53|  1.08M|    CornerIndex c_next, c_prev;
   54|  2.21M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.12M, False: 1.08M]
  ------------------
   55|       |      // Getting corners.
   56|  1.12M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 288, False: 1.12M]
  ------------------
   57|    288|        c_next = corner_table->Next(corner_id);
   58|    288|        c_prev = corner_table->Previous(corner_id);
   59|  1.12M|      } else {
   60|  1.12M|        c_next = corner_table->Next(cit.Corner());
   61|  1.12M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.12M|      }
   63|  1.12M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.12M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.12M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.12M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.12M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.12M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.12M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.12M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.12M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.12M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.12M|      cit.Next();
   81|  1.12M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  1.08M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.08M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 192, False: 1.08M]
  ------------------
   86|    192|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    192|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 36, False: 156]
  ------------------
   88|     36|        const int64_t quotient = abs_sum / upper_bound;
   89|     36|        normal = normal / quotient;
   90|     36|      }
   91|  1.08M|    } else {
   92|  1.08M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.08M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.54k, False: 1.08M]
  ------------------
   94|  2.54k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.54k|        normal = normal / quotient;
   96|  2.54k|      }
   97|  1.08M|    }
   98|  1.08M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.08M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.08M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.08M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.08M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    186|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    186|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 22, False: 164]
  ------------------
  105|     22|      this->normal_prediction_mode_ = mode;
  106|     22|      return true;
  107|    164|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 164, False: 0]
  ------------------
  108|    164|      this->normal_prediction_mode_ = mode;
  109|    164|      return true;
  110|    164|    }
  111|      0|    return false;
  112|    186|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   271k|                             DataTypeT *prediction) override {
   42|   271k|    DRACO_DCHECK(this->IsInitialized());
   43|   271k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   271k|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|   271k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   271k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   271k|    VectorD<int64_t, 3> normal;
   53|   271k|    CornerIndex c_next, c_prev;
   54|  1.89M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.61M, False: 271k]
  ------------------
   55|       |      // Getting corners.
   56|  1.61M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 126, False: 1.61M]
  ------------------
   57|    126|        c_next = corner_table->Next(corner_id);
   58|    126|        c_prev = corner_table->Previous(corner_id);
   59|  1.61M|      } else {
   60|  1.61M|        c_next = corner_table->Next(cit.Corner());
   61|  1.61M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.61M|      }
   63|  1.61M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.61M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.61M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.61M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.61M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.61M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.61M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.61M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.61M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.61M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.61M|      cit.Next();
   81|  1.61M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   271k|    constexpr int64_t upper_bound = 1 << 29;
   85|   271k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 84, False: 271k]
  ------------------
   86|     84|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     84|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 26, False: 58]
  ------------------
   88|     26|        const int64_t quotient = abs_sum / upper_bound;
   89|     26|        normal = normal / quotient;
   90|     26|      }
   91|   271k|    } else {
   92|   271k|      const int64_t abs_sum = normal.AbsSum();
   93|   271k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 120k, False: 151k]
  ------------------
   94|   120k|        const int64_t quotient = abs_sum / upper_bound;
   95|   120k|        normal = normal / quotient;
   96|   120k|      }
   97|   271k|    }
   98|   271k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   271k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   271k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   271k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   271k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    446|      : Base(md) {
   35|    446|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    446|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    664|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    664|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 193, False: 471]
  ------------------
  105|    193|      this->normal_prediction_mode_ = mode;
  106|    193|      return true;
  107|    471|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 471, False: 0]
  ------------------
  108|    471|      this->normal_prediction_mode_ = mode;
  109|    471|      return true;
  110|    471|    }
  111|      0|    return false;
  112|    664|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   500k|                             DataTypeT *prediction) override {
   42|   500k|    DRACO_DCHECK(this->IsInitialized());
   43|   500k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   500k|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|   500k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   500k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   500k|    VectorD<int64_t, 3> normal;
   53|   500k|    CornerIndex c_next, c_prev;
   54|  1.71M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 500k]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 484k, False: 733k]
  ------------------
   57|   484k|        c_next = corner_table->Next(corner_id);
   58|   484k|        c_prev = corner_table->Previous(corner_id);
   59|   733k|      } else {
   60|   733k|        c_next = corner_table->Next(cit.Corner());
   61|   733k|        c_prev = corner_table->Previous(cit.Corner());
   62|   733k|      }
   63|  1.21M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.21M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.21M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.21M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.21M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.21M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.21M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.21M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.21M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.21M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.21M|      cit.Next();
   81|  1.21M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   500k|    constexpr int64_t upper_bound = 1 << 29;
   85|   500k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 81.8k, False: 418k]
  ------------------
   86|  81.8k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  81.8k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 458, False: 81.3k]
  ------------------
   88|    458|        const int64_t quotient = abs_sum / upper_bound;
   89|    458|        normal = normal / quotient;
   90|    458|      }
   91|   418k|    } else {
   92|   418k|      const int64_t abs_sum = normal.AbsSum();
   93|   418k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.66k, False: 417k]
  ------------------
   94|  1.66k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.66k|        normal = normal / quotient;
   96|  1.66k|      }
   97|   418k|    }
   98|   500k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   500k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   500k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   500k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   500k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    434|      : Base(md) {
   35|    434|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    434|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    580|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    580|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 131, False: 449]
  ------------------
  105|    131|      this->normal_prediction_mode_ = mode;
  106|    131|      return true;
  107|    449|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 449, False: 0]
  ------------------
  108|    449|      this->normal_prediction_mode_ = mode;
  109|    449|      return true;
  110|    449|    }
  111|      0|    return false;
  112|    580|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   251k|                             DataTypeT *prediction) override {
   42|   251k|    DRACO_DCHECK(this->IsInitialized());
   43|   251k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   251k|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|   251k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   251k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   251k|    VectorD<int64_t, 3> normal;
   53|   251k|    CornerIndex c_next, c_prev;
   54|  1.72M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.47M, False: 251k]
  ------------------
   55|       |      // Getting corners.
   56|  1.47M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 522k, False: 951k]
  ------------------
   57|   522k|        c_next = corner_table->Next(corner_id);
   58|   522k|        c_prev = corner_table->Previous(corner_id);
   59|   951k|      } else {
   60|   951k|        c_next = corner_table->Next(cit.Corner());
   61|   951k|        c_prev = corner_table->Previous(cit.Corner());
   62|   951k|      }
   63|  1.47M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.47M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.47M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.47M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.47M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.47M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.47M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.47M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.47M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.47M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.47M|      cit.Next();
   81|  1.47M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   251k|    constexpr int64_t upper_bound = 1 << 29;
   85|   251k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 88.1k, False: 163k]
  ------------------
   86|  88.1k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  88.1k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 350, False: 87.8k]
  ------------------
   88|    350|        const int64_t quotient = abs_sum / upper_bound;
   89|    350|        normal = normal / quotient;
   90|    350|      }
   91|   163k|    } else {
   92|   163k|      const int64_t abs_sum = normal.AbsSum();
   93|   163k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.47k, False: 161k]
  ------------------
   94|  2.47k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.47k|        normal = normal / quotient;
   96|  2.47k|      }
   97|   163k|    }
   98|   251k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   251k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   251k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   251k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   251k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    201|      : Base(md) {
   35|    201|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    201|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    195|      : Base(md) {
   35|    195|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    195|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    207|      : Base(md) {
   35|    207|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    207|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    163|      : Base(md) {
   35|    163|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    163|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.24M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.24M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.24M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.24M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.24M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.24M|    return GetPositionForDataId(data_id);
   77|  2.24M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.24M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.24M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.24M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.24M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.24M|    VectorD<int64_t, 3> pos;
   68|  2.24M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.24M|    return pos;
   70|  2.24M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    200|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    200|    pos_attribute_ = &position_attribute;
   43|    200|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    182|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    182|    entry_to_point_id_map_ = map;
   46|    182|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.14M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  4.14M|    DRACO_DCHECK(this->IsInitialized());
   73|  4.14M|    const auto corner_table = mesh_data_.corner_table();
   74|  4.14M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  4.14M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  4.14M|    return GetPositionForDataId(data_id);
   77|  4.14M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  4.14M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  4.14M|    DRACO_DCHECK(this->IsInitialized());
   65|  4.14M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  4.14M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  4.14M|    VectorD<int64_t, 3> pos;
   68|  4.14M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  4.14M|    return pos;
   70|  4.14M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    193|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    193|    pos_attribute_ = &position_attribute;
   43|    193|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    181|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    181|    entry_to_point_id_map_ = map;
   46|    181|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.34M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.34M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.34M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.34M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.34M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.34M|    return GetPositionForDataId(data_id);
   77|  3.34M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.34M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.34M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.34M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.34M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.34M|    VectorD<int64_t, 3> pos;
   68|  3.34M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.34M|    return pos;
   70|  3.34M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    205|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    205|    pos_attribute_ = &position_attribute;
   43|    205|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    184|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    184|    entry_to_point_id_map_ = map;
   46|    184|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.50M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.50M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.50M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.50M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.50M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.50M|    return GetPositionForDataId(data_id);
   77|  3.50M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.50M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.50M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.50M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.50M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.50M|    VectorD<int64_t, 3> pos;
   68|  3.50M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.50M|    return pos;
   70|  3.50M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    161|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    161|    pos_attribute_ = &position_attribute;
   43|    161|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    150|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    150|    entry_to_point_id_map_ = map;
   46|    150|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    446|      : pos_attribute_(nullptr),
   36|    446|        entry_to_point_id_map_(nullptr),
   37|    446|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    446|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.93M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.93M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.93M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.93M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.93M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.93M|    return GetPositionForDataId(data_id);
   77|  2.93M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.93M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.93M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.93M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.93M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.93M|    VectorD<int64_t, 3> pos;
   68|  2.93M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.93M|    return pos;
   70|  2.93M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    444|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    444|    pos_attribute_ = &position_attribute;
   43|    444|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    392|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    392|    entry_to_point_id_map_ = map;
   46|    392|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    434|      : pos_attribute_(nullptr),
   36|    434|        entry_to_point_id_map_(nullptr),
   37|    434|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    434|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.19M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.19M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.19M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.19M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.19M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.19M|    return GetPositionForDataId(data_id);
   77|  3.19M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.19M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.19M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.19M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.19M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.19M|    VectorD<int64_t, 3> pos;
   68|  3.19M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.19M|    return pos;
   70|  3.19M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    432|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    432|    pos_attribute_ = &position_attribute;
   43|    432|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    359|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    359|    entry_to_point_id_map_ = map;
   46|    359|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    201|      : pos_attribute_(nullptr),
   36|    201|        entry_to_point_id_map_(nullptr),
   37|    201|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    201|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    195|      : pos_attribute_(nullptr),
   36|    195|        entry_to_point_id_map_(nullptr),
   37|    195|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    195|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    207|      : pos_attribute_(nullptr),
   36|    207|        entry_to_point_id_map_(nullptr),
   37|    207|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    207|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    163|      : pos_attribute_(nullptr),
   36|    163|        entry_to_point_id_map_(nullptr),
   37|    163|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    163|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    152|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    152|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    139|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    139|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    139|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    139|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    139|      new DataTypeT[num_components]());
   70|       |
   71|    139|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    139|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    139|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    139|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    139|  const int corner_map_size =
   78|    139|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   192k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 192k, False: 139]
  ------------------
   80|   192k|    const CornerIndex start_corner_id =
   81|   192k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   192k|    CornerIndex corner_id(start_corner_id);
   84|   192k|    int num_parallelograms = 0;
   85|  2.84M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 2.64M, False: 192k]
  ------------------
   86|  2.64M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  2.64M|    }
   88|   486k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 293k, False: 192k]
  ------------------
   89|   293k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 41.0k, False: 252k]
  ------------------
   90|   293k|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|   293k|              num_components, parallelogram_pred_vals.get())) {
   92|  1.13M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 1.09M, False: 41.0k]
  ------------------
   93|  1.09M|          pred_vals[c] =
   94|  1.09M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  1.09M|        }
   96|  41.0k|        ++num_parallelograms;
   97|  41.0k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|   293k|      corner_id = table->SwingRight(corner_id);
  101|   293k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 19.5k, False: 273k]
  ------------------
  102|  19.5k|        corner_id = kInvalidCornerIndex;
  103|  19.5k|      }
  104|   293k|    }
  105|       |
  106|   192k|    const int dst_offset = p * num_components;
  107|   192k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 171k, False: 21.6k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|   171k|      const int src_offset = (p - 1) * num_components;
  111|   171k|      this->transform().ComputeOriginalValue(
  112|   171k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   171k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|   580k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 559k, False: 21.6k]
  ------------------
  116|   559k|        pred_vals[c] /= num_parallelograms;
  117|   559k|      }
  118|  21.6k|      this->transform().ComputeOriginalValue(
  119|  21.6k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|  21.6k|    }
  121|   192k|  }
  122|    139|  return true;
  123|    139|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    466|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    466|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    428|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    428|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    428|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    428|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    428|      new DataTypeT[num_components]());
   70|       |
   71|    428|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    428|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    428|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    428|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    428|  const int corner_map_size =
   78|    428|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   709k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 709k, False: 428]
  ------------------
   80|   709k|    const CornerIndex start_corner_id =
   81|   709k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   709k|    CornerIndex corner_id(start_corner_id);
   84|   709k|    int num_parallelograms = 0;
   85|  8.46M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 7.75M, False: 709k]
  ------------------
   86|  7.75M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  7.75M|    }
   88|  4.91M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 4.20M, False: 709k]
  ------------------
   89|  4.20M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 1.38M, False: 2.82M]
  ------------------
   90|  4.20M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  4.20M|              num_components, parallelogram_pred_vals.get())) {
   92|  16.4M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 15.1M, False: 1.38M]
  ------------------
   93|  15.1M|          pred_vals[c] =
   94|  15.1M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  15.1M|        }
   96|  1.38M|        ++num_parallelograms;
   97|  1.38M|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  4.20M|      corner_id = table->SwingRight(corner_id);
  101|  4.20M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 696k, False: 3.50M]
  ------------------
  102|   696k|        corner_id = kInvalidCornerIndex;
  103|   696k|      }
  104|  4.20M|    }
  105|       |
  106|   709k|    const int dst_offset = p * num_components;
  107|   709k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 1.89k, False: 707k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  1.89k|      const int src_offset = (p - 1) * num_components;
  111|  1.89k|      this->transform().ComputeOriginalValue(
  112|  1.89k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   707k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  8.41M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 7.70M, False: 707k]
  ------------------
  116|  7.70M|        pred_vals[c] /= num_parallelograms;
  117|  7.70M|      }
  118|   707k|      this->transform().ComputeOriginalValue(
  119|   707k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   707k|    }
  121|   709k|  }
  122|    428|  return true;
  123|    428|}

_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|    714|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|    714|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|    690|                          const PointIndex * /* entry_to_point_id_map */) {
   61|    690|  this->transform().Init(num_components);
   62|       |
   63|    690|  const CornerTable *const table = this->mesh_data().corner_table();
   64|    690|  const std::vector<int32_t> *const vertex_to_data_map =
   65|    690|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|    690|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|    690|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    690|  const int corner_map_size =
   74|    690|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|  1.71M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (75:19): [True: 1.70M, False: 690]
  ------------------
   76|  1.70M|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   77|  1.70M|    const int dst_offset = p * num_components;
   78|  1.70M|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (78:9): [True: 1.50M, False: 199k]
  ------------------
   79|  1.70M|                                        *vertex_to_data_map, out_data,
   80|  1.70M|                                        num_components, pred_vals.get())) {
   81|       |      // Parallelogram could not be computed, Possible because some of the
   82|       |      // vertices are not valid (not encoded yet).
   83|       |      // We use the last encoded point as a reference (delta coding).
   84|  1.50M|      const int src_offset = (p - 1) * num_components;
   85|  1.50M|      this->transform().ComputeOriginalValue(
   86|  1.50M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   87|  1.50M|    } else {
   88|       |      // Apply the parallelogram prediction.
   89|   199k|      this->transform().ComputeOriginalValue(
   90|   199k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   91|   199k|    }
   92|  1.70M|  }
   93|    690|  return true;
   94|    690|}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|    487|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|    487|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|    451|                          const PointIndex * /* entry_to_point_id_map */) {
   61|    451|  this->transform().Init(num_components);
   62|       |
   63|    451|  const CornerTable *const table = this->mesh_data().corner_table();
   64|    451|  const std::vector<int32_t> *const vertex_to_data_map =
   65|    451|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|    451|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|    451|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    451|  const int corner_map_size =
   74|    451|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|   152k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (75:19): [True: 152k, False: 451]
  ------------------
   76|   152k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   77|   152k|    const int dst_offset = p * num_components;
   78|   152k|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (78:9): [True: 1.87k, False: 150k]
  ------------------
   79|   152k|                                        *vertex_to_data_map, out_data,
   80|   152k|                                        num_components, pred_vals.get())) {
   81|       |      // Parallelogram could not be computed, Possible because some of the
   82|       |      // vertices are not valid (not encoded yet).
   83|       |      // We use the last encoded point as a reference (delta coding).
   84|  1.87k|      const int src_offset = (p - 1) * num_components;
   85|  1.87k|      this->transform().ComputeOriginalValue(
   86|  1.87k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   87|   150k|    } else {
   88|       |      // Apply the parallelogram prediction.
   89|   150k|      this->transform().ComputeOriginalValue(
   90|   150k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   91|   150k|    }
   92|   152k|  }
   93|    451|  return true;
   94|    451|}

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  2.67M|    int num_components, DataTypeT *out_prediction) {
   49|  2.67M|  const CornerIndex oci = table->Opposite(ci);
   50|  2.67M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 2.13M, False: 538k]
  ------------------
   51|  2.13M|    return false;
   52|  2.13M|  }
   53|   538k|  int vert_opp, vert_next, vert_prev;
   54|   538k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|   538k|                                        &vert_opp, &vert_next, &vert_prev);
   56|   538k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 364k, False: 174k]
  |  Branch (56:35): [True: 320k, False: 44.1k]
  ------------------
   57|   320k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 315k, False: 5.58k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   315k|    const int v_opp_off = vert_opp * num_components;
   60|   315k|    const int v_next_off = vert_next * num_components;
   61|   315k|    const int v_prev_off = vert_prev * num_components;
   62|  14.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 13.9M, False: 315k]
  ------------------
   63|  13.9M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  13.9M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  13.9M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  13.9M|      const int64_t result =
   67|  13.9M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  13.9M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  13.9M|    }
   71|   315k|    return true;
   72|   315k|  }
   73|   223k|  return false;  // Not all data is available for prediction
   74|   538k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|   538k|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|   538k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|   538k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|   538k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|   538k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.13M|    int num_components, DataTypeT *out_prediction) {
   49|  5.13M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.13M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 43.5k, False: 5.09M]
  ------------------
   51|  43.5k|    return false;
   52|  43.5k|  }
   53|  5.09M|  int vert_opp, vert_next, vert_prev;
   54|  5.09M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  5.09M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  5.09M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 2.58M, False: 2.50M]
  |  Branch (56:35): [True: 1.98M, False: 606k]
  ------------------
   57|  1.98M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 1.76M, False: 221k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  1.76M|    const int v_opp_off = vert_opp * num_components;
   60|  1.76M|    const int v_next_off = vert_next * num_components;
   61|  1.76M|    const int v_prev_off = vert_prev * num_components;
   62|  40.8M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 39.0M, False: 1.76M]
  ------------------
   63|  39.0M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  39.0M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  39.0M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  39.0M|      const int64_t result =
   67|  39.0M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  39.0M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  39.0M|    }
   71|  1.76M|    return true;
   72|  1.76M|  }
   73|  3.32M|  return false;  // Not all data is available for prediction
   74|  5.09M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  5.09M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  5.09M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  5.09M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  5.09M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  5.09M|}

_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    197|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    197|            attribute, transform, mesh_data),
   46|    197|        pos_attribute_(nullptr),
   47|    197|        entry_to_point_id_map_(nullptr),
   48|    197|        num_components_(0),
   49|    197|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   71|    393|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   73|    197|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    197|    DRACO_DCHECK_EQ(i, 0);
   75|    197|    (void)i;
   76|    197|    return GeometryAttribute::POSITION;
   77|    197|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    197|  bool SetParentAttribute(const PointAttribute *att) override {
   80|    197|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 197]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    197|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 197]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    197|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 1, False: 196]
  ------------------
   87|      1|      return false;  // Currently works only for 3 component positions.
   88|      1|    }
   89|    196|    pos_attribute_ = att;
   90|    196|    return true;
   91|    197|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  153|    190|    DecodePredictionData(DecoderBuffer *buffer) {
  154|       |  // Decode the delta coded orientations.
  155|    190|  uint32_t num_orientations = 0;
  156|    190|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    190|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (156:7): [True: 54, False: 136]
  ------------------
  157|     54|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (157:9): [True: 1, False: 53]
  ------------------
  158|      1|      return false;
  159|      1|    }
  160|    136|  } else {
  161|    136|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (161:9): [True: 0, False: 136]
  ------------------
  162|      0|      return false;
  163|      0|    }
  164|    136|  }
  165|    189|  if (num_orientations == 0) {
  ------------------
  |  Branch (165:7): [True: 2, False: 187]
  ------------------
  166|      2|    return false;
  167|      2|  }
  168|    187|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (168:7): [True: 10, False: 177]
  ------------------
  169|       |    // We can't have more orientations than the maximum number of decoded
  170|       |    // values.
  171|     10|    return false;
  172|     10|  }
  173|    177|  orientations_.resize(num_orientations);
  174|    177|  bool last_orientation = true;
  175|    177|  RAnsBitDecoder decoder;
  176|    177|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (176:7): [True: 6, False: 171]
  ------------------
  177|      6|    return false;
  178|      6|  }
  179|   419k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (179:24): [True: 419k, False: 171]
  ------------------
  180|   419k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (180:9): [True: 159k, False: 259k]
  ------------------
  181|   159k|      last_orientation = !last_orientation;
  182|   159k|    }
  183|   419k|    orientations_[i] = last_orientation;
  184|   419k|  }
  185|    171|  decoder.EndDecoding();
  186|    171|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  187|    171|                                     MeshDataT>::DecodePredictionData(buffer);
  188|    177|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    131|                          const PointIndex *entry_to_point_id_map) {
  126|    131|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 3, False: 128]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      3|    return false;
  129|      3|  }
  130|    128|  num_components_ = num_components;
  131|    128|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    128|  predicted_value_ =
  133|    128|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    128|  this->transform().Init(num_components);
  135|       |
  136|    128|  const int corner_map_size =
  137|    128|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|   481k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (138:19): [True: 481k, False: 104]
  ------------------
  139|   481k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  140|   481k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (140:9): [True: 24, False: 481k]
  ------------------
  141|     24|      return false;
  142|     24|    }
  143|       |
  144|   481k|    const int dst_offset = p * num_components;
  145|   481k|    this->transform().ComputeOriginalValue(
  146|   481k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  147|   481k|  }
  148|    104|  return true;
  149|    128|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  193|   481k|                          int data_id) {
  194|       |  // Compute the predicted UV coordinate from the positions on all corners
  195|       |  // of the processed triangle. For the best prediction, the UV coordinates
  196|       |  // on the next/previous corners need to be already encoded/decoded.
  197|   481k|  const CornerIndex next_corner_id =
  198|   481k|      this->mesh_data().corner_table()->Next(corner_id);
  199|   481k|  const CornerIndex prev_corner_id =
  200|   481k|      this->mesh_data().corner_table()->Previous(corner_id);
  201|       |  // Get the encoded data ids from the next and previous corners.
  202|       |  // The data id is the encoding order of the UV coordinates.
  203|   481k|  int next_data_id, prev_data_id;
  204|       |
  205|   481k|  int next_vert_id, prev_vert_id;
  206|   481k|  next_vert_id =
  207|   481k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  208|   481k|  prev_vert_id =
  209|   481k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  210|       |
  211|   481k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  212|   481k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  213|       |
  214|   481k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (214:7): [True: 353k, False: 127k]
  |  Branch (214:33): [True: 226k, False: 127k]
  ------------------
  215|       |    // Both other corners have available UV coordinates for prediction.
  216|   226k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  217|   226k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  218|   226k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (218:9): [True: 224k, False: 2.11k]
  ------------------
  219|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  220|       |      // Technically floats > INT_MAX are undefined, but compilers will
  221|       |      // convert those values to INT_MIN. We are being explicit here for asan.
  222|   448k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (222:24): [True: 448k, False: 224k]
  ------------------
  223|   448k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (223:13): [True: 0, False: 448k]
  |  Branch (223:36): [True: 49.3k, False: 398k]
  ------------------
  224|   398k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (224:13): [True: 0, False: 398k]
  ------------------
  225|  49.3k|          predicted_value_[i] = INT_MIN;
  226|   398k|        } else {
  227|   398k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  228|   398k|        }
  229|   448k|      }
  230|   224k|      return true;
  231|   224k|    }
  232|       |
  233|       |    // Get positions at all corners.
  234|  2.11k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  235|  2.11k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  236|  2.11k|    const Vector3f prev_pos = GetPositionForEntryId(prev_data_id);
  237|       |    // Use the positions of the above triangle to predict the texture coordinate
  238|       |    // on the tip corner C.
  239|       |    // Convert the triangle into a new coordinate system defined by orthogonal
  240|       |    // bases vectors S, T, where S is vector prev_pos - next_pos and T is an
  241|       |    // perpendicular vector to S in the same plane as vector the
  242|       |    // tip_pos - next_pos.
  243|       |    // The transformed triangle in the new coordinate system is then going to
  244|       |    // be represented as:
  245|       |    //
  246|       |    //        1 ^
  247|       |    //          |
  248|       |    //          |
  249|       |    //          |   C
  250|       |    //          |  /  \
  251|       |    //          | /      \
  252|       |    //          |/          \
  253|       |    //          N--------------P
  254|       |    //          0              1
  255|       |    //
  256|       |    // Where next_pos point (N) is at position (0, 0), prev_pos point (P) is
  257|       |    // at (1, 0). Our goal is to compute the position of the tip_pos point (C)
  258|       |    // in this new coordinate space (s, t).
  259|       |    //
  260|  2.11k|    const Vector3f pn = prev_pos - next_pos;
  261|  2.11k|    const Vector3f cn = tip_pos - next_pos;
  262|  2.11k|    const float pn_norm2_squared = pn.SquaredNorm();
  263|       |    // Coordinate s of the tip corner C is simply the dot product of the
  264|       |    // normalized vectors |pn| and |cn| (normalized by the length of |pn|).
  265|       |    // Since both of these vectors are normalized, we don't need to perform the
  266|       |    // normalization explicitly and instead we can just use the squared norm
  267|       |    // of |pn| as a denominator of the resulting dot product of non normalized
  268|       |    // vectors.
  269|  2.11k|    float s, t;
  270|       |    // |pn_norm2_squared| can be exactly 0 when the next_pos and prev_pos are
  271|       |    // the same positions (e.g. because they were quantized to the same
  272|       |    // location).
  273|  2.11k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  4.23k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (273:9): [True: 0, False: 2.11k]
  |  Branch (273:53): [True: 283, False: 1.83k]
  ------------------
  274|    283|      s = pn.Dot(cn) / pn_norm2_squared;
  275|       |      // To get the coordinate t, we can use formula:
  276|       |      //      t = |C-N - (P-N) * s| / |P-N|
  277|       |      // Do not use std::sqrt to avoid changes in the bitstream.
  278|    283|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  279|  1.83k|    } else {
  280|  1.83k|      s = 0;
  281|  1.83k|      t = 0;
  282|  1.83k|    }
  283|       |
  284|       |    // Now we need to transform the point (s, t) to the texture coordinate space
  285|       |    // UV. We know the UV coordinates on points N and P (N_UV and P_UV). Lets
  286|       |    // denote P_UV - N_UV = PN_UV. PN_UV is then 2 dimensional vector that can
  287|       |    // be used to define transformation from the normalized coordinate system
  288|       |    // to the texture coordinate system using a 3x3 affine matrix M:
  289|       |    //
  290|       |    //  M = | PN_UV[0]  -PN_UV[1]  N_UV[0] |
  291|       |    //      | PN_UV[1]   PN_UV[0]  N_UV[1] |
  292|       |    //      | 0          0         1       |
  293|       |    //
  294|       |    // The predicted point C_UV in the texture space is then equal to
  295|       |    // C_UV = M * (s, t, 1). Because the triangle in UV space may be flipped
  296|       |    // around the PN_UV axis, we also need to consider point C_UV' = M * (s, -t)
  297|       |    // as the prediction.
  298|  2.11k|    const Vector2f pn_uv = p_uv - n_uv;
  299|  2.11k|    const float pnus = pn_uv[0] * s + n_uv[0];
  300|  2.11k|    const float pnut = pn_uv[0] * t;
  301|  2.11k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  302|  2.11k|    const float pnvt = pn_uv[1] * t;
  303|  2.11k|    Vector2f predicted_uv;
  304|  2.11k|    if (orientations_.empty()) {
  ------------------
  |  Branch (304:9): [True: 24, False: 2.09k]
  ------------------
  305|     24|      return false;
  306|     24|    }
  307|       |
  308|       |    // When decoding the data, we already know which orientation to use.
  309|  2.09k|    const bool orientation = orientations_.back();
  310|  2.09k|    orientations_.pop_back();
  311|  2.09k|    if (orientation) {
  ------------------
  |  Branch (311:9): [True: 1.33k, False: 762]
  ------------------
  312|  1.33k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  313|  1.33k|    } else {
  314|    762|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  315|    762|    }
  316|  2.09k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (316:9): [True: 2.09k, Folded]
  ------------------
  317|       |      // Round the predicted value for integer types.
  318|       |      // Technically floats > INT_MAX are undefined, but compilers will
  319|       |      // convert those values to INT_MIN. We are being explicit here for asan.
  320|  2.09k|      const double u = floor(predicted_uv[0] + 0.5);
  321|  2.09k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (321:11): [True: 0, False: 2.09k]
  |  Branch (321:28): [True: 53, False: 2.04k]
  |  Branch (321:43): [True: 43, False: 1.99k]
  ------------------
  322|     96|        predicted_value_[0] = INT_MIN;
  323|  1.99k|      } else {
  324|  1.99k|        predicted_value_[0] = static_cast<int>(u);
  325|  1.99k|      }
  326|  2.09k|      const double v = floor(predicted_uv[1] + 0.5);
  327|  2.09k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (327:11): [True: 0, False: 2.09k]
  |  Branch (327:28): [True: 43, False: 2.05k]
  |  Branch (327:43): [True: 50, False: 2.00k]
  ------------------
  328|     93|        predicted_value_[1] = INT_MIN;
  329|  2.00k|      } else {
  330|  2.00k|        predicted_value_[1] = static_cast<int>(v);
  331|  2.00k|      }
  332|  2.09k|    } else {
  333|      0|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  334|      0|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  335|      0|    }
  336|       |
  337|  2.09k|    return true;
  338|  2.11k|  }
  339|       |  // Else we don't have available textures on both corners. For such case we
  340|       |  // can't use positions for predicting the uv value and we resort to delta
  341|       |  // coding.
  342|   255k|  int data_offset = 0;
  343|   255k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (343:7): [True: 127k, False: 127k]
  ------------------
  344|       |    // Use the value on the previous corner as the prediction.
  345|   127k|    data_offset = prev_data_id * num_components_;
  346|   127k|  }
  347|   255k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (347:7): [True: 3, False: 255k]
  ------------------
  348|       |    // Use the value on the next corner as the prediction.
  349|      3|    data_offset = next_data_id * num_components_;
  350|   255k|  } else {
  351|       |    // None of the other corners have a valid value. Use the last encoded value
  352|       |    // as the prediction if possible.
  353|   255k|    if (data_id > 0) {
  ------------------
  |  Branch (353:9): [True: 255k, False: 128]
  ------------------
  354|   255k|      data_offset = (data_id - 1) * num_components_;
  355|   255k|    } else {
  356|       |      // We are encoding the first value. Predict 0.
  357|    384|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (357:23): [True: 256, False: 128]
  ------------------
  358|    256|        predicted_value_[i] = 0;
  359|    256|      }
  360|    128|      return true;
  361|    128|    }
  362|   255k|  }
  363|   765k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (363:19): [True: 510k, False: 255k]
  ------------------
  364|   510k|    predicted_value_[i] = data[data_offset + i];
  365|   510k|  }
  366|   255k|  return true;
  367|   255k|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   452k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT *data) const {
  103|   452k|    const int data_offset = entry_id * num_components_;
  104|   452k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   452k|                    static_cast<float>(data[data_offset + 1]));
  106|   452k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   94|  6.35k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  6.35k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  6.35k|    Vector3f pos;
   97|  6.35k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  6.35k|                                 &pos[0]);
   99|  6.35k|    return pos;
  100|  6.35k|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    159|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    159|            attribute, transform, mesh_data),
   46|    159|        pos_attribute_(nullptr),
   47|    159|        entry_to_point_id_map_(nullptr),
   48|    159|        num_components_(0),
   49|    159|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   71|    317|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   73|    159|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    159|    DRACO_DCHECK_EQ(i, 0);
   75|    159|    (void)i;
   76|    159|    return GeometryAttribute::POSITION;
   77|    159|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    159|  bool SetParentAttribute(const PointAttribute *att) override {
   80|    159|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 159]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    159|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 159]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    159|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 1, False: 158]
  ------------------
   87|      1|      return false;  // Currently works only for 3 component positions.
   88|      1|    }
   89|    158|    pos_attribute_ = att;
   90|    158|    return true;
   91|    159|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  153|    147|    DecodePredictionData(DecoderBuffer *buffer) {
  154|       |  // Decode the delta coded orientations.
  155|    147|  uint32_t num_orientations = 0;
  156|    147|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    147|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (156:7): [True: 9, False: 138]
  ------------------
  157|      9|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (157:9): [True: 1, False: 8]
  ------------------
  158|      1|      return false;
  159|      1|    }
  160|    138|  } else {
  161|    138|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (161:9): [True: 0, False: 138]
  ------------------
  162|      0|      return false;
  163|      0|    }
  164|    138|  }
  165|    146|  if (num_orientations == 0) {
  ------------------
  |  Branch (165:7): [True: 1, False: 145]
  ------------------
  166|      1|    return false;
  167|      1|  }
  168|    145|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (168:7): [True: 7, False: 138]
  ------------------
  169|       |    // We can't have more orientations than the maximum number of decoded
  170|       |    // values.
  171|      7|    return false;
  172|      7|  }
  173|    138|  orientations_.resize(num_orientations);
  174|    138|  bool last_orientation = true;
  175|    138|  RAnsBitDecoder decoder;
  176|    138|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (176:7): [True: 4, False: 134]
  ------------------
  177|      4|    return false;
  178|      4|  }
  179|   404k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (179:24): [True: 404k, False: 134]
  ------------------
  180|   404k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (180:9): [True: 173k, False: 231k]
  ------------------
  181|   173k|      last_orientation = !last_orientation;
  182|   173k|    }
  183|   404k|    orientations_[i] = last_orientation;
  184|   404k|  }
  185|    134|  decoder.EndDecoding();
  186|    134|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  187|    134|                                     MeshDataT>::DecodePredictionData(buffer);
  188|    138|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    125|                          const PointIndex *entry_to_point_id_map) {
  126|    125|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 2, False: 123]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      2|    return false;
  129|      2|  }
  130|    123|  num_components_ = num_components;
  131|    123|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    123|  predicted_value_ =
  133|    123|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    123|  this->transform().Init(num_components);
  135|       |
  136|    123|  const int corner_map_size =
  137|    123|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|   209k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (138:19): [True: 209k, False: 106]
  ------------------
  139|   209k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  140|   209k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (140:9): [True: 17, False: 209k]
  ------------------
  141|     17|      return false;
  142|     17|    }
  143|       |
  144|   209k|    const int dst_offset = p * num_components;
  145|   209k|    this->transform().ComputeOriginalValue(
  146|   209k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  147|   209k|  }
  148|    106|  return true;
  149|    123|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  193|   209k|                          int data_id) {
  194|       |  // Compute the predicted UV coordinate from the positions on all corners
  195|       |  // of the processed triangle. For the best prediction, the UV coordinates
  196|       |  // on the next/previous corners need to be already encoded/decoded.
  197|   209k|  const CornerIndex next_corner_id =
  198|   209k|      this->mesh_data().corner_table()->Next(corner_id);
  199|   209k|  const CornerIndex prev_corner_id =
  200|   209k|      this->mesh_data().corner_table()->Previous(corner_id);
  201|       |  // Get the encoded data ids from the next and previous corners.
  202|       |  // The data id is the encoding order of the UV coordinates.
  203|   209k|  int next_data_id, prev_data_id;
  204|       |
  205|   209k|  int next_vert_id, prev_vert_id;
  206|   209k|  next_vert_id =
  207|   209k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  208|   209k|  prev_vert_id =
  209|   209k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  210|       |
  211|   209k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  212|   209k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  213|       |
  214|   209k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (214:7): [True: 209k, False: 339]
  |  Branch (214:33): [True: 209k, False: 274]
  ------------------
  215|       |    // Both other corners have available UV coordinates for prediction.
  216|   209k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  217|   209k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  218|   209k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (218:9): [True: 193k, False: 15.9k]
  ------------------
  219|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  220|       |      // Technically floats > INT_MAX are undefined, but compilers will
  221|       |      // convert those values to INT_MIN. We are being explicit here for asan.
  222|   386k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (222:24): [True: 386k, False: 193k]
  ------------------
  223|   386k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (223:13): [True: 0, False: 386k]
  |  Branch (223:36): [True: 6.22k, False: 380k]
  ------------------
  224|   380k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (224:13): [True: 0, False: 380k]
  ------------------
  225|  6.22k|          predicted_value_[i] = INT_MIN;
  226|   380k|        } else {
  227|   380k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  228|   380k|        }
  229|   386k|      }
  230|   193k|      return true;
  231|   193k|    }
  232|       |
  233|       |    // Get positions at all corners.
  234|  15.9k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  235|  15.9k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  236|  15.9k|    const Vector3f prev_pos = GetPositionForEntryId(prev_data_id);
  237|       |    // Use the positions of the above triangle to predict the texture coordinate
  238|       |    // on the tip corner C.
  239|       |    // Convert the triangle into a new coordinate system defined by orthogonal
  240|       |    // bases vectors S, T, where S is vector prev_pos - next_pos and T is an
  241|       |    // perpendicular vector to S in the same plane as vector the
  242|       |    // tip_pos - next_pos.
  243|       |    // The transformed triangle in the new coordinate system is then going to
  244|       |    // be represented as:
  245|       |    //
  246|       |    //        1 ^
  247|       |    //          |
  248|       |    //          |
  249|       |    //          |   C
  250|       |    //          |  /  \
  251|       |    //          | /      \
  252|       |    //          |/          \
  253|       |    //          N--------------P
  254|       |    //          0              1
  255|       |    //
  256|       |    // Where next_pos point (N) is at position (0, 0), prev_pos point (P) is
  257|       |    // at (1, 0). Our goal is to compute the position of the tip_pos point (C)
  258|       |    // in this new coordinate space (s, t).
  259|       |    //
  260|  15.9k|    const Vector3f pn = prev_pos - next_pos;
  261|  15.9k|    const Vector3f cn = tip_pos - next_pos;
  262|  15.9k|    const float pn_norm2_squared = pn.SquaredNorm();
  263|       |    // Coordinate s of the tip corner C is simply the dot product of the
  264|       |    // normalized vectors |pn| and |cn| (normalized by the length of |pn|).
  265|       |    // Since both of these vectors are normalized, we don't need to perform the
  266|       |    // normalization explicitly and instead we can just use the squared norm
  267|       |    // of |pn| as a denominator of the resulting dot product of non normalized
  268|       |    // vectors.
  269|  15.9k|    float s, t;
  270|       |    // |pn_norm2_squared| can be exactly 0 when the next_pos and prev_pos are
  271|       |    // the same positions (e.g. because they were quantized to the same
  272|       |    // location).
  273|  15.9k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  31.8k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (273:9): [True: 0, False: 15.9k]
  |  Branch (273:53): [True: 168, False: 15.7k]
  ------------------
  274|    168|      s = pn.Dot(cn) / pn_norm2_squared;
  275|       |      // To get the coordinate t, we can use formula:
  276|       |      //      t = |C-N - (P-N) * s| / |P-N|
  277|       |      // Do not use std::sqrt to avoid changes in the bitstream.
  278|    168|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  279|  15.7k|    } else {
  280|  15.7k|      s = 0;
  281|  15.7k|      t = 0;
  282|  15.7k|    }
  283|       |
  284|       |    // Now we need to transform the point (s, t) to the texture coordinate space
  285|       |    // UV. We know the UV coordinates on points N and P (N_UV and P_UV). Lets
  286|       |    // denote P_UV - N_UV = PN_UV. PN_UV is then 2 dimensional vector that can
  287|       |    // be used to define transformation from the normalized coordinate system
  288|       |    // to the texture coordinate system using a 3x3 affine matrix M:
  289|       |    //
  290|       |    //  M = | PN_UV[0]  -PN_UV[1]  N_UV[0] |
  291|       |    //      | PN_UV[1]   PN_UV[0]  N_UV[1] |
  292|       |    //      | 0          0         1       |
  293|       |    //
  294|       |    // The predicted point C_UV in the texture space is then equal to
  295|       |    // C_UV = M * (s, t, 1). Because the triangle in UV space may be flipped
  296|       |    // around the PN_UV axis, we also need to consider point C_UV' = M * (s, -t)
  297|       |    // as the prediction.
  298|  15.9k|    const Vector2f pn_uv = p_uv - n_uv;
  299|  15.9k|    const float pnus = pn_uv[0] * s + n_uv[0];
  300|  15.9k|    const float pnut = pn_uv[0] * t;
  301|  15.9k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  302|  15.9k|    const float pnvt = pn_uv[1] * t;
  303|  15.9k|    Vector2f predicted_uv;
  304|  15.9k|    if (orientations_.empty()) {
  ------------------
  |  Branch (304:9): [True: 17, False: 15.8k]
  ------------------
  305|     17|      return false;
  306|     17|    }
  307|       |
  308|       |    // When decoding the data, we already know which orientation to use.
  309|  15.8k|    const bool orientation = orientations_.back();
  310|  15.8k|    orientations_.pop_back();
  311|  15.8k|    if (orientation) {
  ------------------
  |  Branch (311:9): [True: 10.9k, False: 4.94k]
  ------------------
  312|  10.9k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  313|  10.9k|    } else {
  314|  4.94k|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  315|  4.94k|    }
  316|  15.8k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (316:9): [True: 15.8k, Folded]
  ------------------
  317|       |      // Round the predicted value for integer types.
  318|       |      // Technically floats > INT_MAX are undefined, but compilers will
  319|       |      // convert those values to INT_MIN. We are being explicit here for asan.
  320|  15.8k|      const double u = floor(predicted_uv[0] + 0.5);
  321|  15.8k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (321:11): [True: 0, False: 15.8k]
  |  Branch (321:28): [True: 86, False: 15.8k]
  |  Branch (321:43): [True: 20, False: 15.7k]
  ------------------
  322|    106|        predicted_value_[0] = INT_MIN;
  323|  15.7k|      } else {
  324|  15.7k|        predicted_value_[0] = static_cast<int>(u);
  325|  15.7k|      }
  326|  15.8k|      const double v = floor(predicted_uv[1] + 0.5);
  327|  15.8k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (327:11): [True: 0, False: 15.8k]
  |  Branch (327:28): [True: 71, False: 15.8k]
  |  Branch (327:43): [True: 27, False: 15.7k]
  ------------------
  328|     98|        predicted_value_[1] = INT_MIN;
  329|  15.7k|      } else {
  330|  15.7k|        predicted_value_[1] = static_cast<int>(v);
  331|  15.7k|      }
  332|  15.8k|    } else {
  333|      0|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  334|      0|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  335|      0|    }
  336|       |
  337|  15.8k|    return true;
  338|  15.9k|  }
  339|       |  // Else we don't have available textures on both corners. For such case we
  340|       |  // can't use positions for predicting the uv value and we resort to delta
  341|       |  // coding.
  342|    613|  int data_offset = 0;
  343|    613|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (343:7): [True: 274, False: 339]
  ------------------
  344|       |    // Use the value on the previous corner as the prediction.
  345|    274|    data_offset = prev_data_id * num_components_;
  346|    274|  }
  347|    613|  if (next_data_id < data_id) {
  ------------------
  |  Branch (347:7): [True: 96, False: 517]
  ------------------
  348|       |    // Use the value on the next corner as the prediction.
  349|     96|    data_offset = next_data_id * num_components_;
  350|    517|  } else {
  351|       |    // None of the other corners have a valid value. Use the last encoded value
  352|       |    // as the prediction if possible.
  353|    517|    if (data_id > 0) {
  ------------------
  |  Branch (353:9): [True: 394, False: 123]
  ------------------
  354|    394|      data_offset = (data_id - 1) * num_components_;
  355|    394|    } else {
  356|       |      // We are encoding the first value. Predict 0.
  357|    369|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (357:23): [True: 246, False: 123]
  ------------------
  358|    246|        predicted_value_[i] = 0;
  359|    246|      }
  360|    123|      return true;
  361|    123|    }
  362|    517|  }
  363|  1.47k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (363:19): [True: 980, False: 490]
  ------------------
  364|    980|    predicted_value_[i] = data[data_offset + i];
  365|    980|  }
  366|    490|  return true;
  367|    613|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   418k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT *data) const {
  103|   418k|    const int data_offset = entry_id * num_components_;
  104|   418k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   418k|                    static_cast<float>(data[data_offset + 1]));
  106|   418k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   94|  47.7k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  47.7k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  47.7k|    Vector3f pos;
   97|  47.7k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  47.7k|                                 &pos[0]);
   99|  47.7k|    return pos;
  100|  47.7k|  }

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    229|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    229|            attribute, transform, mesh_data),
   38|    229|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   60|    458|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   62|    229|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    229|    DRACO_DCHECK_EQ(i, 0);
   64|    229|    (void)i;
   65|    229|    return GeometryAttribute::POSITION;
   66|    229|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    229|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    229|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 229]
  |  Branch (69:17): [True: 0, False: 229]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    229|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 0, False: 229]
  ------------------
   73|      0|      return false;  // Currently works only for 3 component positions.
   74|      0|    }
   75|    229|    predictor_.SetPositionAttribute(*att);
   76|    229|    return true;
   77|    229|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    228|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    228|  int32_t num_orientations = 0;
  121|    228|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 0, False: 228]
  |  Branch (121:45): [True: 6, False: 222]
  ------------------
  122|      6|    return false;
  123|      6|  }
  124|    222|  predictor_.ResizeOrientations(num_orientations);
  125|    222|  bool last_orientation = true;
  126|    222|  RAnsBitDecoder decoder;
  127|    222|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 8, False: 214]
  ------------------
  128|      8|    return false;
  129|      8|  }
  130|  2.09G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 2.09G, False: 214]
  ------------------
  131|  2.09G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 233M, False: 1.85G]
  ------------------
  132|   233M|      last_orientation = !last_orientation;
  133|   233M|    }
  134|  2.09G|    predictor_.set_orientation(i, last_orientation);
  135|  2.09G|  }
  136|    214|  decoder.EndDecoding();
  137|    214|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    214|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    222|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    207|                                      const PointIndex *entry_to_point_id_map) {
   91|    207|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 1, False: 206]
  ------------------
   92|    207|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|      1|    return false;
   94|      1|  }
   95|    206|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    206|  this->transform().Init(num_components);
   97|       |
   98|    206|  const int corner_map_size =
   99|    206|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   551k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 551k, False: 105]
  ------------------
  101|   551k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   551k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 101, False: 551k]
  ------------------
  103|   551k|                                                          p)) {
  104|    101|      return false;
  105|    101|    }
  106|       |
  107|   551k|    const int dst_offset = p * num_components;
  108|   551k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   551k|                                           in_corr + dst_offset,
  110|   551k|                                           out_data + dst_offset);
  111|   551k|  }
  112|    105|  return true;
  113|    206|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    252|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    252|            attribute, transform, mesh_data),
   38|    252|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   60|    504|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   62|    252|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    252|    DRACO_DCHECK_EQ(i, 0);
   64|    252|    (void)i;
   65|    252|    return GeometryAttribute::POSITION;
   66|    252|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    252|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    252|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 252]
  |  Branch (69:17): [True: 0, False: 252]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    252|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 0, False: 252]
  ------------------
   73|      0|      return false;  // Currently works only for 3 component positions.
   74|      0|    }
   75|    252|    predictor_.SetPositionAttribute(*att);
   76|    252|    return true;
   77|    252|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    250|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    250|  int32_t num_orientations = 0;
  121|    250|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 0, False: 250]
  |  Branch (121:45): [True: 0, False: 250]
  ------------------
  122|      0|    return false;
  123|      0|  }
  124|    250|  predictor_.ResizeOrientations(num_orientations);
  125|    250|  bool last_orientation = true;
  126|    250|  RAnsBitDecoder decoder;
  127|    250|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 2, False: 248]
  ------------------
  128|      2|    return false;
  129|      2|  }
  130|  8.29G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 8.29G, False: 248]
  ------------------
  131|  8.29G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 1.44G, False: 6.85G]
  ------------------
  132|  1.44G|      last_orientation = !last_orientation;
  133|  1.44G|    }
  134|  8.29G|    predictor_.set_orientation(i, last_orientation);
  135|  8.29G|  }
  136|    248|  decoder.EndDecoding();
  137|    248|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    248|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    250|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    217|                                      const PointIndex *entry_to_point_id_map) {
   91|    217|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 1, False: 216]
  ------------------
   92|    217|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|      1|    return false;
   94|      1|  }
   95|    216|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    216|  this->transform().Init(num_components);
   97|       |
   98|    216|  const int corner_map_size =
   99|    216|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   221k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 221k, False: 125]
  ------------------
  101|   221k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   221k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 91, False: 220k]
  ------------------
  103|   221k|                                                          p)) {
  104|     91|      return false;
  105|     91|    }
  106|       |
  107|   220k|    const int dst_offset = p * num_components;
  108|   220k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   220k|                                           in_corr + dst_offset,
  110|   220k|                                           out_data + dst_offset);
  111|   220k|  }
  112|    125|  return true;
  113|    216|}

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|    229|      : pos_attribute_(nullptr),
   39|    229|        entry_to_point_id_map_(nullptr),
   40|    229|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    229|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    229|    pos_attribute_ = &position_attribute;
   43|    229|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|    222|  void ResizeOrientations(int num_orientations) {
   74|    222|    orientations_.resize(num_orientations);
   75|    222|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|  2.09G|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    206|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    206|    entry_to_point_id_map_ = map;
   46|    206|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   551k|                                                 int data_id) {
   94|       |  // Compute the predicted UV coordinate from the positions on all corners
   95|       |  // of the processed triangle. For the best prediction, the UV coordinates
   96|       |  // on the next/previous corners need to be already encoded/decoded.
   97|   551k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   551k|  const CornerIndex prev_corner_id =
   99|   551k|      mesh_data_.corner_table()->Previous(corner_id);
  100|       |  // Get the encoded data ids from the next and previous corners.
  101|       |  // The data id is the encoding order of the UV coordinates.
  102|   551k|  int next_data_id, prev_data_id;
  103|       |
  104|   551k|  int next_vert_id, prev_vert_id;
  105|   551k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   551k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   551k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   551k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   551k|  typedef VectorD<int64_t, 2> Vec2;
  112|   551k|  typedef VectorD<int64_t, 3> Vec3;
  113|   551k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   551k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 380k, False: 170k]
  |  Branch (115:33): [True: 209k, False: 170k]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   209k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   209k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   209k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 192k, False: 17.4k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   192k|      predicted_value_[0] = p_uv[0];
  122|   192k|      predicted_value_[1] = p_uv[1];
  123|   192k|      return true;
  124|   192k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  17.4k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  17.4k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  17.4k|    const Vec3 prev_pos = GetPositionForEntryId(prev_data_id);
  130|       |    // We use the positions of the above triangle to predict the texture
  131|       |    // coordinate on the tip corner C.
  132|       |    // To convert the triangle into the UV coordinate system we first compute
  133|       |    // position X on the vector |prev_pos - next_pos| that is the projection of
  134|       |    // point C onto vector |prev_pos - next_pos|:
  135|       |    //
  136|       |    //              C
  137|       |    //             /.  \
  138|       |    //            / .     \
  139|       |    //           /  .        \
  140|       |    //          N---X----------P
  141|       |    //
  142|       |    // Where next_pos is point (N), prev_pos is point (P) and tip_pos is the
  143|       |    // position of predicted coordinate (C).
  144|       |    //
  145|  17.4k|    const Vec3 pn = prev_pos - next_pos;
  146|  17.4k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  17.4k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 992, False: 16.4k]
  ------------------
  148|       |      // Compute the projection of C onto PN by computing dot product of CN with
  149|       |      // PN and normalizing it by length of PN. This gives us a factor |s| where
  150|       |      // |s = PN.Dot(CN) / PN.SquaredNorm2()|. This factor can be used to
  151|       |      // compute X in UV space |X_UV| as |X_UV = N_UV + s * PN_UV|.
  152|    992|      const Vec3 cn = tip_pos - next_pos;
  153|    992|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    992|      const Vec2 pn_uv = p_uv - n_uv;
  156|       |      // Because we perform all computations with integers, we don't explicitly
  157|       |      // compute the normalized factor |s|, but rather we perform all operations
  158|       |      // over UV vectors in a non-normalized coordinate system scaled with a
  159|       |      // scaling factor |pn_norm2_squared|:
  160|       |      //
  161|       |      //      x_uv = X_UV * PN.Norm2Squared()
  162|       |      //
  163|    992|      const int64_t n_uv_absmax_element =
  164|    992|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    992|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 41, False: 951]
  ------------------
  166|    992|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     41|        return false;
  169|     41|      }
  170|    951|      const int64_t pn_uv_absmax_element =
  171|    951|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    951|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 36, False: 915]
  ------------------
  173|    951|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     36|        return false;
  176|     36|      }
  177|    915|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|    915|      const int64_t pn_absmax_element =
  179|    915|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|    915|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 18, False: 897]
  ------------------
  181|    915|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|     18|        return false;
  184|     18|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|    897|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|    897|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  189|       |
  190|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  191|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  192|       |      //
  193|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  194|       |      //
  195|       |      // To preserve precision, we perform all operations in scaled space as
  196|       |      // explained above, so we want the final vector to be:
  197|       |      //
  198|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  199|       |      //
  200|       |      // We can then rewrite the formula as:
  201|       |      //
  202|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  203|       |      //
  204|    897|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|    897|      const uint64_t norm_squared =
  207|    897|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|    897|      cx_uv = cx_uv * norm_squared;
  210|       |
  211|       |      // Predicted uv coordinate is then computed by either adding or
  212|       |      // subtracting CX_UV to/from X_UV.
  213|    897|      Vec2 predicted_uv;
  214|    897|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 897]
  ------------------
  215|       |        // When encoding, compute both possible vectors and determine which one
  216|       |        // results in a better prediction.
  217|       |        // Both vectors need to be transformed back from the scaled space to
  218|       |        // the real UV coordinate space.
  219|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  220|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  221|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  222|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (222:13): [True: 0, False: 0]
  ------------------
  223|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  224|      0|          predicted_uv = predicted_uv_0;
  225|      0|          orientations_.push_back(true);
  226|      0|        } else {
  227|      0|          predicted_uv = predicted_uv_1;
  228|      0|          orientations_.push_back(false);
  229|      0|        }
  230|    897|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|    897|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 6, False: 891]
  ------------------
  233|      6|          return false;
  234|      6|        }
  235|    891|        const bool orientation = orientations_.back();
  236|    891|        orientations_.pop_back();
  237|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  238|       |        // Note that the result will be the same (for non-overflowing values).
  239|    891|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 455, False: 436]
  ------------------
  240|    455|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|    455|        } else {
  242|    436|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|    436|        }
  244|    891|      }
  245|    891|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|    891|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|    891|      return true;
  248|    897|    }
  249|  17.4k|  }
  250|       |  // Else we don't have available textures on both corners or the position data
  251|       |  // is invalid. For such cases we can't use positions for predicting the uv
  252|       |  // value and we resort to delta coding.
  253|   358k|  int data_offset = 0;
  254|   358k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 187k, False: 170k]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|   187k|    data_offset = prev_data_id * kNumComponents;
  257|   187k|  }
  258|   358k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 16.4k, False: 341k]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|  16.4k|    data_offset = next_data_id * kNumComponents;
  261|   341k|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|   341k|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 341k, False: 206]
  ------------------
  265|   341k|      data_offset = (data_id - 1) * kNumComponents;
  266|   341k|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|    618|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 412, False: 206]
  ------------------
  269|    412|        predicted_value_[i] = 0;
  270|    412|      }
  271|    206|      return true;
  272|    206|    }
  273|   341k|  }
  274|  1.07M|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 716k, False: 358k]
  ------------------
  275|   716k|    predicted_value_[i] = data[data_offset + i];
  276|   716k|  }
  277|   358k|  return true;
  278|   358k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   419k|                                            const DataTypeT *data) const {
   59|   419k|    const int data_offset = entry_id * kNumComponents;
   60|   419k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   419k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|  52.4k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  52.4k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  52.4k|    VectorD<int64_t, 3> pos;
   52|  52.4k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  52.4k|                                 &pos[0]);
   54|  52.4k|    return pos;
   55|  52.4k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|   551k|  const DataTypeT *predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|    252|      : pos_attribute_(nullptr),
   39|    252|        entry_to_point_id_map_(nullptr),
   40|    252|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    252|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    252|    pos_attribute_ = &position_attribute;
   43|    252|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|    250|  void ResizeOrientations(int num_orientations) {
   74|    250|    orientations_.resize(num_orientations);
   75|    250|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|  8.29G|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    216|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    216|    entry_to_point_id_map_ = map;
   46|    216|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   221k|                                                 int data_id) {
   94|       |  // Compute the predicted UV coordinate from the positions on all corners
   95|       |  // of the processed triangle. For the best prediction, the UV coordinates
   96|       |  // on the next/previous corners need to be already encoded/decoded.
   97|   221k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   221k|  const CornerIndex prev_corner_id =
   99|   221k|      mesh_data_.corner_table()->Previous(corner_id);
  100|       |  // Get the encoded data ids from the next and previous corners.
  101|       |  // The data id is the encoding order of the UV coordinates.
  102|   221k|  int next_data_id, prev_data_id;
  103|       |
  104|   221k|  int next_vert_id, prev_vert_id;
  105|   221k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   221k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   221k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   221k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   221k|  typedef VectorD<int64_t, 2> Vec2;
  112|   221k|  typedef VectorD<int64_t, 3> Vec3;
  113|   221k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   221k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 220k, False: 299]
  |  Branch (115:33): [True: 220k, False: 306]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   220k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   220k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   220k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 205k, False: 15.1k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   205k|      predicted_value_[0] = p_uv[0];
  122|   205k|      predicted_value_[1] = p_uv[1];
  123|   205k|      return true;
  124|   205k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  15.1k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  15.1k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  15.1k|    const Vec3 prev_pos = GetPositionForEntryId(prev_data_id);
  130|       |    // We use the positions of the above triangle to predict the texture
  131|       |    // coordinate on the tip corner C.
  132|       |    // To convert the triangle into the UV coordinate system we first compute
  133|       |    // position X on the vector |prev_pos - next_pos| that is the projection of
  134|       |    // point C onto vector |prev_pos - next_pos|:
  135|       |    //
  136|       |    //              C
  137|       |    //             /.  \
  138|       |    //            / .     \
  139|       |    //           /  .        \
  140|       |    //          N---X----------P
  141|       |    //
  142|       |    // Where next_pos is point (N), prev_pos is point (P) and tip_pos is the
  143|       |    // position of predicted coordinate (C).
  144|       |    //
  145|  15.1k|    const Vec3 pn = prev_pos - next_pos;
  146|  15.1k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  15.1k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 1.84k, False: 13.2k]
  ------------------
  148|       |      // Compute the projection of C onto PN by computing dot product of CN with
  149|       |      // PN and normalizing it by length of PN. This gives us a factor |s| where
  150|       |      // |s = PN.Dot(CN) / PN.SquaredNorm2()|. This factor can be used to
  151|       |      // compute X in UV space |X_UV| as |X_UV = N_UV + s * PN_UV|.
  152|  1.84k|      const Vec3 cn = tip_pos - next_pos;
  153|  1.84k|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|  1.84k|      const Vec2 pn_uv = p_uv - n_uv;
  156|       |      // Because we perform all computations with integers, we don't explicitly
  157|       |      // compute the normalized factor |s|, but rather we perform all operations
  158|       |      // over UV vectors in a non-normalized coordinate system scaled with a
  159|       |      // scaling factor |pn_norm2_squared|:
  160|       |      //
  161|       |      //      x_uv = X_UV * PN.Norm2Squared()
  162|       |      //
  163|  1.84k|      const int64_t n_uv_absmax_element =
  164|  1.84k|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|  1.84k|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 29, False: 1.81k]
  ------------------
  166|  1.84k|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     29|        return false;
  169|     29|      }
  170|  1.81k|      const int64_t pn_uv_absmax_element =
  171|  1.81k|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|  1.81k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 39, False: 1.77k]
  ------------------
  173|  1.81k|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     39|        return false;
  176|     39|      }
  177|  1.77k|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|  1.77k|      const int64_t pn_absmax_element =
  179|  1.77k|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|  1.77k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 15, False: 1.75k]
  ------------------
  181|  1.77k|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|     15|        return false;
  184|     15|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|  1.75k|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|  1.75k|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  189|       |
  190|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  191|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  192|       |      //
  193|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  194|       |      //
  195|       |      // To preserve precision, we perform all operations in scaled space as
  196|       |      // explained above, so we want the final vector to be:
  197|       |      //
  198|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  199|       |      //
  200|       |      // We can then rewrite the formula as:
  201|       |      //
  202|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  203|       |      //
  204|  1.75k|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|  1.75k|      const uint64_t norm_squared =
  207|  1.75k|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|  1.75k|      cx_uv = cx_uv * norm_squared;
  210|       |
  211|       |      // Predicted uv coordinate is then computed by either adding or
  212|       |      // subtracting CX_UV to/from X_UV.
  213|  1.75k|      Vec2 predicted_uv;
  214|  1.75k|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 1.75k]
  ------------------
  215|       |        // When encoding, compute both possible vectors and determine which one
  216|       |        // results in a better prediction.
  217|       |        // Both vectors need to be transformed back from the scaled space to
  218|       |        // the real UV coordinate space.
  219|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  220|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  221|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  222|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (222:13): [True: 0, False: 0]
  ------------------
  223|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  224|      0|          predicted_uv = predicted_uv_0;
  225|      0|          orientations_.push_back(true);
  226|      0|        } else {
  227|      0|          predicted_uv = predicted_uv_1;
  228|      0|          orientations_.push_back(false);
  229|      0|        }
  230|  1.75k|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|  1.75k|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 8, False: 1.75k]
  ------------------
  233|      8|          return false;
  234|      8|        }
  235|  1.75k|        const bool orientation = orientations_.back();
  236|  1.75k|        orientations_.pop_back();
  237|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  238|       |        // Note that the result will be the same (for non-overflowing values).
  239|  1.75k|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 528, False: 1.22k]
  ------------------
  240|    528|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|  1.22k|        } else {
  242|  1.22k|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|  1.22k|        }
  244|  1.75k|      }
  245|  1.75k|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|  1.75k|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|  1.75k|      return true;
  248|  1.75k|    }
  249|  15.1k|  }
  250|       |  // Else we don't have available textures on both corners or the position data
  251|       |  // is invalid. For such cases we can't use positions for predicting the uv
  252|       |  // value and we resort to delta coding.
  253|  13.8k|  int data_offset = 0;
  254|  13.8k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 13.5k, False: 299]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|  13.5k|    data_offset = prev_data_id * kNumComponents;
  257|  13.5k|  }
  258|  13.8k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 13.2k, False: 594]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|  13.2k|    data_offset = next_data_id * kNumComponents;
  261|  13.2k|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|    594|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 378, False: 216]
  ------------------
  265|    378|      data_offset = (data_id - 1) * kNumComponents;
  266|    378|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|    648|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 432, False: 216]
  ------------------
  269|    432|        predicted_value_[i] = 0;
  270|    432|      }
  271|    216|      return true;
  272|    216|    }
  273|    594|  }
  274|  41.0k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 27.3k, False: 13.6k]
  ------------------
  275|  27.3k|    predicted_value_[i] = data[data_offset + i];
  276|  27.3k|  }
  277|  13.6k|  return true;
  278|  13.8k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   440k|                                            const DataTypeT *data) const {
   59|   440k|    const int data_offset = entry_id * kNumComponents;
   60|   440k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   440k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|  45.3k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  45.3k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  45.3k|    VectorD<int64_t, 3> pos;
   52|  45.3k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  45.3k|                                 &pos[0]);
   54|  45.3k|    return pos;
   55|  45.3k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|   220k|  const DataTypeT *predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     36|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    417|  bool AreCorrectionsPositive() override {
   71|    417|    return transform_.AreCorrectionsPositive();
   72|    417|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     26|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|     26|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 11, False: 15]
  ------------------
   50|     11|      return false;
   51|     11|    }
   52|     15|    return true;
   53|     26|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.08M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     42|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    404|  bool AreCorrectionsPositive() override {
   71|    404|    return transform_.AreCorrectionsPositive();
   72|    404|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     39|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|     39|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 9, False: 30]
  ------------------
   50|      9|      return false;
   51|      9|    }
   52|     30|    return true;
   53|     39|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.39M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  4.39k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  2.67k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  4.21k|  bool AreCorrectionsPositive() override {
   71|  4.21k|    return transform_.AreCorrectionsPositive();
   72|  4.21k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  3.17k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  3.17k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 152, False: 3.02k]
  ------------------
   50|    152|      return false;
   51|    152|    }
   52|  3.02k|    return true;
   53|  3.17k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  6.39M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    432|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    412|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    432|                                 const PointCloudDecoder *decoder) {
  188|    432|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    432|      method, att_id, decoder, TransformT());
  190|    432|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    432|                                 const TransformT &transform) {
  156|    432|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 432]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    432|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    432|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 432, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|    432|    const MeshDecoder *const mesh_decoder =
  167|    432|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    432|    auto ret = CreateMeshPredictionScheme<
  170|    432|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    432|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    432|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    432|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 396, False: 36]
  ------------------
  174|    396|      return ret;
  175|    396|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    432|  }
  178|       |  // Create delta decoder.
  179|     36|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     36|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    432|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    211|      uint16_t bitstream_version) {
  143|    211|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    211|        method, attribute, transform, mesh_data, bitstream_version);
  145|    211|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    211|        uint16_t bitstream_version) {
  127|    211|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 201, False: 10]
  ------------------
  128|    201|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    201|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    201|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    201|                                                  mesh_data));
  132|    201|      }
  133|     10|      return nullptr;
  134|    211|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    198|      uint16_t bitstream_version) {
  143|    198|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    198|        method, attribute, transform, mesh_data, bitstream_version);
  145|    198|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    198|        uint16_t bitstream_version) {
  127|    198|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 195, False: 3]
  ------------------
  128|    195|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    195|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    195|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    195|                                                  mesh_data));
  132|    195|      }
  133|      3|      return nullptr;
  134|    198|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    412|                                 const PointCloudDecoder *decoder) {
  188|    412|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    412|      method, att_id, decoder, TransformT());
  190|    412|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    412|                                 const TransformT &transform) {
  156|    412|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 412]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    412|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    412|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 412, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|    412|    const MeshDecoder *const mesh_decoder =
  167|    412|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    412|    auto ret = CreateMeshPredictionScheme<
  170|    412|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    412|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    412|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    412|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 370, False: 42]
  ------------------
  174|    370|      return ret;
  175|    370|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    412|  }
  178|       |  // Create delta decoder.
  179|     42|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     42|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    412|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    207|      uint16_t bitstream_version) {
  143|    207|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    207|        method, attribute, transform, mesh_data, bitstream_version);
  145|    207|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    207|        uint16_t bitstream_version) {
  111|    207|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 207, False: 0]
  ------------------
  112|    207|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    207|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    207|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    207|                                                  mesh_data));
  116|    207|      }
  117|      0|      return nullptr;
  118|    207|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    164|      uint16_t bitstream_version) {
  143|    164|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    164|        method, attribute, transform, mesh_data, bitstream_version);
  145|    164|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    164|        uint16_t bitstream_version) {
  111|    164|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 163, False: 1]
  ------------------
  112|    163|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    163|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    163|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    163|                                                  mesh_data));
  116|    163|      }
  117|      1|      return nullptr;
  118|    164|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  4.39k|                                 const PointCloudDecoder *decoder) {
  188|  4.39k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  4.39k|      method, att_id, decoder, TransformT());
  190|  4.39k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  4.39k|                                 const TransformT &transform) {
  156|  4.39k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 4.39k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  4.39k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  4.39k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 4.39k, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|  4.39k|    const MeshDecoder *const mesh_decoder =
  167|  4.39k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  4.39k|    auto ret = CreateMeshPredictionScheme<
  170|  4.39k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  4.39k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  4.39k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  4.39k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 4.09k, False: 299]
  ------------------
  174|  4.09k|      return ret;
  175|  4.09k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  4.39k|  }
  178|       |  // Create delta decoder.
  179|    299|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    299|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  4.39k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  1.99k|      uint16_t bitstream_version) {
  143|  1.99k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  1.99k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  1.99k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  1.99k|        uint16_t bitstream_version) {
   53|  1.99k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 714, False: 1.28k]
  ------------------
   54|    714|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    714|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    714|                                                         MeshDataT>(
   57|    714|                attribute, transform, mesh_data));
   58|    714|      }
   59|  1.28k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.28k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 152, False: 1.12k]
  ------------------
   61|    152|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    152|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    152|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    152|                                                  mesh_data));
   65|    152|      }
   66|  1.12k|#endif
   67|  1.12k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 256, False: 872]
  ------------------
   68|    256|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    256|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    256|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    256|                                                  mesh_data));
   72|    256|      }
   73|    872|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    872|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 197, False: 675]
  ------------------
   75|    197|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    197|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    197|                                                     MeshDataT>(
   78|    197|                attribute, transform, mesh_data, bitstream_version));
   79|    197|      }
   80|    675|#endif
   81|    675|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 229, False: 446]
  ------------------
   82|    229|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    229|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    229|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    229|                                                  mesh_data));
   86|    229|      }
   87|    446|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    446|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 446, False: 0]
  ------------------
   89|    446|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    446|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    446|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    446|                                                  mesh_data));
   93|    446|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  1.99k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.09k|      uint16_t bitstream_version) {
  143|  2.09k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.09k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.09k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.09k|        uint16_t bitstream_version) {
   53|  2.09k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 487, False: 1.61k]
  ------------------
   54|    487|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    487|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    487|                                                         MeshDataT>(
   57|    487|                attribute, transform, mesh_data));
   58|    487|      }
   59|  1.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.61k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 466, False: 1.14k]
  ------------------
   61|    466|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    466|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    466|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    466|                                                  mesh_data));
   65|    466|      }
   66|  1.14k|#endif
   67|  1.14k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 301, False: 845]
  ------------------
   68|    301|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    301|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    301|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    301|                                                  mesh_data));
   72|    301|      }
   73|    845|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    845|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 159, False: 686]
  ------------------
   75|    159|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    159|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    159|                                                     MeshDataT>(
   78|    159|                attribute, transform, mesh_data, bitstream_version));
   79|    159|      }
   80|    686|#endif
   81|    686|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 252, False: 434]
  ------------------
   82|    252|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    252|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    252|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    252|                                                  mesh_data));
   86|    252|      }
   87|    434|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    434|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 434, False: 0]
  ------------------
   89|    434|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    434|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    434|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    434|                                                  mesh_data));
   93|    434|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.09k|    }

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|     15|    const PointIndex *) {
   50|     15|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|     15|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|     15|  this->transform().ComputeOriginalValue(zero_vals.get(), in_corr, out_data);
   54|       |
   55|       |  // Decode data from the front using D(i) = D(i) + D(i - 1).
   56|  35.7k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 35.7k, False: 15]
  ------------------
   57|  35.7k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  35.7k|                                           in_corr + i, out_data + i);
   59|  35.7k|  }
   60|     15|  return true;
   61|     15|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|     30|    const PointIndex *) {
   50|     30|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|     30|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|     30|  this->transform().ComputeOriginalValue(zero_vals.get(), in_corr, out_data);
   54|       |
   55|       |  // Decode data from the front using D(i) = D(i) + D(i - 1).
   56|  35.1k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 35.1k, False: 30]
  ------------------
   57|  35.1k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  35.1k|                                           in_corr + i, out_data + i);
   59|  35.1k|  }
   60|     30|  return true;
   61|     30|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    299|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    236|    const PointIndex *) {
   50|    236|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    236|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    236|  this->transform().ComputeOriginalValue(zero_vals.get(), in_corr, out_data);
   54|       |
   55|       |  // Decode data from the front using D(i) = D(i) + D(i - 1).
   56|   801k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 801k, False: 236]
  ------------------
   57|   801k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   801k|                                           in_corr + i, out_data + i);
   59|   801k|  }
   60|    236|  return true;
   61|    236|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|     36|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|     42|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    432|    uint16_t bitstream_version) {
   38|    432|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    432|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 432, False: 0]
  ------------------
   40|    432|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 21, False: 411]
  ------------------
   41|    411|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 3, False: 408]
  ------------------
   42|    408|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1, False: 407]
  ------------------
   43|    407|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 0, False: 407]
  ------------------
   44|    407|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 407, False: 0]
  ------------------
   45|    432|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 0, False: 0]
  ------------------
   46|    432|    const CornerTable *const ct = source->GetCornerTable();
   47|    432|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    432|        source->GetAttributeEncodingData(att_id);
   49|    432|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 23, False: 409]
  |  Branch (49:26): [True: 0, False: 409]
  ------------------
   50|       |      // No connectivity data found.
   51|     23|      return nullptr;
   52|     23|    }
   53|       |    // Connectivity data exists.
   54|    409|    const MeshAttributeCornerTable *const att_ct =
   55|    409|        source->GetAttributeCornerTable(att_id);
   56|    409|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 211, False: 198]
  ------------------
   57|    211|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    211|      MeshData md;
   59|    211|      md.Set(source->mesh(), att_ct,
   60|    211|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    211|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    211|      MeshPredictionSchemeFactoryT factory;
   63|    211|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    211|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 201, False: 10]
  ------------------
   65|    201|        return ret;
   66|    201|      }
   67|    211|    } else {
   68|    198|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    198|      MeshData md;
   70|    198|      md.Set(source->mesh(), ct,
   71|    198|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    198|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    198|      MeshPredictionSchemeFactoryT factory;
   74|    198|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    198|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 195, False: 3]
  ------------------
   76|    195|        return ret;
   77|    195|      }
   78|    198|    }
   79|    409|  }
   80|     13|  return nullptr;
   81|    432|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    412|    uint16_t bitstream_version) {
   38|    412|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    412|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 412, False: 0]
  ------------------
   40|    412|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 8, False: 404]
  ------------------
   41|    404|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 0, False: 404]
  ------------------
   42|    404|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 0, False: 404]
  ------------------
   43|    404|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 3, False: 401]
  ------------------
   44|    401|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 376, False: 25]
  ------------------
   45|    391|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 4, False: 21]
  ------------------
   46|    391|    const CornerTable *const ct = source->GetCornerTable();
   47|    391|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    391|        source->GetAttributeEncodingData(att_id);
   49|    391|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 20, False: 371]
  |  Branch (49:26): [True: 0, False: 371]
  ------------------
   50|       |      // No connectivity data found.
   51|     20|      return nullptr;
   52|     20|    }
   53|       |    // Connectivity data exists.
   54|    371|    const MeshAttributeCornerTable *const att_ct =
   55|    371|        source->GetAttributeCornerTable(att_id);
   56|    371|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 207, False: 164]
  ------------------
   57|    207|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    207|      MeshData md;
   59|    207|      md.Set(source->mesh(), att_ct,
   60|    207|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    207|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    207|      MeshPredictionSchemeFactoryT factory;
   63|    207|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    207|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 207, False: 0]
  ------------------
   65|    207|        return ret;
   66|    207|      }
   67|    207|    } else {
   68|    164|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    164|      MeshData md;
   70|    164|      md.Set(source->mesh(), ct,
   71|    164|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    164|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    164|      MeshPredictionSchemeFactoryT factory;
   74|    164|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    164|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 163, False: 1]
  ------------------
   76|    163|        return ret;
   77|    163|      }
   78|    164|    }
   79|    371|  }
   80|     22|  return nullptr;
   81|    412|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  4.39k|    uint16_t bitstream_version) {
   38|  4.39k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  4.39k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 4.39k, False: 0]
  ------------------
   40|  4.39k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.25k, False: 3.14k]
  ------------------
   41|  3.14k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 655, False: 2.48k]
  ------------------
   42|  2.48k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 563, False: 1.92k]
  ------------------
   43|  1.92k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 483, False: 1.43k]
  ------------------
   44|  1.43k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 880, False: 559]
  ------------------
   45|  4.18k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 356, False: 203]
  ------------------
   46|  4.18k|    const CornerTable *const ct = source->GetCornerTable();
   47|  4.18k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  4.18k|        source->GetAttributeEncodingData(att_id);
   49|  4.18k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 96, False: 4.09k]
  |  Branch (49:26): [True: 0, False: 4.09k]
  ------------------
   50|       |      // No connectivity data found.
   51|     96|      return nullptr;
   52|     96|    }
   53|       |    // Connectivity data exists.
   54|  4.09k|    const MeshAttributeCornerTable *const att_ct =
   55|  4.09k|        source->GetAttributeCornerTable(att_id);
   56|  4.09k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 1.99k, False: 2.09k]
  ------------------
   57|  1.99k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  1.99k|      MeshData md;
   59|  1.99k|      md.Set(source->mesh(), att_ct,
   60|  1.99k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  1.99k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  1.99k|      MeshPredictionSchemeFactoryT factory;
   63|  1.99k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  1.99k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 1.99k, False: 0]
  ------------------
   65|  1.99k|        return ret;
   66|  1.99k|      }
   67|  2.09k|    } else {
   68|  2.09k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.09k|      MeshData md;
   70|  2.09k|      md.Set(source->mesh(), ct,
   71|  2.09k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.09k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.09k|      MeshPredictionSchemeFactoryT factory;
   74|  2.09k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.09k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.09k, False: 0]
  ------------------
   76|  2.09k|        return ret;
   77|  2.09k|      }
   78|  2.09k|    }
   79|  4.09k|  }
   80|    203|  return nullptr;
   81|  4.39k|}

_ZN5draco25PredictionSchemeInterfaceD2Ev:
   29|  5.23k|  virtual ~PredictionSchemeInterface() = default;

_ZN5draco62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiE19DecodeTransformDataEPNS_13DecoderBufferE:
   46|    404|  bool DecodeTransformData(DecoderBuffer *buffer) {
   47|    404|    DataTypeT max_quantized_value, center_value;
   48|    404|    if (!buffer->Decode(&max_quantized_value)) {
  ------------------
  |  Branch (48:9): [True: 6, False: 398]
  ------------------
   49|      6|      return false;
   50|      6|    }
   51|    398|    if (!buffer->Decode(&center_value)) {
  ------------------
  |  Branch (51:9): [True: 2, False: 396]
  ------------------
   52|      2|      return false;
   53|      2|    }
   54|    396|    (void)center_value;
   55|    396|    if (!this->set_max_quantized_value(max_quantized_value)) {
  ------------------
  |  Branch (55:9): [True: 17, False: 379]
  ------------------
   56|     17|      return false;
   57|     17|    }
   58|       |    // Account for reading wrong values, e.g., due to fuzzing.
   59|    379|    if (this->quantization_bits() < 2) {
  ------------------
  |  Branch (59:9): [True: 0, False: 379]
  ------------------
   60|      0|      return false;
   61|      0|    }
   62|    379|    if (this->quantization_bits() > 30) {
  ------------------
  |  Branch (62:9): [True: 0, False: 379]
  ------------------
   63|      0|      return false;
   64|      0|    }
   65|    379|    return true;
   66|    379|  }
_ZNK5draco62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiE20ComputeOriginalValueEPKiS3_Pi:
   70|  1.39M|                                   DataType *out_orig_vals) const {
   71|  1.39M|    DRACO_DCHECK_LE(pred_vals[0], 2 * this->center_value());
   72|  1.39M|    DRACO_DCHECK_LE(pred_vals[1], 2 * this->center_value());
   73|  1.39M|    DRACO_DCHECK_LE(corr_vals[0], 2 * this->center_value());
   74|  1.39M|    DRACO_DCHECK_LE(corr_vals[1], 2 * this->center_value());
   75|       |
   76|  1.39M|    DRACO_DCHECK_LE(0, pred_vals[0]);
   77|  1.39M|    DRACO_DCHECK_LE(0, pred_vals[1]);
   78|  1.39M|    DRACO_DCHECK_LE(0, corr_vals[0]);
   79|  1.39M|    DRACO_DCHECK_LE(0, corr_vals[1]);
   80|       |
   81|  1.39M|    const Point2 pred = Point2(pred_vals[0], pred_vals[1]);
   82|  1.39M|    const Point2 corr = Point2(corr_vals[0], corr_vals[1]);
   83|  1.39M|    const Point2 orig = ComputeOriginalValue(pred, corr);
   84|       |
   85|  1.39M|    out_orig_vals[0] = orig[0];
   86|  1.39M|    out_orig_vals[1] = orig[1];
   87|  1.39M|  }
_ZNK5draco62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiE20ComputeOriginalValueENS_7VectorDIiLi2EEES3_:
   90|  1.39M|  Point2 ComputeOriginalValue(Point2 pred, Point2 corr) const {
   91|  1.39M|    const Point2 t(this->center_value(), this->center_value());
   92|  1.39M|    pred = pred - t;
   93|  1.39M|    const bool pred_is_in_diamond = this->IsInDiamond(pred[0], pred[1]);
   94|  1.39M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (94:9): [True: 591k, False: 803k]
  ------------------
   95|   591k|      this->InvertDiamond(&pred[0], &pred[1]);
   96|   591k|    }
   97|  1.39M|    const bool pred_is_in_bottom_left = this->IsInBottomLeft(pred);
   98|  1.39M|    const int32_t rotation_count = this->GetRotationCount(pred);
   99|  1.39M|    if (!pred_is_in_bottom_left) {
  ------------------
  |  Branch (99:9): [True: 98.5k, False: 1.29M]
  ------------------
  100|  98.5k|      pred = this->RotatePoint(pred, rotation_count);
  101|  98.5k|    }
  102|  1.39M|    Point2 orig(this->ModMax(AddAsUnsigned(pred[0], corr[0])),
  103|  1.39M|                this->ModMax(AddAsUnsigned(pred[1], corr[1])));
  104|  1.39M|    if (!pred_is_in_bottom_left) {
  ------------------
  |  Branch (104:9): [True: 98.5k, False: 1.29M]
  ------------------
  105|  98.5k|      const int32_t reverse_rotation_count = (4 - rotation_count) % 4;
  106|  98.5k|      orig = this->RotatePoint(orig, reverse_rotation_count);
  107|  98.5k|    }
  108|  1.39M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (108:9): [True: 591k, False: 803k]
  ------------------
  109|   591k|      this->InvertDiamond(&orig[0], &orig[1]);
  110|   591k|    }
  111|  1.39M|    orig = orig + t;
  112|  1.39M|    return orig;
  113|  1.39M|  }
_ZN5draco62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiE4InitEi:
   44|     30|  void Init(int num_components) {}
_ZN5draco62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEC2Ev:
   41|    412|  PredictionSchemeNormalOctahedronCanonicalizedDecodingTransform() {}

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.39M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  1.39M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.25M, False: 137k]
  |  Branch (93:22): [True: 1.25M, False: 6.91k]
  ------------------
   94|  1.25M|      return true;
   95|  1.25M|    }
   96|   144k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 77.3k, False: 67.1k]
  |  Branch (96:25): [True: 45.9k, False: 31.4k]
  ------------------
   97|  1.39M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.39M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.39M|    const DataType sign_x = pred[0];
   52|  1.39M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.39M|    int32_t rotation_count = 0;
   55|  1.39M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.25M, False: 137k]
  ------------------
   56|  1.25M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.25M, False: 6.91k]
  ------------------
   57|  1.25M|        rotation_count = 0;
   58|  1.25M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 3.76k, False: 3.14k]
  ------------------
   59|  3.76k|        rotation_count = 3;
   60|  3.76k|      } else {
   61|  3.14k|        rotation_count = 1;
   62|  3.14k|      }
   63|  1.25M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 60.2k, False: 77.3k]
  ------------------
   64|  60.2k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 28.1k, False: 32.1k]
  ------------------
   65|  28.1k|        rotation_count = 2;
   66|  32.1k|      } else {
   67|  32.1k|        rotation_count = 1;
   68|  32.1k|      }
   69|  77.3k|    } else {
   70|  77.3k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 45.9k, False: 31.4k]
  ------------------
   71|  45.9k|        rotation_count = 0;
   72|  45.9k|      } else {
   73|  31.4k|        rotation_count = 3;
   74|  31.4k|      }
   75|  77.3k|    }
   76|  1.39M|    return rotation_count;
   77|  1.39M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   197k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   197k|    switch (rotation_count) {
   81|  70.4k|      case 1:
  ------------------
  |  Branch (81:7): [True: 70.4k, False: 126k]
  ------------------
   82|  70.4k|        return Point2(p[1], -p[0]);
   83|  56.2k|      case 2:
  ------------------
  |  Branch (83:7): [True: 56.2k, False: 140k]
  ------------------
   84|  56.2k|        return Point2(-p[0], -p[1]);
   85|  70.4k|      case 3:
  ------------------
  |  Branch (85:7): [True: 70.4k, False: 126k]
  ------------------
   86|  70.4k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 197k]
  ------------------
   88|      0|        return p;
   89|   197k|    }
   90|   197k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    412|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE19DecodeTransformDataEPNS_13DecoderBufferE:
   45|    417|  bool DecodeTransformData(DecoderBuffer *buffer) {
   46|    417|    DataTypeT max_quantized_value, center_value;
   47|    417|    if (!buffer->Decode(&max_quantized_value)) {
  ------------------
  |  Branch (47:9): [True: 2, False: 415]
  ------------------
   48|      2|      return false;
   49|      2|    }
   50|    415|    if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    415|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (50:9): [True: 103, False: 312]
  ------------------
   51|    103|      if (!buffer->Decode(&center_value)) {
  ------------------
  |  Branch (51:11): [True: 3, False: 100]
  ------------------
   52|      3|        return false;
   53|      3|      }
   54|    103|    }
   55|    412|    (void)center_value;
   56|    412|    return this->set_max_quantized_value(max_quantized_value);
   57|    415|  }
_ZNK5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE20ComputeOriginalValueEPKiS3_Pi:
   61|  1.08M|                                   DataType *out_orig_vals) const {
   62|  1.08M|    DRACO_DCHECK_LE(pred_vals[0], 2 * this->center_value());
   63|  1.08M|    DRACO_DCHECK_LE(pred_vals[1], 2 * this->center_value());
   64|  1.08M|    DRACO_DCHECK_LE(corr_vals[0], 2 * this->center_value());
   65|  1.08M|    DRACO_DCHECK_LE(corr_vals[1], 2 * this->center_value());
   66|       |
   67|  1.08M|    DRACO_DCHECK_LE(0, pred_vals[0]);
   68|  1.08M|    DRACO_DCHECK_LE(0, pred_vals[1]);
   69|  1.08M|    DRACO_DCHECK_LE(0, corr_vals[0]);
   70|  1.08M|    DRACO_DCHECK_LE(0, corr_vals[1]);
   71|       |
   72|  1.08M|    const Point2 pred = Point2(pred_vals[0], pred_vals[1]);
   73|  1.08M|    const Point2 corr = Point2(corr_vals[0], corr_vals[1]);
   74|  1.08M|    const Point2 orig = ComputeOriginalValue(pred, corr);
   75|       |
   76|  1.08M|    out_orig_vals[0] = orig[0];
   77|  1.08M|    out_orig_vals[1] = orig[1];
   78|  1.08M|  }
_ZNK5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE20ComputeOriginalValueENS_7VectorDIiLi2EEERKS3_:
   81|  1.08M|  Point2 ComputeOriginalValue(Point2 pred, const Point2 &corr) const {
   82|  1.08M|    const Point2 t(this->center_value(), this->center_value());
   83|  1.08M|    typedef typename std::make_unsigned<DataTypeT>::type UnsignedDataTypeT;
   84|  1.08M|    typedef VectorD<UnsignedDataTypeT, 2> Point2u;
   85|       |
   86|       |    // Perform the addition in unsigned type to avoid signed integer overflow.
   87|       |    // Note that the result will be the same (for non-overflowing values).
   88|  1.08M|    pred = Point2(Point2u(pred) - Point2u(t));
   89|       |
   90|  1.08M|    const bool pred_is_in_diamond = this->IsInDiamond(pred[0], pred[1]);
   91|  1.08M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (91:9): [True: 721k, False: 359k]
  ------------------
   92|   721k|      this->InvertDiamond(&pred[0], &pred[1]);
   93|   721k|    }
   94|       |
   95|       |    // Perform the addition in unsigned type to avoid signed integer overflow.
   96|       |    // Note that the result will be the same (for non-overflowing values).
   97|  1.08M|    Point2 orig(Point2u(pred) + Point2u(corr));
   98|       |
   99|  1.08M|    orig[0] = this->ModMax(orig[0]);
  100|  1.08M|    orig[1] = this->ModMax(orig[1]);
  101|  1.08M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (101:9): [True: 721k, False: 359k]
  ------------------
  102|   721k|      this->InvertDiamond(&orig[0], &orig[1]);
  103|   721k|    }
  104|       |
  105|       |    // Perform the addition in unsigned type to avoid signed integer overflow.
  106|       |    // Note that the result will be the same (for non-overflowing values).
  107|  1.08M|    orig = Point2(Point2u(orig) + Point2u(t));
  108|  1.08M|    return orig;
  109|  1.08M|  }
_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE4InitEi:
   44|     15|  void Init(int num_components) {}
_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiEC2Ev:
   41|    432|  PredictionSchemeNormalOctahedronDecodingTransform() {}

_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE22AreCorrectionsPositiveEv:
   49|    821|  bool AreCorrectionsPositive() const { return true; }
_ZN5draco45PredictionSchemeNormalOctahedronTransformBaseIiE23set_max_quantized_valueEi:
   62|    808|  inline bool set_max_quantized_value(DataTypeT max_quantized_value) {
   63|    808|    if (max_quantized_value % 2 == 0) {
  ------------------
  |  Branch (63:9): [True: 14, False: 794]
  ------------------
   64|     14|      return false;
   65|     14|    }
   66|    794|    int q = MostSignificantBit(max_quantized_value) + 1;
   67|    794|    return octahedron_tool_box_.SetQuantizationBits(q);
   68|    808|  }
_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE17quantization_bitsEv:
   57|  1.45k|  inline int32_t quantization_bits() const {
   58|  1.45k|    return octahedron_tool_box_.quantization_bits();
   59|  1.45k|  }
_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE12center_valueEv:
   54|  4.95M|  inline DataTypeT center_value() const {
   55|  4.95M|    return octahedron_tool_box_.center_value();
   56|  4.95M|  }
_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE11IsInDiamondEii:
   70|  2.47M|  bool IsInDiamond(DataTypeT s, DataTypeT t) const {
   71|  2.47M|    return octahedron_tool_box_.IsInDiamond(s, t);
   72|  2.47M|  }
_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE13InvertDiamondEPiS2_:
   73|  2.62M|  void InvertDiamond(DataTypeT *s, DataTypeT *t) const {
   74|  2.62M|    return octahedron_tool_box_.InvertDiamond(s, t);
   75|  2.62M|  }
_ZNK5draco45PredictionSchemeNormalOctahedronTransformBaseIiE6ModMaxEi:
   77|  4.95M|  int32_t ModMax(int32_t x) const { return octahedron_tool_box_.ModMax(x); }
_ZN5draco45PredictionSchemeNormalOctahedronTransformBaseIiEC2Ev:
   37|    844|  PredictionSchemeNormalOctahedronTransformBase() {}

_ZN5draco37PredictionSchemeWrapDecodingTransformIiiE19DecodeTransformDataEPNS_13DecoderBufferE:
   66|  4.04k|  bool DecodeTransformData(DecoderBuffer *buffer) {
   67|  4.04k|    DataTypeT min_value, max_value;
   68|  4.04k|    if (!buffer->Decode(&min_value)) {
  ------------------
  |  Branch (68:9): [True: 25, False: 4.02k]
  ------------------
   69|     25|      return false;
   70|     25|    }
   71|  4.02k|    if (!buffer->Decode(&max_value)) {
  ------------------
  |  Branch (71:9): [True: 12, False: 4.01k]
  ------------------
   72|     12|      return false;
   73|     12|    }
   74|  4.01k|    if (min_value > max_value) {
  ------------------
  |  Branch (74:9): [True: 163, False: 3.84k]
  ------------------
   75|    163|      return false;
   76|    163|    }
   77|  3.84k|    this->set_min_value(min_value);
   78|  3.84k|    this->set_max_value(max_value);
   79|  3.84k|    if (!this->InitCorrectionBounds()) {
  ------------------
  |  Branch (79:9): [True: 17, False: 3.83k]
  ------------------
   80|     17|      return false;
   81|     17|    }
   82|  3.83k|    return true;
   83|  3.84k|  }
_ZNK5draco37PredictionSchemeWrapDecodingTransformIiiE20ComputeOriginalValueEPKiS3_Pi:
   38|  6.39M|                                   DataTypeT *out_original_vals) const {
   39|       |    // For now we assume both |DataTypeT| and |CorrTypeT| are equal.
   40|  6.39M|    static_assert(std::is_same<DataTypeT, CorrTypeT>::value,
   41|  6.39M|                  "Predictions and corrections must have the same type.");
   42|       |
   43|       |    // The only valid implementation right now is for int32_t.
   44|  6.39M|    static_assert(std::is_same<DataTypeT, int32_t>::value,
   45|  6.39M|                  "Only int32_t is supported for predicted values.");
   46|       |
   47|  6.39M|    predicted_vals = this->ClampPredictedValue(predicted_vals);
   48|       |
   49|       |    // Perform the wrapping using unsigned coordinates to avoid potential signed
   50|       |    // integer overflows caused by malformed input.
   51|  6.39M|    const uint32_t *const uint_predicted_vals =
   52|  6.39M|        reinterpret_cast<const uint32_t *>(predicted_vals);
   53|  6.39M|    const uint32_t *const uint_corr_vals =
   54|  6.39M|        reinterpret_cast<const uint32_t *>(corr_vals);
   55|   100M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (55:21): [True: 93.9M, False: 6.39M]
  ------------------
   56|  93.9M|      out_original_vals[i] =
   57|  93.9M|          static_cast<DataTypeT>(uint_predicted_vals[i] + uint_corr_vals[i]);
   58|  93.9M|      if (out_original_vals[i] > this->max_value()) {
  ------------------
  |  Branch (58:11): [True: 308k, False: 93.6M]
  ------------------
   59|   308k|        out_original_vals[i] -= this->max_dif();
   60|  93.6M|      } else if (out_original_vals[i] < this->min_value()) {
  ------------------
  |  Branch (60:18): [True: 640k, False: 93.0M]
  ------------------
   61|   640k|        out_original_vals[i] += this->max_dif();
   62|   640k|      }
   63|  93.9M|    }
   64|  6.39M|  }
_ZN5draco37PredictionSchemeWrapDecodingTransformIiiEC2Ev:
   32|  4.39k|  PredictionSchemeWrapDecodingTransform() {}

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  4.21k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  3.84k|  inline void set_min_value(const DataTypeT &v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  3.84k|  inline void set_max_value(const DataTypeT &v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  3.84k|  bool InitCorrectionBounds() {
   84|  3.84k|    const int64_t dif =
   85|  3.84k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  3.84k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.84k]
  |  Branch (86:20): [True: 17, False: 3.83k]
  ------------------
   87|     17|      return false;
   88|     17|    }
   89|  3.83k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  3.83k|    max_correction_ = max_dif_ / 2;
   91|  3.83k|    min_correction_ = -max_correction_;
   92|  3.83k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 1.57k, False: 2.25k]
  ------------------
   93|  1.57k|      max_correction_ -= 1;
   94|  1.57k|    }
   95|  3.83k|    return true;
   96|  3.84k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  3.01k|  void Init(int num_components) {
   56|  3.01k|    num_components_ = num_components;
   57|  3.01k|    clamped_value_.resize(num_components);
   58|  3.01k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  6.39M|      const DataTypeT *predicted_val) const {
   64|   100M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 93.9M, False: 6.39M]
  ------------------
   65|  93.9M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 521k, False: 93.4M]
  ------------------
   66|   521k|        clamped_value_[i] = max_value_;
   67|  93.4M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 3.08M, False: 90.3M]
  ------------------
   68|  3.08M|        clamped_value_[i] = min_value_;
   69|  90.3M|      } else {
   70|  90.3M|        clamped_value_[i] = predicted_val[i];
   71|  90.3M|      }
   72|  93.9M|    }
   73|  6.39M|    return clamped_value_.data();
   74|  6.39M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|   200M|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|  93.9M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|   948k|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|  93.6M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|    751|  int quantization_bits() const {
   78|    751|    DRACO_DCHECK(false);
   79|    751|    return -1;
   80|    751|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  4.39k|      : num_components_(0),
   45|  4.39k|        min_value_(0),
   46|  4.39k|        max_value_(0),
   47|  4.39k|        max_dif_(0),
   48|  4.39k|        max_correction_(0),
   49|  4.39k|        min_correction_(0) {}

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  25.2k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  25.2k|                                      int attribute_id) {
   24|  25.2k|  decoder_ = decoder;
   25|  25.2k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  25.2k|  attribute_id_ = attribute_id;
   27|  25.2k|  return true;
   28|  25.2k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  10.7k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   39|  10.7k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 10.7k]
  ------------------
   40|  10.7k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 10.7k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  10.7k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 1.80k, False: 8.98k]
  ------------------
   44|  1.80k|    return false;
   45|  1.80k|  }
   46|  8.98k|  return true;
   47|  10.7k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  4.66k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  4.66k|  return true;
   53|  4.66k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    347|    const std::vector<PointIndex> &point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    347|  return true;
   59|    347|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  8.13k|const PointAttribute *SequentialAttributeDecoder::GetPortableAttribute() {
   62|       |  // If needed, copy point to attribute value index mapping from the final
   63|       |  // attribute to the portable attribute.
   64|  8.13k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 5.71k, False: 2.41k]
  |  Branch (64:45): [True: 5.42k, False: 296]
  ------------------
   65|  5.42k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 4.09k, False: 1.32k]
  ------------------
   66|  4.09k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  4.09k|    for (PointIndex i(0);
   68|  24.5M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 24.5M, False: 4.09k]
  ------------------
   69|  24.5M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  24.5M|    }
   71|  4.09k|  }
   72|  8.13k|  return portable_attribute_.get();
   73|  8.13k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  5.23k|    PredictionSchemeInterface *ps) {
   77|  7.70k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 2.48k, False: 5.22k]
  ------------------
   78|  2.48k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  2.48k|        ps->GetParentAttributeType(i));
   80|  2.48k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 1, False: 2.48k]
  ------------------
   81|      1|      return false;  // Requested attribute does not exist.
   82|      1|    }
   83|  2.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  2.48k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 2.48k]
  ------------------
   85|      0|      if (!ps->SetParentAttribute(decoder_->point_cloud()->attribute(att_id))) {
  ------------------
  |  Branch (85:11): [True: 0, False: 0]
  ------------------
   86|      0|        return false;
   87|      0|      }
   88|      0|    } else
   89|  2.48k|#endif
   90|  2.48k|    {
   91|  2.48k|      const PointAttribute *const pa = decoder_->GetPortableAttribute(att_id);
   92|  2.48k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 2, False: 2.48k]
  |  Branch (92:28): [True: 10, False: 2.47k]
  ------------------
   93|     12|        return false;
   94|     12|      }
   95|  2.48k|    }
   96|  2.48k|  }
   97|  5.22k|  return true;
   98|  5.23k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    582|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  102|    582|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    582|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    582|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    582|  uint8_t *const value_data = value_data_ptr.get();
  106|    582|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  83.5k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 83.0k, False: 503]
  ------------------
  109|  83.0k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 79, False: 82.9k]
  ------------------
  110|     79|      return false;
  111|     79|    }
  112|  82.9k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  82.9k|    out_byte_pos += entry_size;
  114|  82.9k|  }
  115|    503|  return true;
  116|    582|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  8.81k|  const PointAttribute *attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|  1.15M|  PointAttribute *attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  5.23k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  31.1k|  PointCloudDecoder *decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  9.67k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  9.67k|    portable_attribute_ = std::move(att);
   71|  9.67k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  34.5k|  PointAttribute *portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  25.2k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  20.9k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  7.69k|    DecoderBuffer *buffer) {
   30|  7.69k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 119, False: 7.57k]
  ------------------
   31|    119|    return false;
   32|    119|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  7.57k|  const int32_t num_attributes = GetNumAttributes();
   35|  7.57k|  sequential_decoders_.resize(num_attributes);
   36|  32.8k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 25.2k, False: 7.55k]
  ------------------
   37|  25.2k|    uint8_t decoder_type;
   38|  25.2k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 6, False: 25.2k]
  ------------------
   39|      6|      return false;
   40|      6|    }
   41|       |    // Create the decoder from the id.
   42|  25.2k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  25.2k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 11, False: 25.2k]
  ------------------
   44|     11|      return false;
   45|     11|    }
   46|  25.2k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 3, False: 25.2k]
  ------------------
   47|      3|      return false;
   48|      3|    }
   49|  25.2k|  }
   50|  7.55k|  return true;
   51|  7.57k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  4.64k|    DecoderBuffer *buffer) {
   55|  4.64k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 4.64k]
  |  Branch (55:22): [True: 5, False: 4.63k]
  ------------------
   56|      5|    return false;
   57|      5|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  4.63k|  const int32_t num_attributes = GetNumAttributes();
   60|  19.7k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 15.0k, False: 4.63k]
  ------------------
   61|  15.0k|    PointAttribute *const pa =
   62|  15.0k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  15.0k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 2, False: 15.0k]
  ------------------
   64|      2|      return false;
   65|      2|    }
   66|  15.0k|  }
   67|  4.63k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  4.63k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  4.63k|    DecoderBuffer *in_buffer) {
   72|  4.63k|  const int32_t num_attributes = GetNumAttributes();
   73|  13.6k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 10.7k, False: 2.83k]
  ------------------
   74|  10.7k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 1.80k, False: 8.98k]
  ------------------
   75|  10.7k|                                                          in_buffer)) {
   76|  1.80k|      return false;
   77|  1.80k|    }
   78|  10.7k|  }
   79|  2.83k|  return true;
   80|  4.63k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  2.83k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  2.83k|  const int32_t num_attributes = GetNumAttributes();
   85|  7.87k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 5.68k, False: 2.18k]
  ------------------
   86|  5.68k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 649, False: 5.03k]
  ------------------
   87|  5.68k|            point_ids_, in_buffer)) {
   88|    649|      return false;
   89|    649|    }
   90|  5.68k|  }
   91|  2.18k|  return true;
   92|  2.83k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.18k|    TransformAttributesToOriginalFormat() {
   96|  2.18k|  const int32_t num_attributes = GetNumAttributes();
   97|  6.26k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.30k, False: 1.96k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.30k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.30k, False: 0]
  ------------------
  100|  4.30k|      const PointAttribute *const attribute =
  101|  4.30k|          sequential_decoders_[i]->attribute();
  102|  4.30k|      const PointAttribute *const portable_attribute =
  103|  4.30k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.30k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 3.95k, False: 347]
  |  Branch (104:11): [True: 714, False: 3.59k]
  ------------------
  105|  3.95k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 714, False: 3.24k]
  ------------------
  106|  3.95k|              attribute->attribute_type(), "skip_attribute_transform", false)) {
  107|       |        // Attribute transform should not be performed. In this case, we replace
  108|       |        // the output geometry attribute with the portable attribute.
  109|       |        // TODO(ostava): We can potentially avoid this copy by introducing a new
  110|       |        // mechanism that would allow to use the final attributes as portable
  111|       |        // attributes for predictors that may need them.
  112|    714|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    714|        continue;
  114|    714|      }
  115|  4.30k|    }
  116|  3.59k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 223, False: 3.36k]
  ------------------
  117|  3.59k|            point_ids_)) {
  118|    223|      return false;
  119|    223|    }
  120|  3.59k|  }
  121|  1.96k|  return true;
  122|  2.18k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  25.2k|    uint8_t decoder_type) {
  127|  25.2k|  switch (decoder_type) {
  128|  1.84k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 1.84k, False: 23.4k]
  ------------------
  129|  1.84k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  1.84k|          new SequentialAttributeDecoder());
  131|  22.0k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 22.0k, False: 3.17k]
  ------------------
  132|  22.0k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  22.0k|          new SequentialIntegerAttributeDecoder());
  134|    381|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 381, False: 24.8k]
  ------------------
  135|    381|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    381|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|    936|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 936, False: 24.3k]
  ------------------
  139|    936|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|    936|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     11|    default:
  ------------------
  |  Branch (142:5): [True: 11, False: 25.2k]
  ------------------
  143|     11|      break;
  144|  25.2k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     11|  return nullptr;
  147|  25.2k|}

_ZN5draco37SequentialAttributeDecodersController20GetPortableAttributeEi:
   38|  2.48k|      int32_t point_attribute_id) override {
   39|  2.48k|    const int32_t loc_id = GetLocalIdForPointAttribute(point_attribute_id);
   40|  2.48k|    if (loc_id < 0) {
  ------------------
  |  Branch (40:9): [True: 0, False: 2.48k]
  ------------------
   41|      0|      return nullptr;
   42|      0|    }
   43|  2.48k|    return sequential_decoders_[loc_id]->GetPortableAttribute();
   44|  2.48k|  }

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  23.3k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() {}
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   26|  23.3k|                                             int attribute_id) {
   27|  23.3k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 23.3k]
  ------------------
   28|      0|    return false;
   29|      0|  }
   30|  23.3k|  return true;
   31|  23.3k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   34|  3.24k|    const std::vector<PointIndex> &point_ids) {
   35|  3.24k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  3.24k|  if (decoder() &&
  ------------------
  |  Branch (36:7): [True: 3.24k, False: 0]
  ------------------
   37|  3.24k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.24k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (37:7): [True: 0, False: 3.24k]
  ------------------
   38|      0|    return true;  // Don't revert the transform here for older files.
   39|      0|  }
   40|  3.24k|#endif
   41|  3.24k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   42|  3.24k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   45|  10.1k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   46|       |  // Decode prediction scheme.
   47|  10.1k|  int8_t prediction_scheme_method;
   48|  10.1k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (48:7): [True: 192, False: 10.0k]
  ------------------
   49|    192|    return false;
   50|    192|  }
   51|       |  // Check that decoded prediction scheme method type is valid.
   52|  10.0k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (52:7): [True: 53, False: 9.95k]
  ------------------
   53|  9.95k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (53:7): [True: 133, False: 9.82k]
  ------------------
   54|    186|    return false;
   55|    186|  }
   56|  9.82k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (56:7): [True: 9.59k, False: 221]
  ------------------
   57|  9.59k|    int8_t prediction_transform_type;
   58|  9.59k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (58:9): [True: 58, False: 9.54k]
  ------------------
   59|     58|      return false;
   60|     58|    }
   61|       |    // Check that decoded prediction scheme transform type is valid.
   62|  9.54k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (62:9): [True: 10, False: 9.53k]
  ------------------
   63|  9.53k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (63:9): [True: 67, False: 9.46k]
  ------------------
   64|     77|      return false;
   65|     77|    }
   66|  9.46k|    prediction_scheme_ = CreateIntPredictionScheme(
   67|  9.46k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   68|  9.46k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   69|  9.46k|  }
   70|       |
   71|  9.68k|  if (prediction_scheme_) {
  ------------------
  |  Branch (71:7): [True: 5.23k, False: 4.44k]
  ------------------
   72|  5.23k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (72:9): [True: 13, False: 5.22k]
  ------------------
   73|     13|      return false;
   74|     13|    }
   75|  5.23k|  }
   76|       |
   77|  9.67k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (77:7): [True: 1.19k, False: 8.47k]
  ------------------
   78|  1.19k|    return false;
   79|  1.19k|  }
   80|       |
   81|  8.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   82|  8.47k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   83|  8.47k|  if (decoder() &&
  ------------------
  |  Branch (83:7): [True: 8.47k, False: 0]
  ------------------
   84|  8.47k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  8.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:7): [True: 6, False: 8.47k]
  ------------------
   85|       |    // For older files, revert the transform right after we decode the data.
   86|      6|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 6]
  ------------------
   87|      0|      return false;
   88|      0|    }
   89|      6|  }
   90|  8.47k|#endif
   91|  8.47k|  return true;
   92|  8.47k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   97|  8.60k|    PredictionSchemeTransformType transform_type) {
   98|  8.60k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (98:7): [True: 4.21k, False: 4.39k]
  ------------------
   99|  4.21k|    return nullptr;  // For now we support only wrap transform.
  100|  4.21k|  }
  101|  4.39k|  return CreatePredictionSchemeForDecoder<
  102|  4.39k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  103|  4.39k|      method, attribute_id(), decoder());
  104|  8.60k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  107|  9.67k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  108|  9.67k|  const int num_components = GetNumValueComponents();
  109|  9.67k|  if (num_components <= 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 9.67k]
  ------------------
  110|      0|    return false;
  111|      0|  }
  112|  9.67k|  const size_t num_entries = point_ids.size();
  113|  9.67k|  const size_t num_values = num_entries * num_components;
  114|  9.67k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  115|  9.67k|  int32_t *const portable_attribute_data = GetPortableAttributeData();
  116|  9.67k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (116:7): [True: 13, False: 9.65k]
  ------------------
  117|     13|    return false;
  118|     13|  }
  119|  9.65k|  uint8_t compressed;
  120|  9.65k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (120:7): [True: 19, False: 9.63k]
  ------------------
  121|     19|    return false;
  122|     19|  }
  123|  9.63k|  if (compressed > 0) {
  ------------------
  |  Branch (123:7): [True: 487, False: 9.15k]
  ------------------
  124|       |    // Decode compressed values.
  125|    487|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (125:9): [True: 224, False: 263]
  ------------------
  126|    487|                       in_buffer,
  127|    487|                       reinterpret_cast<uint32_t *>(portable_attribute_data))) {
  128|    224|      return false;
  129|    224|    }
  130|  9.15k|  } else {
  131|       |    // Decode the integer data directly.
  132|       |    // Get the number of bytes for a given entry.
  133|  9.15k|    uint8_t num_bytes;
  134|  9.15k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (134:9): [True: 10, False: 9.14k]
  ------------------
  135|     10|      return false;
  136|     10|    }
  137|  9.14k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (137:9): [True: 312, False: 8.83k]
  ------------------
  138|    312|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (138:11): [True: 0, False: 312]
  ------------------
  139|    312|          sizeof(int32_t) * num_values) {
  140|      0|        return false;
  141|      0|      }
  142|    312|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (142:11): [True: 4, False: 308]
  ------------------
  143|    312|                             sizeof(int32_t) * num_values)) {
  144|      4|        return false;
  145|      4|      }
  146|  8.83k|    } else {
  147|  8.83k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (147:11): [True: 19, False: 8.81k]
  ------------------
  148|  8.83k|          num_bytes * num_values) {
  149|     19|        return false;
  150|     19|      }
  151|  8.81k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (151:11): [True: 17, False: 8.79k]
  ------------------
  152|  8.81k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  153|     17|        return false;
  154|     17|      }
  155|   238M|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (155:26): [True: 238M, False: 8.79k]
  ------------------
  156|   238M|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (156:13): [True: 0, False: 238M]
  ------------------
  157|      0|          return false;
  158|      0|        }
  159|   238M|      }
  160|  8.79k|    }
  161|  9.14k|  }
  162|       |
  163|  9.36k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (163:7): [True: 9.36k, False: 0]
  |  Branch (163:26): [True: 4.33k, False: 5.03k]
  ------------------
  164|  8.54k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (164:26): [True: 4.21k, False: 821]
  ------------------
  165|       |    // Convert the values back to the original signed format.
  166|  8.54k|    ConvertSymbolsToSignedInts(
  167|  8.54k|        reinterpret_cast<const uint32_t *>(portable_attribute_data),
  168|  8.54k|        static_cast<int>(num_values), portable_attribute_data);
  169|  8.54k|  }
  170|       |
  171|       |  // If the data was encoded with a prediction scheme, we must revert it.
  172|  9.36k|  if (prediction_scheme_) {
  ------------------
  |  Branch (172:7): [True: 5.03k, False: 4.33k]
  ------------------
  173|  5.03k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (173:9): [True: 519, False: 4.51k]
  ------------------
  174|    519|      return false;
  175|    519|    }
  176|       |
  177|  4.51k|    if (num_values > 0) {
  ------------------
  |  Branch (177:9): [True: 4.51k, False: 0]
  ------------------
  178|  4.51k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (178:11): [True: 369, False: 4.14k]
  ------------------
  179|  4.51k|              portable_attribute_data, portable_attribute_data,
  180|  4.51k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  181|    369|        return false;
  182|    369|      }
  183|  4.51k|    }
  184|  4.51k|  }
  185|  8.47k|  return true;
  186|  9.36k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  188|  2.92k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  189|  2.92k|  switch (attribute()->data_type()) {
  190|     89|    case DT_UINT8:
  ------------------
  |  Branch (190:5): [True: 89, False: 2.83k]
  ------------------
  191|     89|      StoreTypedValues<uint8_t>(num_values);
  192|     89|      break;
  193|  2.40k|    case DT_INT8:
  ------------------
  |  Branch (193:5): [True: 2.40k, False: 525]
  ------------------
  194|  2.40k|      StoreTypedValues<int8_t>(num_values);
  195|  2.40k|      break;
  196|     35|    case DT_UINT16:
  ------------------
  |  Branch (196:5): [True: 35, False: 2.89k]
  ------------------
  197|     35|      StoreTypedValues<uint16_t>(num_values);
  198|     35|      break;
  199|    163|    case DT_INT16:
  ------------------
  |  Branch (199:5): [True: 163, False: 2.76k]
  ------------------
  200|    163|      StoreTypedValues<int16_t>(num_values);
  201|    163|      break;
  202|     57|    case DT_UINT32:
  ------------------
  |  Branch (202:5): [True: 57, False: 2.86k]
  ------------------
  203|     57|      StoreTypedValues<uint32_t>(num_values);
  204|     57|      break;
  205|    109|    case DT_INT32:
  ------------------
  |  Branch (205:5): [True: 109, False: 2.81k]
  ------------------
  206|    109|      StoreTypedValues<int32_t>(num_values);
  207|    109|      break;
  208|     72|    default:
  ------------------
  |  Branch (208:5): [True: 72, False: 2.85k]
  ------------------
  209|     72|      return false;
  210|  2.92k|  }
  211|  2.85k|  return true;
  212|  2.92k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  236|  9.67k|    int num_entries, int num_components) {
  237|  9.67k|  GeometryAttribute ga;
  238|  9.67k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  239|  9.67k|          false, num_components * DataTypeLength(DT_INT32), 0);
  240|  9.67k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  241|  9.67k|  port_att->SetIdentityMapping();
  242|  9.67k|  port_att->Reset(num_entries);
  243|  9.67k|  port_att->set_unique_id(attribute()->unique_id());
  244|  9.67k|  SetPortableAttribute(std::move(port_att));
  245|  9.67k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  215|     89|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     89|  const int num_components = attribute()->num_components();
  217|     89|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     89|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     89|      new AttributeTypeT[num_components]);
  220|     89|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     89|  int val_id = 0;
  222|     89|  int out_byte_pos = 0;
  223|   186k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 186k, False: 89]
  ------------------
  224|  3.76M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 3.57M, False: 186k]
  ------------------
  225|  3.57M|      const AttributeTypeT value =
  226|  3.57M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  3.57M|      att_val[c] = value;
  228|  3.57M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   186k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   186k|    out_byte_pos += entry_size;
  232|   186k|  }
  233|     89|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  215|  2.40k|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|  2.40k|  const int num_components = attribute()->num_components();
  217|  2.40k|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|  2.40k|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|  2.40k|      new AttributeTypeT[num_components]);
  220|  2.40k|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|  2.40k|  int val_id = 0;
  222|  2.40k|  int out_byte_pos = 0;
  223|   190k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 188k, False: 2.40k]
  ------------------
  224|  7.34M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 7.15M, False: 188k]
  ------------------
  225|  7.15M|      const AttributeTypeT value =
  226|  7.15M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  7.15M|      att_val[c] = value;
  228|  7.15M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   188k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   188k|    out_byte_pos += entry_size;
  232|   188k|  }
  233|  2.40k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  215|     35|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     35|  const int num_components = attribute()->num_components();
  217|     35|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     35|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     35|      new AttributeTypeT[num_components]);
  220|     35|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     35|  int val_id = 0;
  222|     35|  int out_byte_pos = 0;
  223|   151k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 151k, False: 35]
  ------------------
  224|  15.8M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 15.6M, False: 151k]
  ------------------
  225|  15.6M|      const AttributeTypeT value =
  226|  15.6M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  15.6M|      att_val[c] = value;
  228|  15.6M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   151k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   151k|    out_byte_pos += entry_size;
  232|   151k|  }
  233|     35|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  215|    163|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    163|  const int num_components = attribute()->num_components();
  217|    163|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    163|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    163|      new AttributeTypeT[num_components]);
  220|    163|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    163|  int val_id = 0;
  222|    163|  int out_byte_pos = 0;
  223|   215k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 215k, False: 163]
  ------------------
  224|  10.8M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 10.6M, False: 215k]
  ------------------
  225|  10.6M|      const AttributeTypeT value =
  226|  10.6M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  10.6M|      att_val[c] = value;
  228|  10.6M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   215k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   215k|    out_byte_pos += entry_size;
  232|   215k|  }
  233|    163|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  215|     57|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     57|  const int num_components = attribute()->num_components();
  217|     57|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     57|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     57|      new AttributeTypeT[num_components]);
  220|     57|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     57|  int val_id = 0;
  222|     57|  int out_byte_pos = 0;
  223|   307k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 307k, False: 57]
  ------------------
  224|  48.4M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 48.1M, False: 307k]
  ------------------
  225|  48.1M|      const AttributeTypeT value =
  226|  48.1M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  48.1M|      att_val[c] = value;
  228|  48.1M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   307k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   307k|    out_byte_pos += entry_size;
  232|   307k|  }
  233|     57|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  215|    109|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    109|  const int num_components = attribute()->num_components();
  217|    109|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    109|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    109|      new AttributeTypeT[num_components]);
  220|    109|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    109|  int val_id = 0;
  222|    109|  int out_byte_pos = 0;
  223|  70.2k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 70.1k, False: 109]
  ------------------
  224|  7.00M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 6.93M, False: 70.1k]
  ------------------
  225|  6.93M|      const AttributeTypeT value =
  226|  6.93M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  6.93M|      att_val[c] = value;
  228|  6.93M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  70.1k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  70.1k|    out_byte_pos += entry_size;
  232|  70.1k|  }
  233|    109|}

_ZNK5draco33SequentialIntegerAttributeDecoder21GetNumValueComponentsEv:
   47|  8.81k|  virtual int32_t GetNumValueComponents() const {
   48|  8.81k|    return attribute()->num_components();
   49|  8.81k|  }
_ZN5draco33SequentialIntegerAttributeDecoder24GetPortableAttributeDataEv:
   57|  12.5k|  int32_t *GetPortableAttributeData() {
   58|  12.5k|    if (portable_attribute()->size() == 0) {
  ------------------
  |  Branch (58:9): [True: 13, False: 12.5k]
  ------------------
   59|     13|      return nullptr;
   60|     13|    }
   61|  12.5k|    return reinterpret_cast<int32_t *>(
   62|  12.5k|        portable_attribute()->GetAddress(AttributeValueIndex(0)));
   63|  12.5k|  }

_ZN5draco32SequentialNormalAttributeDecoderC2Ev:
   21|    936|SequentialNormalAttributeDecoder::SequentialNormalAttributeDecoder() {}
_ZN5draco32SequentialNormalAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   24|    936|                                            int attribute_id) {
   25|    936|  if (!SequentialIntegerAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (25:7): [True: 0, False: 936]
  ------------------
   26|      0|    return false;
   27|      0|  }
   28|       |  // Currently, this encoder works only for 3-component normal vectors.
   29|    936|  if (attribute()->num_components() != 3) {
  ------------------
  |  Branch (29:7): [True: 0, False: 936]
  ------------------
   30|      0|    return false;
   31|      0|  }
   32|       |  // Also the data type must be DT_FLOAT32.
   33|    936|  if (attribute()->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (33:7): [True: 0, False: 936]
  ------------------
   34|      0|    return false;
   35|      0|  }
   36|    936|  return true;
   37|    936|}
_ZN5draco32SequentialNormalAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   40|    854|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   41|    854|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   42|    854|  if (decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    854|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (42:7): [True: 0, False: 854]
  ------------------
   43|       |    // Note: in older bitstreams, we do not have a PortableAttribute() decoded
   44|       |    // at this stage so we cannot pass it down to the DecodeParameters() call.
   45|       |    // It still works fine for octahedral transform because it does not need to
   46|       |    // use any data from the attribute.
   47|      0|    if (!octahedral_transform_.DecodeParameters(*attribute(), in_buffer)) {
  ------------------
  |  Branch (47:9): [True: 0, False: 0]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|      0|  }
   51|    854|#endif
   52|    854|  return SequentialIntegerAttributeDecoder::DecodeIntegerValues(point_ids,
   53|    854|                                                                in_buffer);
   54|    854|}
_ZN5draco32SequentialNormalAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   57|    747|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   58|    747|  if (decoder()->bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    747|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (58:7): [True: 747, False: 0]
  ------------------
   59|       |    // For newer file version, decode attribute transform data here.
   60|    747|    if (!octahedral_transform_.DecodeParameters(*GetPortableAttribute(),
  ------------------
  |  Branch (60:9): [True: 486, False: 261]
  ------------------
   61|    747|                                                in_buffer)) {
   62|    486|      return false;
   63|    486|    }
   64|    747|  }
   65|       |
   66|       |  // Store the decoded transform data in portable attribute.
   67|    261|  return octahedral_transform_.TransferToAttribute(portable_attribute());
   68|    747|}
_ZN5draco32SequentialNormalAttributeDecoder11StoreValuesEj:
   70|    217|bool SequentialNormalAttributeDecoder::StoreValues(uint32_t num_points) {
   71|       |  // Convert all quantized values back to floats.
   72|    217|  return octahedral_transform_.InverseTransformAttribute(
   73|    217|      *GetPortableAttribute(), attribute());
   74|    217|}

_ZNK5draco32SequentialNormalAttributeDecoder21GetNumValueComponentsEv:
   35|    854|  int32_t GetNumValueComponents() const override {
   36|    854|    return 2;  // We quantize everything into two components.
   37|    854|  }
_ZN5draco32SequentialNormalAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   51|    860|      PredictionSchemeTransformType transform_type) override {
   52|    860|    switch (transform_type) {
   53|      0|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   54|    432|      case PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON: {
  ------------------
  |  Branch (54:7): [True: 432, False: 428]
  ------------------
   55|    432|        typedef PredictionSchemeNormalOctahedronDecodingTransform<int32_t>
   56|    432|            Transform;
   57|       |        // At this point the decoder has not read the quantization bits,
   58|       |        // which is why we must construct the transform by default.
   59|       |        // See Transform.DecodeTransformData for more details.
   60|    432|        return CreatePredictionSchemeForDecoder<int32_t, Transform>(
   61|    432|            method, attribute_id(), decoder());
   62|      0|      }
   63|      0|#endif
   64|    412|      case PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON_CANONICALIZED: {
  ------------------
  |  Branch (64:7): [True: 412, False: 448]
  ------------------
   65|    412|        typedef PredictionSchemeNormalOctahedronCanonicalizedDecodingTransform<
   66|    412|            int32_t>
   67|    412|            Transform;
   68|       |        // At this point the decoder has not read the quantization bits,
   69|       |        // which is why we must construct the transform by default.
   70|       |        // See Transform.DecodeTransformData for more details.
   71|    412|        return CreatePredictionSchemeForDecoder<int32_t, Transform>(
   72|    412|            method, attribute_id(), decoder());
   73|      0|      }
   74|     16|      default:
  ------------------
  |  Branch (74:7): [True: 16, False: 844]
  ------------------
   75|     16|        return nullptr;  // Currently, we support only octahedron transform and
   76|       |                         // octahedron transform canonicalized.
   77|    860|    }
   78|    860|  }

_ZN5draco38SequentialQuantizationAttributeDecoderC2Ev:
   22|    381|    SequentialQuantizationAttributeDecoder() {}
_ZN5draco38SequentialQuantizationAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   25|    381|                                                  int attribute_id) {
   26|    381|  if (!SequentialIntegerAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (26:7): [True: 0, False: 381]
  ------------------
   27|      0|    return false;
   28|      0|  }
   29|    381|  const PointAttribute *const attribute =
   30|    381|      decoder->point_cloud()->attribute(attribute_id);
   31|       |  // Currently we can quantize only floating point arguments.
   32|    381|  if (attribute->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (32:7): [True: 3, False: 378]
  ------------------
   33|      3|    return false;
   34|      3|  }
   35|    378|  return true;
   36|    381|}
_ZN5draco38SequentialQuantizationAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   39|    327|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   40|    327|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   41|    327|  if (decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0) &&
  ------------------
  |  |  115|    654|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (41:7): [True: 4, False: 323]
  ------------------
   42|      4|      !DecodeQuantizedDataInfo()) {
  ------------------
  |  Branch (42:7): [True: 1, False: 3]
  ------------------
   43|      1|    return false;
   44|      1|  }
   45|    326|#endif
   46|    326|  return SequentialIntegerAttributeDecoder::DecodeIntegerValues(point_ids,
   47|    326|                                                                in_buffer);
   48|    327|}
_ZN5draco38SequentialQuantizationAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   52|    272|        const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   53|    272|  if (decoder()->bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    272|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (53:7): [True: 272, False: 0]
  ------------------
   54|       |    // Decode quantization data here only for files with bitstream version 2.0+
   55|    272|    if (!DecodeQuantizedDataInfo()) {
  ------------------
  |  Branch (55:9): [True: 163, False: 109]
  ------------------
   56|    163|      return false;
   57|    163|    }
   58|    272|  }
   59|       |
   60|       |  // Store the decoded transform data in portable attribute;
   61|    109|  return quantization_transform_.TransferToAttribute(portable_attribute());
   62|    272|}
_ZN5draco38SequentialQuantizationAttributeDecoder11StoreValuesEj:
   64|    106|bool SequentialQuantizationAttributeDecoder::StoreValues(uint32_t num_points) {
   65|    106|  return DequantizeValues(num_points);
   66|    106|}
_ZN5draco38SequentialQuantizationAttributeDecoder23DecodeQuantizedDataInfoEv:
   68|    276|bool SequentialQuantizationAttributeDecoder::DecodeQuantizedDataInfo() {
   69|       |  // Get attribute used as source for decoding.
   70|    276|  auto att = GetPortableAttribute();
   71|    276|  if (att == nullptr) {
  ------------------
  |  Branch (71:7): [True: 4, False: 272]
  ------------------
   72|       |    // This should happen only in the backward compatibility mode. It will still
   73|       |    // work fine for this case because the only thing the quantization transform
   74|       |    // cares about is the number of components that is the same for both source
   75|       |    // and target attributes.
   76|      4|    att = attribute();
   77|      4|  }
   78|    276|  return quantization_transform_.DecodeParameters(*att, decoder()->buffer());
   79|    276|}
_ZN5draco38SequentialQuantizationAttributeDecoder16DequantizeValuesEj:
   82|    106|    uint32_t num_values) {
   83|       |  // Convert all quantized values back to floats.
   84|    106|  return quantization_transform_.InverseTransformAttribute(
   85|    106|      *GetPortableAttribute(), attribute());
   86|    106|}

_ZN5draco14RAnsBitDecoderC2Ev:
   23|  16.5k|RAnsBitDecoder::RAnsBitDecoder() : prob_zero_(0) {}
_ZN5draco14RAnsBitDecoderD2Ev:
   25|  16.5k|RAnsBitDecoder::~RAnsBitDecoder() { Clear(); }
_ZN5draco14RAnsBitDecoder13StartDecodingEPNS_13DecoderBufferE:
   27|  14.8k|bool RAnsBitDecoder::StartDecoding(DecoderBuffer *source_buffer) {
   28|  14.8k|  Clear();
   29|       |
   30|  14.8k|  if (!source_buffer->Decode(&prob_zero_)) {
  ------------------
  |  Branch (30:7): [True: 10, False: 14.7k]
  ------------------
   31|     10|    return false;
   32|     10|  }
   33|       |
   34|  14.7k|  uint32_t size_in_bytes;
   35|  14.7k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  14.7k|  if (source_buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  14.7k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (36:7): [True: 1.50k, False: 13.2k]
  ------------------
   37|  1.50k|    if (!source_buffer->Decode(&size_in_bytes)) {
  ------------------
  |  Branch (37:9): [True: 10, False: 1.49k]
  ------------------
   38|     10|      return false;
   39|     10|    }
   40|       |
   41|  1.50k|  } else
   42|  13.2k|#endif
   43|  13.2k|  {
   44|  13.2k|    if (!DecodeVarint(&size_in_bytes, source_buffer)) {
  ------------------
  |  Branch (44:9): [True: 9, False: 13.2k]
  ------------------
   45|      9|      return false;
   46|      9|    }
   47|  13.2k|  }
   48|       |
   49|  14.7k|  if (size_in_bytes > source_buffer->remaining_size()) {
  ------------------
  |  Branch (49:7): [True: 63, False: 14.7k]
  ------------------
   50|     63|    return false;
   51|     63|  }
   52|       |
   53|  14.7k|  if (ans_read_init(&ans_decoder_,
  ------------------
  |  Branch (53:7): [True: 35, False: 14.6k]
  ------------------
   54|  14.7k|                    reinterpret_cast<uint8_t *>(
   55|  14.7k|                        const_cast<char *>(source_buffer->data_head())),
   56|  14.7k|                    size_in_bytes) != 0) {
   57|     35|    return false;
   58|     35|  }
   59|  14.6k|  source_buffer->Advance(size_in_bytes);
   60|  14.6k|  return true;
   61|  14.7k|}
_ZN5draco14RAnsBitDecoder13DecodeNextBitEv:
   63|  10.4G|bool RAnsBitDecoder::DecodeNextBit() {
   64|  10.4G|  const uint8_t bit = rabs_read(&ans_decoder_, prob_zero_);
  ------------------
  |  |  246|  10.4G|#define rabs_read rabs_desc_read
  ------------------
   65|  10.4G|  return bit > 0;
   66|  10.4G|}
_ZN5draco14RAnsBitDecoder5ClearEv:
   80|  31.3k|void RAnsBitDecoder::Clear() { ans_read_end(&ans_decoder_); }

_ZN5draco14RAnsBitDecoder11EndDecodingEv:
   44|  5.75k|  void EndDecoding() {}

_ZN5draco12DracoOptionsINS_17GeometryAttribute4TypeEE16SetAttributeBoolERKS2_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
  206|  6.55k|                                                   bool val) {
  207|  6.55k|  GetAttributeOptions(att_key)->SetBool(name, val);
  208|  6.55k|}
_ZN5draco12DracoOptionsINS_17GeometryAttribute4TypeEE19GetAttributeOptionsERKS2_:
  147|  6.55k|    const AttributeKeyT &att_key) {
  148|  6.55k|  auto it = attribute_options_.find(att_key);
  149|  6.55k|  if (it != attribute_options_.end()) {
  ------------------
  |  Branch (149:7): [True: 0, False: 6.55k]
  ------------------
  150|      0|    return &it->second;
  151|      0|  }
  152|  6.55k|  Options new_options;
  153|  6.55k|  it = attribute_options_.insert(std::make_pair(att_key, new_options)).first;
  154|  6.55k|  return &it->second;
  155|  6.55k|}
_ZNK5draco12DracoOptionsINS_17GeometryAttribute4TypeEE16GetAttributeBoolERKS2_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
  195|  3.95k|                                                   bool default_val) const {
  196|  3.95k|  const Options *const att_options = FindAttributeOptions(att_key);
  197|  3.95k|  if (att_options && att_options->IsOptionSet(name)) {
  ------------------
  |  Branch (197:7): [True: 714, False: 3.24k]
  |  Branch (197:22): [True: 714, False: 0]
  ------------------
  198|    714|    return att_options->GetBool(name, default_val);
  199|    714|  }
  200|  3.24k|  return global_options_.GetBool(name, default_val);
  201|  3.95k|}
_ZNK5draco12DracoOptionsINS_17GeometryAttribute4TypeEE20FindAttributeOptionsERKS2_:
  137|  3.95k|    const AttributeKeyT &att_key) const {
  138|  3.95k|  auto it = attribute_options_.find(att_key);
  139|  3.95k|  if (it == attribute_options_.end()) {
  ------------------
  |  Branch (139:7): [True: 3.24k, False: 714]
  ------------------
  140|  3.24k|    return nullptr;
  141|  3.24k|  }
  142|    714|  return &it->second;
  143|  3.95k|}

_ZN5draco17CreateMeshDecoderEh:
   45|  6.55k|StatusOr<std::unique_ptr<MeshDecoder>> CreateMeshDecoder(uint8_t method) {
   46|  6.55k|  if (method == MESH_SEQUENTIAL_ENCODING) {
  ------------------
  |  Branch (46:7): [True: 1.55k, False: 4.99k]
  ------------------
   47|  1.55k|    return std::unique_ptr<MeshDecoder>(new MeshSequentialDecoder());
   48|  4.99k|  } else if (method == MESH_EDGEBREAKER_ENCODING) {
  ------------------
  |  Branch (48:14): [True: 4.99k, False: 0]
  ------------------
   49|  4.99k|    return std::unique_ptr<MeshDecoder>(new MeshEdgebreakerDecoder());
   50|  4.99k|  }
   51|      0|  return Status(Status::DRACO_ERROR, "Unsupported encoding method.");
   52|  6.55k|}
_ZN5draco7Decoder20DecodeMeshFromBufferEPNS_13DecoderBufferE:
   87|  6.55k|    DecoderBuffer *in_buffer) {
   88|  6.55k|  std::unique_ptr<Mesh> mesh(new Mesh());
   89|  6.55k|  DRACO_RETURN_IF_ERROR(DecodeBufferToGeometry(in_buffer, mesh.get()))
  ------------------
  |  |   74|  6.55k|  {                                                   \
  |  |   75|  6.55k|    const draco::Status _local_status = (expression); \
  |  |   76|  6.55k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 6.00k, False: 554]
  |  |  ------------------
  |  |   77|  6.00k|      return _local_status;                           \
  |  |   78|  6.00k|    }                                                 \
  |  |   79|  6.55k|  }
  ------------------
   90|    554|  return std::move(mesh);
   91|  6.55k|}
_ZN5draco7Decoder22DecodeBufferToGeometryEPNS_13DecoderBufferEPNS_4MeshE:
  113|  6.55k|                                       Mesh *out_geometry) {
  114|  6.55k|#ifdef DRACO_MESH_COMPRESSION_SUPPORTED
  115|  6.55k|  DecoderBuffer temp_buffer(*in_buffer);
  116|  6.55k|  DracoHeader header;
  117|  6.55k|  DRACO_RETURN_IF_ERROR(PointCloudDecoder::DecodeHeader(&temp_buffer, &header))
  ------------------
  |  |   74|  6.55k|  {                                                   \
  |  |   75|  6.55k|    const draco::Status _local_status = (expression); \
  |  |   76|  6.55k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 6, False: 6.55k]
  |  |  ------------------
  |  |   77|      6|      return _local_status;                           \
  |  |   78|      6|    }                                                 \
  |  |   79|  6.55k|  }
  ------------------
  118|  6.55k|  if (header.encoder_type != TRIANGULAR_MESH) {
  ------------------
  |  Branch (118:7): [True: 0, False: 6.55k]
  ------------------
  119|      0|    return Status(Status::DRACO_ERROR, "Input is not a mesh.");
  120|      0|  }
  121|  13.1k|  DRACO_ASSIGN_OR_RETURN(std::unique_ptr<MeshDecoder> decoder,
  ------------------
  |  |   66|  6.55k|  DRACO_ASSIGN_OR_RETURN_IMPL_(DRACO_MACROS_IMPL_CONCAT_(_statusor, __LINE__), \
  |  |  ------------------
  |  |  |  |   71|  6.55k|  auto statusor = (expression);                                             \
  |  |  |  |   72|  6.55k|  if (!statusor.ok()) {                                                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (72:7): [True: 0, False: 6.55k]
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    auto _status = std::move(statusor.status());                            \
  |  |  |  |   74|      0|    (void)_status; /* error_expression may not use it */                    \
  |  |  |  |   75|      0|    return error_expr;                                                      \
  |  |  |  |   76|      0|  }                                                                         \
  |  |  |  |   77|  6.55k|  lhs = std::move(statusor).value();
  |  |  ------------------
  |  |   67|  6.55k|                               lhs, expression, _status)
  ------------------
  122|  13.1k|                         CreateMeshDecoder(header.encoder_method))
  123|       |
  124|  13.1k|  DRACO_RETURN_IF_ERROR(decoder->Decode(options_, in_buffer, out_geometry))
  ------------------
  |  |   74|  6.55k|  {                                                   \
  |  |   75|  6.55k|    const draco::Status _local_status = (expression); \
  |  |   76|  6.55k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 5.99k, False: 554]
  |  |  ------------------
  |  |   77|  5.99k|      return _local_status;                           \
  |  |   78|  5.99k|    }                                                 \
  |  |   79|  6.55k|  }
  ------------------
  125|    554|  return OkStatus();
  126|       |#else
  127|       |  return Status(Status::DRACO_ERROR, "Unsupported geometry type.");
  128|       |#endif
  129|  13.1k|}
_ZN5draco7Decoder25SetSkipAttributeTransformENS_17GeometryAttribute4TypeE:
  131|  6.55k|void Decoder::SetSkipAttributeTransform(GeometryAttribute::Type att_type) {
  132|  6.55k|  options_.SetAttributeBool(att_type, "skip_attribute_transform", true);
  133|  6.55k|}

_ZN5draco10AnsDecoderC2Ev:
   56|  20.4k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  14.7k|                                const uint8_t *const buf, int offset) {
  301|  14.7k|  unsigned x;
  302|  14.7k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 25, False: 14.6k]
  ------------------
  303|     25|    return 1;
  304|     25|  }
  305|  14.6k|  ans->buf = buf;
  306|  14.6k|  x = buf[offset - 1] >> 6;
  307|  14.6k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 12.8k, False: 1.88k]
  ------------------
  308|  12.8k|    ans->buf_offset = offset - 1;
  309|  12.8k|    ans->state = buf[offset - 1] & 0x3F;
  310|  12.8k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 1.57k, False: 314]
  ------------------
  311|  1.57k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 3, False: 1.56k]
  ------------------
  312|      3|      return 1;
  313|      3|    }
  314|  1.56k|    ans->buf_offset = offset - 2;
  315|  1.56k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  1.56k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 308, False: 6]
  ------------------
  317|    308|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 0, False: 308]
  ------------------
  318|      0|      return 1;
  319|      0|    }
  320|    308|    ans->buf_offset = offset - 3;
  321|    308|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    308|  } else {
  323|      6|    return 1;
  324|      6|  }
  325|  14.6k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  14.6k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  14.6k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  14.6k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  14.6k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 1, False: 14.6k]
  ------------------
  327|      1|    return 1;
  328|      1|  }
  329|  14.6k|  return 0;
  330|  14.6k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  1.56k|static uint32_t mem_get_le16(const void *vmem) {
   68|  1.56k|  uint32_t val;
   69|  1.56k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  1.56k|  val = mem[1] << 8;
   72|  1.56k|  val |= mem[0];
   73|  1.56k|  return val;
   74|  1.56k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    308|static uint32_t mem_get_le24(const void *vmem) {
   77|    308|  uint32_t val;
   78|    308|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    308|  val = mem[2] << 16;
   81|    308|  val |= mem[1] << 8;
   82|    308|  val |= mem[0];
   83|    308|  return val;
   84|    308|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  10.4G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  10.4G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  10.4G|  unsigned quot, rem, x, xn;
  172|  10.4G|#endif
  173|  10.4G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  10.4G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  10.4G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  20.9G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 8.76G, False: 1.71G]
  |  Branch (174:40): [True: 197k, False: 8.76G]
  ------------------
  175|   197k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   197k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   197k|  }
  177|       |#if DRACO_ANS_IMPL1
  178|       |  val = ans->state % DRACO_ANS_P8_PRECISION < p;
  179|       |  l_s = val ? p : p0;
  180|       |  ans->state = (ans->state / DRACO_ANS_P8_PRECISION) * l_s +
  181|       |               ans->state % DRACO_ANS_P8_PRECISION - (!val * p);
  182|       |#else
  183|  10.4G|  x = ans->state;
  184|  10.4G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  10.4G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  10.4G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  10.4G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  10.4G|  xn = quot * p;
  187|  10.4G|  val = rem < p;
  188|  10.4G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  20.9G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 8.80G, False: 1.68G]
  |  |  ------------------
  ------------------
  189|  8.80G|    ans->state = xn + rem;
  190|  8.80G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  1.68G|    ans->state = x - xn - p;
  193|  1.68G|  }
  194|  10.4G|#endif
  195|  10.4G|  return val;
  196|  10.4G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  31.3k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  31.3k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  31.3k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  31.3k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  2.20k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|  1.26k|                                       uint32_t num_symbols) {
  482|  1.26k|    lut_table_.resize(rans_precision);
  483|  1.26k|    probability_table_.resize(num_symbols);
  484|  1.26k|    uint32_t cum_prob = 0;
  485|  1.26k|    uint32_t act_prob = 0;
  486|  12.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 11.2k, False: 1.14k]
  ------------------
  487|  11.2k|      probability_table_[i].prob = token_probs[i];
  488|  11.2k|      probability_table_[i].cum_prob = cum_prob;
  489|  11.2k|      cum_prob += token_probs[i];
  490|  11.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 115, False: 11.0k]
  ------------------
  491|    115|        return false;
  492|    115|      }
  493|  4.04M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 4.03M, False: 11.0k]
  ------------------
  494|  4.03M|        lut_table_[j] = i;
  495|  4.03M|      }
  496|  11.0k|      act_prob = cum_prob;
  497|  11.0k|    }
  498|  1.14k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 195, False: 952]
  ------------------
  499|    195|      return false;
  500|    195|    }
  501|    952|    return true;
  502|  1.14k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|    839|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    839|    unsigned x;
  423|    839|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 55, False: 784]
  ------------------
  424|     55|      return 1;
  425|     55|    }
  426|    784|    ans_.buf = buf;
  427|    784|    x = buf[offset - 1] >> 6;
  428|    784|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 441, False: 343]
  ------------------
  429|    441|      ans_.buf_offset = offset - 1;
  430|    441|      ans_.state = buf[offset - 1] & 0x3F;
  431|    441|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 173, False: 170]
  ------------------
  432|    173|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 5, False: 168]
  ------------------
  433|      5|        return 1;
  434|      5|      }
  435|    168|      ans_.buf_offset = offset - 2;
  436|    168|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    170|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 129, False: 41]
  ------------------
  438|    129|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 18, False: 111]
  ------------------
  439|     18|        return 1;
  440|     18|      }
  441|    111|      ans_.buf_offset = offset - 3;
  442|    111|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    111|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 41, False: 0]
  ------------------
  444|     41|      ans_.buf_offset = offset - 4;
  445|     41|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     41|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    761|    ans_.state += l_rans_base;
  450|    761|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    761|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 40, False: 721]
  ------------------
  451|     40|      return 1;
  452|     40|    }
  453|    721|    return 0;
  454|    761|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    238|static uint32_t mem_get_le16(const void *vmem) {
   68|    238|  uint32_t val;
   69|    238|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    238|  val = mem[1] << 8;
   72|    238|  val |= mem[0];
   73|    238|  return val;
   74|    238|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    167|static uint32_t mem_get_le24(const void *vmem) {
   77|    167|  uint32_t val;
   78|    167|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    167|  val = mem[2] << 16;
   81|    167|  val |= mem[1] << 8;
   82|    167|  val |= mem[0];
   83|    167|  return val;
   84|    167|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    213|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    213|  uint32_t val;
   88|    213|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    213|  val = mem[3] << 24;
   91|    213|  val |= mem[2] << 16;
   92|    213|  val |= mem[1] << 8;
   93|    213|  val |= mem[0];
   94|    213|  return val;
   95|    213|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|  54.2M|  inline int rans_read() {
  463|  54.2M|    unsigned rem;
  464|  54.2M|    unsigned quo;
  465|  54.2M|    struct rans_dec_sym sym;
  466|  54.2M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 43.0M, False: 11.2M]
  |  Branch (466:40): [True: 28.6k, False: 43.0M]
  ------------------
  467|  28.6k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  28.6k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  28.6k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  54.2M|    quo = ans_.state / rans_precision;
  472|  54.2M|    rem = ans_.state % rans_precision;
  473|  54.2M|    fetch_sym(&sym, rem);
  474|  54.2M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  54.2M|    return sym.val;
  476|  54.2M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|  54.2M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  54.2M|    uint32_t symbol = lut_table_[rem];
  507|  54.2M|    out->val = symbol;
  508|  54.2M|    out->prob = probability_table_[symbol].prob;
  509|  54.2M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  54.2M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|    684|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    221|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|    166|                                       uint32_t num_symbols) {
  482|    166|    lut_table_.resize(rans_precision);
  483|    166|    probability_table_.resize(num_symbols);
  484|    166|    uint32_t cum_prob = 0;
  485|    166|    uint32_t act_prob = 0;
  486|  3.04k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 2.89k, False: 148]
  ------------------
  487|  2.89k|      probability_table_[i].prob = token_probs[i];
  488|  2.89k|      probability_table_[i].cum_prob = cum_prob;
  489|  2.89k|      cum_prob += token_probs[i];
  490|  2.89k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 18, False: 2.87k]
  ------------------
  491|     18|        return false;
  492|     18|      }
  493|  1.22M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.22M, False: 2.87k]
  ------------------
  494|  1.22M|        lut_table_[j] = i;
  495|  1.22M|      }
  496|  2.87k|      act_prob = cum_prob;
  497|  2.87k|    }
  498|    148|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 5, False: 143]
  ------------------
  499|      5|      return false;
  500|      5|    }
  501|    143|    return true;
  502|    148|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    116|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    116|    unsigned x;
  423|    116|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 116]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|    116|    ans_.buf = buf;
  427|    116|    x = buf[offset - 1] >> 6;
  428|    116|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 86, False: 30]
  ------------------
  429|     86|      ans_.buf_offset = offset - 1;
  430|     86|      ans_.state = buf[offset - 1] & 0x3F;
  431|     86|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 15, False: 15]
  ------------------
  432|     15|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 3, False: 12]
  ------------------
  433|      3|        return 1;
  434|      3|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     15|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 7, False: 8]
  ------------------
  438|      7|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 1, False: 6]
  ------------------
  439|      1|        return 1;
  440|      1|      }
  441|      6|      ans_.buf_offset = offset - 3;
  442|      6|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      8|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 8, False: 0]
  ------------------
  444|      8|      ans_.buf_offset = offset - 4;
  445|      8|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      8|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    112|    ans_.state += l_rans_base;
  450|    112|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    112|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 4, False: 108]
  ------------------
  451|      4|      return 1;
  452|      4|    }
  453|    108|    return 0;
  454|    112|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  462|  10.0M|  inline int rans_read() {
  463|  10.0M|    unsigned rem;
  464|  10.0M|    unsigned quo;
  465|  10.0M|    struct rans_dec_sym sym;
  466|  10.0M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 10.0M, False: 14.5k]
  |  Branch (466:40): [True: 4.14k, False: 10.0M]
  ------------------
  467|  4.14k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.14k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  4.14k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  10.0M|    quo = ans_.state / rans_precision;
  472|  10.0M|    rem = ans_.state % rans_precision;
  473|  10.0M|    fetch_sym(&sym, rem);
  474|  10.0M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  10.0M|    return sym.val;
  476|  10.0M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  505|  10.0M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  10.0M|    uint32_t symbol = lut_table_[rem];
  507|  10.0M|    out->val = symbol;
  508|  10.0M|    out->prob = probability_table_[symbol].prob;
  509|  10.0M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  10.0M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  456|    108|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    162|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|    119|                                       uint32_t num_symbols) {
  482|    119|    lut_table_.resize(rans_precision);
  483|    119|    probability_table_.resize(num_symbols);
  484|    119|    uint32_t cum_prob = 0;
  485|    119|    uint32_t act_prob = 0;
  486|  5.64k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 5.53k, False: 110]
  ------------------
  487|  5.53k|      probability_table_[i].prob = token_probs[i];
  488|  5.53k|      probability_table_[i].cum_prob = cum_prob;
  489|  5.53k|      cum_prob += token_probs[i];
  490|  5.53k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 9, False: 5.52k]
  ------------------
  491|      9|        return false;
  492|      9|      }
  493|  3.45M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 3.44M, False: 5.52k]
  ------------------
  494|  3.44M|        lut_table_[j] = i;
  495|  3.44M|      }
  496|  5.52k|      act_prob = cum_prob;
  497|  5.52k|    }
  498|    110|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 12, False: 98]
  ------------------
  499|     12|      return false;
  500|     12|    }
  501|     98|    return true;
  502|    110|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|     46|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     46|    unsigned x;
  423|     46|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 41]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|     41|    ans_.buf = buf;
  427|     41|    x = buf[offset - 1] >> 6;
  428|     41|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 9, False: 32]
  ------------------
  429|      9|      ans_.buf_offset = offset - 1;
  430|      9|      ans_.state = buf[offset - 1] & 0x3F;
  431|     32|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 7, False: 25]
  ------------------
  432|      7|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 1, False: 6]
  ------------------
  433|      1|        return 1;
  434|      1|      }
  435|      6|      ans_.buf_offset = offset - 2;
  436|      6|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     25|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 11, False: 14]
  ------------------
  438|     11|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 1, False: 10]
  ------------------
  439|      1|        return 1;
  440|      1|      }
  441|     10|      ans_.buf_offset = offset - 3;
  442|     10|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     14|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 14, False: 0]
  ------------------
  444|     14|      ans_.buf_offset = offset - 4;
  445|     14|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     14|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     39|    ans_.state += l_rans_base;
  450|     39|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     39|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 29]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     29|    return 0;
  454|     39|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|   308k|  inline int rans_read() {
  463|   308k|    unsigned rem;
  464|   308k|    unsigned quo;
  465|   308k|    struct rans_dec_sym sym;
  466|   309k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 30.4k, False: 278k]
  |  Branch (466:40): [True: 539, False: 29.8k]
  ------------------
  467|    539|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    539|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    539|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   308k|    quo = ans_.state / rans_precision;
  472|   308k|    rem = ans_.state % rans_precision;
  473|   308k|    fetch_sym(&sym, rem);
  474|   308k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   308k|    return sym.val;
  476|   308k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|   308k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   308k|    uint32_t symbol = lut_table_[rem];
  507|   308k|    out->val = symbol;
  508|   308k|    out->prob = probability_table_[symbol].prob;
  509|   308k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   308k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|     29|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    156|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|     99|                                       uint32_t num_symbols) {
  482|     99|    lut_table_.resize(rans_precision);
  483|     99|    probability_table_.resize(num_symbols);
  484|     99|    uint32_t cum_prob = 0;
  485|     99|    uint32_t act_prob = 0;
  486|  10.5k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 10.5k, False: 80]
  ------------------
  487|  10.5k|      probability_table_[i].prob = token_probs[i];
  488|  10.5k|      probability_table_[i].cum_prob = cum_prob;
  489|  10.5k|      cum_prob += token_probs[i];
  490|  10.5k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 19, False: 10.4k]
  ------------------
  491|     19|        return false;
  492|     19|      }
  493|  5.31M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 5.30M, False: 10.4k]
  ------------------
  494|  5.30M|        lut_table_[j] = i;
  495|  5.30M|      }
  496|  10.4k|      act_prob = cum_prob;
  497|  10.4k|    }
  498|     80|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 8, False: 72]
  ------------------
  499|      8|      return false;
  500|      8|    }
  501|     72|    return true;
  502|     80|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     56|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     56|    unsigned x;
  423|     56|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 56]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     56|    ans_.buf = buf;
  427|     56|    x = buf[offset - 1] >> 6;
  428|     56|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 17, False: 39]
  ------------------
  429|     17|      ans_.buf_offset = offset - 1;
  430|     17|      ans_.state = buf[offset - 1] & 0x3F;
  431|     39|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 10, False: 29]
  ------------------
  432|     10|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 8]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|      8|      ans_.buf_offset = offset - 2;
  436|      8|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     29|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 11, False: 18]
  ------------------
  438|     11|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 11]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|     11|      ans_.buf_offset = offset - 3;
  442|     11|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     18|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 18, False: 0]
  ------------------
  444|     18|      ans_.buf_offset = offset - 4;
  445|     18|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     18|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     54|    ans_.state += l_rans_base;
  450|     54|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     54|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 12, False: 42]
  ------------------
  451|     12|      return 1;
  452|     12|    }
  453|     42|    return 0;
  454|     54|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|   215k|  inline int rans_read() {
  463|   215k|    unsigned rem;
  464|   215k|    unsigned quo;
  465|   215k|    struct rans_dec_sym sym;
  466|   217k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 74.9k, False: 142k]
  |  Branch (466:40): [True: 1.60k, False: 73.3k]
  ------------------
  467|  1.60k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.60k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.60k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   215k|    quo = ans_.state / rans_precision;
  472|   215k|    rem = ans_.state % rans_precision;
  473|   215k|    fetch_sym(&sym, rem);
  474|   215k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   215k|    return sym.val;
  476|   215k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|   215k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   215k|    uint32_t symbol = lut_table_[rem];
  507|   215k|    out->val = symbol;
  508|   215k|    out->prob = probability_table_[symbol].prob;
  509|   215k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   215k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|     42|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    163|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|    105|                                       uint32_t num_symbols) {
  482|    105|    lut_table_.resize(rans_precision);
  483|    105|    probability_table_.resize(num_symbols);
  484|    105|    uint32_t cum_prob = 0;
  485|    105|    uint32_t act_prob = 0;
  486|  3.21k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 3.11k, False: 99]
  ------------------
  487|  3.11k|      probability_table_[i].prob = token_probs[i];
  488|  3.11k|      probability_table_[i].cum_prob = cum_prob;
  489|  3.11k|      cum_prob += token_probs[i];
  490|  3.11k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 6, False: 3.10k]
  ------------------
  491|      6|        return false;
  492|      6|      }
  493|  24.7M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 24.6M, False: 3.10k]
  ------------------
  494|  24.6M|        lut_table_[j] = i;
  495|  24.6M|      }
  496|  3.10k|      act_prob = cum_prob;
  497|  3.10k|    }
  498|     99|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 13, False: 86]
  ------------------
  499|     13|      return false;
  500|     13|    }
  501|     86|    return true;
  502|     99|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     40|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     40|    unsigned x;
  423|     40|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 40]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     40|    ans_.buf = buf;
  427|     40|    x = buf[offset - 1] >> 6;
  428|     40|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 13, False: 27]
  ------------------
  429|     13|      ans_.buf_offset = offset - 1;
  430|     13|      ans_.state = buf[offset - 1] & 0x3F;
  431|     27|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 10, False: 17]
  ------------------
  432|     10|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 10]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|     10|      ans_.buf_offset = offset - 2;
  436|     10|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     17|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 5, False: 12]
  ------------------
  438|      5|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 5]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      5|      ans_.buf_offset = offset - 3;
  442|      5|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     12|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 12, False: 0]
  ------------------
  444|     12|      ans_.buf_offset = offset - 4;
  445|     12|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     12|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     40|    ans_.state += l_rans_base;
  450|     40|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     40|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 30]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     30|    return 0;
  454|     40|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|  62.0k|  inline int rans_read() {
  463|  62.0k|    unsigned rem;
  464|  62.0k|    unsigned quo;
  465|  62.0k|    struct rans_dec_sym sym;
  466|  62.8k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 53.8k, False: 9.01k]
  |  Branch (466:40): [True: 763, False: 53.0k]
  ------------------
  467|    763|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    763|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    763|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  62.0k|    quo = ans_.state / rans_precision;
  472|  62.0k|    rem = ans_.state % rans_precision;
  473|  62.0k|    fetch_sym(&sym, rem);
  474|  62.0k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  62.0k|    return sym.val;
  476|  62.0k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|  62.0k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  62.0k|    uint32_t symbol = lut_table_[rem];
  507|  62.0k|    out->val = symbol;
  508|  62.0k|    out->prob = probability_table_[symbol].prob;
  509|  62.0k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  62.0k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|     30|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    169|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|    105|                                       uint32_t num_symbols) {
  482|    105|    lut_table_.resize(rans_precision);
  483|    105|    probability_table_.resize(num_symbols);
  484|    105|    uint32_t cum_prob = 0;
  485|    105|    uint32_t act_prob = 0;
  486|  16.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 16.8k, False: 97]
  ------------------
  487|  16.8k|      probability_table_[i].prob = token_probs[i];
  488|  16.8k|      probability_table_[i].cum_prob = cum_prob;
  489|  16.8k|      cum_prob += token_probs[i];
  490|  16.8k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 8, False: 16.8k]
  ------------------
  491|      8|        return false;
  492|      8|      }
  493|  48.1M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 48.1M, False: 16.8k]
  ------------------
  494|  48.1M|        lut_table_[j] = i;
  495|  48.1M|      }
  496|  16.8k|      act_prob = cum_prob;
  497|  16.8k|    }
  498|     97|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 13, False: 84]
  ------------------
  499|     13|      return false;
  500|     13|    }
  501|     84|    return true;
  502|     97|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|     55|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     55|    unsigned x;
  423|     55|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 55]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     55|    ans_.buf = buf;
  427|     55|    x = buf[offset - 1] >> 6;
  428|     55|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 12, False: 43]
  ------------------
  429|     12|      ans_.buf_offset = offset - 1;
  430|     12|      ans_.state = buf[offset - 1] & 0x3F;
  431|     43|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 3, False: 40]
  ------------------
  432|      3|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 1, False: 2]
  ------------------
  433|      1|        return 1;
  434|      1|      }
  435|      2|      ans_.buf_offset = offset - 2;
  436|      2|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     40|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 6, False: 34]
  ------------------
  438|      6|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 6]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      6|      ans_.buf_offset = offset - 3;
  442|      6|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     34|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 34, False: 0]
  ------------------
  444|     34|      ans_.buf_offset = offset - 4;
  445|     34|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     34|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     54|    ans_.state += l_rans_base;
  450|     54|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     54|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 8, False: 46]
  ------------------
  451|      8|      return 1;
  452|      8|    }
  453|     46|    return 0;
  454|     54|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|   101k|  inline int rans_read() {
  463|   101k|    unsigned rem;
  464|   101k|    unsigned quo;
  465|   101k|    struct rans_dec_sym sym;
  466|   102k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 84.2k, False: 18.6k]
  |  Branch (466:40): [True: 1.22k, False: 83.0k]
  ------------------
  467|  1.22k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.22k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.22k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   101k|    quo = ans_.state / rans_precision;
  472|   101k|    rem = ans_.state % rans_precision;
  473|   101k|    fetch_sym(&sym, rem);
  474|   101k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   101k|    return sym.val;
  476|   101k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|   101k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   101k|    uint32_t symbol = lut_table_[rem];
  507|   101k|    out->val = symbol;
  508|   101k|    out->prob = probability_table_[symbol].prob;
  509|   101k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   101k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|     46|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|    773|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|    471|                                       uint32_t num_symbols) {
  482|    471|    lut_table_.resize(rans_precision);
  483|    471|    probability_table_.resize(num_symbols);
  484|    471|    uint32_t cum_prob = 0;
  485|    471|    uint32_t act_prob = 0;
  486|  21.0k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 20.5k, False: 445]
  ------------------
  487|  20.5k|      probability_table_[i].prob = token_probs[i];
  488|  20.5k|      probability_table_[i].cum_prob = cum_prob;
  489|  20.5k|      cum_prob += token_probs[i];
  490|  20.5k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 26, False: 20.5k]
  ------------------
  491|     26|        return false;
  492|     26|      }
  493|   435M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 435M, False: 20.5k]
  ------------------
  494|   435M|        lut_table_[j] = i;
  495|   435M|      }
  496|  20.5k|      act_prob = cum_prob;
  497|  20.5k|    }
  498|    445|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 41, False: 404]
  ------------------
  499|     41|      return false;
  500|     41|    }
  501|    404|    return true;
  502|    445|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    202|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    202|    unsigned x;
  423|    202|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 202]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|    202|    ans_.buf = buf;
  427|    202|    x = buf[offset - 1] >> 6;
  428|    202|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 54, False: 148]
  ------------------
  429|     54|      ans_.buf_offset = offset - 1;
  430|     54|      ans_.state = buf[offset - 1] & 0x3F;
  431|    148|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 34, False: 114]
  ------------------
  432|     34|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 32]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     32|      ans_.buf_offset = offset - 2;
  436|     32|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    114|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 28, False: 86]
  ------------------
  438|     28|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 10, False: 18]
  ------------------
  439|     10|        return 1;
  440|     10|      }
  441|     18|      ans_.buf_offset = offset - 3;
  442|     18|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     86|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 86, False: 0]
  ------------------
  444|     86|      ans_.buf_offset = offset - 4;
  445|     86|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     86|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    190|    ans_.state += l_rans_base;
  450|    190|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    190|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 25, False: 165]
  ------------------
  451|     25|      return 1;
  452|     25|    }
  453|    165|    return 0;
  454|    190|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|   577k|  inline int rans_read() {
  463|   577k|    unsigned rem;
  464|   577k|    unsigned quo;
  465|   577k|    struct rans_dec_sym sym;
  466|   581k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 432k, False: 148k]
  |  Branch (466:40): [True: 4.05k, False: 428k]
  ------------------
  467|  4.05k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.05k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  4.05k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   577k|    quo = ans_.state / rans_precision;
  472|   577k|    rem = ans_.state % rans_precision;
  473|   577k|    fetch_sym(&sym, rem);
  474|   577k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   577k|    return sym.val;
  476|   577k|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|   577k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   577k|    uint32_t symbol = lut_table_[rem];
  507|   577k|    out->val = symbol;
  508|   577k|    out->prob = probability_table_[symbol].prob;
  509|   577k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   577k|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|    165|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|    650|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|    650|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    650|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 650]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    650|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    650|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    650|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 87, False: 563]
  ------------------
   67|     87|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 85]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     87|  } else
   72|    563|#endif
   73|    563|  {
   74|    563|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 552]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    563|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    637|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 70, False: 567]
  ------------------
   83|     70|    return false;
   84|     70|  }
   85|    567|  probability_table_.resize(num_symbols_);
   86|    567|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 135, False: 432]
  ------------------
   87|    135|    return true;
   88|    135|  }
   89|       |  // Decode the table.
   90|  1.49M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.49M, False: 272]
  ------------------
   91|  1.49M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.49M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 21, False: 1.49M]
  ------------------
   95|     21|      return false;
   96|     21|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.49M|    const int token = prob_data & 3;
  102|  1.49M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 27.3k, False: 1.47M]
  ------------------
  103|  27.3k|      const uint32_t offset = prob_data >> 2;
  104|  27.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 126, False: 27.2k]
  ------------------
  105|    126|        return false;
  106|    126|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.14M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.11M, False: 27.2k]
  ------------------
  109|  1.11M|        probability_table_[i + j] = 0;
  110|  1.11M|      }
  111|  27.2k|      i += offset;
  112|  1.47M|    } else {
  113|  1.47M|      const int extra_bytes = token;
  114|  1.47M|      uint32_t prob = prob_data >> 2;
  115|  1.53M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 61.6k, False: 1.47M]
  ------------------
  116|  61.6k|        uint8_t eb;
  117|  61.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 61.6k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  61.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  61.6k|      }
  124|  1.47M|      probability_table_[i] = prob;
  125|  1.47M|    }
  126|  1.49M|  }
  127|    272|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 83, False: 189]
  ------------------
  128|     83|    return false;
  129|     83|  }
  130|    189|  return true;
  131|    272|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    299|    DecoderBuffer *buffer) {
  136|    299|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    299|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    299|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    299|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 28, False: 271]
  ------------------
  140|     28|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 28]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     28|  } else
  145|    271|#endif
  146|    271|  {
  147|    271|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 269]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    271|  }
  151|    297|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 39, False: 258]
  ------------------
  152|     39|    return false;
  153|     39|  }
  154|    258|  const uint8_t *const data_head =
  155|    258|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    258|  buffer->Advance(bytes_encoded);
  158|    258|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 50, False: 208]
  ------------------
  159|     50|    return false;
  160|     50|  }
  161|    208|  return true;
  162|    258|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    233|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  14.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    171|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    171|  ans_.read_end();
  167|    171|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    385|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    385|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    385|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 385]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    385|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    385|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    385|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 46, False: 339]
  ------------------
   67|     46|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 44]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     46|  } else
   72|    339|#endif
   73|    339|  {
   74|    339|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 339]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    339|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    383|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 44, False: 339]
  ------------------
   83|     44|    return false;
   84|     44|  }
   85|    339|  probability_table_.resize(num_symbols_);
   86|    339|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 23, False: 316]
  ------------------
   87|     23|    return true;
   88|     23|  }
   89|       |  // Decode the table.
   90|  1.41M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.41M, False: 230]
  ------------------
   91|  1.41M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.41M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 19, False: 1.41M]
  ------------------
   95|     19|      return false;
   96|     19|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.41M|    const int token = prob_data & 3;
  102|  1.41M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 885k, False: 524k]
  ------------------
  103|   885k|      const uint32_t offset = prob_data >> 2;
  104|   885k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 49, False: 885k]
  ------------------
  105|     49|        return false;
  106|     49|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  47.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 46.7M, False: 885k]
  ------------------
  109|  46.7M|        probability_table_[i + j] = 0;
  110|  46.7M|      }
  111|   885k|      i += offset;
  112|   885k|    } else {
  113|   524k|      const int extra_bytes = token;
  114|   524k|      uint32_t prob = prob_data >> 2;
  115|   910k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 386k, False: 524k]
  ------------------
  116|   386k|        uint8_t eb;
  117|   386k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 386k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   386k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   386k|      }
  124|   524k|      probability_table_[i] = prob;
  125|   524k|    }
  126|  1.41M|  }
  127|    230|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 132, False: 98]
  ------------------
  128|    132|    return false;
  129|    132|  }
  130|     98|  return true;
  131|    230|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    121|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|     98|    DecoderBuffer *buffer) {
  136|     98|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     98|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     98|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     98|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 96]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|     96|#endif
  146|     96|  {
  147|     96|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 96]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     96|  }
  151|     98|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 9, False: 89]
  ------------------
  152|      9|    return false;
  153|      9|  }
  154|     89|  const uint8_t *const data_head =
  155|     89|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     89|  buffer->Advance(bytes_encoded);
  158|     89|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 6, False: 83]
  ------------------
  159|      6|    return false;
  160|      6|  }
  161|     83|  return true;
  162|     89|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  10.1M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|     83|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     83|  ans_.read_end();
  167|     83|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    246|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    246|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    246|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 246]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    246|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    246|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    246|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 37, False: 209]
  ------------------
   67|     37|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 37]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     37|  } else
   72|    209|#endif
   73|    209|  {
   74|    209|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 208]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    209|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    245|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 229]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    229|  probability_table_.resize(num_symbols_);
   86|    229|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 224]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   340k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 340k, False: 154]
  ------------------
   91|   340k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   340k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 30, False: 340k]
  ------------------
   95|     30|      return false;
   96|     30|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   340k|    const int token = prob_data & 3;
  102|   340k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 78.4k, False: 261k]
  ------------------
  103|  78.4k|      const uint32_t offset = prob_data >> 2;
  104|  78.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 78.4k]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.99M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.91M, False: 78.4k]
  ------------------
  109|  2.91M|        probability_table_[i + j] = 0;
  110|  2.91M|      }
  111|  78.4k|      i += offset;
  112|   261k|    } else {
  113|   261k|      const int extra_bytes = token;
  114|   261k|      uint32_t prob = prob_data >> 2;
  115|   509k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 247k, False: 261k]
  ------------------
  116|   247k|        uint8_t eb;
  117|   247k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 247k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   247k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   247k|      }
  124|   261k|      probability_table_[i] = prob;
  125|   261k|    }
  126|   340k|  }
  127|    154|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 25, False: 129]
  ------------------
  128|     25|    return false;
  129|     25|  }
  130|    129|  return true;
  131|    154|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    134|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    129|    DecoderBuffer *buffer) {
  136|    129|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    129|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    129|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    129|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 16, False: 113]
  ------------------
  140|     16|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 16]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     16|  } else
  145|    113|#endif
  146|    113|  {
  147|    113|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 110]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    113|  }
  151|    126|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 22, False: 104]
  ------------------
  152|     22|    return false;
  153|     22|  }
  154|    104|  const uint8_t *const data_head =
  155|    104|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 10, False: 94]
  ------------------
  159|     10|    return false;
  160|     10|  }
  161|     94|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.68M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|     94|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     94|  ans_.read_end();
  167|     94|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    247|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    247|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    247|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 247]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    247|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    247|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    247|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 49, False: 198]
  ------------------
   67|     49|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 49]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     49|  } else
   72|    198|#endif
   73|    198|  {
   74|    198|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 198]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    198|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    247|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 3, False: 244]
  ------------------
   83|      3|    return false;
   84|      3|  }
   85|    244|  probability_table_.resize(num_symbols_);
   86|    244|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 3, False: 241]
  ------------------
   87|      3|    return true;
   88|      3|  }
   89|       |  // Decode the table.
   90|  79.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 79.2k, False: 177]
  ------------------
   91|  79.2k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  79.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 18, False: 79.2k]
  ------------------
   95|     18|      return false;
   96|     18|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  79.2k|    const int token = prob_data & 3;
  102|  79.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 16.7k, False: 62.4k]
  ------------------
  103|  16.7k|      const uint32_t offset = prob_data >> 2;
  104|  16.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 40, False: 16.7k]
  ------------------
  105|     40|        return false;
  106|     40|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   746k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 729k, False: 16.7k]
  ------------------
  109|   729k|        probability_table_[i + j] = 0;
  110|   729k|      }
  111|  16.7k|      i += offset;
  112|  62.4k|    } else {
  113|  62.4k|      const int extra_bytes = token;
  114|  62.4k|      uint32_t prob = prob_data >> 2;
  115|   104k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 41.7k, False: 62.4k]
  ------------------
  116|  41.7k|        uint8_t eb;
  117|  41.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 6, False: 41.7k]
  ------------------
  118|      6|          return false;
  119|      6|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  41.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  41.7k|      }
  124|  62.4k|      probability_table_[i] = prob;
  125|  62.4k|    }
  126|  79.2k|  }
  127|    177|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 22, False: 155]
  ------------------
  128|     22|    return false;
  129|     22|  }
  130|    155|  return true;
  131|    177|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    158|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    155|    DecoderBuffer *buffer) {
  136|    155|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    155|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    155|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    155|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 40, False: 115]
  ------------------
  140|     40|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 40]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     40|  } else
  145|    115|#endif
  146|    115|  {
  147|    115|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 5, False: 110]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|    115|  }
  151|    150|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 57, False: 93]
  ------------------
  152|     57|    return false;
  153|     57|  }
  154|     93|  const uint8_t *const data_head =
  155|     93|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     93|  buffer->Advance(bytes_encoded);
  158|     93|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 89]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     89|  return true;
  162|     93|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  2.93M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|     89|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     89|  ans_.read_end();
  167|     89|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    196|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    196|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    196|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 196]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    196|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    196|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    196|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 11, False: 185]
  ------------------
   67|     11|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 11]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     11|  } else
   72|    185|#endif
   73|    185|  {
   74|    185|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 3, False: 182]
  ------------------
   75|      3|      return false;
   76|      3|    }
   77|    185|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    193|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 183]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    183|  probability_table_.resize(num_symbols_);
   86|    183|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 176]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|   603k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 603k, False: 138]
  ------------------
   91|   603k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   603k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 12, False: 603k]
  ------------------
   95|     12|      return false;
   96|     12|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   603k|    const int token = prob_data & 3;
  102|   603k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 595k, False: 8.57k]
  ------------------
  103|   595k|      const uint32_t offset = prob_data >> 2;
  104|   595k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 595k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  34.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 33.7M, False: 595k]
  ------------------
  109|  33.7M|        probability_table_[i + j] = 0;
  110|  33.7M|      }
  111|   595k|      i += offset;
  112|   595k|    } else {
  113|  8.57k|      const int extra_bytes = token;
  114|  8.57k|      uint32_t prob = prob_data >> 2;
  115|  14.6k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 6.05k, False: 8.57k]
  ------------------
  116|  6.05k|        uint8_t eb;
  117|  6.05k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 6.05k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  6.05k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  6.05k|      }
  124|  8.57k|      probability_table_[i] = prob;
  125|  8.57k|    }
  126|   603k|  }
  127|    138|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 17, False: 121]
  ------------------
  128|     17|    return false;
  129|     17|  }
  130|    121|  return true;
  131|    138|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    128|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    121|    DecoderBuffer *buffer) {
  136|    121|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    121|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    121|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    121|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 121]
  ------------------
  140|      0|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      0|  } else
  145|    121|#endif
  146|    121|  {
  147|    121|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 117]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    121|  }
  151|    117|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 1, False: 116]
  ------------------
  152|      1|    return false;
  153|      1|  }
  154|    116|  const uint8_t *const data_head =
  155|    116|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    116|  buffer->Advance(bytes_encoded);
  158|    116|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 21, False: 95]
  ------------------
  159|     21|    return false;
  160|     21|  }
  161|     95|  return true;
  162|    116|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  4.73M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|     95|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     95|  ans_.read_end();
  167|     95|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    158|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    158|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    158|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 158]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    158|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    158|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    158|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 40, False: 118]
  ------------------
   67|     40|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 40]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     40|  } else
   72|    118|#endif
   73|    118|  {
   74|    118|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 118]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    118|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    158|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 142]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    142|  probability_table_.resize(num_symbols_);
   86|    142|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 141]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  32.6k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 32.5k, False: 101]
  ------------------
   91|  32.5k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  32.5k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 24, False: 32.5k]
  ------------------
   95|     24|      return false;
   96|     24|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  32.5k|    const int token = prob_data & 3;
  102|  32.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 17.7k, False: 14.7k]
  ------------------
  103|  17.7k|      const uint32_t offset = prob_data >> 2;
  104|  17.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 5, False: 17.7k]
  ------------------
  105|      5|        return false;
  106|      5|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   517k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 499k, False: 17.7k]
  ------------------
  109|   499k|        probability_table_[i + j] = 0;
  110|   499k|      }
  111|  17.7k|      i += offset;
  112|  17.7k|    } else {
  113|  14.7k|      const int extra_bytes = token;
  114|  14.7k|      uint32_t prob = prob_data >> 2;
  115|  23.3k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 8.55k, False: 14.7k]
  ------------------
  116|  8.55k|        uint8_t eb;
  117|  8.55k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 8.53k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  8.53k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  8.53k|      }
  124|  14.7k|      probability_table_[i] = prob;
  125|  14.7k|    }
  126|  32.5k|  }
  127|    101|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 11, False: 90]
  ------------------
  128|     11|    return false;
  129|     11|  }
  130|     90|  return true;
  131|    101|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|     91|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|     90|    DecoderBuffer *buffer) {
  136|     90|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     90|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     90|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     90|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 19, False: 71]
  ------------------
  140|     19|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 19]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     19|  } else
  145|     71|#endif
  146|     71|  {
  147|     71|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 71]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     71|  }
  151|     90|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 26, False: 64]
  ------------------
  152|     26|    return false;
  153|     26|  }
  154|     64|  const uint8_t *const data_head =
  155|     64|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     64|  buffer->Advance(bytes_encoded);
  158|     64|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 12, False: 52]
  ------------------
  159|     12|    return false;
  160|     12|  }
  161|     52|  return true;
  162|     64|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  3.06M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|     52|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     52|  ans_.read_end();
  167|     52|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    172|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    172|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    172|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 172]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    172|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    172|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    172|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 41, False: 131]
  ------------------
   67|     41|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 41]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     41|  } else
   72|    131|#endif
   73|    131|  {
   74|    131|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 130]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    131|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    171|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 170]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|    170|  probability_table_.resize(num_symbols_);
   86|    170|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 170]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  1.88M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.88M, False: 101]
  ------------------
   91|  1.88M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.88M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 35, False: 1.88M]
  ------------------
   95|     35|      return false;
   96|     35|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.88M|    const int token = prob_data & 3;
  102|  1.88M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 523k, False: 1.36M]
  ------------------
  103|   523k|      const uint32_t offset = prob_data >> 2;
  104|   523k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 20, False: 523k]
  ------------------
  105|     20|        return false;
  106|     20|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  24.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 23.5M, False: 523k]
  ------------------
  109|  23.5M|        probability_table_[i + j] = 0;
  110|  23.5M|      }
  111|   523k|      i += offset;
  112|  1.36M|    } else {
  113|  1.36M|      const int extra_bytes = token;
  114|  1.36M|      uint32_t prob = prob_data >> 2;
  115|  2.17M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 809k, False: 1.36M]
  ------------------
  116|   809k|        uint8_t eb;
  117|   809k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 14, False: 809k]
  ------------------
  118|     14|          return false;
  119|     14|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   809k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   809k|      }
  124|  1.36M|      probability_table_[i] = prob;
  125|  1.36M|    }
  126|  1.88M|  }
  127|    101|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 97]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|     97|  return true;
  131|    101|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|     97|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|     97|    DecoderBuffer *buffer) {
  136|     97|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     97|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     97|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     97|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 77]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 20]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     20|  } else
  145|     77|#endif
  146|     77|  {
  147|     77|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 77]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     77|  }
  151|     97|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 24, False: 73]
  ------------------
  152|     24|    return false;
  153|     24|  }
  154|     73|  const uint8_t *const data_head =
  155|     73|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     73|  buffer->Advance(bytes_encoded);
  158|     73|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 8, False: 65]
  ------------------
  159|      8|    return false;
  160|      8|  }
  161|     65|  return true;
  162|     73|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  11.0M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|     65|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     65|  ans_.read_end();
  167|     65|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    148|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    148|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    148|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 148]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    148|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    148|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    148|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 43, False: 105]
  ------------------
   67|     43|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 43]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     43|  } else
   72|    105|#endif
   73|    105|  {
   74|    105|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 105]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    105|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    148|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 9, False: 139]
  ------------------
   83|      9|    return false;
   84|      9|  }
   85|    139|  probability_table_.resize(num_symbols_);
   86|    139|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 134]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   874k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 874k, False: 89]
  ------------------
   91|   874k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   874k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 22, False: 874k]
  ------------------
   95|     22|      return false;
   96|     22|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   874k|    const int token = prob_data & 3;
  102|   874k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 218k, False: 655k]
  ------------------
  103|   218k|      const uint32_t offset = prob_data >> 2;
  104|   218k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 218k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  10.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 10.3M, False: 218k]
  ------------------
  109|  10.3M|        probability_table_[i + j] = 0;
  110|  10.3M|      }
  111|   218k|      i += offset;
  112|   655k|    } else {
  113|   655k|      const int extra_bytes = token;
  114|   655k|      uint32_t prob = prob_data >> 2;
  115|  1.10M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 449k, False: 655k]
  ------------------
  116|   449k|        uint8_t eb;
  117|   449k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 449k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   449k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   449k|      }
  124|   655k|      probability_table_[i] = prob;
  125|   655k|    }
  126|   874k|  }
  127|     89|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 16, False: 73]
  ------------------
  128|     16|    return false;
  129|     16|  }
  130|     73|  return true;
  131|     89|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|     78|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|     73|    DecoderBuffer *buffer) {
  136|     73|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     73|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     73|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     73|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 22, False: 51]
  ------------------
  140|     22|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 22]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     22|  } else
  145|     51|#endif
  146|     51|  {
  147|     51|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 51]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     51|  }
  151|     73|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 31, False: 42]
  ------------------
  152|     31|    return false;
  153|     31|  }
  154|     42|  const uint8_t *const data_head =
  155|     42|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     42|  buffer->Advance(bytes_encoded);
  158|     42|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 7, False: 35]
  ------------------
  159|      7|    return false;
  160|      7|  }
  161|     35|  return true;
  162|     42|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  5.75M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|     35|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     35|  ans_.read_end();
  167|     35|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    221|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    221|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    221|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 221]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    221|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    221|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    221|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 202]
  ------------------
   67|     19|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 19]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     19|  } else
   72|    202|#endif
   73|    202|  {
   74|    202|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 201]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    202|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    220|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 8, False: 212]
  ------------------
   83|      8|    return false;
   84|      8|  }
   85|    212|  probability_table_.resize(num_symbols_);
   86|    212|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 210]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|   101k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 101k, False: 166]
  ------------------
   91|   101k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   101k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 17, False: 101k]
  ------------------
   95|     17|      return false;
   96|     17|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   101k|    const int token = prob_data & 3;
  102|   101k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 17.6k, False: 83.9k]
  ------------------
  103|  17.6k|      const uint32_t offset = prob_data >> 2;
  104|  17.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 17.6k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   677k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 660k, False: 17.6k]
  ------------------
  109|   660k|        probability_table_[i + j] = 0;
  110|   660k|      }
  111|  17.6k|      i += offset;
  112|  83.9k|    } else {
  113|  83.9k|      const int extra_bytes = token;
  114|  83.9k|      uint32_t prob = prob_data >> 2;
  115|   153k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 69.2k, False: 83.9k]
  ------------------
  116|  69.2k|        uint8_t eb;
  117|  69.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 69.2k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  69.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  69.2k|      }
  124|  83.9k|      probability_table_[i] = prob;
  125|  83.9k|    }
  126|   101k|  }
  127|    166|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 143]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|    143|  return true;
  131|    166|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    145|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    143|    DecoderBuffer *buffer) {
  136|    143|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    143|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    143|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    143|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 141]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|    141|#endif
  146|    141|  {
  147|    141|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 141]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    141|  }
  151|    143|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 27, False: 116]
  ------------------
  152|     27|    return false;
  153|     27|  }
  154|    116|  const uint8_t *const data_head =
  155|    116|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    116|  buffer->Advance(bytes_encoded);
  158|    116|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 8, False: 108]
  ------------------
  159|      8|    return false;
  160|      8|  }
  161|    108|  return true;
  162|    116|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  10.0M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    108|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    108|  ans_.read_end();
  167|    108|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    162|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    162|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    162|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 162]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    162|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    162|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    162|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 30, False: 132]
  ------------------
   67|     30|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 30]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     30|  } else
   72|    132|#endif
   73|    132|  {
   74|    132|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 132]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    132|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    162|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 162]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|    162|  probability_table_.resize(num_symbols_);
   86|    162|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 162]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   122k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 122k, False: 119]
  ------------------
   91|   122k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   122k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 22, False: 122k]
  ------------------
   95|     22|      return false;
   96|     22|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   122k|    const int token = prob_data & 3;
  102|   122k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 16.1k, False: 106k]
  ------------------
  103|  16.1k|      const uint32_t offset = prob_data >> 2;
  104|  16.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 15, False: 16.1k]
  ------------------
  105|     15|        return false;
  106|     15|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   511k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 495k, False: 16.1k]
  ------------------
  109|   495k|        probability_table_[i + j] = 0;
  110|   495k|      }
  111|  16.1k|      i += offset;
  112|   106k|    } else {
  113|   106k|      const int extra_bytes = token;
  114|   106k|      uint32_t prob = prob_data >> 2;
  115|   212k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 105k, False: 106k]
  ------------------
  116|   105k|        uint8_t eb;
  117|   105k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 6, False: 105k]
  ------------------
  118|      6|          return false;
  119|      6|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   105k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   105k|      }
  124|   106k|      probability_table_[i] = prob;
  125|   106k|    }
  126|   122k|  }
  127|    119|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 21, False: 98]
  ------------------
  128|     21|    return false;
  129|     21|  }
  130|     98|  return true;
  131|    119|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|     98|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|     98|    DecoderBuffer *buffer) {
  136|     98|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     98|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     98|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     98|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 80]
  ------------------
  140|     18|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 18]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     18|  } else
  145|     80|#endif
  146|     80|  {
  147|     80|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 6, False: 74]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|     80|  }
  151|     92|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 46, False: 46]
  ------------------
  152|     46|    return false;
  153|     46|  }
  154|     46|  const uint8_t *const data_head =
  155|     46|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     46|  buffer->Advance(bytes_encoded);
  158|     46|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 17, False: 29]
  ------------------
  159|     17|    return false;
  160|     17|  }
  161|     29|  return true;
  162|     46|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   308k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     29|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     29|  ans_.read_end();
  167|     29|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    156|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    156|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    156|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 156]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    156|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    156|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    156|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 27, False: 129]
  ------------------
   67|     27|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 27]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     27|  } else
   72|    129|#endif
   73|    129|  {
   74|    129|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 129]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    129|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    156|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 146]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    146|  probability_table_.resize(num_symbols_);
   86|    146|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 146]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   470k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 470k, False: 99]
  ------------------
   91|   470k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   470k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 11, False: 470k]
  ------------------
   95|     11|      return false;
   96|     11|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   470k|    const int token = prob_data & 3;
  102|   470k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 311k, False: 159k]
  ------------------
  103|   311k|      const uint32_t offset = prob_data >> 2;
  104|   311k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 311k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  17.7M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 17.4M, False: 311k]
  ------------------
  109|  17.4M|        probability_table_[i + j] = 0;
  110|  17.4M|      }
  111|   311k|      i += offset;
  112|   311k|    } else {
  113|   159k|      const int extra_bytes = token;
  114|   159k|      uint32_t prob = prob_data >> 2;
  115|   271k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 112k, False: 159k]
  ------------------
  116|   112k|        uint8_t eb;
  117|   112k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 12, False: 112k]
  ------------------
  118|     12|          return false;
  119|     12|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   112k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   112k|      }
  124|   159k|      probability_table_[i] = prob;
  125|   159k|    }
  126|   470k|  }
  127|     99|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 72]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|     72|  return true;
  131|     99|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|     72|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|     72|    DecoderBuffer *buffer) {
  136|     72|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     72|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     72|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     72|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 72]
  ------------------
  140|      0|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      0|  } else
  145|     72|#endif
  146|     72|  {
  147|     72|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 72]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     72|  }
  151|     72|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 16, False: 56]
  ------------------
  152|     16|    return false;
  153|     16|  }
  154|     56|  const uint8_t *const data_head =
  155|     56|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     56|  buffer->Advance(bytes_encoded);
  158|     56|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 14, False: 42]
  ------------------
  159|     14|    return false;
  160|     14|  }
  161|     42|  return true;
  162|     56|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   215k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     42|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     42|  ans_.read_end();
  167|     42|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    163|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    163|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    163|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 163]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    163|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    163|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    163|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 38, False: 125]
  ------------------
   67|     38|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 38]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     38|  } else
   72|    125|#endif
   73|    125|  {
   74|    125|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 125]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    125|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    163|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 2, False: 161]
  ------------------
   83|      2|    return false;
   84|      2|  }
   85|    161|  probability_table_.resize(num_symbols_);
   86|    161|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 161]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   657k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 657k, False: 105]
  ------------------
   91|   657k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   657k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 29, False: 657k]
  ------------------
   95|     29|      return false;
   96|     29|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   657k|    const int token = prob_data & 3;
  102|   657k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 466k, False: 191k]
  ------------------
  103|   466k|      const uint32_t offset = prob_data >> 2;
  104|   466k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 466k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  19.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 19.5M, False: 466k]
  ------------------
  109|  19.5M|        probability_table_[i + j] = 0;
  110|  19.5M|      }
  111|   466k|      i += offset;
  112|   466k|    } else {
  113|   191k|      const int extra_bytes = token;
  114|   191k|      uint32_t prob = prob_data >> 2;
  115|   354k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 163k, False: 191k]
  ------------------
  116|   163k|        uint8_t eb;
  117|   163k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 163k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   163k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   163k|      }
  124|   191k|      probability_table_[i] = prob;
  125|   191k|    }
  126|   657k|  }
  127|    105|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 19, False: 86]
  ------------------
  128|     19|    return false;
  129|     19|  }
  130|     86|  return true;
  131|    105|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|     86|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|     86|    DecoderBuffer *buffer) {
  136|     86|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     86|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     86|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     86|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 19, False: 67]
  ------------------
  140|     19|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 19]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     19|  } else
  145|     67|#endif
  146|     67|  {
  147|     67|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 67]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     67|  }
  151|     86|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 46, False: 40]
  ------------------
  152|     46|    return false;
  153|     46|  }
  154|     40|  const uint8_t *const data_head =
  155|     40|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     40|  buffer->Advance(bytes_encoded);
  158|     40|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 10, False: 30]
  ------------------
  159|     10|    return false;
  160|     10|  }
  161|     30|  return true;
  162|     40|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  62.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     30|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     30|  ans_.read_end();
  167|     30|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    169|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    169|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    169|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 169]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    169|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    169|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    169|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 148]
  ------------------
   67|     21|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 21]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     21|  } else
   72|    148|#endif
   73|    148|  {
   74|    148|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 148]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    148|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    169|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 156]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    156|  probability_table_.resize(num_symbols_);
   86|    156|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 155]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  1.27M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.27M, False: 105]
  ------------------
   91|  1.27M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.27M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 24, False: 1.27M]
  ------------------
   95|     24|      return false;
   96|     24|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.27M|    const int token = prob_data & 3;
  102|  1.27M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 652k, False: 621k]
  ------------------
  103|   652k|      const uint32_t offset = prob_data >> 2;
  104|   652k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 652k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  36.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 35.4M, False: 652k]
  ------------------
  109|  35.4M|        probability_table_[i + j] = 0;
  110|  35.4M|      }
  111|   652k|      i += offset;
  112|   652k|    } else {
  113|   621k|      const int extra_bytes = token;
  114|   621k|      uint32_t prob = prob_data >> 2;
  115|   994k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 372k, False: 621k]
  ------------------
  116|   372k|        uint8_t eb;
  117|   372k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 8, False: 372k]
  ------------------
  118|      8|          return false;
  119|      8|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   372k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   372k|      }
  124|   621k|      probability_table_[i] = prob;
  125|   621k|    }
  126|  1.27M|  }
  127|    105|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 21, False: 84]
  ------------------
  128|     21|    return false;
  129|     21|  }
  130|     84|  return true;
  131|    105|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|     85|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|     84|    DecoderBuffer *buffer) {
  136|     84|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     84|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     84|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     84|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 84]
  ------------------
  140|      0|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      0|  } else
  145|     84|#endif
  146|     84|  {
  147|     84|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 84]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     84|  }
  151|     84|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 29, False: 55]
  ------------------
  152|     29|    return false;
  153|     29|  }
  154|     55|  const uint8_t *const data_head =
  155|     55|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     55|  buffer->Advance(bytes_encoded);
  158|     55|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 9, False: 46]
  ------------------
  159|      9|    return false;
  160|      9|  }
  161|     46|  return true;
  162|     55|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   101k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     46|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     46|  ans_.read_end();
  167|     46|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    129|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    129|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    129|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 129]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    129|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    129|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    129|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 41, False: 88]
  ------------------
   67|     41|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 41]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     41|  } else
   72|     88|#endif
   73|     88|  {
   74|     88|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 88]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     88|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    129|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 6, False: 123]
  ------------------
   83|      6|    return false;
   84|      6|  }
   85|    123|  probability_table_.resize(num_symbols_);
   86|    123|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 122]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|   351k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 351k, False: 73]
  ------------------
   91|   351k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   351k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 10, False: 351k]
  ------------------
   95|     10|      return false;
   96|     10|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   351k|    const int token = prob_data & 3;
  102|   351k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 236k, False: 114k]
  ------------------
  103|   236k|      const uint32_t offset = prob_data >> 2;
  104|   236k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 236k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  10.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.94M, False: 236k]
  ------------------
  109|  9.94M|        probability_table_[i + j] = 0;
  110|  9.94M|      }
  111|   236k|      i += offset;
  112|   236k|    } else {
  113|   114k|      const int extra_bytes = token;
  114|   114k|      uint32_t prob = prob_data >> 2;
  115|   188k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 74.3k, False: 114k]
  ------------------
  116|  74.3k|        uint8_t eb;
  117|  74.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 74.2k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  74.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  74.2k|      }
  124|   114k|      probability_table_[i] = prob;
  125|   114k|    }
  126|   351k|  }
  127|     73|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 13, False: 60]
  ------------------
  128|     13|    return false;
  129|     13|  }
  130|     60|  return true;
  131|     73|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|     61|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|     60|    DecoderBuffer *buffer) {
  136|     60|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     60|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     60|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     60|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 47]
  ------------------
  140|     13|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 13]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     13|  } else
  145|     47|#endif
  146|     47|  {
  147|     47|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 6, False: 41]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|     47|  }
  151|     54|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 26, False: 28]
  ------------------
  152|     26|    return false;
  153|     26|  }
  154|     28|  const uint8_t *const data_head =
  155|     28|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     28|  buffer->Advance(bytes_encoded);
  158|     28|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 3, False: 25]
  ------------------
  159|      3|    return false;
  160|      3|  }
  161|     25|  return true;
  162|     28|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  62.7k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     25|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     25|  ans_.read_end();
  167|     25|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    186|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    186|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    186|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 186]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    186|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    186|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    186|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 58, False: 128]
  ------------------
   67|     58|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 56]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     58|  } else
   72|    128|#endif
   73|    128|  {
   74|    128|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 128]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    128|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    184|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 7, False: 177]
  ------------------
   83|      7|    return false;
   84|      7|  }
   85|    177|  probability_table_.resize(num_symbols_);
   86|    177|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 177]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  2.17M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.17M, False: 121]
  ------------------
   91|  2.17M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  2.17M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 30, False: 2.17M]
  ------------------
   95|     30|      return false;
   96|     30|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.17M|    const int token = prob_data & 3;
  102|  2.17M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.81M, False: 360k]
  ------------------
  103|  1.81M|      const uint32_t offset = prob_data >> 2;
  104|  1.81M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 1.81M]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   105M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 103M, False: 1.81M]
  ------------------
  109|   103M|        probability_table_[i + j] = 0;
  110|   103M|      }
  111|  1.81M|      i += offset;
  112|  1.81M|    } else {
  113|   360k|      const int extra_bytes = token;
  114|   360k|      uint32_t prob = prob_data >> 2;
  115|   617k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 257k, False: 360k]
  ------------------
  116|   257k|        uint8_t eb;
  117|   257k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 257k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   257k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   257k|      }
  124|   360k|      probability_table_[i] = prob;
  125|   360k|    }
  126|  2.17M|  }
  127|    121|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 7, False: 114]
  ------------------
  128|      7|    return false;
  129|      7|  }
  130|    114|  return true;
  131|    121|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    114|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    114|    DecoderBuffer *buffer) {
  136|    114|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    114|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    114|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    114|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 33, False: 81]
  ------------------
  140|     33|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 32]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     33|  } else
  145|     81|#endif
  146|     81|  {
  147|     81|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 81]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     81|  }
  151|    113|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 50, False: 63]
  ------------------
  152|     50|    return false;
  153|     50|  }
  154|     63|  const uint8_t *const data_head =
  155|     63|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     63|  buffer->Advance(bytes_encoded);
  158|     63|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 16, False: 47]
  ------------------
  159|     16|    return false;
  160|     16|  }
  161|     47|  return true;
  162|     63|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   273k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     47|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     47|  ans_.read_end();
  167|     47|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    126|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    126|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    126|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 126]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    126|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    126|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    126|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 14, False: 112]
  ------------------
   67|     14|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 14]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     14|  } else
   72|    112|#endif
   73|    112|  {
   74|    112|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 112]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    112|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    126|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 5, False: 121]
  ------------------
   83|      5|    return false;
   84|      5|  }
   85|    121|  probability_table_.resize(num_symbols_);
   86|    121|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 121]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   502k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 502k, False: 73]
  ------------------
   91|   502k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   502k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 30, False: 502k]
  ------------------
   95|     30|      return false;
   96|     30|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   502k|    const int token = prob_data & 3;
  102|   502k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 72.5k, False: 429k]
  ------------------
  103|  72.5k|      const uint32_t offset = prob_data >> 2;
  104|  72.5k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 6, False: 72.5k]
  ------------------
  105|      6|        return false;
  106|      6|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.48M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.40M, False: 72.5k]
  ------------------
  109|  2.40M|        probability_table_[i + j] = 0;
  110|  2.40M|      }
  111|  72.5k|      i += offset;
  112|   429k|    } else {
  113|   429k|      const int extra_bytes = token;
  114|   429k|      uint32_t prob = prob_data >> 2;
  115|   833k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 403k, False: 429k]
  ------------------
  116|   403k|        uint8_t eb;
  117|   403k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 12, False: 403k]
  ------------------
  118|     12|          return false;
  119|     12|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   403k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   403k|      }
  124|   429k|      probability_table_[i] = prob;
  125|   429k|    }
  126|   502k|  }
  127|     73|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 13, False: 60]
  ------------------
  128|     13|    return false;
  129|     13|  }
  130|     60|  return true;
  131|     73|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|     60|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|     60|    DecoderBuffer *buffer) {
  136|     60|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     60|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     60|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     60|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 3, False: 57]
  ------------------
  140|      3|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 3]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      3|  } else
  145|     57|#endif
  146|     57|  {
  147|     57|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 57]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     57|  }
  151|     60|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 24, False: 36]
  ------------------
  152|     24|    return false;
  153|     24|  }
  154|     36|  const uint8_t *const data_head =
  155|     36|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     36|  buffer->Advance(bytes_encoded);
  158|     36|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 1, False: 35]
  ------------------
  159|      1|    return false;
  160|      1|  }
  161|     35|  return true;
  162|     36|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|  69.2k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     35|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     35|  ans_.read_end();
  167|     35|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    157|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    157|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    157|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 157]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    157|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    157|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    157|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 26, False: 131]
  ------------------
   67|     26|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 26]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     26|  } else
   72|    131|#endif
   73|    131|  {
   74|    131|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 126]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    131|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    152|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 8, False: 144]
  ------------------
   83|      8|    return false;
   84|      8|  }
   85|    144|  probability_table_.resize(num_symbols_);
   86|    144|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 143]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  48.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 48.8k, False: 110]
  ------------------
   91|  48.8k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  48.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 15, False: 48.8k]
  ------------------
   95|     15|      return false;
   96|     15|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  48.8k|    const int token = prob_data & 3;
  102|  48.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 5.46k, False: 43.4k]
  ------------------
  103|  5.46k|      const uint32_t offset = prob_data >> 2;
  104|  5.46k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 8, False: 5.45k]
  ------------------
  105|      8|        return false;
  106|      8|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   257k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 252k, False: 5.45k]
  ------------------
  109|   252k|        probability_table_[i + j] = 0;
  110|   252k|      }
  111|  5.45k|      i += offset;
  112|  43.4k|    } else {
  113|  43.4k|      const int extra_bytes = token;
  114|  43.4k|      uint32_t prob = prob_data >> 2;
  115|  87.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 44.4k, False: 43.3k]
  ------------------
  116|  44.4k|        uint8_t eb;
  117|  44.4k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 10, False: 44.4k]
  ------------------
  118|     10|          return false;
  119|     10|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  44.4k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  44.4k|      }
  124|  43.3k|      probability_table_[i] = prob;
  125|  43.3k|    }
  126|  48.8k|  }
  127|    110|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 13, False: 97]
  ------------------
  128|     13|    return false;
  129|     13|  }
  130|     97|  return true;
  131|    110|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|     98|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|     97|    DecoderBuffer *buffer) {
  136|     97|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     97|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     97|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     97|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 77]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 19]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     20|  } else
  145|     77|#endif
  146|     77|  {
  147|     77|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 77]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     77|  }
  151|     96|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 42, False: 54]
  ------------------
  152|     42|    return false;
  153|     42|  }
  154|     54|  const uint8_t *const data_head =
  155|     54|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     54|  buffer->Advance(bytes_encoded);
  158|     54|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 15, False: 39]
  ------------------
  159|     15|    return false;
  160|     15|  }
  161|     39|  return true;
  162|     54|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   148k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     39|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     39|  ans_.read_end();
  167|     39|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    175|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    175|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    175|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 175]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    175|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    175|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    175|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 67, False: 108]
  ------------------
   67|     67|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 67]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     67|  } else
   72|    108|#endif
   73|    108|  {
   74|    108|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 108]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    108|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    175|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 150]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    150|  probability_table_.resize(num_symbols_);
   86|    150|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 150]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  1.31M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.31M, False: 94]
  ------------------
   91|  1.31M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.31M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 26, False: 1.31M]
  ------------------
   95|     26|      return false;
   96|     26|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.31M|    const int token = prob_data & 3;
  102|  1.31M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 532k, False: 778k]
  ------------------
  103|   532k|      const uint32_t offset = prob_data >> 2;
  104|   532k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 532k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  25.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 25.2M, False: 532k]
  ------------------
  109|  25.2M|        probability_table_[i + j] = 0;
  110|  25.2M|      }
  111|   532k|      i += offset;
  112|   778k|    } else {
  113|   778k|      const int extra_bytes = token;
  114|   778k|      uint32_t prob = prob_data >> 2;
  115|  1.50M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 725k, False: 778k]
  ------------------
  116|   725k|        uint8_t eb;
  117|   725k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 725k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   725k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   725k|      }
  124|   778k|      probability_table_[i] = prob;
  125|   778k|    }
  126|  1.31M|  }
  127|     94|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 21, False: 73]
  ------------------
  128|     21|    return false;
  129|     21|  }
  130|     73|  return true;
  131|     94|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|     73|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|     73|    DecoderBuffer *buffer) {
  136|     73|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     73|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     73|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     73|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 33, False: 40]
  ------------------
  140|     33|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 33]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     33|  } else
  145|     40|#endif
  146|     40|  {
  147|     40|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 40]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     40|  }
  151|     73|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 52, False: 21]
  ------------------
  152|     52|    return false;
  153|     52|  }
  154|     21|  const uint8_t *const data_head =
  155|     21|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     21|  buffer->Advance(bytes_encoded);
  158|     21|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 2, False: 19]
  ------------------
  159|      2|    return false;
  160|      2|  }
  161|     19|  return true;
  162|     21|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  22.6k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     19|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     19|  ans_.read_end();
  167|     19|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  5.91k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  5.91k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 11, False: 5.90k]
  ------------------
   35|     11|    return true;
   36|     11|  }
   37|       |  // Decode which scheme to use.
   38|  5.90k|  uint8_t scheme;
   39|  5.90k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 25, False: 5.87k]
  ------------------
   40|     25|    return false;
   41|     25|  }
   42|  5.87k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 563, False: 5.31k]
  ------------------
   43|    563|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|    563|                                                  src_buffer, out_values);
   45|  5.31k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 3.61k, False: 1.70k]
  ------------------
   46|  3.61k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  3.61k|                                               out_values);
   48|  3.61k|  }
   49|  1.70k|  return false;
   50|  5.87k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|    563|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|    563|  SymbolDecoderT<5> tag_decoder;
   57|    563|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 307, False: 256]
  ------------------
   58|    307|    return false;
   59|    307|  }
   60|       |
   61|    256|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 91, False: 165]
  ------------------
   62|     91|    return false;
   63|     91|  }
   64|       |
   65|    165|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 165, False: 0]
  |  Branch (65:25): [True: 24, False: 141]
  ------------------
   66|     24|    return false;  // Wrong number of symbols.
   67|     24|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    141|  src_buffer->StartBitDecoding(false, nullptr);
   72|    141|  int value_id = 0;
   73|  5.30M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 5.30M, False: 128]
  ------------------
   74|       |    // Decode the tag.
   75|  5.30M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  13.9M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 8.65M, False: 5.30M]
  ------------------
   78|  8.65M|      uint32_t val;
   79|  8.65M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 13, False: 8.65M]
  ------------------
   80|     13|        return false;
   81|     13|      }
   82|  8.65M|      out_values[value_id++] = val;
   83|  8.65M|    }
   84|  5.30M|  }
   85|    128|  tag_decoder.EndDecoding();
   86|    128|  src_buffer->EndBitDecoding();
   87|    128|  return true;
   88|    141|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  3.61k|                      uint32_t *out_values) {
  117|  3.61k|  uint8_t max_bit_length;
  118|  3.61k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 10, False: 3.60k]
  ------------------
  119|     10|    return false;
  120|     10|  }
  121|  3.60k|  switch (max_bit_length) {
  122|    385|    case 1:
  ------------------
  |  Branch (122:5): [True: 385, False: 3.21k]
  ------------------
  123|    385|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    385|                                                         out_values);
  125|    246|    case 2:
  ------------------
  |  Branch (125:5): [True: 246, False: 3.35k]
  ------------------
  126|    246|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    246|                                                         out_values);
  128|    247|    case 3:
  ------------------
  |  Branch (128:5): [True: 247, False: 3.35k]
  ------------------
  129|    247|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    247|                                                         out_values);
  131|    196|    case 4:
  ------------------
  |  Branch (131:5): [True: 196, False: 3.40k]
  ------------------
  132|    196|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    196|                                                         out_values);
  134|     87|    case 5:
  ------------------
  |  Branch (134:5): [True: 87, False: 3.51k]
  ------------------
  135|     87|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|     87|                                                         out_values);
  137|    158|    case 6:
  ------------------
  |  Branch (137:5): [True: 158, False: 3.44k]
  ------------------
  138|    158|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    158|                                                         out_values);
  140|    172|    case 7:
  ------------------
  |  Branch (140:5): [True: 172, False: 3.42k]
  ------------------
  141|    172|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    172|                                                         out_values);
  143|    148|    case 8:
  ------------------
  |  Branch (143:5): [True: 148, False: 3.45k]
  ------------------
  144|    148|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    148|                                                         out_values);
  146|    221|    case 9:
  ------------------
  |  Branch (146:5): [True: 221, False: 3.37k]
  ------------------
  147|    221|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    221|                                                         out_values);
  149|    162|    case 10:
  ------------------
  |  Branch (149:5): [True: 162, False: 3.43k]
  ------------------
  150|    162|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    162|          num_values, src_buffer, out_values);
  152|    156|    case 11:
  ------------------
  |  Branch (152:5): [True: 156, False: 3.44k]
  ------------------
  153|    156|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    156|          num_values, src_buffer, out_values);
  155|    163|    case 12:
  ------------------
  |  Branch (155:5): [True: 163, False: 3.43k]
  ------------------
  156|    163|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    163|          num_values, src_buffer, out_values);
  158|    169|    case 13:
  ------------------
  |  Branch (158:5): [True: 169, False: 3.43k]
  ------------------
  159|    169|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    169|          num_values, src_buffer, out_values);
  161|    129|    case 14:
  ------------------
  |  Branch (161:5): [True: 129, False: 3.47k]
  ------------------
  162|    129|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    129|          num_values, src_buffer, out_values);
  164|    186|    case 15:
  ------------------
  |  Branch (164:5): [True: 186, False: 3.41k]
  ------------------
  165|    186|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    186|          num_values, src_buffer, out_values);
  167|    126|    case 16:
  ------------------
  |  Branch (167:5): [True: 126, False: 3.47k]
  ------------------
  168|    126|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    126|          num_values, src_buffer, out_values);
  170|    157|    case 17:
  ------------------
  |  Branch (170:5): [True: 157, False: 3.44k]
  ------------------
  171|    157|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    157|          num_values, src_buffer, out_values);
  173|    175|    case 18:
  ------------------
  |  Branch (173:5): [True: 175, False: 3.42k]
  ------------------
  174|    175|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    175|          num_values, src_buffer, out_values);
  176|    317|    default:
  ------------------
  |  Branch (176:5): [True: 317, False: 3.28k]
  ------------------
  177|    317|      return false;
  178|  3.60k|  }
  179|  3.60k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    385|                              uint32_t *out_values) {
   93|    385|  SymbolDecoderT decoder;
   94|    385|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 264, False: 121]
  ------------------
   95|    264|    return false;
   96|    264|  }
   97|       |
   98|    121|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 121, False: 0]
  |  Branch (98:25): [True: 23, False: 98]
  ------------------
   99|     23|    return false;  // Wrong number of symbols.
  100|     23|  }
  101|       |
  102|     98|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 15, False: 83]
  ------------------
  103|     15|    return false;
  104|     15|  }
  105|  10.1M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 10.1M, False: 83]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  10.1M|    const uint32_t value = decoder.DecodeSymbol();
  108|  10.1M|    out_values[i] = value;
  109|  10.1M|  }
  110|     83|  decoder.EndDecoding();
  111|     83|  return true;
  112|     98|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    246|                              uint32_t *out_values) {
   93|    246|  SymbolDecoderT decoder;
   94|    246|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 112, False: 134]
  ------------------
   95|    112|    return false;
   96|    112|  }
   97|       |
   98|    134|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 134, False: 0]
  |  Branch (98:25): [True: 5, False: 129]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    129|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 35, False: 94]
  ------------------
  103|     35|    return false;
  104|     35|  }
  105|  1.68M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.68M, False: 94]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.68M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.68M|    out_values[i] = value;
  109|  1.68M|  }
  110|     94|  decoder.EndDecoding();
  111|     94|  return true;
  112|    129|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    247|                              uint32_t *out_values) {
   93|    247|  SymbolDecoderT decoder;
   94|    247|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 89, False: 158]
  ------------------
   95|     89|    return false;
   96|     89|  }
   97|       |
   98|    158|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 158, False: 0]
  |  Branch (98:25): [True: 3, False: 155]
  ------------------
   99|      3|    return false;  // Wrong number of symbols.
  100|      3|  }
  101|       |
  102|    155|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 66, False: 89]
  ------------------
  103|     66|    return false;
  104|     66|  }
  105|  2.93M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.93M, False: 89]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.93M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.93M|    out_values[i] = value;
  109|  2.93M|  }
  110|     89|  decoder.EndDecoding();
  111|     89|  return true;
  112|    155|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    196|                              uint32_t *out_values) {
   93|    196|  SymbolDecoderT decoder;
   94|    196|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 68, False: 128]
  ------------------
   95|     68|    return false;
   96|     68|  }
   97|       |
   98|    128|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 128, False: 0]
  |  Branch (98:25): [True: 7, False: 121]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    121|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 26, False: 95]
  ------------------
  103|     26|    return false;
  104|     26|  }
  105|  4.73M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 4.73M, False: 95]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  4.73M|    const uint32_t value = decoder.DecodeSymbol();
  108|  4.73M|    out_values[i] = value;
  109|  4.73M|  }
  110|     95|  decoder.EndDecoding();
  111|     95|  return true;
  112|    121|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|     87|                              uint32_t *out_values) {
   93|     87|  SymbolDecoderT decoder;
   94|     87|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 19, False: 68]
  ------------------
   95|     19|    return false;
   96|     19|  }
   97|       |
   98|     68|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 68, False: 0]
  |  Branch (98:25): [True: 25, False: 43]
  ------------------
   99|     25|    return false;  // Wrong number of symbols.
  100|     25|  }
  101|       |
  102|     43|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 0, False: 43]
  ------------------
  103|      0|    return false;
  104|      0|  }
  105|  9.45M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.45M, False: 43]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.45M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.45M|    out_values[i] = value;
  109|  9.45M|  }
  110|     43|  decoder.EndDecoding();
  111|     43|  return true;
  112|     43|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    158|                              uint32_t *out_values) {
   93|    158|  SymbolDecoderT decoder;
   94|    158|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 67, False: 91]
  ------------------
   95|     67|    return false;
   96|     67|  }
   97|       |
   98|     91|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 91, False: 0]
  |  Branch (98:25): [True: 1, False: 90]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     90|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 38, False: 52]
  ------------------
  103|     38|    return false;
  104|     38|  }
  105|  3.06M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 3.06M, False: 52]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  3.06M|    const uint32_t value = decoder.DecodeSymbol();
  108|  3.06M|    out_values[i] = value;
  109|  3.06M|  }
  110|     52|  decoder.EndDecoding();
  111|     52|  return true;
  112|     90|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    172|                              uint32_t *out_values) {
   93|    172|  SymbolDecoderT decoder;
   94|    172|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 75, False: 97]
  ------------------
   95|     75|    return false;
   96|     75|  }
   97|       |
   98|     97|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 97, False: 0]
  |  Branch (98:25): [True: 0, False: 97]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     97|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 32, False: 65]
  ------------------
  103|     32|    return false;
  104|     32|  }
  105|  11.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 11.0M, False: 65]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  11.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  11.0M|    out_values[i] = value;
  109|  11.0M|  }
  110|     65|  decoder.EndDecoding();
  111|     65|  return true;
  112|     97|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    148|                              uint32_t *out_values) {
   93|    148|  SymbolDecoderT decoder;
   94|    148|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 70, False: 78]
  ------------------
   95|     70|    return false;
   96|     70|  }
   97|       |
   98|     78|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 78, False: 0]
  |  Branch (98:25): [True: 5, False: 73]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|     73|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 38, False: 35]
  ------------------
  103|     38|    return false;
  104|     38|  }
  105|  5.75M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 5.75M, False: 35]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  5.75M|    const uint32_t value = decoder.DecodeSymbol();
  108|  5.75M|    out_values[i] = value;
  109|  5.75M|  }
  110|     35|  decoder.EndDecoding();
  111|     35|  return true;
  112|     73|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    221|                              uint32_t *out_values) {
   93|    221|  SymbolDecoderT decoder;
   94|    221|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 76, False: 145]
  ------------------
   95|     76|    return false;
   96|     76|  }
   97|       |
   98|    145|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 145, False: 0]
  |  Branch (98:25): [True: 2, False: 143]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|    143|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 35, False: 108]
  ------------------
  103|     35|    return false;
  104|     35|  }
  105|  10.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 10.0M, False: 108]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  10.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  10.0M|    out_values[i] = value;
  109|  10.0M|  }
  110|    108|  decoder.EndDecoding();
  111|    108|  return true;
  112|    143|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    162|                              uint32_t *out_values) {
   93|    162|  SymbolDecoderT decoder;
   94|    162|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 64, False: 98]
  ------------------
   95|     64|    return false;
   96|     64|  }
   97|       |
   98|     98|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 98, False: 0]
  |  Branch (98:25): [True: 0, False: 98]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     98|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 69, False: 29]
  ------------------
  103|     69|    return false;
  104|     69|  }
  105|   308k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 308k, False: 29]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   308k|    const uint32_t value = decoder.DecodeSymbol();
  108|   308k|    out_values[i] = value;
  109|   308k|  }
  110|     29|  decoder.EndDecoding();
  111|     29|  return true;
  112|     98|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    156|                              uint32_t *out_values) {
   93|    156|  SymbolDecoderT decoder;
   94|    156|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 84, False: 72]
  ------------------
   95|     84|    return false;
   96|     84|  }
   97|       |
   98|     72|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 72, False: 0]
  |  Branch (98:25): [True: 0, False: 72]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     72|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 30, False: 42]
  ------------------
  103|     30|    return false;
  104|     30|  }
  105|   215k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 215k, False: 42]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   215k|    const uint32_t value = decoder.DecodeSymbol();
  108|   215k|    out_values[i] = value;
  109|   215k|  }
  110|     42|  decoder.EndDecoding();
  111|     42|  return true;
  112|     72|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    163|                              uint32_t *out_values) {
   93|    163|  SymbolDecoderT decoder;
   94|    163|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 77, False: 86]
  ------------------
   95|     77|    return false;
   96|     77|  }
   97|       |
   98|     86|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 86, False: 0]
  |  Branch (98:25): [True: 0, False: 86]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     86|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 56, False: 30]
  ------------------
  103|     56|    return false;
  104|     56|  }
  105|  62.1k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 62.0k, False: 30]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  62.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  62.0k|    out_values[i] = value;
  109|  62.0k|  }
  110|     30|  decoder.EndDecoding();
  111|     30|  return true;
  112|     86|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    169|                              uint32_t *out_values) {
   93|    169|  SymbolDecoderT decoder;
   94|    169|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 84, False: 85]
  ------------------
   95|     84|    return false;
   96|     84|  }
   97|       |
   98|     85|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 85, False: 0]
  |  Branch (98:25): [True: 1, False: 84]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     84|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 38, False: 46]
  ------------------
  103|     38|    return false;
  104|     38|  }
  105|   101k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 101k, False: 46]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   101k|    const uint32_t value = decoder.DecodeSymbol();
  108|   101k|    out_values[i] = value;
  109|   101k|  }
  110|     46|  decoder.EndDecoding();
  111|     46|  return true;
  112|     84|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    129|                              uint32_t *out_values) {
   93|    129|  SymbolDecoderT decoder;
   94|    129|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 68, False: 61]
  ------------------
   95|     68|    return false;
   96|     68|  }
   97|       |
   98|     61|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 61, False: 0]
  |  Branch (98:25): [True: 1, False: 60]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     60|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 35, False: 25]
  ------------------
  103|     35|    return false;
  104|     35|  }
  105|  62.7k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 62.7k, False: 25]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  62.7k|    const uint32_t value = decoder.DecodeSymbol();
  108|  62.7k|    out_values[i] = value;
  109|  62.7k|  }
  110|     25|  decoder.EndDecoding();
  111|     25|  return true;
  112|     60|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    186|                              uint32_t *out_values) {
   93|    186|  SymbolDecoderT decoder;
   94|    186|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 72, False: 114]
  ------------------
   95|     72|    return false;
   96|     72|  }
   97|       |
   98|    114|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 114, False: 0]
  |  Branch (98:25): [True: 0, False: 114]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|    114|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 67, False: 47]
  ------------------
  103|     67|    return false;
  104|     67|  }
  105|   273k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 273k, False: 47]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   273k|    const uint32_t value = decoder.DecodeSymbol();
  108|   273k|    out_values[i] = value;
  109|   273k|  }
  110|     47|  decoder.EndDecoding();
  111|     47|  return true;
  112|    114|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    126|                              uint32_t *out_values) {
   93|    126|  SymbolDecoderT decoder;
   94|    126|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 66, False: 60]
  ------------------
   95|     66|    return false;
   96|     66|  }
   97|       |
   98|     60|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 60, False: 0]
  |  Branch (98:25): [True: 0, False: 60]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     60|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 25, False: 35]
  ------------------
  103|     25|    return false;
  104|     25|  }
  105|  69.2k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 69.2k, False: 35]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  69.2k|    const uint32_t value = decoder.DecodeSymbol();
  108|  69.2k|    out_values[i] = value;
  109|  69.2k|  }
  110|     35|  decoder.EndDecoding();
  111|     35|  return true;
  112|     60|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    157|                              uint32_t *out_values) {
   93|    157|  SymbolDecoderT decoder;
   94|    157|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 59, False: 98]
  ------------------
   95|     59|    return false;
   96|     59|  }
   97|       |
   98|     98|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 98, False: 0]
  |  Branch (98:25): [True: 1, False: 97]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     97|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 58, False: 39]
  ------------------
  103|     58|    return false;
  104|     58|  }
  105|   149k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 148k, False: 39]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   148k|    const uint32_t value = decoder.DecodeSymbol();
  108|   148k|    out_values[i] = value;
  109|   148k|  }
  110|     39|  decoder.EndDecoding();
  111|     39|  return true;
  112|     97|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    175|                              uint32_t *out_values) {
   93|    175|  SymbolDecoderT decoder;
   94|    175|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 102, False: 73]
  ------------------
   95|    102|    return false;
   96|    102|  }
   97|       |
   98|     73|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 73, False: 0]
  |  Branch (98:25): [True: 0, False: 73]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     73|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 54, False: 19]
  ------------------
  103|     54|    return false;
  104|     54|  }
  105|  22.7k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 22.6k, False: 19]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  22.6k|    const uint32_t value = decoder.DecodeSymbol();
  108|  22.6k|    out_values[i] = value;
  109|  22.6k|  }
  110|     19|  decoder.EndDecoding();
  111|     19|  return true;
  112|     73|}

_ZN5draco11MeshDecoderC2Ev:
   19|  6.55k|MeshDecoder::MeshDecoder() : mesh_(nullptr) {}
_ZN5draco11MeshDecoder6DecodeERKNS_12DracoOptionsINS_17GeometryAttribute4TypeEEEPNS_13DecoderBufferEPNS_4MeshE:
   22|  6.55k|                           DecoderBuffer *in_buffer, Mesh *out_mesh) {
   23|  6.55k|  mesh_ = out_mesh;
   24|  6.55k|  return PointCloudDecoder::Decode(options, in_buffer, out_mesh);
   25|  6.55k|}
_ZN5draco11MeshDecoder18DecodeGeometryDataEv:
   27|  6.10k|bool MeshDecoder::DecodeGeometryData() {
   28|  6.10k|  if (mesh_ == nullptr) {
  ------------------
  |  Branch (28:7): [True: 0, False: 6.10k]
  ------------------
   29|      0|    return false;
   30|      0|  }
   31|  6.10k|  if (!DecodeConnectivity()) {
  ------------------
  |  Branch (31:7): [True: 2.52k, False: 3.57k]
  ------------------
   32|  2.52k|    return false;
   33|  2.52k|  }
   34|  3.57k|  return PointCloudDecoder::DecodeGeometryData();
   35|  6.10k|}

_ZNK5draco11MeshDecoder15GetGeometryTypeEv:
   31|  17.0k|  EncodedGeometryType GetGeometryType() const override {
   32|  17.0k|    return TRIANGULAR_MESH;
   33|  17.0k|  }
_ZNK5draco11MeshDecoder14GetCornerTableEv:
   41|    139|  virtual const CornerTable *GetCornerTable() const { return nullptr; }
_ZNK5draco11MeshDecoder24GetAttributeEncodingDataEi:
   52|    139|      int /* att_id */) const {
   53|    139|    return nullptr;
   54|    139|  }
_ZNK5draco11MeshDecoder4meshEv:
   56|  17.2M|  Mesh *mesh() const { return mesh_; }

_ZN5draco22MeshEdgebreakerDecoderC2Ev:
   23|  4.99k|MeshEdgebreakerDecoder::MeshEdgebreakerDecoder() {}
_ZN5draco22MeshEdgebreakerDecoder23CreateAttributesDecoderEi:
   25|  3.24k|bool MeshEdgebreakerDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
   26|  3.24k|  return impl_->CreateAttributesDecoder(att_decoder_id);
   27|  3.24k|}
_ZN5draco22MeshEdgebreakerDecoder17InitializeDecoderEv:
   29|  4.80k|bool MeshEdgebreakerDecoder::InitializeDecoder() {
   30|  4.80k|  uint8_t traversal_decoder_type;
   31|  4.80k|  if (!buffer()->Decode(&traversal_decoder_type)) {
  ------------------
  |  Branch (31:7): [True: 0, False: 4.80k]
  ------------------
   32|      0|    return false;
   33|      0|  }
   34|  4.80k|  impl_ = nullptr;
   35|  4.80k|  if (traversal_decoder_type == MESH_EDGEBREAKER_STANDARD_ENCODING) {
  ------------------
  |  Branch (35:7): [True: 2.12k, False: 2.68k]
  ------------------
   36|  2.12k|#ifdef DRACO_STANDARD_EDGEBREAKER_SUPPORTED
   37|  2.12k|    impl_ = std::unique_ptr<MeshEdgebreakerDecoderImplInterface>(
   38|  2.12k|        new MeshEdgebreakerDecoderImpl<MeshEdgebreakerTraversalDecoder>());
   39|  2.12k|#endif
   40|  2.68k|  } else if (traversal_decoder_type == MESH_EDGEBREAKER_PREDICTIVE_ENCODING) {
  ------------------
  |  Branch (40:14): [True: 1.47k, False: 1.20k]
  ------------------
   41|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   42|  1.47k|#ifdef DRACO_PREDICTIVE_EDGEBREAKER_SUPPORTED
   43|  1.47k|    impl_ = std::unique_ptr<MeshEdgebreakerDecoderImplInterface>(
   44|  1.47k|        new MeshEdgebreakerDecoderImpl<
   45|  1.47k|            MeshEdgebreakerTraversalPredictiveDecoder>());
   46|  1.47k|#endif
   47|  1.47k|#endif
   48|  1.47k|  } else if (traversal_decoder_type == MESH_EDGEBREAKER_VALENCE_ENCODING) {
  ------------------
  |  Branch (48:14): [True: 1.20k, False: 0]
  ------------------
   49|  1.20k|    impl_ = std::unique_ptr<MeshEdgebreakerDecoderImplInterface>(
   50|  1.20k|        new MeshEdgebreakerDecoderImpl<
   51|  1.20k|            MeshEdgebreakerTraversalValenceDecoder>());
   52|  1.20k|  }
   53|  4.80k|  if (!impl_) {
  ------------------
  |  Branch (53:7): [True: 0, False: 4.80k]
  ------------------
   54|      0|    return false;
   55|      0|  }
   56|  4.80k|  if (!impl_->Init(this)) {
  ------------------
  |  Branch (56:7): [True: 0, False: 4.80k]
  ------------------
   57|      0|    return false;
   58|      0|  }
   59|  4.80k|  return true;
   60|  4.80k|}
_ZN5draco22MeshEdgebreakerDecoder18DecodeConnectivityEv:
   62|  4.80k|bool MeshEdgebreakerDecoder::DecodeConnectivity() {
   63|  4.80k|  return impl_->DecodeConnectivity();
   64|  4.80k|}
_ZN5draco22MeshEdgebreakerDecoder19OnAttributesDecodedEv:
   66|    487|bool MeshEdgebreakerDecoder::OnAttributesDecoded() {
   67|    487|  return impl_->OnAttributesDecoded();
   68|    487|}

_ZNK5draco22MeshEdgebreakerDecoder14GetCornerTableEv:
   29|  4.87k|  const CornerTable *GetCornerTable() const override {
   30|  4.87k|    return impl_->GetCornerTable();
   31|  4.87k|  }
_ZNK5draco22MeshEdgebreakerDecoder23GetAttributeCornerTableEi:
   34|  4.87k|      int att_id) const override {
   35|  4.87k|    return impl_->GetAttributeCornerTable(att_id);
   36|  4.87k|  }
_ZNK5draco22MeshEdgebreakerDecoder24GetAttributeEncodingDataEi:
   39|  4.87k|      int att_id) const override {
   40|  4.87k|    return impl_->GetAttributeEncodingData(att_id);
   41|  4.87k|  }

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  2.12k|    : decoder_(nullptr),
   49|  2.12k|      last_symbol_id_(-1),
   50|  2.12k|      last_vert_id_(-1),
   51|  2.12k|      last_face_id_(-1),
   52|  2.12k|      num_new_vertices_(0),
   53|  2.12k|      num_encoded_vertices_(0),
   54|  2.12k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.12k|    MeshEdgebreakerDecoder *decoder) {
   59|  2.12k|  decoder_ = decoder;
   60|  2.12k|  return true;
   61|  2.12k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  2.79k|    int att_id) const {
   67|  3.97k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 3.31k, False: 665]
  ------------------
   68|  3.31k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  3.31k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.17k, False: 2.13k]
  |  Branch (69:27): [True: 0, False: 2.13k]
  ------------------
   70|  1.17k|      continue;
   71|  1.17k|    }
   72|  2.13k|    const AttributesDecoderInterface *const dec =
   73|  2.13k|        decoder_->attributes_decoder(decoder_id);
   74|  5.46k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 5.46k, False: 6]
  ------------------
   75|  5.46k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 2.13k, False: 3.33k]
  ------------------
   76|  2.13k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.44k, False: 683]
  ------------------
   77|  1.44k|          return &attribute_data_[i].connectivity_data;
   78|  1.44k|        }
   79|    683|        return nullptr;
   80|  2.13k|      }
   81|  5.46k|    }
   82|  2.13k|  }
   83|    665|  return nullptr;
   84|  2.79k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  2.79k|    int att_id) const {
   90|  3.97k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 3.31k, False: 665]
  ------------------
   91|  3.31k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  3.31k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.17k, False: 2.13k]
  |  Branch (92:27): [True: 0, False: 2.13k]
  ------------------
   93|  1.17k|      continue;
   94|  1.17k|    }
   95|  2.13k|    const AttributesDecoderInterface *const dec =
   96|  2.13k|        decoder_->attributes_decoder(decoder_id);
   97|  5.46k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 5.46k, False: 6]
  ------------------
   98|  5.46k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 2.13k, False: 3.33k]
  ------------------
   99|  2.13k|        return &attribute_data_[i].encoding_data;
  100|  2.13k|      }
  101|  5.46k|    }
  102|  2.13k|  }
  103|    665|  return &pos_encoding_data_;
  104|  2.79k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  1.86k|    int32_t att_decoder_id) {
  131|  1.86k|  int8_t att_data_id;
  132|  1.86k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 1.86k]
  ------------------
  133|      0|    return false;
  134|      0|  }
  135|  1.86k|  uint8_t decoder_type;
  136|  1.86k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 1.86k]
  ------------------
  137|      0|    return false;
  138|      0|  }
  139|       |
  140|  1.86k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.39k, False: 468]
  ------------------
  141|  1.39k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 36, False: 1.35k]
  ------------------
  142|     36|      return false;  // Unexpected attribute data.
  143|     36|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  1.35k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 2, False: 1.35k]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|       |
  151|  1.35k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  1.35k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    468|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 467]
  ------------------
  155|      1|      return false;  // Some other decoder is already using the data. Error.
  156|      1|    }
  157|    467|    pos_data_decoder_id_ = att_decoder_id;
  158|    467|  }
  159|       |
  160|  1.82k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.82k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.82k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.81k, False: 6]
  ------------------
  162|  1.81k|    uint8_t traversal_method_encoded;
  163|  1.81k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 1, False: 1.81k]
  ------------------
  164|      1|      return false;
  165|      1|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.81k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 17, False: 1.79k]
  ------------------
  168|     17|      return false;
  169|     17|    }
  170|  1.79k|    traversal_method =
  171|  1.79k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.79k|  }
  173|       |
  174|  1.80k|  const Mesh *mesh = decoder_->mesh();
  175|  1.80k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.80k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 904, False: 900]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    904|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    904|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 455, False: 449]
  ------------------
  182|    455|      encoding_data = &pos_encoding_data_;
  183|    455|    } else {
  184|    449|      encoding_data = &attribute_data_[att_data_id].encoding_data;
  185|       |      // Mark the attribute connectivity data invalid to ensure it's not used
  186|       |      // later on.
  187|    449|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    449|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    904|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 82, False: 822]
  ------------------
  191|     82|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     82|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     82|          AttTraverser;
  194|     82|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    822|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 822, False: 0]
  ------------------
  196|    822|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    822|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    822|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    822|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    904|  } else {
  203|    900|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 13, False: 887]
  ------------------
  204|     13|      return false;  // Unsupported method.
  205|     13|    }
  206|    887|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 1, False: 886]
  ------------------
  207|      1|      return false;  // Attribute data must be specified.
  208|      1|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    886|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    886|        AttObserver;
  214|    886|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    886|        AttTraverser;
  216|       |
  217|    886|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|    886|        &attribute_data_[att_data_id].encoding_data;
  219|    886|    const MeshAttributeCornerTable *const corner_table =
  220|    886|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    886|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    886|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    886|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    886|                             encoding_data);
  227|       |
  228|    886|    AttTraverser att_traverser;
  229|    886|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    886|    traversal_sequencer->SetTraverser(att_traverser);
  232|    886|    sequencer = std::move(traversal_sequencer);
  233|    886|  }
  234|       |
  235|  1.79k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.79k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.79k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.79k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.79k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.79k|                                        std::move(att_controller));
  244|  1.79k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  2.12k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.12k|  num_new_vertices_ = 0;
  249|  2.12k|  new_to_parent_vertex_map_.clear();
  250|  2.12k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.12k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 360, False: 1.76k]
  ------------------
  252|    360|    uint32_t num_new_verts;
  253|    360|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    360|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 104, False: 256]
  ------------------
  254|    104|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 104]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    256|    } else {
  258|    256|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 256]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    256|    }
  262|    360|    num_new_vertices_ = num_new_verts;
  263|    360|  }
  264|  2.12k|#endif
  265|       |
  266|  2.12k|  uint32_t num_encoded_vertices;
  267|  2.12k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.12k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 104, False: 2.01k]
  ------------------
  269|    104|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 104]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    104|  } else
  274|  2.01k|#endif
  275|  2.01k|  {
  276|  2.01k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 1, False: 2.01k]
  ------------------
  277|      1|      return false;
  278|      1|    }
  279|  2.01k|  }
  280|  2.12k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.12k|  uint32_t num_faces;
  283|  2.12k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.12k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 104, False: 2.01k]
  ------------------
  285|    104|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 104]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    104|  } else
  290|  2.01k|#endif
  291|  2.01k|  {
  292|  2.01k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.01k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.01k|  }
  296|  2.12k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 2.12k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  2.12k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 1, False: 2.12k]
  ------------------
  301|      1|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      1|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.12k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  2.12k|  const uint64_t num_encoded_vertices_64 =
  311|  2.12k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.12k|  const uint64_t max_num_vertex_edges =
  313|  2.12k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.12k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 2.12k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  2.12k|  uint8_t num_attribute_data;
  320|  2.12k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.12k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.12k|  uint32_t num_encoded_symbols;
  325|  2.12k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.12k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 102, False: 2.01k]
  ------------------
  327|    102|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 102]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    102|  } else
  332|  2.01k|#endif
  333|  2.01k|  {
  334|  2.01k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.01k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.01k|  }
  338|       |
  339|  2.12k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 8, False: 2.11k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|      8|    return false;
  344|      8|  }
  345|  2.11k|  const uint32_t max_encoded_faces =
  346|  2.11k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.11k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 5, False: 2.10k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      5|    return false;
  352|      5|  }
  353|       |
  354|  2.10k|  uint32_t num_encoded_split_symbols;
  355|  2.10k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.10k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.10k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 90, False: 2.01k]
  ------------------
  357|     90|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 90]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     90|  } else
  362|  2.01k|#endif
  363|  2.01k|  {
  364|  2.01k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.01k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.01k|  }
  368|       |
  369|  2.10k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 1, False: 2.10k]
  ------------------
  370|      1|    return false;  // Split symbols are a sub-set of all symbols.
  371|      1|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.10k|  vertex_traversal_length_.clear();
  375|  2.10k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.10k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.10k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.10k|  processed_corner_ids_.clear();
  380|  2.10k|  processed_corner_ids_.reserve(num_faces);
  381|  2.10k|  processed_connectivity_corners_.clear();
  382|  2.10k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.10k|  topology_split_data_.clear();
  384|  2.10k|  hole_event_data_.clear();
  385|  2.10k|  init_face_configurations_.clear();
  386|  2.10k|  init_corners_.clear();
  387|       |
  388|  2.10k|  last_symbol_id_ = -1;
  389|  2.10k|  last_face_id_ = -1;
  390|  2.10k|  last_vert_id_ = -1;
  391|       |
  392|  2.10k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.10k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.10k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 2.10k]
  ------------------
  397|  2.10k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  2.10k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.10k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.10k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.10k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.10k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 345, False: 1.76k]
  ------------------
  411|    345|    uint32_t encoded_connectivity_size;
  412|    345|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    345|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 89, False: 256]
  ------------------
  413|     89|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 89]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    256|    } else {
  417|    256|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 256]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    256|    }
  421|    345|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 344]
  ------------------
  422|    344|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 6, False: 338]
  ------------------
  423|      7|      return false;
  424|      7|    }
  425|    338|    DecoderBuffer event_buffer;
  426|    338|    event_buffer.Init(
  427|    338|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    338|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    338|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    338|    topology_split_decoded_bytes =
  432|    338|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    338|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 78, False: 260]
  ------------------
  434|     78|      return false;
  435|     78|    }
  436|       |
  437|    338|  } else
  438|  1.76k|#endif
  439|  1.76k|  {
  440|  1.76k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 5, False: 1.75k]
  ------------------
  441|      5|      return false;
  442|      5|    }
  443|  1.76k|  }
  444|       |
  445|  2.01k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.01k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.01k|                                           num_encoded_split_symbols);
  449|  2.01k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.01k|  DecoderBuffer traversal_end_buffer;
  452|  2.01k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 24, False: 1.99k]
  ------------------
  453|     24|    return false;
  454|     24|  }
  455|       |
  456|  1.99k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.99k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 153, False: 1.83k]
  ------------------
  458|    153|    return false;
  459|    153|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.83k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.83k|                           traversal_end_buffer.remaining_size(),
  464|  1.83k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.83k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.83k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.83k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 224, False: 1.61k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    224|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    224|  }
  471|  1.83k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.83k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.81k, False: 21]
  ------------------
  475|  1.81k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.81k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.81k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 222, False: 1.59k]
  ------------------
  477|    750|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 528, False: 222]
  ------------------
  478|    528|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 528]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|    528|      }
  482|       |
  483|    222|    } else
  484|  1.59k|#endif
  485|  1.59k|    {
  486|   254k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 253k, False: 1.59k]
  ------------------
  487|   253k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 253k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   253k|      }
  491|  1.59k|    }
  492|  1.81k|  }
  493|  1.83k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  5.60k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 3.76k, False: 1.83k]
  ------------------
  498|  3.76k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   636k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 636k, False: 3.76k]
  ------------------
  501|   636k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   636k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  3.76k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 3.76k]
  ------------------
  505|  3.76k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  3.76k|  }
  509|       |
  510|  1.83k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  5.60k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 3.76k, False: 1.83k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  3.76k|    int32_t att_connectivity_verts =
  517|  3.76k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  3.76k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 405, False: 3.36k]
  ------------------
  519|    405|      att_connectivity_verts = corner_table_->num_vertices();
  520|    405|    }
  521|  3.76k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  3.76k|  }
  523|  1.83k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 1, False: 1.83k]
  ------------------
  524|      1|    return false;
  525|      1|  }
  526|  1.83k|  return true;
  527|  1.83k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    275|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    275|  return true;
  532|    275|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  1.99k|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|  1.99k|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|  1.99k|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|  1.99k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.99k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.99k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.99k|  int num_faces = 0;
  562|  31.4M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 31.4M, False: 1.87k]
  ------------------
  563|  31.4M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  31.4M|    bool check_topology_split = false;
  566|  31.4M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  31.4M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 14.2M, False: 17.2M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  14.2M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 14.2M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  14.2M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  14.2M|      const VertexIndex vertex_x =
  593|  14.2M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  14.2M|      const CornerIndex corner_b =
  595|  14.2M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  14.2M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 90, False: 14.2M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     90|        return -1;
  600|     90|      }
  601|  14.2M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 14.2M]
  |  Branch (601:11): [True: 0, False: 14.2M]
  ------------------
  602|  14.2M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 14.2M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  14.2M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  14.2M|      SetOppositeCorners(corner_a, corner + 1);
  612|  14.2M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  14.2M|      const VertexIndex vert_a_prev =
  616|  14.2M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  14.2M|      const VertexIndex vert_b_next =
  618|  14.2M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  14.2M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 14.2M]
  |  Branch (619:38): [True: 0, False: 14.2M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  14.2M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  14.2M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  14.2M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  14.2M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  14.2M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  14.2M|      active_corner_stack.back() = corner;
  631|  17.2M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 4.63M, False: 12.5M]
  |  Branch (631:40): [True: 3.10M, False: 9.47M]
  ------------------
  632|       |      // Create a new face extending from the open boundary edge opposite to the
  633|       |      // corner "a" from the image below. Two new boundary edges are created
  634|       |      // opposite to corners "r" and "l". New active corner is set to either "r"
  635|       |      // or "l" depending on the decoded symbol. One new vertex is created
  636|       |      // at the opposite corner to corner "a".
  637|       |      //     *-------*
  638|       |      //    /a\     / \
  639|       |      //   /   \   /   \
  640|       |      //  /     \ /     \
  641|       |      // *-------v-------*
  642|       |      //  .l   r.
  643|       |      //   .   .
  644|       |      //    . .
  645|       |      //     *
  646|  7.74M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 7.74M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  7.74M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  7.74M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 7.74M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  7.74M|      const CornerIndex corner(3 * face.value());
  658|  7.74M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  7.74M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 4.63M, False: 3.10M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  4.63M|        opp_corner = corner + 2;
  662|  4.63M|        corner_l = corner + 1;
  663|  4.63M|        corner_r = corner;
  664|  4.63M|      } else {
  665|       |        // "l" is the new first corner.
  666|  3.10M|        opp_corner = corner + 1;
  667|  3.10M|        corner_l = corner;
  668|  3.10M|        corner_r = corner + 2;
  669|  3.10M|      }
  670|  7.74M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  7.74M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  7.74M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 7.74M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  7.74M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  7.74M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  7.74M|      const VertexIndex vertex_r =
  682|  7.74M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  7.74M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  7.74M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  7.74M|      corner_table_->MapCornerToVertex(
  688|  7.74M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  7.74M|      active_corner_stack.back() = corner;
  690|  7.74M|      check_topology_split = true;
  691|  9.47M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 4.70M, False: 4.77M]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  4.70M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 4.70M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  4.70M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  4.70M|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  4.70M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  4.70M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 56, False: 4.70M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     56|        active_corner_stack.push_back(it->second);
  714|     56|      }
  715|  4.70M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 6, False: 4.70M]
  ------------------
  716|      6|        return -1;
  717|      6|      }
  718|  4.70M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  4.70M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 4.70M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  4.70M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 0, False: 4.70M]
  |  Branch (724:11): [True: 0, False: 4.70M]
  ------------------
  725|  4.70M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 4.70M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      0|        return -1;
  729|      0|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  4.70M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  4.70M|      SetOppositeCorners(corner_a, corner + 2);
  735|  4.70M|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  4.70M|      const VertexIndex vertex_p =
  739|  4.70M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  4.70M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  4.70M|      corner_table_->MapCornerToVertex(
  742|  4.70M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  4.70M|      const VertexIndex vert_b_prev =
  744|  4.70M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  4.70M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  4.70M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  4.70M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  4.70M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  4.70M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  4.70M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  4.70M|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  4.70M|      const CornerIndex first_corner = corner_n;
  757|  19.2M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 14.5M, False: 4.70M]
  ------------------
  758|  14.5M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  14.5M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  14.5M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 14.5M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|  14.5M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  4.70M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  4.70M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 1.79M, False: 2.91M]
  ------------------
  770|  1.79M|        invalid_vertices.push_back(vertex_n);
  771|  1.79M|      }
  772|  4.70M|      active_corner_stack.back() = corner;
  773|  4.77M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.77M, False: 0]
  ------------------
  774|  4.77M|      const CornerIndex corner(3 * face.value());
  775|  4.77M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.77M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.77M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.77M|                                       corner_table_->AddNewVertex());
  780|  4.77M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.77M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.77M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 4.77M]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  4.77M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.77M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.77M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.77M|      active_corner_stack.push_back(corner);
  792|  4.77M|      check_topology_split = true;
  793|  4.77M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|      0|      return -1;
  796|      0|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  31.4M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  31.4M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 12.5M, False: 18.9M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  12.5M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  12.5M|      EdgeFaceName split_edge;
  812|  12.5M|      int encoder_split_symbol_id;
  813|  12.5M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.63k, False: 12.5M]
  ------------------
  814|  12.5M|                             &encoder_split_symbol_id)) {
  815|  1.63k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 15, False: 1.61k]
  ------------------
  816|     15|          return -1;  // Wrong split symbol id.
  817|     15|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  1.61k|        const CornerIndex act_top_corner = active_corner_stack.back();
  821|       |        // The current symbol has one active edge (stored in act_top_corner) and
  822|       |        // two remaining inactive edges that are attached to it.
  823|       |        //              *
  824|       |        //             / \
  825|       |        //  left_edge /   \ right_edge
  826|       |        //           /     \
  827|       |        //          *.......*
  828|       |        //         active_edge
  829|       |
  830|  1.61k|        CornerIndex new_active_corner;
  831|  1.61k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 796, False: 821]
  ------------------
  832|    796|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    821|        } else {
  834|    821|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    821|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.61k|        const int decoder_split_symbol_id =
  839|  1.61k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.61k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.61k|            new_active_corner;
  842|  1.61k|      }
  843|  12.5M|    }
  844|  31.4M|  }
  845|  1.87k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.87k]
  ------------------
  846|      0|    return -1;  // Unexpected number of decoded vertices.
  847|      0|  }
  848|       |  // Decode start faces and connect them to the faces from the active stack.
  849|  26.3k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 24.5k, False: 1.83k]
  ------------------
  850|  24.5k|    const CornerIndex corner = active_corner_stack.back();
  851|  24.5k|    active_corner_stack.pop_back();
  852|  24.5k|    const bool interior_face =
  853|  24.5k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  24.5k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 17.0k, False: 7.49k]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  17.0k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 10, False: 17.0k]
  ------------------
  877|     10|        return -1;  // More faces than expected added to the mesh.
  878|     10|      }
  879|       |
  880|  17.0k|      const CornerIndex corner_a = corner;
  881|  17.0k|      const VertexIndex vert_n =
  882|  17.0k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  17.0k|      const CornerIndex corner_b =
  884|  17.0k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  17.0k|      const VertexIndex vert_x =
  887|  17.0k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  17.0k|      const CornerIndex corner_c =
  889|  17.0k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  17.0k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 4, False: 17.0k]
  |  Branch (891:33): [True: 24, False: 17.0k]
  |  Branch (891:55): [True: 0, False: 17.0k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     28|        return -1;
  894|     28|      }
  895|  17.0k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 17.0k]
  |  Branch (895:11): [True: 0, False: 17.0k]
  ------------------
  896|  17.0k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 17.0k]
  ------------------
  897|  17.0k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 17.0k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      0|        return -1;
  901|      0|      }
  902|       |
  903|  17.0k|      const VertexIndex vert_p =
  904|  17.0k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  17.0k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  17.0k|      const CornerIndex new_corner(3 * face.value());
  909|  17.0k|      SetOppositeCorners(new_corner, corner);
  910|  17.0k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  17.0k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  17.0k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  17.0k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  17.0k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  68.0k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 51.0k, False: 17.0k]
  ------------------
  920|  51.0k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  51.0k|      }
  922|       |
  923|  17.0k|      init_face_configurations_.push_back(true);
  924|  17.0k|      init_corners_.push_back(new_corner);
  925|  17.0k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  7.49k|      init_face_configurations_.push_back(false);
  930|  7.49k|      init_corners_.push_back(corner);
  931|  7.49k|    }
  932|  24.5k|  }
  933|  1.83k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 0, False: 1.83k]
  ------------------
  934|      0|    return -1;  // Unexpected number of decoded faces.
  935|      0|  }
  936|       |
  937|  1.83k|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  8.62k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 8.62k, False: 1.83k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  8.62k|    VertexIndex src_vert(num_vertices - 1);
  943|  9.69k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 1.06k, False: 8.62k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|  1.06k|      src_vert = VertexIndex(--num_vertices - 1);
  946|  1.06k|    }
  947|  8.62k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 1.06k, False: 7.55k]
  ------------------
  948|  1.06k|      continue;  // No need to swap anything.
  949|  1.06k|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  7.55k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  75.5k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 67.9k, False: 7.55k]
  ------------------
  954|  67.9k|      const CornerIndex cid = vcit.Corner();
  955|  67.9k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 67.9k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|  67.9k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  67.9k|    }
  962|  7.55k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  7.55k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  7.55k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  7.55k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  7.55k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  7.55k|    num_vertices--;
  972|  7.55k|  }
  973|  1.83k|  return num_vertices;
  974|  1.83k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.09k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.09k|  uint32_t num_topology_splits;
  982|  2.09k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.09k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.09k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 82, False: 2.01k]
  ------------------
  984|     82|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 82]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     82|  } else
  989|  2.01k|#endif
  990|  2.01k|  {
  991|  2.01k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.01k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.01k|  }
  995|  2.09k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 1.24k, False: 850]
  ------------------
  996|  1.24k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 1, False: 1.24k]
  ------------------
  997|  1.24k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      1|      return -1;
  999|      1|    }
 1000|  1.24k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  1.24k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.24k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 43, False: 1.20k]
  ------------------
 1002|  10.3k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 10.3k, False: 23]
  ------------------
 1003|  10.3k|        TopologySplitEventData event_data;
 1004|  10.3k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 13, False: 10.2k]
  ------------------
 1005|     13|          return -1;
 1006|     13|        }
 1007|  10.2k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 5, False: 10.2k]
  ------------------
 1008|      5|          return -1;
 1009|      5|        }
 1010|  10.2k|        uint8_t edge_data;
 1011|  10.2k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 10.2k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|  10.2k|        event_data.source_edge = edge_data & 1;
 1015|  10.2k|        topology_split_data_.push_back(event_data);
 1016|  10.2k|      }
 1017|       |
 1018|     43|    } else
 1019|  1.20k|#endif
 1020|  1.20k|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|  1.20k|      int last_source_symbol_id = 0;
 1024|  5.01k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 3.81k, False: 1.20k]
  ------------------
 1025|  3.81k|        TopologySplitEventData event_data;
 1026|  3.81k|        uint32_t delta;
 1027|  3.81k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 5, False: 3.81k]
  ------------------
 1028|      5|          return -1;
 1029|      5|        }
 1030|  3.81k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  3.81k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 3.81k]
  ------------------
 1032|      0|          return -1;
 1033|      0|        }
 1034|  3.81k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 3.81k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  3.81k|        event_data.split_symbol_id =
 1038|  3.81k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  3.81k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  3.81k|        topology_split_data_.push_back(event_data);
 1041|  3.81k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  1.20k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.59k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.39k, False: 1.20k]
  ------------------
 1045|  3.39k|        uint32_t edge_data;
 1046|  3.39k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 832, False: 2.56k]
  ------------------
 1047|    832|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  2.56k|        } else {
 1049|  2.56k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  2.56k|        }
 1051|  3.39k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  3.39k|        event_data.source_edge = edge_data & 1;
 1053|  3.39k|      }
 1054|  1.20k|      decoder_buffer->EndBitDecoding();
 1055|  1.20k|    }
 1056|  1.24k|  }
 1057|  2.07k|  uint32_t num_hole_events = 0;
 1058|  2.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.07k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.07k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 61, False: 2.01k]
  ------------------
 1060|     61|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 1, False: 60]
  ------------------
 1061|      1|      return -1;
 1062|      1|    }
 1063|  2.01k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.01k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 238, False: 1.77k]
  ------------------
 1064|    238|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 1, False: 237]
  ------------------
 1065|      1|      return -1;
 1066|      1|    }
 1067|    238|  }
 1068|  2.07k|#endif
 1069|  2.07k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 62, False: 2.00k]
  ------------------
 1070|     62|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     62|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     62|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 47, False: 15]
  ------------------
 1072|   311k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 311k, False: 4]
  ------------------
 1073|   311k|        HoleEventData event_data;
 1074|   311k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 43, False: 311k]
  ------------------
 1075|     43|          return -1;
 1076|     43|        }
 1077|   311k|        hole_event_data_.push_back(event_data);
 1078|   311k|      }
 1079|       |
 1080|     47|    } else
 1081|     15|#endif
 1082|     15|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     15|      int last_symbol_id = 0;
 1085|   660k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 660k, False: 3]
  ------------------
 1086|   660k|        HoleEventData event_data;
 1087|   660k|        uint32_t delta;
 1088|   660k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 12, False: 660k]
  ------------------
 1089|     12|          return -1;
 1090|     12|        }
 1091|   660k|        event_data.symbol_id = delta + last_symbol_id;
 1092|   660k|        last_symbol_id = event_data.symbol_id;
 1093|   660k|        hole_event_data_.push_back(event_data);
 1094|   660k|      }
 1095|     15|    }
 1096|     62|  }
 1097|  2.01k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.07k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|    528|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|    528|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|    528|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  2.11k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.58k, False: 528]
  ------------------
 1109|  1.58k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.58k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.03k, False: 554]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  2.18k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 1.15k, False: 1.03k]
  ------------------
 1114|  1.15k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  1.15k|      }
 1116|  1.03k|      continue;
 1117|  1.03k|    }
 1118|       |
 1119|  1.12k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 566, False: 554]
  ------------------
 1120|    566|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|    566|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 61, False: 505]
  ------------------
 1122|     61|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|     61|      }
 1124|    566|    }
 1125|    554|  }
 1126|    528|  return true;
 1127|    528|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   253k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   253k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   253k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   253k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.01M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 760k, False: 253k]
  ------------------
 1139|   760k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   760k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 36.0k, False: 724k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   107k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 71.4k, False: 36.0k]
  ------------------
 1144|  71.4k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|  71.4k|      }
 1146|  36.0k|      continue;
 1147|  36.0k|    }
 1148|   724k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   724k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 362k, False: 362k]
  ------------------
 1151|   362k|      continue;
 1152|   362k|    }
 1153|       |
 1154|  1.07M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 708k, False: 362k]
  ------------------
 1155|   708k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   708k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 564k, False: 144k]
  ------------------
 1157|   564k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   564k|      }
 1159|   708k|    }
 1160|   362k|  }
 1161|   253k|  return true;
 1162|   253k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  1.83k|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|  1.83k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.83k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 21, False: 1.81k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   158k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 158k, False: 21]
  ------------------
 1176|   158k|      Mesh::Face face;
 1177|   158k|      const CornerIndex start_corner(3 * f.value());
 1178|   633k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 474k, False: 158k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   474k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   474k|        face[c] = vert_id;
 1182|   474k|      }
 1183|   158k|      decoder_->mesh()->SetFace(f, face);
 1184|   158k|    }
 1185|     21|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     21|    return true;
 1187|     21|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  1.81k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.81k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   158k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 156k, False: 1.81k]
  ------------------
 1197|   156k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   156k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 16.0k, False: 140k]
  ------------------
 1199|  16.0k|      continue;  // Isolated vertex.
 1200|  16.0k|    }
 1201|   140k|    CornerIndex deduplication_first_corner = c;
 1202|   140k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 32.1k, False: 108k]
  ------------------
 1203|       |      // If the vertex is on a boundary, start deduplication from the left most
 1204|       |      // corner that is guaranteed to lie on the boundary.
 1205|  32.1k|      deduplication_first_corner = c;
 1206|   108k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   136k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 119k, False: 17.0k]
  ------------------
 1210|   119k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 17.8k, False: 102k]
  ------------------
 1211|  17.8k|          continue;  // No seam for this attribute, ignore it.
 1212|  17.8k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|   102k|        const VertexIndex vert_id =
 1217|   102k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   102k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   102k|        bool seam_found = false;
 1220|   152k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 141k, False: 11.0k]
  ------------------
 1221|   141k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 1, False: 141k]
  ------------------
 1222|      1|            return false;
 1223|      1|          }
 1224|   141k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 91.0k, False: 50.4k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  91.0k|            deduplication_first_corner = act_c;
 1227|  91.0k|            seam_found = true;
 1228|  91.0k|            break;
 1229|  91.0k|          }
 1230|  50.4k|          act_c = corner_table_->SwingRight(act_c);
 1231|  50.4k|        }
 1232|   102k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 91.0k, False: 11.0k]
  ------------------
 1233|  91.0k|          break;  // No reason to process other attributes if we found a seam.
 1234|  91.0k|        }
 1235|   102k|      }
 1236|   108k|    }
 1237|       |
 1238|       |    // Do a deduplication pass over the corners on the processed vertex.
 1239|       |    // At this point each corner corresponds to one point id and our goal is to
 1240|       |    // merge similar points into a single point id.
 1241|       |    // We do a single pass in a clockwise direction over the corners and we add
 1242|       |    // a new point id whenever one of the attributes change.
 1243|   140k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   140k|    corner_to_point_map[c.value()] =
 1246|   140k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   140k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   140k|    CornerIndex prev_c = c;
 1250|   140k|    c = corner_table_->SwingRight(c);
 1251|   728k|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 695k, False: 32.4k]
  |  Branch (1251:40): [True: 588k, False: 107k]
  ------------------
 1252|   588k|      bool attribute_seam = false;
 1253|   777k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 684k, False: 92.1k]
  ------------------
 1254|   684k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 495k, False: 188k]
  ------------------
 1255|   684k|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|   495k|          attribute_seam = true;
 1259|   495k|          break;
 1260|   495k|        }
 1261|   684k|      }
 1262|   588k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 495k, False: 92.1k]
  ------------------
 1263|   495k|        corner_to_point_map[c.value()] =
 1264|   495k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   495k|        point_to_corner_map.push_back(c.value());
 1266|   495k|      } else {
 1267|  92.1k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  92.1k|      }
 1269|   588k|      prev_c = c;
 1270|   588k|      c = corner_table_->SwingRight(c);
 1271|   588k|    }
 1272|   140k|  }
 1273|       |  // Add faces.
 1274|   242k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 240k, False: 1.81k]
  ------------------
 1275|   240k|    Mesh::Face face;
 1276|   960k|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 720k, False: 240k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   720k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   720k|    }
 1280|   240k|    decoder_->mesh()->SetFace(f, face);
 1281|   240k|  }
 1282|  1.81k|  decoder_->point_cloud()->set_num_points(
 1283|  1.81k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.81k|  return true;
 1285|  1.81k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  1.47k|    : decoder_(nullptr),
   49|  1.47k|      last_symbol_id_(-1),
   50|  1.47k|      last_vert_id_(-1),
   51|  1.47k|      last_face_id_(-1),
   52|  1.47k|      num_new_vertices_(0),
   53|  1.47k|      num_encoded_vertices_(0),
   54|  1.47k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  1.47k|    MeshEdgebreakerDecoder *decoder) {
   59|  1.47k|  decoder_ = decoder;
   60|  1.47k|  return true;
   61|  1.47k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  1.83k|    int att_id) const {
   67|  2.90k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.30k, False: 609]
  ------------------
   68|  2.30k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.30k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.06k, False: 1.23k]
  |  Branch (69:27): [True: 0, False: 1.23k]
  ------------------
   70|  1.06k|      continue;
   71|  1.06k|    }
   72|  1.23k|    const AttributesDecoderInterface *const dec =
   73|  1.23k|        decoder_->attributes_decoder(decoder_id);
   74|  4.07k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 4.06k, False: 4]
  ------------------
   75|  4.06k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.22k, False: 2.84k]
  ------------------
   76|  1.22k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 937, False: 290]
  ------------------
   77|    937|          return &attribute_data_[i].connectivity_data;
   78|    937|        }
   79|    290|        return nullptr;
   80|  1.22k|      }
   81|  4.06k|    }
   82|  1.23k|  }
   83|    609|  return nullptr;
   84|  1.83k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  1.83k|    int att_id) const {
   90|  2.90k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.30k, False: 609]
  ------------------
   91|  2.30k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.30k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.06k, False: 1.23k]
  |  Branch (92:27): [True: 0, False: 1.23k]
  ------------------
   93|  1.06k|      continue;
   94|  1.06k|    }
   95|  1.23k|    const AttributesDecoderInterface *const dec =
   96|  1.23k|        decoder_->attributes_decoder(decoder_id);
   97|  4.07k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 4.06k, False: 4]
  ------------------
   98|  4.06k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.22k, False: 2.84k]
  ------------------
   99|  1.22k|        return &attribute_data_[i].encoding_data;
  100|  1.22k|      }
  101|  4.06k|    }
  102|  1.23k|  }
  103|    609|  return &pos_encoding_data_;
  104|  1.83k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.15k|    int32_t att_decoder_id) {
  131|  1.15k|  int8_t att_data_id;
  132|  1.15k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 1, False: 1.15k]
  ------------------
  133|      1|    return false;
  134|      1|  }
  135|  1.15k|  uint8_t decoder_type;
  136|  1.15k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 3, False: 1.15k]
  ------------------
  137|      3|    return false;
  138|      3|  }
  139|       |
  140|  1.15k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 781, False: 371]
  ------------------
  141|    781|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 31, False: 750]
  ------------------
  142|     31|      return false;  // Unexpected attribute data.
  143|     31|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    750|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 1, False: 749]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|       |
  151|    749|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    749|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    371|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 371]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|    371|    pos_data_decoder_id_ = att_decoder_id;
  158|    371|  }
  159|       |
  160|  1.12k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.12k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.12k, False: 0]
  ------------------
  162|  1.12k|    uint8_t traversal_method_encoded;
  163|  1.12k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.12k]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.12k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 9, False: 1.11k]
  ------------------
  168|      9|      return false;
  169|      9|    }
  170|  1.11k|    traversal_method =
  171|  1.11k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.11k|  }
  173|       |
  174|  1.11k|  const Mesh *mesh = decoder_->mesh();
  175|  1.11k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.11k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 552, False: 559]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    552|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    552|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 363, False: 189]
  ------------------
  182|    363|      encoding_data = &pos_encoding_data_;
  183|    363|    } else {
  184|    189|      encoding_data = &attribute_data_[att_data_id].encoding_data;
  185|       |      // Mark the attribute connectivity data invalid to ensure it's not used
  186|       |      // later on.
  187|    189|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    189|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    552|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 188, False: 364]
  ------------------
  191|    188|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    188|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    188|          AttTraverser;
  194|    188|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    364|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 364, False: 0]
  ------------------
  196|    364|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    364|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    364|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    364|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    559|  } else {
  203|    559|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 1, False: 558]
  ------------------
  204|      1|      return false;  // Unsupported method.
  205|      1|    }
  206|    558|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 3, False: 555]
  ------------------
  207|      3|      return false;  // Attribute data must be specified.
  208|      3|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    555|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    555|        AttObserver;
  214|    555|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    555|        AttTraverser;
  216|       |
  217|    555|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|    555|        &attribute_data_[att_data_id].encoding_data;
  219|    555|    const MeshAttributeCornerTable *const corner_table =
  220|    555|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    555|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    555|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    555|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    555|                             encoding_data);
  227|       |
  228|    555|    AttTraverser att_traverser;
  229|    555|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    555|    traversal_sequencer->SetTraverser(att_traverser);
  232|    555|    sequencer = std::move(traversal_sequencer);
  233|    555|  }
  234|       |
  235|  1.10k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.10k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.10k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.10k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.10k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.10k|                                        std::move(att_controller));
  244|  1.10k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  1.47k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  1.47k|  num_new_vertices_ = 0;
  249|  1.47k|  new_to_parent_vertex_map_.clear();
  250|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  1.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 515, False: 962]
  ------------------
  252|    515|    uint32_t num_new_verts;
  253|    515|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    515|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 145, False: 370]
  ------------------
  254|    145|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 145]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    370|    } else {
  258|    370|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 370]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    370|    }
  262|    515|    num_new_vertices_ = num_new_verts;
  263|    515|  }
  264|  1.47k|#endif
  265|       |
  266|  1.47k|  uint32_t num_encoded_vertices;
  267|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  1.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 145, False: 1.33k]
  ------------------
  269|    145|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 145]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    145|  } else
  274|  1.33k|#endif
  275|  1.33k|  {
  276|  1.33k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 1.33k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  1.33k|  }
  280|  1.47k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  1.47k|  uint32_t num_faces;
  283|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  1.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 145, False: 1.33k]
  ------------------
  285|    145|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 145]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    145|  } else
  290|  1.33k|#endif
  291|  1.33k|  {
  292|  1.33k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1.33k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  1.33k|  }
  296|  1.47k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 1, False: 1.47k]
  ------------------
  297|      1|    return false;  // Draco cannot handle this many faces.
  298|      1|  }
  299|       |
  300|  1.47k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 1.47k]
  ------------------
  301|      2|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      2|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  1.47k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  1.47k|  const uint64_t num_encoded_vertices_64 =
  311|  1.47k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  1.47k|  const uint64_t max_num_vertex_edges =
  313|  1.47k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  1.47k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 1.47k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  1.47k|  uint8_t num_attribute_data;
  320|  1.47k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 1.47k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  1.47k|  uint32_t num_encoded_symbols;
  325|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  1.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 142, False: 1.33k]
  ------------------
  327|    142|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 142]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    142|  } else
  332|  1.33k|#endif
  333|  1.33k|  {
  334|  1.33k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 1.33k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  1.33k|  }
  338|       |
  339|  1.47k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 1.47k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|      2|    return false;
  344|      2|  }
  345|  1.47k|  const uint32_t max_encoded_faces =
  346|  1.47k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  1.47k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 8, False: 1.46k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      8|    return false;
  352|      8|  }
  353|       |
  354|  1.46k|  uint32_t num_encoded_split_symbols;
  355|  1.46k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  1.46k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.46k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 132, False: 1.33k]
  ------------------
  357|    132|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 132]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    132|  } else
  362|  1.33k|#endif
  363|  1.33k|  {
  364|  1.33k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.33k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  1.33k|  }
  368|       |
  369|  1.46k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 3, False: 1.46k]
  ------------------
  370|      3|    return false;  // Split symbols are a sub-set of all symbols.
  371|      3|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  1.46k|  vertex_traversal_length_.clear();
  375|  1.46k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  1.46k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 1.46k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  1.46k|  processed_corner_ids_.clear();
  380|  1.46k|  processed_corner_ids_.reserve(num_faces);
  381|  1.46k|  processed_connectivity_corners_.clear();
  382|  1.46k|  processed_connectivity_corners_.reserve(num_faces);
  383|  1.46k|  topology_split_data_.clear();
  384|  1.46k|  hole_event_data_.clear();
  385|  1.46k|  init_face_configurations_.clear();
  386|  1.46k|  init_corners_.clear();
  387|       |
  388|  1.46k|  last_symbol_id_ = -1;
  389|  1.46k|  last_face_id_ = -1;
  390|  1.46k|  last_vert_id_ = -1;
  391|       |
  392|  1.46k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  1.46k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  1.46k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 1.46k]
  ------------------
  397|  1.46k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  1.46k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  1.46k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  1.46k|  int32_t topology_split_decoded_bytes = -1;
  410|  1.46k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.46k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 499, False: 962]
  ------------------
  411|    499|    uint32_t encoded_connectivity_size;
  412|    499|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    499|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 129, False: 370]
  ------------------
  413|    129|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 129]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    370|    } else {
  417|    370|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 370]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    370|    }
  421|    499|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 499]
  ------------------
  422|    499|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 5, False: 494]
  ------------------
  423|      5|      return false;
  424|      5|    }
  425|    494|    DecoderBuffer event_buffer;
  426|    494|    event_buffer.Init(
  427|    494|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    494|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    494|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    494|    topology_split_decoded_bytes =
  432|    494|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    494|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 136, False: 358]
  ------------------
  434|    136|      return false;
  435|    136|    }
  436|       |
  437|    494|  } else
  438|    962|#endif
  439|    962|  {
  440|    962|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 1, False: 961]
  ------------------
  441|      1|      return false;
  442|      1|    }
  443|    962|  }
  444|       |
  445|  1.31k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.31k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.31k|                                           num_encoded_split_symbols);
  449|  1.31k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.31k|  DecoderBuffer traversal_end_buffer;
  452|  1.31k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 43, False: 1.27k]
  ------------------
  453|     43|    return false;
  454|     43|  }
  455|       |
  456|  1.27k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.27k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 116, False: 1.16k]
  ------------------
  458|    116|    return false;
  459|    116|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.16k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.16k|                           traversal_end_buffer.remaining_size(),
  464|  1.16k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.16k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.16k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.16k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 315, False: 845]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    315|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    315|  }
  471|  1.16k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.16k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.10k, False: 56]
  ------------------
  475|  1.10k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.10k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.10k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 230, False: 874]
  ------------------
  477|   467k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 466k, False: 230]
  ------------------
  478|   466k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 466k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   466k|      }
  482|       |
  483|    230|    } else
  484|    874|#endif
  485|    874|    {
  486|  6.28M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 6.28M, False: 874]
  ------------------
  487|  6.28M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 6.28M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  6.28M|      }
  491|    874|    }
  492|  1.10k|  }
  493|  1.16k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  2.68k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.52k, False: 1.16k]
  ------------------
  498|  1.52k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  9.94M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 9.94M, False: 1.52k]
  ------------------
  501|  9.94M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  9.94M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.52k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.52k]
  ------------------
  505|  1.52k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.52k|  }
  509|       |
  510|  1.16k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  2.68k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.52k, False: 1.16k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  1.52k|    int32_t att_connectivity_verts =
  517|  1.52k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.52k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 385, False: 1.13k]
  ------------------
  519|    385|      att_connectivity_verts = corner_table_->num_vertices();
  520|    385|    }
  521|  1.52k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.52k|  }
  523|  1.16k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 0, False: 1.16k]
  ------------------
  524|      0|    return false;
  525|      0|  }
  526|  1.16k|  return true;
  527|  1.16k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    190|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    190|  return true;
  532|    190|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  1.27k|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|  1.27k|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|  1.27k|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|  1.27k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.27k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.27k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.27k|  int num_faces = 0;
  562|  76.6M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 76.6M, False: 1.21k]
  ------------------
  563|  76.6M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  76.6M|    bool check_topology_split = false;
  566|  76.6M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  76.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 37.3M, False: 39.3M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  37.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 37.3M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  37.3M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  37.3M|      const VertexIndex vertex_x =
  593|  37.3M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  37.3M|      const CornerIndex corner_b =
  595|  37.3M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  37.3M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 17, False: 37.3M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     17|        return -1;
  600|     17|      }
  601|  37.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 37.3M]
  |  Branch (601:11): [True: 0, False: 37.3M]
  ------------------
  602|  37.3M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 37.3M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  37.3M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  37.3M|      SetOppositeCorners(corner_a, corner + 1);
  612|  37.3M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  37.3M|      const VertexIndex vert_a_prev =
  616|  37.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  37.3M|      const VertexIndex vert_b_next =
  618|  37.3M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  37.3M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 37.3M]
  |  Branch (619:38): [True: 0, False: 37.3M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  37.3M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  37.3M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  37.3M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  37.3M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  37.3M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  37.3M|      active_corner_stack.back() = corner;
  631|  39.3M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 39.2M, False: 88.8k]
  |  Branch (631:40): [True: 17.9k, False: 70.8k]
  ------------------
  632|       |      // Create a new face extending from the open boundary edge opposite to the
  633|       |      // corner "a" from the image below. Two new boundary edges are created
  634|       |      // opposite to corners "r" and "l". New active corner is set to either "r"
  635|       |      // or "l" depending on the decoded symbol. One new vertex is created
  636|       |      // at the opposite corner to corner "a".
  637|       |      //     *-------*
  638|       |      //    /a\     / \
  639|       |      //   /   \   /   \
  640|       |      //  /     \ /     \
  641|       |      // *-------v-------*
  642|       |      //  .l   r.
  643|       |      //   .   .
  644|       |      //    . .
  645|       |      //     *
  646|  39.2M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 39.2M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  39.2M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  39.2M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 39.2M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  39.2M|      const CornerIndex corner(3 * face.value());
  658|  39.2M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  39.2M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 39.2M, False: 17.9k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  39.2M|        opp_corner = corner + 2;
  662|  39.2M|        corner_l = corner + 1;
  663|  39.2M|        corner_r = corner;
  664|  39.2M|      } else {
  665|       |        // "l" is the new first corner.
  666|  17.9k|        opp_corner = corner + 1;
  667|  17.9k|        corner_l = corner;
  668|  17.9k|        corner_r = corner + 2;
  669|  17.9k|      }
  670|  39.2M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  39.2M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  39.2M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 39.2M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  39.2M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  39.2M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  39.2M|      const VertexIndex vertex_r =
  682|  39.2M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  39.2M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  39.2M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  39.2M|      corner_table_->MapCornerToVertex(
  688|  39.2M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  39.2M|      active_corner_stack.back() = corner;
  690|  39.2M|      check_topology_split = true;
  691|  39.2M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 16.8k, False: 54.0k]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  16.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 16.8k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  16.8k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  16.8k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  16.8k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  16.8k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 4, False: 16.8k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|      4|        active_corner_stack.push_back(it->second);
  714|      4|      }
  715|  16.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 3, False: 16.8k]
  ------------------
  716|      3|        return -1;
  717|      3|      }
  718|  16.8k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  16.8k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 16.8k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  16.8k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 3, False: 16.7k]
  |  Branch (724:11): [True: 3, False: 16.7k]
  ------------------
  725|  16.7k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 16.7k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      3|        return -1;
  729|      3|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  16.7k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  16.7k|      SetOppositeCorners(corner_a, corner + 2);
  735|  16.7k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  16.7k|      const VertexIndex vertex_p =
  739|  16.7k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  16.7k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  16.7k|      corner_table_->MapCornerToVertex(
  742|  16.7k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  16.7k|      const VertexIndex vert_b_prev =
  744|  16.7k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  16.7k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  16.7k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  16.7k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  16.7k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  16.7k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  16.7k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  16.7k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  16.7k|      const CornerIndex first_corner = corner_n;
  757|  81.4k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 64.6k, False: 16.7k]
  ------------------
  758|  64.6k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  64.6k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  64.6k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 64.6k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|  64.6k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  16.7k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  16.7k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 3.78k, False: 13.0k]
  ------------------
  770|  3.78k|        invalid_vertices.push_back(vertex_n);
  771|  3.78k|      }
  772|  16.7k|      active_corner_stack.back() = corner;
  773|  54.0k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 54.0k, False: 0]
  ------------------
  774|  54.0k|      const CornerIndex corner(3 * face.value());
  775|  54.0k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  54.0k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  54.0k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  54.0k|                                       corner_table_->AddNewVertex());
  780|  54.0k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  54.0k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  54.0k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 1, False: 54.0k]
  ------------------
  784|      1|        return -1;  // Unexpected number of decoded vertices.
  785|      1|      }
  786|       |
  787|  54.0k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  54.0k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  54.0k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  54.0k|      active_corner_stack.push_back(corner);
  792|  54.0k|      check_topology_split = true;
  793|  54.0k|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|      0|      return -1;
  796|      0|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  76.6M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  76.6M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 39.3M, False: 37.3M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  39.3M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  39.3M|      EdgeFaceName split_edge;
  812|  39.3M|      int encoder_split_symbol_id;
  813|  39.3M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.78k, False: 39.3M]
  ------------------
  814|  39.3M|                             &encoder_split_symbol_id)) {
  815|  1.78k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 37, False: 1.75k]
  ------------------
  816|     37|          return -1;  // Wrong split symbol id.
  817|     37|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  1.75k|        const CornerIndex act_top_corner = active_corner_stack.back();
  821|       |        // The current symbol has one active edge (stored in act_top_corner) and
  822|       |        // two remaining inactive edges that are attached to it.
  823|       |        //              *
  824|       |        //             / \
  825|       |        //  left_edge /   \ right_edge
  826|       |        //           /     \
  827|       |        //          *.......*
  828|       |        //         active_edge
  829|       |
  830|  1.75k|        CornerIndex new_active_corner;
  831|  1.75k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 486, False: 1.26k]
  ------------------
  832|    486|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.26k|        } else {
  834|  1.26k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.26k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.75k|        const int decoder_split_symbol_id =
  839|  1.75k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.75k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.75k|            new_active_corner;
  842|  1.75k|      }
  843|  39.3M|    }
  844|  76.6M|  }
  845|  1.21k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.21k]
  ------------------
  846|      0|    return -1;  // Unexpected number of decoded vertices.
  847|      0|  }
  848|       |  // Decode start faces and connect them to the faces from the active stack.
  849|  35.9k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 34.7k, False: 1.19k]
  ------------------
  850|  34.7k|    const CornerIndex corner = active_corner_stack.back();
  851|  34.7k|    active_corner_stack.pop_back();
  852|  34.7k|    const bool interior_face =
  853|  34.7k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  34.7k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 28.4k, False: 6.34k]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  28.4k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 7, False: 28.3k]
  ------------------
  877|      7|        return -1;  // More faces than expected added to the mesh.
  878|      7|      }
  879|       |
  880|  28.3k|      const CornerIndex corner_a = corner;
  881|  28.3k|      const VertexIndex vert_n =
  882|  28.3k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  28.3k|      const CornerIndex corner_b =
  884|  28.3k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  28.3k|      const VertexIndex vert_x =
  887|  28.3k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  28.3k|      const CornerIndex corner_c =
  889|  28.3k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  28.3k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 1, False: 28.3k]
  |  Branch (891:33): [True: 11, False: 28.3k]
  |  Branch (891:55): [True: 0, False: 28.3k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     12|        return -1;
  894|     12|      }
  895|  28.3k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 1, False: 28.3k]
  |  Branch (895:11): [True: 1, False: 28.3k]
  ------------------
  896|  28.3k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 28.3k]
  ------------------
  897|  28.3k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 28.3k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      1|        return -1;
  901|      1|      }
  902|       |
  903|  28.3k|      const VertexIndex vert_p =
  904|  28.3k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  28.3k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  28.3k|      const CornerIndex new_corner(3 * face.value());
  909|  28.3k|      SetOppositeCorners(new_corner, corner);
  910|  28.3k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  28.3k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  28.3k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  28.3k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  28.3k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   113k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 85.1k, False: 28.3k]
  ------------------
  920|  85.1k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  85.1k|      }
  922|       |
  923|  28.3k|      init_face_configurations_.push_back(true);
  924|  28.3k|      init_corners_.push_back(new_corner);
  925|  28.3k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  6.34k|      init_face_configurations_.push_back(false);
  930|  6.34k|      init_corners_.push_back(corner);
  931|  6.34k|    }
  932|  34.7k|  }
  933|  1.19k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 35, False: 1.16k]
  ------------------
  934|     35|    return -1;  // Unexpected number of decoded faces.
  935|     35|  }
  936|       |
  937|  1.16k|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  1.49k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.49k, False: 1.16k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.49k|    VertexIndex src_vert(num_vertices - 1);
  943|  1.70k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 209, False: 1.49k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    209|      src_vert = VertexIndex(--num_vertices - 1);
  946|    209|    }
  947|  1.49k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 209, False: 1.28k]
  ------------------
  948|    209|      continue;  // No need to swap anything.
  949|    209|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.28k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  6.78k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 5.50k, False: 1.28k]
  ------------------
  954|  5.50k|      const CornerIndex cid = vcit.Corner();
  955|  5.50k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 5.50k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|  5.50k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  5.50k|    }
  962|  1.28k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.28k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.28k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.28k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.28k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.28k|    num_vertices--;
  972|  1.28k|  }
  973|  1.16k|  return num_vertices;
  974|  1.16k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  1.45k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  1.45k|  uint32_t num_topology_splits;
  982|  1.45k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  1.45k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.45k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 124, False: 1.33k]
  ------------------
  984|    124|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 124]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|    124|  } else
  989|  1.33k|#endif
  990|  1.33k|  {
  991|  1.33k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 1.33k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  1.33k|  }
  995|  1.45k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 747, False: 709]
  ------------------
  996|    747|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 23, False: 724]
  ------------------
  997|    747|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     23|      return -1;
  999|     23|    }
 1000|    724|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    724|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    724|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 75, False: 649]
  ------------------
 1002|   330k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 330k, False: 33]
  ------------------
 1003|   330k|        TopologySplitEventData event_data;
 1004|   330k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 23, False: 330k]
  ------------------
 1005|     23|          return -1;
 1006|     23|        }
 1007|   330k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 12, False: 330k]
  ------------------
 1008|     12|          return -1;
 1009|     12|        }
 1010|   330k|        uint8_t edge_data;
 1011|   330k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 7, False: 330k]
  ------------------
 1012|      7|          return -1;
 1013|      7|        }
 1014|   330k|        event_data.source_edge = edge_data & 1;
 1015|   330k|        topology_split_data_.push_back(event_data);
 1016|   330k|      }
 1017|       |
 1018|     75|    } else
 1019|    649|#endif
 1020|    649|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|    649|      int last_source_symbol_id = 0;
 1024|  36.0k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 35.4k, False: 647]
  ------------------
 1025|  35.4k|        TopologySplitEventData event_data;
 1026|  35.4k|        uint32_t delta;
 1027|  35.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 2, False: 35.4k]
  ------------------
 1028|      2|          return -1;
 1029|      2|        }
 1030|  35.4k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  35.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 35.4k]
  ------------------
 1032|      0|          return -1;
 1033|      0|        }
 1034|  35.4k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 35.4k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  35.4k|        event_data.split_symbol_id =
 1038|  35.4k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  35.4k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  35.4k|        topology_split_data_.push_back(event_data);
 1041|  35.4k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    647|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  35.9k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 35.2k, False: 647]
  ------------------
 1045|  35.2k|        uint32_t edge_data;
 1046|  35.2k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  35.2k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 2.81k, False: 32.4k]
  ------------------
 1047|  2.81k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  32.4k|        } else {
 1049|  32.4k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  32.4k|        }
 1051|  35.2k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  35.2k|        event_data.source_edge = edge_data & 1;
 1053|  35.2k|      }
 1054|    647|      decoder_buffer->EndBitDecoding();
 1055|    647|    }
 1056|    724|  }
 1057|  1.38k|  uint32_t num_hole_events = 0;
 1058|  1.38k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  1.38k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.38k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 61, False: 1.32k]
  ------------------
 1060|     61|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 1, False: 60]
  ------------------
 1061|      1|      return -1;
 1062|      1|    }
 1063|  1.32k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.32k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 261, False: 1.06k]
  ------------------
 1064|    261|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 5, False: 256]
  ------------------
 1065|      5|      return -1;
 1066|      5|    }
 1067|    261|  }
 1068|  1.38k|#endif
 1069|  1.38k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 72, False: 1.31k]
  ------------------
 1070|     72|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     72|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     72|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 56, False: 16]
  ------------------
 1072|  1.06M|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 1.06M, False: 3]
  ------------------
 1073|  1.06M|        HoleEventData event_data;
 1074|  1.06M|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 53, False: 1.06M]
  ------------------
 1075|     53|          return -1;
 1076|     53|        }
 1077|  1.06M|        hole_event_data_.push_back(event_data);
 1078|  1.06M|      }
 1079|       |
 1080|     56|    } else
 1081|     16|#endif
 1082|     16|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     16|      int last_symbol_id = 0;
 1085|  1.23k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 1.23k, False: 5]
  ------------------
 1086|  1.23k|        HoleEventData event_data;
 1087|  1.23k|        uint32_t delta;
 1088|  1.23k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 11, False: 1.21k]
  ------------------
 1089|     11|          return -1;
 1090|     11|        }
 1091|  1.21k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  1.21k|        last_symbol_id = event_data.symbol_id;
 1093|  1.21k|        hole_event_data_.push_back(event_data);
 1094|  1.21k|      }
 1095|     16|    }
 1096|     72|  }
 1097|  1.31k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  1.38k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   466k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   466k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   466k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  1.86M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.40M, False: 466k]
  ------------------
 1109|  1.40M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.40M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 4.96k, False: 1.39M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  10.0k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 5.06k, False: 4.96k]
  ------------------
 1114|  5.06k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  5.06k|      }
 1116|  4.96k|      continue;
 1117|  4.96k|    }
 1118|       |
 1119|  2.79M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.39M, False: 1.39M]
  ------------------
 1120|  1.39M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.39M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 279k, False: 1.11M]
  ------------------
 1122|   279k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|   279k|      }
 1124|  1.39M|    }
 1125|  1.39M|  }
 1126|   466k|  return true;
 1127|   466k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  6.28M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  6.28M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  6.28M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  6.28M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  25.1M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 18.8M, False: 6.28M]
  ------------------
 1139|  18.8M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  18.8M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 75.7k, False: 18.7M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   180k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 104k, False: 75.7k]
  ------------------
 1144|   104k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   104k|      }
 1146|  75.7k|      continue;
 1147|  75.7k|    }
 1148|  18.7M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  18.7M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 9.39M, False: 9.39M]
  ------------------
 1151|  9.39M|      continue;
 1152|  9.39M|    }
 1153|       |
 1154|  20.8M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 11.4M, False: 9.39M]
  ------------------
 1155|  11.4M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  11.4M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 9.55M, False: 1.87M]
  ------------------
 1157|  9.55M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  9.55M|      }
 1159|  11.4M|    }
 1160|  9.39M|  }
 1161|  6.28M|  return true;
 1162|  6.28M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.16k|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|  1.16k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.16k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 56, False: 1.10k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   591k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 591k, False: 56]
  ------------------
 1176|   591k|      Mesh::Face face;
 1177|   591k|      const CornerIndex start_corner(3 * f.value());
 1178|  2.36M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 1.77M, False: 591k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  1.77M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  1.77M|        face[c] = vert_id;
 1182|  1.77M|      }
 1183|   591k|      decoder_->mesh()->SetFace(f, face);
 1184|   591k|    }
 1185|     56|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     56|    return true;
 1187|     56|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  1.10k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.10k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  3.42M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 3.42M, False: 1.10k]
  ------------------
 1197|  3.42M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  3.42M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 2.73k, False: 3.41M]
  ------------------
 1199|  2.73k|      continue;  // Isolated vertex.
 1200|  2.73k|    }
 1201|  3.41M|    CornerIndex deduplication_first_corner = c;
 1202|  3.41M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 80.6k, False: 3.33M]
  ------------------
 1203|       |      // If the vertex is on a boundary, start deduplication from the left most
 1204|       |      // corner that is guaranteed to lie on the boundary.
 1205|  80.6k|      deduplication_first_corner = c;
 1206|  3.33M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  3.95M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 3.33M, False: 611k]
  ------------------
 1210|  3.33M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 601k, False: 2.73M]
  ------------------
 1211|   601k|          continue;  // No seam for this attribute, ignore it.
 1212|   601k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|  2.73M|        const VertexIndex vert_id =
 1217|  2.73M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  2.73M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  2.73M|        bool seam_found = false;
 1220|  2.82M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 2.81M, False: 10.2k]
  ------------------
 1221|  2.81M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 0, False: 2.81M]
  ------------------
 1222|      0|            return false;
 1223|      0|          }
 1224|  2.81M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 2.72M, False: 84.2k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  2.72M|            deduplication_first_corner = act_c;
 1227|  2.72M|            seam_found = true;
 1228|  2.72M|            break;
 1229|  2.72M|          }
 1230|  84.2k|          act_c = corner_table_->SwingRight(act_c);
 1231|  84.2k|        }
 1232|  2.73M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 2.72M, False: 10.2k]
  ------------------
 1233|  2.72M|          break;  // No reason to process other attributes if we found a seam.
 1234|  2.72M|        }
 1235|  2.73M|      }
 1236|  3.33M|    }
 1237|       |
 1238|       |    // Do a deduplication pass over the corners on the processed vertex.
 1239|       |    // At this point each corner corresponds to one point id and our goal is to
 1240|       |    // merge similar points into a single point id.
 1241|       |    // We do a single pass in a clockwise direction over the corners and we add
 1242|       |    // a new point id whenever one of the attributes change.
 1243|  3.41M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  3.41M|    corner_to_point_map[c.value()] =
 1246|  3.41M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  3.41M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  3.41M|    CornerIndex prev_c = c;
 1250|  3.41M|    c = corner_table_->SwingRight(c);
 1251|  20.2M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 20.1M, False: 81.4k]
  |  Branch (1251:40): [True: 16.8M, False: 3.33M]
  ------------------
 1252|  16.8M|      bool attribute_seam = false;
 1253|  19.9M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 16.8M, False: 3.13M]
  ------------------
 1254|  16.8M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 13.7M, False: 3.14M]
  ------------------
 1255|  16.8M|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|  13.7M|          attribute_seam = true;
 1259|  13.7M|          break;
 1260|  13.7M|        }
 1261|  16.8M|      }
 1262|  16.8M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 13.7M, False: 3.13M]
  ------------------
 1263|  13.7M|        corner_to_point_map[c.value()] =
 1264|  13.7M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  13.7M|        point_to_corner_map.push_back(c.value());
 1266|  13.7M|      } else {
 1267|  3.13M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.13M|      }
 1269|  16.8M|      prev_c = c;
 1270|  16.8M|      c = corner_table_->SwingRight(c);
 1271|  16.8M|    }
 1272|  3.41M|  }
 1273|       |  // Add faces.
 1274|  6.75M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 6.75M, False: 1.10k]
  ------------------
 1275|  6.75M|    Mesh::Face face;
 1276|  27.0M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 20.2M, False: 6.75M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  20.2M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  20.2M|    }
 1280|  6.75M|    decoder_->mesh()->SetFace(f, face);
 1281|  6.75M|  }
 1282|  1.10k|  decoder_->point_cloud()->set_num_points(
 1283|  1.10k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.10k|  return true;
 1285|  1.10k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  1.20k|    : decoder_(nullptr),
   49|  1.20k|      last_symbol_id_(-1),
   50|  1.20k|      last_vert_id_(-1),
   51|  1.20k|      last_face_id_(-1),
   52|  1.20k|      num_new_vertices_(0),
   53|  1.20k|      num_encoded_vertices_(0),
   54|  1.20k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  1.20k|    MeshEdgebreakerDecoder *decoder) {
   59|  1.20k|  decoder_ = decoder;
   60|  1.20k|  return true;
   61|  1.20k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    241|    int att_id) const {
   67|    353|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 160, False: 193]
  ------------------
   68|    160|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    160|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 96, False: 64]
  |  Branch (69:27): [True: 0, False: 64]
  ------------------
   70|     96|      continue;
   71|     96|    }
   72|     64|    const AttributesDecoderInterface *const dec =
   73|     64|        decoder_->attributes_decoder(decoder_id);
   74|    137|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 121, False: 16]
  ------------------
   75|    121|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 48, False: 73]
  ------------------
   76|     48|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 27, False: 21]
  ------------------
   77|     27|          return &attribute_data_[i].connectivity_data;
   78|     27|        }
   79|     21|        return nullptr;
   80|     48|      }
   81|    121|    }
   82|     64|  }
   83|    193|  return nullptr;
   84|    241|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    241|    int att_id) const {
   90|    353|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 160, False: 193]
  ------------------
   91|    160|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    160|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 96, False: 64]
  |  Branch (92:27): [True: 0, False: 64]
  ------------------
   93|     96|      continue;
   94|     96|    }
   95|     64|    const AttributesDecoderInterface *const dec =
   96|     64|        decoder_->attributes_decoder(decoder_id);
   97|    137|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 121, False: 16]
  ------------------
   98|    121|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 48, False: 73]
  ------------------
   99|     48|        return &attribute_data_[i].encoding_data;
  100|     48|      }
  101|    121|    }
  102|     64|  }
  103|    193|  return &pos_encoding_data_;
  104|    241|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    232|    int32_t att_decoder_id) {
  131|    232|  int8_t att_data_id;
  132|    232|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 7, False: 225]
  ------------------
  133|      7|    return false;
  134|      7|  }
  135|    225|  uint8_t decoder_type;
  136|    225|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 225]
  ------------------
  137|      0|    return false;
  138|      0|  }
  139|       |
  140|    225|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 105, False: 120]
  ------------------
  141|    105|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 16, False: 89]
  ------------------
  142|     16|      return false;  // Unexpected attribute data.
  143|     16|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|     89|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 1, False: 88]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|       |
  151|     88|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    120|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    120|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 120]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|    120|    pos_data_decoder_id_ = att_decoder_id;
  158|    120|  }
  159|       |
  160|    208|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    208|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    208|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 208, False: 0]
  ------------------
  162|    208|    uint8_t traversal_method_encoded;
  163|    208|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 3, False: 205]
  ------------------
  164|      3|      return false;
  165|      3|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    205|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 10, False: 195]
  ------------------
  168|     10|      return false;
  169|     10|    }
  170|    195|    traversal_method =
  171|    195|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    195|  }
  173|       |
  174|    195|  const Mesh *mesh = decoder_->mesh();
  175|    195|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    195|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 144, False: 51]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    144|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    144|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 111, False: 33]
  ------------------
  182|    111|      encoding_data = &pos_encoding_data_;
  183|    111|    } else {
  184|     33|      encoding_data = &attribute_data_[att_data_id].encoding_data;
  185|       |      // Mark the attribute connectivity data invalid to ensure it's not used
  186|       |      // later on.
  187|     33|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     33|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    144|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 32, False: 112]
  ------------------
  191|     32|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     32|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     32|          AttTraverser;
  194|     32|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    112|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 112, False: 0]
  ------------------
  196|    112|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    112|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    112|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    112|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    144|  } else {
  203|     51|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 6, False: 45]
  ------------------
  204|      6|      return false;  // Unsupported method.
  205|      6|    }
  206|     45|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 0, False: 45]
  ------------------
  207|      0|      return false;  // Attribute data must be specified.
  208|      0|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     45|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     45|        AttObserver;
  214|     45|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     45|        AttTraverser;
  216|       |
  217|     45|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     45|        &attribute_data_[att_data_id].encoding_data;
  219|     45|    const MeshAttributeCornerTable *const corner_table =
  220|     45|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     45|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     45|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     45|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     45|                             encoding_data);
  227|       |
  228|     45|    AttTraverser att_traverser;
  229|     45|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     45|    traversal_sequencer->SetTraverser(att_traverser);
  232|     45|    sequencer = std::move(traversal_sequencer);
  233|     45|  }
  234|       |
  235|    189|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 189]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    189|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    189|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    189|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    189|                                        std::move(att_controller));
  244|    189|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  1.20k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  1.20k|  num_new_vertices_ = 0;
  249|  1.20k|  new_to_parent_vertex_map_.clear();
  250|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 229, False: 975]
  ------------------
  252|    229|    uint32_t num_new_verts;
  253|    229|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    229|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 171, False: 58]
  ------------------
  254|    171|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 171]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    171|    } else {
  258|     58|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 58]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|     58|    }
  262|    229|    num_new_vertices_ = num_new_verts;
  263|    229|  }
  264|  1.20k|#endif
  265|       |
  266|  1.20k|  uint32_t num_encoded_vertices;
  267|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 171, False: 1.03k]
  ------------------
  269|    171|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 171]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    171|  } else
  274|  1.03k|#endif
  275|  1.03k|  {
  276|  1.03k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 1.03k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  1.03k|  }
  280|  1.20k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  1.20k|  uint32_t num_faces;
  283|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 171, False: 1.03k]
  ------------------
  285|    171|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 171]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    171|  } else
  290|  1.03k|#endif
  291|  1.03k|  {
  292|  1.03k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1.03k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  1.03k|  }
  296|  1.20k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 1.20k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  1.20k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 1, False: 1.20k]
  ------------------
  301|      1|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      1|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  1.20k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  1.20k|  const uint64_t num_encoded_vertices_64 =
  311|  1.20k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  1.20k|  const uint64_t max_num_vertex_edges =
  313|  1.20k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  1.20k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 1.20k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  1.20k|  uint8_t num_attribute_data;
  320|  1.20k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 1.20k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  1.20k|  uint32_t num_encoded_symbols;
  325|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 170, False: 1.03k]
  ------------------
  327|    170|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 170]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    170|  } else
  332|  1.03k|#endif
  333|  1.03k|  {
  334|  1.03k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 1.03k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  1.03k|  }
  338|       |
  339|  1.20k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 0, False: 1.20k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|      0|    return false;
  344|      0|  }
  345|  1.20k|  const uint32_t max_encoded_faces =
  346|  1.20k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  1.20k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 1, False: 1.20k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      1|    return false;
  352|      1|  }
  353|       |
  354|  1.20k|  uint32_t num_encoded_split_symbols;
  355|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 169, False: 1.03k]
  ------------------
  357|    169|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 169]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    169|  } else
  362|  1.03k|#endif
  363|  1.03k|  {
  364|  1.03k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.03k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  1.03k|  }
  368|       |
  369|  1.20k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 0, False: 1.20k]
  ------------------
  370|      0|    return false;  // Split symbols are a sub-set of all symbols.
  371|      0|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  1.20k|  vertex_traversal_length_.clear();
  375|  1.20k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  1.20k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 1.20k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  1.20k|  processed_corner_ids_.clear();
  380|  1.20k|  processed_corner_ids_.reserve(num_faces);
  381|  1.20k|  processed_connectivity_corners_.clear();
  382|  1.20k|  processed_connectivity_corners_.reserve(num_faces);
  383|  1.20k|  topology_split_data_.clear();
  384|  1.20k|  hole_event_data_.clear();
  385|  1.20k|  init_face_configurations_.clear();
  386|  1.20k|  init_corners_.clear();
  387|       |
  388|  1.20k|  last_symbol_id_ = -1;
  389|  1.20k|  last_face_id_ = -1;
  390|  1.20k|  last_vert_id_ = -1;
  391|       |
  392|  1.20k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  1.20k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  1.20k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 1.20k]
  ------------------
  397|  1.20k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  1.20k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  1.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  1.20k|  int32_t topology_split_decoded_bytes = -1;
  410|  1.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 227, False: 974]
  ------------------
  411|    227|    uint32_t encoded_connectivity_size;
  412|    227|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 169, False: 58]
  ------------------
  413|    169|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 169]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    169|    } else {
  417|     58|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 58]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|     58|    }
  421|    227|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 227]
  ------------------
  422|    227|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 6, False: 221]
  ------------------
  423|      6|      return false;
  424|      6|    }
  425|    221|    DecoderBuffer event_buffer;
  426|    221|    event_buffer.Init(
  427|    221|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    221|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    221|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    221|    topology_split_decoded_bytes =
  432|    221|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    221|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 40, False: 181]
  ------------------
  434|     40|      return false;
  435|     40|    }
  436|       |
  437|    221|  } else
  438|    974|#endif
  439|    974|  {
  440|    974|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 5, False: 969]
  ------------------
  441|      5|      return false;
  442|      5|    }
  443|    974|  }
  444|       |
  445|  1.15k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.15k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.15k|                                           num_encoded_split_symbols);
  449|  1.15k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.15k|  DecoderBuffer traversal_end_buffer;
  452|  1.15k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 479, False: 671]
  ------------------
  453|    479|    return false;
  454|    479|  }
  455|       |
  456|    671|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|    671|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 461, False: 210]
  ------------------
  458|    461|    return false;
  459|    461|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    210|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    210|                           traversal_end_buffer.remaining_size(),
  464|    210|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    210|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    210|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    210|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 5, False: 205]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      5|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      5|  }
  471|    210|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    210|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 118, False: 92]
  ------------------
  475|    118|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    118|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    118|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 113]
  ------------------
  477|     15|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 10, False: 5]
  ------------------
  478|     10|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 10]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|     10|      }
  482|       |
  483|      5|    } else
  484|    113|#endif
  485|    113|    {
  486|   553k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 553k, False: 113]
  ------------------
  487|   553k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 553k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   553k|      }
  491|    113|    }
  492|    118|  }
  493|    210|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|    913|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 703, False: 210]
  ------------------
  498|    703|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  1.20M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 1.20M, False: 703]
  ------------------
  501|  1.20M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  1.20M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    703|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 703]
  ------------------
  505|    703|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    703|  }
  509|       |
  510|    210|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|    913|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 703, False: 210]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|    703|    int32_t att_connectivity_verts =
  517|    703|        attribute_data_[i].connectivity_data.num_vertices();
  518|    703|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 0, False: 703]
  ------------------
  519|      0|      att_connectivity_verts = corner_table_->num_vertices();
  520|      0|    }
  521|    703|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    703|  }
  523|    210|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 6, False: 204]
  ------------------
  524|      6|    return false;
  525|      6|  }
  526|    204|  return true;
  527|    210|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     22|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     22|  return true;
  532|     22|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|    671|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|    671|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|    671|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|    671|  std::vector<VertexIndex> invalid_vertices;
  558|    671|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|    671|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|    671|  int num_faces = 0;
  562|  25.8M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 25.8M, False: 264]
  ------------------
  563|  25.8M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  25.8M|    bool check_topology_split = false;
  566|  25.8M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  25.8M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 3.82M, False: 21.9M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  3.82M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 87, False: 3.82M]
  ------------------
  588|     87|        return -1;
  589|     87|      }
  590|       |
  591|  3.82M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  3.82M|      const VertexIndex vertex_x =
  593|  3.82M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  3.82M|      const CornerIndex corner_b =
  595|  3.82M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  3.82M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 159, False: 3.82M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    159|        return -1;
  600|    159|      }
  601|  3.82M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 3.82M]
  |  Branch (601:11): [True: 0, False: 3.82M]
  ------------------
  602|  3.82M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 3.82M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  3.82M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  3.82M|      SetOppositeCorners(corner_a, corner + 1);
  612|  3.82M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  3.82M|      const VertexIndex vert_a_prev =
  616|  3.82M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  3.82M|      const VertexIndex vert_b_next =
  618|  3.82M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  3.82M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 3.82M]
  |  Branch (619:38): [True: 0, False: 3.82M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  3.82M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  3.82M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  3.82M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  3.82M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  3.82M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  3.82M|      active_corner_stack.back() = corner;
  631|  21.9M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 1.23k, False: 21.9M]
  |  Branch (631:40): [True: 17.4M, False: 4.57M]
  ------------------
  632|       |      // Create a new face extending from the open boundary edge opposite to the
  633|       |      // corner "a" from the image below. Two new boundary edges are created
  634|       |      // opposite to corners "r" and "l". New active corner is set to either "r"
  635|       |      // or "l" depending on the decoded symbol. One new vertex is created
  636|       |      // at the opposite corner to corner "a".
  637|       |      //     *-------*
  638|       |      //    /a\     / \
  639|       |      //   /   \   /   \
  640|       |      //  /     \ /     \
  641|       |      // *-------v-------*
  642|       |      //  .l   r.
  643|       |      //   .   .
  644|       |      //    . .
  645|       |      //     *
  646|  17.4M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 17.4M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  17.4M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  17.4M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 17.4M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  17.4M|      const CornerIndex corner(3 * face.value());
  658|  17.4M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  17.4M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 1.23k, False: 17.4M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  1.23k|        opp_corner = corner + 2;
  662|  1.23k|        corner_l = corner + 1;
  663|  1.23k|        corner_r = corner;
  664|  17.4M|      } else {
  665|       |        // "l" is the new first corner.
  666|  17.4M|        opp_corner = corner + 1;
  667|  17.4M|        corner_l = corner;
  668|  17.4M|        corner_r = corner + 2;
  669|  17.4M|      }
  670|  17.4M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  17.4M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  17.4M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 6, False: 17.4M]
  ------------------
  675|      6|        return -1;  // Unexpected number of decoded vertices.
  676|      6|      }
  677|       |
  678|  17.4M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  17.4M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  17.4M|      const VertexIndex vertex_r =
  682|  17.4M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  17.4M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  17.4M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  17.4M|      corner_table_->MapCornerToVertex(
  688|  17.4M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  17.4M|      active_corner_stack.back() = corner;
  690|  17.4M|      check_topology_split = true;
  691|  17.4M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 8.05k, False: 4.57M]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  8.05k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 8.05k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  8.05k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  8.05k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  8.05k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  8.05k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 15, False: 8.04k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     15|        active_corner_stack.push_back(it->second);
  714|     15|      }
  715|  8.05k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 31, False: 8.02k]
  ------------------
  716|     31|        return -1;
  717|     31|      }
  718|  8.02k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  8.02k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 8.02k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  8.02k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 2, False: 8.02k]
  |  Branch (724:11): [True: 2, False: 8.02k]
  ------------------
  725|  8.02k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 8.02k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      2|        return -1;
  729|      2|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  8.02k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  8.02k|      SetOppositeCorners(corner_a, corner + 2);
  735|  8.02k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  8.02k|      const VertexIndex vertex_p =
  739|  8.02k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  8.02k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  8.02k|      corner_table_->MapCornerToVertex(
  742|  8.02k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  8.02k|      const VertexIndex vert_b_prev =
  744|  8.02k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  8.02k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  8.02k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  8.02k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  8.02k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  8.02k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  8.02k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  8.02k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  8.02k|      const CornerIndex first_corner = corner_n;
  757|   572k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 564k, False: 8.02k]
  ------------------
  758|   564k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   564k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   564k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 564k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|   564k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  8.02k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  8.02k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 7.28k, False: 737]
  ------------------
  770|  7.28k|        invalid_vertices.push_back(vertex_n);
  771|  7.28k|      }
  772|  8.02k|      active_corner_stack.back() = corner;
  773|  4.57M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.57M, False: 92]
  ------------------
  774|  4.57M|      const CornerIndex corner(3 * face.value());
  775|  4.57M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.57M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.57M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.57M|                                       corner_table_->AddNewVertex());
  780|  4.57M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.57M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.57M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 2, False: 4.57M]
  ------------------
  784|      2|        return -1;  // Unexpected number of decoded vertices.
  785|      2|      }
  786|       |
  787|  4.57M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.57M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.57M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.57M|      active_corner_stack.push_back(corner);
  792|  4.57M|      check_topology_split = true;
  793|  4.57M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|     92|      return -1;
  796|     92|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  25.8M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  25.8M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 21.9M, False: 3.83M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  21.9M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  21.9M|      EdgeFaceName split_edge;
  812|  21.9M|      int encoder_split_symbol_id;
  813|  21.9M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.79k, False: 21.9M]
  ------------------
  814|  21.9M|                             &encoder_split_symbol_id)) {
  815|  1.79k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 27, False: 1.77k]
  ------------------
  816|     27|          return -1;  // Wrong split symbol id.
  817|     27|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  1.77k|        const CornerIndex act_top_corner = active_corner_stack.back();
  821|       |        // The current symbol has one active edge (stored in act_top_corner) and
  822|       |        // two remaining inactive edges that are attached to it.
  823|       |        //              *
  824|       |        //             / \
  825|       |        //  left_edge /   \ right_edge
  826|       |        //           /     \
  827|       |        //          *.......*
  828|       |        //         active_edge
  829|       |
  830|  1.77k|        CornerIndex new_active_corner;
  831|  1.77k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 784, False: 986]
  ------------------
  832|    784|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    986|        } else {
  834|    986|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    986|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.77k|        const int decoder_split_symbol_id =
  839|  1.77k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.77k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.77k|            new_active_corner;
  842|  1.77k|      }
  843|  21.9M|    }
  844|  25.8M|  }
  845|    264|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 264]
  ------------------
  846|      0|    return -1;  // Unexpected number of decoded vertices.
  847|      0|  }
  848|       |  // Decode start faces and connect them to the faces from the active stack.
  849|  3.83M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 3.83M, False: 246]
  ------------------
  850|  3.83M|    const CornerIndex corner = active_corner_stack.back();
  851|  3.83M|    active_corner_stack.pop_back();
  852|  3.83M|    const bool interior_face =
  853|  3.83M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  3.83M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 2.23M, False: 1.59M]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  2.23M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 17, False: 2.23M]
  ------------------
  877|     17|        return -1;  // More faces than expected added to the mesh.
  878|     17|      }
  879|       |
  880|  2.23M|      const CornerIndex corner_a = corner;
  881|  2.23M|      const VertexIndex vert_n =
  882|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  2.23M|      const CornerIndex corner_b =
  884|  2.23M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  2.23M|      const VertexIndex vert_x =
  887|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  2.23M|      const CornerIndex corner_c =
  889|  2.23M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  2.23M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 0, False: 2.23M]
  |  Branch (891:33): [True: 1, False: 2.23M]
  |  Branch (891:55): [True: 0, False: 2.23M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      1|        return -1;
  894|      1|      }
  895|  2.23M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 2.23M]
  |  Branch (895:11): [True: 0, False: 2.23M]
  ------------------
  896|  2.23M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 2.23M]
  ------------------
  897|  2.23M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 2.23M]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      0|        return -1;
  901|      0|      }
  902|       |
  903|  2.23M|      const VertexIndex vert_p =
  904|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  2.23M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  2.23M|      const CornerIndex new_corner(3 * face.value());
  909|  2.23M|      SetOppositeCorners(new_corner, corner);
  910|  2.23M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  2.23M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  2.23M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  2.23M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  2.23M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  8.94M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 6.71M, False: 2.23M]
  ------------------
  920|  6.71M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  6.71M|      }
  922|       |
  923|  2.23M|      init_face_configurations_.push_back(true);
  924|  2.23M|      init_corners_.push_back(new_corner);
  925|  2.23M|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  1.59M|      init_face_configurations_.push_back(false);
  930|  1.59M|      init_corners_.push_back(corner);
  931|  1.59M|    }
  932|  3.83M|  }
  933|    246|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 32, False: 214]
  ------------------
  934|     32|    return -1;  // Unexpected number of decoded faces.
  935|     32|  }
  936|       |
  937|    214|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  3.94k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 3.94k, False: 210]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  3.94k|    VertexIndex src_vert(num_vertices - 1);
  943|  4.75k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 812, False: 3.94k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    812|      src_vert = VertexIndex(--num_vertices - 1);
  946|    812|    }
  947|  3.94k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 678, False: 3.26k]
  ------------------
  948|    678|      continue;  // No need to swap anything.
  949|    678|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  3.26k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  13.2k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 9.95k, False: 3.25k]
  ------------------
  954|  9.95k|      const CornerIndex cid = vcit.Corner();
  955|  9.95k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 4, False: 9.95k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      4|        return -1;
  959|      4|      }
  960|  9.95k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  9.95k|    }
  962|  3.25k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  3.25k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  3.25k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  3.25k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  3.25k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  3.25k|    num_vertices--;
  972|  3.25k|  }
  973|    210|  return num_vertices;
  974|    214|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  1.19k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  1.19k|  uint32_t num_topology_splits;
  982|  1.19k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  1.19k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.19k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 163, False: 1.03k]
  ------------------
  984|    163|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 163]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|    163|  } else
  989|  1.03k|#endif
  990|  1.03k|  {
  991|  1.03k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 1.03k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  1.03k|  }
  995|  1.19k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 322, False: 873]
  ------------------
  996|    322|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 6, False: 316]
  ------------------
  997|    322|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      6|      return -1;
  999|      6|    }
 1000|    316|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    316|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    316|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 26, False: 290]
  ------------------
 1002|   211k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 211k, False: 4]
  ------------------
 1003|   211k|        TopologySplitEventData event_data;
 1004|   211k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 16, False: 211k]
  ------------------
 1005|     16|          return -1;
 1006|     16|        }
 1007|   211k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 4, False: 211k]
  ------------------
 1008|      4|          return -1;
 1009|      4|        }
 1010|   211k|        uint8_t edge_data;
 1011|   211k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 211k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|   211k|        event_data.source_edge = edge_data & 1;
 1015|   211k|        topology_split_data_.push_back(event_data);
 1016|   211k|      }
 1017|       |
 1018|     26|    } else
 1019|    290|#endif
 1020|    290|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|    290|      int last_source_symbol_id = 0;
 1024|  3.96k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 3.68k, False: 286]
  ------------------
 1025|  3.68k|        TopologySplitEventData event_data;
 1026|  3.68k|        uint32_t delta;
 1027|  3.68k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 3, False: 3.67k]
  ------------------
 1028|      3|          return -1;
 1029|      3|        }
 1030|  3.67k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  3.67k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 1, False: 3.67k]
  ------------------
 1032|      1|          return -1;
 1033|      1|        }
 1034|  3.67k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 3.67k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  3.67k|        event_data.split_symbol_id =
 1038|  3.67k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  3.67k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  3.67k|        topology_split_data_.push_back(event_data);
 1041|  3.67k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    286|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  3.69k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.41k, False: 286]
  ------------------
 1045|  3.41k|        uint32_t edge_data;
 1046|  3.41k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.41k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 553, False: 2.85k]
  ------------------
 1047|    553|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  2.85k|        } else {
 1049|  2.85k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  2.85k|        }
 1051|  3.41k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  3.41k|        event_data.source_edge = edge_data & 1;
 1053|  3.41k|      }
 1054|    286|      decoder_buffer->EndBitDecoding();
 1055|    286|    }
 1056|    316|  }
 1057|  1.16k|  uint32_t num_hole_events = 0;
 1058|  1.16k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  1.16k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.16k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 136, False: 1.02k]
  ------------------
 1060|    136|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 136]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|  1.02k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.02k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 47, False: 980]
  ------------------
 1064|     47|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 0, False: 47]
  ------------------
 1065|      0|      return -1;
 1066|      0|    }
 1067|     47|  }
 1068|  1.16k|#endif
 1069|  1.16k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 21, False: 1.14k]
  ------------------
 1070|     21|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     21|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     21|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 11, False: 10]
  ------------------
 1072|  33.1k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 33.1k, False: 1]
  ------------------
 1073|  33.1k|        HoleEventData event_data;
 1074|  33.1k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 10, False: 33.1k]
  ------------------
 1075|     10|          return -1;
 1076|     10|        }
 1077|  33.1k|        hole_event_data_.push_back(event_data);
 1078|  33.1k|      }
 1079|       |
 1080|     11|    } else
 1081|     10|#endif
 1082|     10|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     10|      int last_symbol_id = 0;
 1085|  3.49k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 3.49k, False: 7]
  ------------------
 1086|  3.49k|        HoleEventData event_data;
 1087|  3.49k|        uint32_t delta;
 1088|  3.49k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 3, False: 3.48k]
  ------------------
 1089|      3|          return -1;
 1090|      3|        }
 1091|  3.48k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  3.48k|        last_symbol_id = event_data.symbol_id;
 1093|  3.48k|        hole_event_data_.push_back(event_data);
 1094|  3.48k|      }
 1095|     10|    }
 1096|     21|  }
 1097|  1.15k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  1.16k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|     10|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|     10|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|     10|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|     40|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 30, False: 10]
  ------------------
 1109|     30|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|     30|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 10, False: 20]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|     20|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 10, False: 10]
  ------------------
 1114|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|     10|      }
 1116|     10|      continue;
 1117|     10|    }
 1118|       |
 1119|     40|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 20, False: 20]
  ------------------
 1120|     20|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|     20|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 10, False: 10]
  ------------------
 1122|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|     10|      }
 1124|     20|    }
 1125|     20|  }
 1126|     10|  return true;
 1127|     10|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   553k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   553k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   553k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   553k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  2.21M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 1.66M, False: 553k]
  ------------------
 1139|  1.66M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  1.66M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 250k, False: 1.41M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   751k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 501k, False: 250k]
  ------------------
 1144|   501k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   501k|      }
 1146|   250k|      continue;
 1147|   250k|    }
 1148|  1.41M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  1.41M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 705k, False: 705k]
  ------------------
 1151|   705k|      continue;
 1152|   705k|    }
 1153|       |
 1154|  2.11M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 1.41M, False: 705k]
  ------------------
 1155|  1.41M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  1.41M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 701k, False: 708k]
  ------------------
 1157|   701k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   701k|      }
 1159|  1.41M|    }
 1160|   705k|  }
 1161|   553k|  return true;
 1162|   553k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    210|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|    210|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    210|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 92, False: 118]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   127k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 127k, False: 92]
  ------------------
 1176|   127k|      Mesh::Face face;
 1177|   127k|      const CornerIndex start_corner(3 * f.value());
 1178|   510k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 383k, False: 127k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   383k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   383k|        face[c] = vert_id;
 1182|   383k|      }
 1183|   127k|      decoder_->mesh()->SetFace(f, face);
 1184|   127k|    }
 1185|     92|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     92|    return true;
 1187|     92|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|    118|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    118|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   393k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 393k, False: 112]
  ------------------
 1197|   393k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   393k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 63, False: 393k]
  ------------------
 1199|     63|      continue;  // Isolated vertex.
 1200|     63|    }
 1201|   393k|    CornerIndex deduplication_first_corner = c;
 1202|   393k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 250k, False: 143k]
  ------------------
 1203|       |      // If the vertex is on a boundary, start deduplication from the left most
 1204|       |      // corner that is guaranteed to lie on the boundary.
 1205|   250k|      deduplication_first_corner = c;
 1206|   250k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   263k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 216k, False: 46.5k]
  ------------------
 1210|   216k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 116k, False: 100k]
  ------------------
 1211|   116k|          continue;  // No seam for this attribute, ignore it.
 1212|   116k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|   100k|        const VertexIndex vert_id =
 1217|   100k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   100k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   100k|        bool seam_found = false;
 1220|   121k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 117k, False: 3.88k]
  ------------------
 1221|   117k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 6, False: 117k]
  ------------------
 1222|      6|            return false;
 1223|      6|          }
 1224|   117k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 96.4k, False: 21.5k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  96.4k|            deduplication_first_corner = act_c;
 1227|  96.4k|            seam_found = true;
 1228|  96.4k|            break;
 1229|  96.4k|          }
 1230|  21.5k|          act_c = corner_table_->SwingRight(act_c);
 1231|  21.5k|        }
 1232|   100k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 96.4k, False: 3.88k]
  ------------------
 1233|  96.4k|          break;  // No reason to process other attributes if we found a seam.
 1234|  96.4k|        }
 1235|   100k|      }
 1236|   143k|    }
 1237|       |
 1238|       |    // Do a deduplication pass over the corners on the processed vertex.
 1239|       |    // At this point each corner corresponds to one point id and our goal is to
 1240|       |    // merge similar points into a single point id.
 1241|       |    // We do a single pass in a clockwise direction over the corners and we add
 1242|       |    // a new point id whenever one of the attributes change.
 1243|   393k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   393k|    corner_to_point_map[c.value()] =
 1246|   393k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   393k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   393k|    CornerIndex prev_c = c;
 1250|   393k|    c = corner_table_->SwingRight(c);
 1251|  1.62M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.37M, False: 250k]
  |  Branch (1251:40): [True: 1.22M, False: 142k]
  ------------------
 1252|  1.22M|      bool attribute_seam = false;
 1253|  2.37M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 1.99M, False: 381k]
  ------------------
 1254|  1.99M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 847k, False: 1.15M]
  ------------------
 1255|  1.99M|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|   847k|          attribute_seam = true;
 1259|   847k|          break;
 1260|   847k|        }
 1261|  1.99M|      }
 1262|  1.22M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 847k, False: 381k]
  ------------------
 1263|   847k|        corner_to_point_map[c.value()] =
 1264|   847k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   847k|        point_to_corner_map.push_back(c.value());
 1266|   847k|      } else {
 1267|   381k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   381k|      }
 1269|  1.22M|      prev_c = c;
 1270|  1.22M|      c = corner_table_->SwingRight(c);
 1271|  1.22M|    }
 1272|   393k|  }
 1273|       |  // Add faces.
 1274|   502k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 502k, False: 112]
  ------------------
 1275|   502k|    Mesh::Face face;
 1276|  2.00M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 1.50M, False: 502k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  1.50M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  1.50M|    }
 1280|   502k|    decoder_->mesh()->SetFace(f, face);
 1281|   502k|  }
 1282|    112|  decoder_->point_cloud()->set_num_points(
 1283|    112|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    112|  return true;
 1285|    118|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     82|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     82|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     82|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     82|  const Mesh *mesh = decoder_->mesh();
  115|     82|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     82|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     82|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     82|                           encoding_data);
  120|       |
  121|     82|  TraverserT att_traverser;
  122|     82|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     82|  traversal_sequencer->SetTraverser(att_traverser);
  125|     82|  return std::move(traversal_sequencer);
  126|     82|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    822|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    822|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    822|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    822|  const Mesh *mesh = decoder_->mesh();
  115|    822|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    822|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    822|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    822|                           encoding_data);
  120|       |
  121|    822|  TraverserT att_traverser;
  122|    822|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    822|  traversal_sequencer->SetTraverser(att_traverser);
  125|    822|  return std::move(traversal_sequencer);
  126|    822|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    188|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    188|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    188|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    188|  const Mesh *mesh = decoder_->mesh();
  115|    188|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    188|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    188|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    188|                           encoding_data);
  120|       |
  121|    188|  TraverserT att_traverser;
  122|    188|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    188|  traversal_sequencer->SetTraverser(att_traverser);
  125|    188|  return std::move(traversal_sequencer);
  126|    188|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    364|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    364|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    364|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    364|  const Mesh *mesh = decoder_->mesh();
  115|    364|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    364|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    364|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    364|                           encoding_data);
  120|       |
  121|    364|  TraverserT att_traverser;
  122|    364|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    364|  traversal_sequencer->SetTraverser(att_traverser);
  125|    364|  return std::move(traversal_sequencer);
  126|    364|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     32|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     32|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     32|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     32|  const Mesh *mesh = decoder_->mesh();
  115|     32|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     32|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     32|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     32|                           encoding_data);
  120|       |
  121|     32|  TraverserT att_traverser;
  122|     32|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     32|  traversal_sequencer->SetTraverser(att_traverser);
  125|     32|  return std::move(traversal_sequencer);
  126|     32|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    112|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    112|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    112|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    112|  const Mesh *mesh = decoder_->mesh();
  115|    112|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    112|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    112|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    112|                           encoding_data);
  120|       |
  121|    112|  TraverserT att_traverser;
  122|    112|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    112|  traversal_sequencer->SetTraverser(att_traverser);
  125|    112|  return std::move(traversal_sequencer);
  126|    112|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  6.04k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  2.79k|  const CornerTable *GetCornerTable() const override {
   67|  2.79k|    return corner_table_.get();
   68|  2.79k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  12.5M|                       int *out_encoder_split_symbol_id) {
   87|  12.5M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 2.12M, False: 10.3M]
  ------------------
   88|  2.12M|      return false;
   89|  2.12M|    }
   90|  10.3M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 15, False: 10.3M]
  ------------------
   91|  10.3M|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     15|      *out_encoder_split_symbol_id = -1;
   98|     15|      return true;
   99|     15|    }
  100|  10.3M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 10.3M, False: 1.61k]
  ------------------
  101|  10.3M|      return false;
  102|  10.3M|    }
  103|  1.61k|    *out_face_edge =
  104|  1.61k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.61k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.61k|    topology_split_data_.pop_back();
  108|  1.61k|    return true;
  109|  10.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  45.6M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  45.6M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  45.6M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  45.6M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  9.12k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  3.95k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  3.15k|  const CornerTable *GetCornerTable() const override {
   67|  3.15k|    return corner_table_.get();
   68|  3.15k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  39.3M|                       int *out_encoder_split_symbol_id) {
   87|  39.3M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 38.6M, False: 625k]
  ------------------
   88|  38.6M|      return false;
   89|  38.6M|    }
   90|   625k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 37, False: 625k]
  ------------------
   91|   625k|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     37|      *out_encoder_split_symbol_id = -1;
   98|     37|      return true;
   99|     37|    }
  100|   625k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 623k, False: 1.75k]
  ------------------
  101|   623k|      return false;
  102|   623k|    }
  103|  1.75k|    *out_face_edge =
  104|  1.75k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.75k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.75k|    topology_split_data_.pop_back();
  108|  1.75k|    return true;
  109|   625k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   114M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   114M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   114M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   114M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  6.18k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  6.48k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  1.39k|  const CornerTable *GetCornerTable() const override {
   67|  1.39k|    return corner_table_.get();
   68|  1.39k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  21.9M|                       int *out_encoder_split_symbol_id) {
   87|  21.9M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 21.6M, False: 329k]
  ------------------
   88|  21.6M|      return false;
   89|  21.6M|    }
   90|   329k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 27, False: 329k]
  ------------------
   91|   329k|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     27|      *out_encoder_split_symbol_id = -1;
   98|     27|      return true;
   99|     27|    }
  100|   329k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 327k, False: 1.77k]
  ------------------
  101|   327k|      return false;
  102|   327k|    }
  103|  1.77k|    *out_face_edge =
  104|  1.77k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.77k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.77k|    topology_split_data_.pop_back();
  108|  1.77k|    return true;
  109|   329k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  31.7M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  31.7M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  31.7M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  31.7M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  2.75k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

_ZN5draco35MeshEdgebreakerDecoderImplInterfaceD2Ev:
   30|  4.80k|  virtual ~MeshEdgebreakerDecoderImplInterface() = default;

_ZN5draco13HoleEventDataC2Ev:
  118|  2.07M|  HoleEventData() : symbol_id(0) {}

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  4.80k|      : attribute_connectivity_decoders_(nullptr),
   34|  4.80k|        num_attribute_data_(0),
   35|  4.80k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  4.48k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  4.48k|    decoder_impl_ = decoder;
   38|  4.48k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  4.48k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  4.48k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  4.48k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  3.03k|  uint16_t BitstreamVersion() const {
   45|  3.03k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  3.03k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  2.01k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  4.48k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  3.33k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  3.33k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 25, False: 3.31k]
  ------------------
   63|     25|      return false;
   64|     25|    }
   65|       |
   66|  3.31k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 28, False: 3.28k]
  ------------------
   67|     28|      return false;
   68|     28|    }
   69|       |
   70|  3.28k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 5, False: 3.27k]
  ------------------
   71|      5|      return false;
   72|      5|    }
   73|  3.27k|    *out_buffer = buffer_;
   74|  3.27k|    return true;
   75|  3.28k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  3.89M|  inline bool DecodeStartFaceConfiguration() {
   79|  3.89M|    uint32_t face_configuration;
   80|  3.89M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  3.89M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.89M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 934, False: 3.89M]
  ------------------
   82|    934|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|    934|    } else
   85|  3.89M|#endif
   86|  3.89M|    {
   87|  3.89M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  3.89M|    }
   89|  3.89M|    return face_configuration;
   90|  3.89M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  31.6M|  inline uint32_t DecodeSymbol() {
   94|  31.6M|    uint32_t symbol;
   95|  31.6M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  31.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 14.3M, False: 17.3M]
  ------------------
   97|  14.3M|      return symbol;
   98|  14.3M|    }
   99|       |    // Else decode two additional bits.
  100|  17.3M|    uint32_t symbol_suffix;
  101|  17.3M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  17.3M|    symbol |= (symbol_suffix << 1);
  103|  17.3M|    return symbol;
  104|  31.6M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  31.4M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.70M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  14.9M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  14.9M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  14.9M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  3.20k|  void Done() {
  123|  3.20k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 3.00k, False: 205]
  ------------------
  124|  3.00k|      symbol_buffer_.EndBitDecoding();
  125|  3.00k|    }
  126|  3.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  3.20k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 544, False: 2.66k]
  ------------------
  128|    544|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    544|    } else
  131|  2.66k|#endif
  132|  2.66k|    {
  133|  2.66k|      start_face_decoder_.EndDecoding();
  134|  2.66k|    }
  135|  3.20k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  1.09k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  3.51k|  bool DecodeTraversalSymbols() {
  141|  3.51k|    uint64_t traversal_size;
  142|  3.51k|    symbol_buffer_ = buffer_;
  143|  3.51k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 12, False: 3.50k]
  ------------------
  144|     12|      return false;
  145|     12|    }
  146|  3.50k|    buffer_ = symbol_buffer_;
  147|  3.50k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 34, False: 3.47k]
  ------------------
  148|     34|      return false;
  149|     34|    }
  150|  3.47k|    buffer_.Advance(traversal_size);
  151|  3.47k|    return true;
  152|  3.50k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  4.43k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  4.43k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  4.43k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.43k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 765, False: 3.67k]
  ------------------
  158|    765|      start_face_buffer_ = buffer_;
  159|    765|      uint64_t traversal_size;
  160|    765|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 0, False: 765]
  ------------------
  161|      0|        return false;
  162|      0|      }
  163|    765|      buffer_ = start_face_buffer_;
  164|    765|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 60, False: 705]
  ------------------
  165|     60|        return false;
  166|     60|      }
  167|    705|      buffer_.Advance(traversal_size);
  168|    705|      return true;
  169|    765|    }
  170|  3.67k|#endif
  171|  3.67k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  4.43k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  4.37k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  4.37k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 3.26k, False: 1.11k]
  ------------------
  177|  3.26k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  3.26k|          new BinaryDecoder[num_attribute_data_]);
  179|  9.90k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 6.65k, False: 3.25k]
  ------------------
  180|  6.65k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 9, False: 6.64k]
  ------------------
  181|      9|          return false;
  182|      9|        }
  183|  6.65k|      }
  184|  3.26k|    }
  185|  4.36k|    return true;
  186|  4.37k|  }

_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoderC2Ev:
   32|  1.47k|      : corner_table_(nullptr),
   33|  1.47k|        num_vertices_(0),
   34|  1.47k|        last_symbol_(-1),
   35|  1.47k|        predicted_symbol_(-1) {}
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  1.31k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  1.31k|    MeshEdgebreakerTraversalDecoder::Init(decoder);
   38|  1.31k|    corner_table_ = decoder->GetCornerTable();
   39|  1.31k|  }
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder21SetNumEncodedVerticesEi:
   40|  1.31k|  void SetNumEncodedVertices(int num_vertices) { num_vertices_ = num_vertices; }
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder5StartEPNS_13DecoderBufferE:
   42|  1.31k|  bool Start(DecoderBuffer *out_buffer) {
   43|  1.31k|    if (!MeshEdgebreakerTraversalDecoder::Start(out_buffer)) {
  ------------------
  |  Branch (43:9): [True: 34, False: 1.28k]
  ------------------
   44|     34|      return false;
   45|     34|    }
   46|  1.28k|    int32_t num_split_symbols;
   47|  1.28k|    if (!out_buffer->Decode(&num_split_symbols) || num_split_symbols < 0)
  ------------------
  |  Branch (47:9): [True: 0, False: 1.28k]
  |  Branch (47:52): [True: 4, False: 1.28k]
  ------------------
   48|      4|      return false;
   49|  1.28k|    if (num_split_symbols >= num_vertices_) {
  ------------------
  |  Branch (49:9): [True: 4, False: 1.27k]
  ------------------
   50|      4|      return false;
   51|      4|    }
   52|       |    // Set the valences of all initial vertices to 0.
   53|  1.27k|    vertex_valences_.resize(num_vertices_, 0);
   54|  1.27k|    if (!prediction_decoder_.StartDecoding(out_buffer)) {
  ------------------
  |  Branch (54:9): [True: 1, False: 1.27k]
  ------------------
   55|      1|      return false;
   56|      1|    }
   57|  1.27k|    return true;
   58|  1.27k|  }
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder12DecodeSymbolEv:
   60|  76.6M|  inline uint32_t DecodeSymbol() {
   61|       |    // First check if we have a predicted symbol.
   62|  76.6M|    if (predicted_symbol_ != -1) {
  ------------------
  |  Branch (62:9): [True: 76.6M, False: 90.0k]
  ------------------
   63|       |      // Double check that the predicted symbol was predicted correctly.
   64|  76.6M|      if (prediction_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (64:11): [True: 76.4M, False: 128k]
  ------------------
   65|  76.4M|        last_symbol_ = predicted_symbol_;
   66|  76.4M|        return predicted_symbol_;
   67|  76.4M|      }
   68|  76.6M|    }
   69|       |    // We don't have a predicted symbol or the symbol was mis-predicted.
   70|       |    // Decode it directly.
   71|   218k|    last_symbol_ = MeshEdgebreakerTraversalDecoder::DecodeSymbol();
   72|   218k|    return last_symbol_;
   73|  76.6M|  }
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   75|  76.6M|  inline void NewActiveCornerReached(CornerIndex corner) {
   76|  76.6M|    const CornerIndex next = corner_table_->Next(corner);
   77|  76.6M|    const CornerIndex prev = corner_table_->Previous(corner);
   78|       |    // Update valences.
   79|  76.6M|    switch (last_symbol_) {
   80|  37.3M|      case TOPOLOGY_C:
  ------------------
  |  Branch (80:7): [True: 37.3M, False: 39.3M]
  ------------------
   81|  37.3M|      case TOPOLOGY_S:
  ------------------
  |  Branch (81:7): [True: 16.7k, False: 76.6M]
  ------------------
   82|  37.3M|        vertex_valences_[corner_table_->Vertex(next).value()] += 1;
   83|  37.3M|        vertex_valences_[corner_table_->Vertex(prev).value()] += 1;
   84|  37.3M|        break;
   85|  39.2M|      case TOPOLOGY_R:
  ------------------
  |  Branch (85:7): [True: 39.2M, False: 37.4M]
  ------------------
   86|  39.2M|        vertex_valences_[corner_table_->Vertex(corner).value()] += 1;
   87|  39.2M|        vertex_valences_[corner_table_->Vertex(next).value()] += 1;
   88|  39.2M|        vertex_valences_[corner_table_->Vertex(prev).value()] += 2;
   89|  39.2M|        break;
   90|  17.9k|      case TOPOLOGY_L:
  ------------------
  |  Branch (90:7): [True: 17.9k, False: 76.6M]
  ------------------
   91|  17.9k|        vertex_valences_[corner_table_->Vertex(corner).value()] += 1;
   92|  17.9k|        vertex_valences_[corner_table_->Vertex(next).value()] += 2;
   93|  17.9k|        vertex_valences_[corner_table_->Vertex(prev).value()] += 1;
   94|  17.9k|        break;
   95|  54.0k|      case TOPOLOGY_E:
  ------------------
  |  Branch (95:7): [True: 54.0k, False: 76.6M]
  ------------------
   96|  54.0k|        vertex_valences_[corner_table_->Vertex(corner).value()] += 2;
   97|  54.0k|        vertex_valences_[corner_table_->Vertex(next).value()] += 2;
   98|  54.0k|        vertex_valences_[corner_table_->Vertex(prev).value()] += 2;
   99|  54.0k|        break;
  100|      0|      default:
  ------------------
  |  Branch (100:7): [True: 0, False: 76.6M]
  ------------------
  101|      0|        break;
  102|  76.6M|    }
  103|       |    // Compute the new predicted symbol.
  104|  76.6M|    if (last_symbol_ == TOPOLOGY_C || last_symbol_ == TOPOLOGY_R) {
  ------------------
  |  Branch (104:9): [True: 37.3M, False: 39.3M]
  |  Branch (104:39): [True: 39.2M, False: 88.8k]
  ------------------
  105|  76.6M|      const VertexIndex pivot =
  106|  76.6M|          corner_table_->Vertex(corner_table_->Next(corner));
  107|  76.6M|      if (vertex_valences_[pivot.value()] < 6) {
  ------------------
  |  Branch (107:11): [True: 39.2M, False: 37.3M]
  ------------------
  108|  39.2M|        predicted_symbol_ = TOPOLOGY_R;
  109|  39.2M|      } else {
  110|  37.3M|        predicted_symbol_ = TOPOLOGY_C;
  111|  37.3M|      }
  112|  76.6M|    } else {
  113|  88.8k|      predicted_symbol_ = -1;
  114|  88.8k|    }
  115|  76.6M|  }
_ZN5draco41MeshEdgebreakerTraversalPredictiveDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  117|  16.7k|  inline void MergeVertices(VertexIndex dest, VertexIndex source) {
  118|       |    // Update valences on the merged vertices.
  119|  16.7k|    vertex_valences_[dest.value()] += vertex_valences_[source.value()];
  120|  16.7k|  }

_ZN5draco38MeshEdgebreakerTraversalValenceDecoderC2Ev:
   33|  1.20k|      : corner_table_(nullptr),
   34|  1.20k|        num_vertices_(0),
   35|  1.20k|        last_symbol_(-1),
   36|  1.20k|        active_context_(-1),
   37|  1.20k|        min_valence_(2),
   38|  1.20k|        max_valence_(7) {}
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   39|  1.15k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   40|  1.15k|    MeshEdgebreakerTraversalDecoder::Init(decoder);
   41|  1.15k|    corner_table_ = decoder->GetCornerTable();
   42|  1.15k|  }
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder21SetNumEncodedVerticesEi:
   43|  1.15k|  void SetNumEncodedVertices(int num_vertices) { num_vertices_ = num_vertices; }
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder5StartEPNS_13DecoderBufferE:
   45|  1.15k|  bool Start(DecoderBuffer *out_buffer) {
   46|  1.15k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   47|  1.15k|    if (BitstreamVersion() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.15k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (47:9): [True: 181, False: 969]
  ------------------
   48|    181|      if (!MeshEdgebreakerTraversalDecoder::DecodeTraversalSymbols()) {
  ------------------
  |  Branch (48:11): [True: 21, False: 160]
  ------------------
   49|     21|        return false;
   50|     21|      }
   51|    181|    }
   52|  1.12k|#endif
   53|  1.12k|    if (!MeshEdgebreakerTraversalDecoder::DecodeStartFaces()) {
  ------------------
  |  Branch (53:9): [True: 35, False: 1.09k]
  ------------------
   54|     35|      return false;
   55|     35|    }
   56|  1.09k|    if (!MeshEdgebreakerTraversalDecoder::DecodeAttributeSeams()) {
  ------------------
  |  Branch (56:9): [True: 4, False: 1.09k]
  ------------------
   57|      4|      return false;
   58|      4|    }
   59|  1.09k|    *out_buffer = *buffer();
   60|       |
   61|  1.09k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   62|  1.09k|    if (BitstreamVersion() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.09k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (62:9): [True: 128, False: 962]
  ------------------
   63|    128|      uint32_t num_split_symbols;
   64|    128|      if (BitstreamVersion() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    128|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (64:11): [True: 119, False: 9]
  ------------------
   65|    119|        if (!out_buffer->Decode(&num_split_symbols)) {
  ------------------
  |  Branch (65:13): [True: 0, False: 119]
  ------------------
   66|      0|          return false;
   67|      0|        }
   68|    119|      } else {
   69|      9|        if (!DecodeVarint(&num_split_symbols, out_buffer)) {
  ------------------
  |  Branch (69:13): [True: 0, False: 9]
  ------------------
   70|      0|          return false;
   71|      0|        }
   72|      9|      }
   73|    128|      if (num_split_symbols >= static_cast<uint32_t>(num_vertices_)) {
  ------------------
  |  Branch (73:11): [True: 0, False: 128]
  ------------------
   74|      0|        return false;
   75|      0|      }
   76|       |
   77|    128|      int8_t mode;
   78|    128|      if (!out_buffer->Decode(&mode)) {
  ------------------
  |  Branch (78:11): [True: 0, False: 128]
  ------------------
   79|      0|        return false;
   80|      0|      }
   81|    128|      if (mode == EDGEBREAKER_VALENCE_MODE_2_7) {
  ------------------
  |  Branch (81:11): [True: 128, False: 0]
  ------------------
   82|    128|        min_valence_ = 2;
   83|    128|        max_valence_ = 7;
   84|    128|      } else {
   85|       |        // Unsupported mode.
   86|      0|        return false;
   87|      0|      }
   88|       |
   89|    128|    } else
   90|    962|#endif
   91|    962|    {
   92|    962|      min_valence_ = 2;
   93|    962|      max_valence_ = 7;
   94|    962|    }
   95|       |
   96|  1.09k|    if (num_vertices_ < 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 1.09k]
  ------------------
   97|      0|      return false;
   98|      0|    }
   99|       |    // Set the valences of all initial vertices to 0.
  100|  1.09k|    vertex_valences_.resize(num_vertices_, 0);
  101|       |
  102|  1.09k|    const int num_unique_valences = max_valence_ - min_valence_ + 1;
  103|       |
  104|       |    // Decode all symbols for all contexts.
  105|  1.09k|    context_symbols_.resize(num_unique_valences);
  106|  1.09k|    context_counters_.resize(context_symbols_.size());
  107|  6.32k|    for (int i = 0; i < context_symbols_.size(); ++i) {
  ------------------
  |  Branch (107:21): [True: 5.65k, False: 671]
  ------------------
  108|  5.65k|      uint32_t num_symbols;
  109|  5.65k|      if (!DecodeVarint<uint32_t>(&num_symbols, out_buffer)) {
  ------------------
  |  Branch (109:11): [True: 305, False: 5.35k]
  ------------------
  110|    305|        return false;
  111|    305|      }
  112|  5.35k|      if (num_symbols > static_cast<uint32_t>(corner_table_->num_faces())) {
  ------------------
  |  Branch (112:11): [True: 114, False: 5.23k]
  ------------------
  113|    114|        return false;
  114|    114|      }
  115|  5.23k|      if (num_symbols > 0) {
  ------------------
  |  Branch (115:11): [True: 4.46k, False: 772]
  ------------------
  116|  4.46k|        context_symbols_[i].resize(num_symbols);
  117|  4.46k|        DecodeSymbols(num_symbols, 1, out_buffer, context_symbols_[i].data());
  118|       |        // All symbols are going to be processed from the back.
  119|  4.46k|        context_counters_[i] = num_symbols;
  120|  4.46k|      }
  121|  5.23k|    }
  122|    671|    return true;
  123|  1.09k|  }
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder12DecodeSymbolEv:
  125|  25.8M|  inline uint32_t DecodeSymbol() {
  126|       |    // First check if we have a valid context.
  127|  25.8M|    if (active_context_ != -1) {
  ------------------
  |  Branch (127:9): [True: 25.8M, False: 671]
  ------------------
  128|  25.8M|      const int context_counter = --context_counters_[active_context_];
  129|  25.8M|      if (context_counter < 0) {
  ------------------
  |  Branch (129:11): [True: 79, False: 25.8M]
  ------------------
  130|     79|        return TOPOLOGY_INVALID;
  131|     79|      }
  132|  25.8M|      const uint32_t symbol_id =
  133|  25.8M|          context_symbols_[active_context_][context_counter];
  134|  25.8M|      if (symbol_id > 4) {
  ------------------
  |  Branch (134:11): [True: 13, False: 25.8M]
  ------------------
  135|     13|        return TOPOLOGY_INVALID;
  136|     13|      }
  137|  25.8M|      last_symbol_ = edge_breaker_symbol_to_topology_id[symbol_id];
  138|  25.8M|    } else {
  139|    671|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  140|    671|      if (BitstreamVersion() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    671|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (140:11): [True: 96, False: 575]
  ------------------
  141|       |        // We don't have a predicted symbol or the symbol was mis-predicted.
  142|       |        // Decode it directly.
  143|     96|        last_symbol_ = MeshEdgebreakerTraversalDecoder::DecodeSymbol();
  144|       |
  145|     96|      } else
  146|    575|#endif
  147|    575|      {
  148|       |        // The first symbol must be E.
  149|    575|        last_symbol_ = TOPOLOGY_E;
  150|    575|      }
  151|    671|    }
  152|  25.8M|    return last_symbol_;
  153|  25.8M|  }
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  155|  25.8M|  inline void NewActiveCornerReached(CornerIndex corner) {
  156|  25.8M|    const CornerIndex next = corner_table_->Next(corner);
  157|  25.8M|    const CornerIndex prev = corner_table_->Previous(corner);
  158|       |    // Update valences.
  159|  25.8M|    switch (last_symbol_) {
  160|  3.82M|      case TOPOLOGY_C:
  ------------------
  |  Branch (160:7): [True: 3.82M, False: 21.9M]
  ------------------
  161|  3.83M|      case TOPOLOGY_S:
  ------------------
  |  Branch (161:7): [True: 8.02k, False: 25.8M]
  ------------------
  162|  3.83M|        vertex_valences_[corner_table_->Vertex(next)] += 1;
  163|  3.83M|        vertex_valences_[corner_table_->Vertex(prev)] += 1;
  164|  3.83M|        break;
  165|  1.23k|      case TOPOLOGY_R:
  ------------------
  |  Branch (165:7): [True: 1.23k, False: 25.8M]
  ------------------
  166|  1.23k|        vertex_valences_[corner_table_->Vertex(corner)] += 1;
  167|  1.23k|        vertex_valences_[corner_table_->Vertex(next)] += 1;
  168|  1.23k|        vertex_valences_[corner_table_->Vertex(prev)] += 2;
  169|  1.23k|        break;
  170|  17.4M|      case TOPOLOGY_L:
  ------------------
  |  Branch (170:7): [True: 17.4M, False: 8.40M]
  ------------------
  171|  17.4M|        vertex_valences_[corner_table_->Vertex(corner)] += 1;
  172|  17.4M|        vertex_valences_[corner_table_->Vertex(next)] += 2;
  173|  17.4M|        vertex_valences_[corner_table_->Vertex(prev)] += 1;
  174|  17.4M|        break;
  175|  4.57M|      case TOPOLOGY_E:
  ------------------
  |  Branch (175:7): [True: 4.57M, False: 21.2M]
  ------------------
  176|  4.57M|        vertex_valences_[corner_table_->Vertex(corner)] += 2;
  177|  4.57M|        vertex_valences_[corner_table_->Vertex(next)] += 2;
  178|  4.57M|        vertex_valences_[corner_table_->Vertex(prev)] += 2;
  179|  4.57M|        break;
  180|      0|      default:
  ------------------
  |  Branch (180:7): [True: 0, False: 25.8M]
  ------------------
  181|      0|        break;
  182|  25.8M|    }
  183|       |    // Compute the new context that is going to be used to decode the next
  184|       |    // symbol.
  185|  25.8M|    const int active_valence = vertex_valences_[corner_table_->Vertex(next)];
  186|  25.8M|    int clamped_valence;
  187|  25.8M|    if (active_valence < min_valence_) {
  ------------------
  |  Branch (187:9): [True: 0, False: 25.8M]
  ------------------
  188|      0|      clamped_valence = min_valence_;
  189|  25.8M|    } else if (active_valence > max_valence_) {
  ------------------
  |  Branch (189:16): [True: 3.70M, False: 22.1M]
  ------------------
  190|  3.70M|      clamped_valence = max_valence_;
  191|  22.1M|    } else {
  192|  22.1M|      clamped_valence = active_valence;
  193|  22.1M|    }
  194|       |
  195|  25.8M|    active_context_ = (clamped_valence - min_valence_);
  196|  25.8M|  }
_ZN5draco38MeshEdgebreakerTraversalValenceDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  198|  8.02k|  inline void MergeVertices(VertexIndex dest, VertexIndex source) {
  199|       |    // Update valences on the merged vertices.
  200|  8.02k|    vertex_valences_[dest] += vertex_valences_[source];
  201|  8.02k|  }

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  1.55k|MeshSequentialDecoder::MeshSequentialDecoder() {}
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  1.29k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  1.29k|  uint32_t num_faces;
   31|  1.29k|  uint32_t num_points;
   32|  1.29k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  1.29k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 353, False: 946]
  ------------------
   34|    353|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 353]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    353|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 353]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    353|  } else
   42|    946|#endif
   43|    946|  {
   44|    946|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 946]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|    946|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 946]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|    946|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  1.29k|  const uint64_t faces_64 = static_cast<uint64_t>(num_faces);
   54|       |  // Compressed sequential encoding can only handle (2^32 - 1) / 3 indices.
   55|  1.29k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 0, False: 1.29k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|  1.29k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 1, False: 1.29k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      1|    return false;
   62|      1|  }
   63|  1.29k|  uint8_t connectivity_method;
   64|  1.29k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 1.29k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  1.29k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 963, False: 335]
  ------------------
   68|    963|    if (!DecodeAndDecompressIndices(num_faces)) {
  ------------------
  |  Branch (68:9): [True: 897, False: 66]
  ------------------
   69|    897|      return false;
   70|    897|    }
   71|    963|  } else {
   72|    335|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 215, False: 120]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  35.4k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 35.2k, False: 213]
  ------------------
   75|  35.2k|        Mesh::Face face;
   76|   140k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 105k, False: 35.2k]
  ------------------
   77|   105k|          uint8_t val;
   78|   105k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 2, False: 105k]
  ------------------
   79|      2|            return false;
   80|      2|          }
   81|   105k|          face[j] = val;
   82|   105k|        }
   83|  35.2k|        mesh()->AddFace(face);
   84|  35.2k|      }
   85|    215|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (85:16): [True: 75, False: 45]
  ------------------
   86|       |      // Decode indices as uint16_t.
   87|   405k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (87:28): [True: 405k, False: 64]
  ------------------
   88|   405k|        Mesh::Face face;
   89|  1.62M|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (89:25): [True: 1.21M, False: 405k]
  ------------------
   90|  1.21M|          uint16_t val;
   91|  1.21M|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (91:15): [True: 11, False: 1.21M]
  ------------------
   92|     11|            return false;
   93|     11|          }
   94|  1.21M|          face[j] = val;
   95|  1.21M|        }
   96|   405k|        mesh()->AddFace(face);
   97|   405k|      }
   98|     75|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (98:16): [True: 9, False: 36]
  ------------------
   99|      9|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|      9|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (99:16): [True: 9, False: 0]
  ------------------
  100|       |      // Decode indices as uint32_t.
  101|    500|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (101:28): [True: 494, False: 6]
  ------------------
  102|    494|        Mesh::Face face;
  103|  1.96k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (103:25): [True: 1.47k, False: 491]
  ------------------
  104|  1.47k|          uint32_t val;
  105|  1.47k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (105:15): [True: 3, False: 1.47k]
  ------------------
  106|      3|            return false;
  107|      3|          }
  108|  1.47k|          face[j] = val;
  109|  1.47k|        }
  110|    491|        mesh()->AddFace(face);
  111|    491|      }
  112|     36|    } else {
  113|       |      // Decode faces as uint32_t (default).
  114|  17.8k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (114:28): [True: 17.7k, False: 23]
  ------------------
  115|  17.7k|        Mesh::Face face;
  116|  71.1k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (116:25): [True: 53.3k, False: 17.7k]
  ------------------
  117|  53.3k|          uint32_t val;
  118|  53.3k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (118:15): [True: 13, False: 53.3k]
  ------------------
  119|     13|            return false;
  120|     13|          }
  121|  53.3k|          face[j] = val;
  122|  53.3k|        }
  123|  17.7k|        mesh()->AddFace(face);
  124|  17.7k|      }
  125|     36|    }
  126|    335|  }
  127|    372|  point_cloud()->set_num_points(num_points);
  128|    372|  return true;
  129|  1.29k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  131|  17.9k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  132|       |  // Always create the basic attribute decoder.
  133|  17.9k|  return SetAttributesDecoder(
  134|  17.9k|      att_decoder_id,
  135|  17.9k|      std::unique_ptr<AttributesDecoder>(
  136|  17.9k|          new SequentialAttributeDecodersController(
  137|  17.9k|              std::unique_ptr<PointsSequencer>(
  138|  17.9k|                  new LinearSequencer(point_cloud()->num_points())))));
  139|  17.9k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEj:
  141|    963|bool MeshSequentialDecoder::DecodeAndDecompressIndices(uint32_t num_faces) {
  142|       |  // Get decoded indices differences that were encoded with an entropy code.
  143|    963|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  144|    963|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (144:7): [True: 855, False: 108]
  ------------------
  145|    855|    return false;
  146|    855|  }
  147|       |  // Reconstruct the indices from the differences.
  148|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  149|    108|  int32_t last_index_value = 0;  // This will always be >= 0.
  150|    108|  int vertex_index = 0;
  151|  4.60k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (151:24): [True: 4.53k, False: 66]
  ------------------
  152|  4.53k|    Mesh::Face face;
  153|  18.0k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (153:21): [True: 13.5k, False: 4.49k]
  ------------------
  154|  13.5k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  155|  13.5k|      int32_t index_diff = (encoded_val >> 1);
  156|  13.5k|      if (encoded_val & 1) {
  ------------------
  |  Branch (156:11): [True: 276, False: 13.2k]
  ------------------
  157|    276|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (157:13): [True: 23, False: 253]
  ------------------
  158|       |          // Subtracting index_diff would result in a negative index.
  159|     23|          return false;
  160|     23|        }
  161|    253|        index_diff = -index_diff;
  162|  13.2k|      } else {
  163|  13.2k|        if (index_diff >
  ------------------
  |  Branch (163:13): [True: 19, False: 13.2k]
  ------------------
  164|  13.2k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  165|       |          // Adding index_diff to last_index_value would overflow.
  166|     19|          return false;
  167|     19|        }
  168|  13.2k|      }
  169|  13.4k|      const int32_t index_value = index_diff + last_index_value;
  170|  13.4k|      face[j] = index_value;
  171|  13.4k|      last_index_value = index_value;
  172|  13.4k|    }
  173|  4.49k|    mesh()->AddFace(face);
  174|  4.49k|  }
  175|     66|  return true;
  176|    108|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.26k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.68M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.68M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.63M, False: 47.7k]
  ------------------
   61|  1.63M|      return true;  // Already traversed.
   62|  1.63M|    }
   63|       |
   64|  47.7k|    corner_traversal_stack_.clear();
   65|  47.7k|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  47.7k|    const VertexIndex next_vert =
   69|  47.7k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  47.7k|    const VertexIndex prev_vert =
   71|  47.7k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  47.7k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 47.7k]
  |  Branch (72:45): [True: 0, False: 47.7k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  47.7k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 46.9k, False: 817]
  ------------------
   76|  46.9k|      this->MarkVertexVisited(next_vert);
   77|  46.9k|      this->traversal_observer().OnNewVertexVisited(
   78|  46.9k|          next_vert, this->corner_table()->Next(corner_id));
   79|  46.9k|    }
   80|  47.7k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.12k, False: 44.6k]
  ------------------
   81|  3.12k|      this->MarkVertexVisited(prev_vert);
   82|  3.12k|      this->traversal_observer().OnNewVertexVisited(
   83|  3.12k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.12k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   105k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 58.1k, False: 47.7k]
  ------------------
   88|       |      // Currently processed corner.
   89|  58.1k|      corner_id = corner_traversal_stack_.back();
   90|  58.1k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  58.1k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 58.1k]
  |  Branch (92:47): [True: 498, False: 57.6k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    498|        corner_traversal_stack_.pop_back();
   95|    498|        continue;
   96|    498|      }
   97|  1.68M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.68M, Folded]
  ------------------
   98|  1.68M|        this->MarkFaceVisited(face_id);
   99|  1.68M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.68M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.68M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.68M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.68M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 826k, False: 856k]
  ------------------
  105|   826k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   826k|          this->MarkVertexVisited(vert_id);
  107|   826k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   826k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 809k, False: 17.1k]
  ------------------
  109|   809k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   809k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   809k|            continue;
  112|   809k|          }
  113|   826k|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|   873k|        const CornerIndex right_corner_id =
  118|   873k|            this->corner_table()->GetRightCorner(corner_id);
  119|   873k|        const CornerIndex left_corner_id =
  120|   873k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   873k|        const FaceIndex right_face_id(
  122|   873k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 13.4k, False: 860k]
  ------------------
  123|   873k|                 ? kInvalidFaceIndex
  124|   873k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   873k|        const FaceIndex left_face_id(
  126|   873k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 50.5k, False: 823k]
  ------------------
  127|   873k|                 ? kInvalidFaceIndex
  128|   873k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   873k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 836k, False: 36.9k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   836k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 52.4k, False: 784k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  52.4k|            corner_traversal_stack_.pop_back();
  134|  52.4k|            break;  // Break from the while (true) loop.
  135|   784k|          } else {
  136|       |            // Go to the left face.
  137|   784k|            corner_id = left_corner_id;
  138|   784k|            face_id = left_face_id;
  139|   784k|          }
  140|   836k|        } else {
  141|       |          // Right face was not visited.
  142|  36.9k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 31.7k, False: 5.18k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  31.7k|            corner_id = right_corner_id;
  145|  31.7k|            face_id = right_face_id;
  146|  31.7k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  5.18k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  5.18k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  5.18k|            break;
  159|  5.18k|          }
  160|  36.9k|        }
  161|   873k|      }
  162|  57.6k|    }
  163|  47.7k|    return true;
  164|  47.7k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.26k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  2.59k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.44k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  2.98M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  2.98M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.07M, False: 1.91M]
  ------------------
   61|  1.07M|      return true;  // Already traversed.
   62|  1.07M|    }
   63|       |
   64|  1.91M|    corner_traversal_stack_.clear();
   65|  1.91M|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  1.91M|    const VertexIndex next_vert =
   69|  1.91M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  1.91M|    const VertexIndex prev_vert =
   71|  1.91M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  1.91M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 1.91M]
  |  Branch (72:45): [True: 0, False: 1.91M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  1.91M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 1.91M, False: 1.48k]
  ------------------
   76|  1.91M|      this->MarkVertexVisited(next_vert);
   77|  1.91M|      this->traversal_observer().OnNewVertexVisited(
   78|  1.91M|          next_vert, this->corner_table()->Next(corner_id));
   79|  1.91M|    }
   80|  1.91M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 1.86M, False: 45.4k]
  ------------------
   81|  1.86M|      this->MarkVertexVisited(prev_vert);
   82|  1.86M|      this->traversal_observer().OnNewVertexVisited(
   83|  1.86M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  1.86M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  3.87M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 1.95M, False: 1.91M]
  ------------------
   88|       |      // Currently processed corner.
   89|  1.95M|      corner_id = corner_traversal_stack_.back();
   90|  1.95M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  1.95M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 1.95M]
  |  Branch (92:47): [True: 3.60k, False: 1.95M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  3.60k|        corner_traversal_stack_.pop_back();
   95|  3.60k|        continue;
   96|  3.60k|      }
   97|  2.98M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 2.98M, Folded]
  ------------------
   98|  2.98M|        this->MarkFaceVisited(face_id);
   99|  2.98M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  2.98M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  2.98M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 2.98M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  2.98M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 2.42M, False: 566k]
  ------------------
  105|  2.42M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  2.42M|          this->MarkVertexVisited(vert_id);
  107|  2.42M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  2.42M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 511k, False: 1.90M]
  ------------------
  109|   511k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   511k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   511k|            continue;
  112|   511k|          }
  113|  2.42M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  2.47M|        const CornerIndex right_corner_id =
  118|  2.47M|            this->corner_table()->GetRightCorner(corner_id);
  119|  2.47M|        const CornerIndex left_corner_id =
  120|  2.47M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  2.47M|        const FaceIndex right_face_id(
  122|  2.47M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 1.89M, False: 583k]
  ------------------
  123|  2.47M|                 ? kInvalidFaceIndex
  124|  2.47M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  2.47M|        const FaceIndex left_face_id(
  126|  2.47M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 1.93M, False: 544k]
  ------------------
  127|  2.47M|                 ? kInvalidFaceIndex
  128|  2.47M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  2.47M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 2.40M, False: 67.7k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  2.40M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 1.93M, False: 476k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  1.93M|            corner_traversal_stack_.pop_back();
  134|  1.93M|            break;  // Break from the while (true) loop.
  135|  1.93M|          } else {
  136|       |            // Go to the left face.
  137|   476k|            corner_id = left_corner_id;
  138|   476k|            face_id = left_face_id;
  139|   476k|          }
  140|  2.40M|        } else {
  141|       |          // Right face was not visited.
  142|  67.7k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 47.4k, False: 20.3k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  47.4k|            corner_id = right_corner_id;
  145|  47.4k|            face_id = right_face_id;
  146|  47.4k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  20.3k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  20.3k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  20.3k|            break;
  159|  20.3k|          }
  160|  67.7k|        }
  161|  2.47M|      }
  162|  1.95M|    }
  163|  1.91M|    return true;
  164|  1.91M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.44k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  2.97k|  DepthFirstTraverser() {}

_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   58|    294|  void OnTraversalStart() {
   59|    294|    prediction_degree_.resize(this->corner_table()->num_vertices(), 0);
   60|    294|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  2.24M|  bool TraverseFromCorner(CornerIndex corner_id) {
   66|  2.24M|    if (prediction_degree_.size() == 0) {
  ------------------
  |  Branch (66:9): [True: 0, False: 2.24M]
  ------------------
   67|      0|      return true;
   68|      0|    }
   69|       |
   70|       |    // Traversal starts from the |corner_id|. It's going to follow either the
   71|       |    // right or the left neighboring faces to |corner_id| based on their
   72|       |    // prediction degree.
   73|  2.24M|    traversal_stacks_[0].push_back(corner_id);
   74|  2.24M|    best_priority_ = 0;
   75|       |    // For the first face, check the remaining corners as they may not be
   76|       |    // processed yet.
   77|  2.24M|    const VertexIndex next_vert =
   78|  2.24M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   79|  2.24M|    const VertexIndex prev_vert =
   80|  2.24M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   81|  2.24M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (81:9): [True: 4.70k, False: 2.23M]
  ------------------
   82|  4.70k|      this->MarkVertexVisited(next_vert);
   83|  4.70k|      this->traversal_observer().OnNewVertexVisited(
   84|  4.70k|          next_vert, this->corner_table()->Next(corner_id));
   85|  4.70k|    }
   86|  2.24M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (86:9): [True: 1.72k, False: 2.24M]
  ------------------
   87|  1.72k|      this->MarkVertexVisited(prev_vert);
   88|  1.72k|      this->traversal_observer().OnNewVertexVisited(
   89|  1.72k|          prev_vert, this->corner_table()->Previous(corner_id));
   90|  1.72k|    }
   91|  2.24M|    const VertexIndex tip_vertex = this->corner_table()->Vertex(corner_id);
   92|  2.24M|    if (!this->IsVertexVisited(tip_vertex)) {
  ------------------
  |  Branch (92:9): [True: 1.58k, False: 2.24M]
  ------------------
   93|  1.58k|      this->MarkVertexVisited(tip_vertex);
   94|  1.58k|      this->traversal_observer().OnNewVertexVisited(tip_vertex, corner_id);
   95|  1.58k|    }
   96|       |    // Start the actual traversal.
   97|  6.66M|    while ((corner_id = PopNextCornerToTraverse()) != kInvalidCornerIndex) {
  ------------------
  |  Branch (97:12): [True: 4.42M, False: 2.24M]
  ------------------
   98|  4.42M|      FaceIndex face_id(corner_id.value() / 3);
   99|       |      // Make sure the face hasn't been visited yet.
  100|  4.42M|      if (this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (100:11): [True: 3.34M, False: 1.07M]
  ------------------
  101|       |        // This face has been already traversed.
  102|  3.34M|        continue;
  103|  3.34M|      }
  104|       |
  105|  2.24M|      while (true) {
  ------------------
  |  Branch (105:14): [True: 2.24M, Folded]
  ------------------
  106|  2.24M|        face_id = FaceIndex(corner_id.value() / 3);
  107|  2.24M|        this->MarkFaceVisited(face_id);
  108|  2.24M|        this->traversal_observer().OnNewFaceVisited(face_id);
  109|       |
  110|       |        // If the newly reached vertex hasn't been visited, mark it and notify
  111|       |        // the observer.
  112|  2.24M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  113|  2.24M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (113:13): [True: 1.13M, False: 1.11M]
  ------------------
  114|  1.13M|          this->MarkVertexVisited(vert_id);
  115|  1.13M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  116|  1.13M|        }
  117|       |
  118|       |        // Check whether we can traverse to the right and left neighboring
  119|       |        // faces.
  120|  2.24M|        const CornerIndex right_corner_id =
  121|  2.24M|            this->corner_table()->GetRightCorner(corner_id);
  122|  2.24M|        const CornerIndex left_corner_id =
  123|  2.24M|            this->corner_table()->GetLeftCorner(corner_id);
  124|  2.24M|        const FaceIndex right_face_id(
  125|  2.24M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (125:14): [True: 14.7k, False: 2.22M]
  ------------------
  126|  2.24M|                 ? kInvalidFaceIndex
  127|  2.24M|                 : FaceIndex(right_corner_id.value() / 3)));
  128|  2.24M|        const FaceIndex left_face_id(
  129|  2.24M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (129:14): [True: 17.1k, False: 2.22M]
  ------------------
  130|  2.24M|                 ? kInvalidFaceIndex
  131|  2.24M|                 : FaceIndex(left_corner_id.value() / 3)));
  132|  2.24M|        const bool is_right_face_visited = this->IsFaceVisited(right_face_id);
  133|  2.24M|        const bool is_left_face_visited = this->IsFaceVisited(left_face_id);
  134|       |
  135|  2.24M|        if (!is_left_face_visited) {
  ------------------
  |  Branch (135:13): [True: 1.68M, False: 557k]
  ------------------
  136|       |          // We can go to the left face.
  137|  1.68M|          const int priority = ComputePriority(left_corner_id);
  138|  1.68M|          if (is_right_face_visited && priority <= best_priority_) {
  ------------------
  |  Branch (138:15): [True: 573k, False: 1.11M]
  |  Branch (138:40): [True: 543k, False: 30.5k]
  ------------------
  139|       |            // Right face has been already visited and the priority is equal or
  140|       |            // better than the best priority. We are sure that the left face
  141|       |            // would be traversed next so there is no need to put it onto the
  142|       |            // stack.
  143|   543k|            corner_id = left_corner_id;
  144|   543k|            continue;
  145|  1.14M|          } else {
  146|  1.14M|            AddCornerToTraversalStack(left_corner_id, priority);
  147|  1.14M|          }
  148|  1.68M|        }
  149|  1.69M|        if (!is_right_face_visited) {
  ------------------
  |  Branch (149:13): [True: 1.65M, False: 40.8k]
  ------------------
  150|       |          // Go to the right face.
  151|  1.65M|          const int priority = ComputePriority(right_corner_id);
  152|  1.65M|          if (priority <= best_priority_) {
  ------------------
  |  Branch (152:15): [True: 620k, False: 1.03M]
  ------------------
  153|       |            // We are sure that the right face would be traversed next so there
  154|       |            // is no need to put it onto the stack.
  155|   620k|            corner_id = right_corner_id;
  156|   620k|            continue;
  157|  1.03M|          } else {
  158|  1.03M|            AddCornerToTraversalStack(right_corner_id, priority);
  159|  1.03M|          }
  160|  1.65M|        }
  161|       |
  162|       |        // Couldn't proceed directly to the next corner
  163|  1.07M|        break;
  164|  1.69M|      }
  165|  1.07M|    }
  166|  2.24M|    return true;
  167|  2.24M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE23PopNextCornerToTraverseEv:
  173|  6.66M|  CornerIndex PopNextCornerToTraverse() {
  174|  13.9M|    for (int i = best_priority_; i < kMaxPriority; ++i) {
  ------------------
  |  Branch (174:34): [True: 11.7M, False: 2.24M]
  ------------------
  175|  11.7M|      if (!traversal_stacks_[i].empty()) {
  ------------------
  |  Branch (175:11): [True: 4.42M, False: 7.29M]
  ------------------
  176|  4.42M|        const CornerIndex ret = traversal_stacks_[i].back();
  177|  4.42M|        traversal_stacks_[i].pop_back();
  178|  4.42M|        best_priority_ = i;
  179|  4.42M|        return ret;
  180|  4.42M|      }
  181|  11.7M|    }
  182|  2.24M|    return kInvalidCornerIndex;
  183|  6.66M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15ComputePriorityENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  194|  3.34M|  inline int ComputePriority(CornerIndex corner_id) {
  195|  3.34M|    const VertexIndex v_tip = this->corner_table()->Vertex(corner_id);
  196|       |    // Priority 0 when traversing to already visited vertices.
  197|  3.34M|    int priority = 0;
  198|  3.34M|    if (!this->IsVertexVisited(v_tip)) {
  ------------------
  |  Branch (198:9): [True: 2.21M, False: 1.13M]
  ------------------
  199|  2.21M|      const int degree = ++prediction_degree_[v_tip];
  200|       |      // Priority 1 when prediction degree > 1, otherwise 2.
  201|  2.21M|      priority = (degree > 1 ? 1 : 2);
  ------------------
  |  Branch (201:19): [True: 1.08M, False: 1.13M]
  ------------------
  202|  2.21M|    }
  203|       |    // Clamp the priority to the maximum number of buckets.
  204|  3.34M|    if (priority >= kMaxPriority) {
  ------------------
  |  Branch (204:9): [True: 0, False: 3.34M]
  ------------------
  205|      0|      priority = kMaxPriority - 1;
  206|      0|    }
  207|  3.34M|    return priority;
  208|  3.34M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE25AddCornerToTraversalStackENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEi:
  185|  2.17M|  inline void AddCornerToTraversalStack(CornerIndex ci, int priority) {
  186|  2.17M|    traversal_stacks_[priority].push_back(ci);
  187|       |    // Make sure that the best available priority is up to date.
  188|  2.17M|    if (priority < best_priority_) {
  ------------------
  |  Branch (188:9): [True: 544k, False: 1.63M]
  ------------------
  189|   544k|      best_priority_ = priority;
  190|   544k|    }
  191|  2.17M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   63|    294|  void OnTraversalEnd() {}
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   55|    604|  MaxPredictionDegreeTraverser() {}

_ZN5draco36MeshAttributeIndicesEncodingObserverINS_11CornerTableEE18OnNewVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS3_IjNS_21CornerIndex_tag_type_EEE:
   50|  2.01M|  inline void OnNewVertexVisited(VertexIndex vertex, CornerIndex corner) {
   51|  2.01M|    const PointIndex point_id =
   52|  2.01M|        mesh_->face(FaceIndex(corner.value() / 3))[corner.value() % 3];
   53|       |    // Append the visited attribute to the encoding order.
   54|  2.01M|    sequencer_->AddPointId(point_id);
   55|       |
   56|       |    // Keep track of visited corners.
   57|  2.01M|    encoding_data_->encoded_attribute_value_index_to_corner_map.push_back(
   58|  2.01M|        corner);
   59|       |
   60|  2.01M|    encoding_data_
   61|  2.01M|        ->vertex_to_encoded_attribute_value_index_map[vertex.value()] =
   62|  2.01M|        encoding_data_->num_values;
   63|       |
   64|  2.01M|    encoding_data_->num_values++;
   65|  2.01M|  }
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_11CornerTableEE16OnNewFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   48|  3.92M|  void OnNewFaceVisited(FaceIndex /* face */) {}
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_11CornerTableEEC2EPKS1_PKNS_4MeshEPNS_15PointsSequencerEPNS_32MeshAttributeIndicesEncodingDataE:
   41|  1.60k|      : att_connectivity_(connectivity),
   42|  1.60k|        encoding_data_(encoding_data),
   43|  1.60k|        mesh_(mesh),
   44|  1.60k|        sequencer_(sequencer) {}
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_11CornerTableEEC2Ev:
   33|  3.20k|      : att_connectivity_(nullptr),
   34|  3.20k|        encoding_data_(nullptr),
   35|  3.20k|        mesh_(nullptr),
   36|  3.20k|        sequencer_(nullptr) {}
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_24MeshAttributeCornerTableEE18OnNewVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS3_IjNS_21CornerIndex_tag_type_EEE:
   50|  6.20M|  inline void OnNewVertexVisited(VertexIndex vertex, CornerIndex corner) {
   51|  6.20M|    const PointIndex point_id =
   52|  6.20M|        mesh_->face(FaceIndex(corner.value() / 3))[corner.value() % 3];
   53|       |    // Append the visited attribute to the encoding order.
   54|  6.20M|    sequencer_->AddPointId(point_id);
   55|       |
   56|       |    // Keep track of visited corners.
   57|  6.20M|    encoding_data_->encoded_attribute_value_index_to_corner_map.push_back(
   58|  6.20M|        corner);
   59|       |
   60|  6.20M|    encoding_data_
   61|  6.20M|        ->vertex_to_encoded_attribute_value_index_map[vertex.value()] =
   62|  6.20M|        encoding_data_->num_values;
   63|       |
   64|  6.20M|    encoding_data_->num_values++;
   65|  6.20M|  }
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_24MeshAttributeCornerTableEE16OnNewFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   48|  2.98M|  void OnNewFaceVisited(FaceIndex /* face */) {}
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_24MeshAttributeCornerTableEEC2EPKS1_PKNS_4MeshEPNS_15PointsSequencerEPNS_32MeshAttributeIndicesEncodingDataE:
   41|  1.48k|      : att_connectivity_(connectivity),
   42|  1.48k|        encoding_data_(encoding_data),
   43|  1.48k|        mesh_(mesh),
   44|  1.48k|        sequencer_(sequencer) {}
_ZN5draco36MeshAttributeIndicesEncodingObserverINS_24MeshAttributeCornerTableEEC2Ev:
   33|  2.97k|      : att_connectivity_(nullptr),
   34|  2.97k|        encoding_data_(nullptr),
   35|  2.97k|        mesh_(nullptr),
   36|  2.97k|        sequencer_(nullptr) {}

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    302|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  1.59k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  1.59k|    const auto *corner_table = traverser_.corner_table();
   50|  1.59k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  1.59k|    const size_t num_faces = mesh_->num_faces();
   52|  1.59k|    const size_t num_points = mesh_->num_points();
   53|  4.51M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.51M, False: 1.59k]
  ------------------
   54|  4.51M|      const auto &face = mesh_->face(f);
   55|  18.0M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 13.5M, False: 4.51M]
  ------------------
   56|  13.5M|        const PointIndex point_id = face[p];
   57|  13.5M|        const VertexIndex vert_id =
   58|  13.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  13.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 13.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  13.5M|        const AttributeValueIndex att_entry_id(
   63|  13.5M|            encoding_data_
   64|  13.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  13.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 13.5M]
  |  Branch (65:13): [True: 0, False: 13.5M]
  |  Branch (65:39): [True: 0, False: 13.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  13.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  13.5M|      }
   71|  4.51M|    }
   72|  1.59k|    return true;
   73|  1.59k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    294|  bool GenerateSequenceInternal() override {
   77|       |    // Preallocate memory for storing point indices. We expect the number of
   78|       |    // points to be the same as the number of corner table vertices.
   79|    294|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    294|    traverser_.OnTraversalStart();
   82|    294|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 294]
  ------------------
   83|      0|      for (uint32_t i = 0; i < corner_order_->size(); ++i) {
  ------------------
  |  Branch (83:28): [True: 0, False: 0]
  ------------------
   84|      0|        if (!ProcessCorner(corner_order_->at(i))) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|          return false;
   86|      0|        }
   87|      0|      }
   88|    294|    } else {
   89|    294|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.24M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.24M, False: 294]
  ------------------
   91|  2.24M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.24M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.24M|      }
   95|    294|    }
   96|    294|    traverser_.OnTraversalEnd();
   97|    294|    return true;
   98|    294|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.24M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.24M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.24M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    302|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.29k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  5.00k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  5.00k|    const auto *corner_table = traverser_.corner_table();
   50|  5.00k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  5.00k|    const size_t num_faces = mesh_->num_faces();
   52|  5.00k|    const size_t num_points = mesh_->num_points();
   53|  3.30M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 3.29M, False: 5.00k]
  ------------------
   54|  3.29M|      const auto &face = mesh_->face(f);
   55|  13.1M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 9.89M, False: 3.29M]
  ------------------
   56|  9.89M|        const PointIndex point_id = face[p];
   57|  9.89M|        const VertexIndex vert_id =
   58|  9.89M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  9.89M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 9.89M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  9.89M|        const AttributeValueIndex att_entry_id(
   63|  9.89M|            encoding_data_
   64|  9.89M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  9.89M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 9.89M]
  |  Branch (65:13): [True: 0, False: 9.89M]
  |  Branch (65:39): [True: 0, False: 9.89M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  9.89M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  9.89M|      }
   71|  3.29M|    }
   72|  5.00k|    return true;
   73|  5.00k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.26k|  bool GenerateSequenceInternal() override {
   77|       |    // Preallocate memory for storing point indices. We expect the number of
   78|       |    // points to be the same as the number of corner table vertices.
   79|  1.26k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.26k|    traverser_.OnTraversalStart();
   82|  1.26k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.26k]
  ------------------
   83|      0|      for (uint32_t i = 0; i < corner_order_->size(); ++i) {
  ------------------
  |  Branch (83:28): [True: 0, False: 0]
  ------------------
   84|      0|        if (!ProcessCorner(corner_order_->at(i))) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|          return false;
   86|      0|        }
   87|      0|      }
   88|  1.26k|    } else {
   89|  1.26k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  1.68M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 1.68M, False: 1.26k]
  ------------------
   91|  1.68M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 1.68M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  1.68M|      }
   95|  1.26k|    }
   96|  1.26k|    traverser_.OnTraversalEnd();
   97|  1.26k|    return true;
   98|  1.26k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.68M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  1.68M|    return traverser_.TraverseFromCorner(corner_id);
  103|  1.68M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.29k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.48k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  5.76k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  5.76k|    const auto *corner_table = traverser_.corner_table();
   50|  5.76k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  5.76k|    const size_t num_faces = mesh_->num_faces();
   52|  5.76k|    const size_t num_points = mesh_->num_points();
   53|  6.19M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 6.18M, False: 5.76k]
  ------------------
   54|  6.18M|      const auto &face = mesh_->face(f);
   55|  24.7M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 18.5M, False: 6.18M]
  ------------------
   56|  18.5M|        const PointIndex point_id = face[p];
   57|  18.5M|        const VertexIndex vert_id =
   58|  18.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  18.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 18.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  18.5M|        const AttributeValueIndex att_entry_id(
   63|  18.5M|            encoding_data_
   64|  18.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  18.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 18.5M]
  |  Branch (65:13): [True: 2, False: 18.5M]
  |  Branch (65:39): [True: 2, False: 18.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      2|          return false;
   68|      2|        }
   69|  18.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  18.5M|      }
   71|  6.18M|    }
   72|  5.76k|    return true;
   73|  5.76k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.44k|  bool GenerateSequenceInternal() override {
   77|       |    // Preallocate memory for storing point indices. We expect the number of
   78|       |    // points to be the same as the number of corner table vertices.
   79|  1.44k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.44k|    traverser_.OnTraversalStart();
   82|  1.44k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.44k]
  ------------------
   83|      0|      for (uint32_t i = 0; i < corner_order_->size(); ++i) {
  ------------------
  |  Branch (83:28): [True: 0, False: 0]
  ------------------
   84|      0|        if (!ProcessCorner(corner_order_->at(i))) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|          return false;
   86|      0|        }
   87|      0|      }
   88|  1.44k|    } else {
   89|  1.44k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.98M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.98M, False: 1.44k]
  ------------------
   91|  2.98M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.98M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.98M|      }
   95|  1.44k|    }
   96|  1.44k|    traverser_.OnTraversalEnd();
   97|  1.44k|    return true;
   98|  1.44k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.98M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.98M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.98M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.48k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  2.97k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  26.6M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  14.0M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  14.0M|    return is_vertex_visited_[vert_id.value()];
   65|  14.0M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.01M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.01M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.01M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  5.94M|  inline TraversalObserverT &traversal_observer() {
   75|  5.94M|    return traversal_observer_;
   76|  5.94M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  10.7M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  10.7M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 95.8k, False: 10.6M]
  ------------------
   47|  95.8k|      return true;  // Invalid faces are always considered as visited.
   48|  95.8k|    }
   49|  10.6M|    return is_face_visited_[face_id.value()];
   50|  10.7M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  3.92M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  3.92M|    is_face_visited_[face_id.value()] = true;
   62|  3.92M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  3.20k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  3.20k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.60k|                    TraversalObserver traversal_observer) {
   37|  1.60k|    corner_table_ = corner_table;
   38|  1.60k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.60k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.60k|    traversal_observer_ = traversal_observer;
   41|  1.60k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.68M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.68M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.68M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.68M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.68M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  22.3M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  2.98M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  2.98M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 2.98M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  2.98M|    return is_face_visited_[corner_id.value() / 3];
   58|  2.98M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  6.81M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  6.81M|    return is_vertex_visited_[vert_id.value()];
   65|  6.81M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  6.20M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  6.20M|    is_vertex_visited_[vert_id.value()] = true;
   68|  6.20M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  9.19M|  inline TraversalObserverT &traversal_observer() {
   75|  9.19M|    return traversal_observer_;
   76|  9.19M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  6.90M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  6.90M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 3.82M, False: 3.08M]
  ------------------
   47|  3.82M|      return true;  // Invalid faces are always considered as visited.
   48|  3.82M|    }
   49|  3.08M|    return is_face_visited_[face_id.value()];
   50|  6.90M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  2.98M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  2.98M|    is_face_visited_[face_id.value()] = true;
   62|  2.98M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  2.97k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.48k|                    TraversalObserver traversal_observer) {
   37|  1.48k|    corner_table_ = corner_table;
   38|  1.48k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.48k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.48k|    traversal_observer_ = traversal_observer;
   41|  1.48k|  }

_ZN5draco17PointCloudDecoderC2Ev:
   22|  6.55k|    : point_cloud_(nullptr),
   23|  6.55k|      buffer_(nullptr),
   24|  6.55k|      version_major_(0),
   25|  6.55k|      version_minor_(0),
   26|  6.55k|      options_(nullptr) {}
_ZN5draco17PointCloudDecoder12DecodeHeaderEPNS_13DecoderBufferEPNS_11DracoHeaderE:
   29|  13.1k|                                       DracoHeader *out_header) {
   30|  13.1k|  constexpr char kIoErrorMsg[] = "Failed to parse Draco header.";
   31|  13.1k|  if (!buffer->Decode(out_header->draco_string, 5)) {
  ------------------
  |  Branch (31:7): [True: 0, False: 13.1k]
  ------------------
   32|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   33|      0|  }
   34|  13.1k|  if (memcmp(out_header->draco_string, "DRACO", 5) != 0) {
  ------------------
  |  Branch (34:7): [True: 6, False: 13.1k]
  ------------------
   35|      6|    return Status(Status::DRACO_ERROR, "Not a Draco file.");
   36|      6|  }
   37|  13.1k|  if (!buffer->Decode(&(out_header->version_major))) {
  ------------------
  |  Branch (37:7): [True: 0, False: 13.1k]
  ------------------
   38|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   39|      0|  }
   40|  13.1k|  if (!buffer->Decode(&(out_header->version_minor))) {
  ------------------
  |  Branch (40:7): [True: 0, False: 13.1k]
  ------------------
   41|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   42|      0|  }
   43|  13.1k|  if (!buffer->Decode(&(out_header->encoder_type))) {
  ------------------
  |  Branch (43:7): [True: 0, False: 13.1k]
  ------------------
   44|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   45|      0|  }
   46|  13.1k|  if (!buffer->Decode(&(out_header->encoder_method))) {
  ------------------
  |  Branch (46:7): [True: 0, False: 13.1k]
  ------------------
   47|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   48|      0|  }
   49|  13.1k|  if (!buffer->Decode(&(out_header->flags))) {
  ------------------
  |  Branch (49:7): [True: 0, False: 13.1k]
  ------------------
   50|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   51|      0|  }
   52|  13.1k|  return OkStatus();
   53|  13.1k|}
_ZN5draco17PointCloudDecoder14DecodeMetadataEv:
   55|    592|Status PointCloudDecoder::DecodeMetadata() {
   56|    592|  std::unique_ptr<GeometryMetadata> metadata =
   57|    592|      std::unique_ptr<GeometryMetadata>(new GeometryMetadata());
   58|    592|  MetadataDecoder metadata_decoder;
   59|    592|  if (!metadata_decoder.DecodeGeometryMetadata(buffer_, metadata.get())) {
  ------------------
  |  Branch (59:7): [True: 449, False: 143]
  ------------------
   60|    449|    return Status(Status::DRACO_ERROR, "Failed to decode metadata.");
   61|    449|  }
   62|    143|  point_cloud_->AddMetadata(std::move(metadata));
   63|    143|  return OkStatus();
   64|    592|}
_ZN5draco17PointCloudDecoder6DecodeERKNS_12DracoOptionsINS_17GeometryAttribute4TypeEEEPNS_13DecoderBufferEPNS_10PointCloudE:
   68|  6.55k|                                 PointCloud *out_point_cloud) {
   69|  6.55k|  options_ = &options;
   70|  6.55k|  buffer_ = in_buffer;
   71|  6.55k|  point_cloud_ = out_point_cloud;
   72|  6.55k|  DracoHeader header;
   73|  6.55k|  DRACO_RETURN_IF_ERROR(DecodeHeader(buffer_, &header))
  ------------------
  |  |   74|  6.55k|  {                                                   \
  |  |   75|  6.55k|    const draco::Status _local_status = (expression); \
  |  |   76|  6.55k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 0, False: 6.55k]
  |  |  ------------------
  |  |   77|      0|      return _local_status;                           \
  |  |   78|      0|    }                                                 \
  |  |   79|  6.55k|  }
  ------------------
   74|       |  // Sanity check that we are really using the right decoder (mostly for cases
   75|       |  // where the Decode method was called manually outside of our main API.
   76|  6.55k|  if (header.encoder_type != GetGeometryType()) {
  ------------------
  |  Branch (76:7): [True: 0, False: 6.55k]
  ------------------
   77|      0|    return Status(Status::DRACO_ERROR,
   78|      0|                  "Using incompatible decoder for the input geometry.");
   79|      0|  }
   80|       |  // TODO(ostava): We should check the method as well, but currently decoders
   81|       |  // don't expose the decoding method id.
   82|  6.55k|  version_major_ = header.version_major;
   83|  6.55k|  version_minor_ = header.version_minor;
   84|       |
   85|  6.55k|  const uint8_t max_supported_major_version =
   86|  6.55k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMajor
  ------------------
  |  Branch (86:7): [True: 0, False: 6.55k]
  ------------------
   87|  6.55k|                                         : kDracoMeshBitstreamVersionMajor;
   88|  6.55k|  const uint8_t max_supported_minor_version =
   89|  6.55k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMinor
  ------------------
  |  Branch (89:7): [True: 0, False: 6.55k]
  ------------------
   90|  6.55k|                                         : kDracoMeshBitstreamVersionMinor;
   91|       |
   92|       |  // Check for version compatibility.
   93|  6.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   94|  6.55k|  if (version_major_ < 1 || version_major_ > max_supported_major_version) {
  ------------------
  |  Branch (94:7): [True: 0, False: 6.55k]
  |  Branch (94:29): [True: 0, False: 6.55k]
  ------------------
   95|      0|    return Status(Status::UNKNOWN_VERSION, "Unknown major version.");
   96|      0|  }
   97|  6.55k|  if (version_major_ == max_supported_major_version &&
  ------------------
  |  Branch (97:7): [True: 5.75k, False: 798]
  ------------------
   98|  5.75k|      version_minor_ > max_supported_minor_version) {
  ------------------
  |  Branch (98:7): [True: 0, False: 5.75k]
  ------------------
   99|      0|    return Status(Status::UNKNOWN_VERSION, "Unknown minor version.");
  100|      0|  }
  101|       |#else
  102|       |  if (version_major_ != max_supported_major_version) {
  103|       |    return Status(Status::UNKNOWN_VERSION, "Unsupported major version.");
  104|       |  }
  105|       |  if (version_minor_ != max_supported_minor_version) {
  106|       |    return Status(Status::UNKNOWN_VERSION, "Unsupported minor version.");
  107|       |  }
  108|       |#endif
  109|  6.55k|  buffer_->set_bitstream_version(
  110|  6.55k|      DRACO_BITSTREAM_VERSION(version_major_, version_minor_));
  ------------------
  |  |  115|  6.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  111|       |
  112|  6.55k|  if (bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 3) &&
  ------------------
  |  |  115|  13.1k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (112:7): [True: 6.25k, False: 302]
  ------------------
  113|  6.25k|      (header.flags & METADATA_FLAG_MASK)) {
  ------------------
  |  |  151|  6.25k|#define METADATA_FLAG_MASK 0x8000
  ------------------
  |  Branch (113:7): [True: 592, False: 5.65k]
  ------------------
  114|    592|    DRACO_RETURN_IF_ERROR(DecodeMetadata())
  ------------------
  |  |   74|    592|  {                                                   \
  |  |   75|    592|    const draco::Status _local_status = (expression); \
  |  |   76|    592|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 449, False: 143]
  |  |  ------------------
  |  |   77|    449|      return _local_status;                           \
  |  |   78|    449|    }                                                 \
  |  |   79|    592|  }
  ------------------
  115|    592|  }
  116|  6.10k|  if (!InitializeDecoder()) {
  ------------------
  |  Branch (116:7): [True: 0, False: 6.10k]
  ------------------
  117|      0|    return Status(Status::DRACO_ERROR, "Failed to initialize the decoder.");
  118|      0|  }
  119|  6.10k|  if (!DecodeGeometryData()) {
  ------------------
  |  Branch (119:7): [True: 2.52k, False: 3.57k]
  ------------------
  120|  2.52k|    return Status(Status::DRACO_ERROR, "Failed to decode geometry data.");
  121|  2.52k|  }
  122|  3.57k|  if (!DecodePointAttributes()) {
  ------------------
  |  Branch (122:7): [True: 3.02k, False: 554]
  ------------------
  123|  3.02k|    return Status(Status::DRACO_ERROR, "Failed to decode point attributes.");
  124|  3.02k|  }
  125|    554|  return OkStatus();
  126|  3.57k|}
_ZN5draco17PointCloudDecoder21DecodePointAttributesEv:
  128|  3.57k|bool PointCloudDecoder::DecodePointAttributes() {
  129|  3.57k|  uint8_t num_attributes_decoders;
  130|  3.57k|  if (!buffer_->Decode(&num_attributes_decoders)) {
  ------------------
  |  Branch (130:7): [True: 39, False: 3.53k]
  ------------------
  131|     39|    return false;
  132|     39|  }
  133|       |  // Create all attribute decoders. This is implementation specific and the
  134|       |  // derived classes can use any data encoded in the
  135|       |  // PointCloudEncoder::EncodeAttributesEncoderIdentifier() call.
  136|  24.5k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (136:19): [True: 21.1k, False: 3.37k]
  ------------------
  137|  21.1k|    if (!CreateAttributesDecoder(i)) {
  ------------------
  |  Branch (137:9): [True: 163, False: 20.9k]
  ------------------
  138|    163|      return false;
  139|    163|    }
  140|  21.1k|  }
  141|       |
  142|       |  // Initialize all attributes decoders. No data is decoded here.
  143|  20.9k|  for (auto &att_dec : attributes_decoders_) {
  ------------------
  |  Branch (143:22): [True: 20.9k, False: 3.37k]
  ------------------
  144|  20.9k|    if (!att_dec->Init(this, point_cloud_)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 20.9k]
  ------------------
  145|      0|      return false;
  146|      0|    }
  147|  20.9k|  }
  148|       |
  149|       |  // Decode any data needed by the attribute decoders.
  150|  10.9k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (150:19): [True: 7.69k, False: 3.23k]
  ------------------
  151|  7.69k|    if (!attributes_decoders_[i]->DecodeAttributesDecoderData(buffer_)) {
  ------------------
  |  Branch (151:9): [True: 139, False: 7.55k]
  ------------------
  152|    139|      return false;
  153|    139|    }
  154|  7.69k|  }
  155|       |
  156|       |  // Create map between attribute and decoder ids.
  157|  9.49k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (157:19): [True: 6.26k, False: 3.23k]
  ------------------
  158|  6.26k|    const int32_t num_attributes = attributes_decoders_[i]->GetNumAttributes();
  159|  28.0k|    for (int j = 0; j < num_attributes; ++j) {
  ------------------
  |  Branch (159:21): [True: 21.8k, False: 6.26k]
  ------------------
  160|  21.8k|      int att_id = attributes_decoders_[i]->GetAttributeId(j);
  161|  21.8k|      if (att_id >= attribute_to_decoder_map_.size()) {
  ------------------
  |  Branch (161:11): [True: 21.8k, False: 0]
  ------------------
  162|  21.8k|        attribute_to_decoder_map_.resize(att_id + 1);
  163|  21.8k|      }
  164|  21.8k|      attribute_to_decoder_map_[att_id] = i;
  165|  21.8k|    }
  166|  6.26k|  }
  167|       |
  168|       |  // Decode the actual attributes using the created attribute decoders.
  169|  3.23k|  if (!DecodeAllAttributes()) {
  ------------------
  |  Branch (169:7): [True: 2.67k, False: 554]
  ------------------
  170|  2.67k|    return false;
  171|  2.67k|  }
  172|       |
  173|    554|  if (!OnAttributesDecoded()) {
  ------------------
  |  Branch (173:7): [True: 0, False: 554]
  ------------------
  174|      0|    return false;
  175|      0|  }
  176|    554|  return true;
  177|    554|}
_ZN5draco17PointCloudDecoder19DecodeAllAttributesEv:
  179|  3.23k|bool PointCloudDecoder::DecodeAllAttributes() {
  180|  4.64k|  for (auto &att_dec : attributes_decoders_) {
  ------------------
  |  Branch (180:22): [True: 4.64k, False: 554]
  ------------------
  181|  4.64k|    if (!att_dec->DecodeAttributes(buffer_)) {
  ------------------
  |  Branch (181:9): [True: 2.67k, False: 1.96k]
  ------------------
  182|  2.67k|      return false;
  183|  2.67k|    }
  184|  4.64k|  }
  185|    554|  return true;
  186|  3.23k|}
_ZN5draco17PointCloudDecoder20GetPortableAttributeEi:
  189|  2.48k|    int32_t parent_att_id) {
  190|  2.48k|  if (parent_att_id < 0 || parent_att_id >= point_cloud_->num_attributes()) {
  ------------------
  |  Branch (190:7): [True: 0, False: 2.48k]
  |  Branch (190:28): [True: 0, False: 2.48k]
  ------------------
  191|      0|    return nullptr;
  192|      0|  }
  193|  2.48k|  const int32_t parent_att_decoder_id =
  194|  2.48k|      attribute_to_decoder_map_[parent_att_id];
  195|  2.48k|  return attributes_decoders_[parent_att_decoder_id]->GetPortableAttribute(
  196|  2.48k|      parent_att_id);
  197|  2.48k|}

_ZN5draco17PointCloudDecoder20SetAttributesDecoderEiNSt3__110unique_ptrINS_26AttributesDecoderInterfaceENS1_14default_deleteIS3_EEEE:
   44|  20.9k|      int att_decoder_id, std::unique_ptr<AttributesDecoderInterface> decoder) {
   45|  20.9k|    if (att_decoder_id < 0) {
  ------------------
  |  Branch (45:9): [True: 0, False: 20.9k]
  ------------------
   46|      0|      return false;
   47|      0|    }
   48|  20.9k|    if (att_decoder_id >= static_cast<int>(attributes_decoders_.size())) {
  ------------------
  |  Branch (48:9): [True: 20.9k, False: 0]
  ------------------
   49|  20.9k|      attributes_decoders_.resize(att_decoder_id + 1);
   50|  20.9k|    }
   51|  20.9k|    attributes_decoders_[att_decoder_id] = std::move(decoder);
   52|  20.9k|    return true;
   53|  20.9k|  }
_ZNK5draco17PointCloudDecoder17bitstream_versionEv:
   63|   178k|  uint16_t bitstream_version() const {
   64|   178k|    return DRACO_BITSTREAM_VERSION(version_major_, version_minor_);
  ------------------
  |  |  115|   178k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
   65|   178k|  }
_ZN5draco17PointCloudDecoder18attributes_decoderEi:
   67|  6.86k|  const AttributesDecoderInterface *attributes_decoder(int dec_id) {
   68|  6.86k|    return attributes_decoders_[dec_id].get();
   69|  6.86k|  }
_ZNK5draco17PointCloudDecoder23num_attributes_decodersEv:
   70|  6.86k|  int32_t num_attributes_decoders() const {
   71|  6.86k|    return static_cast<int32_t>(attributes_decoders_.size());
   72|  6.86k|  }
_ZN5draco17PointCloudDecoder11point_cloudEv:
   76|  64.6k|  PointCloud *point_cloud() { return point_cloud_; }
_ZNK5draco17PointCloudDecoder11point_cloudEv:
   77|  10.4k|  const PointCloud *point_cloud() const { return point_cloud_; }
_ZN5draco17PointCloudDecoder6bufferEv:
   79|  1.45M|  DecoderBuffer *buffer() { return buffer_; }
_ZNK5draco17PointCloudDecoder7optionsEv:
   80|  8.26k|  const DecoderOptions *options() const { return options_; }
_ZN5draco17PointCloudDecoder17InitializeDecoderEv:
   85|  1.29k|  virtual bool InitializeDecoder() { return true; }
_ZN5draco17PointCloudDecoder18DecodeGeometryDataEv:
   89|  3.57k|  virtual bool DecodeGeometryData() { return true; }
_ZN5draco17PointCloudDecoder19OnAttributesDecodedEv:
   93|     67|  virtual bool OnAttributesDecoded() { return true; }
_ZN5draco17PointCloudDecoderD2Ev:
   31|  6.55k|  virtual ~PointCloudDecoder() = default;

_ZN5draco26ConvertSymbolsToSignedIntsEPKjiPi:
   30|  8.54k|                                int32_t *out) {
   31|   256M|  for (int i = 0; i < in_values; ++i) {
  ------------------
  |  Branch (31:19): [True: 256M, False: 8.54k]
  ------------------
   32|   256M|    out[i] = ConvertSymbolToSignedInt(in[i]);
   33|   256M|  }
   34|  8.54k|}

_ZN5draco18MostSignificantBitEj:
   58|    794|inline int MostSignificantBit(uint32_t n) {
   59|    794|#if defined(__GNUC__)
   60|    794|  return 31 ^ __builtin_clz(n);
   61|       |#elif defined(_MSC_VER)
   62|       |  unsigned long where;
   63|       |  _BitScanReverse(&where, n);
   64|       |  return (int)where;
   65|       |#else
   66|       |  uint32_t msb = 0;
   67|       |  if (n) {
   68|       |    if (0xFFFF0000 & n) { n >>= (1 << 4); msb |= (1 << 4); }
   69|       |    if (0x0000FF00 & n) { n >>= (1 << 3); msb |= (1 << 3); }
   70|       |    if (0x000000F0 & n) { n >>= (1 << 2); msb |= (1 << 2); }
   71|       |    if (0x0000000C & n) { n >>= (1 << 1); msb |= (1 << 1); }
   72|       |    if (0x00000002 & n) { msb |= (1 << 0); }
   73|       |  } else {
   74|       |    msb = -1;
   75|       |  }
   76|       |  return msb;
   77|       |#endif
   78|    794|}
_ZN5draco24ConvertSymbolToSignedIntIjEENSt3__111make_signedIT_E4typeES3_:
  112|   256M|    IntTypeT val) {
  113|   256M|  static_assert(std::is_integral<IntTypeT>::value, "IntTypeT is not integral.");
  114|   256M|  typedef typename std::make_signed<IntTypeT>::type SignedType;
  115|   256M|  const bool is_positive = !static_cast<bool>(val & 1);
  116|   256M|  val >>= 1;
  117|   256M|  if (is_positive) {
  ------------------
  |  Branch (117:7): [True: 245M, False: 11.8M]
  ------------------
  118|   245M|    return static_cast<SignedType>(val);
  119|   245M|  }
  120|  11.8M|  SignedType ret = static_cast<SignedType>(val);
  121|  11.8M|  ret = -ret - 1;
  122|  11.8M|  return ret;
  123|   256M|}

_ZN5draco10DataBufferC2Ev:
   21|  20.8k|DataBuffer::DataBuffer() {}
_ZN5draco10DataBuffer6UpdateEPKvl:
   23|  21.1k|bool DataBuffer::Update(const void *data, int64_t size) {
   24|  21.1k|  const int64_t offset = 0;
   25|  21.1k|  return this->Update(data, size, offset);
   26|  21.1k|}
_ZN5draco10DataBuffer6UpdateEPKvll:
   28|  21.1k|bool DataBuffer::Update(const void *data, int64_t size, int64_t offset) {
   29|  21.1k|  if (data == nullptr) {
  ------------------
  |  Branch (29:7): [True: 20.4k, False: 714]
  ------------------
   30|  20.4k|    if (size + offset < 0) {
  ------------------
  |  Branch (30:9): [True: 0, False: 20.4k]
  ------------------
   31|      0|      return false;
   32|      0|    }
   33|       |    // If no data is provided, just resize the buffer.
   34|  20.4k|    data_.resize(size + offset);
   35|  20.4k|  } else {
   36|    714|    if (size < 0) {
  ------------------
  |  Branch (36:9): [True: 0, False: 714]
  ------------------
   37|      0|      return false;
   38|      0|    }
   39|    714|    if (size + offset > static_cast<int64_t>(data_.size())) {
  ------------------
  |  Branch (39:9): [True: 570, False: 144]
  ------------------
   40|    570|      data_.resize(size + offset);
   41|    570|    }
   42|    714|    const uint8_t *const byte_data = static_cast<const uint8_t *>(data);
   43|    714|    std::copy(byte_data, byte_data + size, data_.data() + offset);
   44|    714|  }
   45|  21.1k|  descriptor_.buffer_update_count++;
   46|  21.1k|  return true;
   47|  21.1k|}
_ZN5draco10DataBuffer6ResizeEl:
   49|  2.49k|void DataBuffer::Resize(int64_t size) {
   50|  2.49k|  data_.resize(size);
   51|  2.49k|  descriptor_.buffer_update_count++;
   52|  2.49k|}

_ZN5draco20DataBufferDescriptorC2Ev:
   28|  70.1k|  DataBufferDescriptor() : buffer_id(0), buffer_update_count(0) {}
_ZN5draco10DataBuffer5WriteElPKvm:
   53|  1.41M|  void Write(int64_t byte_pos, const void *in_data, size_t data_size) {
   54|  1.41M|    memcpy(const_cast<uint8_t *>(data()) + byte_pos, in_data, data_size);
   55|  1.41M|  }
_ZNK5draco10DataBuffer12update_countEv:
   67|  20.4k|  int64_t update_count() const { return descriptor_.buffer_update_count; }
_ZNK5draco10DataBuffer9data_sizeEv:
   68|  58.6M|  size_t data_size() const { return data_.size(); }
_ZN5draco10DataBuffer4dataEv:
   70|  79.5M|  uint8_t *data() { return data_.data(); }
_ZNK5draco10DataBuffer9buffer_idEv:
   71|  20.4k|  int64_t buffer_id() const { return descriptor_.buffer_id; }

_ZN5draco13DecoderBufferC2Ev:
   23|  26.5k|    : data_(nullptr),
   24|  26.5k|      data_size_(0),
   25|  26.5k|      pos_(0),
   26|  26.5k|      bit_mode_(false),
   27|  26.5k|      bitstream_version_(0) {}
_ZN5draco13DecoderBuffer4InitEPKcm:
   29|  6.55k|void DecoderBuffer::Init(const char *data, size_t data_size) {
   30|  6.55k|  Init(data, data_size, bitstream_version_);
   31|  6.55k|}
_ZN5draco13DecoderBuffer4InitEPKcmt:
   33|  15.3k|void DecoderBuffer::Init(const char *data, size_t data_size, uint16_t version) {
   34|  15.3k|  data_ = data;
   35|  15.3k|  data_size_ = data_size;
   36|  15.3k|  bitstream_version_ = version;
   37|  15.3k|  pos_ = 0;
   38|  15.3k|}
_ZN5draco13DecoderBuffer16StartBitDecodingEbPm:
   40|  6.55k|bool DecoderBuffer::StartBitDecoding(bool decode_size, uint64_t *out_size) {
   41|  6.55k|  if (decode_size) {
  ------------------
  |  Branch (41:7): [True: 4.28k, False: 2.27k]
  ------------------
   42|  4.28k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   43|  4.28k|    if (bitstream_version_ < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.28k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (43:9): [True: 1.56k, False: 2.71k]
  ------------------
   44|  1.56k|      if (!Decode(out_size)) {
  ------------------
  |  Branch (44:11): [True: 0, False: 1.56k]
  ------------------
   45|      0|        return false;
   46|      0|      }
   47|  1.56k|    } else
   48|  2.71k|#endif
   49|  2.71k|    {
   50|  2.71k|      if (!DecodeVarint(out_size, this)) {
  ------------------
  |  Branch (50:11): [True: 12, False: 2.70k]
  ------------------
   51|     12|        return false;
   52|     12|      }
   53|  2.71k|    }
   54|  4.28k|  }
   55|  6.54k|  bit_mode_ = true;
   56|  6.54k|  bit_decoder_.reset(data_head(), remaining_size());
   57|  6.54k|  return true;
   58|  6.55k|}
_ZN5draco13DecoderBuffer14EndBitDecodingEv:
   60|  5.80k|void DecoderBuffer::EndBitDecoding() {
   61|  5.80k|  bit_mode_ = false;
   62|  5.80k|  const uint64_t bits_decoded = bit_decoder_.BitsDecoded();
   63|  5.80k|  const uint64_t bytes_decoded = (bits_decoded + 7) / 8;
   64|  5.80k|  pos_ += bytes_decoded;
   65|  5.80k|}
_ZN5draco13DecoderBuffer10BitDecoderC2Ev:
   68|  26.5k|    : bit_buffer_(nullptr), bit_buffer_end_(nullptr), bit_offset_(0) {}
_ZN5draco13DecoderBuffer10BitDecoderD2Ev:
   70|  33.0k|DecoderBuffer::BitDecoder::~BitDecoder() {}

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  57.6M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  57.6M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 57.6M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  57.6M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  57.6M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|   238M|  bool Decode(void *out_data, size_t size_to_decode) {
   77|   238M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 300, False: 238M]
  ------------------
   78|    300|      return false;  // Buffer overflow.
   79|    300|    }
   80|   238M|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|   238M|    pos_ += size_to_decode;
   82|   238M|    return true;
   83|   238M|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  20.7k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  6.55k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  31.3k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   269k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  4.48k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  57.6M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  3.93M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  6.54k|    inline void reset(const void *b, size_t s) {
  131|  6.54k|      bit_offset_ = 0;
  132|  6.54k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  6.54k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  6.54k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  5.80k|    inline uint64_t BitsDecoded() const {
  138|  5.80k|      return static_cast<uint64_t>(bit_offset_);
  139|  5.80k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  57.6M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  57.6M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 13, False: 57.6M]
  ------------------
  162|     13|        return false;
  163|     13|      }
  164|  57.6M|      uint32_t value = 0;
  165|   129M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 71.8M, False: 57.6M]
  ------------------
  166|  71.8M|        value |= GetBit() << bit;
  167|  71.8M|      }
  168|  57.6M|      *x = value;
  169|  57.6M|      return true;
  170|  57.6M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  71.8M|    inline int GetBit() {
  176|  71.8M|      const size_t off = bit_offset_;
  177|  71.8M|      const size_t byte_offset = off >> 3;
  178|  71.8M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  71.8M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 63.6M, False: 8.21M]
  ------------------
  180|  63.6M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  63.6M|        bit_offset_ = off + 1;
  182|  63.6M|        return bit;
  183|  63.6M|      }
  184|  8.21M|      return 0;
  185|  71.8M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  20.3M|  bool Decode(T *out_val) {
   69|  20.3M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 1.62k, False: 20.3M]
  ------------------
   70|  1.62k|      return false;
   71|  1.62k|    }
   72|  20.3M|    pos_ += sizeof(T);
   73|  20.3M|    return true;
   74|  20.3M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  20.3M|  bool Peek(T *out_val) {
   88|  20.3M|    const size_t size_to_decode = sizeof(T);
   89|  20.3M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 1.62k, False: 20.3M]
  ------------------
   90|  1.62k|      return false;  // Buffer overflow.
   91|  1.62k|    }
   92|  20.3M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  20.3M|    return true;
   94|  20.3M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  11.1k|  bool Decode(T *out_val) {
   69|  11.1k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 50, False: 11.1k]
  ------------------
   70|     50|      return false;
   71|     50|    }
   72|  11.1k|    pos_ += sizeof(T);
   73|  11.1k|    return true;
   74|  11.1k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  11.1k|  bool Peek(T *out_val) {
   88|  11.1k|    const size_t size_to_decode = sizeof(T);
   89|  11.1k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 50, False: 11.1k]
  ------------------
   90|     50|      return false;  // Buffer overflow.
   91|     50|    }
   92|  11.1k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  11.1k|    return true;
   94|  11.1k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|  1.16M|  bool Decode(T *out_val) {
   69|  1.16M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 107, False: 1.16M]
  ------------------
   70|    107|      return false;
   71|    107|    }
   72|  1.16M|    pos_ += sizeof(T);
   73|  1.16M|    return true;
   74|  1.16M|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|  1.16M|  bool Peek(T *out_val) {
   88|  1.16M|    const size_t size_to_decode = sizeof(T);
   89|  1.16M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 107, False: 1.16M]
  ------------------
   90|    107|      return false;  // Buffer overflow.
   91|    107|    }
   92|  1.16M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.16M|    return true;
   94|  1.16M|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  23.1k|  bool Decode(T *out_val) {
   69|  23.1k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 258, False: 22.9k]
  ------------------
   70|    258|      return false;
   71|    258|    }
   72|  22.9k|    pos_ += sizeof(T);
   73|  22.9k|    return true;
   74|  23.1k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  23.1k|  bool Peek(T *out_val) {
   88|  23.1k|    const size_t size_to_decode = sizeof(T);
   89|  23.1k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 258, False: 22.9k]
  ------------------
   90|    258|      return false;  // Buffer overflow.
   91|    258|    }
   92|  22.9k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  22.9k|    return true;
   94|  23.1k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.40M|  bool Decode(T *out_val) {
   69|  1.40M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 106, False: 1.40M]
  ------------------
   70|    106|      return false;
   71|    106|    }
   72|  1.40M|    pos_ += sizeof(T);
   73|  1.40M|    return true;
   74|  1.40M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.40M|  bool Peek(T *out_val) {
   88|  1.40M|    const size_t size_to_decode = sizeof(T);
   89|  1.40M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 106, False: 1.40M]
  ------------------
   90|    106|      return false;  // Buffer overflow.
   91|    106|    }
   92|  1.40M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.40M|    return true;
   94|  1.40M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  1.22M|  bool Decode(T *out_val) {
   69|  1.22M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 13, False: 1.22M]
  ------------------
   70|     13|      return false;
   71|     13|    }
   72|  1.22M|    pos_ += sizeof(T);
   73|  1.22M|    return true;
   74|  1.22M|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  1.22M|  bool Peek(T *out_val) {
   88|  1.22M|    const size_t size_to_decode = sizeof(T);
   89|  1.22M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 13, False: 1.22M]
  ------------------
   90|     13|      return false;  // Buffer overflow.
   91|     13|    }
   92|  1.22M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.22M|    return true;
   94|  1.22M|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  1.85k|  bool Decode(T *out_val) {
   69|  1.85k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 2, False: 1.85k]
  ------------------
   70|      2|      return false;
   71|      2|    }
   72|  1.85k|    pos_ += sizeof(T);
   73|  1.85k|    return true;
   74|  1.85k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  1.85k|  bool Peek(T *out_val) {
   88|  1.85k|    const size_t size_to_decode = sizeof(T);
   89|  1.85k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 2, False: 1.85k]
  ------------------
   90|      2|      return false;  // Buffer overflow.
   91|      2|    }
   92|  1.85k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.85k|    return true;
   94|  1.85k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    189|  bool Decode(T *out_val) {
   69|    189|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 3, False: 186]
  ------------------
   70|      3|      return false;
   71|      3|    }
   72|    186|    pos_ += sizeof(T);
   73|    186|    return true;
   74|    189|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    189|  bool Peek(T *out_val) {
   88|    189|    const size_t size_to_decode = sizeof(T);
   89|    189|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 3, False: 186]
  ------------------
   90|      3|      return false;  // Buffer overflow.
   91|      3|    }
   92|    186|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    186|    return true;
   94|    189|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|  90.8M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   110M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  8.37M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  8.37M|    return value_ >= val;
  100|  8.37M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   252M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  3.22G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  22.3M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|  90.6M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  90.6M|    value_ = i.value_;
  153|  90.6M|    return *this;
  154|  90.6M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   588M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   588M|    value_ = i.value_;
  153|   588M|    return *this;
  154|   588M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  22.3M|  inline ThisIndexType &operator++() {
  103|  22.3M|    ++value_;
  104|  22.3M|    return *this;
  105|  22.3M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  2.36G|  constexpr bool operator==(const IndexType &i) const {
   76|  2.36G|    return value_ == i.value_;
   77|  2.36G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|   912M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  14.0k|  constexpr bool operator<(const IndexType &i) const {
   88|  14.0k|    return value_ < i.value_;
   89|  14.0k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   161M|  constexpr bool operator==(const IndexType &i) const {
   76|   161M|    return value_ == i.value_;
   77|   161M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   158M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   158M|    return ThisIndexType(value_ - val);
  133|   158M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|   791M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|   791M|    return ThisIndexType(value_ + val);
  127|   791M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  17.6M|  constexpr bool operator==(const IndexType &i) const {
   76|  17.6M|    return value_ == i.value_;
   77|  17.6M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   244M|  constexpr bool operator!=(const IndexType &i) const {
   82|   244M|    return value_ != i.value_;
   83|   244M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   347M|  constexpr bool operator!=(const IndexType &i) const {
   82|   347M|    return value_ != i.value_;
   83|   347M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   564M|  inline ThisIndexType &operator++() {
  103|   564M|    ++value_;
  104|   564M|    return *this;
  105|   564M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   453M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   453M|    value_ = i.value_;
  153|   453M|    return *this;
  154|   453M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.07G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.07G|    value_ = i.value_;
  153|  1.07G|    return *this;
  154|  1.07G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  42.0M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  42.0M|    return value_ >= val;
  100|  42.0M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  7.56M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.14G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  17.0G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   189M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  12.1G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   204M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  18.8M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  18.8M|    return ThisIndexType(value_ + val);
  127|  18.8M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   144M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  20.9M|  constexpr bool operator<(const IndexType &i) const {
   88|  20.9M|    return value_ < i.value_;
   89|  20.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   226M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   589M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  57.7M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  65.6M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   292M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  4.90M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  4.90M|    value_ = i.value_;
  153|  4.90M|    return *this;
  154|  4.90M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  7.55M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  7.55M|    value_ += val;
  141|  7.55M|    return *this;
  142|  7.55M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  26.5M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  26.5M|    value_ = val;
  157|  26.5M|    return *this;
  158|  26.5M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   563M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  5.26M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  5.25M|  inline ThisIndexType &operator++() {
  103|  5.25M|    ++value_;
  104|  5.25M|    return *this;
  105|  5.25M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  24.5M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  24.5M|  inline ThisIndexType &operator++() {
  103|  24.5M|    ++value_;
  104|  24.5M|    return *this;
  105|  24.5M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  44.0M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  44.0M|    return vector_[index.value()];
   75|  44.0M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  24.5M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  12.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  16.4k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  66.5M|  inline reference operator[](const IndexTypeT &index) {
   71|  66.5M|    return vector_[index.value()];
   72|  66.5M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   463k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  16.7M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  3.20k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   70|  8.37M|  inline reference operator[](const IndexTypeT &index) {
   71|  8.37M|    return vector_[index.value()];
   72|  8.37M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  22.2M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  22.2M|    return vector_[index.value()];
   75|  22.2M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   175M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  9.88M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   323M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   323M|    return vector_[index.value()];
   75|   323M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|   813M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   813M|    return vector_[index.value()];
   75|   813M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   423M|  inline reference operator[](const IndexTypeT &index) {
   71|   423M|    return vector_[index.value()];
   72|   423M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  74.7M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  74.7M|    return vector_[index.value()];
   75|  74.7M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   383M|  inline reference operator[](const IndexTypeT &index) {
   71|   383M|    return vector_[index.value()];
   72|   383M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|  92.6M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   226M|  inline reference operator[](const IndexTypeT &index) {
   71|   226M|    return vector_[index.value()];
   72|   226M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  1.38k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   101M|  inline reference operator[](const IndexTypeT &index) {
   71|   101M|    return vector_[index.value()];
   72|   101M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  35.3k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  2.24M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  33.5k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  4.76k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  4.76k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  4.76k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  4.76k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  10.7k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  10.7k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  10.7k|    vector_.swap(arg.vector_);
   57|  10.7k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  10.7k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  10.7k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  10.7k|    vector_.swap(arg.vector_);
   57|  10.7k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  4.76k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  4.76k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  4.76k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  6.55k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  49.3k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  78.9k|int32_t DataTypeLength(DataType dt) {
   20|  78.9k|  switch (dt) {
   21|  40.4k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 40.4k, False: 38.4k]
  ------------------
   22|  43.0k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.51k, False: 76.4k]
  ------------------
   23|  43.0k|      return 1;
   24|  1.90k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 1.90k, False: 77.0k]
  ------------------
   25|  2.15k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 249, False: 78.7k]
  ------------------
   26|  2.15k|      return 2;
   27|  28.9k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 28.9k, False: 49.9k]
  ------------------
   28|  29.4k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 465, False: 78.5k]
  ------------------
   29|  29.4k|      return 4;
   30|    517|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 517, False: 78.4k]
  ------------------
   31|    882|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 365, False: 78.6k]
  ------------------
   32|    882|      return 8;
   33|  2.89k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 2.89k, False: 76.0k]
  ------------------
   34|  2.89k|      return 4;
   35|    187|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 187, False: 78.7k]
  ------------------
   36|    187|      return 8;
   37|    386|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 386, False: 78.5k]
  ------------------
   38|    386|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 78.9k]
  ------------------
   40|      0|      return -1;
   41|  78.9k|  }
   42|  78.9k|}

_ZN5draco7IntSqrtEm:
   31|  2.65k|inline uint64_t IntSqrt(uint64_t number) {
   32|  2.65k|  if (number == 0) {
  ------------------
  |  Branch (32:7): [True: 297, False: 2.35k]
  ------------------
   33|    297|    return 0;
   34|    297|  }
   35|       |  // First estimate good initial value of the square root as log2(number).
   36|  2.35k|  uint64_t act_number = number;
   37|  2.35k|  uint64_t square_root = 1;
   38|  41.0k|  while (act_number >= 2) {
  ------------------
  |  Branch (38:10): [True: 38.6k, False: 2.35k]
  ------------------
   39|       |    // Double the square root until |square_root * square_root > number|.
   40|  38.6k|    square_root *= 2;
   41|  38.6k|    act_number /= 4;
   42|  38.6k|  }
   43|       |  // Perform Newton's (or Babylonian) method to find the true floor(sqrt()).
   44|  5.79k|  do {
   45|       |    // New |square_root| estimate is computed as the average between
   46|       |    // |square_root| and |number / square_root|.
   47|  5.79k|    square_root = (square_root + number / square_root) / 2;
   48|       |
   49|       |    // Note that after the first iteration, the estimate is always going to be
   50|       |    // larger or equal to the true square root value. Therefore to check
   51|       |    // convergence, we can simply detect condition when the square of the
   52|       |    // estimated square root is larger than the input.
   53|  5.79k|  } while (square_root * square_root > number);
  ------------------
  |  Branch (53:12): [True: 3.43k, False: 2.35k]
  ------------------
   54|  2.35k|  return square_root;
   55|  2.65k|}
_ZN5draco13AddAsUnsignedIiTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEES3_S3_S3_:
   63|  21.2M|inline DataTypeT AddAsUnsigned(DataTypeT a, DataTypeT b) {
   64|  21.2M|  typedef typename std::make_unsigned<DataTypeT>::type DataTypeUT;
   65|  21.2M|  return static_cast<DataTypeT>(static_cast<DataTypeUT>(a) +
   66|  21.2M|                                static_cast<DataTypeUT>(b));
   67|  21.2M|}

_ZN5draco7Options7SetBoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
   38|  6.55k|void Options::SetBool(const std::string &name, bool val) {
   39|  6.55k|  options_[name] = std::to_string(val ? 1 : 0);
  ------------------
  |  Branch (39:35): [True: 6.55k, False: 0]
  ------------------
   40|  6.55k|}
_ZNK5draco7Options6GetIntERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi:
   48|  3.95k|int Options::GetInt(const std::string &name, int default_val) const {
   49|  3.95k|  const auto it = options_.find(name);
   50|  3.95k|  if (it == options_.end()) {
  ------------------
  |  Branch (50:7): [True: 3.24k, False: 714]
  ------------------
   51|  3.24k|    return default_val;
   52|  3.24k|  }
   53|    714|  return std::atoi(it->second.c_str());
   54|  3.95k|}
_ZNK5draco7Options7GetBoolERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
   72|  3.95k|bool Options::GetBool(const std::string &name, bool default_val) const {
   73|  3.95k|  const int ret = GetInt(name, -1);
   74|  3.95k|  if (ret == -1) {
  ------------------
  |  Branch (74:7): [True: 3.24k, False: 714]
  ------------------
   75|  3.24k|    return default_val;
   76|  3.24k|  }
   77|    714|  return static_cast<bool>(ret);
   78|  3.95k|}

_ZN5draco7OptionsC2Ev:
   32|  13.1k|  Options() = default;
_ZN5draco7OptionsD2Ev:
   33|  26.2k|  ~Options() = default;
_ZNK5draco7Options11IsOptionSetERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   70|    714|  bool IsOptionSet(const std::string &name) const {
   71|    714|    return options_.count(name) > 0;
   72|    714|  }

_ZN5draco11DequantizerC2Ev:
   27|    106|Dequantizer::Dequantizer() : delta_(1.f) {}
_ZN5draco11Dequantizer4InitEfi:
   29|    106|bool Dequantizer::Init(float range, int32_t max_quantized_value) {
   30|    106|  if (max_quantized_value <= 0) {
  ------------------
  |  Branch (30:7): [True: 0, False: 106]
  ------------------
   31|      0|    return false;
   32|      0|  }
   33|    106|  delta_ = range / static_cast<float>(max_quantized_value);
   34|    106|  return true;
   35|    106|}

_ZNK5draco11Dequantizer15DequantizeFloatEi:
   71|  3.94M|  inline float DequantizeFloat(int32_t val) const {
   72|  3.94M|    return static_cast<float>(val) * delta_;
   73|  3.94M|  }

_ZN5draco6StatusC2ENS0_4CodeE:
   41|  21.4k|  explicit Status(Code code) : code_(code) {}
_ZN5draco6StatusC2ENS0_4CodeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   43|  6.00k|      : code_(code), error_msg_(error_msg) {}
_ZNK5draco6Status2okEv:
   52|  33.3k|  bool ok() const { return code_ == OK; }
_ZN5draco8OkStatusEv:
   66|  21.4k|inline Status OkStatus() { return Status(Status::OK); }
_ZN5draco6StatusC2ERKS0_:
   39|  6.00k|  Status(const Status &status) = default;

_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  6.55k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_4MeshENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|  6.00k|  StatusOr(const Status &status) : status_(status) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_4MeshENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|    554|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|  6.55k|  bool ok() const { return status_.ok(); }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|  6.55k|  T &&value() && { return std::move(value_); }

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|  1.12M|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  1.12M|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 1.12M, Folded]
  ------------------
   65|  1.12M|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 460, False: 1.12M]
  ------------------
   66|    460|      return false;
   67|    460|    }
   68|  1.12M|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  1.12M|  return true;
   77|  1.12M|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   794k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   794k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   794k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 93, False: 794k]
  ------------------
   33|     93|    return false;
   34|     93|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   794k|  uint8_t in;
   39|   794k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 256, False: 794k]
  ------------------
   40|    256|    return false;
   41|    256|  }
   42|   794k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 13.5k, False: 780k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  13.5k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 476, False: 13.1k]
  ------------------
   45|    476|      return false;
   46|    476|    }
   47|       |    // Append decoded info from this byte.
   48|  13.1k|    *out_val <<= 7;
   49|  13.1k|    *out_val |= in & ((1 << 7) - 1);
   50|   780k|  } else {
   51|       |    // Last byte reached
   52|   780k|    *out_val = in;
   53|   780k|  }
   54|   793k|  return true;
   55|   794k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  3.80k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  3.80k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.80k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 3.80k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  3.80k|  uint8_t in;
   39|  3.80k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 2, False: 3.80k]
  ------------------
   40|      2|    return false;
   41|      2|  }
   42|  3.80k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 433, False: 3.36k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    433|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 8, False: 425]
  ------------------
   45|      8|      return false;
   46|      8|    }
   47|       |    // Append decoded info from this byte.
   48|    425|    *out_val <<= 7;
   49|    425|    *out_val |= in & ((1 << 7) - 1);
   50|  3.36k|  } else {
   51|       |    // Last byte reached
   52|  3.36k|    *out_val = in;
   53|  3.36k|  }
   54|  3.79k|  return true;
   55|  3.80k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  4.37k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  4.37k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 4.37k, Folded]
  ------------------
   65|  4.37k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 38, False: 4.34k]
  ------------------
   66|     38|      return false;
   67|     38|    }
   68|  4.37k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  4.34k|  return true;
   77|  4.37k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  2.71k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  2.71k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  2.71k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 2.71k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.71k|  uint8_t in;
   39|  2.71k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 12, False: 2.70k]
  ------------------
   40|     12|    return false;
   41|     12|  }
   42|  2.70k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 0, False: 2.70k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|      0|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 0]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|       |    // Append decoded info from this byte.
   48|      0|    *out_val <<= 7;
   49|      0|    *out_val |= in & ((1 << 7) - 1);
   50|  2.70k|  } else {
   51|       |    // Last byte reached
   52|  2.70k|    *out_val = in;
   53|  2.70k|  }
   54|  2.70k|  return true;
   55|  2.70k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   277k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   277k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   277k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 13, False: 277k]
  ------------------
   33|     13|    return false;
   34|     13|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   277k|  uint8_t in;
   39|   277k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 36, False: 277k]
  ------------------
   40|     36|    return false;
   41|     36|  }
   42|   277k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.50k, False: 275k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.50k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 74, False: 1.43k]
  ------------------
   45|     74|      return false;
   46|     74|    }
   47|       |    // Append decoded info from this byte.
   48|  1.43k|    *out_val <<= 7;
   49|  1.43k|    *out_val |= in & ((1 << 7) - 1);
   50|   275k|  } else {
   51|       |    // Last byte reached
   52|   275k|    *out_val = in;
   53|   275k|  }
   54|   277k|  return true;
   55|   277k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  2.72k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  2.72k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  2.72k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 2.72k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.72k|  uint8_t in;
   39|  2.72k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 9, False: 2.71k]
  ------------------
   40|      9|    return false;
   41|      9|  }
   42|  2.71k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 501, False: 2.21k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    501|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 7, False: 494]
  ------------------
   45|      7|      return false;
   46|      7|    }
   47|       |    // Append decoded info from this byte.
   48|    494|    *out_val <<= 7;
   49|    494|    *out_val |= in & ((1 << 7) - 1);
   50|  2.21k|  } else {
   51|       |    // Last byte reached
   52|  2.21k|    *out_val = in;
   53|  2.21k|  }
   54|  2.70k|  return true;
   55|  2.71k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  13.5k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  13.5k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  13.5k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 2, False: 13.5k]
  ------------------
   33|      2|    return false;
   34|      2|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  13.5k|  uint8_t in;
   39|  13.5k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 7, False: 13.5k]
  ------------------
   40|      7|    return false;
   41|      7|  }
   42|  13.5k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 250, False: 13.2k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    250|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 11, False: 239]
  ------------------
   45|     11|      return false;
   46|     11|    }
   47|       |    // Append decoded info from this byte.
   48|    239|    *out_val <<= 7;
   49|    239|    *out_val |= in & ((1 << 7) - 1);
   50|  13.2k|  } else {
   51|       |    // Last byte reached
   52|  13.2k|    *out_val = in;
   53|  13.2k|  }
   54|  13.5k|  return true;
   55|  13.5k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.14k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.14k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.14k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 11, False: 4.12k]
  ------------------
   33|     11|    return false;
   34|     11|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.12k|  uint8_t in;
   39|  4.12k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 11, False: 4.11k]
  ------------------
   40|     11|    return false;
   41|     11|  }
   42|  4.11k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 989, False: 3.12k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    989|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 57, False: 932]
  ------------------
   45|     57|      return false;
   46|     57|    }
   47|       |    // Append decoded info from this byte.
   48|    932|    *out_val <<= 7;
   49|    932|    *out_val |= in & ((1 << 7) - 1);
   50|  3.12k|  } else {
   51|       |    // Last byte reached
   52|  3.12k|    *out_val = in;
   53|  3.12k|  }
   54|  4.06k|  return true;
   55|  4.11k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  3.74k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  3.74k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.74k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 24, False: 3.71k]
  ------------------
   33|     24|    return false;
   34|     24|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  3.71k|  uint8_t in;
   39|  3.71k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 2, False: 3.71k]
  ------------------
   40|      2|    return false;
   41|      2|  }
   42|  3.71k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.08k, False: 1.63k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.08k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 245, False: 1.83k]
  ------------------
   45|    245|      return false;
   46|    245|    }
   47|       |    // Append decoded info from this byte.
   48|  1.83k|    *out_val <<= 7;
   49|  1.83k|    *out_val |= in & ((1 << 7) - 1);
   50|  1.83k|  } else {
   51|       |    // Last byte reached
   52|  1.63k|    *out_val = in;
   53|  1.63k|  }
   54|  3.47k|  return true;
   55|  3.71k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  48.9k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  48.9k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  48.9k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 7, False: 48.9k]
  ------------------
   33|      7|    return false;
   34|      7|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  48.9k|  uint8_t in;
   39|  48.9k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 12, False: 48.9k]
  ------------------
   40|     12|    return false;
   41|     12|  }
   42|  48.9k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.73k, False: 47.2k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.73k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 36, False: 1.69k]
  ------------------
   45|     36|      return false;
   46|     36|    }
   47|       |    // Append decoded info from this byte.
   48|  1.69k|    *out_val <<= 7;
   49|  1.69k|    *out_val |= in & ((1 << 7) - 1);
   50|  47.2k|  } else {
   51|       |    // Last byte reached
   52|  47.2k|    *out_val = in;
   53|  47.2k|  }
   54|  48.9k|  return true;
   55|  48.9k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|   333k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   438k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  36.5k|  Self operator-(const Self &o) const {
  138|  36.5k|    Self ret;
  139|   146k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 109k, False: 36.5k]
  ------------------
  140|   109k|      ret[i] = (*this)[i] - o[i];
  141|   109k|    }
  142|  36.5k|    return ret;
  143|  36.5k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  91.0k|  VectorD() {
   41|   364k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 273k, False: 91.0k]
  ------------------
   42|   273k|      (*this)[i] = Scalar(0);
   43|   273k|    }
   44|  91.0k|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   195M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  16.2M|  Self operator-(const Self &o) const {
  138|  16.2M|    Self ret;
  139|  65.0M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 48.7M, False: 16.2M]
  ------------------
  140|  48.7M|      ret[i] = (*this)[i] - o[i];
  141|  48.7M|    }
  142|  16.2M|    return ret;
  143|  16.2M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  8.11M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  8.11M|  static_assert(std::is_signed<ScalarT>::value,
  321|  8.11M|                "ScalarT must be a signed type. ");
  322|  8.11M|  VectorD<ScalarT, 3> r;
  323|  8.11M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  8.11M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  8.11M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  8.11M|  return r;
  327|  8.11M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  8.11M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  8.11M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  3.15M|  Scalar AbsSum() const {
  238|  3.15M|    Scalar result(0);
  239|  12.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 9.46M, False: 3.14M]
  ------------------
  240|  9.46M|      Scalar next_value = std::abs(v_[i]);
  241|  9.46M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 13.1k, False: 9.45M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  13.1k|        return std::numeric_limits<Scalar>::max();
  244|  13.1k|      }
  245|  9.45M|      result += next_value;
  246|  9.45M|    }
  247|  3.14M|    return result;
  248|  3.15M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   219k|  Self operator/(const Scalar &o) const {
  183|   219k|    Self ret;
  184|   877k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 657k, False: 219k]
  ------------------
  185|   657k|      ret[i] = (*this)[i] / o;
  186|   657k|    }
  187|   219k|    return ret;
  188|   219k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   244M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  11.4M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  9.47M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  1.91M|  Self operator-() const {
  121|  1.91M|    Self ret;
  122|  7.64M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 5.73M, False: 1.91M]
  ------------------
  123|  5.73M|      ret[i] = -(*this)[i];
  124|  5.73M|    }
  125|  1.91M|    return ret;
  126|  1.91M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  5.73M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  1.08M|  Self operator-(const Self &o) const {
  138|  1.08M|    Self ret;
  139|  3.24M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.16M, False: 1.08M]
  ------------------
  140|  2.16M|      ret[i] = (*this)[i] - o[i];
  141|  2.16M|    }
  142|  1.08M|    return ret;
  143|  1.08M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  12.9M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  19.4M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  45.3M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  2.16M|  Self operator+(const Self &o) const {
  130|  2.16M|    Self ret;
  131|  6.48M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 4.32M, False: 2.16M]
  ------------------
  132|  4.32M|      ret[i] = (*this)[i] + o[i];
  133|  4.32M|    }
  134|  2.16M|    return ret;
  135|  2.16M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  42.8M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  1.39M|  Self operator-(const Self &o) const {
  138|  1.39M|    Self ret;
  139|  4.18M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.79M, False: 1.39M]
  ------------------
  140|  2.79M|      ret[i] = (*this)[i] - o[i];
  141|  2.79M|    }
  142|  1.39M|    return ret;
  143|  1.39M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  1.39M|  Self operator+(const Self &o) const {
  130|  1.39M|    Self ret;
  131|  4.18M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.79M, False: 1.39M]
  ------------------
  132|  2.79M|      ret[i] = (*this)[i] + o[i];
  133|  2.79M|    }
  134|  1.39M|    return ret;
  135|  1.39M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   435k|  bool operator==(const Self &o) const {
  207|  1.27M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 854k, False: 417k]
  ------------------
  208|   854k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 18.0k, False: 836k]
  ------------------
  209|  18.0k|        return false;
  210|  18.0k|      }
  211|   854k|    }
  212|   417k|    return true;
  213|   435k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  5.11M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  18.4k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  18.9k|  Scalar Dot(const Self &o) const {
  251|  18.9k|    Scalar ret(0);
  252|  75.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 56.7k, False: 18.9k]
  ------------------
  253|  56.7k|      ret += (*this)[i] * o[i];
  254|  56.7k|    }
  255|  18.9k|    return ret;
  256|  18.9k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    451|  Self operator*(const Scalar &o) const {
  175|    451|    Self ret;
  176|  1.80k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.35k, False: 451]
  ------------------
  177|  1.35k|      ret[i] = (*this)[i] * o;
  178|  1.35k|    }
  179|    451|    return ret;
  180|    451|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  18.0k|  Self operator-(const Self &o) const {
  138|  18.0k|    Self ret;
  139|  54.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 36.0k, False: 18.0k]
  ------------------
  140|  36.0k|      ret[i] = (*this)[i] - o[i];
  141|  36.0k|    }
  142|  18.0k|    return ret;
  143|  18.0k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  36.0k|  VectorD() {
   41|   108k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 72.1k, False: 36.0k]
  ------------------
   42|  72.1k|      (*this)[i] = Scalar(0);
   43|  72.1k|    }
   44|  36.0k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|   888k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   888k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   888k|    v_[0] = c0;
   55|   888k|    v_[1] = c1;
   56|   888k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|   144k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   430k|  bool operator==(const Self &o) const {
  207|  1.22M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 829k, False: 397k]
  ------------------
  208|   829k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 32.6k, False: 797k]
  ------------------
  209|  32.6k|        return false;
  210|  32.6k|      }
  211|   829k|    }
  212|   397k|    return true;
  213|   430k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.52M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  47.2M|  VectorD() {
   41|   188M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 141M, False: 47.2M]
  ------------------
   42|   141M|      (*this)[i] = Scalar(0);
   43|   141M|    }
   44|  47.2M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  35.2k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  38.0k|  Scalar Dot(const Self &o) const {
  251|  38.0k|    Scalar ret(0);
  252|   152k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 114k, False: 38.0k]
  ------------------
  253|   114k|      ret += (*this)[i] * o[i];
  254|   114k|    }
  255|  38.0k|    return ret;
  256|  38.0k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|  2.83k|  Self operator-(const Self &o) const {
  138|  2.83k|    Self ret;
  139|  8.50k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 5.66k, False: 2.83k]
  ------------------
  140|  5.66k|      ret[i] = (*this)[i] - o[i];
  141|  5.66k|    }
  142|  2.83k|    return ret;
  143|  2.83k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  8.03k|  Self operator*(const Scalar &o) const {
  175|  8.03k|    Self ret;
  176|  24.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 16.0k, False: 8.03k]
  ------------------
  177|  16.0k|      ret[i] = (*this)[i] * o;
  178|  16.0k|    }
  179|  8.03k|    return ret;
  180|  8.03k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|  2.68k|  Self operator+(const Self &o) const {
  130|  2.68k|    Self ret;
  131|  8.06k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.37k, False: 2.68k]
  ------------------
  132|  5.37k|      ret[i] = (*this)[i] + o[i];
  133|  5.37k|    }
  134|  2.68k|    return ret;
  135|  2.68k|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.68k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.68k|  return v * o;
  294|  2.68k|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.65k|  Self operator+(const Self &o) const {
  130|  2.65k|    Self ret;
  131|  10.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 7.96k, False: 2.65k]
  ------------------
  132|  7.96k|      ret[i] = (*this)[i] + o[i];
  133|  7.96k|    }
  134|  2.65k|    return ret;
  135|  2.65k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.65k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.65k|  return v * o;
  294|  2.65k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.65k|  Self operator*(const Scalar &o) const {
  175|  2.65k|    Self ret;
  176|  10.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 7.96k, False: 2.65k]
  ------------------
  177|  7.96k|      ret[i] = (*this)[i] * o;
  178|  7.96k|    }
  179|  2.65k|    return ret;
  180|  2.65k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   862k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   862k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   862k|    v_[0] = c0;
   55|   862k|    v_[1] = c1;
   56|   862k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  18.8k|  VectorD() {
   41|  56.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 37.7k, False: 18.8k]
  ------------------
   42|  37.7k|      (*this)[i] = Scalar(0);
   43|  37.7k|    }
   44|  18.8k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  5.28k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  15.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 10.5k, False: 5.28k]
  ------------------
  104|  10.5k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 10.5k, False: 0]
  ------------------
  105|  10.5k|        v_[i] = Scalar(src_vector[i]);
  106|  10.5k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  10.5k|    }
  110|  5.28k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|    983|  Self operator+(const Self &o) const {
  130|    983|    Self ret;
  131|  2.94k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 1.96k, False: 983]
  ------------------
  132|  1.96k|      ret[i] = (*this)[i] + o[i];
  133|  1.96k|    }
  134|    983|    return ret;
  135|    983|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  2.64k|  VectorD() {
   41|  7.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.28k, False: 2.64k]
  ------------------
   42|  5.28k|      (*this)[i] = Scalar(0);
   43|  5.28k|    }
   44|  2.64k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  15.8k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  10.5k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  2.64k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  7.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 5.28k, False: 2.64k]
  ------------------
  104|  5.28k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 5.28k, False: 0]
  ------------------
  105|  5.28k|        v_[i] = Scalar(src_vector[i]);
  106|  5.28k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  5.28k|    }
  110|  2.64k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.64k|  Self operator/(const Scalar &o) const {
  183|  2.64k|    Self ret;
  184|  7.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 5.28k, False: 2.64k]
  ------------------
  185|  5.28k|      ret[i] = (*this)[i] / o;
  186|  5.28k|    }
  187|  2.64k|    return ret;
  188|  2.64k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.65k|  Self operator-(const Self &o) const {
  138|  1.65k|    Self ret;
  139|  4.97k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.31k, False: 1.65k]
  ------------------
  140|  3.31k|      ret[i] = (*this)[i] - o[i];
  141|  3.31k|    }
  142|  1.65k|    return ret;
  143|  1.65k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  75.3k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  1.91M|  VectorD() {
   41|  7.65M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.73M, False: 1.91M]
  ------------------
   42|  5.73M|      (*this)[i] = Scalar(0);
   43|  5.73M|    }
   44|  1.91M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  9.02M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  9.02M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  9.02M|    v_[0] = c0;
   55|  9.02M|    v_[1] = c1;
   56|  9.02M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  6.48M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  19.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 12.9M, False: 6.48M]
  ------------------
  104|  12.9M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 12.9M, False: 0]
  ------------------
  105|  12.9M|        v_[i] = Scalar(src_vector[i]);
  106|  12.9M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  12.9M|    }
  110|  6.48M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|  3.24M|  VectorD() {
   41|  9.72M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 6.48M, False: 3.24M]
  ------------------
   42|  6.48M|      (*this)[i] = Scalar(0);
   43|  6.48M|    }
   44|  3.24M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|  3.24M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  9.72M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 6.48M, False: 3.24M]
  ------------------
  104|  6.48M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 6.48M, False: 0]
  ------------------
  105|  6.48M|        v_[i] = Scalar(src_vector[i]);
  106|  6.48M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  6.48M|    }
  110|  3.24M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  5.46M|  VectorD(const Self &o) {
   89|  16.3M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 10.9M, False: 5.46M]
  ------------------
   90|  10.9M|      (*this)[i] = o[i];
   91|  10.9M|    }
   92|  5.46M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  2.79M|  VectorD() {
   41|  8.37M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.58M, False: 2.79M]
  ------------------
   42|  5.58M|      (*this)[i] = Scalar(0);
   43|  5.58M|    }
   44|  2.79M|  }

_ZN5draco11CornerTableC2Ev:
   26|  4.76k|    : num_original_vertices_(0),
   27|  4.76k|      num_degenerated_faces_(0),
   28|  4.76k|      num_isolated_vertices_(0),
   29|  4.76k|      valence_cache_(*this) {}
_ZN5draco11CornerTable5ResetEii:
   66|  4.76k|bool CornerTable::Reset(int num_faces, int num_vertices) {
   67|  4.76k|  if (num_faces < 0 || num_vertices < 0) {
  ------------------
  |  Branch (67:7): [True: 0, False: 4.76k]
  |  Branch (67:24): [True: 0, False: 4.76k]
  ------------------
   68|      0|    return false;
   69|      0|  }
   70|  4.76k|  const unsigned int num_faces_unsigned = num_faces;
   71|  4.76k|  if (num_faces_unsigned >
  ------------------
  |  Branch (71:7): [True: 0, False: 4.76k]
  ------------------
   72|  4.76k|      std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
   73|      0|    return false;
   74|      0|  }
   75|  4.76k|  corner_to_vertex_map_.assign(num_faces_unsigned * 3, kInvalidVertexIndex);
   76|  4.76k|  opposite_corners_.assign(num_faces_unsigned * 3, kInvalidCornerIndex);
   77|  4.76k|  vertex_corners_.reserve(num_vertices);
   78|  4.76k|  valence_cache_.ClearValenceCache();
   79|  4.76k|  valence_cache_.ClearValenceCacheInaccurate();
   80|  4.76k|  return true;
   81|  4.76k|}

_ZNK5draco11CornerTable12num_verticesEv:
   73|  83.0M|  inline int num_vertices() const {
   74|  83.0M|    return static_cast<int>(vertex_corners_.size());
   75|  83.0M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  7.58M|  inline int num_corners() const {
   77|  7.58M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  7.58M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  2.30M|  inline int num_faces() const {
   80|  2.30M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  2.30M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   323M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   323M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 323M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   323M|    return opposite_corners_[corner];
   88|   323M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   577M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   577M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 13.5M, False: 564M]
  ------------------
   91|  13.5M|      return corner;
   92|  13.5M|    }
   93|   564M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 510M, False: 54.1M]
  ------------------
   94|   577M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   413M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   413M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 3.90M, False: 409M]
  ------------------
   97|  3.90M|      return corner;
   98|  3.90M|    }
   99|   409M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 104M, False: 305M]
  ------------------
  100|   413M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|   813M|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|   813M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 813M]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|   813M|    return ConfidentVertex(corner);
  106|   813M|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|   813M|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|   813M|    DRACO_DCHECK_GE(corner.value(), 0);
  109|   813M|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|   813M|    return corner_to_vertex_map_[corner];
  111|   813M|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  28.0M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  28.0M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 28.0M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  28.0M|    return FaceIndex(corner.value() / 3);
  117|  28.0M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|   973M|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  74.7M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  74.7M|    return vertex_corners_[v];
  152|  74.7M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   826k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   826k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   826k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 17.1k, False: 809k]
  ------------------
  188|  17.1k|      return true;
  189|  17.1k|    }
  190|   809k|    return false;
  191|   826k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  59.3M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  59.3M|    return Previous(Opposite(Previous(corner)));
  202|  59.3M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  21.7M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  21.7M|    return Next(Opposite(Next(corner)));
  207|  21.7M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  3.11M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  3.11M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 3.11M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  3.11M|    return Opposite(Previous(corner_id));
  222|  3.11M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  3.92M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  3.92M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 3.92M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  3.92M|    return Opposite(Next(corner_id));
  228|  3.92M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   383M|                                CornerIndex opp_corner_id) {
  249|   383M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   383M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   383M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   423M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   423M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   423M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   423M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|  92.6M|  VertexIndex AddNewVertex() {
  271|  92.6M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|  92.6M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|  92.6M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|  92.6M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   221M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   221M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   221M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 221M, False: 0]
  ------------------
  295|   221M|      vertex_corners_[vert] = corner;
  296|   221M|    }
  297|   221M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  4.73M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  4.73M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  4.73M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  4.73M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  12.1k|      : corner_table_(table),
  229|  12.1k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  12.1k|        corner_(start_corner_),
  231|  12.1k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  5.94M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  83.4k|  VertexCornersIterator &operator++() {
  268|  83.4k|    Next();
  269|  83.4k|    return *this;
  270|  83.4k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  5.08M|  void Next() {
  248|  5.08M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 5.01M, False: 71.8k]
  ------------------
  249|  5.01M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  5.01M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 25.4k, False: 4.98M]
  ------------------
  251|       |        // Open boundary reached.
  252|  25.4k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  25.4k|        left_traversal_ = false;
  254|  4.98M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 830k, False: 4.15M]
  ------------------
  255|       |        // End reached.
  256|   830k|        corner_ = kInvalidCornerIndex;
  257|   830k|      }
  258|  5.01M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  71.8k|      corner_ = corner_table_->SwingRight(corner_);
  262|  71.8k|    }
  263|  5.08M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  9.04M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  5.42M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  5.24M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  3.10M|  void Next() {
  248|  3.10M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.07M, False: 27.3k]
  ------------------
  249|  3.07M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.07M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 2.16M, False: 915k]
  ------------------
  251|       |        // Open boundary reached.
  252|  2.16M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  2.16M|        left_traversal_ = false;
  254|  2.16M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 149k, False: 765k]
  ------------------
  255|       |        // End reached.
  256|   149k|        corner_ = kInvalidCornerIndex;
  257|   149k|      }
  258|  3.07M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  27.3k|      corner_ = corner_table_->SwingRight(corner_);
  262|  27.3k|    }
  263|  3.10M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.31M|      : corner_table_(table),
  236|  2.31M|        start_corner_(corner_id),
  237|  2.31M|        corner_(start_corner_),
  238|  2.31M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   844k|      : corner_table_(table),
  236|   844k|        start_corner_(corner_id),
  237|   844k|        corner_(start_corner_),
  238|   844k|        left_traversal_(true) {}

_ZN5draco4MeshC2Ev:
   29|  6.55k|Mesh::Mesh() {}

_ZN5draco4Mesh7AddFaceERKNSt3__15arrayINS_9IndexTypeIjNS_20PointIndex_tag_type_EEELm3EEE:
   62|   463k|  void AddFace(const Face &face) { faces_.push_back(face); }
_ZN5draco4Mesh7SetFaceENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEERKNSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEE:
   64|  8.37M|  void SetFace(FaceIndex face_id, const Face &face) {
   65|  8.37M|    if (face_id >= static_cast<uint32_t>(faces_.size())) {
  ------------------
  |  Branch (65:9): [True: 0, False: 8.37M]
  ------------------
   66|      0|      faces_.resize(face_id.value() + 1, Face());
   67|      0|    }
   68|  8.37M|    faces_[face_id] = face;
   69|  8.37M|  }
_ZN5draco4Mesh11SetNumFacesEm:
   73|  3.20k|  void SetNumFaces(size_t num_faces) { faces_.resize(num_faces, Face()); }
_ZNK5draco4Mesh9num_facesEv:
   75|  8.38M|  FaceIndex::ValueType num_faces() const {
   76|  8.38M|    return static_cast<uint32_t>(faces_.size());
   77|  8.38M|  }
_ZNK5draco4Mesh4faceENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   78|  22.2M|  const Face &face(FaceIndex face_id) const {
   79|  22.2M|    DRACO_DCHECK_LE(0, face_id.value());
   80|  22.2M|    DRACO_DCHECK_LT(face_id.value(), static_cast<int>(faces_.size()));
   81|  22.2M|    return faces_[face_id];
   82|  22.2M|  }
_ZN5draco4Mesh12SetAttributeEiNSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   84|  39.6k|  void SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) override {
   85|  39.6k|    PointCloud::SetAttribute(att_id, std::move(pa));
   86|  39.6k|    if (static_cast<int>(attribute_data_.size()) <= att_id) {
  ------------------
  |  Branch (86:9): [True: 39.6k, False: 0]
  ------------------
   87|  39.6k|      attribute_data_.resize(att_id + 1);
   88|  39.6k|    }
   89|  39.6k|  }
_ZN5draco4Mesh13AttributeDataC2Ev:
  155|  39.6k|    AttributeData() : element_type(MESH_CORNER_ATTRIBUTE) {}

_ZN5draco24MeshAttributeCornerTableC2Ev:
   23|  18.0k|    : no_interior_seams_(true), corner_table_(nullptr), valence_cache_(*this) {}
_ZN5draco24MeshAttributeCornerTable9InitEmptyEPKNS_11CornerTableE:
   25|  5.99k|bool MeshAttributeCornerTable::InitEmpty(const CornerTable *table) {
   26|  5.99k|  if (table == nullptr) {
  ------------------
  |  Branch (26:7): [True: 0, False: 5.99k]
  ------------------
   27|      0|    return false;
   28|      0|  }
   29|  5.99k|  valence_cache_.ClearValenceCache();
   30|  5.99k|  valence_cache_.ClearValenceCacheInaccurate();
   31|  5.99k|  is_edge_on_seam_.assign(table->num_corners(), false);
   32|  5.99k|  is_vertex_on_seam_.assign(table->num_vertices(), false);
   33|  5.99k|  corner_to_vertex_map_.assign(table->num_corners(), kInvalidVertexIndex);
   34|  5.99k|  vertex_to_attribute_entry_id_map_.reserve(table->num_vertices());
   35|  5.99k|  vertex_to_left_most_corner_map_.reserve(table->num_vertices());
   36|  5.99k|  corner_table_ = table;
   37|  5.99k|  no_interior_seams_ = true;
   38|  5.99k|  return true;
   39|  5.99k|}
_ZN5draco24MeshAttributeCornerTable11AddSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  108|  11.7M|void MeshAttributeCornerTable::AddSeamEdge(CornerIndex c) {
  109|  11.7M|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  110|  11.7M|  is_edge_on_seam_[c.value()] = true;
  111|       |  // Mark seam vertices.
  112|  11.7M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Next(c)).value()] =
  113|  11.7M|      true;
  114|  11.7M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Previous(c))
  115|  11.7M|                         .value()] = true;
  116|       |
  117|  11.7M|  const CornerIndex opp_corner = corner_table_->Opposite(c);
  118|  11.7M|  if (opp_corner != kInvalidCornerIndex) {
  ------------------
  |  Branch (118:7): [True: 11.1M, False: 683k]
  ------------------
  119|  11.1M|    no_interior_seams_ = false;
  120|  11.1M|    is_edge_on_seam_[opp_corner.value()] = true;
  121|  11.1M|    is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Next(opp_corner))
  122|  11.1M|                           .value()] = true;
  123|  11.1M|    is_vertex_on_seam_
  124|  11.1M|        [corner_table_->Vertex(corner_table_->Previous(opp_corner)).value()] =
  125|  11.1M|            true;
  126|  11.1M|  }
  127|  11.7M|}
_ZN5draco24MeshAttributeCornerTable17RecomputeVerticesEPKNS_4MeshEPKNS_14PointAttributeE:
  130|  5.99k|                                                 const PointAttribute *att) {
  131|  5.99k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  132|  5.99k|  if (mesh != nullptr && att != nullptr) {
  ------------------
  |  Branch (132:7): [True: 0, False: 5.99k]
  |  Branch (132:26): [True: 0, False: 0]
  ------------------
  133|      0|    return RecomputeVerticesInternal<true>(mesh, att);
  134|  5.99k|  } else {
  135|  5.99k|    return RecomputeVerticesInternal<false>(nullptr, nullptr);
  136|  5.99k|  }
  137|  5.99k|}
_ZN5draco24MeshAttributeCornerTable25RecomputeVerticesInternalILb0EEEbPKNS_4MeshEPKNS_14PointAttributeE:
  141|  5.99k|    const Mesh *mesh, const PointAttribute *att) {
  142|  5.99k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  143|  5.99k|  vertex_to_attribute_entry_id_map_.clear();
  144|  5.99k|  vertex_to_left_most_corner_map_.clear();
  145|  5.99k|  int num_new_vertices = 0;
  146|  5.26M|  for (VertexIndex v(0); v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (146:26): [True: 5.25M, False: 5.99k]
  ------------------
  147|  5.25M|    const CornerIndex c = corner_table_->LeftMostCorner(v);
  148|  5.25M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (148:9): [True: 36.6k, False: 5.22M]
  ------------------
  149|  36.6k|      continue;  // Isolated vertex?
  150|  36.6k|    }
  151|  5.22M|    AttributeValueIndex first_vert_id(num_new_vertices++);
  152|  5.22M|    if (init_vertex_to_attribute_entry_map) {
  ------------------
  |  Branch (152:9): [Folded, False: 5.22M]
  ------------------
  153|      0|      const PointIndex point_id = mesh->CornerToPointId(c.value());
  154|      0|      vertex_to_attribute_entry_id_map_.push_back(att->mapped_index(point_id));
  155|  5.22M|    } else {
  156|       |      // Identity mapping
  157|  5.22M|      vertex_to_attribute_entry_id_map_.push_back(first_vert_id);
  158|  5.22M|    }
  159|  5.22M|    CornerIndex first_c = c;
  160|  5.22M|    CornerIndex act_c;
  161|       |    // Check if the vertex is on a seam edge, if it is we need to find the first
  162|       |    // attribute entry on the seam edge when traversing in the CCW direction.
  163|  5.22M|    if (is_vertex_on_seam_[v.value()]) {
  ------------------
  |  Branch (163:9): [True: 4.27M, False: 950k]
  ------------------
  164|       |      // Try to swing left on the modified corner table. We need to get the
  165|       |      // first corner that defines an attribute seam.
  166|  4.27M|      act_c = SwingLeft(first_c);
  167|  4.34M|      while (act_c != kInvalidCornerIndex) {
  ------------------
  |  Branch (167:14): [True: 76.1k, False: 4.27M]
  ------------------
  168|  76.1k|        first_c = act_c;
  169|  76.1k|        act_c = SwingLeft(act_c);
  170|  76.1k|        if (act_c == c) {
  ------------------
  |  Branch (170:13): [True: 0, False: 76.1k]
  ------------------
  171|       |          // We reached the initial corner which shouldn't happen when we swing
  172|       |          // left from |c|.
  173|      0|          return false;
  174|      0|        }
  175|  76.1k|      }
  176|  4.27M|    }
  177|  5.22M|    corner_to_vertex_map_[first_c.value()] = VertexIndex(first_vert_id.value());
  178|  5.22M|    vertex_to_left_most_corner_map_.push_back(first_c);
  179|  5.22M|    act_c = corner_table_->SwingRight(first_c);
  180|  29.2M|    while (act_c != kInvalidCornerIndex && act_c != first_c) {
  ------------------
  |  Branch (180:12): [True: 28.5M, False: 685k]
  |  Branch (180:44): [True: 24.0M, False: 4.53M]
  ------------------
  181|  24.0M|      if (IsCornerOppositeToSeamEdge(corner_table_->Next(act_c))) {
  ------------------
  |  Branch (181:11): [True: 18.3M, False: 5.63M]
  ------------------
  182|  18.3M|        first_vert_id = AttributeValueIndex(num_new_vertices++);
  183|  18.3M|        if (init_vertex_to_attribute_entry_map) {
  ------------------
  |  Branch (183:13): [Folded, False: 18.3M]
  ------------------
  184|      0|          const PointIndex point_id = mesh->CornerToPointId(act_c.value());
  185|      0|          vertex_to_attribute_entry_id_map_.push_back(
  186|      0|              att->mapped_index(point_id));
  187|  18.3M|        } else {
  188|       |          // Identity mapping.
  189|  18.3M|          vertex_to_attribute_entry_id_map_.push_back(first_vert_id);
  190|  18.3M|        }
  191|  18.3M|        vertex_to_left_most_corner_map_.push_back(act_c);
  192|  18.3M|      }
  193|  24.0M|      corner_to_vertex_map_[act_c.value()] = VertexIndex(first_vert_id.value());
  194|  24.0M|      act_c = corner_table_->SwingRight(act_c);
  195|  24.0M|    }
  196|  5.22M|  }
  197|  5.99k|  return true;
  198|  5.99k|}

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  45.6M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  45.6M|    return is_edge_on_seam_[corner.value()];
   47|  45.6M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  21.5M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  21.5M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 21.5M]
  |  Branch (50:42): [True: 17.5M, False: 4.04M]
  ------------------
   51|  17.5M|      return kInvalidCornerIndex;
   52|  17.5M|    }
   53|  4.04M|    return corner_table_->Opposite(corner);
   54|  21.5M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  32.4M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  32.4M|    return corner_table_->Next(corner);
   58|  32.4M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  16.8M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  16.8M|    return corner_table_->Previous(corner);
   62|  16.8M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  3.67M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  3.67M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  3.67M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.47M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  2.47M|    return Opposite(Previous(corner));
   73|  2.47M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  2.98M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  2.98M|    return Opposite(Next(corner));
   76|  2.98M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  2.96M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  2.96M|    return Previous(Opposite(Previous(corner)));
   81|  2.96M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  10.4M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  10.4M|    return Next(Opposite(Next(corner)));
   86|  10.4M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  8.92k|  int num_vertices() const {
   89|  8.92k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  8.92k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  2.93k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  1.02k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|  82.6M|  VertexIndex Vertex(CornerIndex corner) const {
   95|  82.6M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|  82.6M|    return ConfidentVertex(corner);
   97|  82.6M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|  82.6M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|  82.6M|    return corner_to_vertex_map_[corner.value()];
  100|  82.6M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  2.42M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  2.42M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  2.42M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  2.42M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  2.42M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  2.42M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 2.42M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  2.42M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 1.90M, False: 511k]
  ------------------
  128|  1.90M|      return true;
  129|  1.90M|    }
  130|   511k|    return false;
  131|  2.42M|  }

_ZN5draco12ValenceCacheINS_11CornerTableEEC2ERKS1_:
   35|  4.76k|  explicit ValenceCache(const CornerTableT &table) : table_(table) {}
_ZNK5draco12ValenceCacheINS_11CornerTableEE17ClearValenceCacheEv:
  123|  4.76k|  void ClearValenceCache() const {
  124|  4.76k|    vertex_valence_cache_32_bit_.clear();
  125|       |    // Force erasure.
  126|  4.76k|    IndexTypeVector<VertexIndex, int32_t>().swap(vertex_valence_cache_32_bit_);
  127|  4.76k|  }
_ZNK5draco12ValenceCacheINS_11CornerTableEE27ClearValenceCacheInaccurateEv:
  118|  4.76k|  void ClearValenceCacheInaccurate() const {
  119|  4.76k|    vertex_valence_cache_8_bit_.clear();
  120|       |    // Force erasure.
  121|  4.76k|    IndexTypeVector<VertexIndex, int8_t>().swap(vertex_valence_cache_8_bit_);
  122|  4.76k|  }
_ZN5draco12ValenceCacheINS_24MeshAttributeCornerTableEEC2ERKS1_:
   35|  18.0k|  explicit ValenceCache(const CornerTableT &table) : table_(table) {}
_ZNK5draco12ValenceCacheINS_24MeshAttributeCornerTableEE17ClearValenceCacheEv:
  123|  5.99k|  void ClearValenceCache() const {
  124|  5.99k|    vertex_valence_cache_32_bit_.clear();
  125|       |    // Force erasure.
  126|  5.99k|    IndexTypeVector<VertexIndex, int32_t>().swap(vertex_valence_cache_32_bit_);
  127|  5.99k|  }
_ZNK5draco12ValenceCacheINS_24MeshAttributeCornerTableEE27ClearValenceCacheInaccurateEv:
  118|  5.99k|  void ClearValenceCacheInaccurate() const {
  119|  5.99k|    vertex_valence_cache_8_bit_.clear();
  120|       |    // Force erasure.
  121|  5.99k|    IndexTypeVector<VertexIndex, int8_t>().swap(vertex_valence_cache_8_bit_);
  122|  5.99k|  }

_ZN5draco16GeometryMetadata20AddAttributeMetadataENSt3__110unique_ptrINS_17AttributeMetadataENS1_14default_deleteIS3_EEEE:
   50|  1.49k|    std::unique_ptr<AttributeMetadata> att_metadata) {
   51|  1.49k|  if (!att_metadata) {
  ------------------
  |  Branch (51:7): [True: 0, False: 1.49k]
  ------------------
   52|      0|    return false;
   53|      0|  }
   54|  1.49k|  att_metadatas_.push_back(std::move(att_metadata));
   55|  1.49k|  return true;
   56|  1.49k|}

_ZN5draco17AttributeMetadataC2Ev:
   27|  1.69k|  AttributeMetadata() : att_unique_id_(0) {}
_ZN5draco17AttributeMetadata17set_att_unique_idEj:
   32|  1.69k|  void set_att_unique_id(uint32_t att_unique_id) {
   33|  1.69k|    att_unique_id_ = att_unique_id;
   34|  1.69k|  }
_ZN5draco16GeometryMetadataC2Ev:
   60|    592|  GeometryMetadata() {}

_ZN5draco10EntryValueC2ERKS0_:
   21|   293k|EntryValue::EntryValue(const EntryValue &value) {
   22|   293k|  data_.resize(value.data_.size());
   23|   293k|  memcpy(&data_[0], &value.data_[0], value.data_.size());
   24|   293k|}
_ZN5draco8Metadata14AddEntryBinaryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIhNS5_IhEEEE:
   97|   146k|                              const std::vector<uint8_t> &value) {
   98|   146k|  AddEntry(name, value);
   99|   146k|}
_ZN5draco8Metadata14AddSubMetadataERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_10unique_ptrIS0_NS1_14default_deleteIS0_EEEE:
  107|  61.3k|                              std::unique_ptr<Metadata> sub_metadata) {
  108|  61.3k|  auto sub_ptr = sub_metadatas_.find(name);
  109|       |  // Avoid accidentally writing over a sub-metadata with the same name.
  110|  61.3k|  if (sub_ptr != sub_metadatas_.end()) {
  ------------------
  |  Branch (110:7): [True: 18, False: 61.3k]
  ------------------
  111|     18|    return false;
  112|     18|  }
  113|  61.3k|  sub_metadatas_[name] = std::move(sub_metadata);
  114|  61.3k|  return true;
  115|  61.3k|}

_ZN5draco8MetadataC2Ev:
   98|  63.6k|  Metadata() {}
_ZN5draco8Metadata8AddEntryINSt3__16vectorIhNS2_9allocatorIhEEEEEEvRKNS2_12basic_stringIcNS2_11char_traitsIcEENS4_IcEEEERKT_:
  164|   146k|  void AddEntry(const std::string &entry_name, const DataTypeT &entry_value) {
  165|   146k|    const auto itr = entries_.find(entry_name);
  166|   146k|    if (itr != entries_.end()) {
  ------------------
  |  Branch (166:9): [True: 122k, False: 24.0k]
  ------------------
  167|   122k|      entries_.erase(itr);
  168|   122k|    }
  169|   146k|    entries_.insert(std::make_pair(entry_name, EntryValue(entry_value)));
  170|   146k|  }
_ZN5draco10EntryValueC2IhEERKNSt3__16vectorIT_NS2_9allocatorIS4_EEEE:
   41|   146k|  explicit EntryValue(const std::vector<DataTypeT> &data) {
   42|   146k|    const size_t total_size = sizeof(DataTypeT) * data.size();
   43|   146k|    data_.resize(total_size);
   44|   146k|    memcpy(&data_[0], &data[0], total_size);
   45|   146k|  }

_ZN5draco15MetadataDecoderC2Ev:
   23|    592|MetadataDecoder::MetadataDecoder() : buffer_(nullptr) {}
_ZN5draco15MetadataDecoder22DecodeGeometryMetadataEPNS_13DecoderBufferEPNS_16GeometryMetadataE:
   35|    592|                                             GeometryMetadata *metadata) {
   36|    592|  if (!metadata) {
  ------------------
  |  Branch (36:7): [True: 0, False: 592]
  ------------------
   37|      0|    return false;
   38|      0|  }
   39|    592|  buffer_ = in_buffer;
   40|    592|  uint32_t num_att_metadata = 0;
   41|    592|  if (!DecodeVarint(&num_att_metadata, buffer_)) {
  ------------------
  |  Branch (41:7): [True: 0, False: 592]
  ------------------
   42|      0|    return false;
   43|      0|  }
   44|       |  // Decode attribute metadata.
   45|  2.08k|  for (uint32_t i = 0; i < num_att_metadata; ++i) {
  ------------------
  |  Branch (45:24): [True: 1.69k, False: 388]
  ------------------
   46|  1.69k|    uint32_t att_unique_id;
   47|  1.69k|    if (!DecodeVarint(&att_unique_id, buffer_)) {
  ------------------
  |  Branch (47:9): [True: 1, False: 1.69k]
  ------------------
   48|      1|      return false;
   49|      1|    }
   50|  1.69k|    std::unique_ptr<AttributeMetadata> att_metadata =
   51|  1.69k|        std::unique_ptr<AttributeMetadata>(new AttributeMetadata());
   52|  1.69k|    att_metadata->set_att_unique_id(att_unique_id);
   53|  1.69k|    if (!DecodeMetadata(static_cast<Metadata *>(att_metadata.get()))) {
  ------------------
  |  Branch (53:9): [True: 203, False: 1.49k]
  ------------------
   54|    203|      return false;
   55|    203|    }
   56|  1.49k|    metadata->AddAttributeMetadata(std::move(att_metadata));
   57|  1.49k|  }
   58|    388|  return DecodeMetadata(static_cast<Metadata *>(metadata));
   59|    592|}
_ZN5draco15MetadataDecoder14DecodeMetadataEPNS_8MetadataE:
   61|  2.08k|bool MetadataDecoder::DecodeMetadata(Metadata *metadata) {
   62|       |  // Limit metadata nesting depth to avoid stack overflow in destructor.
   63|  2.08k|  constexpr int kMaxSubmetadataLevel = 1000;
   64|       |
   65|  2.08k|  struct MetadataTuple {
   66|  2.08k|    Metadata *parent_metadata;
   67|  2.08k|    Metadata *decoded_metadata;
   68|  2.08k|    int level;
   69|  2.08k|  };
   70|  2.08k|  std::vector<MetadataTuple> metadata_stack;
   71|  2.08k|  metadata_stack.push_back({nullptr, metadata, 0});
   72|  65.1k|  while (!metadata_stack.empty()) {
  ------------------
  |  Branch (72:10): [True: 63.4k, False: 1.63k]
  ------------------
   73|  63.4k|    const MetadataTuple mp = metadata_stack.back();
   74|  63.4k|    metadata_stack.pop_back();
   75|  63.4k|    metadata = mp.decoded_metadata;
   76|       |
   77|  63.4k|    if (mp.parent_metadata != nullptr) {
  ------------------
  |  Branch (77:9): [True: 61.4k, False: 2.08k]
  ------------------
   78|  61.4k|      if (mp.level > kMaxSubmetadataLevel) {
  ------------------
  |  Branch (78:11): [True: 6, False: 61.4k]
  ------------------
   79|      6|        return false;
   80|      6|      }
   81|  61.4k|      std::string sub_metadata_name;
   82|  61.4k|      if (!DecodeName(&sub_metadata_name)) {
  ------------------
  |  Branch (82:11): [True: 14, False: 61.3k]
  ------------------
   83|     14|        return false;
   84|     14|      }
   85|  61.3k|      std::unique_ptr<Metadata> sub_metadata =
   86|  61.3k|          std::unique_ptr<Metadata>(new Metadata());
   87|  61.3k|      metadata = sub_metadata.get();
   88|  61.3k|      if (!mp.parent_metadata->AddSubMetadata(sub_metadata_name,
  ------------------
  |  Branch (88:11): [True: 18, False: 61.3k]
  ------------------
   89|  61.3k|                                              std::move(sub_metadata))) {
   90|     18|        return false;
   91|     18|      }
   92|  61.3k|    }
   93|  63.4k|    if (metadata == nullptr) {
  ------------------
  |  Branch (93:9): [True: 0, False: 63.4k]
  ------------------
   94|      0|      return false;
   95|      0|    }
   96|       |
   97|  63.4k|    uint32_t num_entries = 0;
   98|  63.4k|    if (!DecodeVarint(&num_entries, buffer_)) {
  ------------------
  |  Branch (98:9): [True: 13, False: 63.4k]
  ------------------
   99|     13|      return false;
  100|     13|    }
  101|   210k|    for (uint32_t i = 0; i < num_entries; ++i) {
  ------------------
  |  Branch (101:26): [True: 147k, False: 63.1k]
  ------------------
  102|   147k|      if (!DecodeEntry(metadata)) {
  ------------------
  |  Branch (102:11): [True: 331, False: 146k]
  ------------------
  103|    331|        return false;
  104|    331|      }
  105|   147k|    }
  106|  63.1k|    uint32_t num_sub_metadata = 0;
  107|  63.1k|    if (!DecodeVarint(&num_sub_metadata, buffer_)) {
  ------------------
  |  Branch (107:9): [True: 5, False: 63.1k]
  ------------------
  108|      5|      return false;
  109|      5|    }
  110|  63.1k|    if (num_sub_metadata > buffer_->remaining_size()) {
  ------------------
  |  Branch (110:9): [True: 61, False: 63.0k]
  ------------------
  111|       |      // The decoded number of metadata items is unreasonably high.
  112|     61|      return false;
  113|     61|    }
  114|  6.10M|    for (uint32_t i = 0; i < num_sub_metadata; ++i) {
  ------------------
  |  Branch (114:26): [True: 6.04M, False: 63.0k]
  ------------------
  115|  6.04M|      metadata_stack.push_back(
  116|  6.04M|          {metadata, nullptr, mp.parent_metadata ? mp.level + 1 : mp.level});
  ------------------
  |  Branch (116:31): [True: 6.04M, False: 3.89k]
  ------------------
  117|  6.04M|    }
  118|  63.0k|  }
  119|  1.63k|  return true;
  120|  2.08k|}
_ZN5draco15MetadataDecoder11DecodeEntryEPNS_8MetadataE:
  122|   147k|bool MetadataDecoder::DecodeEntry(Metadata *metadata) {
  123|   147k|  std::string entry_name;
  124|   147k|  if (!DecodeName(&entry_name)) {
  ------------------
  |  Branch (124:7): [True: 156, False: 147k]
  ------------------
  125|    156|    return false;
  126|    156|  }
  127|   147k|  uint32_t data_size = 0;
  128|   147k|  if (!DecodeVarint(&data_size, buffer_)) {
  ------------------
  |  Branch (128:7): [True: 30, False: 147k]
  ------------------
  129|     30|    return false;
  130|     30|  }
  131|   147k|  if (data_size == 0) {
  ------------------
  |  Branch (131:7): [True: 60, False: 147k]
  ------------------
  132|     60|    return false;
  133|     60|  }
  134|   147k|  if (data_size > buffer_->remaining_size()) {
  ------------------
  |  Branch (134:7): [True: 85, False: 146k]
  ------------------
  135|     85|    return false;
  136|     85|  }
  137|   146k|  std::vector<uint8_t> entry_value(data_size);
  138|   146k|  if (!buffer_->Decode(&entry_value[0], data_size)) {
  ------------------
  |  Branch (138:7): [True: 0, False: 146k]
  ------------------
  139|      0|    return false;
  140|      0|  }
  141|   146k|  metadata->AddEntryBinary(entry_name, entry_value);
  142|   146k|  return true;
  143|   146k|}
_ZN5draco15MetadataDecoder10DecodeNameEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  145|   208k|bool MetadataDecoder::DecodeName(std::string *name) {
  146|   208k|  uint8_t name_len = 0;
  147|   208k|  if (!buffer_->Decode(&name_len)) {
  ------------------
  |  Branch (147:7): [True: 40, False: 208k]
  ------------------
  148|     40|    return false;
  149|     40|  }
  150|   208k|  name->resize(name_len);
  151|   208k|  if (name_len == 0) {
  ------------------
  |  Branch (151:7): [True: 26.2k, False: 182k]
  ------------------
  152|  26.2k|    return true;
  153|  26.2k|  }
  154|   182k|  if (!buffer_->Decode(&name->at(0), name_len)) {
  ------------------
  |  Branch (154:7): [True: 130, False: 182k]
  ------------------
  155|    130|    return false;
  156|    130|  }
  157|   182k|  return true;
  158|   182k|}

_ZN5draco10PointCloudC2Ev:
   27|  6.55k|PointCloud::PointCloud() : num_points_(0) {}
_ZNK5draco10PointCloud18NumNamedAttributesENS_17GeometryAttribute4TypeE:
   56|  2.48k|int32_t PointCloud::NumNamedAttributes(GeometryAttribute::Type type) const {
   57|  2.48k|  if (type == GeometryAttribute::INVALID ||
  ------------------
  |  Branch (57:7): [True: 0, False: 2.48k]
  ------------------
   58|  2.48k|      type >= GeometryAttribute::NAMED_ATTRIBUTES_COUNT) {
  ------------------
  |  Branch (58:7): [True: 0, False: 2.48k]
  ------------------
   59|      0|    return 0;
   60|      0|  }
   61|  2.48k|  return static_cast<int32_t>(named_attribute_index_[type].size());
   62|  2.48k|}
_ZNK5draco10PointCloud19GetNamedAttributeIdENS_17GeometryAttribute4TypeE:
   64|  2.48k|int32_t PointCloud::GetNamedAttributeId(GeometryAttribute::Type type) const {
   65|  2.48k|  return GetNamedAttributeId(type, 0);
   66|  2.48k|}
_ZNK5draco10PointCloud19GetNamedAttributeIdENS_17GeometryAttribute4TypeEi:
   69|  2.48k|                                        int i) const {
   70|  2.48k|  if (NumNamedAttributes(type) <= i) {
  ------------------
  |  Branch (70:7): [True: 1, False: 2.48k]
  ------------------
   71|      1|    return -1;
   72|      1|  }
   73|  2.48k|  return named_attribute_index_[type][i];
   74|  2.48k|}
_ZN5draco10PointCloud12AddAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
  134|  39.6k|int PointCloud::AddAttribute(std::unique_ptr<PointAttribute> pa) {
  135|  39.6k|  SetAttribute(static_cast<int>(attributes_.size()), std::move(pa));
  136|  39.6k|  return static_cast<int>(attributes_.size() - 1);
  137|  39.6k|}
_ZN5draco10PointCloud12SetAttributeEiNSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
  172|  39.6k|void PointCloud::SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) {
  173|  39.6k|  DRACO_DCHECK(att_id >= 0);
  174|  39.6k|  if (static_cast<int>(attributes_.size()) <= att_id) {
  ------------------
  |  Branch (174:7): [True: 39.6k, False: 0]
  ------------------
  175|  39.6k|    attributes_.resize(att_id + 1);
  176|  39.6k|  }
  177|  39.6k|  if (pa->attribute_type() < GeometryAttribute::NAMED_ATTRIBUTES_COUNT) {
  ------------------
  |  Branch (177:7): [True: 39.6k, False: 0]
  ------------------
  178|  39.6k|    named_attribute_index_[pa->attribute_type()].push_back(att_id);
  179|  39.6k|  }
  180|  39.6k|  pa->set_unique_id(att_id);
  181|  39.6k|  attributes_[att_id] = std::move(pa);
  182|  39.6k|}

_ZNK5draco10PointCloud14num_attributesEv:
   75|  2.48k|  int32_t num_attributes() const {
   76|  2.48k|    return static_cast<int32_t>(attributes_.size());
   77|  2.48k|  }
_ZNK5draco10PointCloud9attributeEi:
   78|  10.4k|  const PointAttribute *attribute(int32_t att_id) const {
   79|  10.4k|    DRACO_DCHECK_LE(0, att_id);
   80|  10.4k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   81|  10.4k|    return attributes_[att_id].get();
   82|  10.4k|  }
_ZN5draco10PointCloud9attributeEi:
   86|  80.3k|  PointAttribute *attribute(int32_t att_id) {
   87|  80.3k|    DRACO_DCHECK_LE(0, att_id);
   88|  80.3k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   89|  80.3k|    return attributes_[att_id].get();
   90|  80.3k|  }
_ZN5draco10PointCloud11AddMetadataENSt3__110unique_ptrINS_16GeometryMetadataENS1_14default_deleteIS3_EEEE:
  141|    143|  void AddMetadata(std::unique_ptr<GeometryMetadata> metadata) {
  142|    143|    metadata_ = std::move(metadata);
  143|    143|  }
_ZNK5draco10PointCloud10num_pointsEv:
  195|  42.6k|  PointIndex::ValueType num_points() const { return num_points_; }
_ZN5draco10PointCloud14set_num_pointsEj:
  200|  3.57k|  void set_num_points(PointIndex::ValueType num) { num_points_ = num; }
_ZN5draco10PointCloudD2Ev:
   36|  6.55k|  virtual ~PointCloud() = default;

LLVMFuzzerTestOneInput:
   21|  6.55k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   22|  6.55k|  draco::DecoderBuffer buffer;
   23|  6.55k|  buffer.Init(reinterpret_cast<const char *>(data), size);
   24|       |
   25|  6.55k|  draco::Decoder decoder;
   26|  6.55k|  decoder.SetSkipAttributeTransform(draco::GeometryAttribute::POSITION);
   27|  6.55k|  decoder.DecodeMeshFromBuffer(&buffer);
   28|       |
   29|  6.55k|  return 0;
   30|  6.55k|}

