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

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

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

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

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

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

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

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

_ZNK5draco17GeometryAttribute10GetBytePosENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  118|  15.2M|  inline int64_t GetBytePos(AttributeValueIndex att_index) const {
  119|  15.2M|    return byte_offset_ + byte_stride_ * att_index.value();
  120|  15.2M|  }
_ZNK5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  122|  15.2M|  inline const uint8_t* GetAddress(AttributeValueIndex att_index) const {
  123|  15.2M|    const int64_t byte_pos = GetBytePos(att_index);
  124|  15.2M|    return buffer_->data() + byte_pos;
  125|  15.2M|  }
_ZN5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  126|  9.03k|  inline uint8_t* GetAddress(AttributeValueIndex att_index) {
  127|  9.03k|    const int64_t byte_pos = GetBytePos(att_index);
  128|  9.03k|    return buffer_->data() + byte_pos;
  129|  9.03k|  }
_ZNK5draco17GeometryAttribute14IsAddressValidEPKh:
  130|  45.6M|  inline bool IsAddressValid(const uint8_t* address) const {
  131|  45.6M|    return ((buffer_->data() + buffer_->data_size()) > address);
  132|  45.6M|  }
_ZNK5draco17GeometryAttribute14attribute_typeEv:
  266|  91.2k|  Type attribute_type() const { return attribute_type_; }
_ZNK5draco17GeometryAttribute9data_typeEv:
  269|  19.1k|  DataType data_type() const { return data_type_; }
_ZNK5draco17GeometryAttribute14num_componentsEv:
  273|  37.3k|  uint8_t num_components() const { return num_components_; }
_ZNK5draco17GeometryAttribute11byte_strideEv:
  282|    716|  int64_t byte_stride() const { return byte_stride_; }
_ZNK5draco17GeometryAttribute9unique_idEv:
  287|  7.73k|  uint32_t unique_id() const { return unique_id_; }
_ZN5draco17GeometryAttribute13set_unique_idEj:
  288|   126k|  void set_unique_id(uint32_t id) { unique_id_ = id; }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  15.2M|  bool ConvertValue(AttributeValueIndex att_index, OutT* out_value) const {
  230|  15.2M|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  15.2M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  15.2M|                    OutT* out_val) const {
  180|  15.2M|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 15.2M]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  15.2M|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  15.2M|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 15.2M, False: 0]
  ------------------
  197|  15.2M|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  15.2M|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  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: 15.2M]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 15.2M]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  15.2M|    }
  221|  15.2M|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIilEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  15.2M|                         OutT* out_value) const {
  307|  15.2M|    const uint8_t* src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  60.8M|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 45.6M, False: 15.2M]
  ------------------
  311|  45.6M|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 45.6M]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  45.6M|      const T in_value = *reinterpret_cast<const T*>(src_address);
  315|  45.6M|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 45.6M]
  ------------------
  316|  45.6M|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  45.6M|      src_address += sizeof(T);
  320|  45.6M|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  15.2M|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 15.2M]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  15.2M|    return true;
  326|  15.2M|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIilEEbRKT_bPT0_:
  364|  45.6M|                                    OutT* out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  45.6M|#if __cplusplus >= 201703L
  367|  45.6M|    if constexpr (std::is_integral<OutT>::value) {
  368|       |#else
  369|       |    if (std::is_integral<OutT>::value) {
  370|       |#endif
  371|       |      // Make sure the |in_value| fits within the range of values that OutT
  372|       |      // is able to represent. Perform the check only for integral types.
  373|  45.6M|#if __cplusplus >= 201703L
  374|       |      if constexpr (!std::is_same<T, bool>::value &&
  375|  45.6M|                    std::is_integral<T>::value) {
  376|       |#else
  377|       |      if (!std::is_same<T, bool>::value && std::is_integral<T>::value) {
  378|       |#endif
  379|  45.6M|        static constexpr OutT kOutMin =
  380|  45.6M|            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  ------------------
  |  Branch (380:13): [True: 0, Folded]
  ------------------
  381|  45.6M|        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (381:13): [True: 0, False: 45.6M]
  |  Branch (381:35): [True: 0, False: 45.6M]
  ------------------
  382|      0|          return false;
  383|      0|        }
  384|  45.6M|      }
  385|       |
  386|       |      // Check conversion of floating point |in_value| to integral value OutT.
  387|  45.6M|#if __cplusplus >= 201703L
  388|       |      if constexpr (std::is_floating_point<T>::value) {
  389|       |#else
  390|       |      if (std::is_floating_point<T>::value) {
  391|       |#endif
  392|       |        // Make sure the floating point |in_value| is not NaN and not Inf as
  393|       |        // integral type OutT is unable to represent these values.
  394|       |        if (sizeof(in_value) > sizeof(double)) {
  395|       |          if (std::isnan(static_cast<long double>(in_value)) ||
  396|       |              std::isinf(static_cast<long double>(in_value))) {
  397|       |            return false;
  398|       |          }
  399|       |        } else if (sizeof(in_value) > sizeof(float)) {
  400|       |          if (std::isnan(static_cast<double>(in_value)) ||
  401|       |              std::isinf(static_cast<double>(in_value))) {
  402|       |            return false;
  403|       |          }
  404|       |        } else {
  405|       |          if (std::isnan(static_cast<float>(in_value)) ||
  406|       |              std::isinf(static_cast<float>(in_value))) {
  407|       |            return false;
  408|       |          }
  409|       |        }
  410|       |
  411|       |        // Make sure the floating point |in_value| fits within the range of
  412|       |        // values that integral type OutT is able to represent.
  413|       |        if (in_value < std::numeric_limits<OutT>::min() ||
  414|       |            in_value >= std::numeric_limits<OutT>::max()) {
  415|       |          return false;
  416|       |        }
  417|       |      }
  418|  45.6M|    }
  419|       |
  420|  45.6M|    if (!normalized) {
  ------------------
  |  Branch (420:9): [True: 45.6M, False: 0]
  ------------------
  421|  45.6M|      *out_value = static_cast<OutT>(in_value);
  422|  45.6M|    } else {
  423|      0|#if __cplusplus >= 201703L
  424|       |      if constexpr (std::is_integral<T>::value &&
  425|       |                    std::is_floating_point<OutT>::value) {
  426|       |#else
  427|       |      if (std::is_integral<T>::value && std::is_floating_point<OutT>::value) {
  428|       |#endif
  429|       |        // When converting integer to floating point, normalize the value if
  430|       |        // necessary.
  431|       |        *out_value = static_cast<OutT>(in_value);
  432|       |        *out_value /= static_cast<OutT>(std::numeric_limits<T>::max());
  433|       |#if __cplusplus >= 201703L
  434|       |      } else if constexpr (std::is_floating_point<T>::value &&
  435|       |                           std::is_integral<OutT>::value) {
  436|       |#else
  437|       |      } else if (std::is_floating_point<T>::value &&
  438|       |                 std::is_integral<OutT>::value) {
  439|       |#endif
  440|       |        // Converting from floating point to a normalized integer.
  441|       |        if (in_value > 1 || in_value < 0) {
  442|       |          // Normalized float values need to be between 0 and 1.
  443|       |          return false;
  444|       |        }
  445|       |        // TODO(ostava): Consider allowing float to normalized integer
  446|       |        // conversion for 64-bit integer types. Currently it doesn't work
  447|       |        // because we don't have a floating point type that could store all 64
  448|       |        // bit integers.
  449|       |        if (sizeof(OutT) > 4) {
  450|       |          return false;
  451|       |        }
  452|       |        // Expand the float to the range of the output integer and round it to
  453|       |        // the nearest representable value. Use doubles for the math to ensure
  454|       |        // the integer values are represented properly during the conversion
  455|       |        // process.
  456|       |        *out_value = static_cast<OutT>(std::floor(
  457|       |            in_value * static_cast<double>(std::numeric_limits<OutT>::max()) +
  458|       |            0.5));
  459|      0|      } else {
  460|      0|        *out_value = static_cast<OutT>(in_value);
  461|      0|      }
  462|      0|    }
  463|       |
  464|       |    // TODO(ostava): Add handling of normalized attributes when converting
  465|       |    // between different integer representations. If the attribute is
  466|       |    // normalized, integer values should be converted as if they represent 0-1
  467|       |    // range. E.g. when we convert uint16 to uint8, the range <0, 2^16 - 1>
  468|       |    // should be converted to range <0, 2^8 - 1>.
  469|  45.6M|    return true;
  470|  45.6M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  21.4k|  bool ConvertValue(AttributeValueIndex att_index, OutT* out_value) const {
  230|  21.4k|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  21.4k|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  21.4k|                    OutT* out_val) const {
  180|  21.4k|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 21.4k]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  21.4k|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  21.4k|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 21.4k, False: 0]
  ------------------
  197|  21.4k|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  21.4k|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  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: 21.4k]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 21.4k]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  21.4k|    }
  221|  21.4k|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIifEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  21.4k|                         OutT* out_value) const {
  307|  21.4k|    const uint8_t* src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  85.7k|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 64.3k, False: 21.4k]
  ------------------
  311|  64.3k|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 64.3k]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  64.3k|      const T in_value = *reinterpret_cast<const T*>(src_address);
  315|  64.3k|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 64.3k]
  ------------------
  316|  64.3k|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  64.3k|      src_address += sizeof(T);
  320|  64.3k|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  21.4k|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 21.4k]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  21.4k|    return true;
  326|  21.4k|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIifEEbRKT_bPT0_:
  364|  64.3k|                                    OutT* out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  64.3k|#if __cplusplus >= 201703L
  367|       |    if constexpr (std::is_integral<OutT>::value) {
  368|       |#else
  369|       |    if (std::is_integral<OutT>::value) {
  370|       |#endif
  371|       |      // Make sure the |in_value| fits within the range of values that OutT
  372|       |      // is able to represent. Perform the check only for integral types.
  373|       |#if __cplusplus >= 201703L
  374|       |      if constexpr (!std::is_same<T, bool>::value &&
  375|       |                    std::is_integral<T>::value) {
  376|       |#else
  377|       |      if (!std::is_same<T, bool>::value && std::is_integral<T>::value) {
  378|       |#endif
  379|       |        static constexpr OutT kOutMin =
  380|       |            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  381|       |        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  382|       |          return false;
  383|       |        }
  384|       |      }
  385|       |
  386|       |      // Check conversion of floating point |in_value| to integral value OutT.
  387|       |#if __cplusplus >= 201703L
  388|       |      if constexpr (std::is_floating_point<T>::value) {
  389|       |#else
  390|       |      if (std::is_floating_point<T>::value) {
  391|       |#endif
  392|       |        // Make sure the floating point |in_value| is not NaN and not Inf as
  393|       |        // integral type OutT is unable to represent these values.
  394|       |        if (sizeof(in_value) > sizeof(double)) {
  395|       |          if (std::isnan(static_cast<long double>(in_value)) ||
  396|       |              std::isinf(static_cast<long double>(in_value))) {
  397|       |            return false;
  398|       |          }
  399|       |        } else if (sizeof(in_value) > sizeof(float)) {
  400|       |          if (std::isnan(static_cast<double>(in_value)) ||
  401|       |              std::isinf(static_cast<double>(in_value))) {
  402|       |            return false;
  403|       |          }
  404|       |        } else {
  405|       |          if (std::isnan(static_cast<float>(in_value)) ||
  406|       |              std::isinf(static_cast<float>(in_value))) {
  407|       |            return false;
  408|       |          }
  409|       |        }
  410|       |
  411|       |        // Make sure the floating point |in_value| fits within the range of
  412|       |        // values that integral type OutT is able to represent.
  413|       |        if (in_value < std::numeric_limits<OutT>::min() ||
  414|       |            in_value >= std::numeric_limits<OutT>::max()) {
  415|       |          return false;
  416|       |        }
  417|       |      }
  418|       |    }
  419|       |
  420|  64.3k|    if (!normalized) {
  ------------------
  |  Branch (420:9): [True: 64.3k, False: 0]
  ------------------
  421|  64.3k|      *out_value = static_cast<OutT>(in_value);
  422|  64.3k|    } else {
  423|      0|#if __cplusplus >= 201703L
  424|       |      if constexpr (std::is_integral<T>::value &&
  425|      0|                    std::is_floating_point<OutT>::value) {
  426|       |#else
  427|       |      if (std::is_integral<T>::value && std::is_floating_point<OutT>::value) {
  428|       |#endif
  429|       |        // When converting integer to floating point, normalize the value if
  430|       |        // necessary.
  431|      0|        *out_value = static_cast<OutT>(in_value);
  432|      0|        *out_value /= static_cast<OutT>(std::numeric_limits<T>::max());
  433|      0|#if __cplusplus >= 201703L
  434|       |      } else if constexpr (std::is_floating_point<T>::value &&
  435|       |                           std::is_integral<OutT>::value) {
  436|       |#else
  437|       |      } else if (std::is_floating_point<T>::value &&
  438|       |                 std::is_integral<OutT>::value) {
  439|       |#endif
  440|       |        // Converting from floating point to a normalized integer.
  441|       |        if (in_value > 1 || in_value < 0) {
  442|       |          // Normalized float values need to be between 0 and 1.
  443|       |          return false;
  444|       |        }
  445|       |        // TODO(ostava): Consider allowing float to normalized integer
  446|       |        // conversion for 64-bit integer types. Currently it doesn't work
  447|       |        // because we don't have a floating point type that could store all 64
  448|       |        // bit integers.
  449|       |        if (sizeof(OutT) > 4) {
  450|       |          return false;
  451|       |        }
  452|       |        // Expand the float to the range of the output integer and round it to
  453|       |        // the nearest representable value. Use doubles for the math to ensure
  454|       |        // the integer values are represented properly during the conversion
  455|       |        // process.
  456|       |        *out_value = static_cast<OutT>(std::floor(
  457|       |            in_value * static_cast<double>(std::numeric_limits<OutT>::max()) +
  458|       |            0.5));
  459|       |      } else {
  460|       |        *out_value = static_cast<OutT>(in_value);
  461|       |      }
  462|      0|    }
  463|       |
  464|       |    // TODO(ostava): Add handling of normalized attributes when converting
  465|       |    // between different integer representations. If the attribute is
  466|       |    // normalized, integer values should be converted as if they represent 0-1
  467|       |    // range. E.g. when we convert uint16 to uint8, the range <0, 2^16 - 1>
  468|       |    // should be converted to range <0, 2^8 - 1>.
  469|  64.3k|    return true;
  470|  64.3k|  }

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

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

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

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|   104k|  int32_t GetAttributeId(int i) const override {
   45|   104k|    return point_attribute_ids_[i];
   46|   104k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|  42.3k|  int32_t GetNumAttributes() const override {
   48|  42.3k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|  42.3k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  53.2k|  PointCloudDecoder* GetDecoder() const override {
   51|  53.2k|    return point_cloud_decoder_;
   52|  53.2k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  2.91k|  bool DecodeAttributes(DecoderBuffer* in_buffer) override {
   56|  2.91k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 1.66k, False: 1.25k]
  ------------------
   57|  1.66k|      return false;
   58|  1.66k|    }
   59|  1.25k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 461, False: 790]
  ------------------
   60|    461|      return false;
   61|    461|    }
   62|    790|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 225, False: 565]
  ------------------
   63|    225|      return false;
   64|    225|    }
   65|    565|    return true;
   66|    790|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  2.30k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  2.30k|    const int id_map_size =
   71|  2.30k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  2.30k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2.30k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  2.30k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  2.30k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  17.0k|  virtual ~AttributesDecoder() = default;

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  2.12k|      : quantization_bits_(-1),
   54|  2.12k|        max_quantized_value_(-1),
   55|  2.12k|        max_value_(-1),
   56|  2.12k|        dequantization_scale_(1.f),
   57|  2.12k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  1.96k|  bool SetQuantizationBits(int32_t q) {
   60|  1.96k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 793, False: 1.16k]
  |  Branch (60:18): [True: 91, False: 1.07k]
  ------------------
   61|    884|      return false;
   62|    884|    }
   63|  1.07k|    quantization_bits_ = q;
   64|  1.07k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  1.07k|    max_value_ = max_quantized_value_ - 1;
   66|  1.07k|    dequantization_scale_ = 2.f / max_value_;
   67|  1.07k|    center_value_ = max_value_ / 2;
   68|  1.07k|    return true;
   69|  1.96k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  2.51M|                                           int32_t* out_t) const {
   77|  2.51M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.02k, False: 2.51M]
  |  Branch (77:20): [True: 0, False: 2.02k]
  |  Branch (77:32): [True: 2.02k, False: 2.51M]
  |  Branch (77:42): [True: 0, False: 2.02k]
  ------------------
   78|  2.51M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 1.97M, False: 548k]
  |  Branch (78:29): [True: 5.75k, False: 1.96M]
  ------------------
   79|  5.75k|      s = max_value_;
   80|  5.75k|      t = max_value_;
   81|  2.51M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.02k, False: 2.51M]
  |  Branch (81:26): [True: 561, False: 1.46k]
  ------------------
   82|    561|      t = center_value_ - (t - center_value_);
   83|  2.51M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 1.96M, False: 547k]
  |  Branch (83:35): [True: 6.39k, False: 1.95M]
  ------------------
   84|  6.39k|      t = center_value_ + (center_value_ - t);
   85|  2.50M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 1.96M, False: 542k]
  |  Branch (85:35): [True: 324, False: 1.96M]
  ------------------
   86|    324|      s = center_value_ + (center_value_ - s);
   87|  2.50M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 6.29k, False: 2.49M]
  |  Branch (87:26): [True: 1.24k, False: 5.05k]
  ------------------
   88|  1.24k|      s = center_value_ - (s - center_value_);
   89|  1.24k|    }
   90|       |
   91|  2.51M|    *out_s = s;
   92|  2.51M|    *out_t = t;
   93|  2.51M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  2.51M|                                                       int32_t* out_t) const {
  100|  2.51M|    DRACO_DCHECK_EQ(
  101|  2.51M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  2.51M|        center_value_);
  103|  2.51M|    int32_t s, t;
  104|  2.51M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 870k, False: 1.64M]
  ------------------
  105|       |      // Right hemisphere.
  106|   870k|      s = (int_vec[1] + center_value_);
  107|   870k|      t = (int_vec[2] + center_value_);
  108|  1.64M|    } else {
  109|       |      // Left hemisphere.
  110|  1.64M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 36.2k, False: 1.61M]
  ------------------
  111|  36.2k|        s = std::abs(int_vec[2]);
  112|  1.61M|      } else {
  113|  1.61M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.61M|      }
  115|  1.64M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 39.7k, False: 1.60M]
  ------------------
  116|  39.7k|        t = std::abs(int_vec[1]);
  117|  1.60M|      } else {
  118|  1.60M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.60M|      }
  120|  1.64M|    }
  121|  2.51M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  2.51M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   355k|                                                    float* out_vector) const {
  199|   355k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   355k|                                 in_t * dequantization_scale_ - 1.f,
  201|   355k|                                 out_vector);
  202|   355k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.48M|  inline bool IsInDiamond(const int32_t& s, const int32_t& t) const {
  206|       |    // Expect center already at origin.
  207|  2.48M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.48M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.48M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.48M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.48M|    const uint32_t st =
  212|  2.48M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.48M|    return st <= center_value_;
  214|  2.48M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  4.01M|  void InvertDiamond(int32_t* s, int32_t* t) const {
  217|       |    // Expect center already at origin.
  218|  4.01M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  4.01M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  4.01M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  4.01M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  4.01M|    int32_t sign_s = 0;
  223|  4.01M|    int32_t sign_t = 0;
  224|  4.01M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 3.90M, False: 111k]
  |  Branch (224:20): [True: 3.84M, False: 61.4k]
  ------------------
  225|  3.84M|      sign_s = 1;
  226|  3.84M|      sign_t = 1;
  227|  3.84M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 113k, False: 59.0k]
  |  Branch (227:27): [True: 59.2k, False: 54.1k]
  ------------------
  228|  59.2k|      sign_s = -1;
  229|  59.2k|      sign_t = -1;
  230|   113k|    } else {
  231|   113k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 59.0k, False: 54.1k]
  ------------------
  232|   113k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 54.1k, False: 59.0k]
  ------------------
  233|   113k|    }
  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|  4.01M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  4.01M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  4.01M|    uint32_t us = *s;
  241|  4.01M|    uint32_t ut = *t;
  242|  4.01M|    us = us + us - corner_point_s;
  243|  4.01M|    ut = ut + ut - corner_point_t;
  244|  4.01M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 3.90M, False: 113k]
  ------------------
  245|  3.90M|      uint32_t temp = us;
  246|  3.90M|      us = -ut;
  247|  3.90M|      ut = -temp;
  248|  3.90M|    } else {
  249|   113k|      std::swap(us, ut);
  250|   113k|    }
  251|  4.01M|    us = us + corner_point_s;
  252|  4.01M|    ut = ut + corner_point_t;
  253|       |
  254|  4.01M|    *s = us;
  255|  4.01M|    *t = ut;
  256|  4.01M|    *s /= 2;
  257|  4.01M|    *t /= 2;
  258|  4.01M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  4.96M|  int32_t ModMax(int32_t x) const {
  273|  4.96M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 31.5k, False: 4.93M]
  ------------------
  274|  31.5k|      return x - this->max_quantized_value();
  275|  31.5k|    }
  276|  4.93M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 9.02k, False: 4.92M]
  ------------------
  277|  9.02k|      return x + this->max_quantized_value();
  278|  9.02k|    }
  279|  4.92M|    return x;
  280|  4.93M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.06k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  40.5k|  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|   355k|                                           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|   355k|    float y = in_s_scaled;
  329|   355k|    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|   355k|    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|   355k|    float x_offset = -x;
  342|   355k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 1, False: 355k]
  ------------------
  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|   355k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 14.0k, False: 341k]
  ------------------
  348|   355k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 14.0k, False: 341k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   355k|    const float norm_squared = x * x + y * y + z * z;
  352|   355k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 355k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   355k|    } else {
  357|   355k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   355k|      out_vector[0] = x * d;
  359|   355k|      out_vector[1] = y * d;
  360|   355k|      out_vector[2] = z * d;
  361|   355k|    }
  362|   355k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  2.51M|  void CanonicalizeIntegerVector(T* vec) const {
  174|  2.51M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  2.51M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  2.51M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  2.51M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  2.51M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  2.51M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 2.32M, False: 193k]
  ------------------
  181|  2.32M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  2.32M|    } else {
  183|   193k|      vec[0] =
  184|   193k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   193k|          abs_sum;
  186|   193k|      vec[1] =
  187|   193k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   193k|          abs_sum;
  189|   193k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 102k, False: 91.5k]
  ------------------
  190|   102k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   102k|      } else {
  192|  91.5k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  91.5k|      }
  194|   193k|    }
  195|  2.51M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    228|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    228|            attribute, transform, mesh_data),
   52|    228|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    226|                                                                buffer) {
  197|    226|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    226|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    226|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 21, False: 205]
  ------------------
  199|       |    // Decode prediction mode.
  200|     21|    uint8_t mode;
  201|     21|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 20]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|     20|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 18, False: 2]
  ------------------
  206|       |      // Unsupported mode.
  207|     18|      return false;
  208|     18|    }
  209|     20|  }
  210|    207|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|    968|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 793, False: 175]
  ------------------
  214|    793|    uint32_t num_flags;
  215|    793|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 3, False: 790]
  ------------------
  216|      3|      return false;
  217|      3|    }
  218|    790|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 12, False: 778]
  ------------------
  219|     12|      return false;
  220|     12|    }
  221|    778|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 350, False: 428]
  ------------------
  222|    350|      is_crease_edge_[i].resize(num_flags);
  223|    350|      RAnsBitDecoder decoder;
  224|    350|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 17, False: 333]
  ------------------
  225|     17|        return false;
  226|     17|      }
  227|  1.34M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.34M, False: 333]
  ------------------
  228|  1.34M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.34M|      }
  230|    333|      decoder.EndDecoding();
  231|    333|    }
  232|    778|  }
  233|    175|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    175|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    207|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    166|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    166|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    166|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|    830|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 664, False: 166]
  ------------------
   93|    664|    pred_vals[i].resize(num_components, 0);
   94|    664|  }
   95|    166|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    166|                                         out_data);
   97|       |
   98|    166|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    166|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    166|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    166|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    166|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    166|  const int corner_map_size =
  109|    166|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    166|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 166]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   486k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 486k, False: 139]
  ------------------
  114|   486k|    const CornerIndex start_corner_id =
  115|   486k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   486k|    CornerIndex corner_id(start_corner_id);
  118|   486k|    int num_parallelograms = 0;
  119|   486k|    bool first_pass = true;
  120|  1.06M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 595k, False: 469k]
  ------------------
  121|   595k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 41.8k, False: 553k]
  ------------------
  122|   595k|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|   595k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|  41.8k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|  41.8k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 475, False: 41.3k]
  ------------------
  130|    475|          break;
  131|    475|        }
  132|  41.8k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|   594k|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 580k, False: 14.3k]
  ------------------
  137|   580k|        corner_id = table->SwingLeft(corner_id);
  138|   580k|      } else {
  139|  14.3k|        corner_id = table->SwingRight(corner_id);
  140|  14.3k|      }
  141|   594k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 15.9k, False: 578k]
  ------------------
  142|  15.9k|        break;
  143|  15.9k|      }
  144|   578k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 478k, False: 100k]
  |  Branch (144:47): [True: 469k, False: 8.60k]
  ------------------
  145|   469k|        first_pass = false;
  146|   469k|        corner_id = table->SwingRight(start_corner_id);
  147|   469k|      }
  148|   578k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   486k|    int num_used_parallelograms = 0;
  153|   486k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 25.9k, False: 460k]
  ------------------
  154|  3.94M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 3.91M, False: 25.9k]
  ------------------
  155|  3.91M|        multi_pred_vals[i] = 0;
  156|  3.91M|      }
  157|       |      // Check which parallelograms are actually used.
  158|  67.7k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 41.8k, False: 25.9k]
  ------------------
  159|  41.8k|        const int context = num_parallelograms - 1;
  160|  41.8k|        const int pos = is_crease_edge_pos[context]++;
  161|  41.8k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 27, False: 41.8k]
  ------------------
  162|     27|          return false;
  163|     27|        }
  164|  41.8k|        const bool is_crease = is_crease_edge_[context][pos];
  165|  41.8k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 4.60k, False: 37.2k]
  ------------------
  166|  4.60k|          ++num_used_parallelograms;
  167|   654k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 649k, False: 4.60k]
  ------------------
  168|   649k|            multi_pred_vals[j] =
  169|   649k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   649k|          }
  171|  4.60k|        }
  172|  41.8k|      }
  173|  25.9k|    }
  174|   486k|    const int dst_offset = p * num_components;
  175|   486k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 484k, False: 1.76k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   484k|      const int src_offset = (p - 1) * num_components;
  179|   484k|      this->transform().ComputeOriginalValue(
  180|   484k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   484k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   225k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 223k, False: 1.76k]
  ------------------
  184|   223k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   223k|      }
  186|  1.76k|      this->transform().ComputeOriginalValue(
  187|  1.76k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  1.76k|    }
  189|   486k|  }
  190|    139|  return true;
  191|    166|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    253|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    253|            attribute, transform, mesh_data),
   52|    253|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    246|                                                                buffer) {
  197|    246|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    246|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    246|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 14, False: 232]
  ------------------
  199|       |    // Decode prediction mode.
  200|     14|    uint8_t mode;
  201|     14|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 13]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|     13|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 3, False: 10]
  ------------------
  206|       |      // Unsupported mode.
  207|      3|      return false;
  208|      3|    }
  209|     13|  }
  210|    242|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  1.07k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 891, False: 185]
  ------------------
  214|    891|    uint32_t num_flags;
  215|    891|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 4, False: 887]
  ------------------
  216|      4|      return false;
  217|      4|    }
  218|    887|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 31, False: 856]
  ------------------
  219|     31|      return false;
  220|     31|    }
  221|    856|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 335, False: 521]
  ------------------
  222|    335|      is_crease_edge_[i].resize(num_flags);
  223|    335|      RAnsBitDecoder decoder;
  224|    335|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 22, False: 313]
  ------------------
  225|     22|        return false;
  226|     22|      }
  227|   472k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 472k, False: 313]
  ------------------
  228|   472k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|   472k|      }
  230|    313|      decoder.EndDecoding();
  231|    313|    }
  232|    856|  }
  233|    185|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    185|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    242|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_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|    172|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 172]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|  76.9k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 76.7k, False: 105]
  ------------------
  114|  76.7k|    const CornerIndex start_corner_id =
  115|  76.7k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|  76.7k|    CornerIndex corner_id(start_corner_id);
  118|  76.7k|    int num_parallelograms = 0;
  119|  76.7k|    bool first_pass = true;
  120|   486k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 462k, False: 24.8k]
  ------------------
  121|   462k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 126k, False: 335k]
  ------------------
  122|   462k|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|   462k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|   126k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|   126k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 280, False: 126k]
  ------------------
  130|    280|          break;
  131|    280|        }
  132|   126k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|   461k|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 398k, False: 63.3k]
  ------------------
  137|   398k|        corner_id = table->SwingLeft(corner_id);
  138|   398k|      } else {
  139|  63.3k|        corner_id = table->SwingRight(corner_id);
  140|  63.3k|      }
  141|   461k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 51.6k, False: 410k]
  ------------------
  142|  51.6k|        break;
  143|  51.6k|      }
  144|   410k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 47.9k, False: 362k]
  |  Branch (144:47): [True: 24.8k, False: 23.0k]
  ------------------
  145|  24.8k|        first_pass = false;
  146|  24.8k|        corner_id = table->SwingRight(start_corner_id);
  147|  24.8k|      }
  148|   410k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|  76.7k|    int num_used_parallelograms = 0;
  153|  76.7k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 75.7k, False: 1.02k]
  ------------------
  154|  8.53M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 8.45M, False: 75.7k]
  ------------------
  155|  8.45M|        multi_pred_vals[i] = 0;
  156|  8.45M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   202k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 126k, False: 75.7k]
  ------------------
  159|   126k|        const int context = num_parallelograms - 1;
  160|   126k|        const int pos = is_crease_edge_pos[context]++;
  161|   126k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 67, False: 126k]
  ------------------
  162|     67|          return false;
  163|     67|        }
  164|   126k|        const bool is_crease = is_crease_edge_[context][pos];
  165|   126k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 6.94k, False: 119k]
  ------------------
  166|  6.94k|          ++num_used_parallelograms;
  167|   172k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 165k, False: 6.94k]
  ------------------
  168|   165k|            multi_pred_vals[j] =
  169|   165k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   165k|          }
  171|  6.94k|        }
  172|   126k|      }
  173|  75.7k|    }
  174|  76.7k|    const int dst_offset = p * num_components;
  175|  76.7k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 72.7k, False: 4.01k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|  72.7k|      const int src_offset = (p - 1) * num_components;
  179|  72.7k|      this->transform().ComputeOriginalValue(
  180|  72.7k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|  72.7k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   138k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 134k, False: 4.01k]
  ------------------
  184|   134k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   134k|      }
  186|  4.01k|      this->transform().ComputeOriginalValue(
  187|  4.01k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  4.01k|    }
  189|  76.7k|  }
  190|    105|  return true;
  191|    172|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.28k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  2.28k|    mesh_ = mesh;
   39|  2.28k|    corner_table_ = table;
   40|  2.28k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.28k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.28k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  19.6M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  12.1M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  12.1M|    return vertex_to_data_map_;
   48|  12.1M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  7.65M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  7.65M|    return data_to_corner_map_;
   51|  7.65M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.35k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  2.35k|    mesh_ = mesh;
   39|  2.35k|    corner_table_ = table;
   40|  2.35k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.35k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.35k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  10.9M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  9.28M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  9.28M|    return vertex_to_data_map_;
   48|  9.28M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  1.96M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  1.96M|    return data_to_corner_map_;
   51|  1.96M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  2.28k|      : mesh_(nullptr),
   31|  2.28k|        corner_table_(nullptr),
   32|  2.28k|        vertex_to_data_map_(nullptr),
   33|  2.28k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  2.35k|      : mesh_(nullptr),
   31|  2.35k|        corner_table_(nullptr),
   32|  2.35k|        vertex_to_data_map_(nullptr),
   33|  2.35k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   763k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   239k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   855k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   204k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.04k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.04k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  11.8M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.07k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.07k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.11M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    119|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    119|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    134|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    134|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    108|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    108|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    142|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    142|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    238|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    119|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    119|    DRACO_DCHECK_EQ(i, 0);
   70|    119|    (void)i;
   71|    119|    return GeometryAttribute::POSITION;
   72|    119|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    119|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    119|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 119]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    119|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 119]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|    119|    predictor_.SetPositionAttribute(*att);
   82|    119|    return true;
   83|    119|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    119|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    119|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 5, False: 114]
  ------------------
  148|      5|    return false;
  149|      5|  }
  150|       |
  151|    114|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    114|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    114|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 44, False: 70]
  ------------------
  153|     44|    uint8_t prediction_mode;
  154|     44|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 43]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     43|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 42]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     42|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 42]
  ------------------
  163|     42|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     42|  }
  167|    112|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    112|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 1, False: 111]
  ------------------
  171|      1|    return false;
  172|      1|  }
  173|       |
  174|    111|  return true;
  175|    112|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    111|                                      const PointIndex* entry_to_point_id_map) {
  103|    111|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    111|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    111|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    111|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    111|  const int corner_map_size =
  111|    111|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    111|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 111]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    111|  VectorD<int32_t, 3> pred_normal_3d;
  117|    111|  int32_t pred_normal_oct[2];
  118|       |
  119|   763k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 763k, False: 111]
  ------------------
  120|   763k|    const CornerIndex corner_id =
  121|   763k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   763k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   763k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   763k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   763k|                    octahedron_tool_box_.center_value());
  128|   763k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 712k, False: 51.0k]
  ------------------
  129|   712k|      pred_normal_3d = -pred_normal_3d;
  130|   712k|    }
  131|   763k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   763k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   763k|    const int data_offset = data_id * 2;
  135|   763k|    this->transform().ComputeOriginalValue(
  136|   763k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   763k|  }
  138|    111|  flip_normal_bit_decoder_.EndDecoding();
  139|    111|  return true;
  140|    111|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    111|  void SetQuantizationBits(int q) {
   85|    111|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    111|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    268|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    134|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    134|    DRACO_DCHECK_EQ(i, 0);
   70|    134|    (void)i;
   71|    134|    return GeometryAttribute::POSITION;
   72|    134|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    134|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    134|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 134]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    134|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 134]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|    134|    predictor_.SetPositionAttribute(*att);
   82|    134|    return true;
   83|    134|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    134|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    134|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 2, False: 132]
  ------------------
  148|      2|    return false;
  149|      2|  }
  150|       |
  151|    132|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    132|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    132|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 44, False: 88]
  ------------------
  153|     44|    uint8_t prediction_mode;
  154|     44|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 43]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     43|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 42]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     42|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 42]
  ------------------
  163|     42|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     42|  }
  167|    130|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    130|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 8, False: 122]
  ------------------
  171|      8|    return false;
  172|      8|  }
  173|       |
  174|    122|  return true;
  175|    130|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    122|                                      const PointIndex* entry_to_point_id_map) {
  103|    122|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    122|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    122|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    122|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    122|  const int corner_map_size =
  111|    122|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    122|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 122]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    122|  VectorD<int32_t, 3> pred_normal_3d;
  117|    122|  int32_t pred_normal_oct[2];
  118|       |
  119|   239k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 239k, False: 122]
  ------------------
  120|   239k|    const CornerIndex corner_id =
  121|   239k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   239k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   239k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   239k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   239k|                    octahedron_tool_box_.center_value());
  128|   239k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 181k, False: 58.1k]
  ------------------
  129|   181k|      pred_normal_3d = -pred_normal_3d;
  130|   181k|    }
  131|   239k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   239k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   239k|    const int data_offset = data_id * 2;
  135|   239k|    this->transform().ComputeOriginalValue(
  136|   239k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   239k|  }
  138|    122|  flip_normal_bit_decoder_.EndDecoding();
  139|    122|  return true;
  140|    122|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    122|  void SetQuantizationBits(int q) {
   85|    122|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    122|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    215|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    108|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    108|    DRACO_DCHECK_EQ(i, 0);
   70|    108|    (void)i;
   71|    108|    return GeometryAttribute::POSITION;
   72|    108|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    108|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    108|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 108]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    108|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 107]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    107|    predictor_.SetPositionAttribute(*att);
   82|    107|    return true;
   83|    108|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    107|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    107|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 5, False: 102]
  ------------------
  148|      5|    return false;
  149|      5|  }
  150|       |
  151|    102|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    102|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    102|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 27, False: 75]
  ------------------
  153|     27|    uint8_t prediction_mode;
  154|     27|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 26]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     26|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 5, False: 21]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      5|      return false;
  160|      5|    }
  161|       |
  162|     21|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 21]
  ------------------
  163|     21|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     21|  }
  167|     96|#endif
  168|       |
  169|       |  // Init normal flips.
  170|     96|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 5, False: 91]
  ------------------
  171|      5|    return false;
  172|      5|  }
  173|       |
  174|     91|  return true;
  175|     96|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|     91|                                      const PointIndex* entry_to_point_id_map) {
  103|     91|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|     91|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|     91|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|     91|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|     91|  const int corner_map_size =
  111|     91|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|     91|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 91]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|     91|  VectorD<int32_t, 3> pred_normal_3d;
  117|     91|  int32_t pred_normal_oct[2];
  118|       |
  119|   855k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 855k, False: 91]
  ------------------
  120|   855k|    const CornerIndex corner_id =
  121|   855k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   855k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   855k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   855k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   855k|                    octahedron_tool_box_.center_value());
  128|   855k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 613k, False: 241k]
  ------------------
  129|   613k|      pred_normal_3d = -pred_normal_3d;
  130|   613k|    }
  131|   855k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   855k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   855k|    const int data_offset = data_id * 2;
  135|   855k|    this->transform().ComputeOriginalValue(
  136|   855k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   855k|  }
  138|     91|  flip_normal_bit_decoder_.EndDecoding();
  139|     91|  return true;
  140|     91|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|     91|  void SetQuantizationBits(int q) {
   85|     91|    octahedron_tool_box_.SetQuantizationBits(q);
   86|     91|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    281|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    142|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    142|    DRACO_DCHECK_EQ(i, 0);
   70|    142|    (void)i;
   71|    142|    return GeometryAttribute::POSITION;
   72|    142|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    142|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    142|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 142]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    142|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 139]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    139|    predictor_.SetPositionAttribute(*att);
   82|    139|    return true;
   83|    142|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    139|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    139|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 3, False: 136]
  ------------------
  148|      3|    return false;
  149|      3|  }
  150|       |
  151|    136|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    136|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    136|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 46, False: 90]
  ------------------
  153|     46|    uint8_t prediction_mode;
  154|     46|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 45]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     45|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 4, False: 41]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      4|      return false;
  160|      4|    }
  161|       |
  162|     41|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 41]
  ------------------
  163|     41|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     41|  }
  167|    131|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    131|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 3, False: 128]
  ------------------
  171|      3|    return false;
  172|      3|  }
  173|       |
  174|    128|  return true;
  175|    131|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    128|                                      const PointIndex* entry_to_point_id_map) {
  103|    128|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    128|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    128|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    128|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    128|  const int corner_map_size =
  111|    128|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    128|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 128]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    128|  VectorD<int32_t, 3> pred_normal_3d;
  117|    128|  int32_t pred_normal_oct[2];
  118|       |
  119|   204k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 204k, False: 128]
  ------------------
  120|   204k|    const CornerIndex corner_id =
  121|   204k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   204k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   204k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   204k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   204k|                    octahedron_tool_box_.center_value());
  128|   204k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 182k, False: 21.6k]
  ------------------
  129|   182k|      pred_normal_3d = -pred_normal_3d;
  130|   182k|    }
  131|   204k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   204k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   204k|    const int data_offset = data_id * 2;
  135|   204k|    this->transform().ComputeOriginalValue(
  136|   204k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   204k|  }
  138|    128|  flip_normal_bit_decoder_.EndDecoding();
  139|    128|  return true;
  140|    128|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    128|  void SetQuantizationBits(int q) {
   85|    128|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    128|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    360|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    360|            attribute, transform, mesh_data),
   37|    360|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    720|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    360|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    360|    DRACO_DCHECK_EQ(i, 0);
   70|    360|    (void)i;
   71|    360|    return GeometryAttribute::POSITION;
   72|    360|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    360|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    360|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 360]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    360|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 360]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|    360|    predictor_.SetPositionAttribute(*att);
   82|    360|    return true;
   83|    360|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    359|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    359|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 9, False: 350]
  ------------------
  148|      9|    return false;
  149|      9|  }
  150|       |
  151|    350|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    350|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    350|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 235, False: 115]
  ------------------
  153|    235|    uint8_t prediction_mode;
  154|    235|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 234]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    234|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 3, False: 231]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      3|      return false;
  160|      3|    }
  161|       |
  162|    231|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 231]
  ------------------
  163|    231|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    231|  }
  167|    346|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    346|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 15, False: 331]
  ------------------
  171|     15|    return false;
  172|     15|  }
  173|       |
  174|    331|  return true;
  175|    346|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    331|                                      const PointIndex* entry_to_point_id_map) {
  103|    331|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    331|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    331|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    331|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    331|  const int corner_map_size =
  111|    331|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    331|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 331]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    331|  VectorD<int32_t, 3> pred_normal_3d;
  117|    331|  int32_t pred_normal_oct[2];
  118|       |
  119|   257k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 256k, False: 331]
  ------------------
  120|   256k|    const CornerIndex corner_id =
  121|   256k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   256k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   256k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   256k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   256k|                    octahedron_tool_box_.center_value());
  128|   256k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 211k, False: 45.6k]
  ------------------
  129|   211k|      pred_normal_3d = -pred_normal_3d;
  130|   211k|    }
  131|   256k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   256k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   256k|    const int data_offset = data_id * 2;
  135|   256k|    this->transform().ComputeOriginalValue(
  136|   256k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   256k|  }
  138|    331|  flip_normal_bit_decoder_.EndDecoding();
  139|    331|  return true;
  140|    331|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    331|  void SetQuantizationBits(int q) {
   85|    331|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    331|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    418|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    418|            attribute, transform, mesh_data),
   37|    418|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    836|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    418|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    418|    DRACO_DCHECK_EQ(i, 0);
   70|    418|    (void)i;
   71|    418|    return GeometryAttribute::POSITION;
   72|    418|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    418|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    418|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 418]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    418|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 418]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|    418|    predictor_.SetPositionAttribute(*att);
   82|    418|    return true;
   83|    418|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    416|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    416|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 29, False: 387]
  ------------------
  148|     29|    return false;
  149|     29|  }
  150|       |
  151|    387|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    387|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    387|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 160, False: 227]
  ------------------
  153|    160|    uint8_t prediction_mode;
  154|    160|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 159]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    159|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 158]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|    158|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 158]
  ------------------
  163|    158|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    158|  }
  167|    385|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    385|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 17, False: 368]
  ------------------
  171|     17|    return false;
  172|     17|  }
  173|       |
  174|    368|  return true;
  175|    385|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    368|                                      const PointIndex* entry_to_point_id_map) {
  103|    368|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    368|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    368|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    368|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    368|  const int corner_map_size =
  111|    368|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    368|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 368]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    368|  VectorD<int32_t, 3> pred_normal_3d;
  117|    368|  int32_t pred_normal_oct[2];
  118|       |
  119|   200k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 200k, False: 368]
  ------------------
  120|   200k|    const CornerIndex corner_id =
  121|   200k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   200k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   200k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   200k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   200k|                    octahedron_tool_box_.center_value());
  128|   200k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 187k, False: 12.3k]
  ------------------
  129|   187k|      pred_normal_3d = -pred_normal_3d;
  130|   187k|    }
  131|   200k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   200k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   200k|    const int data_offset = data_id * 2;
  135|   200k|    this->transform().ComputeOriginalValue(
  136|   200k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   200k|  }
  138|    368|  flip_normal_bit_decoder_.EndDecoding();
  139|    368|  return true;
  140|    368|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    368|  void SetQuantizationBits(int q) {
   85|    368|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    368|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    119|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    119|            attribute, transform, mesh_data),
   37|    119|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    134|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    134|            attribute, transform, mesh_data),
   37|    134|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    108|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    108|            attribute, transform, mesh_data),
   37|    108|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    142|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    142|            attribute, transform, mesh_data),
   37|    142|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    161|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    161|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 40, False: 121]
  ------------------
  105|     40|      this->normal_prediction_mode_ = mode;
  106|     40|      return true;
  107|    121|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 121, False: 0]
  ------------------
  108|    121|      this->normal_prediction_mode_ = mode;
  109|    121|      return true;
  110|    121|    }
  111|      0|    return false;
  112|    161|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   763k|                             DataTypeT* prediction) override {
   42|   763k|    DRACO_DCHECK(this->IsInitialized());
   43|   763k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   763k|    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|   763k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   763k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   763k|    VectorD<int64_t, 3> normal;
   53|   763k|    CornerIndex c_next, c_prev;
   54|  1.56M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 802k, False: 763k]
  ------------------
   55|       |      // Getting corners.
   56|   802k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 240, False: 802k]
  ------------------
   57|    240|        c_next = corner_table->Next(corner_id);
   58|    240|        c_prev = corner_table->Previous(corner_id);
   59|   802k|      } else {
   60|   802k|        c_next = corner_table->Next(cit.Corner());
   61|   802k|        c_prev = corner_table->Previous(cit.Corner());
   62|   802k|      }
   63|   802k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   802k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   802k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   802k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   802k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   802k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   802k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   802k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   802k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   802k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   802k|      cit.Next();
   81|   802k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   763k|    constexpr int64_t upper_bound = 1 << 29;
   85|   763k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 160, False: 763k]
  ------------------
   86|    160|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    160|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 45, False: 115]
  ------------------
   88|     45|        const int64_t quotient = abs_sum / upper_bound;
   89|     45|        normal = normal / quotient;
   90|     45|      }
   91|   763k|    } else {
   92|   763k|      const int64_t abs_sum = normal.AbsSum();
   93|   763k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.96k, False: 761k]
  ------------------
   94|  1.96k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.96k|        normal = normal / quotient;
   96|  1.96k|      }
   97|   763k|    }
   98|   763k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   763k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   763k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   763k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   763k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    176|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    176|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 41, False: 135]
  ------------------
  105|     41|      this->normal_prediction_mode_ = mode;
  106|     41|      return true;
  107|    135|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 135, False: 0]
  ------------------
  108|    135|      this->normal_prediction_mode_ = mode;
  109|    135|      return true;
  110|    135|    }
  111|      0|    return false;
  112|    176|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   239k|                             DataTypeT* prediction) override {
   42|   239k|    DRACO_DCHECK(this->IsInitialized());
   43|   239k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   239k|    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|   239k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   239k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   239k|    VectorD<int64_t, 3> normal;
   53|   239k|    CornerIndex c_next, c_prev;
   54|  1.66M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.42M, False: 239k]
  ------------------
   55|       |      // Getting corners.
   56|  1.42M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 198, False: 1.42M]
  ------------------
   57|    198|        c_next = corner_table->Next(corner_id);
   58|    198|        c_prev = corner_table->Previous(corner_id);
   59|  1.42M|      } else {
   60|  1.42M|        c_next = corner_table->Next(cit.Corner());
   61|  1.42M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.42M|      }
   63|  1.42M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.42M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.42M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.42M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.42M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.42M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.42M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.42M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.42M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.42M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.42M|      cit.Next();
   81|  1.42M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   239k|    constexpr int64_t upper_bound = 1 << 29;
   85|   239k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 132, False: 239k]
  ------------------
   86|    132|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    132|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 45, False: 87]
  ------------------
   88|     45|        const int64_t quotient = abs_sum / upper_bound;
   89|     45|        normal = normal / quotient;
   90|     45|      }
   91|   239k|    } else {
   92|   239k|      const int64_t abs_sum = normal.AbsSum();
   93|   239k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 109k, False: 130k]
  ------------------
   94|   109k|        const int64_t quotient = abs_sum / upper_bound;
   95|   109k|        normal = normal / quotient;
   96|   109k|      }
   97|   239k|    }
   98|   239k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   239k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   239k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   239k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   239k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    129|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    129|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 19, False: 110]
  ------------------
  105|     19|      this->normal_prediction_mode_ = mode;
  106|     19|      return true;
  107|    110|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 110, False: 0]
  ------------------
  108|    110|      this->normal_prediction_mode_ = mode;
  109|    110|      return true;
  110|    110|    }
  111|      0|    return false;
  112|    129|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   855k|                             DataTypeT* prediction) override {
   42|   855k|    DRACO_DCHECK(this->IsInitialized());
   43|   855k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   855k|    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|   855k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   855k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   855k|    VectorD<int64_t, 3> normal;
   53|   855k|    CornerIndex c_next, c_prev;
   54|  1.75M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 900k, False: 855k]
  ------------------
   55|       |      // Getting corners.
   56|   900k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 108, False: 900k]
  ------------------
   57|    108|        c_next = corner_table->Next(corner_id);
   58|    108|        c_prev = corner_table->Previous(corner_id);
   59|   900k|      } else {
   60|   900k|        c_next = corner_table->Next(cit.Corner());
   61|   900k|        c_prev = corner_table->Previous(cit.Corner());
   62|   900k|      }
   63|   900k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   900k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   900k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   900k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   900k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   900k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   900k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   900k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   900k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   900k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   900k|      cit.Next();
   81|   900k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   855k|    constexpr int64_t upper_bound = 1 << 29;
   85|   855k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 72, False: 855k]
  ------------------
   86|     72|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     72|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 23, False: 49]
  ------------------
   88|     23|        const int64_t quotient = abs_sum / upper_bound;
   89|     23|        normal = normal / quotient;
   90|     23|      }
   91|   855k|    } else {
   92|   855k|      const int64_t abs_sum = normal.AbsSum();
   93|   855k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.16k, False: 853k]
  ------------------
   94|  1.16k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.16k|        normal = normal / quotient;
   96|  1.16k|      }
   97|   855k|    }
   98|   855k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   855k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   855k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   855k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   855k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    183|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    183|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 40, False: 143]
  ------------------
  105|     40|      this->normal_prediction_mode_ = mode;
  106|     40|      return true;
  107|    143|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 143, False: 0]
  ------------------
  108|    143|      this->normal_prediction_mode_ = mode;
  109|    143|      return true;
  110|    143|    }
  111|      0|    return false;
  112|    183|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   204k|                             DataTypeT* prediction) override {
   42|   204k|    DRACO_DCHECK(this->IsInitialized());
   43|   204k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   204k|    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|   204k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   204k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   204k|    VectorD<int64_t, 3> normal;
   53|   204k|    CornerIndex c_next, c_prev;
   54|  1.41M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 204k]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 240, False: 1.21M]
  ------------------
   57|    240|        c_next = corner_table->Next(corner_id);
   58|    240|        c_prev = corner_table->Previous(corner_id);
   59|  1.21M|      } else {
   60|  1.21M|        c_next = corner_table->Next(cit.Corner());
   61|  1.21M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.21M|      }
   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|   204k|    constexpr int64_t upper_bound = 1 << 29;
   85|   204k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 160, False: 204k]
  ------------------
   86|    160|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    160|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 39, False: 121]
  ------------------
   88|     39|        const int64_t quotient = abs_sum / upper_bound;
   89|     39|        normal = normal / quotient;
   90|     39|      }
   91|   204k|    } else {
   92|   204k|      const int64_t abs_sum = normal.AbsSum();
   93|   204k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 57.5k, False: 146k]
  ------------------
   94|  57.5k|        const int64_t quotient = abs_sum / upper_bound;
   95|  57.5k|        normal = normal / quotient;
   96|  57.5k|      }
   97|   204k|    }
   98|   204k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   204k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   204k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   204k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   204k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    360|      : Base(md) {
   35|    360|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    360|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    591|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    591|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 219, False: 372]
  ------------------
  105|    219|      this->normal_prediction_mode_ = mode;
  106|    219|      return true;
  107|    372|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 372, False: 0]
  ------------------
  108|    372|      this->normal_prediction_mode_ = mode;
  109|    372|      return true;
  110|    372|    }
  111|      0|    return false;
  112|    591|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   256k|                             DataTypeT* prediction) override {
   42|   256k|    DRACO_DCHECK(this->IsInitialized());
   43|   256k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   256k|    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|   256k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   256k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   256k|    VectorD<int64_t, 3> normal;
   53|   256k|    CornerIndex c_next, c_prev;
   54|   929k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 672k, False: 256k]
  ------------------
   55|       |      // Getting corners.
   56|   672k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 430k, False: 242k]
  ------------------
   57|   430k|        c_next = corner_table->Next(corner_id);
   58|   430k|        c_prev = corner_table->Previous(corner_id);
   59|   430k|      } else {
   60|   242k|        c_next = corner_table->Next(cit.Corner());
   61|   242k|        c_prev = corner_table->Previous(cit.Corner());
   62|   242k|      }
   63|   672k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   672k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   672k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   672k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   672k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   672k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   672k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   672k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   672k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   672k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   672k|      cit.Next();
   81|   672k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   256k|    constexpr int64_t upper_bound = 1 << 29;
   85|   256k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 72.8k, False: 183k]
  ------------------
   86|  72.8k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  72.8k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 593, False: 72.2k]
  ------------------
   88|    593|        const int64_t quotient = abs_sum / upper_bound;
   89|    593|        normal = normal / quotient;
   90|    593|      }
   91|   183k|    } else {
   92|   183k|      const int64_t abs_sum = normal.AbsSum();
   93|   183k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.00k, False: 181k]
  ------------------
   94|  2.00k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.00k|        normal = normal / quotient;
   96|  2.00k|      }
   97|   183k|    }
   98|   256k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   256k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   256k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   256k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   256k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    418|      : Base(md) {
   35|    418|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    418|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    576|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    576|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 147, False: 429]
  ------------------
  105|    147|      this->normal_prediction_mode_ = mode;
  106|    147|      return true;
  107|    429|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 429, False: 0]
  ------------------
  108|    429|      this->normal_prediction_mode_ = mode;
  109|    429|      return true;
  110|    429|    }
  111|      0|    return false;
  112|    576|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   200k|                             DataTypeT* prediction) override {
   42|   200k|    DRACO_DCHECK(this->IsInitialized());
   43|   200k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   200k|    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|   200k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   200k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   200k|    VectorD<int64_t, 3> normal;
   53|   200k|    CornerIndex c_next, c_prev;
   54|  1.36M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.16M, False: 200k]
  ------------------
   55|       |      // Getting corners.
   56|  1.16M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 451k, False: 713k]
  ------------------
   57|   451k|        c_next = corner_table->Next(corner_id);
   58|   451k|        c_prev = corner_table->Previous(corner_id);
   59|   713k|      } else {
   60|   713k|        c_next = corner_table->Next(cit.Corner());
   61|   713k|        c_prev = corner_table->Previous(cit.Corner());
   62|   713k|      }
   63|  1.16M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.16M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.16M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.16M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.16M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.16M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.16M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.16M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.16M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.16M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.16M|      cit.Next();
   81|  1.16M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   200k|    constexpr int64_t upper_bound = 1 << 29;
   85|   200k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 76.2k, False: 123k]
  ------------------
   86|  76.2k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  76.2k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 432, False: 75.8k]
  ------------------
   88|    432|        const int64_t quotient = abs_sum / upper_bound;
   89|    432|        normal = normal / quotient;
   90|    432|      }
   91|   123k|    } else {
   92|   123k|      const int64_t abs_sum = normal.AbsSum();
   93|   123k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.85k, False: 119k]
  ------------------
   94|  3.85k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.85k|        normal = normal / quotient;
   96|  3.85k|      }
   97|   123k|    }
   98|   200k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   200k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   200k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   200k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   200k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    119|      : Base(md) {
   35|    119|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    119|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    134|      : Base(md) {
   35|    134|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    134|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    108|      : Base(md) {
   35|    108|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    108|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    142|      : Base(md) {
   35|    142|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    142|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.36M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.36M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.36M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.36M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.36M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.36M|    return GetPositionForDataId(data_id);
   77|  2.36M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.36M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.36M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.36M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.36M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.36M|    VectorD<int64_t, 3> pos;
   68|  2.36M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.36M|    return pos;
   70|  2.36M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    119|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    119|    pos_attribute_ = &position_attribute;
   43|    119|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    111|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    111|    entry_to_point_id_map_ = map;
   46|    111|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.09M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.09M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.09M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.09M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.09M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.09M|    return GetPositionForDataId(data_id);
   77|  3.09M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.09M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.09M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.09M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.09M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.09M|    VectorD<int64_t, 3> pos;
   68|  3.09M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.09M|    return pos;
   70|  3.09M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    134|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    134|    pos_attribute_ = &position_attribute;
   43|    134|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    122|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    122|    entry_to_point_id_map_ = map;
   46|    122|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.65M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.65M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.65M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.65M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.65M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.65M|    return GetPositionForDataId(data_id);
   77|  2.65M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.65M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.65M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.65M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.65M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.65M|    VectorD<int64_t, 3> pos;
   68|  2.65M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.65M|    return pos;
   70|  2.65M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    107|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    107|    pos_attribute_ = &position_attribute;
   43|    107|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|     91|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|     91|    entry_to_point_id_map_ = map;
   46|     91|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.63M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.63M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.63M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.63M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.63M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.63M|    return GetPositionForDataId(data_id);
   77|  2.63M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.63M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.63M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.63M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.63M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.63M|    VectorD<int64_t, 3> pos;
   68|  2.63M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.63M|    return pos;
   70|  2.63M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    139|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    139|    pos_attribute_ = &position_attribute;
   43|    139|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    128|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    128|    entry_to_point_id_map_ = map;
   46|    128|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    360|      : pos_attribute_(nullptr),
   36|    360|        entry_to_point_id_map_(nullptr),
   37|    360|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    360|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  1.60M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  1.60M|    DRACO_DCHECK(this->IsInitialized());
   73|  1.60M|    const auto corner_table = mesh_data_.corner_table();
   74|  1.60M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  1.60M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  1.60M|    return GetPositionForDataId(data_id);
   77|  1.60M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  1.60M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  1.60M|    DRACO_DCHECK(this->IsInitialized());
   65|  1.60M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  1.60M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  1.60M|    VectorD<int64_t, 3> pos;
   68|  1.60M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  1.60M|    return pos;
   70|  1.60M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    360|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    360|    pos_attribute_ = &position_attribute;
   43|    360|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    331|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    331|    entry_to_point_id_map_ = map;
   46|    331|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    418|      : pos_attribute_(nullptr),
   36|    418|        entry_to_point_id_map_(nullptr),
   37|    418|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    418|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.52M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.52M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.52M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.52M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.52M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.52M|    return GetPositionForDataId(data_id);
   77|  2.52M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.52M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.52M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.52M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.52M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.52M|    VectorD<int64_t, 3> pos;
   68|  2.52M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.52M|    return pos;
   70|  2.52M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    418|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    418|    pos_attribute_ = &position_attribute;
   43|    418|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    368|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    368|    entry_to_point_id_map_ = map;
   46|    368|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    119|      : pos_attribute_(nullptr),
   36|    119|        entry_to_point_id_map_(nullptr),
   37|    119|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    119|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    134|      : pos_attribute_(nullptr),
   36|    134|        entry_to_point_id_map_(nullptr),
   37|    134|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    134|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    108|      : pos_attribute_(nullptr),
   36|    108|        entry_to_point_id_map_(nullptr),
   37|    108|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    108|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    142|      : pos_attribute_(nullptr),
   36|    142|        entry_to_point_id_map_(nullptr),
   37|    142|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    142|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    199|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    199|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    192|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    192|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    192|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    192|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    192|      new DataTypeT[num_components]());
   70|       |
   71|    192|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    192|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    192|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    192|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    192|  const int corner_map_size =
   78|    192|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    192|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 192]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  1.55M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 1.55M, False: 192]
  ------------------
   83|  1.55M|    const CornerIndex start_corner_id =
   84|  1.55M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  1.55M|    CornerIndex corner_id(start_corner_id);
   87|  1.55M|    int num_parallelograms = 0;
   88|  10.5M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 8.97M, False: 1.55M]
  ------------------
   89|  8.97M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  8.97M|    }
   91|  3.23M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 1.68M, False: 1.55M]
  ------------------
   92|  1.68M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 55.5k, False: 1.62M]
  ------------------
   93|  1.68M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  1.68M|              num_components, parallelogram_pred_vals.get())) {
   95|  1.63M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 1.58M, False: 55.5k]
  ------------------
   96|  1.58M|          pred_vals[c] =
   97|  1.58M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  1.58M|        }
   99|  55.5k|        ++num_parallelograms;
  100|  55.5k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  1.68M|      corner_id = table->SwingRight(corner_id);
  104|  1.68M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 23.6k, False: 1.66M]
  ------------------
  105|  23.6k|        corner_id = kInvalidCornerIndex;
  106|  23.6k|      }
  107|  1.68M|    }
  108|       |
  109|  1.55M|    const int dst_offset = p * num_components;
  110|  1.55M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 1.52M, False: 32.5k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  1.52M|      const int src_offset = (p - 1) * num_components;
  114|  1.52M|      this->transform().ComputeOriginalValue(
  115|  1.52M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  1.52M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|   888k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 856k, False: 32.5k]
  ------------------
  119|   856k|        pred_vals[c] /= num_parallelograms;
  120|   856k|      }
  121|  32.5k|      this->transform().ComputeOriginalValue(
  122|  32.5k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|  32.5k|    }
  124|  1.55M|  }
  125|    192|  return true;
  126|    192|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    490|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    490|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    461|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    461|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    461|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    461|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    461|      new DataTypeT[num_components]());
   70|       |
   71|    461|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    461|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    461|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    461|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    461|  const int corner_map_size =
   78|    461|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    461|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 461]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|   370k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 369k, False: 461]
  ------------------
   83|   369k|    const CornerIndex start_corner_id =
   84|   369k|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|   369k|    CornerIndex corner_id(start_corner_id);
   87|   369k|    int num_parallelograms = 0;
   88|  10.0M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 9.63M, False: 369k]
  ------------------
   89|  9.63M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  9.63M|    }
   91|  2.54M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 2.17M, False: 369k]
  ------------------
   92|  2.17M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 713k, False: 1.46M]
  ------------------
   93|  2.17M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  2.17M|              num_components, parallelogram_pred_vals.get())) {
   95|  19.5M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 18.7M, False: 713k]
  ------------------
   96|  18.7M|          pred_vals[c] =
   97|  18.7M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  18.7M|        }
   99|   713k|        ++num_parallelograms;
  100|   713k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  2.17M|      corner_id = table->SwingRight(corner_id);
  104|  2.17M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 361k, False: 1.81M]
  ------------------
  105|   361k|        corner_id = kInvalidCornerIndex;
  106|   361k|      }
  107|  2.17M|    }
  108|       |
  109|   369k|    const int dst_offset = p * num_components;
  110|   369k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 1.81k, False: 367k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  1.81k|      const int src_offset = (p - 1) * num_components;
  114|  1.81k|      this->transform().ComputeOriginalValue(
  115|  1.81k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|   367k|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  9.96M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 9.59M, False: 367k]
  ------------------
  119|  9.59M|        pred_vals[c] /= num_parallelograms;
  120|  9.59M|      }
  121|   367k|      this->transform().ComputeOriginalValue(
  122|   367k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   367k|    }
  124|   369k|  }
  125|    461|  return true;
  126|    461|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  3.23M|    int num_components, DataTypeT* out_prediction) {
   49|  3.23M|  const CornerIndex oci = table->Opposite(ci);
   50|  3.23M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 2.79M, False: 445k]
  ------------------
   51|  2.79M|    return false;
   52|  2.79M|  }
   53|   445k|  int vert_opp, vert_next, vert_prev;
   54|   445k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|   445k|                                        &vert_opp, &vert_next, &vert_prev);
   56|   445k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 299k, False: 145k]
  |  Branch (56:35): [True: 263k, False: 35.8k]
  ------------------
   57|   263k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 256k, False: 7.00k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   256k|    const int v_opp_off = vert_opp * num_components;
   60|   256k|    const int v_next_off = vert_next * num_components;
   61|   256k|    const int v_prev_off = vert_prev * num_components;
   62|  8.74M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 8.48M, False: 256k]
  ------------------
   63|  8.48M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  8.48M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  8.48M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  8.48M|      const int64_t result =
   67|  8.48M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  8.48M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  8.48M|    }
   71|   256k|    return true;
   72|   256k|  }
   73|   188k|  return false;  // Not all data is available for prediction
   74|   445k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|   445k|    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|   445k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|   445k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|   445k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|   445k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  2.99M|    int num_components, DataTypeT* out_prediction) {
   49|  2.99M|  const CornerIndex oci = table->Opposite(ci);
   50|  2.99M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 31.4k, False: 2.96M]
  ------------------
   51|  31.4k|    return false;
   52|  31.4k|  }
   53|  2.96M|  int vert_opp, vert_next, vert_prev;
   54|  2.96M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  2.96M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  2.96M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 1.63M, False: 1.33M]
  |  Branch (56:35): [True: 1.29M, False: 333k]
  ------------------
   57|  1.29M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 1.19M, False: 103k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  1.19M|    const int v_opp_off = vert_opp * num_components;
   60|  1.19M|    const int v_next_off = vert_next * num_components;
   61|  1.19M|    const int v_prev_off = vert_prev * num_components;
   62|  40.5M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 39.3M, False: 1.19M]
  ------------------
   63|  39.3M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  39.3M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  39.3M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  39.3M|      const int64_t result =
   67|  39.3M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  39.3M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  39.3M|    }
   71|  1.19M|    return true;
   72|  1.19M|  }
   73|  1.77M|  return false;  // Not all data is available for prediction
   74|  2.96M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  2.96M|    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|  2.96M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  2.96M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  2.96M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  2.96M|}

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

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    345|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    345|            attribute, transform, mesh_data),
   40|    345|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   62|    689|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   64|    345|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    345|    DRACO_DCHECK_EQ(i, 0);
   66|    345|    (void)i;
   67|    345|    return GeometryAttribute::POSITION;
   68|    345|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    344|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    344|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 344]
  |  Branch (71:17): [True: 0, False: 344]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    344|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 0, False: 344]
  ------------------
   75|      0|      return false;  // Currently works only for 3 component positions.
   76|      0|    }
   77|    344|    predictor_.SetPositionAttribute(*att);
   78|    344|    return true;
   79|    344|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    336|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    336|  int32_t num_orientations = 0;
  131|    336|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 0, False: 336]
  |  Branch (131:45): [True: 13, False: 323]
  ------------------
  132|     13|    return false;
  133|     13|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    323|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    323|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 323, False: 0]
  |  Branch (137:37): [True: 21, False: 302]
  ------------------
  138|     21|    return false;
  139|     21|  }
  140|       |
  141|    302|  predictor_.ResizeOrientations(num_orientations);
  142|    302|  bool last_orientation = true;
  143|    302|  RAnsBitDecoder decoder;
  144|    302|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 1, False: 301]
  ------------------
  145|      1|    return false;
  146|      1|  }
  147|   511k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 511k, False: 301]
  ------------------
  148|   511k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 204k, False: 306k]
  ------------------
  149|   204k|      last_orientation = !last_orientation;
  150|   204k|    }
  151|   511k|    predictor_.set_orientation(i, last_orientation);
  152|   511k|  }
  153|    301|  decoder.EndDecoding();
  154|    301|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    301|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    302|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    336|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    336|    max_num_predicted_values_ = num;
   83|    336|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    274|                                      const PointIndex* entry_to_point_id_map) {
   98|    274|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 3, False: 271]
  ------------------
   99|    274|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|      3|    return false;
  101|      3|  }
  102|    271|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    271|  this->transform().Init(num_components);
  104|       |
  105|    271|  const int corner_map_size =
  106|    271|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    271|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 271]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|  1.81M|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 1.81M, False: 142]
  ------------------
  111|  1.81M|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|  1.81M|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 129, False: 1.81M]
  ------------------
  113|  1.81M|                                                          p)) {
  114|    129|      return false;
  115|    129|    }
  116|       |
  117|  1.81M|    const int dst_offset = p * num_components;
  118|  1.81M|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|  1.81M|                                           in_corr + dst_offset,
  120|  1.81M|                                           out_data + dst_offset);
  121|  1.81M|  }
  122|    142|  return true;
  123|    271|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    278|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    278|            attribute, transform, mesh_data),
   40|    278|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   62|    554|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   64|    278|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    278|    DRACO_DCHECK_EQ(i, 0);
   66|    278|    (void)i;
   67|    278|    return GeometryAttribute::POSITION;
   68|    278|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    278|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    278|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 278]
  |  Branch (71:17): [True: 0, False: 278]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    278|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 2, False: 276]
  ------------------
   75|      2|      return false;  // Currently works only for 3 component positions.
   76|      2|    }
   77|    276|    predictor_.SetPositionAttribute(*att);
   78|    276|    return true;
   79|    278|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    273|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    273|  int32_t num_orientations = 0;
  131|    273|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 0, False: 273]
  |  Branch (131:45): [True: 16, False: 257]
  ------------------
  132|     16|    return false;
  133|     16|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    257|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    257|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 257, False: 0]
  |  Branch (137:37): [True: 37, False: 220]
  ------------------
  138|     37|    return false;
  139|     37|  }
  140|       |
  141|    220|  predictor_.ResizeOrientations(num_orientations);
  142|    220|  bool last_orientation = true;
  143|    220|  RAnsBitDecoder decoder;
  144|    220|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 1, False: 219]
  ------------------
  145|      1|    return false;
  146|      1|  }
  147|   123k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 122k, False: 219]
  ------------------
  148|   122k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 17.4k, False: 105k]
  ------------------
  149|  17.4k|      last_orientation = !last_orientation;
  150|  17.4k|    }
  151|   122k|    predictor_.set_orientation(i, last_orientation);
  152|   122k|  }
  153|    219|  decoder.EndDecoding();
  154|    219|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    219|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    220|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    273|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    273|    max_num_predicted_values_ = num;
   83|    273|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    196|                                      const PointIndex* entry_to_point_id_map) {
   98|    196|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 1, False: 195]
  ------------------
   99|    196|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|      1|    return false;
  101|      1|  }
  102|    195|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    195|  this->transform().Init(num_components);
  104|       |
  105|    195|  const int corner_map_size =
  106|    195|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    195|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 195]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|   244k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 244k, False: 91]
  ------------------
  111|   244k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|   244k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 104, False: 244k]
  ------------------
  113|   244k|                                                          p)) {
  114|    104|      return false;
  115|    104|    }
  116|       |
  117|   244k|    const int dst_offset = p * num_components;
  118|   244k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|   244k|                                           in_corr + dst_offset,
  120|   244k|                                           out_data + dst_offset);
  121|   244k|  }
  122|     91|  return true;
  123|    195|}

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|    345|      : pos_attribute_(nullptr),
   39|    345|        entry_to_point_id_map_(nullptr),
   40|    345|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    344|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    344|    pos_attribute_ = &position_attribute;
   43|    344|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|    302|  void ResizeOrientations(int num_orientations) {
   74|    302|    orientations_.resize(num_orientations);
   75|    302|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|   511k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    271|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    271|    entry_to_point_id_map_ = map;
   46|    271|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|  1.81M|                                                 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|  1.81M|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|  1.81M|  const CornerIndex prev_corner_id =
   99|  1.81M|      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|  1.81M|  int next_data_id, prev_data_id;
  103|       |
  104|  1.81M|  int next_vert_id, prev_vert_id;
  105|  1.81M|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|  1.81M|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|  1.81M|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|  1.81M|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|  1.81M|  typedef VectorD<int64_t, 2> Vec2;
  112|  1.81M|  typedef VectorD<int64_t, 3> Vec3;
  113|  1.81M|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|  1.81M|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 1.24M, False: 573k]
  |  Branch (115:33): [True: 670k, False: 573k]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   670k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   670k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   670k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 607k, False: 62.9k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   607k|      predicted_value_[0] = p_uv[0];
  122|   607k|      predicted_value_[1] = p_uv[1];
  123|   607k|      return true;
  124|   607k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  62.9k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  62.9k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  62.9k|    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|  62.9k|    const Vec3 pn = prev_pos - next_pos;
  146|  62.9k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  62.9k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 2.31k, False: 60.6k]
  ------------------
  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|  2.31k|      const Vec3 cn = tip_pos - next_pos;
  153|  2.31k|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|  2.31k|      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|  2.31k|      const int64_t n_uv_absmax_element =
  164|  2.31k|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|  2.31k|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 54, False: 2.26k]
  ------------------
  166|  2.31k|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     54|        return false;
  169|     54|      }
  170|  2.26k|      const int64_t pn_uv_absmax_element =
  171|  2.26k|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|  2.26k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 47, False: 2.21k]
  ------------------
  173|  2.26k|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     47|        return false;
  176|     47|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|  2.21k|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|  2.21k|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|  2.21k|      const int64_t pn_absmax_element =
  181|  2.21k|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|  2.21k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 26, False: 2.18k]
  ------------------
  183|  2.21k|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|     26|        return false;
  186|     26|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|  2.18k|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|  2.18k|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  191|       |
  192|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  193|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  194|       |      //
  195|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  196|       |      //
  197|       |      // To preserve precision, we perform all operations in scaled space as
  198|       |      // explained above, so we want the final vector to be:
  199|       |      //
  200|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  201|       |      //
  202|       |      // We can then rewrite the formula as:
  203|       |      //
  204|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  205|       |      //
  206|  2.18k|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|  2.18k|      const uint64_t norm_squared =
  209|  2.18k|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|  2.18k|      cx_uv = cx_uv * norm_squared;
  212|       |
  213|       |      // Predicted uv coordinate is then computed by either adding or
  214|       |      // subtracting CX_UV to/from X_UV.
  215|  2.18k|      Vec2 predicted_uv;
  216|  2.18k|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 2.18k]
  ------------------
  217|       |        // When encoding, compute both possible vectors and determine which one
  218|       |        // results in a better prediction.
  219|       |        // Both vectors need to be transformed back from the scaled space to
  220|       |        // the real UV coordinate space.
  221|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  222|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  223|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  224|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (224:13): [True: 0, False: 0]
  ------------------
  225|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  226|      0|          predicted_uv = predicted_uv_0;
  227|      0|          orientations_.push_back(true);
  228|      0|        } else {
  229|      0|          predicted_uv = predicted_uv_1;
  230|      0|          orientations_.push_back(false);
  231|      0|        }
  232|  2.18k|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|  2.18k|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 2, False: 2.18k]
  ------------------
  235|      2|          return false;
  236|      2|        }
  237|  2.18k|        const bool orientation = orientations_.back();
  238|  2.18k|        orientations_.pop_back();
  239|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  240|       |        // Note that the result will be the same (for non-overflowing values).
  241|  2.18k|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 717, False: 1.46k]
  ------------------
  242|    717|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|  1.46k|        } else {
  244|  1.46k|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|  1.46k|        }
  246|  2.18k|      }
  247|  2.18k|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|  2.18k|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|  2.18k|      return true;
  250|  2.18k|    }
  251|  62.9k|  }
  252|       |  // Else we don't have available textures on both corners or the position data
  253|       |  // is invalid. For such cases we can't use positions for predicting the uv
  254|       |  // value and we resort to delta coding.
  255|  1.20M|  int data_offset = 0;
  256|  1.20M|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 634k, False: 573k]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|   634k|    data_offset = prev_data_id * kNumComponents;
  259|   634k|  }
  260|  1.20M|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 60.6k, False: 1.14M]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|  60.6k|    data_offset = next_data_id * kNumComponents;
  263|  1.14M|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|  1.14M|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 1.14M, False: 271]
  ------------------
  267|  1.14M|      data_offset = (data_id - 1) * kNumComponents;
  268|  1.14M|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|    813|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 542, False: 271]
  ------------------
  271|    542|        predicted_value_[i] = 0;
  272|    542|      }
  273|    271|      return true;
  274|    271|    }
  275|  1.14M|  }
  276|  3.62M|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 2.41M, False: 1.20M]
  ------------------
  277|  2.41M|    predicted_value_[i] = data[data_offset + i];
  278|  2.41M|  }
  279|  1.20M|  return true;
  280|  1.20M|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|  1.34M|                                            const DataTypeT* data) const {
   59|  1.34M|    const int data_offset = entry_id * kNumComponents;
   60|  1.34M|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|  1.34M|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|   188k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|   188k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|   188k|    VectorD<int64_t, 3> pos;
   52|   188k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|   188k|                                 &pos[0]);
   54|   188k|    return pos;
   55|   188k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|  1.81M|  const DataTypeT* predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|    278|      : pos_attribute_(nullptr),
   39|    278|        entry_to_point_id_map_(nullptr),
   40|    278|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    276|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    276|    pos_attribute_ = &position_attribute;
   43|    276|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|    220|  void ResizeOrientations(int num_orientations) {
   74|    220|    orientations_.resize(num_orientations);
   75|    220|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|   122k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    195|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    195|    entry_to_point_id_map_ = map;
   46|    195|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   244k|                                                 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|   244k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   244k|  const CornerIndex prev_corner_id =
   99|   244k|      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|   244k|  int next_data_id, prev_data_id;
  103|       |
  104|   244k|  int next_vert_id, prev_vert_id;
  105|   244k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   244k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   244k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   244k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   244k|  typedef VectorD<int64_t, 2> Vec2;
  112|   244k|  typedef VectorD<int64_t, 3> Vec3;
  113|   244k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   244k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 244k, False: 251]
  |  Branch (115:33): [True: 243k, False: 283]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   243k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   243k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   243k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 201k, False: 42.3k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   201k|      predicted_value_[0] = p_uv[0];
  122|   201k|      predicted_value_[1] = p_uv[1];
  123|   201k|      return true;
  124|   201k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  42.3k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  42.3k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  42.3k|    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|  42.3k|    const Vec3 pn = prev_pos - next_pos;
  146|  42.3k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  42.3k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 2.06k, False: 40.3k]
  ------------------
  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|  2.06k|      const Vec3 cn = tip_pos - next_pos;
  153|  2.06k|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|  2.06k|      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|  2.06k|      const int64_t n_uv_absmax_element =
  164|  2.06k|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|  2.06k|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 16, False: 2.04k]
  ------------------
  166|  2.06k|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     16|        return false;
  169|     16|      }
  170|  2.04k|      const int64_t pn_uv_absmax_element =
  171|  2.04k|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|  2.04k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 30, False: 2.01k]
  ------------------
  173|  2.04k|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     30|        return false;
  176|     30|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|  2.01k|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|  2.01k|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|  2.01k|      const int64_t pn_absmax_element =
  181|  2.01k|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|  2.01k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 11, False: 2.00k]
  ------------------
  183|  2.01k|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|     11|        return false;
  186|     11|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|  2.00k|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|  2.00k|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  191|       |
  192|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  193|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  194|       |      //
  195|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  196|       |      //
  197|       |      // To preserve precision, we perform all operations in scaled space as
  198|       |      // explained above, so we want the final vector to be:
  199|       |      //
  200|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  201|       |      //
  202|       |      // We can then rewrite the formula as:
  203|       |      //
  204|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  205|       |      //
  206|  2.00k|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|  2.00k|      const uint64_t norm_squared =
  209|  2.00k|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|  2.00k|      cx_uv = cx_uv * norm_squared;
  212|       |
  213|       |      // Predicted uv coordinate is then computed by either adding or
  214|       |      // subtracting CX_UV to/from X_UV.
  215|  2.00k|      Vec2 predicted_uv;
  216|  2.00k|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 2.00k]
  ------------------
  217|       |        // When encoding, compute both possible vectors and determine which one
  218|       |        // results in a better prediction.
  219|       |        // Both vectors need to be transformed back from the scaled space to
  220|       |        // the real UV coordinate space.
  221|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  222|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  223|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  224|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (224:13): [True: 0, False: 0]
  ------------------
  225|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  226|      0|          predicted_uv = predicted_uv_0;
  227|      0|          orientations_.push_back(true);
  228|      0|        } else {
  229|      0|          predicted_uv = predicted_uv_1;
  230|      0|          orientations_.push_back(false);
  231|      0|        }
  232|  2.00k|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|  2.00k|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 47, False: 1.95k]
  ------------------
  235|     47|          return false;
  236|     47|        }
  237|  1.95k|        const bool orientation = orientations_.back();
  238|  1.95k|        orientations_.pop_back();
  239|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  240|       |        // Note that the result will be the same (for non-overflowing values).
  241|  1.95k|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 885, False: 1.07k]
  ------------------
  242|    885|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|  1.07k|        } else {
  244|  1.07k|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|  1.07k|        }
  246|  1.95k|      }
  247|  1.95k|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|  1.95k|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|  1.95k|      return true;
  250|  2.00k|    }
  251|  42.3k|  }
  252|       |  // Else we don't have available textures on both corners or the position data
  253|       |  // is invalid. For such cases we can't use positions for predicting the uv
  254|       |  // value and we resort to delta coding.
  255|  40.8k|  int data_offset = 0;
  256|  40.8k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 40.6k, False: 251]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|  40.6k|    data_offset = prev_data_id * kNumComponents;
  259|  40.6k|  }
  260|  40.8k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 40.3k, False: 532]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|  40.3k|    data_offset = next_data_id * kNumComponents;
  263|  40.3k|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|    532|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 337, False: 195]
  ------------------
  267|    337|      data_offset = (data_id - 1) * kNumComponents;
  268|    337|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|    585|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 390, False: 195]
  ------------------
  271|    390|        predicted_value_[i] = 0;
  272|    390|      }
  273|    195|      return true;
  274|    195|    }
  275|    532|  }
  276|   121k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 81.3k, False: 40.6k]
  ------------------
  277|  81.3k|    predicted_value_[i] = data[data_offset + i];
  278|  81.3k|  }
  279|  40.6k|  return true;
  280|  40.8k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   487k|                                            const DataTypeT* data) const {
   59|   487k|    const int data_offset = entry_id * kNumComponents;
   60|   487k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   487k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|   127k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|   127k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|   127k|    VectorD<int64_t, 3> pos;
   52|   127k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|   127k|                                 &pos[0]);
   54|   127k|    return pos;
   55|   127k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|   244k|  const DataTypeT* predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     49|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    301|  bool AreCorrectionsPositive() override {
   71|    301|    return transform_.AreCorrectionsPositive();
   72|    301|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     48|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|     48|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 8, False: 40]
  ------------------
   50|      8|      return false;
   51|      8|    }
   52|     40|    return true;
   53|     48|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.02M|  inline Transform& transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     87|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    331|  bool AreCorrectionsPositive() override {
   71|    331|    return transform_.AreCorrectionsPositive();
   72|    331|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     85|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|     85|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 17, False: 68]
  ------------------
   50|     17|      return false;
   51|     17|    }
   52|     68|    return true;
   53|     85|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.45M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  4.29k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  2.49k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  4.15k|  bool AreCorrectionsPositive() override {
   71|  4.15k|    return transform_.AreCorrectionsPositive();
   72|  4.15k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  3.13k|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|  3.13k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 146, False: 2.99k]
  ------------------
   50|    146|      return false;
   51|    146|    }
   52|  2.99k|    return true;
   53|  3.13k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  9.71M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    302|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    337|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    302|                                 const PointCloudDecoder* decoder) {
  188|    302|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    302|      method, att_id, decoder, TransformT());
  190|    302|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    302|                                 const TransformT& transform) {
  156|    302|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 302]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    302|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    302|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 302, 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|    302|    const MeshDecoder* const mesh_decoder =
  167|    302|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    302|    auto ret = CreateMeshPredictionScheme<
  170|    302|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    302|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    302|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    302|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 253, False: 49]
  ------------------
  174|    253|      return ret;
  175|    253|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    302|  }
  178|       |  // Create delta decoder.
  179|     49|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     49|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    302|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    122|      uint16_t bitstream_version) {
  143|    122|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    122|        method, attribute, transform, mesh_data, bitstream_version);
  145|    122|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    122|        uint16_t bitstream_version) {
  127|    122|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 119, False: 3]
  ------------------
  128|    119|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    119|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    119|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    119|                                                  mesh_data));
  132|    119|      }
  133|      3|      return nullptr;
  134|    122|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    136|      uint16_t bitstream_version) {
  143|    136|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    136|        method, attribute, transform, mesh_data, bitstream_version);
  145|    136|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    136|        uint16_t bitstream_version) {
  127|    136|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 134, False: 2]
  ------------------
  128|    134|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    134|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    134|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    134|                                                  mesh_data));
  132|    134|      }
  133|      2|      return nullptr;
  134|    136|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    337|                                 const PointCloudDecoder* decoder) {
  188|    337|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    337|      method, att_id, decoder, TransformT());
  190|    337|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    337|                                 const TransformT& transform) {
  156|    337|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 337]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    337|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    337|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 337, 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|    337|    const MeshDecoder* const mesh_decoder =
  167|    337|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    337|    auto ret = CreateMeshPredictionScheme<
  170|    337|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    337|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    337|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    337|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 250, False: 87]
  ------------------
  174|    250|      return ret;
  175|    250|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    337|  }
  178|       |  // Create delta decoder.
  179|     87|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     87|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    337|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    117|      uint16_t bitstream_version) {
  143|    117|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    117|        method, attribute, transform, mesh_data, bitstream_version);
  145|    117|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    117|        uint16_t bitstream_version) {
  111|    117|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 108, False: 9]
  ------------------
  112|    108|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    108|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    108|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    108|                                                  mesh_data));
  116|    108|      }
  117|      9|      return nullptr;
  118|    117|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    149|      uint16_t bitstream_version) {
  143|    149|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    149|        method, attribute, transform, mesh_data, bitstream_version);
  145|    149|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    149|        uint16_t bitstream_version) {
  111|    149|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 142, False: 7]
  ------------------
  112|    142|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    142|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    142|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    142|                                                  mesh_data));
  116|    142|      }
  117|      7|      return nullptr;
  118|    149|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  4.29k|                                 const PointCloudDecoder* decoder) {
  188|  4.29k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  4.29k|      method, att_id, decoder, TransformT());
  190|  4.29k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  4.29k|                                 const TransformT& transform) {
  156|  4.29k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 4.29k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  4.29k|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|  4.29k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 4.29k, 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.29k|    const MeshDecoder* const mesh_decoder =
  167|  4.29k|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|  4.29k|    auto ret = CreateMeshPredictionScheme<
  170|  4.29k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  4.29k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  4.29k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  4.29k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 4.11k, False: 172]
  ------------------
  174|  4.11k|      return ret;
  175|  4.11k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  4.29k|  }
  178|       |  // Create delta decoder.
  179|    172|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    172|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  4.29k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.04k|      uint16_t bitstream_version) {
  143|  2.04k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.04k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.04k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.04k|        uint16_t bitstream_version) {
   53|  2.04k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 701, False: 1.34k]
  ------------------
   54|    701|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    701|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    701|                                                         MeshDataT>(
   57|    701|                attribute, transform, mesh_data));
   58|    701|      }
   59|  1.34k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.34k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 199, False: 1.14k]
  ------------------
   61|    199|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    199|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    199|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    199|                                                  mesh_data));
   65|    199|      }
   66|  1.14k|#endif
   67|  1.14k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 228, False: 920]
  ------------------
   68|    228|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    228|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    228|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    228|                                                  mesh_data));
   72|    228|      }
   73|    920|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    920|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 215, False: 705]
  ------------------
   75|    215|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    215|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    215|                                                     MeshDataT>(
   78|    215|                attribute, transform, mesh_data, bitstream_version));
   79|    215|      }
   80|    705|#endif
   81|    705|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 345, False: 360]
  ------------------
   82|    345|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    345|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    345|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    345|                                                  mesh_data));
   86|    345|      }
   87|    360|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    360|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 360, False: 0]
  ------------------
   89|    360|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    360|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    360|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    360|                                                  mesh_data));
   93|    360|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.04k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.07k|      uint16_t bitstream_version) {
  143|  2.07k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.07k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.07k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.07k|        uint16_t bitstream_version) {
   53|  2.07k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 448, False: 1.62k]
  ------------------
   54|    448|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    448|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    448|                                                         MeshDataT>(
   57|    448|                attribute, transform, mesh_data));
   58|    448|      }
   59|  1.62k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.62k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 490, False: 1.13k]
  ------------------
   61|    490|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    490|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    490|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    490|                                                  mesh_data));
   65|    490|      }
   66|  1.13k|#endif
   67|  1.13k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 253, False: 880]
  ------------------
   68|    253|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    253|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    253|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    253|                                                  mesh_data));
   72|    253|      }
   73|    880|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    880|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 184, False: 696]
  ------------------
   75|    184|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    184|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    184|                                                     MeshDataT>(
   78|    184|                attribute, transform, mesh_data, bitstream_version));
   79|    184|      }
   80|    696|#endif
   81|    696|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 278, False: 418]
  ------------------
   82|    278|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    278|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    278|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    278|                                                  mesh_data));
   86|    278|      }
   87|    418|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    418|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 418, False: 0]
  ------------------
   89|    418|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    418|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    418|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    418|                                                  mesh_data));
   93|    418|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.07k|    }

_ZN5draco32PredictionSchemeDecoderInterface24SetMaxNumPredictedValuesEi:
   38|  4.17k|  virtual void SetMaxNumPredictedValues(int32_t num) {};

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|     40|    const PointIndex*) {
   50|     40|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|     40|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|     40|  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|  24.7k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 24.7k, False: 40]
  ------------------
   57|  24.7k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  24.7k|                                           in_corr + i, out_data + i);
   59|  24.7k|  }
   60|     40|  return true;
   61|     40|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|     68|    const PointIndex*) {
   50|     68|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|     68|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|     68|  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|   395k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 395k, False: 68]
  ------------------
   57|   395k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   395k|                                           in_corr + i, out_data + i);
   59|   395k|  }
   60|     68|  return true;
   61|     68|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    172|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    148|    const PointIndex*) {
   50|    148|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    148|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    148|  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|  2.15M|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 2.15M, False: 148]
  ------------------
   57|  2.15M|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  2.15M|                                           in_corr + i, out_data + i);
   59|  2.15M|  }
   60|    148|  return true;
   61|    148|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|     49|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|     87|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    302|    uint16_t bitstream_version) {
   38|    302|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    302|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 302, False: 0]
  ------------------
   40|    302|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 20, False: 282]
  ------------------
   41|    282|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 0, False: 282]
  ------------------
   42|    282|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 2, False: 280]
  ------------------
   43|    280|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 3, False: 277]
  ------------------
   44|    277|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 253, False: 24]
  ------------------
   45|    299|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 21, False: 3]
  ------------------
   46|    299|    const CornerTable* const ct = source->GetCornerTable();
   47|    299|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    299|        source->GetAttributeEncodingData(att_id);
   49|    299|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 41, False: 258]
  |  Branch (49:26): [True: 0, False: 258]
  ------------------
   50|       |      // No connectivity data found.
   51|     41|      return nullptr;
   52|     41|    }
   53|       |    // Connectivity data exists.
   54|    258|    const MeshAttributeCornerTable* const att_ct =
   55|    258|        source->GetAttributeCornerTable(att_id);
   56|    258|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 122, False: 136]
  ------------------
   57|    122|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    122|      MeshData md;
   59|    122|      md.Set(source->mesh(), att_ct,
   60|    122|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    122|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    122|      MeshPredictionSchemeFactoryT factory;
   63|    122|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    122|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 119, False: 3]
  ------------------
   65|    119|        return ret;
   66|    119|      }
   67|    136|    } else {
   68|    136|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    136|      MeshData md;
   70|    136|      md.Set(source->mesh(), ct,
   71|    136|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    136|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    136|      MeshPredictionSchemeFactoryT factory;
   74|    136|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    136|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 134, False: 2]
  ------------------
   76|    134|        return ret;
   77|    134|      }
   78|    136|    }
   79|    258|  }
   80|      8|  return nullptr;
   81|    302|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    337|    uint16_t bitstream_version) {
   38|    337|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    337|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 337, False: 0]
  ------------------
   40|    337|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 34, False: 303]
  ------------------
   41|    303|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 2, False: 301]
  ------------------
   42|    301|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 0, False: 301]
  ------------------
   43|    301|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 16, False: 285]
  ------------------
   44|    285|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 250, False: 35]
  ------------------
   45|    333|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 31, False: 4]
  ------------------
   46|    333|    const CornerTable* const ct = source->GetCornerTable();
   47|    333|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    333|        source->GetAttributeEncodingData(att_id);
   49|    333|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 67, False: 266]
  |  Branch (49:26): [True: 0, False: 266]
  ------------------
   50|       |      // No connectivity data found.
   51|     67|      return nullptr;
   52|     67|    }
   53|       |    // Connectivity data exists.
   54|    266|    const MeshAttributeCornerTable* const att_ct =
   55|    266|        source->GetAttributeCornerTable(att_id);
   56|    266|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 117, False: 149]
  ------------------
   57|    117|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    117|      MeshData md;
   59|    117|      md.Set(source->mesh(), att_ct,
   60|    117|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    117|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    117|      MeshPredictionSchemeFactoryT factory;
   63|    117|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    117|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 108, False: 9]
  ------------------
   65|    108|        return ret;
   66|    108|      }
   67|    149|    } else {
   68|    149|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    149|      MeshData md;
   70|    149|      md.Set(source->mesh(), ct,
   71|    149|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    149|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    149|      MeshPredictionSchemeFactoryT factory;
   74|    149|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    149|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 142, False: 7]
  ------------------
   76|    142|        return ret;
   77|    142|      }
   78|    149|    }
   79|    266|  }
   80|     20|  return nullptr;
   81|    337|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  4.29k|    uint16_t bitstream_version) {
   38|  4.29k|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|  4.29k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 4.29k, False: 0]
  ------------------
   40|  4.29k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.17k, False: 3.11k]
  ------------------
   41|  3.11k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 708, False: 2.41k]
  ------------------
   42|  2.41k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 481, False: 1.92k]
  ------------------
   43|  1.92k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 623, False: 1.30k]
  ------------------
   44|  1.30k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 779, False: 527]
  ------------------
   45|  4.16k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 399, False: 128]
  ------------------
   46|  4.16k|    const CornerTable* const ct = source->GetCornerTable();
   47|  4.16k|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|  4.16k|        source->GetAttributeEncodingData(att_id);
   49|  4.16k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 44, False: 4.11k]
  |  Branch (49:26): [True: 0, False: 4.11k]
  ------------------
   50|       |      // No connectivity data found.
   51|     44|      return nullptr;
   52|     44|    }
   53|       |    // Connectivity data exists.
   54|  4.11k|    const MeshAttributeCornerTable* const att_ct =
   55|  4.11k|        source->GetAttributeCornerTable(att_id);
   56|  4.11k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.04k, False: 2.07k]
  ------------------
   57|  2.04k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.04k|      MeshData md;
   59|  2.04k|      md.Set(source->mesh(), att_ct,
   60|  2.04k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.04k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.04k|      MeshPredictionSchemeFactoryT factory;
   63|  2.04k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.04k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.04k, False: 0]
  ------------------
   65|  2.04k|        return ret;
   66|  2.04k|      }
   67|  2.07k|    } else {
   68|  2.07k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.07k|      MeshData md;
   70|  2.07k|      md.Set(source->mesh(), ct,
   71|  2.07k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.07k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.07k|      MeshPredictionSchemeFactoryT factory;
   74|  2.07k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.07k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.07k, False: 0]
  ------------------
   76|  2.07k|        return ret;
   77|  2.07k|      }
   78|  2.07k|    }
   79|  4.11k|  }
   80|    128|  return nullptr;
   81|  4.29k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.45M|  bool IsInBottomLeft(const Point2& p) const {
   93|  1.45M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.38M, False: 72.2k]
  |  Branch (93:22): [True: 1.37M, False: 11.7k]
  ------------------
   94|  1.37M|      return true;
   95|  1.37M|    }
   96|  83.9k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 36.2k, False: 47.7k]
  |  Branch (96:25): [True: 17.8k, False: 18.3k]
  ------------------
   97|  1.45M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.45M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.45M|    const DataType sign_x = pred[0];
   52|  1.45M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.45M|    int32_t rotation_count = 0;
   55|  1.45M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.38M, False: 72.2k]
  ------------------
   56|  1.38M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.37M, False: 11.7k]
  ------------------
   57|  1.37M|        rotation_count = 0;
   58|  1.37M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 5.85k, False: 5.87k]
  ------------------
   59|  5.85k|        rotation_count = 3;
   60|  5.87k|      } else {
   61|  5.87k|        rotation_count = 1;
   62|  5.87k|      }
   63|  1.38M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 36.0k, False: 36.2k]
  ------------------
   64|  36.0k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 17.0k, False: 18.9k]
  ------------------
   65|  17.0k|        rotation_count = 2;
   66|  18.9k|      } else {
   67|  18.9k|        rotation_count = 1;
   68|  18.9k|      }
   69|  36.2k|    } else {
   70|  36.2k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 17.8k, False: 18.3k]
  ------------------
   71|  17.8k|        rotation_count = 0;
   72|  18.3k|      } else {
   73|  18.3k|        rotation_count = 3;
   74|  18.3k|      }
   75|  36.2k|    }
   76|  1.45M|    return rotation_count;
   77|  1.45M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   132k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   132k|    switch (rotation_count) {
   81|  49.0k|      case 1:
  ------------------
  |  Branch (81:7): [True: 49.0k, False: 83.1k]
  ------------------
   82|  49.0k|        return Point2(p[1], -p[0]);
   83|  34.1k|      case 2:
  ------------------
  |  Branch (83:7): [True: 34.1k, False: 98.0k]
  ------------------
   84|  34.1k|        return Point2(-p[0], -p[1]);
   85|  49.0k|      case 3:
  ------------------
  |  Branch (85:7): [True: 49.0k, False: 83.1k]
  ------------------
   86|  49.0k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 132k]
  ------------------
   88|      0|        return p;
   89|   132k|    }
   90|   132k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    337|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE19DecodeTransformDataEPNS_13DecoderBufferE:
   45|    301|  bool DecodeTransformData(DecoderBuffer* buffer) {
   46|    301|    DataTypeT max_quantized_value, center_value;
   47|    301|    if (!buffer->Decode(&max_quantized_value)) {
  ------------------
  |  Branch (47:9): [True: 1, False: 300]
  ------------------
   48|      1|      return false;
   49|      1|    }
   50|    300|    if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    300|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (50:9): [True: 94, False: 206]
  ------------------
   51|     94|      if (!buffer->Decode(&center_value)) {
  ------------------
  |  Branch (51:11): [True: 3, False: 91]
  ------------------
   52|      3|        return false;
   53|      3|      }
   54|     94|    }
   55|    297|    (void)center_value;
   56|    297|    return this->set_max_quantized_value(max_quantized_value);
   57|    300|  }
_ZNK5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE20ComputeOriginalValueEPKiS3_Pi:
   61|  1.02M|                                   DataType* out_orig_vals) const {
   62|  1.02M|    DRACO_DCHECK_LE(pred_vals[0], 2 * this->center_value());
   63|  1.02M|    DRACO_DCHECK_LE(pred_vals[1], 2 * this->center_value());
   64|  1.02M|    DRACO_DCHECK_LE(corr_vals[0], 2 * this->center_value());
   65|  1.02M|    DRACO_DCHECK_LE(corr_vals[1], 2 * this->center_value());
   66|       |
   67|  1.02M|    DRACO_DCHECK_LE(0, pred_vals[0]);
   68|  1.02M|    DRACO_DCHECK_LE(0, pred_vals[1]);
   69|  1.02M|    DRACO_DCHECK_LE(0, corr_vals[0]);
   70|  1.02M|    DRACO_DCHECK_LE(0, corr_vals[1]);
   71|       |
   72|  1.02M|    const Point2 pred = Point2(pred_vals[0], pred_vals[1]);
   73|  1.02M|    const Point2 corr = Point2(corr_vals[0], corr_vals[1]);
   74|  1.02M|    const Point2 orig = ComputeOriginalValue(pred, corr);
   75|       |
   76|  1.02M|    out_orig_vals[0] = orig[0];
   77|  1.02M|    out_orig_vals[1] = orig[1];
   78|  1.02M|  }
_ZNK5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE20ComputeOriginalValueENS_7VectorDIiLi2EEERKS3_:
   81|  1.02M|  Point2 ComputeOriginalValue(Point2 pred, const Point2& corr) const {
   82|  1.02M|    const Point2 t(this->center_value(), this->center_value());
   83|  1.02M|    typedef typename std::make_unsigned<DataTypeT>::type UnsignedDataTypeT;
   84|  1.02M|    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.02M|    pred = Point2(Point2u(pred) - Point2u(t));
   89|       |
   90|  1.02M|    const bool pred_is_in_diamond = this->IsInDiamond(pred[0], pred[1]);
   91|  1.02M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (91:9): [True: 853k, False: 174k]
  ------------------
   92|   853k|      this->InvertDiamond(&pred[0], &pred[1]);
   93|   853k|    }
   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.02M|    Point2 orig(Point2u(pred) + Point2u(corr));
   98|       |
   99|  1.02M|    orig[0] = this->ModMax(orig[0]);
  100|  1.02M|    orig[1] = this->ModMax(orig[1]);
  101|  1.02M|    if (!pred_is_in_diamond) {
  ------------------
  |  Branch (101:9): [True: 853k, False: 174k]
  ------------------
  102|   853k|      this->InvertDiamond(&orig[0], &orig[1]);
  103|   853k|    }
  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.02M|    orig = Point2(Point2u(orig) + Point2u(t));
  108|  1.02M|    return orig;
  109|  1.02M|  }
_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiE4InitEi:
   44|     40|  void Init(int num_components) {}
_ZN5draco49PredictionSchemeNormalOctahedronDecodingTransformIiEC2Ev:
   41|    302|  PredictionSchemeNormalOctahedronDecodingTransform() {}

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

_ZN5draco37PredictionSchemeWrapDecodingTransformIiiE19DecodeTransformDataEPNS_13DecoderBufferE:
   65|  3.91k|  bool DecodeTransformData(DecoderBuffer* buffer) {
   66|  3.91k|    DataTypeT min_value, max_value;
   67|  3.91k|    if (!buffer->Decode(&min_value)) {
  ------------------
  |  Branch (67:9): [True: 14, False: 3.89k]
  ------------------
   68|     14|      return false;
   69|     14|    }
   70|  3.89k|    if (!buffer->Decode(&max_value)) {
  ------------------
  |  Branch (70:9): [True: 17, False: 3.88k]
  ------------------
   71|     17|      return false;
   72|     17|    }
   73|  3.88k|    if (min_value > max_value) {
  ------------------
  |  Branch (73:9): [True: 146, False: 3.73k]
  ------------------
   74|    146|      return false;
   75|    146|    }
   76|  3.73k|    this->set_min_value(min_value);
   77|  3.73k|    this->set_max_value(max_value);
   78|  3.73k|    if (!this->InitCorrectionBounds()) {
  ------------------
  |  Branch (78:9): [True: 7, False: 3.72k]
  ------------------
   79|      7|      return false;
   80|      7|    }
   81|  3.72k|    return true;
   82|  3.73k|  }
_ZNK5draco37PredictionSchemeWrapDecodingTransformIiiE20ComputeOriginalValueEPKiS3_Pi:
   38|  9.70M|                                   DataTypeT* out_original_vals) const {
   39|       |    // For now we assume both |DataTypeT| and |CorrTypeT| are equal.
   40|  9.70M|    static_assert(std::is_same<DataTypeT, CorrTypeT>::value,
   41|  9.70M|                  "Predictions and corrections must have the same type.");
   42|       |
   43|       |    // The only valid implementation right now is for int32_t.
   44|  9.70M|    static_assert(std::is_same<DataTypeT, int32_t>::value,
   45|  9.70M|                  "Only int32_t is supported for predicted values.");
   46|       |
   47|  9.70M|    predicted_vals = this->ClampPredictedValue(predicted_vals);
   48|       |
   49|       |    // The sum is computed in int64_t, where it is exact. The encoder keeps each
   50|       |    // correction within half of the span, so the sum lies at most one span
   51|       |    // outside [min, max] and a single wrap gives the original value. Malformed
   52|       |    // corrections cannot overflow int64_t either.
   53|   118M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (53:21): [True: 109M, False: 9.70M]
  ------------------
   54|   109M|      int64_t value = static_cast<int64_t>(predicted_vals[i]) +
   55|   109M|                      static_cast<int64_t>(corr_vals[i]);
   56|   109M|      if (value > this->max_value()) {
  ------------------
  |  Branch (56:11): [True: 113k, False: 108M]
  ------------------
   57|   113k|        value -= this->max_dif();
   58|   108M|      } else if (value < this->min_value()) {
  ------------------
  |  Branch (58:18): [True: 2.28M, False: 106M]
  ------------------
   59|  2.28M|        value += this->max_dif();
   60|  2.28M|      }
   61|   109M|      out_original_vals[i] = static_cast<DataTypeT>(value);
   62|   109M|    }
   63|  9.70M|  }
_ZN5draco37PredictionSchemeWrapDecodingTransformIiiEC2Ev:
   32|  4.29k|  PredictionSchemeWrapDecodingTransform() {}

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  4.15k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  3.73k|  inline void set_min_value(const DataTypeT& v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  3.73k|  inline void set_max_value(const DataTypeT& v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  3.73k|  bool InitCorrectionBounds() {
   84|  3.73k|    const int64_t dif =
   85|  3.73k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  3.73k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.73k]
  |  Branch (86:20): [True: 7, False: 3.72k]
  ------------------
   87|      7|      return false;
   88|      7|    }
   89|  3.72k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  3.72k|    max_correction_ = max_dif_ / 2;
   91|  3.72k|    min_correction_ = -max_correction_;
   92|  3.72k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 1.55k, False: 2.17k]
  ------------------
   93|  1.55k|      max_correction_ -= 1;
   94|  1.55k|    }
   95|  3.72k|    return true;
   96|  3.73k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  2.97k|  void Init(int num_components) {
   56|  2.97k|    num_components_ = num_components;
   57|  2.97k|    clamped_value_.resize(num_components);
   58|  2.97k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  9.70M|      const DataTypeT* predicted_val) const {
   64|   118M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 109M, False: 9.70M]
  ------------------
   65|   109M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 473k, False: 108M]
  ------------------
   66|   473k|        clamped_value_[i] = max_value_;
   67|   108M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 2.89M, False: 105M]
  ------------------
   68|  2.89M|        clamped_value_[i] = min_value_;
   69|   105M|      } else {
   70|   105M|        clamped_value_[i] = predicted_val[i];
   71|   105M|      }
   72|   109M|    }
   73|  9.70M|    return clamped_value_.data();
   74|  9.70M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|   237M|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|   109M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|  2.40M|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|   108M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|    699|  int quantization_bits() const {
   78|    699|    DRACO_DCHECK(false);
   79|    699|    return -1;
   80|    699|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  4.29k|      : num_components_(0),
   45|  4.29k|        min_value_(0),
   46|  4.29k|        max_value_(0),
   47|  4.29k|        max_dif_(0),
   48|  4.29k|        max_correction_(0),
   49|  4.29k|        min_correction_(0) {}

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  34.6k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  34.6k|                                      int attribute_id) {
   24|  34.6k|  decoder_ = decoder;
   25|  34.6k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  34.6k|  attribute_id_ = attribute_id;
   27|  34.6k|  return true;
   28|  34.6k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  8.89k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   39|  8.89k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 8.89k]
  ------------------
   40|  8.89k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 8.89k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  8.89k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 1.66k, False: 7.23k]
  ------------------
   44|  1.66k|    return false;
   45|  1.66k|  }
   46|  7.23k|  return true;
   47|  8.89k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  2.75k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  2.75k|  return true;
   53|  2.75k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    518|    const std::vector<PointIndex>& point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    518|  return true;
   59|    518|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  5.97k|const PointAttribute* SequentialAttributeDecoder::GetPortableAttribute() {
   62|       |  // If needed, copy point to attribute value index mapping from the final
   63|       |  // attribute to the portable attribute.
   64|  5.97k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 5.57k, False: 401]
  |  Branch (64:45): [True: 5.05k, False: 512]
  ------------------
   65|  5.05k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 3.90k, False: 1.15k]
  ------------------
   66|  3.90k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  3.90k|    for (PointIndex i(0);
   68|  26.4M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 26.4M, False: 3.90k]
  ------------------
   69|  26.4M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  26.4M|    }
   71|  3.90k|  }
   72|  5.97k|  return portable_attribute_.get();
   73|  5.97k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  4.93k|    PredictionSchemeInterface* ps) {
   77|  7.22k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 2.30k, False: 4.92k]
  ------------------
   78|  2.30k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  2.30k|        ps->GetParentAttributeType(i));
   80|  2.30k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 1, False: 2.30k]
  ------------------
   81|      1|      return false;  // Requested attribute does not exist.
   82|      1|    }
   83|  2.30k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  2.30k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.30k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 2.30k]
  ------------------
   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.30k|#endif
   90|  2.30k|    {
   91|  2.30k|      const PointAttribute* const pa = decoder_->GetPortableAttribute(att_id);
   92|  2.30k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 1, False: 2.30k]
  |  Branch (92:28): [True: 6, False: 2.29k]
  ------------------
   93|      7|        return false;
   94|      7|      }
   95|  2.30k|    }
   96|  2.30k|  }
   97|  4.92k|  return true;
   98|  4.93k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    716|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  102|    716|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    716|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    716|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    716|  uint8_t* const value_data = value_data_ptr.get();
  106|    716|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  11.9k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 11.2k, False: 675]
  ------------------
  109|  11.2k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 41, False: 11.2k]
  ------------------
  110|     41|      return false;
  111|     41|    }
  112|  11.2k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  11.2k|    out_byte_pos += entry_size;
  114|  11.2k|  }
  115|    675|  return true;
  116|    716|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  7.08k|  const PointAttribute* attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|  32.6M|  PointAttribute* attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  4.93k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  22.8k|  PointCloudDecoder* decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  7.73k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  7.73k|    portable_attribute_ = std::move(att);
   71|  7.73k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  25.1k|  PointAttribute* portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  34.6k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  17.0k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  5.77k|    DecoderBuffer* buffer) {
   30|  5.77k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 108, False: 5.67k]
  ------------------
   31|    108|    return false;
   32|    108|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  5.67k|  const int32_t num_attributes = GetNumAttributes();
   35|  5.67k|  sequential_decoders_.resize(num_attributes);
   36|  40.3k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 34.6k, False: 5.65k]
  ------------------
   37|  34.6k|    uint8_t decoder_type;
   38|  34.6k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 5, False: 34.6k]
  ------------------
   39|      5|      return false;
   40|      5|    }
   41|       |    // Create the decoder from the id.
   42|  34.6k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  34.6k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 9, False: 34.6k]
  ------------------
   44|      9|      return false;
   45|      9|    }
   46|  34.6k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 6, False: 34.6k]
  ------------------
   47|      6|      return false;
   48|      6|    }
   49|  34.6k|  }
   50|  5.65k|  return true;
   51|  5.67k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  2.91k|    DecoderBuffer* buffer) {
   55|  2.91k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 2.91k]
  |  Branch (55:22): [True: 0, False: 2.91k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  2.91k|  const int32_t num_attributes = GetNumAttributes();
   60|  16.8k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 13.8k, False: 2.91k]
  ------------------
   61|  13.8k|    PointAttribute* const pa =
   62|  13.8k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  13.8k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 1, False: 13.8k]
  ------------------
   64|      1|      return false;
   65|      1|    }
   66|  13.8k|  }
   67|  2.91k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  2.91k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  2.91k|    DecoderBuffer* in_buffer) {
   72|  2.91k|  const int32_t num_attributes = GetNumAttributes();
   73|  10.1k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 8.89k, False: 1.25k]
  ------------------
   74|  8.89k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 1.66k, False: 7.23k]
  ------------------
   75|  8.89k|                                                          in_buffer)) {
   76|  1.66k|      return false;
   77|  1.66k|    }
   78|  8.89k|  }
   79|  1.25k|  return true;
   80|  2.91k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  1.25k|    DecodeDataNeededByPortableTransforms(DecoderBuffer* in_buffer) {
   84|  1.25k|  const int32_t num_attributes = GetNumAttributes();
   85|  4.33k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 3.54k, False: 790]
  ------------------
   86|  3.54k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 461, False: 3.08k]
  ------------------
   87|  3.54k|            point_ids_, in_buffer)) {
   88|    461|      return false;
   89|    461|    }
   90|  3.54k|  }
   91|    790|  return true;
   92|  1.25k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|    790|    TransformAttributesToOriginalFormat() {
   96|    790|  const int32_t num_attributes = GetNumAttributes();
   97|  3.17k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 2.61k, False: 565]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  2.61k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 2.61k, False: 0]
  ------------------
  100|  2.61k|      const PointAttribute* const attribute =
  101|  2.61k|          sequential_decoders_[i]->attribute();
  102|  2.61k|      const PointAttribute* const portable_attribute =
  103|  2.61k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  2.61k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 2.09k, False: 518]
  |  Branch (104:11): [True: 670, False: 1.94k]
  ------------------
  105|  2.09k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 670, False: 1.42k]
  ------------------
  106|  2.09k|              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|    670|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    670|        continue;
  114|    670|      }
  115|  2.61k|    }
  116|  1.94k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 225, False: 1.71k]
  ------------------
  117|  1.94k|            point_ids_)) {
  118|    225|      return false;
  119|    225|    }
  120|  1.94k|  }
  121|    565|  return true;
  122|    790|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  34.6k|    uint8_t decoder_type) {
  127|  34.6k|  switch (decoder_type) {
  128|  2.38k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.38k, False: 32.2k]
  ------------------
  129|  2.38k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.38k|          new SequentialAttributeDecoder());
  131|  31.1k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 31.1k, False: 3.48k]
  ------------------
  132|  31.1k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  31.1k|          new SequentialIntegerAttributeDecoder());
  134|    277|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 277, False: 34.3k]
  ------------------
  135|    277|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    277|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|    813|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 813, False: 33.8k]
  ------------------
  139|    813|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|    813|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|      9|    default:
  ------------------
  |  Branch (142:5): [True: 9, False: 34.6k]
  ------------------
  143|      9|      break;
  144|  34.6k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|      9|  return nullptr;
  147|  34.6k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  32.2k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() =
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   27|  32.2k|                                             int attribute_id) {
   28|  32.2k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (28:7): [True: 0, False: 32.2k]
  ------------------
   29|      0|    return false;
   30|      0|  }
   31|  32.2k|  return true;
   32|  32.2k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   35|  1.42k|    const std::vector<PointIndex>& point_ids) {
   36|  1.42k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   37|  1.42k|  if (decoder() &&
  ------------------
  |  Branch (37:7): [True: 1.42k, False: 0]
  ------------------
   38|  1.42k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.42k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (38:7): [True: 4, False: 1.42k]
  ------------------
   39|      4|    return true;  // Don't revert the transform here for older files.
   40|      4|  }
   41|  1.42k|#endif
   42|  1.42k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   43|  1.42k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   46|  8.17k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   47|       |  // Decode prediction scheme.
   48|  8.17k|  int8_t prediction_scheme_method;
   49|  8.17k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (49:7): [True: 123, False: 8.05k]
  ------------------
   50|    123|    return false;
   51|    123|  }
   52|       |  // Check that decoded prediction scheme method type is valid.
   53|  8.05k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (53:7): [True: 60, False: 7.99k]
  ------------------
   54|  7.99k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (54:7): [True: 130, False: 7.86k]
  ------------------
   55|    190|    return false;
   56|    190|  }
   57|  7.86k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (57:7): [True: 7.72k, False: 143]
  ------------------
   58|  7.72k|    int8_t prediction_transform_type;
   59|  7.72k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (59:9): [True: 51, False: 7.67k]
  ------------------
   60|     51|      return false;
   61|     51|    }
   62|       |    // Check that decoded prediction scheme transform type is valid.
   63|  7.67k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (63:9): [True: 17, False: 7.65k]
  ------------------
   64|  7.65k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (64:9): [True: 52, False: 7.60k]
  ------------------
   65|     69|      return false;
   66|     69|    }
   67|  7.60k|    prediction_scheme_ = CreateIntPredictionScheme(
   68|  7.60k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   69|  7.60k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   70|  7.60k|  }
   71|       |
   72|  7.74k|  if (prediction_scheme_) {
  ------------------
  |  Branch (72:7): [True: 4.93k, False: 2.81k]
  ------------------
   73|  4.93k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (73:9): [True: 8, False: 4.92k]
  ------------------
   74|      8|      return false;
   75|      8|    }
   76|  4.93k|  }
   77|       |
   78|  7.73k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (78:7): [True: 1.17k, False: 6.55k]
  ------------------
   79|  1.17k|    return false;
   80|  1.17k|  }
   81|       |
   82|  6.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   83|  6.55k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   84|  6.55k|  if (decoder() &&
  ------------------
  |  Branch (84:7): [True: 6.55k, False: 0]
  ------------------
   85|  6.55k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  6.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (85:7): [True: 9, False: 6.54k]
  ------------------
   86|       |    // For older files, revert the transform right after we decode the data.
   87|      9|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (87:9): [True: 1, False: 8]
  ------------------
   88|      1|      return false;
   89|      1|    }
   90|      9|  }
   91|  6.55k|#endif
   92|  6.55k|  return true;
   93|  6.55k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   98|  6.94k|    PredictionSchemeTransformType transform_type) {
   99|  6.94k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (99:7): [True: 2.65k, False: 4.29k]
  ------------------
  100|  2.65k|    return nullptr;  // For now we support only wrap transform.
  101|  2.65k|  }
  102|  4.29k|  return CreatePredictionSchemeForDecoder<
  103|  4.29k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  104|  4.29k|      method, attribute_id(), decoder());
  105|  6.94k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  108|  7.73k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  109|  7.73k|  const int num_components = GetNumValueComponents();
  110|  7.73k|  if (num_components <= 0) {
  ------------------
  |  Branch (110:7): [True: 0, False: 7.73k]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|  7.73k|  const size_t num_entries = point_ids.size();
  114|  7.73k|  const size_t num_values = num_entries * num_components;
  115|  7.73k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  116|  7.73k|  int32_t* const portable_attribute_data = GetPortableAttributeData();
  117|  7.73k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (117:7): [True: 16, False: 7.72k]
  ------------------
  118|     16|    return false;
  119|     16|  }
  120|  7.72k|  uint8_t compressed;
  121|  7.72k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (121:7): [True: 9, False: 7.71k]
  ------------------
  122|      9|    return false;
  123|      9|  }
  124|  7.71k|  if (compressed > 0) {
  ------------------
  |  Branch (124:7): [True: 510, False: 7.20k]
  ------------------
  125|       |    // Decode compressed values.
  126|    510|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (126:9): [True: 185, False: 325]
  ------------------
  127|    510|                       in_buffer,
  128|    510|                       reinterpret_cast<uint32_t*>(portable_attribute_data))) {
  129|    185|      return false;
  130|    185|    }
  131|  7.20k|  } else {
  132|       |    // Decode the integer data directly.
  133|       |    // Get the number of bytes for a given entry.
  134|  7.20k|    uint8_t num_bytes;
  135|  7.20k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (135:9): [True: 1, False: 7.20k]
  ------------------
  136|      1|      return false;
  137|      1|    }
  138|  7.20k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (138:9): [True: 356, False: 6.84k]
  ------------------
  139|    356|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (139:11): [True: 0, False: 356]
  ------------------
  140|    356|          sizeof(int32_t) * num_values) {
  141|      0|        return false;
  142|      0|      }
  143|    356|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (143:11): [True: 1, False: 355]
  ------------------
  144|    356|                             sizeof(int32_t) * num_values)) {
  145|      1|        return false;
  146|      1|      }
  147|  6.84k|    } else {
  148|  6.84k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (148:11): [True: 32, False: 6.81k]
  ------------------
  149|  6.84k|          num_bytes * num_values) {
  150|     32|        return false;
  151|     32|      }
  152|  6.81k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (152:11): [True: 15, False: 6.79k]
  ------------------
  153|  6.81k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  154|     15|        return false;
  155|     15|      }
  156|   253M|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (156:26): [True: 253M, False: 6.79k]
  ------------------
  157|   253M|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 253M]
  ------------------
  158|      0|          return false;
  159|      0|        }
  160|   253M|      }
  161|  6.79k|    }
  162|  7.20k|  }
  163|       |
  164|  7.47k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (164:7): [True: 7.47k, False: 0]
  |  Branch (164:26): [True: 2.69k, False: 4.78k]
  ------------------
  165|  6.84k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (165:26): [True: 4.15k, False: 632]
  ------------------
  166|       |    // Convert the values back to the original signed format.
  167|  6.84k|    ConvertSymbolsToSignedInts(
  168|  6.84k|        reinterpret_cast<const uint32_t*>(portable_attribute_data),
  169|  6.84k|        static_cast<int>(num_values), portable_attribute_data);
  170|  6.84k|  }
  171|       |
  172|       |  // If the data was encoded with a prediction scheme, we must revert it.
  173|  7.47k|  if (prediction_scheme_) {
  ------------------
  |  Branch (173:7): [True: 4.78k, False: 2.69k]
  ------------------
  174|  4.78k|    prediction_scheme_->SetMaxNumPredictedValues(num_values);
  175|  4.78k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (175:9): [True: 535, False: 4.24k]
  ------------------
  176|    535|      return false;
  177|    535|    }
  178|       |
  179|  4.24k|    if (num_values > 0) {
  ------------------
  |  Branch (179:9): [True: 4.24k, False: 0]
  ------------------
  180|  4.24k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (180:11): [True: 385, False: 3.86k]
  ------------------
  181|  4.24k|              portable_attribute_data, portable_attribute_data,
  182|  4.24k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  183|    385|        return false;
  184|    385|      }
  185|  4.24k|    }
  186|  4.24k|  }
  187|  6.55k|  return true;
  188|  7.47k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  190|  1.16k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  191|  1.16k|  switch (attribute()->data_type()) {
  192|     90|    case DT_UINT8:
  ------------------
  |  Branch (192:5): [True: 90, False: 1.07k]
  ------------------
  193|     90|      StoreTypedValues<uint8_t>(num_values);
  194|     90|      break;
  195|    881|    case DT_INT8:
  ------------------
  |  Branch (195:5): [True: 881, False: 281]
  ------------------
  196|    881|      StoreTypedValues<int8_t>(num_values);
  197|    881|      break;
  198|      6|    case DT_UINT16:
  ------------------
  |  Branch (198:5): [True: 6, False: 1.15k]
  ------------------
  199|      6|      StoreTypedValues<uint16_t>(num_values);
  200|      6|      break;
  201|     68|    case DT_INT16:
  ------------------
  |  Branch (201:5): [True: 68, False: 1.09k]
  ------------------
  202|     68|      StoreTypedValues<int16_t>(num_values);
  203|     68|      break;
  204|     38|    case DT_UINT32:
  ------------------
  |  Branch (204:5): [True: 38, False: 1.12k]
  ------------------
  205|     38|      StoreTypedValues<uint32_t>(num_values);
  206|     38|      break;
  207|     25|    case DT_INT32:
  ------------------
  |  Branch (207:5): [True: 25, False: 1.13k]
  ------------------
  208|     25|      StoreTypedValues<int32_t>(num_values);
  209|     25|      break;
  210|     54|    default:
  ------------------
  |  Branch (210:5): [True: 54, False: 1.10k]
  ------------------
  211|     54|      return false;
  212|  1.16k|  }
  213|  1.10k|  return true;
  214|  1.16k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  238|  7.73k|    int num_entries, int num_components) {
  239|  7.73k|  GeometryAttribute ga;
  240|  7.73k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  241|  7.73k|          false, num_components * DataTypeLength(DT_INT32), 0);
  242|  7.73k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  243|  7.73k|  port_att->SetIdentityMapping();
  244|  7.73k|  port_att->Reset(num_entries);
  245|  7.73k|  port_att->set_unique_id(attribute()->unique_id());
  246|  7.73k|  SetPortableAttribute(std::move(port_att));
  247|  7.73k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  217|     90|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|     90|  const int num_components = attribute()->num_components();
  219|     90|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|     90|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|     90|      new AttributeTypeT[num_components]);
  222|     90|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|     90|  int val_id = 0;
  224|     90|  int out_byte_pos = 0;
  225|   270k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 270k, False: 90]
  ------------------
  226|  12.3M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 12.1M, False: 270k]
  ------------------
  227|  12.1M|      const AttributeTypeT value =
  228|  12.1M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  12.1M|      att_val[c] = value;
  230|  12.1M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   270k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   270k|    out_byte_pos += entry_size;
  234|   270k|  }
  235|     90|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  217|    881|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    881|  const int num_components = attribute()->num_components();
  219|    881|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    881|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    881|      new AttributeTypeT[num_components]);
  222|    881|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    881|  int val_id = 0;
  224|    881|  int out_byte_pos = 0;
  225|  32.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 32.0M, False: 881]
  ------------------
  226|  72.6M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 40.6M, False: 32.0M]
  ------------------
  227|  40.6M|      const AttributeTypeT value =
  228|  40.6M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  40.6M|      att_val[c] = value;
  230|  40.6M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  32.0M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  32.0M|    out_byte_pos += entry_size;
  234|  32.0M|  }
  235|    881|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  217|      6|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|      6|  const int num_components = attribute()->num_components();
  219|      6|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|      6|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|      6|      new AttributeTypeT[num_components]);
  222|      6|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|      6|  int val_id = 0;
  224|      6|  int out_byte_pos = 0;
  225|     70|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 64, False: 6]
  ------------------
  226|    858|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 794, False: 64]
  ------------------
  227|    794|      const AttributeTypeT value =
  228|    794|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|    794|      att_val[c] = value;
  230|    794|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|     64|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|     64|    out_byte_pos += entry_size;
  234|     64|  }
  235|      6|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  217|     68|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|     68|  const int num_components = attribute()->num_components();
  219|     68|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|     68|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|     68|      new AttributeTypeT[num_components]);
  222|     68|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|     68|  int val_id = 0;
  224|     68|  int out_byte_pos = 0;
  225|  8.23k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 8.17k, False: 68]
  ------------------
  226|   100k|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 92.7k, False: 8.17k]
  ------------------
  227|  92.7k|      const AttributeTypeT value =
  228|  92.7k|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  92.7k|      att_val[c] = value;
  230|  92.7k|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  8.17k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  8.17k|    out_byte_pos += entry_size;
  234|  8.17k|  }
  235|     68|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  217|     38|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|     38|  const int num_components = attribute()->num_components();
  219|     38|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|     38|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|     38|      new AttributeTypeT[num_components]);
  222|     38|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|     38|  int val_id = 0;
  224|     38|  int out_byte_pos = 0;
  225|   233k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 233k, False: 38]
  ------------------
  226|  43.0M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 42.8M, False: 233k]
  ------------------
  227|  42.8M|      const AttributeTypeT value =
  228|  42.8M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  42.8M|      att_val[c] = value;
  230|  42.8M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   233k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   233k|    out_byte_pos += entry_size;
  234|   233k|  }
  235|     38|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  217|     25|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|     25|  const int num_components = attribute()->num_components();
  219|     25|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|     25|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|     25|      new AttributeTypeT[num_components]);
  222|     25|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|     25|  int val_id = 0;
  224|     25|  int out_byte_pos = 0;
  225|  23.3k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 23.3k, False: 25]
  ------------------
  226|  1.22M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 1.19M, False: 23.3k]
  ------------------
  227|  1.19M|      const AttributeTypeT value =
  228|  1.19M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  1.19M|      att_val[c] = value;
  230|  1.19M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  23.3k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  23.3k|    out_byte_pos += entry_size;
  234|  23.3k|  }
  235|     25|}

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

_ZN5draco32SequentialNormalAttributeDecoderC2Ev:
   21|    813|SequentialNormalAttributeDecoder::SequentialNormalAttributeDecoder() = default;
_ZN5draco32SequentialNormalAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   24|    813|                                            int attribute_id) {
   25|    813|  if (!SequentialIntegerAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (25:7): [True: 0, False: 813]
  ------------------
   26|      0|    return false;
   27|      0|  }
   28|       |  // Currently, this encoder works only for 3-component normal vectors.
   29|    813|  if (attribute()->num_components() != 3) {
  ------------------
  |  Branch (29:7): [True: 1, False: 812]
  ------------------
   30|      1|    return false;
   31|      1|  }
   32|       |  // Also the data type must be DT_FLOAT32.
   33|    812|  if (attribute()->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (33:7): [True: 1, False: 811]
  ------------------
   34|      1|    return false;
   35|      1|  }
   36|    811|  return true;
   37|    812|}
_ZN5draco32SequentialNormalAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   40|    648|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   41|    648|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   42|    648|  if (decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    648|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (42:7): [True: 1, False: 647]
  ------------------
   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|      1|    if (!octahedral_transform_.DecodeParameters(*attribute(), in_buffer)) {
  ------------------
  |  Branch (47:9): [True: 0, False: 1]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|      1|  }
   51|    648|#endif
   52|    648|  return SequentialIntegerAttributeDecoder::DecodeIntegerValues(point_ids,
   53|    648|                                                                in_buffer);
   54|    648|}
_ZN5draco32SequentialNormalAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   57|    565|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   58|    565|  if (decoder()->bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    565|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (58:7): [True: 565, False: 0]
  ------------------
   59|       |    // For newer file version, decode attribute transform data here.
   60|    565|    if (!octahedral_transform_.DecodeParameters(*GetPortableAttribute(),
  ------------------
  |  Branch (60:9): [True: 308, False: 257]
  ------------------
   61|    565|                                                in_buffer)) {
   62|    308|      return false;
   63|    308|    }
   64|    565|  }
   65|       |
   66|       |  // Store the decoded transform data in portable attribute.
   67|    257|  return octahedral_transform_.TransferToAttribute(portable_attribute());
   68|    565|}
_ZN5draco32SequentialNormalAttributeDecoder11StoreValuesEj:
   70|    206|bool SequentialNormalAttributeDecoder::StoreValues(uint32_t num_points) {
   71|       |  // Convert all quantized values back to floats.
   72|    206|  return octahedral_transform_.InverseTransformAttribute(
   73|    206|      *GetPortableAttribute(), attribute());
   74|    206|}

_ZNK5draco32SequentialNormalAttributeDecoder21GetNumValueComponentsEv:
   35|    648|  int32_t GetNumValueComponents() const override {
   36|    648|    return 2;  // We quantize everything into two components.
   37|    648|  }
_ZN5draco32SequentialNormalAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   51|    652|      PredictionSchemeTransformType transform_type) override {
   52|    652|    switch (transform_type) {
   53|      0|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   54|    302|      case PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON: {
  ------------------
  |  Branch (54:7): [True: 302, False: 350]
  ------------------
   55|    302|        typedef PredictionSchemeNormalOctahedronDecodingTransform<int32_t>
   56|    302|            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|    302|        return CreatePredictionSchemeForDecoder<int32_t, Transform>(
   61|    302|            method, attribute_id(), decoder());
   62|      0|      }
   63|      0|#endif
   64|    337|      case PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON_CANONICALIZED: {
  ------------------
  |  Branch (64:7): [True: 337, False: 315]
  ------------------
   65|    337|        typedef PredictionSchemeNormalOctahedronCanonicalizedDecodingTransform<
   66|    337|            int32_t>
   67|    337|            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|    337|        return CreatePredictionSchemeForDecoder<int32_t, Transform>(
   72|    337|            method, attribute_id(), decoder());
   73|      0|      }
   74|     13|      default:
  ------------------
  |  Branch (74:7): [True: 13, False: 639]
  ------------------
   75|     13|        return nullptr;  // Currently, we support only octahedron transform and
   76|       |                         // octahedron transform canonicalized.
   77|    652|    }
   78|    652|  }

_ZN5draco38SequentialQuantizationAttributeDecoderC2Ev:
   22|    277|    SequentialQuantizationAttributeDecoder() = default;
_ZN5draco38SequentialQuantizationAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   25|    277|                                                  int attribute_id) {
   26|    277|  if (!SequentialIntegerAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (26:7): [True: 0, False: 277]
  ------------------
   27|      0|    return false;
   28|      0|  }
   29|    277|  const PointAttribute* const attribute =
   30|    277|      decoder->point_cloud()->attribute(attribute_id);
   31|       |  // Currently we can quantize only floating point arguments.
   32|    277|  if (attribute->data_type() != DT_FLOAT32) {
  ------------------
  |  Branch (32:7): [True: 4, False: 273]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|    273|  return true;
   36|    277|}
_ZN5draco38SequentialQuantizationAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   39|    272|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   40|    272|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   41|    272|  if (decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0) &&
  ------------------
  |  |  115|    544|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (41:7): [True: 4, False: 268]
  ------------------
   42|      4|      !DecodeQuantizedDataInfo()) {
  ------------------
  |  Branch (42:7): [True: 0, False: 4]
  ------------------
   43|      0|    return false;
   44|      0|  }
   45|    272|#endif
   46|    272|  return SequentialIntegerAttributeDecoder::DecodeIntegerValues(point_ids,
   47|    272|                                                                in_buffer);
   48|    272|}
_ZN5draco38SequentialQuantizationAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   52|    219|        const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   53|    219|  if (decoder()->bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    219|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (53:7): [True: 217, False: 2]
  ------------------
   54|       |    // Decode quantization data here only for files with bitstream version 2.0+
   55|    217|    if (!DecodeQuantizedDataInfo()) {
  ------------------
  |  Branch (55:9): [True: 153, False: 64]
  ------------------
   56|    153|      return false;
   57|    153|    }
   58|    217|  }
   59|       |
   60|       |  // Store the decoded transform data in portable attribute;
   61|     66|  return quantization_transform_.TransferToAttribute(portable_attribute());
   62|    219|}
_ZN5draco38SequentialQuantizationAttributeDecoder11StoreValuesEj:
   64|     63|bool SequentialQuantizationAttributeDecoder::StoreValues(uint32_t num_points) {
   65|     63|  return DequantizeValues(num_points);
   66|     63|}
_ZN5draco38SequentialQuantizationAttributeDecoder23DecodeQuantizedDataInfoEv:
   68|    221|bool SequentialQuantizationAttributeDecoder::DecodeQuantizedDataInfo() {
   69|       |  // Get attribute used as source for decoding.
   70|    221|  auto att = GetPortableAttribute();
   71|    221|  if (att == nullptr) {
  ------------------
  |  Branch (71:7): [True: 4, False: 217]
  ------------------
   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|    221|  return quantization_transform_.DecodeParameters(*att, decoder()->buffer());
   79|    221|}
_ZN5draco38SequentialQuantizationAttributeDecoder16DequantizeValuesEj:
   82|     63|    uint32_t num_values) {
   83|       |  // Convert all quantized values back to floats.
   84|     63|  return quantization_transform_.InverseTransformAttribute(
   85|     63|      *GetPortableAttribute(), attribute());
   86|     63|}

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  20.5k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  14.5k|                                const uint8_t* const buf, int offset) {
  301|  14.5k|  unsigned x;
  302|  14.5k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 25, False: 14.4k]
  ------------------
  303|     25|    return 1;
  304|     25|  }
  305|  14.4k|  ans->buf = buf;
  306|  14.4k|  x = buf[offset - 1] >> 6;
  307|  14.4k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 12.7k, False: 1.78k]
  ------------------
  308|  12.7k|    ans->buf_offset = offset - 1;
  309|  12.7k|    ans->state = buf[offset - 1] & 0x3F;
  310|  12.7k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 1.56k, False: 219]
  ------------------
  311|  1.56k|    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: 213, False: 6]
  ------------------
  317|    213|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 0, False: 213]
  ------------------
  318|      0|      return 1;
  319|      0|    }
  320|    213|    ans->buf_offset = offset - 3;
  321|    213|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    213|  } else {
  323|      6|    return 1;
  324|      6|  }
  325|  14.4k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  14.4k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  14.4k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  14.4k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  14.4k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 1, False: 14.4k]
  ------------------
  327|      1|    return 1;
  328|      1|  }
  329|  14.4k|  return 0;
  330|  14.4k|}
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|    213|static uint32_t mem_get_le24(const void* vmem) {
   77|    213|  uint32_t val;
   78|    213|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    213|  val = mem[2] << 16;
   81|    213|  val |= mem[1] << 8;
   82|    213|  val |= mem[0];
   83|    213|  return val;
   84|    213|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  98.1M|static inline int rabs_desc_read(struct AnsDecoder* ans, AnsP8 p0) {
  167|  98.1M|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  98.1M|  unsigned quot, rem, x, xn;
  172|  98.1M|#endif
  173|  98.1M|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  98.1M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  98.1M|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|   196M|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 66.6M, False: 31.4M]
  |  Branch (174:40): [True: 124k, False: 66.5M]
  ------------------
  175|   124k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   124k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   124k|  }
  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|  98.1M|  x = ans->state;
  184|  98.1M|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  98.1M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  98.1M|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  98.1M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  98.1M|  xn = quot * p;
  187|  98.1M|  val = rem < p;
  188|  98.1M|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|   196M|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 85.9M, False: 12.2M]
  |  |  ------------------
  ------------------
  189|  85.9M|    ans->state = xn + rem;
  190|  85.9M|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  12.2M|    ans->state = x - xn - p;
  193|  12.2M|  }
  194|  98.1M|#endif
  195|  98.1M|  return val;
  196|  98.1M|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  31.8k|static inline int ans_read_end(struct AnsDecoder* const ans) {
  333|  31.8k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  31.8k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  31.8k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  1.93k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  484|  1.17k|                                       uint32_t num_symbols) {
  485|  1.17k|    lut_table_.resize(rans_precision);
  486|  1.17k|    probability_table_.resize(num_symbols);
  487|  1.17k|    uint32_t cum_prob = 0;
  488|  1.17k|    uint32_t act_prob = 0;
  489|  15.7k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 14.6k, False: 1.07k]
  ------------------
  490|  14.6k|      probability_table_[i].prob = token_probs[i];
  491|  14.6k|      probability_table_[i].cum_prob = cum_prob;
  492|  14.6k|      cum_prob += token_probs[i];
  493|  14.6k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 99, False: 14.5k]
  ------------------
  494|     99|        return false;
  495|     99|      }
  496|  3.92M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 3.91M, False: 14.5k]
  ------------------
  497|  3.91M|        lut_table_[j] = i;
  498|  3.91M|      }
  499|  14.5k|      act_prob = cum_prob;
  500|  14.5k|    }
  501|  1.07k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 137, False: 935]
  ------------------
  502|    137|      return false;
  503|    137|    }
  504|    935|    return true;
  505|  1.07k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|    922|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    922|    unsigned x;
  423|    922|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 44, False: 878]
  ------------------
  424|     44|      return 1;
  425|     44|    }
  426|    878|    ans_.buf = buf;
  427|    878|    x = buf[offset - 1] >> 6;
  428|    878|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 590, False: 288]
  ------------------
  429|    590|      ans_.buf_offset = offset - 1;
  430|    590|      ans_.state = buf[offset - 1] & 0x3F;
  431|    590|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 137, False: 151]
  ------------------
  432|    137|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 11, False: 126]
  ------------------
  433|     11|        return 1;
  434|     11|      }
  435|    126|      ans_.buf_offset = offset - 2;
  436|    126|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    151|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 96, False: 55]
  ------------------
  438|     96|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 13, False: 83]
  ------------------
  439|     13|        return 1;
  440|     13|      }
  441|     83|      ans_.buf_offset = offset - 3;
  442|     83|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     83|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 55, False: 0]
  ------------------
  444|     55|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 3, False: 52]
  ------------------
  445|      3|        return 1;
  446|      3|      }
  447|     52|      ans_.buf_offset = offset - 4;
  448|     52|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     52|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    851|    ans_.state += l_rans_base;
  453|    851|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    851|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 52, False: 799]
  ------------------
  454|     52|      return 1;
  455|     52|    }
  456|    799|    return 0;
  457|    851|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    159|static uint32_t mem_get_le16(const void* vmem) {
   68|    159|  uint32_t val;
   69|    159|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|    159|  val = mem[1] << 8;
   72|    159|  val |= mem[0];
   73|    159|  return val;
   74|    159|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    137|static uint32_t mem_get_le24(const void* vmem) {
   77|    137|  uint32_t val;
   78|    137|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    137|  val = mem[2] << 16;
   81|    137|  val |= mem[1] << 8;
   82|    137|  val |= mem[0];
   83|    137|  return val;
   84|    137|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    203|static inline uint32_t mem_get_le32(const void* vmem) {
   87|    203|  uint32_t val;
   88|    203|  const uint8_t* mem = (const uint8_t*)vmem;
   89|       |
   90|    203|  val = mem[3] << 24;
   91|    203|  val |= mem[2] << 16;
   92|    203|  val |= mem[1] << 8;
   93|    203|  val |= mem[0];
   94|    203|  return val;
   95|    203|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  465|  84.4M|  inline int rans_read() {
  466|  84.4M|    unsigned rem;
  467|  84.4M|    unsigned quo;
  468|  84.4M|    struct rans_dec_sym sym;
  469|  84.5M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 64.5M, False: 19.9M]
  |  Branch (469:40): [True: 26.1k, False: 64.5M]
  ------------------
  470|  26.1k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  26.1k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  26.1k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  84.4M|    quo = ans_.state / rans_precision;
  475|  84.4M|    rem = ans_.state % rans_precision;
  476|  84.4M|    fetch_sym(&sym, rem);
  477|  84.4M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  84.4M|    return sym.val;
  479|  84.4M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  508|  84.4M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  84.4M|    uint32_t symbol = lut_table_[rem];
  510|  84.4M|    out->val = symbol;
  511|  84.4M|    out->prob = probability_table_[symbol].prob;
  512|  84.4M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  84.4M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  459|    772|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    101|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  484|     69|                                       uint32_t num_symbols) {
  485|     69|    lut_table_.resize(rans_precision);
  486|     69|    probability_table_.resize(num_symbols);
  487|     69|    uint32_t cum_prob = 0;
  488|     69|    uint32_t act_prob = 0;
  489|  12.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 12.2k, False: 58]
  ------------------
  490|  12.2k|      probability_table_[i].prob = token_probs[i];
  491|  12.2k|      probability_table_[i].cum_prob = cum_prob;
  492|  12.2k|      cum_prob += token_probs[i];
  493|  12.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 11, False: 12.2k]
  ------------------
  494|     11|        return false;
  495|     11|      }
  496|   467k|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 455k, False: 12.2k]
  ------------------
  497|   455k|        lut_table_[j] = i;
  498|   455k|      }
  499|  12.2k|      act_prob = cum_prob;
  500|  12.2k|    }
  501|     58|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 5, False: 53]
  ------------------
  502|      5|      return false;
  503|      5|    }
  504|     53|    return true;
  505|     58|  }
_ZN5draco11RAnsDecoderILi13EE9read_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: 0, False: 46]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     46|    ans_.buf = buf;
  427|     46|    x = buf[offset - 1] >> 6;
  428|     46|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 32, False: 14]
  ------------------
  429|     32|      ans_.buf_offset = offset - 1;
  430|     32|      ans_.state = buf[offset - 1] & 0x3F;
  431|     32|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 13, False: 1]
  ------------------
  432|     13|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 11]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     11|      ans_.buf_offset = offset - 2;
  436|     11|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     11|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 0, False: 1]
  ------------------
  438|      0|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 0]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      0|      ans_.buf_offset = offset - 3;
  442|      0|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      1|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 1, False: 0]
  ------------------
  444|      1|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 1]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|      1|      ans_.buf_offset = offset - 4;
  448|      1|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|      1|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     44|    ans_.state += l_rans_base;
  453|     44|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     44|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 1, False: 43]
  ------------------
  454|      1|      return 1;
  455|      1|    }
  456|     43|    return 0;
  457|     44|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  465|  13.6M|  inline int rans_read() {
  466|  13.6M|    unsigned rem;
  467|  13.6M|    unsigned quo;
  468|  13.6M|    struct rans_dec_sym sym;
  469|  13.6M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 13.5M, False: 72.7k]
  |  Branch (469:40): [True: 1.46k, False: 13.5M]
  ------------------
  470|  1.46k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.46k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.46k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  13.6M|    quo = ans_.state / rans_precision;
  475|  13.6M|    rem = ans_.state % rans_precision;
  476|  13.6M|    fetch_sym(&sym, rem);
  477|  13.6M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  13.6M|    return sym.val;
  479|  13.6M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  508|  13.6M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  13.6M|    uint32_t symbol = lut_table_[rem];
  510|  13.6M|    out->val = symbol;
  511|  13.6M|    out->prob = probability_table_[symbol].prob;
  512|  13.6M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  13.6M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  459|     43|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    137|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  484|    105|                                       uint32_t num_symbols) {
  485|    105|    lut_table_.resize(rans_precision);
  486|    105|    probability_table_.resize(num_symbols);
  487|    105|    uint32_t cum_prob = 0;
  488|    105|    uint32_t act_prob = 0;
  489|  1.14k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 1.04k, False: 103]
  ------------------
  490|  1.04k|      probability_table_[i].prob = token_probs[i];
  491|  1.04k|      probability_table_[i].cum_prob = cum_prob;
  492|  1.04k|      cum_prob += token_probs[i];
  493|  1.04k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 2, False: 1.04k]
  ------------------
  494|      2|        return false;
  495|      2|      }
  496|  2.82M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 2.82M, False: 1.04k]
  ------------------
  497|  2.82M|        lut_table_[j] = i;
  498|  2.82M|      }
  499|  1.04k|      act_prob = cum_prob;
  500|  1.04k|    }
  501|    103|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 21, False: 82]
  ------------------
  502|     21|      return false;
  503|     21|    }
  504|     82|    return true;
  505|    103|  }
_ZN5draco11RAnsDecoderILi15EE9read_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: 9, False: 31]
  ------------------
  429|      9|      ans_.buf_offset = offset - 1;
  430|      9|      ans_.state = buf[offset - 1] & 0x3F;
  431|     31|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 2, False: 29]
  ------------------
  432|      2|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 2]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      2|      ans_.buf_offset = offset - 2;
  436|      2|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     29|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 10, False: 19]
  ------------------
  438|     10|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 3, False: 7]
  ------------------
  439|      3|        return 1;
  440|      3|      }
  441|      7|      ans_.buf_offset = offset - 3;
  442|      7|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     19|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 19, False: 0]
  ------------------
  444|     19|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 19]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|     19|      ans_.buf_offset = offset - 4;
  448|     19|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     19|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     37|    ans_.state += l_rans_base;
  453|     37|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     37|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 5, False: 32]
  ------------------
  454|      5|      return 1;
  455|      5|    }
  456|     32|    return 0;
  457|     37|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  465|   247k|  inline int rans_read() {
  466|   247k|    unsigned rem;
  467|   247k|    unsigned quo;
  468|   247k|    struct rans_dec_sym sym;
  469|   248k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 27.3k, False: 220k]
  |  Branch (469:40): [True: 367, False: 26.9k]
  ------------------
  470|    367|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    367|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    367|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   247k|    quo = ans_.state / rans_precision;
  475|   247k|    rem = ans_.state % rans_precision;
  476|   247k|    fetch_sym(&sym, rem);
  477|   247k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   247k|    return sym.val;
  479|   247k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  508|   247k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   247k|    uint32_t symbol = lut_table_[rem];
  510|   247k|    out->val = symbol;
  511|   247k|    out->prob = probability_table_[symbol].prob;
  512|   247k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   247k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  459|     32|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    130|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  484|     80|                                       uint32_t num_symbols) {
  485|     80|    lut_table_.resize(rans_precision);
  486|     80|    probability_table_.resize(num_symbols);
  487|     80|    uint32_t cum_prob = 0;
  488|     80|    uint32_t act_prob = 0;
  489|  7.83k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 7.76k, False: 67]
  ------------------
  490|  7.76k|      probability_table_[i].prob = token_probs[i];
  491|  7.76k|      probability_table_[i].cum_prob = cum_prob;
  492|  7.76k|      cum_prob += token_probs[i];
  493|  7.76k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 13, False: 7.75k]
  ------------------
  494|     13|        return false;
  495|     13|      }
  496|  4.36M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 4.36M, False: 7.75k]
  ------------------
  497|  4.36M|        lut_table_[j] = i;
  498|  4.36M|      }
  499|  7.75k|      act_prob = cum_prob;
  500|  7.75k|    }
  501|     67|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 7, False: 60]
  ------------------
  502|      7|      return false;
  503|      7|    }
  504|     60|    return true;
  505|     67|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     49|  inline int read_init(const uint8_t* const buf, int offset) {
  422|     49|    unsigned x;
  423|     49|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 49]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     49|    ans_.buf = buf;
  427|     49|    x = buf[offset - 1] >> 6;
  428|     49|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 10, False: 39]
  ------------------
  429|     10|      ans_.buf_offset = offset - 1;
  430|     10|      ans_.state = buf[offset - 1] & 0x3F;
  431|     39|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 8, False: 31]
  ------------------
  432|      8|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 8]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      8|      ans_.buf_offset = offset - 2;
  436|      8|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     31|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 11, False: 20]
  ------------------
  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|     20|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 20, False: 0]
  ------------------
  444|     20|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 1, False: 19]
  ------------------
  445|      1|        return 1;
  446|      1|      }
  447|     19|      ans_.buf_offset = offset - 4;
  448|     19|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     19|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     48|    ans_.state += l_rans_base;
  453|     48|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     48|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 14, False: 34]
  ------------------
  454|     14|      return 1;
  455|     14|    }
  456|     34|    return 0;
  457|     48|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  465|   180k|  inline int rans_read() {
  466|   180k|    unsigned rem;
  467|   180k|    unsigned quo;
  468|   180k|    struct rans_dec_sym sym;
  469|   181k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 59.9k, False: 121k]
  |  Branch (469:40): [True: 546, False: 59.4k]
  ------------------
  470|    546|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    546|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    546|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   180k|    quo = ans_.state / rans_precision;
  475|   180k|    rem = ans_.state % rans_precision;
  476|   180k|    fetch_sym(&sym, rem);
  477|   180k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   180k|    return sym.val;
  479|   180k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  508|   180k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   180k|    uint32_t symbol = lut_table_[rem];
  510|   180k|    out->val = symbol;
  511|   180k|    out->prob = probability_table_[symbol].prob;
  512|   180k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   180k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  459|     34|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|     85|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  484|     43|                                       uint32_t num_symbols) {
  485|     43|    lut_table_.resize(rans_precision);
  486|     43|    probability_table_.resize(num_symbols);
  487|     43|    uint32_t cum_prob = 0;
  488|     43|    uint32_t act_prob = 0;
  489|  3.12k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 3.08k, False: 38]
  ------------------
  490|  3.08k|      probability_table_[i].prob = token_probs[i];
  491|  3.08k|      probability_table_[i].cum_prob = cum_prob;
  492|  3.08k|      cum_prob += token_probs[i];
  493|  3.08k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 5, False: 3.08k]
  ------------------
  494|      5|        return false;
  495|      5|      }
  496|  8.29M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.29M, False: 3.08k]
  ------------------
  497|  8.29M|        lut_table_[j] = i;
  498|  8.29M|      }
  499|  3.08k|      act_prob = cum_prob;
  500|  3.08k|    }
  501|     38|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 7, False: 31]
  ------------------
  502|      7|      return false;
  503|      7|    }
  504|     31|    return true;
  505|     38|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     27|  inline int read_init(const uint8_t* const buf, int offset) {
  422|     27|    unsigned x;
  423|     27|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 27]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     27|    ans_.buf = buf;
  427|     27|    x = buf[offset - 1] >> 6;
  428|     27|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 8, False: 19]
  ------------------
  429|      8|      ans_.buf_offset = offset - 1;
  430|      8|      ans_.state = buf[offset - 1] & 0x3F;
  431|     19|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 0, False: 19]
  ------------------
  432|      0|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 0]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      0|      ans_.buf_offset = offset - 2;
  436|      0|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     19|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 3, False: 16]
  ------------------
  438|      3|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 3]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      3|      ans_.buf_offset = offset - 3;
  442|      3|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     16|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 16, False: 0]
  ------------------
  444|     16|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 16]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|     16|      ans_.buf_offset = offset - 4;
  448|     16|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     16|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     27|    ans_.state += l_rans_base;
  453|     27|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     27|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 11, False: 16]
  ------------------
  454|     11|      return 1;
  455|     11|    }
  456|     16|    return 0;
  457|     27|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  465|  66.7k|  inline int rans_read() {
  466|  66.7k|    unsigned rem;
  467|  66.7k|    unsigned quo;
  468|  66.7k|    struct rans_dec_sym sym;
  469|  67.2k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 44.9k, False: 22.2k]
  |  Branch (469:40): [True: 538, False: 44.4k]
  ------------------
  470|    538|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    538|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    538|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  66.7k|    quo = ans_.state / rans_precision;
  475|  66.7k|    rem = ans_.state % rans_precision;
  476|  66.7k|    fetch_sym(&sym, rem);
  477|  66.7k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  66.7k|    return sym.val;
  479|  66.7k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  508|  66.7k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  66.7k|    uint32_t symbol = lut_table_[rem];
  510|  66.7k|    out->val = symbol;
  511|  66.7k|    out->prob = probability_table_[symbol].prob;
  512|  66.7k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  66.7k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  459|     16|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    128|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  484|     74|                                       uint32_t num_symbols) {
  485|     74|    lut_table_.resize(rans_precision);
  486|     74|    probability_table_.resize(num_symbols);
  487|     74|    uint32_t cum_prob = 0;
  488|     74|    uint32_t act_prob = 0;
  489|  2.18k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 2.11k, False: 71]
  ------------------
  490|  2.11k|      probability_table_[i].prob = token_probs[i];
  491|  2.11k|      probability_table_[i].cum_prob = cum_prob;
  492|  2.11k|      cum_prob += token_probs[i];
  493|  2.11k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 3, False: 2.11k]
  ------------------
  494|      3|        return false;
  495|      3|      }
  496|  33.1M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 33.1M, False: 2.11k]
  ------------------
  497|  33.1M|        lut_table_[j] = i;
  498|  33.1M|      }
  499|  2.11k|      act_prob = cum_prob;
  500|  2.11k|    }
  501|     71|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 12, False: 59]
  ------------------
  502|     12|      return false;
  503|     12|    }
  504|     59|    return true;
  505|     71|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|     29|  inline int read_init(const uint8_t* const buf, int offset) {
  422|     29|    unsigned x;
  423|     29|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 29]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     29|    ans_.buf = buf;
  427|     29|    x = buf[offset - 1] >> 6;
  428|     29|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 8, False: 21]
  ------------------
  429|      8|      ans_.buf_offset = offset - 1;
  430|      8|      ans_.state = buf[offset - 1] & 0x3F;
  431|     21|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 2, False: 19]
  ------------------
  432|      2|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 2]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      2|      ans_.buf_offset = offset - 2;
  436|      2|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     19|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 1, False: 18]
  ------------------
  438|      1|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 1]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      1|      ans_.buf_offset = offset - 3;
  442|      1|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     18|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 18, False: 0]
  ------------------
  444|     18|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 18]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|     18|      ans_.buf_offset = offset - 4;
  448|     18|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     18|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     29|    ans_.state += l_rans_base;
  453|     29|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     29|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 7, False: 22]
  ------------------
  454|      7|      return 1;
  455|      7|    }
  456|     22|    return 0;
  457|     29|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  465|  46.4k|  inline int rans_read() {
  466|  46.4k|    unsigned rem;
  467|  46.4k|    unsigned quo;
  468|  46.4k|    struct rans_dec_sym sym;
  469|  48.3k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 18.3k, False: 30.0k]
  |  Branch (469:40): [True: 1.90k, False: 16.4k]
  ------------------
  470|  1.90k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.90k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.90k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  46.4k|    quo = ans_.state / rans_precision;
  475|  46.4k|    rem = ans_.state % rans_precision;
  476|  46.4k|    fetch_sym(&sym, rem);
  477|  46.4k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  46.4k|    return sym.val;
  479|  46.4k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  508|  46.4k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  46.4k|    uint32_t symbol = lut_table_[rem];
  510|  46.4k|    out->val = symbol;
  511|  46.4k|    out->prob = probability_table_[symbol].prob;
  512|  46.4k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  46.4k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  459|     22|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|    768|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  484|    458|                                       uint32_t num_symbols) {
  485|    458|    lut_table_.resize(rans_precision);
  486|    458|    probability_table_.resize(num_symbols);
  487|    458|    uint32_t cum_prob = 0;
  488|    458|    uint32_t act_prob = 0;
  489|  23.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 22.9k, False: 438]
  ------------------
  490|  22.9k|      probability_table_[i].prob = token_probs[i];
  491|  22.9k|      probability_table_[i].cum_prob = cum_prob;
  492|  22.9k|      cum_prob += token_probs[i];
  493|  22.9k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 20, False: 22.8k]
  ------------------
  494|     20|        return false;
  495|     20|      }
  496|   421M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 421M, False: 22.8k]
  ------------------
  497|   421M|        lut_table_[j] = i;
  498|   421M|      }
  499|  22.8k|      act_prob = cum_prob;
  500|  22.8k|    }
  501|    438|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 45, False: 393]
  ------------------
  502|     45|      return false;
  503|     45|    }
  504|    393|    return true;
  505|    438|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    181|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    181|    unsigned x;
  423|    181|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 1, False: 180]
  ------------------
  424|      1|      return 1;
  425|      1|    }
  426|    180|    ans_.buf = buf;
  427|    180|    x = buf[offset - 1] >> 6;
  428|    180|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 53, False: 127]
  ------------------
  429|     53|      ans_.buf_offset = offset - 1;
  430|     53|      ans_.state = buf[offset - 1] & 0x3F;
  431|    127|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 10, False: 117]
  ------------------
  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|    117|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 38, False: 79]
  ------------------
  438|     38|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 6, False: 32]
  ------------------
  439|      6|        return 1;
  440|      6|      }
  441|     32|      ans_.buf_offset = offset - 3;
  442|     32|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     79|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 79, False: 0]
  ------------------
  444|     79|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 1, False: 78]
  ------------------
  445|      1|        return 1;
  446|      1|      }
  447|     78|      ans_.buf_offset = offset - 4;
  448|     78|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     78|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    173|    ans_.state += l_rans_base;
  453|    173|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    173|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 24, False: 149]
  ------------------
  454|     24|      return 1;
  455|     24|    }
  456|    149|    return 0;
  457|    173|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  465|  9.98M|  inline int rans_read() {
  466|  9.98M|    unsigned rem;
  467|  9.98M|    unsigned quo;
  468|  9.98M|    struct rans_dec_sym sym;
  469|  9.98M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 7.60M, False: 2.38M]
  |  Branch (469:40): [True: 4.77k, False: 7.60M]
  ------------------
  470|  4.77k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.77k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  4.77k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  9.98M|    quo = ans_.state / rans_precision;
  475|  9.98M|    rem = ans_.state % rans_precision;
  476|  9.98M|    fetch_sym(&sym, rem);
  477|  9.98M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  9.98M|    return sym.val;
  479|  9.98M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  508|  9.98M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  9.98M|    uint32_t symbol = lut_table_[rem];
  510|  9.98M|    out->val = symbol;
  511|  9.98M|    out->prob = probability_table_[symbol].prob;
  512|  9.98M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  9.98M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  459|    149|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|    764|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|    764|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    764|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 764]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    764|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    764|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    764|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 112, False: 652]
  ------------------
   67|    112|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 112]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|    112|  } else
   72|    652|#endif
   73|    652|  {
   74|    652|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 645]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    652|  }
   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|    757|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 76, False: 681]
  ------------------
   83|     76|    return false;
   84|     76|  }
   85|    681|  probability_table_.resize(num_symbols_);
   86|    681|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 147, False: 534]
  ------------------
   87|    147|    return true;
   88|    147|  }
   89|       |  // Decode the table.
   90|  1.39M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.39M, False: 352]
  ------------------
   91|  1.39M|    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.39M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 40, False: 1.39M]
  ------------------
   95|     40|      return false;
   96|     40|    }
   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.39M|    const int token = prob_data & 3;
  102|  1.39M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 380k, False: 1.01M]
  ------------------
  103|   380k|      const uint32_t offset = prob_data >> 2;
  104|   380k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 129, False: 379k]
  ------------------
  105|    129|        return false;
  106|    129|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  18.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 17.6M, False: 379k]
  ------------------
  109|  17.6M|        probability_table_[i + j] = 0;
  110|  17.6M|      }
  111|   379k|      i += offset;
  112|  1.01M|    } else {
  113|  1.01M|      const int extra_bytes = token;
  114|  1.01M|      uint32_t prob = prob_data >> 2;
  115|  2.02M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.01M, False: 1.01M]
  ------------------
  116|  1.01M|        uint8_t eb;
  117|  1.01M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 1.01M]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.01M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.01M|      }
  124|  1.01M|      probability_table_[i] = prob;
  125|  1.01M|    }
  126|  1.39M|  }
  127|    352|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 85, False: 267]
  ------------------
  128|     85|    return false;
  129|     85|  }
  130|    267|  return true;
  131|    352|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    363|    DecoderBuffer* buffer) {
  136|    363|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    363|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    363|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    363|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 343]
  ------------------
  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|    343|#endif
  146|    343|  {
  147|    343|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 341]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    343|  }
  151|    361|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 29, False: 332]
  ------------------
  152|     29|    return false;
  153|     29|  }
  154|    332|  const uint8_t* const data_head =
  155|    332|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    332|  buffer->Advance(bytes_encoded);
  158|    332|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 51, False: 281]
  ------------------
  159|     51|    return false;
  160|     51|  }
  161|    281|  return true;
  162|    332|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    332|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  15.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    254|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    254|  ans_.read_end();
  167|    254|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    348|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    348|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    348|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 348]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    348|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    348|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 88, False: 260]
  ------------------
   67|     88|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 88]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     88|  } else
   72|    260|#endif
   73|    260|  {
   74|    260|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 259]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    260|  }
   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|    347|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 61, False: 286]
  ------------------
   83|     61|    return false;
   84|     61|  }
   85|    286|  probability_table_.resize(num_symbols_);
   86|    286|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 275]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  1.05M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.05M, False: 204]
  ------------------
   91|  1.05M|    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.05M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 26, False: 1.05M]
  ------------------
   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.05M|    const int token = prob_data & 3;
  102|  1.05M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 564k, False: 494k]
  ------------------
  103|   564k|      const uint32_t offset = prob_data >> 2;
  104|   564k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 564k]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  24.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 23.9M, False: 564k]
  ------------------
  109|  23.9M|        probability_table_[i + j] = 0;
  110|  23.9M|      }
  111|   564k|      i += offset;
  112|   564k|    } else {
  113|   494k|      const int extra_bytes = token;
  114|   494k|      uint32_t prob = prob_data >> 2;
  115|   839k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 344k, False: 494k]
  ------------------
  116|   344k|        uint8_t eb;
  117|   344k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 344k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   344k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   344k|      }
  124|   494k|      probability_table_[i] = prob;
  125|   494k|    }
  126|  1.05M|  }
  127|    204|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 110, False: 94]
  ------------------
  128|    110|    return false;
  129|    110|  }
  130|     94|  return true;
  131|    204|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    105|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|     94|    DecoderBuffer* buffer) {
  136|     94|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     94|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     94|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     94|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 4, False: 90]
  ------------------
  140|      4|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 4]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      4|  } else
  145|     90|#endif
  146|     90|  {
  147|     90|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 87]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|     90|  }
  151|     91|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 7, False: 84]
  ------------------
  152|      7|    return false;
  153|      7|  }
  154|     84|  const uint8_t* const data_head =
  155|     84|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     84|  buffer->Advance(bytes_encoded);
  158|     84|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 80]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     80|  return true;
  162|     84|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  16.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|     80|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     80|  ans_.read_end();
  167|     80|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    148|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_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: 3, False: 145]
  ------------------
   67|      3|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 3]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      3|  } else
   72|    145|#endif
   73|    145|  {
   74|    145|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 145]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    145|  }
   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: 5, False: 143]
  ------------------
   83|      5|    return false;
   84|      5|  }
   85|    143|  probability_table_.resize(num_symbols_);
   86|    143|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 141]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|  12.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 12.7k, False: 114]
  ------------------
   91|  12.7k|    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|  12.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 10, False: 12.6k]
  ------------------
   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|  12.6k|    const int token = prob_data & 3;
  102|  12.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.12k, False: 8.56k]
  ------------------
  103|  4.12k|      const uint32_t offset = prob_data >> 2;
  104|  4.12k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 8, False: 4.11k]
  ------------------
  105|      8|        return false;
  106|      8|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   160k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 156k, False: 4.11k]
  ------------------
  109|   156k|        probability_table_[i + j] = 0;
  110|   156k|      }
  111|  4.11k|      i += offset;
  112|  8.56k|    } else {
  113|  8.56k|      const int extra_bytes = token;
  114|  8.56k|      uint32_t prob = prob_data >> 2;
  115|  13.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 5.19k, False: 8.55k]
  ------------------
  116|  5.19k|        uint8_t eb;
  117|  5.19k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 9, False: 5.18k]
  ------------------
  118|      9|          return false;
  119|      9|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  5.18k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  5.18k|      }
  124|  8.55k|      probability_table_[i] = prob;
  125|  8.55k|    }
  126|  12.6k|  }
  127|    114|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 12, False: 102]
  ------------------
  128|     12|    return false;
  129|     12|  }
  130|    102|  return true;
  131|    114|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    104|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    102|    DecoderBuffer* buffer) {
  136|    102|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    102|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    102|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    102|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 102]
  ------------------
  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|    102|#endif
  146|    102|  {
  147|    102|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 100]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    102|  }
  151|    100|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 2, False: 98]
  ------------------
  152|      2|    return false;
  153|      2|  }
  154|     98|  const uint8_t* const data_head =
  155|     98|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     98|  buffer->Advance(bytes_encoded);
  158|     98|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 94]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     94|  return true;
  162|     98|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|   550k|  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|    171|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    171|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    171|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 171]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    171|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    171|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 20, False: 151]
  ------------------
   67|     20|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 20]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     20|  } else
   72|    151|#endif
   73|    151|  {
   74|    151|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 3, False: 148]
  ------------------
   75|      3|      return false;
   76|      3|    }
   77|    151|  }
   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|    168|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 168]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|    168|  probability_table_.resize(num_symbols_);
   86|    168|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 154]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  20.3k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 20.2k, False: 120]
  ------------------
   91|  20.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|  20.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 19, False: 20.2k]
  ------------------
   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|  20.2k|    const int token = prob_data & 3;
  102|  20.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 10.7k, False: 9.45k]
  ------------------
  103|  10.7k|      const uint32_t offset = prob_data >> 2;
  104|  10.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 11, False: 10.7k]
  ------------------
  105|     11|        return false;
  106|     11|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   482k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 471k, False: 10.7k]
  ------------------
  109|   471k|        probability_table_[i + j] = 0;
  110|   471k|      }
  111|  10.7k|      i += offset;
  112|  10.7k|    } else {
  113|  9.45k|      const int extra_bytes = token;
  114|  9.45k|      uint32_t prob = prob_data >> 2;
  115|  17.1k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 7.70k, False: 9.44k]
  ------------------
  116|  7.70k|        uint8_t eb;
  117|  7.70k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 4, False: 7.70k]
  ------------------
  118|      4|          return false;
  119|      4|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  7.70k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  7.70k|      }
  124|  9.44k|      probability_table_[i] = prob;
  125|  9.44k|    }
  126|  20.2k|  }
  127|    120|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 12, False: 108]
  ------------------
  128|     12|    return false;
  129|     12|  }
  130|    108|  return true;
  131|    120|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    122|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    108|    DecoderBuffer* buffer) {
  136|    108|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    108|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    108|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    108|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 6, False: 102]
  ------------------
  140|      6|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 6]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      6|  } else
  145|    102|#endif
  146|    102|  {
  147|    102|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 102]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    102|  }
  151|    108|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 3, False: 105]
  ------------------
  152|      3|    return false;
  153|      3|  }
  154|    105|  const uint8_t* const data_head =
  155|    105|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    105|  buffer->Advance(bytes_encoded);
  158|    105|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 11, False: 94]
  ------------------
  159|     11|    return false;
  160|     11|  }
  161|     94|  return true;
  162|    105|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  7.55M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|     94|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     94|  ans_.read_end();
  167|     94|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    126|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_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: 17, False: 109]
  ------------------
   67|     17|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 17]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     17|  } else
   72|    109|#endif
   73|    109|  {
   74|    109|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 109]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    109|  }
   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|  69.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 69.0k, False: 100]
  ------------------
   91|  69.0k|    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|  69.0k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 12, False: 69.0k]
  ------------------
   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|  69.0k|    const int token = prob_data & 3;
  102|  69.0k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 67.4k, False: 1.64k]
  ------------------
  103|  67.4k|      const uint32_t offset = prob_data >> 2;
  104|  67.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 5, False: 67.4k]
  ------------------
  105|      5|        return false;
  106|      5|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.93M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.86M, False: 67.4k]
  ------------------
  109|  3.86M|        probability_table_[i + j] = 0;
  110|  3.86M|      }
  111|  67.4k|      i += offset;
  112|  67.4k|    } else {
  113|  1.64k|      const int extra_bytes = token;
  114|  1.64k|      uint32_t prob = prob_data >> 2;
  115|  2.76k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.12k, False: 1.64k]
  ------------------
  116|  1.12k|        uint8_t eb;
  117|  1.12k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 4, False: 1.12k]
  ------------------
  118|      4|          return false;
  119|      4|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.12k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.12k|      }
  124|  1.64k|      probability_table_[i] = prob;
  125|  1.64k|    }
  126|  69.0k|  }
  127|    100|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 7, False: 93]
  ------------------
  128|      7|    return false;
  129|      7|  }
  130|     93|  return true;
  131|    100|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|     93|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|     93|    DecoderBuffer* buffer) {
  136|     93|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     93|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     93|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     93|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 12, False: 81]
  ------------------
  140|     12|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 11]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     12|  } 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|     92|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 12, False: 80]
  ------------------
  152|     12|    return false;
  153|     12|  }
  154|     80|  const uint8_t* const data_head =
  155|     80|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     80|  buffer->Advance(bytes_encoded);
  158|     80|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 17, False: 63]
  ------------------
  159|     17|    return false;
  160|     17|  }
  161|     63|  return true;
  162|     80|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  8.26M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|     63|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     63|  ans_.read_end();
  167|     63|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    183|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    183|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    183|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 183]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    183|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    183|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    183|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 162]
  ------------------
   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|    162|#endif
   73|    162|  {
   74|    162|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 162]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    162|  }
   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|    183|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 3, False: 180]
  ------------------
   83|      3|    return false;
   84|      3|  }
   85|    180|  probability_table_.resize(num_symbols_);
   86|    180|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 3, False: 177]
  ------------------
   87|      3|    return true;
   88|      3|  }
   89|       |  // Decode the table.
   90|  35.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 35.0k, False: 141]
  ------------------
   91|  35.0k|    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|  35.0k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 16, False: 35.0k]
  ------------------
   95|     16|      return false;
   96|     16|    }
   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|  35.0k|    const int token = prob_data & 3;
  102|  35.0k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 13.3k, False: 21.6k]
  ------------------
  103|  13.3k|      const uint32_t offset = prob_data >> 2;
  104|  13.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 13.3k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   355k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 342k, False: 13.3k]
  ------------------
  109|   342k|        probability_table_[i + j] = 0;
  110|   342k|      }
  111|  13.3k|      i += offset;
  112|  21.6k|    } else {
  113|  21.6k|      const int extra_bytes = token;
  114|  21.6k|      uint32_t prob = prob_data >> 2;
  115|  40.6k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 18.9k, False: 21.6k]
  ------------------
  116|  18.9k|        uint8_t eb;
  117|  18.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 6, False: 18.9k]
  ------------------
  118|      6|          return false;
  119|      6|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  18.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  18.9k|      }
  124|  21.6k|      probability_table_[i] = prob;
  125|  21.6k|    }
  126|  35.0k|  }
  127|    141|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 1, False: 140]
  ------------------
  128|      1|    return false;
  129|      1|  }
  130|    140|  return true;
  131|    141|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    143|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    140|    DecoderBuffer* buffer) {
  136|    140|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    140|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    140|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    140|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 16, False: 124]
  ------------------
  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|    124|#endif
  146|    124|  {
  147|    124|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 124]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    124|  }
  151|    140|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 19, False: 121]
  ------------------
  152|     19|    return false;
  153|     19|  }
  154|    121|  const uint8_t* const data_head =
  155|    121|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    121|  buffer->Advance(bytes_encoded);
  158|    121|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 15, False: 106]
  ------------------
  159|     15|    return false;
  160|     15|  }
  161|    106|  return true;
  162|    121|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  12.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    106|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    106|  ans_.read_end();
  167|    106|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    120|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    120|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    120|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 120]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    120|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    120|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    120|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 101]
  ------------------
   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|    101|#endif
   73|    101|  {
   74|    101|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 97]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    101|  }
   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|    116|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 116]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|    116|  probability_table_.resize(num_symbols_);
   86|    116|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 116]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   253k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 252k, False: 92]
  ------------------
   91|   252k|    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|   252k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 10, False: 252k]
  ------------------
   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|   252k|    const int token = prob_data & 3;
  102|   252k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 8.31k, False: 244k]
  ------------------
  103|  8.31k|      const uint32_t offset = prob_data >> 2;
  104|  8.31k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 6, False: 8.30k]
  ------------------
  105|      6|        return false;
  106|      6|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   286k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 278k, False: 8.30k]
  ------------------
  109|   278k|        probability_table_[i + j] = 0;
  110|   278k|      }
  111|  8.30k|      i += offset;
  112|   244k|    } else {
  113|   244k|      const int extra_bytes = token;
  114|   244k|      uint32_t prob = prob_data >> 2;
  115|   491k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 246k, False: 244k]
  ------------------
  116|   246k|        uint8_t eb;
  117|   246k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 8, False: 246k]
  ------------------
  118|      8|          return false;
  119|      8|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   246k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   246k|      }
  124|   244k|      probability_table_[i] = prob;
  125|   244k|    }
  126|   252k|  }
  127|     92|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 6, False: 86]
  ------------------
  128|      6|    return false;
  129|      6|  }
  130|     86|  return true;
  131|     92|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|     86|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_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: 15, False: 71]
  ------------------
  140|     15|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 14]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     15|  } 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|     85|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 14, False: 71]
  ------------------
  152|     14|    return false;
  153|     14|  }
  154|     71|  const uint8_t* const data_head =
  155|     71|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     71|  buffer->Advance(bytes_encoded);
  158|     71|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 19, False: 52]
  ------------------
  159|     19|    return false;
  160|     19|  }
  161|     52|  return true;
  162|     71|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  16.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|     52|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     52|  ans_.read_end();
  167|     52|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|     77|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|     77|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     77|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 77]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     77|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     77|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     77|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 18, False: 59]
  ------------------
   67|     18|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 18]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     18|  } else
   72|     59|#endif
   73|     59|  {
   74|     59|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 58]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|     59|  }
   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|     76|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 4, False: 72]
  ------------------
   83|      4|    return false;
   84|      4|  }
   85|     72|  probability_table_.resize(num_symbols_);
   86|     72|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 71]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  3.36k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 3.31k, False: 48]
  ------------------
   91|  3.31k|    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|  3.31k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 14, False: 3.30k]
  ------------------
   95|     14|      return false;
   96|     14|    }
   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|  3.30k|    const int token = prob_data & 3;
  102|  3.30k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.76k, False: 1.54k]
  ------------------
  103|  1.76k|      const uint32_t offset = prob_data >> 2;
  104|  1.76k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 7, False: 1.75k]
  ------------------
  105|      7|        return false;
  106|      7|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  65.8k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 64.1k, False: 1.75k]
  ------------------
  109|  64.1k|        probability_table_[i + j] = 0;
  110|  64.1k|      }
  111|  1.75k|      i += offset;
  112|  1.75k|    } else {
  113|  1.54k|      const int extra_bytes = token;
  114|  1.54k|      uint32_t prob = prob_data >> 2;
  115|  2.64k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.09k, False: 1.54k]
  ------------------
  116|  1.09k|        uint8_t eb;
  117|  1.09k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 2, False: 1.09k]
  ------------------
  118|      2|          return false;
  119|      2|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.09k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.09k|      }
  124|  1.54k|      probability_table_[i] = prob;
  125|  1.54k|    }
  126|  3.30k|  }
  127|     48|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 3, False: 45]
  ------------------
  128|      3|    return false;
  129|      3|  }
  130|     45|  return true;
  131|     48|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|     46|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|     45|    DecoderBuffer* buffer) {
  136|     45|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     45|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     45|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     45|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 32]
  ------------------
  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|     32|#endif
  146|     32|  {
  147|     32|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 32]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     32|  }
  151|     45|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 14, False: 31]
  ------------------
  152|     14|    return false;
  153|     14|  }
  154|     31|  const uint8_t* const data_head =
  155|     31|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     31|  buffer->Advance(bytes_encoded);
  158|     31|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 2, False: 29]
  ------------------
  159|      2|    return false;
  160|      2|  }
  161|     29|  return true;
  162|     31|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  7.19M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|     29|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     29|  ans_.read_end();
  167|     29|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    101|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    101|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    101|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 101]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    101|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    101|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    101|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 5, False: 96]
  ------------------
   67|      5|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 5]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      5|  } else
   72|     96|#endif
   73|     96|  {
   74|     96|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 96]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     96|  }
   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|    101|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 2, False: 99]
  ------------------
   83|      2|    return false;
   84|      2|  }
   85|     99|  probability_table_.resize(num_symbols_);
   86|     99|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 4, False: 95]
  ------------------
   87|      4|    return true;
   88|      4|  }
   89|       |  // Decode the table.
   90|  44.7k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 44.6k, False: 69]
  ------------------
   91|  44.6k|    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|  44.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 7, False: 44.6k]
  ------------------
   95|      7|      return false;
   96|      7|    }
   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|  44.6k|    const int token = prob_data & 3;
  102|  44.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 14.4k, False: 30.2k]
  ------------------
  103|  14.4k|      const uint32_t offset = prob_data >> 2;
  104|  14.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 15, False: 14.4k]
  ------------------
  105|     15|        return false;
  106|     15|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   467k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 453k, False: 14.4k]
  ------------------
  109|   453k|        probability_table_[i + j] = 0;
  110|   453k|      }
  111|  14.4k|      i += offset;
  112|  30.2k|    } else {
  113|  30.2k|      const int extra_bytes = token;
  114|  30.2k|      uint32_t prob = prob_data >> 2;
  115|  58.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 28.5k, False: 30.2k]
  ------------------
  116|  28.5k|        uint8_t eb;
  117|  28.5k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 4, False: 28.5k]
  ------------------
  118|      4|          return false;
  119|      4|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  28.5k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  28.5k|      }
  124|  30.2k|      probability_table_[i] = prob;
  125|  30.2k|    }
  126|  44.6k|  }
  127|     69|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 16, False: 53]
  ------------------
  128|     16|    return false;
  129|     16|  }
  130|     53|  return true;
  131|     69|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|     57|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|     53|    DecoderBuffer* buffer) {
  136|     53|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     53|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     53|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     53|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 53]
  ------------------
  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|     53|#endif
  146|     53|  {
  147|     53|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 53]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     53|  }
  151|     53|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 7, False: 46]
  ------------------
  152|      7|    return false;
  153|      7|  }
  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: 3, False: 43]
  ------------------
  159|      3|    return false;
  160|      3|  }
  161|     43|  return true;
  162|     46|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  13.6M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|     43|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     43|  ans_.read_end();
  167|     43|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    137|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    137|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    137|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 137]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    137|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    137|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    137|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 37, False: 100]
  ------------------
   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|    100|#endif
   73|    100|  {
   74|    100|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 100]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    100|  }
   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|    137|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 2, False: 135]
  ------------------
   83|      2|    return false;
   84|      2|  }
   85|    135|  probability_table_.resize(num_symbols_);
   86|    135|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 135]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  43.6k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 43.5k, False: 105]
  ------------------
   91|  43.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|  43.5k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 14, False: 43.5k]
  ------------------
   95|     14|      return false;
   96|     14|    }
   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|  43.5k|    const int token = prob_data & 3;
  102|  43.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 5.33k, False: 38.1k]
  ------------------
  103|  5.33k|      const uint32_t offset = prob_data >> 2;
  104|  5.33k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 5, False: 5.33k]
  ------------------
  105|      5|        return false;
  106|      5|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   224k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 219k, False: 5.33k]
  ------------------
  109|   219k|        probability_table_[i + j] = 0;
  110|   219k|      }
  111|  5.33k|      i += offset;
  112|  38.1k|    } else {
  113|  38.1k|      const int extra_bytes = token;
  114|  38.1k|      uint32_t prob = prob_data >> 2;
  115|  72.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 34.7k, False: 38.1k]
  ------------------
  116|  34.7k|        uint8_t eb;
  117|  34.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 34.7k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  34.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  34.7k|      }
  124|  38.1k|      probability_table_[i] = prob;
  125|  38.1k|    }
  126|  43.5k|  }
  127|    105|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 82]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|     82|  return true;
  131|    105|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|     82|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|     82|    DecoderBuffer* buffer) {
  136|     82|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     82|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     82|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     82|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 28, False: 54]
  ------------------
  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|     54|#endif
  146|     54|  {
  147|     54|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 45]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|     54|  }
  151|     73|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 33, False: 40]
  ------------------
  152|     33|    return false;
  153|     33|  }
  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: 8, False: 32]
  ------------------
  159|      8|    return false;
  160|      8|  }
  161|     32|  return true;
  162|     40|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   247k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     32|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     32|  ans_.read_end();
  167|     32|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    130|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    130|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    130|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 130]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    130|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    130|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    130|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 25, False: 105]
  ------------------
   67|     25|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 25]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     25|  } 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|    130|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 114]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    114|  probability_table_.resize(num_symbols_);
   86|    114|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 114]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  98.7k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 98.6k, False: 80]
  ------------------
   91|  98.6k|    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|  98.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 17, False: 98.6k]
  ------------------
   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|  98.6k|    const int token = prob_data & 3;
  102|  98.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 17.9k, False: 80.6k]
  ------------------
  103|  17.9k|      const uint32_t offset = prob_data >> 2;
  104|  17.9k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 12, False: 17.9k]
  ------------------
  105|     12|        return false;
  106|     12|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   629k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 611k, False: 17.9k]
  ------------------
  109|   611k|        probability_table_[i + j] = 0;
  110|   611k|      }
  111|  17.9k|      i += offset;
  112|  80.6k|    } else {
  113|  80.6k|      const int extra_bytes = token;
  114|  80.6k|      uint32_t prob = prob_data >> 2;
  115|   144k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 63.7k, False: 80.6k]
  ------------------
  116|  63.7k|        uint8_t eb;
  117|  63.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 63.7k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  63.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  63.7k|      }
  124|  80.6k|      probability_table_[i] = prob;
  125|  80.6k|    }
  126|  98.6k|  }
  127|     80|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 20, False: 60]
  ------------------
  128|     20|    return false;
  129|     20|  }
  130|     60|  return true;
  131|     80|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|     60|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_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: 0, False: 60]
  ------------------
  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|     60|#endif
  146|     60|  {
  147|     60|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 60]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     60|  }
  151|     60|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 11, False: 49]
  ------------------
  152|     11|    return false;
  153|     11|  }
  154|     49|  const uint8_t* const data_head =
  155|     49|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     49|  buffer->Advance(bytes_encoded);
  158|     49|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 15, False: 34]
  ------------------
  159|     15|    return false;
  160|     15|  }
  161|     34|  return true;
  162|     49|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   180k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     34|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     34|  ans_.read_end();
  167|     34|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|     85|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|     85|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     85|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 85]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     85|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     85|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     85|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 17, False: 68]
  ------------------
   67|     17|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 17]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     17|  } else
   72|     68|#endif
   73|     68|  {
   74|     68|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 68]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     68|  }
   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|     85|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 84]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|     84|  probability_table_.resize(num_symbols_);
   86|     84|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 84]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   855k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 855k, False: 43]
  ------------------
   91|   855k|    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|   855k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 15, False: 855k]
  ------------------
   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|   855k|    const int token = prob_data & 3;
  102|   855k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 501k, False: 353k]
  ------------------
  103|   501k|      const uint32_t offset = prob_data >> 2;
  104|   501k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 501k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  21.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 20.9M, False: 501k]
  ------------------
  109|  20.9M|        probability_table_[i + j] = 0;
  110|  20.9M|      }
  111|   501k|      i += offset;
  112|   501k|    } else {
  113|   353k|      const int extra_bytes = token;
  114|   353k|      uint32_t prob = prob_data >> 2;
  115|   729k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 376k, False: 353k]
  ------------------
  116|   376k|        uint8_t eb;
  117|   376k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 8, False: 376k]
  ------------------
  118|      8|          return false;
  119|      8|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   376k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   376k|      }
  124|   353k|      probability_table_[i] = prob;
  125|   353k|    }
  126|   855k|  }
  127|     43|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 12, False: 31]
  ------------------
  128|     12|    return false;
  129|     12|  }
  130|     31|  return true;
  131|     43|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|     31|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|     31|    DecoderBuffer* buffer) {
  136|     31|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     31|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     31|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     31|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 30]
  ------------------
  140|      1|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      1|  } else
  145|     30|#endif
  146|     30|  {
  147|     30|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 29]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|     30|  }
  151|     30|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 3, False: 27]
  ------------------
  152|      3|    return false;
  153|      3|  }
  154|     27|  const uint8_t* const data_head =
  155|     27|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     27|  buffer->Advance(bytes_encoded);
  158|     27|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 11, False: 16]
  ------------------
  159|     11|    return false;
  160|     11|  }
  161|     16|  return true;
  162|     27|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  66.7k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     16|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     16|  ans_.read_end();
  167|     16|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    128|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    128|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    128|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 128]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    128|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    128|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    128|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 14, False: 114]
  ------------------
   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|    114|#endif
   73|    114|  {
   74|    114|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 114]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    114|  }
   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|    128|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 127]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|    127|  probability_table_.resize(num_symbols_);
   86|    127|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 118]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  1.24M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.24M, False: 74]
  ------------------
   91|  1.24M|    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.24M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 18, False: 1.24M]
  ------------------
   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|  1.24M|    const int token = prob_data & 3;
  102|  1.24M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 775k, False: 469k]
  ------------------
  103|   775k|      const uint32_t offset = prob_data >> 2;
  104|   775k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 17, False: 775k]
  ------------------
  105|     17|        return false;
  106|     17|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  44.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 43.7M, False: 775k]
  ------------------
  109|  43.7M|        probability_table_[i + j] = 0;
  110|  43.7M|      }
  111|   775k|      i += offset;
  112|   775k|    } else {
  113|   469k|      const int extra_bytes = token;
  114|   469k|      uint32_t prob = prob_data >> 2;
  115|   552k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 83.4k, False: 469k]
  ------------------
  116|  83.4k|        uint8_t eb;
  117|  83.4k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 9, False: 83.4k]
  ------------------
  118|      9|          return false;
  119|      9|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  83.4k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  83.4k|      }
  124|   469k|      probability_table_[i] = prob;
  125|   469k|    }
  126|  1.24M|  }
  127|     74|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 15, False: 59]
  ------------------
  128|     15|    return false;
  129|     15|  }
  130|     59|  return true;
  131|     74|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|     68|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|     59|    DecoderBuffer* buffer) {
  136|     59|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     59|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     59|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     59|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 10, False: 49]
  ------------------
  140|     10|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 10]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     10|  } else
  145|     49|#endif
  146|     49|  {
  147|     49|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 49]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     49|  }
  151|     59|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 30, False: 29]
  ------------------
  152|     30|    return false;
  153|     30|  }
  154|     29|  const uint8_t* const data_head =
  155|     29|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     29|  buffer->Advance(bytes_encoded);
  158|     29|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 7, False: 22]
  ------------------
  159|      7|    return false;
  160|      7|  }
  161|     22|  return true;
  162|     29|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|  46.4k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     22|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     22|  ans_.read_end();
  167|     22|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    120|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    120|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    120|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 120]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    120|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    120|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    120|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 101]
  ------------------
   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|    101|#endif
   73|    101|  {
   74|    101|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 101]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    101|  }
   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|    120|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 6, False: 114]
  ------------------
   83|      6|    return false;
   84|      6|  }
   85|    114|  probability_table_.resize(num_symbols_);
   86|    114|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 112]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|  1.07M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.07M, False: 64]
  ------------------
   91|  1.07M|    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.07M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 28, False: 1.07M]
  ------------------
   95|     28|      return false;
   96|     28|    }
   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.07M|    const int token = prob_data & 3;
  102|  1.07M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 641k, False: 434k]
  ------------------
  103|   641k|      const uint32_t offset = prob_data >> 2;
  104|   641k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 13, False: 641k]
  ------------------
  105|     13|        return false;
  106|     13|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  27.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 26.8M, False: 641k]
  ------------------
  109|  26.8M|        probability_table_[i + j] = 0;
  110|  26.8M|      }
  111|   641k|      i += offset;
  112|   641k|    } else {
  113|   434k|      const int extra_bytes = token;
  114|   434k|      uint32_t prob = prob_data >> 2;
  115|   809k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 374k, False: 434k]
  ------------------
  116|   374k|        uint8_t eb;
  117|   374k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 7, False: 374k]
  ------------------
  118|      7|          return false;
  119|      7|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   374k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   374k|      }
  124|   434k|      probability_table_[i] = prob;
  125|   434k|    }
  126|  1.07M|  }
  127|     64|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 20, False: 44]
  ------------------
  128|     20|    return false;
  129|     20|  }
  130|     44|  return true;
  131|     64|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|     46|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|     44|    DecoderBuffer* buffer) {
  136|     44|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     44|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     44|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     44|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 5, False: 39]
  ------------------
  140|      5|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 5]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      5|  } else
  145|     39|#endif
  146|     39|  {
  147|     39|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 39]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     39|  }
  151|     44|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 9, False: 35]
  ------------------
  152|      9|    return false;
  153|      9|  }
  154|     35|  const uint8_t* const data_head =
  155|     35|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     35|  buffer->Advance(bytes_encoded);
  158|     35|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 31]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     31|  return true;
  162|     35|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  84.2k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     31|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     31|  ans_.read_end();
  167|     31|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    190|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    190|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    190|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 190]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    190|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    190|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    190|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 91, False: 99]
  ------------------
   67|     91|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 91]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     91|  } else
   72|     99|#endif
   73|     99|  {
   74|     99|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 99]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     99|  }
   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|    190|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 176]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    176|  probability_table_.resize(num_symbols_);
   86|    176|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 176]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  1.00M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.00M, False: 124]
  ------------------
   91|  1.00M|    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.00M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 26, False: 1.00M]
  ------------------
   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.00M|    const int token = prob_data & 3;
  102|  1.00M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 838k, False: 161k]
  ------------------
  103|   838k|      const uint32_t offset = prob_data >> 2;
  104|   838k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 17, False: 838k]
  ------------------
  105|     17|        return false;
  106|     17|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  49.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 48.2M, False: 838k]
  ------------------
  109|  48.2M|        probability_table_[i + j] = 0;
  110|  48.2M|      }
  111|   838k|      i += offset;
  112|   838k|    } else {
  113|   161k|      const int extra_bytes = token;
  114|   161k|      uint32_t prob = prob_data >> 2;
  115|   265k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 103k, False: 161k]
  ------------------
  116|   103k|        uint8_t eb;
  117|   103k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 9, False: 103k]
  ------------------
  118|      9|          return false;
  119|      9|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   103k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   103k|      }
  124|   161k|      probability_table_[i] = prob;
  125|   161k|    }
  126|  1.00M|  }
  127|    124|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 5, False: 119]
  ------------------
  128|      5|    return false;
  129|      5|  }
  130|    119|  return true;
  131|    124|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    119|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    119|    DecoderBuffer* buffer) {
  136|    119|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    119|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    119|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    119|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 68, False: 51]
  ------------------
  140|     68|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 68]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     68|  } 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|    119|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 70, False: 49]
  ------------------
  152|     70|    return false;
  153|     70|  }
  154|     49|  const uint8_t* const data_head =
  155|     49|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     49|  buffer->Advance(bytes_encoded);
  158|     49|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 17, False: 32]
  ------------------
  159|     17|    return false;
  160|     17|  }
  161|     32|  return true;
  162|     49|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   192k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     32|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     32|  ans_.read_end();
  167|     32|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    110|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    110|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    110|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 110]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    110|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    110|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    110|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 40, False: 70]
  ------------------
   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|     70|#endif
   73|     70|  {
   74|     70|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 70]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     70|  }
   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|    110|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 110]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|    110|  probability_table_.resize(num_symbols_);
   86|    110|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 110]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  3.34k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 3.25k, False: 87]
  ------------------
   91|  3.25k|    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|  3.25k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 10, False: 3.24k]
  ------------------
   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|  3.24k|    const int token = prob_data & 3;
  102|  3.24k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.79k, False: 1.45k]
  ------------------
  103|  1.79k|      const uint32_t offset = prob_data >> 2;
  104|  1.79k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 8, False: 1.78k]
  ------------------
  105|      8|        return false;
  106|      8|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  67.8k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 66.0k, False: 1.78k]
  ------------------
  109|  66.0k|        probability_table_[i + j] = 0;
  110|  66.0k|      }
  111|  1.78k|      i += offset;
  112|  1.78k|    } else {
  113|  1.45k|      const int extra_bytes = token;
  114|  1.45k|      uint32_t prob = prob_data >> 2;
  115|  2.59k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.14k, False: 1.44k]
  ------------------
  116|  1.14k|        uint8_t eb;
  117|  1.14k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 1.14k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.14k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.14k|      }
  124|  1.44k|      probability_table_[i] = prob;
  125|  1.44k|    }
  126|  3.24k|  }
  127|     87|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 83]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|     83|  return true;
  131|     87|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|     83|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|     83|    DecoderBuffer* buffer) {
  136|     83|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     83|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     83|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     83|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 39, False: 44]
  ------------------
  140|     39|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 39]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     39|  } else
  145|     44|#endif
  146|     44|  {
  147|     44|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 44]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     44|  }
  151|     83|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 50, False: 33]
  ------------------
  152|     50|    return false;
  153|     50|  }
  154|     33|  const uint8_t* const data_head =
  155|     33|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     33|  buffer->Advance(bytes_encoded);
  158|     33|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 29]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     29|  return true;
  162|     33|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|  70.6k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     29|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     29|  ans_.read_end();
  167|     29|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    119|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    119|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    119|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 119]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    119|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    119|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    119|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 30, False: 89]
  ------------------
   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|     89|#endif
   73|     89|  {
   74|     89|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 89]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     89|  }
   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|    119|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 102]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    102|  probability_table_.resize(num_symbols_);
   86|    102|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 102]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   872k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 872k, False: 60]
  ------------------
   91|   872k|    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|   872k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 20, False: 872k]
  ------------------
   95|     20|      return false;
   96|     20|    }
   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|   872k|    const int token = prob_data & 3;
  102|   872k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 293k, False: 578k]
  ------------------
  103|   293k|      const uint32_t offset = prob_data >> 2;
  104|   293k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 7, False: 293k]
  ------------------
  105|      7|        return false;
  106|      7|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  9.68M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.39M, False: 293k]
  ------------------
  109|  9.39M|        probability_table_[i + j] = 0;
  110|  9.39M|      }
  111|   293k|      i += offset;
  112|   578k|    } else {
  113|   578k|      const int extra_bytes = token;
  114|   578k|      uint32_t prob = prob_data >> 2;
  115|  1.14M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 563k, False: 578k]
  ------------------
  116|   563k|        uint8_t eb;
  117|   563k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 563k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   563k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   563k|      }
  124|   578k|      probability_table_[i] = prob;
  125|   578k|    }
  126|   872k|  }
  127|     60|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 6, False: 54]
  ------------------
  128|      6|    return false;
  129|      6|  }
  130|     54|  return true;
  131|     60|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|     54|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|     54|    DecoderBuffer* buffer) {
  136|     54|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     54|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     54|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     54|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 41]
  ------------------
  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|     41|#endif
  146|     41|  {
  147|     41|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 41]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     41|  }
  151|     54|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 24, False: 30]
  ------------------
  152|     24|    return false;
  153|     24|  }
  154|     30|  const uint8_t* const data_head =
  155|     30|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     30|  buffer->Advance(bytes_encoded);
  158|     30|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 7, False: 23]
  ------------------
  159|      7|    return false;
  160|      7|  }
  161|     23|  return true;
  162|     30|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|  69.6k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     23|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     23|  ans_.read_end();
  167|     23|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    229|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    229|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    229|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 229]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    229|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    229|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    229|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 143, False: 86]
  ------------------
   67|    143|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 143]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|    143|  } else
   72|     86|#endif
   73|     86|  {
   74|     86|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 86]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     86|  }
   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|    229|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 59, False: 170]
  ------------------
   83|     59|    return false;
   84|     59|  }
   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|   419k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 419k, False: 123]
  ------------------
   91|   419k|    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|   419k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 27, False: 419k]
  ------------------
   95|     27|      return false;
   96|     27|    }
   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|   419k|    const int token = prob_data & 3;
  102|   419k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 138k, False: 281k]
  ------------------
  103|   138k|      const uint32_t offset = prob_data >> 2;
  104|   138k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 6, False: 138k]
  ------------------
  105|      6|        return false;
  106|      6|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  4.60M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 4.46M, False: 138k]
  ------------------
  109|  4.46M|        probability_table_[i + j] = 0;
  110|  4.46M|      }
  111|   138k|      i += offset;
  112|   281k|    } else {
  113|   281k|      const int extra_bytes = token;
  114|   281k|      uint32_t prob = prob_data >> 2;
  115|   518k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 237k, False: 281k]
  ------------------
  116|   237k|        uint8_t eb;
  117|   237k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 14, False: 237k]
  ------------------
  118|     14|          return false;
  119|     14|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   237k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   237k|      }
  124|   281k|      probability_table_[i] = prob;
  125|   281k|    }
  126|   419k|  }
  127|    123|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 30, False: 93]
  ------------------
  128|     30|    return false;
  129|     30|  }
  130|     93|  return true;
  131|    123|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|     93|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|     93|    DecoderBuffer* buffer) {
  136|     93|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     93|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     93|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     93|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 50, False: 43]
  ------------------
  140|     50|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 49]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     50|  } else
  145|     43|#endif
  146|     43|  {
  147|     43|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 43]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     43|  }
  151|     92|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 58, False: 34]
  ------------------
  152|     58|    return false;
  153|     58|  }
  154|     34|  const uint8_t* const data_head =
  155|     34|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     34|  buffer->Advance(bytes_encoded);
  158|     34|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 34]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|     34|  return true;
  162|     34|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  9.56M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     34|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     34|  ans_.read_end();
  167|     34|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  4.98k|                   DecoderBuffer* src_buffer, uint32_t* out_values) {
   34|  4.98k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 30, False: 4.95k]
  ------------------
   35|     30|    return true;
   36|     30|  }
   37|       |  // Decode which scheme to use.
   38|  4.95k|  uint8_t scheme;
   39|  4.95k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 23, False: 4.92k]
  ------------------
   40|     23|    return false;
   41|     23|  }
   42|  4.92k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 657, False: 4.27k]
  ------------------
   43|    657|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|    657|                                                  src_buffer, out_values);
   45|  4.27k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 2.87k, False: 1.39k]
  ------------------
   46|  2.87k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  2.87k|                                               out_values);
   48|  2.87k|  }
   49|  1.39k|  return false;
   50|  4.92k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|    657|                         DecoderBuffer* src_buffer, uint32_t* out_values) {
   55|       |  // Decode the encoded data.
   56|    657|  SymbolDecoderT<5> tag_decoder;
   57|    657|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 333, False: 324]
  ------------------
   58|    333|    return false;
   59|    333|  }
   60|       |
   61|    324|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 82, False: 242]
  ------------------
   62|     82|    return false;
   63|     82|  }
   64|       |
   65|    242|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 242, False: 0]
  |  Branch (65:25): [True: 18, False: 224]
  ------------------
   66|     18|    return false;  // Wrong number of symbols.
   67|     18|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    224|  src_buffer->StartBitDecoding(false, nullptr);
   72|    224|  int value_id = 0;
   73|  3.17M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 3.17M, False: 215]
  ------------------
   74|       |    // Decode the tag.
   75|  3.17M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  9.55M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 6.37M, False: 3.17M]
  ------------------
   78|  6.37M|      uint32_t val;
   79|  6.37M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 9, False: 6.37M]
  ------------------
   80|      9|        return false;
   81|      9|      }
   82|  6.37M|      out_values[value_id++] = val;
   83|  6.37M|    }
   84|  3.17M|  }
   85|    215|  tag_decoder.EndDecoding();
   86|    215|  src_buffer->EndBitDecoding();
   87|    215|  return true;
   88|    224|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  2.87k|                      uint32_t* out_values) {
  117|  2.87k|  uint8_t max_bit_length;
  118|  2.87k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 2, False: 2.87k]
  ------------------
  119|      2|    return false;
  120|      2|  }
  121|  2.87k|  switch (max_bit_length) {
  122|    348|    case 1:
  ------------------
  |  Branch (122:5): [True: 348, False: 2.52k]
  ------------------
  123|    348|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    348|                                                         out_values);
  125|    148|    case 2:
  ------------------
  |  Branch (125:5): [True: 148, False: 2.72k]
  ------------------
  126|    148|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    148|                                                         out_values);
  128|    171|    case 3:
  ------------------
  |  Branch (128:5): [True: 171, False: 2.70k]
  ------------------
  129|    171|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    171|                                                         out_values);
  131|    126|    case 4:
  ------------------
  |  Branch (131:5): [True: 126, False: 2.74k]
  ------------------
  132|    126|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    126|                                                         out_values);
  134|    107|    case 5:
  ------------------
  |  Branch (134:5): [True: 107, False: 2.76k]
  ------------------
  135|    107|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    107|                                                         out_values);
  137|    183|    case 6:
  ------------------
  |  Branch (137:5): [True: 183, False: 2.69k]
  ------------------
  138|    183|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    183|                                                         out_values);
  140|    120|    case 7:
  ------------------
  |  Branch (140:5): [True: 120, False: 2.75k]
  ------------------
  141|    120|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    120|                                                         out_values);
  143|     77|    case 8:
  ------------------
  |  Branch (143:5): [True: 77, False: 2.79k]
  ------------------
  144|     77|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|     77|                                                         out_values);
  146|    101|    case 9:
  ------------------
  |  Branch (146:5): [True: 101, False: 2.77k]
  ------------------
  147|    101|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    101|                                                         out_values);
  149|    137|    case 10:
  ------------------
  |  Branch (149:5): [True: 137, False: 2.73k]
  ------------------
  150|    137|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    137|          num_values, src_buffer, out_values);
  152|    130|    case 11:
  ------------------
  |  Branch (152:5): [True: 130, False: 2.74k]
  ------------------
  153|    130|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    130|          num_values, src_buffer, out_values);
  155|     85|    case 12:
  ------------------
  |  Branch (155:5): [True: 85, False: 2.78k]
  ------------------
  156|     85|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|     85|          num_values, src_buffer, out_values);
  158|    128|    case 13:
  ------------------
  |  Branch (158:5): [True: 128, False: 2.74k]
  ------------------
  159|    128|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    128|          num_values, src_buffer, out_values);
  161|    120|    case 14:
  ------------------
  |  Branch (161:5): [True: 120, False: 2.75k]
  ------------------
  162|    120|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    120|          num_values, src_buffer, out_values);
  164|    190|    case 15:
  ------------------
  |  Branch (164:5): [True: 190, False: 2.68k]
  ------------------
  165|    190|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    190|          num_values, src_buffer, out_values);
  167|    110|    case 16:
  ------------------
  |  Branch (167:5): [True: 110, False: 2.76k]
  ------------------
  168|    110|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    110|          num_values, src_buffer, out_values);
  170|    119|    case 17:
  ------------------
  |  Branch (170:5): [True: 119, False: 2.75k]
  ------------------
  171|    119|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    119|          num_values, src_buffer, out_values);
  173|    229|    case 18:
  ------------------
  |  Branch (173:5): [True: 229, False: 2.64k]
  ------------------
  174|    229|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    229|          num_values, src_buffer, out_values);
  176|    245|    default:
  ------------------
  |  Branch (176:5): [True: 245, False: 2.62k]
  ------------------
  177|    245|      return false;
  178|  2.87k|  }
  179|  2.87k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    348|                              uint32_t* out_values) {
   93|    348|  SymbolDecoderT decoder;
   94|    348|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 243, False: 105]
  ------------------
   95|    243|    return false;
   96|    243|  }
   97|       |
   98|    105|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 105, False: 0]
  |  Branch (98:25): [True: 11, False: 94]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|     94|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 14, False: 80]
  ------------------
  103|     14|    return false;
  104|     14|  }
  105|  16.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 16.4M, False: 80]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  16.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  16.4M|    out_values[i] = value;
  109|  16.4M|  }
  110|     80|  decoder.EndDecoding();
  111|     80|  return true;
  112|     94|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    148|                              uint32_t* out_values) {
   93|    148|  SymbolDecoderT decoder;
   94|    148|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 44, False: 104]
  ------------------
   95|     44|    return false;
   96|     44|  }
   97|       |
   98|    104|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 104, False: 0]
  |  Branch (98:25): [True: 2, False: 102]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|    102|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 8, False: 94]
  ------------------
  103|      8|    return false;
  104|      8|  }
  105|   550k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 550k, False: 94]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   550k|    const uint32_t value = decoder.DecodeSymbol();
  108|   550k|    out_values[i] = value;
  109|   550k|  }
  110|     94|  decoder.EndDecoding();
  111|     94|  return true;
  112|    102|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    171|                              uint32_t* out_values) {
   93|    171|  SymbolDecoderT decoder;
   94|    171|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 49, False: 122]
  ------------------
   95|     49|    return false;
   96|     49|  }
   97|       |
   98|    122|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 122, False: 0]
  |  Branch (98:25): [True: 14, False: 108]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    108|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 14, False: 94]
  ------------------
  103|     14|    return false;
  104|     14|  }
  105|  7.55M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 7.55M, False: 94]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  7.55M|    const uint32_t value = decoder.DecodeSymbol();
  108|  7.55M|    out_values[i] = value;
  109|  7.55M|  }
  110|     94|  decoder.EndDecoding();
  111|     94|  return true;
  112|    108|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    126|                              uint32_t* out_values) {
   93|    126|  SymbolDecoderT decoder;
   94|    126|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 33, False: 93]
  ------------------
   95|     33|    return false;
   96|     33|  }
   97|       |
   98|     93|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 93, False: 0]
  |  Branch (98:25): [True: 0, False: 93]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     93|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 30, False: 63]
  ------------------
  103|     30|    return false;
  104|     30|  }
  105|  8.26M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.26M, False: 63]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.26M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.26M|    out_values[i] = value;
  109|  8.26M|  }
  110|     63|  decoder.EndDecoding();
  111|     63|  return true;
  112|     93|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    107|                              uint32_t* out_values) {
   93|    107|  SymbolDecoderT decoder;
   94|    107|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 17, False: 90]
  ------------------
   95|     17|    return false;
   96|     17|  }
   97|       |
   98|     90|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 90, False: 0]
  |  Branch (98:25): [True: 51, False: 39]
  ------------------
   99|     51|    return false;  // Wrong number of symbols.
  100|     51|  }
  101|       |
  102|     39|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 0, False: 39]
  ------------------
  103|      0|    return false;
  104|      0|  }
  105|  12.3M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.3M, False: 39]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  12.3M|    const uint32_t value = decoder.DecodeSymbol();
  108|  12.3M|    out_values[i] = value;
  109|  12.3M|  }
  110|     39|  decoder.EndDecoding();
  111|     39|  return true;
  112|     39|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    183|                              uint32_t* out_values) {
   93|    183|  SymbolDecoderT decoder;
   94|    183|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 40, False: 143]
  ------------------
   95|     40|    return false;
   96|     40|  }
   97|       |
   98|    143|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 143, False: 0]
  |  Branch (98:25): [True: 3, False: 140]
  ------------------
   99|      3|    return false;  // Wrong number of symbols.
  100|      3|  }
  101|       |
  102|    140|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 34, False: 106]
  ------------------
  103|     34|    return false;
  104|     34|  }
  105|  12.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.4M, False: 106]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  12.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  12.4M|    out_values[i] = value;
  109|  12.4M|  }
  110|    106|  decoder.EndDecoding();
  111|    106|  return true;
  112|    140|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    120|                              uint32_t* out_values) {
   93|    120|  SymbolDecoderT decoder;
   94|    120|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 34, False: 86]
  ------------------
   95|     34|    return false;
   96|     34|  }
   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: 34, False: 52]
  ------------------
  103|     34|    return false;
  104|     34|  }
  105|  16.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 16.4M, False: 52]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  16.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  16.4M|    out_values[i] = value;
  109|  16.4M|  }
  110|     52|  decoder.EndDecoding();
  111|     52|  return true;
  112|     86|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|     77|                              uint32_t* out_values) {
   93|     77|  SymbolDecoderT decoder;
   94|     77|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 31, False: 46]
  ------------------
   95|     31|    return false;
   96|     31|  }
   97|       |
   98|     46|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 46, False: 0]
  |  Branch (98:25): [True: 1, False: 45]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     45|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 16, False: 29]
  ------------------
  103|     16|    return false;
  104|     16|  }
  105|  7.19M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 7.19M, False: 29]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  7.19M|    const uint32_t value = decoder.DecodeSymbol();
  108|  7.19M|    out_values[i] = value;
  109|  7.19M|  }
  110|     29|  decoder.EndDecoding();
  111|     29|  return true;
  112|     45|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    101|                              uint32_t* out_values) {
   93|    101|  SymbolDecoderT decoder;
   94|    101|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 44, False: 57]
  ------------------
   95|     44|    return false;
   96|     44|  }
   97|       |
   98|     57|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 57, False: 0]
  |  Branch (98:25): [True: 4, False: 53]
  ------------------
   99|      4|    return false;  // Wrong number of symbols.
  100|      4|  }
  101|       |
  102|     53|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 10, False: 43]
  ------------------
  103|     10|    return false;
  104|     10|  }
  105|  13.6M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 13.6M, False: 43]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  13.6M|    const uint32_t value = decoder.DecodeSymbol();
  108|  13.6M|    out_values[i] = value;
  109|  13.6M|  }
  110|     43|  decoder.EndDecoding();
  111|     43|  return true;
  112|     53|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    137|                              uint32_t* out_values) {
   93|    137|  SymbolDecoderT decoder;
   94|    137|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 55, False: 82]
  ------------------
   95|     55|    return false;
   96|     55|  }
   97|       |
   98|     82|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 82, False: 0]
  |  Branch (98:25): [True: 0, False: 82]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     82|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 50, False: 32]
  ------------------
  103|     50|    return false;
  104|     50|  }
  105|   247k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 247k, False: 32]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   247k|    const uint32_t value = decoder.DecodeSymbol();
  108|   247k|    out_values[i] = value;
  109|   247k|  }
  110|     32|  decoder.EndDecoding();
  111|     32|  return true;
  112|     82|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    130|                              uint32_t* out_values) {
   93|    130|  SymbolDecoderT decoder;
   94|    130|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 70, False: 60]
  ------------------
   95|     70|    return false;
   96|     70|  }
   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: 26, False: 34]
  ------------------
  103|     26|    return false;
  104|     26|  }
  105|   180k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 180k, False: 34]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   180k|    const uint32_t value = decoder.DecodeSymbol();
  108|   180k|    out_values[i] = value;
  109|   180k|  }
  110|     34|  decoder.EndDecoding();
  111|     34|  return true;
  112|     60|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|     85|                              uint32_t* out_values) {
   93|     85|  SymbolDecoderT decoder;
   94|     85|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 54, False: 31]
  ------------------
   95|     54|    return false;
   96|     54|  }
   97|       |
   98|     31|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 31, False: 0]
  |  Branch (98:25): [True: 0, False: 31]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     31|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 15, False: 16]
  ------------------
  103|     15|    return false;
  104|     15|  }
  105|  66.7k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 66.7k, False: 16]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  66.7k|    const uint32_t value = decoder.DecodeSymbol();
  108|  66.7k|    out_values[i] = value;
  109|  66.7k|  }
  110|     16|  decoder.EndDecoding();
  111|     16|  return true;
  112|     31|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    128|                              uint32_t* out_values) {
   93|    128|  SymbolDecoderT decoder;
   94|    128|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 60, False: 68]
  ------------------
   95|     60|    return false;
   96|     60|  }
   97|       |
   98|     68|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 68, False: 0]
  |  Branch (98:25): [True: 9, False: 59]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|     59|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 37, False: 22]
  ------------------
  103|     37|    return false;
  104|     37|  }
  105|  46.5k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 46.4k, False: 22]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  46.4k|    const uint32_t value = decoder.DecodeSymbol();
  108|  46.4k|    out_values[i] = value;
  109|  46.4k|  }
  110|     22|  decoder.EndDecoding();
  111|     22|  return true;
  112|     59|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    120|                              uint32_t* out_values) {
   93|    120|  SymbolDecoderT decoder;
   94|    120|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 74, False: 46]
  ------------------
   95|     74|    return false;
   96|     74|  }
   97|       |
   98|     46|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 46, False: 0]
  |  Branch (98:25): [True: 2, False: 44]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|     44|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 13, False: 31]
  ------------------
  103|     13|    return false;
  104|     13|  }
  105|  84.3k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 84.2k, False: 31]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  84.2k|    const uint32_t value = decoder.DecodeSymbol();
  108|  84.2k|    out_values[i] = value;
  109|  84.2k|  }
  110|     31|  decoder.EndDecoding();
  111|     31|  return true;
  112|     44|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    190|                              uint32_t* out_values) {
   93|    190|  SymbolDecoderT decoder;
   94|    190|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 71, False: 119]
  ------------------
   95|     71|    return false;
   96|     71|  }
   97|       |
   98|    119|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 119, False: 0]
  |  Branch (98:25): [True: 0, False: 119]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|    119|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 87, False: 32]
  ------------------
  103|     87|    return false;
  104|     87|  }
  105|   192k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 192k, False: 32]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   192k|    const uint32_t value = decoder.DecodeSymbol();
  108|   192k|    out_values[i] = value;
  109|   192k|  }
  110|     32|  decoder.EndDecoding();
  111|     32|  return true;
  112|    119|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    110|                              uint32_t* out_values) {
   93|    110|  SymbolDecoderT decoder;
   94|    110|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 27, False: 83]
  ------------------
   95|     27|    return false;
   96|     27|  }
   97|       |
   98|     83|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 83, False: 0]
  |  Branch (98:25): [True: 0, False: 83]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     83|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 54, False: 29]
  ------------------
  103|     54|    return false;
  104|     54|  }
  105|  70.6k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 70.6k, False: 29]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  70.6k|    const uint32_t value = decoder.DecodeSymbol();
  108|  70.6k|    out_values[i] = value;
  109|  70.6k|  }
  110|     29|  decoder.EndDecoding();
  111|     29|  return true;
  112|     83|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    119|                              uint32_t* out_values) {
   93|    119|  SymbolDecoderT decoder;
   94|    119|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 65, False: 54]
  ------------------
   95|     65|    return false;
   96|     65|  }
   97|       |
   98|     54|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 54, False: 0]
  |  Branch (98:25): [True: 0, False: 54]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     54|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 31, False: 23]
  ------------------
  103|     31|    return false;
  104|     31|  }
  105|  69.6k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 69.6k, False: 23]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  69.6k|    const uint32_t value = decoder.DecodeSymbol();
  108|  69.6k|    out_values[i] = value;
  109|  69.6k|  }
  110|     23|  decoder.EndDecoding();
  111|     23|  return true;
  112|     54|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    229|                              uint32_t* out_values) {
   93|    229|  SymbolDecoderT decoder;
   94|    229|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 136, False: 93]
  ------------------
   95|    136|    return false;
   96|    136|  }
   97|       |
   98|     93|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 93, False: 0]
  |  Branch (98:25): [True: 0, False: 93]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     93|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 59, False: 34]
  ------------------
  103|     59|    return false;
  104|     59|  }
  105|  9.56M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.56M, False: 34]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.56M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.56M|    out_values[i] = value;
  109|  9.56M|  }
  110|     34|  decoder.EndDecoding();
  111|     34|  return true;
  112|     93|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  1.85k|    : decoder_(nullptr),
   49|  1.85k|      last_symbol_id_(-1),
   50|  1.85k|      last_vert_id_(-1),
   51|  1.85k|      last_face_id_(-1),
   52|  1.85k|      num_new_vertices_(0),
   53|  1.85k|      num_encoded_vertices_(0),
   54|  1.85k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  1.85k|    MeshEdgebreakerDecoder* decoder) {
   59|  1.85k|  decoder_ = decoder;
   60|  1.85k|  return true;
   61|  1.85k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  2.43k|    int att_id) const {
   67|  3.28k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.75k, False: 534]
  ------------------
   68|  2.75k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.75k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 849, False: 1.90k]
  |  Branch (69:27): [True: 0, False: 1.90k]
  ------------------
   70|    849|      continue;
   71|    849|    }
   72|  1.90k|    const AttributesDecoderInterface* const dec =
   73|  1.90k|        decoder_->attributes_decoder(decoder_id);
   74|  5.98k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 5.98k, False: 6]
  ------------------
   75|  5.98k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.89k, False: 4.08k]
  ------------------
   76|  1.89k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.30k, False: 590]
  ------------------
   77|  1.30k|          return &attribute_data_[i].connectivity_data;
   78|  1.30k|        }
   79|    590|        return nullptr;
   80|  1.89k|      }
   81|  5.98k|    }
   82|  1.90k|  }
   83|    534|  return nullptr;
   84|  2.43k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  2.43k|    int att_id) const {
   90|  3.28k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.75k, False: 534]
  ------------------
   91|  2.75k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.75k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 849, False: 1.90k]
  |  Branch (92:27): [True: 0, False: 1.90k]
  ------------------
   93|    849|      continue;
   94|    849|    }
   95|  1.90k|    const AttributesDecoderInterface* const dec =
   96|  1.90k|        decoder_->attributes_decoder(decoder_id);
   97|  5.98k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 5.98k, False: 6]
  ------------------
   98|  5.98k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.89k, False: 4.08k]
  ------------------
   99|  1.89k|        return &attribute_data_[i].encoding_data;
  100|  1.89k|      }
  101|  5.98k|    }
  102|  1.90k|  }
  103|    534|  return &pos_encoding_data_;
  104|  2.43k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  1.60k|    int32_t att_decoder_id) {
  131|  1.60k|  int8_t att_data_id;
  132|  1.60k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 3, False: 1.60k]
  ------------------
  133|      3|    return false;
  134|      3|  }
  135|  1.60k|  uint8_t decoder_type;
  136|  1.60k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 1, False: 1.60k]
  ------------------
  137|      1|    return false;
  138|      1|  }
  139|       |
  140|  1.60k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.21k, False: 392]
  ------------------
  141|  1.21k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 37, False: 1.17k]
  ------------------
  142|     37|      return false;  // Unexpected attribute data.
  143|     37|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  1.17k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 3, False: 1.17k]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|       |
  151|  1.17k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  1.17k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    392|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 390]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    390|    pos_data_decoder_id_ = att_decoder_id;
  158|    390|  }
  159|       |
  160|  1.56k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.56k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.55k, False: 7]
  ------------------
  162|  1.55k|    uint8_t traversal_method_encoded;
  163|  1.55k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.55k]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.55k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 7, False: 1.54k]
  ------------------
  168|      7|      return false;
  169|      7|    }
  170|  1.54k|    traversal_method =
  171|  1.54k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.54k|  }
  173|       |
  174|  1.55k|  const Mesh* mesh = decoder_->mesh();
  175|  1.55k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.55k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 780, False: 773]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    780|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    780|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 380, False: 400]
  ------------------
  182|    380|      encoding_data = &pos_encoding_data_;
  183|    400|    } else {
  184|    400|      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|    400|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    400|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    780|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 76, False: 704]
  ------------------
  191|     76|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     76|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     76|          AttTraverser;
  194|     76|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    704|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 704, False: 0]
  ------------------
  196|    704|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    704|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    704|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    704|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    780|  } else {
  203|    773|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 13, False: 760]
  ------------------
  204|     13|      return false;  // Unsupported method.
  205|     13|    }
  206|    760|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 6, False: 754]
  ------------------
  207|      6|      return false;  // Attribute data must be specified.
  208|      6|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    754|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    754|        AttObserver;
  214|    754|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    754|        AttTraverser;
  216|       |
  217|    754|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|    754|        &attribute_data_[att_data_id].encoding_data;
  219|    754|    const MeshAttributeCornerTable* const corner_table =
  220|    754|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    754|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    754|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    754|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    754|                             encoding_data);
  227|       |
  228|    754|    AttTraverser att_traverser;
  229|    754|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    754|    traversal_sequencer->SetTraverser(att_traverser);
  232|    754|    sequencer = std::move(traversal_sequencer);
  233|    754|  }
  234|       |
  235|  1.53k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.53k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.53k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.53k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.53k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.53k|                                        std::move(att_controller));
  244|  1.53k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  1.85k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  1.85k|  num_new_vertices_ = 0;
  249|  1.85k|  new_to_parent_vertex_map_.clear();
  250|  1.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  1.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 353, False: 1.50k]
  ------------------
  252|    353|    uint32_t num_new_verts;
  253|    353|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    353|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 101, False: 252]
  ------------------
  254|    101|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 101]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    252|    } else {
  258|    252|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 252]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    252|    }
  262|    353|    num_new_vertices_ = num_new_verts;
  263|    353|  }
  264|  1.85k|#endif
  265|       |
  266|  1.85k|  uint32_t num_encoded_vertices;
  267|  1.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  1.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 101, False: 1.75k]
  ------------------
  269|    101|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 101]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    101|  } else
  274|  1.75k|#endif
  275|  1.75k|  {
  276|  1.75k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 1, False: 1.75k]
  ------------------
  277|      1|      return false;
  278|      1|    }
  279|  1.75k|  }
  280|  1.85k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  1.85k|  uint32_t num_faces;
  283|  1.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  1.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 101, False: 1.75k]
  ------------------
  285|    101|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 101]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    101|  } else
  290|  1.75k|#endif
  291|  1.75k|  {
  292|  1.75k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1.75k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  1.75k|  }
  296|  1.85k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 1.85k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  1.85k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 0, False: 1.85k]
  ------------------
  301|      0|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      0|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  1.85k|  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.85k|  const uint64_t num_encoded_vertices_64 =
  311|  1.85k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  1.85k|  const uint64_t max_num_vertex_edges =
  313|  1.85k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  1.85k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 1.85k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  1.85k|  uint8_t num_attribute_data;
  320|  1.85k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 1.85k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  1.85k|  uint32_t num_encoded_symbols;
  325|  1.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  1.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 101, False: 1.75k]
  ------------------
  327|    101|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 101]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    101|  } else
  332|  1.75k|#endif
  333|  1.75k|  {
  334|  1.75k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 1.75k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  1.75k|  }
  338|       |
  339|  1.85k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 1.85k]
  ------------------
  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.85k|  const uint32_t max_encoded_faces =
  346|  1.85k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  1.85k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 2, False: 1.84k]
  ------------------
  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|      2|    return false;
  352|      2|  }
  353|       |
  354|  1.84k|  uint32_t num_encoded_split_symbols;
  355|  1.84k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  1.84k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 98, False: 1.75k]
  ------------------
  357|     98|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 98]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     98|  } else
  362|  1.75k|#endif
  363|  1.75k|  {
  364|  1.75k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.75k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  1.75k|  }
  368|       |
  369|  1.84k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 2, False: 1.84k]
  ------------------
  370|      2|    return false;  // Split symbols are a sub-set of all symbols.
  371|      2|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  1.84k|  vertex_traversal_length_.clear();
  375|  1.84k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  1.84k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 1.84k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  1.84k|  processed_corner_ids_.clear();
  380|  1.84k|  processed_corner_ids_.reserve(num_faces);
  381|  1.84k|  processed_connectivity_corners_.clear();
  382|  1.84k|  processed_connectivity_corners_.reserve(num_faces);
  383|  1.84k|  topology_split_data_.clear();
  384|  1.84k|  hole_event_data_.clear();
  385|  1.84k|  init_face_configurations_.clear();
  386|  1.84k|  init_corners_.clear();
  387|       |
  388|  1.84k|  last_symbol_id_ = -1;
  389|  1.84k|  last_face_id_ = -1;
  390|  1.84k|  last_vert_id_ = -1;
  391|       |
  392|  1.84k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  1.84k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  1.84k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 1.84k]
  ------------------
  397|  1.84k|          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.84k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  1.84k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  1.84k|  int32_t topology_split_decoded_bytes = -1;
  410|  1.84k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 348, False: 1.49k]
  ------------------
  411|    348|    uint32_t encoded_connectivity_size;
  412|    348|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 97, False: 251]
  ------------------
  413|     97|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 97]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    251|    } else {
  417|    251|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 251]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    251|    }
  421|    348|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 348]
  ------------------
  422|    348|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 4, False: 344]
  ------------------
  423|      4|      return false;
  424|      4|    }
  425|    344|    DecoderBuffer event_buffer;
  426|    344|    event_buffer.Init(
  427|    344|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    344|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    344|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    344|    topology_split_decoded_bytes =
  432|    344|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    344|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 79, False: 265]
  ------------------
  434|     79|      return false;
  435|     79|    }
  436|       |
  437|    344|  } else
  438|  1.49k|#endif
  439|  1.49k|  {
  440|  1.49k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 4, False: 1.49k]
  ------------------
  441|      4|      return false;
  442|      4|    }
  443|  1.49k|  }
  444|       |
  445|  1.75k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.75k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.75k|                                           num_encoded_split_symbols);
  449|  1.75k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.75k|  DecoderBuffer traversal_end_buffer;
  452|  1.75k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 39, False: 1.72k]
  ------------------
  453|     39|    return false;
  454|     39|  }
  455|       |
  456|  1.72k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.72k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 155, False: 1.56k]
  ------------------
  458|    155|    return false;
  459|    155|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.56k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.56k|                           traversal_end_buffer.remaining_size(),
  464|  1.56k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.56k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.56k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 227, False: 1.33k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    227|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    227|  }
  471|  1.56k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.56k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.54k, False: 23]
  ------------------
  475|  1.54k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.54k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.54k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 222, False: 1.32k]
  ------------------
  477|    855|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 633, False: 222]
  ------------------
  478|    633|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 633]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|    633|      }
  482|       |
  483|    222|    } else
  484|  1.32k|#endif
  485|  1.32k|    {
  486|   204k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 203k, False: 1.32k]
  ------------------
  487|   203k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 203k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   203k|      }
  491|  1.32k|    }
  492|  1.54k|  }
  493|  1.56k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  5.66k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 4.10k, False: 1.56k]
  ------------------
  498|  4.10k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   421k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 421k, False: 4.10k]
  ------------------
  501|   421k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   421k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  4.10k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 4.10k]
  ------------------
  505|  4.10k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  4.10k|  }
  509|       |
  510|  1.56k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  5.66k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 4.10k, False: 1.56k]
  ------------------
  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|  4.10k|    int32_t att_connectivity_verts =
  517|  4.10k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  4.10k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 275, False: 3.82k]
  ------------------
  519|    275|      att_connectivity_verts = corner_table_->num_vertices();
  520|    275|    }
  521|  4.10k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  4.10k|  }
  523|  1.56k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 0, False: 1.56k]
  ------------------
  524|      0|    return false;
  525|      0|  }
  526|  1.56k|  return true;
  527|  1.56k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    142|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    142|  return true;
  532|    142|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  1.72k|    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.72k|  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.72k|  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.72k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.72k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.72k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.72k|  int num_faces = 0;
  562|  27.6M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 27.6M, False: 1.60k]
  ------------------
  563|  27.6M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  27.6M|    bool check_topology_split = false;
  566|  27.6M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  27.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 11.0M, False: 16.6M]
  ------------------
  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|  11.0M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 4, False: 11.0M]
  ------------------
  588|      4|        return -1;
  589|      4|      }
  590|       |
  591|  11.0M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  11.0M|      const VertexIndex vertex_x =
  593|  11.0M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  11.0M|      const CornerIndex corner_b =
  595|  11.0M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  11.0M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 83, False: 11.0M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     83|        return -1;
  600|     83|      }
  601|  11.0M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 11.0M]
  |  Branch (601:11): [True: 0, False: 11.0M]
  ------------------
  602|  11.0M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 11.0M]
  ------------------
  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|  11.0M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  11.0M|      SetOppositeCorners(corner_a, corner + 1);
  612|  11.0M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  11.0M|      const VertexIndex vert_a_prev =
  616|  11.0M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  11.0M|      const VertexIndex vert_b_next =
  618|  11.0M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  11.0M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 11.0M]
  |  Branch (619:38): [True: 0, False: 11.0M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  11.0M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  11.0M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  11.0M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  11.0M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  11.0M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  11.0M|      active_corner_stack.back() = corner;
  631|  16.6M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 5.97M, False: 10.6M]
  |  Branch (631:40): [True: 3.99M, False: 6.67M]
  ------------------
  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|  9.96M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 9.96M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  9.96M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  9.96M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 9.96M]
  ------------------
  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|  9.96M|      const CornerIndex corner(3 * face.value());
  658|  9.96M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  9.96M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 5.97M, False: 3.99M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  5.97M|        opp_corner = corner + 2;
  662|  5.97M|        corner_l = corner + 1;
  663|  5.97M|        corner_r = corner;
  664|  5.97M|      } else {
  665|       |        // "l" is the new first corner.
  666|  3.99M|        opp_corner = corner + 1;
  667|  3.99M|        corner_l = corner;
  668|  3.99M|        corner_r = corner + 2;
  669|  3.99M|      }
  670|  9.96M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  9.96M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  9.96M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 9.96M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  9.96M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  9.96M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  9.96M|      const VertexIndex vertex_r =
  682|  9.96M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  9.96M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  9.96M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  9.96M|      corner_table_->MapCornerToVertex(
  688|  9.96M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  9.96M|      active_corner_stack.back() = corner;
  690|  9.96M|      check_topology_split = true;
  691|  9.96M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 3.25M, False: 3.41M]
  ------------------
  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|  3.25M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 3.25M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  3.25M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  3.25M|      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|  3.25M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  3.25M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 21, False: 3.25M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     21|        active_corner_stack.push_back(it->second);
  714|     21|      }
  715|  3.25M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 3, False: 3.25M]
  ------------------
  716|      3|        return -1;
  717|      3|      }
  718|  3.25M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  3.25M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 3.25M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  3.25M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 3, False: 3.25M]
  |  Branch (724:11): [True: 3, False: 3.25M]
  ------------------
  725|  3.25M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 3.25M]
  ------------------
  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|  3.25M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  3.25M|      SetOppositeCorners(corner_a, corner + 2);
  735|  3.25M|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  3.25M|      const VertexIndex vertex_p =
  739|  3.25M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  3.25M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  3.25M|      corner_table_->MapCornerToVertex(
  742|  3.25M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  3.25M|      const VertexIndex vert_b_prev =
  744|  3.25M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  3.25M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  3.25M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  3.25M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  3.25M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  3.25M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  3.25M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  3.25M|                                       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|  3.25M|      const CornerIndex first_corner = corner_n;
  757|  12.8M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 9.64M, False: 3.25M]
  ------------------
  758|  9.64M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  9.64M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  9.64M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 9.64M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|  9.64M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  3.25M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  3.25M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 1.23M, False: 2.01M]
  ------------------
  770|  1.23M|        invalid_vertices.push_back(vertex_n);
  771|  1.23M|      }
  772|  3.25M|      active_corner_stack.back() = corner;
  773|  3.41M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 3.41M, False: 0]
  ------------------
  774|  3.41M|      const CornerIndex corner(3 * face.value());
  775|  3.41M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  3.41M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  3.41M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  3.41M|                                       corner_table_->AddNewVertex());
  780|  3.41M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  3.41M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  3.41M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 2, False: 3.41M]
  ------------------
  784|      2|        return -1;  // Unexpected number of decoded vertices.
  785|      2|      }
  786|       |
  787|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  3.41M|      active_corner_stack.push_back(corner);
  792|  3.41M|      check_topology_split = true;
  793|  3.41M|    } 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|  27.6M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  27.6M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 13.3M, False: 14.2M]
  ------------------
  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|  13.3M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  13.3M|      EdgeFaceName split_edge;
  812|  13.3M|      int encoder_split_symbol_id;
  813|  13.3M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 988, False: 13.3M]
  ------------------
  814|  13.3M|                             &encoder_split_symbol_id)) {
  815|    988|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 15, False: 973]
  ------------------
  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|    973|        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|    973|        CornerIndex new_active_corner;
  831|    973|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 448, False: 525]
  ------------------
  832|    448|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    525|        } else {
  834|    525|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    525|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|    973|        const int decoder_split_symbol_id =
  839|    973|            num_symbols - encoder_split_symbol_id - 1;
  840|    973|        topology_split_active_corners[decoder_split_symbol_id] =
  841|    973|            new_active_corner;
  842|    973|      }
  843|  13.3M|    }
  844|  27.6M|  }
  845|  1.60k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.60k]
  ------------------
  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|  48.6k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 47.0k, False: 1.56k]
  ------------------
  850|  47.0k|    const CornerIndex corner = active_corner_stack.back();
  851|  47.0k|    active_corner_stack.pop_back();
  852|  47.0k|    const bool interior_face =
  853|  47.0k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  47.0k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 40.4k, False: 6.62k]
  ------------------
  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|  40.4k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 6, False: 40.4k]
  ------------------
  877|      6|        return -1;  // More faces than expected added to the mesh.
  878|      6|      }
  879|       |
  880|  40.4k|      const CornerIndex corner_a = corner;
  881|  40.4k|      const VertexIndex vert_n =
  882|  40.4k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  40.4k|      const CornerIndex corner_b =
  884|  40.4k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  40.4k|      const VertexIndex vert_x =
  887|  40.4k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  40.4k|      const CornerIndex corner_c =
  889|  40.4k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  40.4k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 0, False: 40.4k]
  |  Branch (891:33): [True: 36, False: 40.3k]
  |  Branch (891:55): [True: 0, False: 40.3k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     36|        return -1;
  894|     36|      }
  895|  40.3k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 40.3k]
  |  Branch (895:11): [True: 1, False: 40.3k]
  ------------------
  896|  40.3k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 40.3k]
  ------------------
  897|  40.3k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 40.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|  40.3k|      const VertexIndex vert_p =
  904|  40.3k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  40.3k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  40.3k|      const CornerIndex new_corner(3 * face.value());
  909|  40.3k|      SetOppositeCorners(new_corner, corner);
  910|  40.3k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  40.3k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  40.3k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  40.3k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  40.3k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   161k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 121k, False: 40.3k]
  ------------------
  920|   121k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   121k|      }
  922|       |
  923|  40.3k|      init_face_configurations_.push_back(true);
  924|  40.3k|      init_corners_.push_back(new_corner);
  925|  40.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.62k|      init_face_configurations_.push_back(false);
  930|  6.62k|      init_corners_.push_back(corner);
  931|  6.62k|    }
  932|  47.0k|  }
  933|  1.56k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 1, False: 1.56k]
  ------------------
  934|      1|    return -1;  // Unexpected number of decoded faces.
  935|      1|  }
  936|       |
  937|  1.56k|  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.34k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 3.34k, False: 1.56k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  3.34k|    VertexIndex src_vert(num_vertices - 1);
  943|  3.93k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 587, False: 3.34k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    587|      src_vert = VertexIndex(--num_vertices - 1);
  946|    587|    }
  947|  3.34k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 587, False: 2.75k]
  ------------------
  948|    587|      continue;  // No need to swap anything.
  949|    587|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  2.75k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  59.0k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 56.2k, False: 2.75k]
  ------------------
  954|  56.2k|      const CornerIndex cid = vcit.Corner();
  955|  56.2k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 56.2k]
  ------------------
  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|  56.2k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  56.2k|    }
  962|  2.75k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  2.75k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  2.75k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  2.75k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  2.75k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  2.75k|    num_vertices--;
  972|  2.75k|  }
  973|  1.56k|  return num_vertices;
  974|  1.56k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  1.84k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  1.84k|  uint32_t num_topology_splits;
  982|  1.84k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  1.84k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 93, False: 1.74k]
  ------------------
  984|     93|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 93]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     93|  } else
  989|  1.74k|#endif
  990|  1.74k|  {
  991|  1.74k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 1.74k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  1.74k|  }
  995|  1.84k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 1.04k, False: 797]
  ------------------
  996|  1.04k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 8, False: 1.03k]
  ------------------
  997|  1.04k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      8|      return -1;
  999|      8|    }
 1000|  1.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  1.03k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 53, False: 984]
  ------------------
 1002|  41.5k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 41.5k, False: 23]
  ------------------
 1003|  41.5k|        TopologySplitEventData event_data;
 1004|  41.5k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 15, False: 41.5k]
  ------------------
 1005|     15|          return -1;
 1006|     15|        }
 1007|  41.5k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 11, False: 41.5k]
  ------------------
 1008|     11|          return -1;
 1009|     11|        }
 1010|  41.5k|        uint8_t edge_data;
 1011|  41.5k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 4, False: 41.5k]
  ------------------
 1012|      4|          return -1;
 1013|      4|        }
 1014|  41.5k|        event_data.source_edge = edge_data & 1;
 1015|  41.5k|        topology_split_data_.push_back(event_data);
 1016|  41.5k|      }
 1017|       |
 1018|     53|    } else
 1019|    984|#endif
 1020|    984|    {
 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|    984|      int last_source_symbol_id = 0;
 1024|  4.49k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 3.51k, False: 980]
  ------------------
 1025|  3.51k|        TopologySplitEventData event_data;
 1026|  3.51k|        uint32_t delta;
 1027|  3.51k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 3, False: 3.51k]
  ------------------
 1028|      3|          return -1;
 1029|      3|        }
 1030|  3.51k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  3.51k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 1, False: 3.51k]
  ------------------
 1032|      1|          return -1;
 1033|      1|        }
 1034|  3.51k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 3.51k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  3.51k|        event_data.split_symbol_id =
 1038|  3.51k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  3.51k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  3.51k|        topology_split_data_.push_back(event_data);
 1041|  3.51k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    980|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.10k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.12k, False: 980]
  ------------------
 1045|  3.12k|        uint32_t edge_data;
 1046|  3.12k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 678, False: 2.44k]
  ------------------
 1047|    678|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  2.44k|        } else {
 1049|  2.44k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  2.44k|        }
 1051|  3.12k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  3.12k|        event_data.source_edge = edge_data & 1;
 1053|  3.12k|      }
 1054|    980|      decoder_buffer->EndBitDecoding();
 1055|    980|    }
 1056|  1.03k|  }
 1057|  1.80k|  uint32_t num_hole_events = 0;
 1058|  1.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  1.80k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.80k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 55, False: 1.74k]
  ------------------
 1060|     55|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 55]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|  1.74k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.74k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 239, False: 1.50k]
  ------------------
 1064|    239|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 2, False: 237]
  ------------------
 1065|      2|      return -1;
 1066|      2|    }
 1067|    239|  }
 1068|  1.79k|#endif
 1069|  1.79k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 48, False: 1.75k]
  ------------------
 1070|     48|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     48|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     48|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 42, False: 6]
  ------------------
 1072|   533k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 533k, False: 8]
  ------------------
 1073|   533k|        HoleEventData event_data;
 1074|   533k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 34, False: 533k]
  ------------------
 1075|     34|          return -1;
 1076|     34|        }
 1077|   533k|        hole_event_data_.push_back(event_data);
 1078|   533k|      }
 1079|       |
 1080|     42|    } else
 1081|      6|#endif
 1082|      6|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|      6|      int last_symbol_id = 0;
 1085|  49.7k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 49.7k, False: 1]
  ------------------
 1086|  49.7k|        HoleEventData event_data;
 1087|  49.7k|        uint32_t delta;
 1088|  49.7k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 5, False: 49.7k]
  ------------------
 1089|      5|          return -1;
 1090|      5|        }
 1091|  49.7k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  49.7k|        last_symbol_id = event_data.symbol_id;
 1093|  49.7k|        hole_event_data_.push_back(event_data);
 1094|  49.7k|      }
 1095|      6|    }
 1096|     48|  }
 1097|  1.75k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  1.79k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|    633|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|    633|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|    633|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  2.53k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.89k, False: 633]
  ------------------
 1109|  1.89k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.89k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.14k, False: 752]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  2.54k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 1.39k, False: 1.14k]
  ------------------
 1114|  1.39k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  1.39k|      }
 1116|  1.14k|      continue;
 1117|  1.14k|    }
 1118|       |
 1119|  1.53k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 786, False: 752]
  ------------------
 1120|    786|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|    786|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 334, False: 452]
  ------------------
 1122|    334|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|    334|      }
 1124|    786|    }
 1125|    752|  }
 1126|    633|  return true;
 1127|    633|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   203k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   203k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   203k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   203k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|   814k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 610k, False: 203k]
  ------------------
 1139|   610k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   610k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 19.9k, False: 590k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  74.9k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 54.9k, False: 19.9k]
  ------------------
 1144|  54.9k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|  54.9k|      }
 1146|  19.9k|      continue;
 1147|  19.9k|    }
 1148|   590k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   590k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 295k, False: 295k]
  ------------------
 1151|   295k|      continue;
 1152|   295k|    }
 1153|       |
 1154|   988k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 693k, False: 295k]
  ------------------
 1155|   693k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   693k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 364k, False: 328k]
  ------------------
 1157|   364k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   364k|      }
 1159|   693k|    }
 1160|   295k|  }
 1161|   203k|  return true;
 1162|   203k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  1.56k|    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.56k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.56k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 23, False: 1.54k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   137k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 137k, False: 23]
  ------------------
 1176|   137k|      Mesh::Face face;
 1177|   137k|      const CornerIndex start_corner(3 * f.value());
 1178|   548k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 411k, False: 137k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   411k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   411k|        face[c] = vert_id;
 1182|   411k|      }
 1183|   137k|      decoder_->mesh()->SetFace(f, face);
 1184|   137k|    }
 1185|     23|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     23|    return true;
 1187|     23|  }
 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.54k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.54k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   120k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 119k, False: 1.54k]
  ------------------
 1197|   119k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   119k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 3.65k, False: 115k]
  ------------------
 1199|  3.65k|      continue;  // Isolated vertex.
 1200|  3.65k|    }
 1201|   115k|    CornerIndex deduplication_first_corner = c;
 1202|   115k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 21.1k, False: 94.4k]
  ------------------
 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|  21.1k|      deduplication_first_corner = c;
 1206|  94.4k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   202k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 152k, False: 50.5k]
  ------------------
 1210|   152k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 69.9k, False: 82.4k]
  ------------------
 1211|  69.9k|          continue;  // No seam for this attribute, ignore it.
 1212|  69.9k|        }
 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|  82.4k|        const VertexIndex vert_id =
 1217|  82.4k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  82.4k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  82.4k|        bool seam_found = false;
 1220|   251k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 212k, False: 38.5k]
  ------------------
 1221|   212k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 0, False: 212k]
  ------------------
 1222|      0|            return false;
 1223|      0|          }
 1224|   212k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 43.8k, False: 168k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  43.8k|            deduplication_first_corner = act_c;
 1227|  43.8k|            seam_found = true;
 1228|  43.8k|            break;
 1229|  43.8k|          }
 1230|   168k|          act_c = corner_table_->SwingRight(act_c);
 1231|   168k|        }
 1232|  82.4k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 43.8k, False: 38.5k]
  ------------------
 1233|  43.8k|          break;  // No reason to process other attributes if we found a seam.
 1234|  43.8k|        }
 1235|  82.4k|      }
 1236|  94.4k|    }
 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|   115k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   115k|    corner_to_point_map[c.value()] =
 1246|   115k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   115k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   115k|    CornerIndex prev_c = c;
 1250|   115k|    c = corner_table_->SwingRight(c);
 1251|   616k|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 594k, False: 21.3k]
  |  Branch (1251:40): [True: 500k, False: 94.1k]
  ------------------
 1252|   500k|      bool attribute_seam = false;
 1253|   991k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 762k, False: 229k]
  ------------------
 1254|   762k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 271k, False: 491k]
  ------------------
 1255|   762k|            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|   271k|          attribute_seam = true;
 1259|   271k|          break;
 1260|   271k|        }
 1261|   762k|      }
 1262|   500k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 271k, False: 229k]
  ------------------
 1263|   271k|        corner_to_point_map[c.value()] =
 1264|   271k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   271k|        point_to_corner_map.push_back(c.value());
 1266|   271k|      } else {
 1267|   229k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   229k|      }
 1269|   500k|      prev_c = c;
 1270|   500k|      c = corner_table_->SwingRight(c);
 1271|   500k|    }
 1272|   115k|  }
 1273|       |  // Add faces.
 1274|   205k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 204k, False: 1.54k]
  ------------------
 1275|   204k|    Mesh::Face face;
 1276|   816k|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 612k, False: 204k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   612k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   612k|    }
 1280|   204k|    decoder_->mesh()->SetFace(f, face);
 1281|   204k|  }
 1282|  1.54k|  decoder_->point_cloud()->set_num_points(
 1283|  1.54k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.54k|  return true;
 1285|  1.54k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  1.33k|    : decoder_(nullptr),
   49|  1.33k|      last_symbol_id_(-1),
   50|  1.33k|      last_vert_id_(-1),
   51|  1.33k|      last_face_id_(-1),
   52|  1.33k|      num_new_vertices_(0),
   53|  1.33k|      num_encoded_vertices_(0),
   54|  1.33k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  1.33k|    MeshEdgebreakerDecoder* decoder) {
   59|  1.33k|  decoder_ = decoder;
   60|  1.33k|  return true;
   61|  1.33k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  1.90k|    int att_id) const {
   67|  3.00k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.35k, False: 648]
  ------------------
   68|  2.35k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.35k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.09k, False: 1.26k]
  |  Branch (69:27): [True: 0, False: 1.26k]
  ------------------
   70|  1.09k|      continue;
   71|  1.09k|    }
   72|  1.26k|    const AttributesDecoderInterface* const dec =
   73|  1.26k|        decoder_->attributes_decoder(decoder_id);
   74|  5.54k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 5.54k, False: 0]
  ------------------
   75|  5.54k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.26k, False: 4.28k]
  ------------------
   76|  1.26k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 893, False: 368]
  ------------------
   77|    893|          return &attribute_data_[i].connectivity_data;
   78|    893|        }
   79|    368|        return nullptr;
   80|  1.26k|      }
   81|  5.54k|    }
   82|  1.26k|  }
   83|    648|  return nullptr;
   84|  1.90k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  1.90k|    int att_id) const {
   90|  3.00k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.35k, False: 648]
  ------------------
   91|  2.35k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.35k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.09k, False: 1.26k]
  |  Branch (92:27): [True: 0, False: 1.26k]
  ------------------
   93|  1.09k|      continue;
   94|  1.09k|    }
   95|  1.26k|    const AttributesDecoderInterface* const dec =
   96|  1.26k|        decoder_->attributes_decoder(decoder_id);
   97|  5.54k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 5.54k, False: 0]
  ------------------
   98|  5.54k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.26k, False: 4.28k]
  ------------------
   99|  1.26k|        return &attribute_data_[i].encoding_data;
  100|  1.26k|      }
  101|  5.54k|    }
  102|  1.26k|  }
  103|    648|  return &pos_encoding_data_;
  104|  1.90k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.11k|    int32_t att_decoder_id) {
  131|  1.11k|  int8_t att_data_id;
  132|  1.11k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 5, False: 1.10k]
  ------------------
  133|      5|    return false;
  134|      5|  }
  135|  1.10k|  uint8_t decoder_type;
  136|  1.10k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 1, False: 1.10k]
  ------------------
  137|      1|    return false;
  138|      1|  }
  139|       |
  140|  1.10k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 724, False: 383]
  ------------------
  141|    724|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 16, False: 708]
  ------------------
  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|    708|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 2, False: 706]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|       |
  151|    706|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    706|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    383|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 383]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|    383|    pos_data_decoder_id_ = att_decoder_id;
  158|    383|  }
  159|       |
  160|  1.08k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.08k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.08k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.08k, False: 0]
  ------------------
  162|  1.08k|    uint8_t traversal_method_encoded;
  163|  1.08k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.08k]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.08k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 6, False: 1.08k]
  ------------------
  168|      6|      return false;
  169|      6|    }
  170|  1.08k|    traversal_method =
  171|  1.08k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.08k|  }
  173|       |
  174|  1.08k|  const Mesh* mesh = decoder_->mesh();
  175|  1.08k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.08k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 571, False: 512]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    571|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    571|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 379, False: 192]
  ------------------
  182|    379|      encoding_data = &pos_encoding_data_;
  183|    379|    } else {
  184|    192|      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|    192|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    192|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    571|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 142, False: 429]
  ------------------
  191|    142|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    142|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    142|          AttTraverser;
  194|    142|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    429|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 429, False: 0]
  ------------------
  196|    429|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    429|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    429|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    429|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    571|  } else {
  203|    512|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 1, False: 511]
  ------------------
  204|      1|      return false;  // Unsupported method.
  205|      1|    }
  206|    511|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 1, False: 510]
  ------------------
  207|      1|      return false;  // Attribute data must be specified.
  208|      1|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    510|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    510|        AttObserver;
  214|    510|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    510|        AttTraverser;
  216|       |
  217|    510|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|    510|        &attribute_data_[att_data_id].encoding_data;
  219|    510|    const MeshAttributeCornerTable* const corner_table =
  220|    510|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    510|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    510|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    510|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    510|                             encoding_data);
  227|       |
  228|    510|    AttTraverser att_traverser;
  229|    510|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    510|    traversal_sequencer->SetTraverser(att_traverser);
  232|    510|    sequencer = std::move(traversal_sequencer);
  233|    510|  }
  234|       |
  235|  1.08k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.08k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.08k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.08k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.08k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.08k|                                        std::move(att_controller));
  244|  1.08k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  1.33k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  1.33k|  num_new_vertices_ = 0;
  249|  1.33k|  new_to_parent_vertex_map_.clear();
  250|  1.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  1.33k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 386, False: 950]
  ------------------
  252|    386|    uint32_t num_new_verts;
  253|    386|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    386|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 79, False: 307]
  ------------------
  254|     79|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 79]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    307|    } else {
  258|    307|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 307]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    307|    }
  262|    386|    num_new_vertices_ = num_new_verts;
  263|    386|  }
  264|  1.33k|#endif
  265|       |
  266|  1.33k|  uint32_t num_encoded_vertices;
  267|  1.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  1.33k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 79, False: 1.25k]
  ------------------
  269|     79|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 79]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|     79|  } else
  274|  1.25k|#endif
  275|  1.25k|  {
  276|  1.25k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 1.25k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  1.25k|  }
  280|  1.33k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  1.33k|  uint32_t num_faces;
  283|  1.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  1.33k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 79, False: 1.25k]
  ------------------
  285|     79|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 79]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|     79|  } else
  290|  1.25k|#endif
  291|  1.25k|  {
  292|  1.25k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1.25k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  1.25k|  }
  296|  1.33k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 1.33k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  1.33k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 1.33k]
  ------------------
  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.33k|  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.33k|  const uint64_t num_encoded_vertices_64 =
  311|  1.33k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  1.33k|  const uint64_t max_num_vertex_edges =
  313|  1.33k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  1.33k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 1.33k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  1.33k|  uint8_t num_attribute_data;
  320|  1.33k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 1.33k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  1.33k|  uint32_t num_encoded_symbols;
  325|  1.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  1.33k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 77, False: 1.25k]
  ------------------
  327|     77|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 77]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|     77|  } else
  332|  1.25k|#endif
  333|  1.25k|  {
  334|  1.25k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 1.25k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  1.25k|  }
  338|       |
  339|  1.33k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 5, False: 1.32k]
  ------------------
  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|      5|    return false;
  344|      5|  }
  345|  1.32k|  const uint32_t max_encoded_faces =
  346|  1.32k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  1.32k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 1, False: 1.32k]
  ------------------
  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.32k|  uint32_t num_encoded_split_symbols;
  355|  1.32k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  1.32k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.32k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 72, False: 1.25k]
  ------------------
  357|     72|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 72]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     72|  } else
  362|  1.25k|#endif
  363|  1.25k|  {
  364|  1.25k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.25k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  1.25k|  }
  368|       |
  369|  1.32k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 0, False: 1.32k]
  ------------------
  370|      0|    return false;  // Split symbols are a sub-set of all symbols.
  371|      0|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  1.32k|  vertex_traversal_length_.clear();
  375|  1.32k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  1.32k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 1.32k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  1.32k|  processed_corner_ids_.clear();
  380|  1.32k|  processed_corner_ids_.reserve(num_faces);
  381|  1.32k|  processed_connectivity_corners_.clear();
  382|  1.32k|  processed_connectivity_corners_.reserve(num_faces);
  383|  1.32k|  topology_split_data_.clear();
  384|  1.32k|  hole_event_data_.clear();
  385|  1.32k|  init_face_configurations_.clear();
  386|  1.32k|  init_corners_.clear();
  387|       |
  388|  1.32k|  last_symbol_id_ = -1;
  389|  1.32k|  last_face_id_ = -1;
  390|  1.32k|  last_vert_id_ = -1;
  391|       |
  392|  1.32k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  1.32k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  1.32k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 1.32k]
  ------------------
  397|  1.32k|          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.32k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  1.32k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  1.32k|  int32_t topology_split_decoded_bytes = -1;
  410|  1.32k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.32k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 379, False: 949]
  ------------------
  411|    379|    uint32_t encoded_connectivity_size;
  412|    379|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    379|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 72, False: 307]
  ------------------
  413|     72|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 72]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    307|    } else {
  417|    307|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 307]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    307|    }
  421|    379|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 379]
  ------------------
  422|    379|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 2, False: 377]
  ------------------
  423|      2|      return false;
  424|      2|    }
  425|    377|    DecoderBuffer event_buffer;
  426|    377|    event_buffer.Init(
  427|    377|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    377|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    377|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    377|    topology_split_decoded_bytes =
  432|    377|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    377|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 74, False: 303]
  ------------------
  434|     74|      return false;
  435|     74|    }
  436|       |
  437|    377|  } else
  438|    949|#endif
  439|    949|  {
  440|    949|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 8, False: 941]
  ------------------
  441|      8|      return false;
  442|      8|    }
  443|    949|  }
  444|       |
  445|  1.24k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.24k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.24k|                                           num_encoded_split_symbols);
  449|  1.24k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.24k|  DecoderBuffer traversal_end_buffer;
  452|  1.24k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 28, False: 1.21k]
  ------------------
  453|     28|    return false;
  454|     28|  }
  455|       |
  456|  1.21k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.21k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 102, False: 1.11k]
  ------------------
  458|    102|    return false;
  459|    102|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.11k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.11k|                           traversal_end_buffer.remaining_size(),
  464|  1.11k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.11k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.11k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.11k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 271, False: 843]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    271|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    271|  }
  471|  1.11k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.11k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.06k, False: 48]
  ------------------
  475|  1.06k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.06k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.06k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 205, False: 861]
  ------------------
  477|   338k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 337k, False: 205]
  ------------------
  478|   337k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 337k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   337k|      }
  482|       |
  483|    205|    } else
  484|    861|#endif
  485|    861|    {
  486|  6.71M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 6.71M, False: 861]
  ------------------
  487|  6.71M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 6.71M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  6.71M|      }
  491|    861|    }
  492|  1.06k|  }
  493|  1.11k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  2.57k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.45k, False: 1.11k]
  ------------------
  498|  1.45k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  10.1M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 10.1M, False: 1.45k]
  ------------------
  501|  10.1M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  10.1M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.45k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.45k]
  ------------------
  505|  1.45k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.45k|  }
  509|       |
  510|  1.11k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  2.57k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.45k, False: 1.11k]
  ------------------
  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.45k|    int32_t att_connectivity_verts =
  517|  1.45k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.45k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 257, False: 1.20k]
  ------------------
  519|    257|      att_connectivity_verts = corner_table_->num_vertices();
  520|    257|    }
  521|  1.45k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.45k|  }
  523|  1.11k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 1, False: 1.11k]
  ------------------
  524|      1|    return false;
  525|      1|  }
  526|  1.11k|  return true;
  527|  1.11k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    290|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    290|  return true;
  532|    290|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  1.21k|    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.21k|  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.21k|  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.21k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.21k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.21k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.21k|  int num_faces = 0;
  562|  67.3M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 67.3M, False: 1.15k]
  ------------------
  563|  67.3M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  67.3M|    bool check_topology_split = false;
  566|  67.3M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  67.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 33.0M, False: 34.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|  33.0M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 1, False: 33.0M]
  ------------------
  588|      1|        return -1;
  589|      1|      }
  590|       |
  591|  33.0M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  33.0M|      const VertexIndex vertex_x =
  593|  33.0M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  33.0M|      const CornerIndex corner_b =
  595|  33.0M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  33.0M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 23, False: 33.0M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     23|        return -1;
  600|     23|      }
  601|  33.0M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 33.0M]
  |  Branch (601:11): [True: 0, False: 33.0M]
  ------------------
  602|  33.0M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 33.0M]
  ------------------
  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|  33.0M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  33.0M|      SetOppositeCorners(corner_a, corner + 1);
  612|  33.0M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  33.0M|      const VertexIndex vert_a_prev =
  616|  33.0M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  33.0M|      const VertexIndex vert_b_next =
  618|  33.0M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  33.0M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 33.0M]
  |  Branch (619:38): [True: 0, False: 33.0M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  33.0M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  33.0M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  33.0M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  33.0M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  33.0M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  33.0M|      active_corner_stack.back() = corner;
  631|  34.2M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 34.1M, False: 128k]
  |  Branch (631:40): [True: 29.5k, False: 98.9k]
  ------------------
  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|  34.1M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 34.1M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  34.1M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  34.1M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 34.1M]
  ------------------
  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|  34.1M|      const CornerIndex corner(3 * face.value());
  658|  34.1M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  34.1M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 34.1M, False: 29.5k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  34.1M|        opp_corner = corner + 2;
  662|  34.1M|        corner_l = corner + 1;
  663|  34.1M|        corner_r = corner;
  664|  34.1M|      } else {
  665|       |        // "l" is the new first corner.
  666|  29.5k|        opp_corner = corner + 1;
  667|  29.5k|        corner_l = corner;
  668|  29.5k|        corner_r = corner + 2;
  669|  29.5k|      }
  670|  34.1M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  34.1M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  34.1M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 34.1M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  34.1M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  34.1M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  34.1M|      const VertexIndex vertex_r =
  682|  34.1M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  34.1M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  34.1M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  34.1M|      corner_table_->MapCornerToVertex(
  688|  34.1M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  34.1M|      active_corner_stack.back() = corner;
  690|  34.1M|      check_topology_split = true;
  691|  34.1M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 28.8k, False: 70.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|  28.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 28.8k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  28.8k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  28.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|  28.8k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  28.8k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 11, False: 28.8k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     11|        active_corner_stack.push_back(it->second);
  714|     11|      }
  715|  28.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 2, False: 28.8k]
  ------------------
  716|      2|        return -1;
  717|      2|      }
  718|  28.8k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  28.8k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 28.8k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  28.8k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 6, False: 28.8k]
  |  Branch (724:11): [True: 6, False: 28.8k]
  ------------------
  725|  28.8k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 28.8k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      6|        return -1;
  729|      6|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  28.8k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  28.8k|      SetOppositeCorners(corner_a, corner + 2);
  735|  28.8k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  28.8k|      const VertexIndex vertex_p =
  739|  28.8k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  28.8k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  28.8k|      corner_table_->MapCornerToVertex(
  742|  28.8k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  28.8k|      const VertexIndex vert_b_prev =
  744|  28.8k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  28.8k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  28.8k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  28.8k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  28.8k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  28.8k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  28.8k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  28.8k|                                       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|  28.8k|      const CornerIndex first_corner = corner_n;
  757|   149k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 120k, False: 28.8k]
  ------------------
  758|   120k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   120k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   120k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 120k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|   120k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  28.8k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  28.8k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 18.7k, False: 10.1k]
  ------------------
  770|  18.7k|        invalid_vertices.push_back(vertex_n);
  771|  18.7k|      }
  772|  28.8k|      active_corner_stack.back() = corner;
  773|  70.0k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 70.0k, False: 0]
  ------------------
  774|  70.0k|      const CornerIndex corner(3 * face.value());
  775|  70.0k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  70.0k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  70.0k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  70.0k|                                       corner_table_->AddNewVertex());
  780|  70.0k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  70.0k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  70.0k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 1, False: 70.0k]
  ------------------
  784|      1|        return -1;  // Unexpected number of decoded vertices.
  785|      1|      }
  786|       |
  787|  70.0k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  70.0k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  70.0k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  70.0k|      active_corner_stack.push_back(corner);
  792|  70.0k|      check_topology_split = true;
  793|  70.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|  67.3M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  67.3M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 34.2M, False: 33.0M]
  ------------------
  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|  34.2M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  34.2M|      EdgeFaceName split_edge;
  812|  34.2M|      int encoder_split_symbol_id;
  813|  34.2M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.95k, False: 34.2M]
  ------------------
  814|  34.2M|                             &encoder_split_symbol_id)) {
  815|  1.95k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 24, False: 1.93k]
  ------------------
  816|     24|          return -1;  // Wrong split symbol id.
  817|     24|        }
  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.93k|        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.93k|        CornerIndex new_active_corner;
  831|  1.93k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 440, False: 1.49k]
  ------------------
  832|    440|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.49k|        } else {
  834|  1.49k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.49k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.93k|        const int decoder_split_symbol_id =
  839|  1.93k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.93k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.93k|            new_active_corner;
  842|  1.93k|      }
  843|  34.2M|    }
  844|  67.3M|  }
  845|  1.15k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.15k]
  ------------------
  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|  30.9k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 29.7k, False: 1.14k]
  ------------------
  850|  29.7k|    const CornerIndex corner = active_corner_stack.back();
  851|  29.7k|    active_corner_stack.pop_back();
  852|  29.7k|    const bool interior_face =
  853|  29.7k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  29.7k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 24.9k, False: 4.84k]
  ------------------
  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|  24.9k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 3, False: 24.9k]
  ------------------
  877|      3|        return -1;  // More faces than expected added to the mesh.
  878|      3|      }
  879|       |
  880|  24.9k|      const CornerIndex corner_a = corner;
  881|  24.9k|      const VertexIndex vert_n =
  882|  24.9k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  24.9k|      const CornerIndex corner_b =
  884|  24.9k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  24.9k|      const VertexIndex vert_x =
  887|  24.9k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  24.9k|      const CornerIndex corner_c =
  889|  24.9k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  24.9k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 4, False: 24.9k]
  |  Branch (891:33): [True: 7, False: 24.9k]
  |  Branch (891:55): [True: 0, False: 24.9k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     11|        return -1;
  894|     11|      }
  895|  24.9k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 24.9k]
  |  Branch (895:11): [True: 0, False: 24.9k]
  ------------------
  896|  24.9k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 24.9k]
  ------------------
  897|  24.9k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 24.9k]
  ------------------
  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|  24.9k|      const VertexIndex vert_p =
  904|  24.9k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  24.9k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  24.9k|      const CornerIndex new_corner(3 * face.value());
  909|  24.9k|      SetOppositeCorners(new_corner, corner);
  910|  24.9k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  24.9k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  24.9k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  24.9k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  24.9k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  99.7k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 74.7k, False: 24.9k]
  ------------------
  920|  74.7k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  74.7k|      }
  922|       |
  923|  24.9k|      init_face_configurations_.push_back(true);
  924|  24.9k|      init_corners_.push_back(new_corner);
  925|  24.9k|    } 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|  4.84k|      init_face_configurations_.push_back(false);
  930|  4.84k|      init_corners_.push_back(corner);
  931|  4.84k|    }
  932|  29.7k|  }
  933|  1.14k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 31, False: 1.11k]
  ------------------
  934|     31|    return -1;  // Unexpected number of decoded faces.
  935|     31|  }
  936|       |
  937|  1.11k|  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.63k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.63k, False: 1.11k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.63k|    VertexIndex src_vert(num_vertices - 1);
  943|  1.82k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 184, False: 1.63k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    184|      src_vert = VertexIndex(--num_vertices - 1);
  946|    184|    }
  947|  1.63k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 184, False: 1.45k]
  ------------------
  948|    184|      continue;  // No need to swap anything.
  949|    184|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.45k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  7.59k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 6.13k, False: 1.45k]
  ------------------
  954|  6.13k|      const CornerIndex cid = vcit.Corner();
  955|  6.13k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 6.13k]
  ------------------
  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|  6.13k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  6.13k|    }
  962|  1.45k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.45k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.45k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.45k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.45k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.45k|    num_vertices--;
  972|  1.45k|  }
  973|  1.11k|  return num_vertices;
  974|  1.11k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  1.32k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  1.32k|  uint32_t num_topology_splits;
  982|  1.32k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  1.32k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.32k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 70, False: 1.25k]
  ------------------
  984|     70|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 70]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     70|  } else
  989|  1.25k|#endif
  990|  1.25k|  {
  991|  1.25k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 1, False: 1.25k]
  ------------------
  992|      1|      return -1;
  993|      1|    }
  994|  1.25k|  }
  995|  1.32k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 661, False: 664]
  ------------------
  996|    661|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 14, False: 647]
  ------------------
  997|    661|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     14|      return -1;
  999|     14|    }
 1000|    647|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    647|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    647|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 35, False: 612]
  ------------------
 1002|  29.8k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 29.8k, False: 16]
  ------------------
 1003|  29.8k|        TopologySplitEventData event_data;
 1004|  29.8k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 13, False: 29.8k]
  ------------------
 1005|     13|          return -1;
 1006|     13|        }
 1007|  29.8k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 5, False: 29.8k]
  ------------------
 1008|      5|          return -1;
 1009|      5|        }
 1010|  29.8k|        uint8_t edge_data;
 1011|  29.8k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 1, False: 29.8k]
  ------------------
 1012|      1|          return -1;
 1013|      1|        }
 1014|  29.8k|        event_data.source_edge = edge_data & 1;
 1015|  29.8k|        topology_split_data_.push_back(event_data);
 1016|  29.8k|      }
 1017|       |
 1018|     35|    } else
 1019|    612|#endif
 1020|    612|    {
 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|    612|      int last_source_symbol_id = 0;
 1024|  24.6k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 24.0k, False: 602]
  ------------------
 1025|  24.0k|        TopologySplitEventData event_data;
 1026|  24.0k|        uint32_t delta;
 1027|  24.0k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 5, False: 24.0k]
  ------------------
 1028|      5|          return -1;
 1029|      5|        }
 1030|  24.0k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  24.0k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 5, False: 24.0k]
  ------------------
 1032|      5|          return -1;
 1033|      5|        }
 1034|  24.0k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 24.0k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  24.0k|        event_data.split_symbol_id =
 1038|  24.0k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  24.0k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  24.0k|        topology_split_data_.push_back(event_data);
 1041|  24.0k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    602|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.23k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.63k, False: 602]
  ------------------
 1045|  3.63k|        uint32_t edge_data;
 1046|  3.63k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.63k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 2.25k, False: 1.37k]
  ------------------
 1047|  2.25k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  2.25k|        } else {
 1049|  1.37k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  1.37k|        }
 1051|  3.63k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  3.63k|        event_data.source_edge = edge_data & 1;
 1053|  3.63k|      }
 1054|    602|      decoder_buffer->EndBitDecoding();
 1055|    602|    }
 1056|    647|  }
 1057|  1.28k|  uint32_t num_hole_events = 0;
 1058|  1.28k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  1.28k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.28k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 36, False: 1.24k]
  ------------------
 1060|     36|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 1, False: 35]
  ------------------
 1061|      1|      return -1;
 1062|      1|    }
 1063|  1.24k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.24k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 226, False: 1.02k]
  ------------------
 1064|    226|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 4, False: 222]
  ------------------
 1065|      4|      return -1;
 1066|      4|    }
 1067|    226|  }
 1068|  1.27k|#endif
 1069|  1.27k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 40, False: 1.23k]
  ------------------
 1070|     40|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     40|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     40|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 29, False: 11]
  ------------------
 1072|   667k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 667k, False: 0]
  ------------------
 1073|   667k|        HoleEventData event_data;
 1074|   667k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 29, False: 667k]
  ------------------
 1075|     29|          return -1;
 1076|     29|        }
 1077|   667k|        hole_event_data_.push_back(event_data);
 1078|   667k|      }
 1079|       |
 1080|     29|    } else
 1081|     11|#endif
 1082|     11|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     11|      int last_symbol_id = 0;
 1085|  45.7k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 45.7k, False: 7]
  ------------------
 1086|  45.7k|        HoleEventData event_data;
 1087|  45.7k|        uint32_t delta;
 1088|  45.7k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 4, False: 45.7k]
  ------------------
 1089|      4|          return -1;
 1090|      4|        }
 1091|  45.7k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  45.7k|        last_symbol_id = event_data.symbol_id;
 1093|  45.7k|        hole_event_data_.push_back(event_data);
 1094|  45.7k|      }
 1095|     11|    }
 1096|     40|  }
 1097|  1.24k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  1.27k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   337k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   337k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   337k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  1.35M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.01M, False: 337k]
  ------------------
 1109|  1.01M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.01M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 2.82k, False: 1.01M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  5.68k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 2.86k, False: 2.82k]
  ------------------
 1114|  2.86k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  2.86k|      }
 1116|  2.82k|      continue;
 1117|  2.82k|    }
 1118|       |
 1119|  2.02M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.01M, False: 1.01M]
  ------------------
 1120|  1.01M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.01M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 22.4k, False: 989k]
  ------------------
 1122|  22.4k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  22.4k|      }
 1124|  1.01M|    }
 1125|  1.01M|  }
 1126|   337k|  return true;
 1127|   337k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  6.71M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  6.71M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  6.71M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  6.71M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  26.8M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 20.1M, False: 6.71M]
  ------------------
 1139|  20.1M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  20.1M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 87.3k, False: 20.0M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   197k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 109k, False: 87.3k]
  ------------------
 1144|   109k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   109k|      }
 1146|  87.3k|      continue;
 1147|  87.3k|    }
 1148|  20.0M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  20.0M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 10.0M, False: 10.0M]
  ------------------
 1151|  10.0M|      continue;
 1152|  10.0M|    }
 1153|       |
 1154|  22.4M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 12.3M, False: 10.0M]
  ------------------
 1155|  12.3M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  12.3M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 9.97M, False: 2.41M]
  ------------------
 1157|  9.97M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  9.97M|      }
 1159|  12.3M|    }
 1160|  10.0M|  }
 1161|  6.71M|  return true;
 1162|  6.71M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.11k|    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.11k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.11k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 48, False: 1.06k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   509k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 509k, False: 48]
  ------------------
 1176|   509k|      Mesh::Face face;
 1177|   509k|      const CornerIndex start_corner(3 * f.value());
 1178|  2.03M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 1.52M, False: 509k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  1.52M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  1.52M|        face[c] = vert_id;
 1182|  1.52M|      }
 1183|   509k|      decoder_->mesh()->SetFace(f, face);
 1184|   509k|    }
 1185|     48|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     48|    return true;
 1187|     48|  }
 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.06k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.06k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  3.57M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 3.57M, False: 1.06k]
  ------------------
 1197|  3.57M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  3.57M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 3.80k, False: 3.57M]
  ------------------
 1199|  3.80k|      continue;  // Isolated vertex.
 1200|  3.80k|    }
 1201|  3.57M|    CornerIndex deduplication_first_corner = c;
 1202|  3.57M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 90.0k, False: 3.48M]
  ------------------
 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|  90.0k|      deduplication_first_corner = c;
 1206|  3.48M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  4.16M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 3.49M, False: 668k]
  ------------------
 1210|  3.49M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 670k, False: 2.82M]
  ------------------
 1211|   670k|          continue;  // No seam for this attribute, ignore it.
 1212|   670k|        }
 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.82M|        const VertexIndex vert_id =
 1217|  2.82M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  2.82M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  2.82M|        bool seam_found = false;
 1220|  2.95M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 2.93M, False: 13.5k]
  ------------------
 1221|  2.93M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 1, False: 2.93M]
  ------------------
 1222|      1|            return false;
 1223|      1|          }
 1224|  2.93M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 2.81M, False: 121k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  2.81M|            deduplication_first_corner = act_c;
 1227|  2.81M|            seam_found = true;
 1228|  2.81M|            break;
 1229|  2.81M|          }
 1230|   121k|          act_c = corner_table_->SwingRight(act_c);
 1231|   121k|        }
 1232|  2.82M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 2.81M, False: 13.5k]
  ------------------
 1233|  2.81M|          break;  // No reason to process other attributes if we found a seam.
 1234|  2.81M|        }
 1235|  2.82M|      }
 1236|  3.48M|    }
 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.57M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  3.57M|    corner_to_point_map[c.value()] =
 1246|  3.57M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  3.57M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  3.57M|    CornerIndex prev_c = c;
 1250|  3.57M|    c = corner_table_->SwingRight(c);
 1251|  21.1M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 21.0M, False: 90.8k]
  |  Branch (1251:40): [True: 17.5M, False: 3.48M]
  ------------------
 1252|  17.5M|      bool attribute_seam = false;
 1253|  21.1M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 17.6M, False: 3.44M]
  ------------------
 1254|  17.6M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 14.1M, False: 3.52M]
  ------------------
 1255|  17.6M|            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|  14.1M|          attribute_seam = true;
 1259|  14.1M|          break;
 1260|  14.1M|        }
 1261|  17.6M|      }
 1262|  17.5M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 14.1M, False: 3.44M]
  ------------------
 1263|  14.1M|        corner_to_point_map[c.value()] =
 1264|  14.1M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  14.1M|        point_to_corner_map.push_back(c.value());
 1266|  14.1M|      } else {
 1267|  3.44M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.44M|      }
 1269|  17.5M|      prev_c = c;
 1270|  17.5M|      c = corner_table_->SwingRight(c);
 1271|  17.5M|    }
 1272|  3.57M|  }
 1273|       |  // Add faces.
 1274|  7.03M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 7.03M, False: 1.06k]
  ------------------
 1275|  7.03M|    Mesh::Face face;
 1276|  28.1M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 21.1M, False: 7.03M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  21.1M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  21.1M|    }
 1280|  7.03M|    decoder_->mesh()->SetFace(f, face);
 1281|  7.03M|  }
 1282|  1.06k|  decoder_->point_cloud()->set_num_points(
 1283|  1.06k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.06k|  return true;
 1285|  1.06k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  1.00k|    : decoder_(nullptr),
   49|  1.00k|      last_symbol_id_(-1),
   50|  1.00k|      last_vert_id_(-1),
   51|  1.00k|      last_face_id_(-1),
   52|  1.00k|      num_new_vertices_(0),
   53|  1.00k|      num_encoded_vertices_(0),
   54|  1.00k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  1.00k|    MeshEdgebreakerDecoder* decoder) {
   59|  1.00k|  decoder_ = decoder;
   60|  1.00k|  return true;
   61|  1.00k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    302|    int att_id) const {
   67|    449|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 273, False: 176]
  ------------------
   68|    273|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    273|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 128, False: 145]
  |  Branch (69:27): [True: 0, False: 145]
  ------------------
   70|    128|      continue;
   71|    128|    }
   72|    145|    const AttributesDecoderInterface* const dec =
   73|    145|        decoder_->attributes_decoder(decoder_id);
   74|  1.05k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 1.03k, False: 19]
  ------------------
   75|  1.03k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 126, False: 906]
  ------------------
   76|    126|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 86, False: 40]
  ------------------
   77|     86|          return &attribute_data_[i].connectivity_data;
   78|     86|        }
   79|     40|        return nullptr;
   80|    126|      }
   81|  1.03k|    }
   82|    145|  }
   83|    176|  return nullptr;
   84|    302|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    302|    int att_id) const {
   90|    449|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 273, False: 176]
  ------------------
   91|    273|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    273|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 128, False: 145]
  |  Branch (92:27): [True: 0, False: 145]
  ------------------
   93|    128|      continue;
   94|    128|    }
   95|    145|    const AttributesDecoderInterface* const dec =
   96|    145|        decoder_->attributes_decoder(decoder_id);
   97|  1.05k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 1.03k, False: 19]
  ------------------
   98|  1.03k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 126, False: 906]
  ------------------
   99|    126|        return &attribute_data_[i].encoding_data;
  100|    126|      }
  101|  1.03k|    }
  102|    145|  }
  103|    176|  return &pos_encoding_data_;
  104|    302|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    200|    int32_t att_decoder_id) {
  131|    200|  int8_t att_data_id;
  132|    200|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 10, False: 190]
  ------------------
  133|     10|    return false;
  134|     10|  }
  135|    190|  uint8_t decoder_type;
  136|    190|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 2, False: 188]
  ------------------
  137|      2|    return false;
  138|      2|  }
  139|       |
  140|    188|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 95, False: 93]
  ------------------
  141|     95|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 14, False: 81]
  ------------------
  142|     14|      return false;  // Unexpected attribute data.
  143|     14|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|     81|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 0, False: 81]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|       |
  151|     81|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|     93|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|     93|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 93]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|     93|    pos_data_decoder_id_ = att_decoder_id;
  158|     93|  }
  159|       |
  160|    174|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    174|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    174|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 174, False: 0]
  ------------------
  162|    174|    uint8_t traversal_method_encoded;
  163|    174|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 174]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    174|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 6, False: 168]
  ------------------
  168|      6|      return false;
  169|      6|    }
  170|    168|    traversal_method =
  171|    168|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    168|  }
  173|       |
  174|    168|  const Mesh* mesh = decoder_->mesh();
  175|    168|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    168|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 128, False: 40]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    128|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    128|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 92, False: 36]
  ------------------
  182|     92|      encoding_data = &pos_encoding_data_;
  183|     92|    } else {
  184|     36|      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|     36|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     36|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    128|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 38, False: 90]
  ------------------
  191|     38|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     38|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     38|          AttTraverser;
  194|     38|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|     90|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 90, False: 0]
  ------------------
  196|     90|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|     90|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|     90|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|     90|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    128|  } else {
  203|     40|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 3, False: 37]
  ------------------
  204|      3|      return false;  // Unsupported method.
  205|      3|    }
  206|     37|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 1, False: 36]
  ------------------
  207|      1|      return false;  // Attribute data must be specified.
  208|      1|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     36|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     36|        AttObserver;
  214|     36|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     36|        AttTraverser;
  216|       |
  217|     36|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|     36|        &attribute_data_[att_data_id].encoding_data;
  219|     36|    const MeshAttributeCornerTable* const corner_table =
  220|     36|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     36|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     36|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     36|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     36|                             encoding_data);
  227|       |
  228|     36|    AttTraverser att_traverser;
  229|     36|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     36|    traversal_sequencer->SetTraverser(att_traverser);
  232|     36|    sequencer = std::move(traversal_sequencer);
  233|     36|  }
  234|       |
  235|    164|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 164]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    164|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    164|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    164|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    164|                                        std::move(att_controller));
  244|    164|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  1.00k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  1.00k|  num_new_vertices_ = 0;
  249|  1.00k|  new_to_parent_vertex_map_.clear();
  250|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 304, False: 704]
  ------------------
  252|    304|    uint32_t num_new_verts;
  253|    304|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    304|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 272, False: 32]
  ------------------
  254|    272|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 272]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    272|    } else {
  258|     32|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 32]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|     32|    }
  262|    304|    num_new_vertices_ = num_new_verts;
  263|    304|  }
  264|  1.00k|#endif
  265|       |
  266|  1.00k|  uint32_t num_encoded_vertices;
  267|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 272, False: 736]
  ------------------
  269|    272|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 272]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    272|  } else
  274|    736|#endif
  275|    736|  {
  276|    736|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 736]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|    736|  }
  280|  1.00k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  1.00k|  uint32_t num_faces;
  283|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 272, False: 736]
  ------------------
  285|    272|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 272]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    272|  } else
  290|    736|#endif
  291|    736|  {
  292|    736|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 736]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|    736|  }
  296|  1.00k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 1.00k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  1.00k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 3, False: 1.00k]
  ------------------
  301|      3|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      3|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  1.00k|  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.00k|  const uint64_t num_encoded_vertices_64 =
  311|  1.00k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  1.00k|  const uint64_t max_num_vertex_edges =
  313|  1.00k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  1.00k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 1.00k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  1.00k|  uint8_t num_attribute_data;
  320|  1.00k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 1.00k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  1.00k|  uint32_t num_encoded_symbols;
  325|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 269, False: 735]
  ------------------
  327|    269|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 269]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    269|  } else
  332|    735|#endif
  333|    735|  {
  334|    735|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 735]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|    735|  }
  338|       |
  339|  1.00k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 0, False: 1.00k]
  ------------------
  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.00k|  const uint32_t max_encoded_faces =
  346|  1.00k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  1.00k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 2, False: 1.00k]
  ------------------
  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|      2|    return false;
  352|      2|  }
  353|       |
  354|  1.00k|  uint32_t num_encoded_split_symbols;
  355|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 267, False: 735]
  ------------------
  357|    267|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 267]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    267|  } else
  362|    735|#endif
  363|    735|  {
  364|    735|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 735]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|    735|  }
  368|       |
  369|  1.00k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 0, False: 1.00k]
  ------------------
  370|      0|    return false;  // Split symbols are a sub-set of all symbols.
  371|      0|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  1.00k|  vertex_traversal_length_.clear();
  375|  1.00k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  1.00k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 1.00k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  1.00k|  processed_corner_ids_.clear();
  380|  1.00k|  processed_corner_ids_.reserve(num_faces);
  381|  1.00k|  processed_connectivity_corners_.clear();
  382|  1.00k|  processed_connectivity_corners_.reserve(num_faces);
  383|  1.00k|  topology_split_data_.clear();
  384|  1.00k|  hole_event_data_.clear();
  385|  1.00k|  init_face_configurations_.clear();
  386|  1.00k|  init_corners_.clear();
  387|       |
  388|  1.00k|  last_symbol_id_ = -1;
  389|  1.00k|  last_face_id_ = -1;
  390|  1.00k|  last_vert_id_ = -1;
  391|       |
  392|  1.00k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  1.00k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  1.00k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 1.00k]
  ------------------
  397|  1.00k|          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.00k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  1.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  1.00k|  int32_t topology_split_decoded_bytes = -1;
  410|  1.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 299, False: 703]
  ------------------
  411|    299|    uint32_t encoded_connectivity_size;
  412|    299|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    299|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 267, False: 32]
  ------------------
  413|    267|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 267]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    267|    } else {
  417|     32|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 32]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|     32|    }
  421|    299|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 299]
  ------------------
  422|    299|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 7, False: 292]
  ------------------
  423|      7|      return false;
  424|      7|    }
  425|    292|    DecoderBuffer event_buffer;
  426|    292|    event_buffer.Init(
  427|    292|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    292|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    292|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    292|    topology_split_decoded_bytes =
  432|    292|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    292|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 76, False: 216]
  ------------------
  434|     76|      return false;
  435|     76|    }
  436|       |
  437|    292|  } else
  438|    703|#endif
  439|    703|  {
  440|    703|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 10, False: 693]
  ------------------
  441|     10|      return false;
  442|     10|    }
  443|    703|  }
  444|       |
  445|    909|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|    909|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|    909|                                           num_encoded_split_symbols);
  449|    909|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|    909|  DecoderBuffer traversal_end_buffer;
  452|    909|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 332, False: 577]
  ------------------
  453|    332|    return false;
  454|    332|  }
  455|       |
  456|    577|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|    577|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 383, False: 194]
  ------------------
  458|    383|    return false;
  459|    383|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    194|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    194|                           traversal_end_buffer.remaining_size(),
  464|    194|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    194|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    194|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    194|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 5, False: 189]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      5|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      5|  }
  471|    194|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    194|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 115, False: 79]
  ------------------
  475|    115|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    115|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    115|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 110]
  ------------------
  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|    110|#endif
  485|    110|    {
  486|   427k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 427k, False: 110]
  ------------------
  487|   427k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 427k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   427k|      }
  491|    110|    }
  492|    115|  }
  493|    194|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|    904|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 710, False: 194]
  ------------------
  498|    710|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   761k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 761k, False: 710]
  ------------------
  501|   761k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   761k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    710|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 710]
  ------------------
  505|    710|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    710|  }
  509|       |
  510|    194|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|    904|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 710, False: 194]
  ------------------
  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|    710|    int32_t att_connectivity_verts =
  517|    710|        attribute_data_[i].connectivity_data.num_vertices();
  518|    710|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 0, False: 710]
  ------------------
  519|      0|      att_connectivity_verts = corner_table_->num_vertices();
  520|      0|    }
  521|    710|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    710|  }
  523|    194|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 5, False: 189]
  ------------------
  524|      5|    return false;
  525|      5|  }
  526|    189|  return true;
  527|    194|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     30|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     30|  return true;
  532|     30|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|    577|    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|    577|  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|    577|  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|    577|  std::vector<VertexIndex> invalid_vertices;
  558|    577|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|    577|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|    577|  int num_faces = 0;
  562|  44.3M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 44.3M, False: 261]
  ------------------
  563|  44.3M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  44.3M|    bool check_topology_split = false;
  566|  44.3M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  44.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 122k, False: 44.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|   122k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 110, False: 122k]
  ------------------
  588|    110|        return -1;
  589|    110|      }
  590|       |
  591|   122k|      const CornerIndex corner_a = active_corner_stack.back();
  592|   122k|      const VertexIndex vertex_x =
  593|   122k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|   122k|      const CornerIndex corner_b =
  595|   122k|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|   122k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 88, False: 122k]
  ------------------
  598|       |        // All matched corners must be different.
  599|     88|        return -1;
  600|     88|      }
  601|   122k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 122k]
  |  Branch (601:11): [True: 0, False: 122k]
  ------------------
  602|   122k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 122k]
  ------------------
  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|   122k|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|   122k|      SetOppositeCorners(corner_a, corner + 1);
  612|   122k|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|   122k|      const VertexIndex vert_a_prev =
  616|   122k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|   122k|      const VertexIndex vert_b_next =
  618|   122k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|   122k|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 122k]
  |  Branch (619:38): [True: 0, False: 122k]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|   122k|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|   122k|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|   122k|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|   122k|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|   122k|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|   122k|      active_corner_stack.back() = corner;
  631|  44.2M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 5.17k, False: 44.2M]
  |  Branch (631:40): [True: 30.4M, False: 13.7M]
  ------------------
  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|  30.4M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 30.4M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  30.4M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  30.4M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 30.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|  30.4M|      const CornerIndex corner(3 * face.value());
  658|  30.4M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  30.4M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 5.17k, False: 30.4M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  5.17k|        opp_corner = corner + 2;
  662|  5.17k|        corner_l = corner + 1;
  663|  5.17k|        corner_r = corner;
  664|  30.4M|      } else {
  665|       |        // "l" is the new first corner.
  666|  30.4M|        opp_corner = corner + 1;
  667|  30.4M|        corner_l = corner;
  668|  30.4M|        corner_r = corner + 2;
  669|  30.4M|      }
  670|  30.4M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  30.4M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  30.4M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 3, False: 30.4M]
  ------------------
  675|      3|        return -1;  // Unexpected number of decoded vertices.
  676|      3|      }
  677|       |
  678|  30.4M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  30.4M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  30.4M|      const VertexIndex vertex_r =
  682|  30.4M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  30.4M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  30.4M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  30.4M|      corner_table_->MapCornerToVertex(
  688|  30.4M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  30.4M|      active_corner_stack.back() = corner;
  690|  30.4M|      check_topology_split = true;
  691|  30.4M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 14.1k, False: 13.7M]
  ------------------
  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|  14.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 14.1k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  14.1k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  14.1k|      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|  14.1k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  14.1k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 53, False: 14.1k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     53|        active_corner_stack.push_back(it->second);
  714|     53|      }
  715|  14.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 23, False: 14.1k]
  ------------------
  716|     23|        return -1;
  717|     23|      }
  718|  14.1k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  14.1k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 14.1k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  14.1k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 0, False: 14.1k]
  |  Branch (724:11): [True: 0, False: 14.1k]
  ------------------
  725|  14.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 14.1k]
  ------------------
  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|  14.1k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  14.1k|      SetOppositeCorners(corner_a, corner + 2);
  735|  14.1k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  14.1k|      const VertexIndex vertex_p =
  739|  14.1k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  14.1k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  14.1k|      corner_table_->MapCornerToVertex(
  742|  14.1k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  14.1k|      const VertexIndex vert_b_prev =
  744|  14.1k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  14.1k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  14.1k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  14.1k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  14.1k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  14.1k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  14.1k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  14.1k|                                       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|  14.1k|      const CornerIndex first_corner = corner_n;
  757|   325k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 311k, False: 14.1k]
  ------------------
  758|   311k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   311k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   311k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 311k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|   311k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  14.1k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  14.1k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 13.6k, False: 512]
  ------------------
  770|  13.6k|        invalid_vertices.push_back(vertex_n);
  771|  13.6k|      }
  772|  14.1k|      active_corner_stack.back() = corner;
  773|  13.7M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 13.7M, False: 75]
  ------------------
  774|  13.7M|      const CornerIndex corner(3 * face.value());
  775|  13.7M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  13.7M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  13.7M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  13.7M|                                       corner_table_->AddNewVertex());
  780|  13.7M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  13.7M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  13.7M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 13.7M]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  13.7M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  13.7M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  13.7M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  13.7M|      active_corner_stack.push_back(corner);
  792|  13.7M|      check_topology_split = true;
  793|  13.7M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|     75|      return -1;
  796|     75|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  44.3M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  44.3M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 44.2M, False: 136k]
  ------------------
  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|  44.2M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  44.2M|      EdgeFaceName split_edge;
  812|  44.2M|      int encoder_split_symbol_id;
  813|  44.2M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.46k, False: 44.2M]
  ------------------
  814|  44.2M|                             &encoder_split_symbol_id)) {
  815|  2.46k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 12, False: 2.45k]
  ------------------
  816|     12|          return -1;  // Wrong split symbol id.
  817|     12|        }
  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|  2.45k|        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|  2.45k|        CornerIndex new_active_corner;
  831|  2.45k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.20k, False: 1.24k]
  ------------------
  832|  1.20k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.24k|        } else {
  834|  1.24k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.24k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.45k|        const int decoder_split_symbol_id =
  839|  2.45k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.45k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.45k|            new_active_corner;
  842|  2.45k|      }
  843|  44.2M|    }
  844|  44.3M|  }
  845|    261|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 261]
  ------------------
  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|  10.4M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 10.4M, False: 242]
  ------------------
  850|  10.4M|    const CornerIndex corner = active_corner_stack.back();
  851|  10.4M|    active_corner_stack.pop_back();
  852|  10.4M|    const bool interior_face =
  853|  10.4M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  10.4M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 3.52M, False: 6.89M]
  ------------------
  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|  3.52M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 9, False: 3.52M]
  ------------------
  877|      9|        return -1;  // More faces than expected added to the mesh.
  878|      9|      }
  879|       |
  880|  3.52M|      const CornerIndex corner_a = corner;
  881|  3.52M|      const VertexIndex vert_n =
  882|  3.52M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  3.52M|      const CornerIndex corner_b =
  884|  3.52M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  3.52M|      const VertexIndex vert_x =
  887|  3.52M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  3.52M|      const CornerIndex corner_c =
  889|  3.52M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  3.52M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 1, False: 3.52M]
  |  Branch (891:33): [True: 3, False: 3.52M]
  |  Branch (891:55): [True: 0, False: 3.52M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      4|        return -1;
  894|      4|      }
  895|  3.52M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 1, False: 3.52M]
  |  Branch (895:11): [True: 6, False: 3.52M]
  ------------------
  896|  3.52M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 3, False: 3.52M]
  ------------------
  897|  3.52M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 2, False: 3.52M]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      6|        return -1;
  901|      6|      }
  902|       |
  903|  3.52M|      const VertexIndex vert_p =
  904|  3.52M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  3.52M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  3.52M|      const CornerIndex new_corner(3 * face.value());
  909|  3.52M|      SetOppositeCorners(new_corner, corner);
  910|  3.52M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  3.52M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  3.52M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  3.52M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  3.52M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  14.1M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 10.5M, False: 3.52M]
  ------------------
  920|  10.5M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  10.5M|      }
  922|       |
  923|  3.52M|      init_face_configurations_.push_back(true);
  924|  3.52M|      init_corners_.push_back(new_corner);
  925|  6.89M|    } 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.89M|      init_face_configurations_.push_back(false);
  930|  6.89M|      init_corners_.push_back(corner);
  931|  6.89M|    }
  932|  10.4M|  }
  933|    242|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 41, False: 201]
  ------------------
  934|     41|    return -1;  // Unexpected number of decoded faces.
  935|     41|  }
  936|       |
  937|    201|  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|  4.81k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 4.81k, False: 194]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  4.81k|    VertexIndex src_vert(num_vertices - 1);
  943|  5.56k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 749, False: 4.81k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    749|      src_vert = VertexIndex(--num_vertices - 1);
  946|    749|    }
  947|  4.81k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 599, False: 4.21k]
  ------------------
  948|    599|      continue;  // No need to swap anything.
  949|    599|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  4.21k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  17.1k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 12.9k, False: 4.21k]
  ------------------
  954|  12.9k|      const CornerIndex cid = vcit.Corner();
  955|  12.9k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 7, False: 12.9k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      7|        return -1;
  959|      7|      }
  960|  12.9k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  12.9k|    }
  962|  4.21k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  4.21k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  4.21k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  4.21k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  4.21k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  4.21k|    num_vertices--;
  972|  4.21k|  }
  973|    194|  return num_vertices;
  974|    201|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|    995|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|    995|  uint32_t num_topology_splits;
  982|    995|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|    995|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    995|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 260, False: 735]
  ------------------
  984|    260|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 260]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|    260|  } else
  989|    735|#endif
  990|    735|  {
  991|    735|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 735]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|    735|  }
  995|    995|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 306, False: 689]
  ------------------
  996|    306|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 14, False: 292]
  ------------------
  997|    306|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     14|      return -1;
  999|     14|    }
 1000|    292|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    292|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    292|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 32, False: 260]
  ------------------
 1002|   212k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 212k, False: 6]
  ------------------
 1003|   212k|        TopologySplitEventData event_data;
 1004|   212k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 15, False: 212k]
  ------------------
 1005|     15|          return -1;
 1006|     15|        }
 1007|   212k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 8, False: 212k]
  ------------------
 1008|      8|          return -1;
 1009|      8|        }
 1010|   212k|        uint8_t edge_data;
 1011|   212k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 3, False: 212k]
  ------------------
 1012|      3|          return -1;
 1013|      3|        }
 1014|   212k|        event_data.source_edge = edge_data & 1;
 1015|   212k|        topology_split_data_.push_back(event_data);
 1016|   212k|      }
 1017|       |
 1018|     32|    } else
 1019|    260|#endif
 1020|    260|    {
 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|    260|      int last_source_symbol_id = 0;
 1024|   109k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 108k, False: 248]
  ------------------
 1025|   108k|        TopologySplitEventData event_data;
 1026|   108k|        uint32_t delta;
 1027|   108k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 5, False: 108k]
  ------------------
 1028|      5|          return -1;
 1029|      5|        }
 1030|   108k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|   108k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 7, False: 108k]
  ------------------
 1032|      7|          return -1;
 1033|      7|        }
 1034|   108k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 108k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|   108k|        event_data.split_symbol_id =
 1038|   108k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|   108k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|   108k|        topology_split_data_.push_back(event_data);
 1041|   108k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    248|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.03k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.78k, False: 248]
  ------------------
 1045|  3.78k|        uint32_t edge_data;
 1046|  3.78k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.78k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 616, False: 3.17k]
  ------------------
 1047|    616|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.17k|        } else {
 1049|  3.17k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.17k|        }
 1051|  3.78k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  3.78k|        event_data.source_edge = edge_data & 1;
 1053|  3.78k|      }
 1054|    248|      decoder_buffer->EndBitDecoding();
 1055|    248|    }
 1056|    292|  }
 1057|    943|  uint32_t num_hole_events = 0;
 1058|    943|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|    943|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    943|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 218, False: 725]
  ------------------
 1060|    218|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 218]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|    725|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    725|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 21, False: 704]
  ------------------
 1064|     21|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 2, False: 19]
  ------------------
 1065|      2|      return -1;
 1066|      2|    }
 1067|     21|  }
 1068|    941|#endif
 1069|    941|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 43, False: 898]
  ------------------
 1070|     43|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     43|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     43|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 23, False: 20]
  ------------------
 1072|   176k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 176k, False: 1]
  ------------------
 1073|   176k|        HoleEventData event_data;
 1074|   176k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 22, False: 176k]
  ------------------
 1075|     22|          return -1;
 1076|     22|        }
 1077|   176k|        hole_event_data_.push_back(event_data);
 1078|   176k|      }
 1079|       |
 1080|     23|    } else
 1081|     20|#endif
 1082|     20|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     20|      int last_symbol_id = 0;
 1085|  57.8k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 57.8k, False: 10]
  ------------------
 1086|  57.8k|        HoleEventData event_data;
 1087|  57.8k|        uint32_t delta;
 1088|  57.8k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 10, False: 57.8k]
  ------------------
 1089|     10|          return -1;
 1090|     10|        }
 1091|  57.8k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  57.8k|        last_symbol_id = event_data.symbol_id;
 1093|  57.8k|        hole_event_data_.push_back(event_data);
 1094|  57.8k|      }
 1095|     20|    }
 1096|     43|  }
 1097|    909|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|    941|}
_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|   427k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   427k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   427k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   427k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.70M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 1.28M, False: 427k]
  ------------------
 1139|  1.28M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  1.28M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 210k, False: 1.07M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   566k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 355k, False: 210k]
  ------------------
 1144|   355k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   355k|      }
 1146|   210k|      continue;
 1147|   210k|    }
 1148|  1.07M|    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.07M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 536k, False: 536k]
  ------------------
 1151|   536k|      continue;
 1152|   536k|    }
 1153|       |
 1154|  1.50M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 967k, False: 536k]
  ------------------
 1155|   967k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   967k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 405k, False: 561k]
  ------------------
 1157|   405k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   405k|      }
 1159|   967k|    }
 1160|   536k|  }
 1161|   427k|  return true;
 1162|   427k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    194|    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|    194|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    194|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 79, False: 115]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   153k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 153k, False: 79]
  ------------------
 1176|   153k|      Mesh::Face face;
 1177|   153k|      const CornerIndex start_corner(3 * f.value());
 1178|   613k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 460k, False: 153k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   460k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   460k|        face[c] = vert_id;
 1182|   460k|      }
 1183|   153k|      decoder_->mesh()->SetFace(f, face);
 1184|   153k|    }
 1185|     79|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     79|    return true;
 1187|     79|  }
 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|    115|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    115|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   334k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 334k, False: 110]
  ------------------
 1197|   334k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   334k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 63, False: 334k]
  ------------------
 1199|     63|      continue;  // Isolated vertex.
 1200|     63|    }
 1201|   334k|    CornerIndex deduplication_first_corner = c;
 1202|   334k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 209k, False: 124k]
  ------------------
 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|   209k|      deduplication_first_corner = c;
 1206|   209k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   221k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 180k, False: 41.5k]
  ------------------
 1210|   180k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 93.7k, False: 86.4k]
  ------------------
 1211|  93.7k|          continue;  // No seam for this attribute, ignore it.
 1212|  93.7k|        }
 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|  86.4k|        const VertexIndex vert_id =
 1217|  86.4k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  86.4k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  86.4k|        bool seam_found = false;
 1220|  96.4k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 93.2k, False: 3.18k]
  ------------------
 1221|  93.2k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 5, False: 93.2k]
  ------------------
 1222|      5|            return false;
 1223|      5|          }
 1224|  93.2k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 83.2k, False: 10.0k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  83.2k|            deduplication_first_corner = act_c;
 1227|  83.2k|            seam_found = true;
 1228|  83.2k|            break;
 1229|  83.2k|          }
 1230|  10.0k|          act_c = corner_table_->SwingRight(act_c);
 1231|  10.0k|        }
 1232|  86.4k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 83.2k, False: 3.18k]
  ------------------
 1233|  83.2k|          break;  // No reason to process other attributes if we found a seam.
 1234|  83.2k|        }
 1235|  86.4k|      }
 1236|   124k|    }
 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|   334k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   334k|    corner_to_point_map[c.value()] =
 1246|   334k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   334k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   334k|    CornerIndex prev_c = c;
 1250|   334k|    c = corner_table_->SwingRight(c);
 1251|  1.27M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.06M, False: 209k]
  |  Branch (1251:40): [True: 944k, False: 124k]
  ------------------
 1252|   944k|      bool attribute_seam = false;
 1253|  1.92M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 1.45M, False: 473k]
  ------------------
 1254|  1.45M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 470k, False: 981k]
  ------------------
 1255|  1.45M|            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|   470k|          attribute_seam = true;
 1259|   470k|          break;
 1260|   470k|        }
 1261|  1.45M|      }
 1262|   944k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 470k, False: 473k]
  ------------------
 1263|   470k|        corner_to_point_map[c.value()] =
 1264|   470k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   470k|        point_to_corner_map.push_back(c.value());
 1266|   473k|      } else {
 1267|   473k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   473k|      }
 1269|   944k|      prev_c = c;
 1270|   944k|      c = corner_table_->SwingRight(c);
 1271|   944k|    }
 1272|   334k|  }
 1273|       |  // Add faces.
 1274|   381k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 380k, False: 110]
  ------------------
 1275|   380k|    Mesh::Face face;
 1276|  1.52M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 1.14M, False: 380k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  1.14M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  1.14M|    }
 1280|   380k|    decoder_->mesh()->SetFace(f, face);
 1281|   380k|  }
 1282|    110|  decoder_->point_cloud()->set_num_points(
 1283|    110|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    110|  return true;
 1285|    115|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     76|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|     76|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     76|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     76|  const Mesh* mesh = decoder_->mesh();
  115|     76|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     76|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     76|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     76|                           encoding_data);
  120|       |
  121|     76|  TraverserT att_traverser;
  122|     76|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     76|  traversal_sequencer->SetTraverser(att_traverser);
  125|     76|  return std::move(traversal_sequencer);
  126|     76|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    704|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    704|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    704|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    704|  const Mesh* mesh = decoder_->mesh();
  115|    704|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    704|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    704|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    704|                           encoding_data);
  120|       |
  121|    704|  TraverserT att_traverser;
  122|    704|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    704|  traversal_sequencer->SetTraverser(att_traverser);
  125|    704|  return std::move(traversal_sequencer);
  126|    704|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    142|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    142|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    142|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    142|  const Mesh* mesh = decoder_->mesh();
  115|    142|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    142|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    142|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    142|                           encoding_data);
  120|       |
  121|    142|  TraverserT att_traverser;
  122|    142|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    142|  traversal_sequencer->SetTraverser(att_traverser);
  125|    142|  return std::move(traversal_sequencer);
  126|    142|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    429|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    429|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    429|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    429|  const Mesh* mesh = decoder_->mesh();
  115|    429|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    429|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    429|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    429|                           encoding_data);
  120|       |
  121|    429|  TraverserT att_traverser;
  122|    429|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    429|  traversal_sequencer->SetTraverser(att_traverser);
  125|    429|  return std::move(traversal_sequencer);
  126|    429|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     38|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|     38|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     38|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     38|  const Mesh* mesh = decoder_->mesh();
  115|     38|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     38|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     38|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     38|                           encoding_data);
  120|       |
  121|     38|  TraverserT att_traverser;
  122|     38|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     38|  traversal_sequencer->SetTraverser(att_traverser);
  125|     38|  return std::move(traversal_sequencer);
  126|     38|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     90|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|     90|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     90|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     90|  const Mesh* mesh = decoder_->mesh();
  115|     90|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     90|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     90|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     90|                           encoding_data);
  120|       |
  121|     90|  TraverserT att_traverser;
  122|     90|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     90|  traversal_sequencer->SetTraverser(att_traverser);
  125|     90|  return std::move(traversal_sequencer);
  126|     90|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  5.27k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  2.43k|  const CornerTable* GetCornerTable() const override {
   67|  2.43k|    return corner_table_.get();
   68|  2.43k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  13.3M|                       int* out_encoder_split_symbol_id) {
   87|  13.3M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.63M, False: 11.7M]
  ------------------
   88|  1.63M|      return false;
   89|  1.63M|    }
   90|  11.7M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 15, False: 11.7M]
  ------------------
   91|  11.7M|        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|  11.7M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 11.7M, False: 973]
  ------------------
  101|  11.7M|      return false;
  102|  11.7M|    }
  103|    973|    *out_face_edge =
  104|    973|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|    973|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|    973|    topology_split_data_.pop_back();
  108|    973|    return true;
  109|  11.7M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  38.6M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  38.6M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  38.6M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  38.6M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  7.07k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  3.73k|  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|  34.2M|                       int* out_encoder_split_symbol_id) {
   87|  34.2M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 33.7M, False: 493k]
  ------------------
   88|  33.7M|      return false;
   89|  33.7M|    }
   90|   493k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 24, False: 493k]
  ------------------
   91|   493k|        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|     24|      *out_encoder_split_symbol_id = -1;
   98|     24|      return true;
   99|     24|    }
  100|   493k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 491k, False: 1.93k]
  ------------------
  101|   491k|      return false;
  102|   491k|    }
  103|  1.93k|    *out_face_edge =
  104|  1.93k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.93k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.93k|    topology_split_data_.pop_back();
  108|  1.93k|    return true;
  109|   493k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   100M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   100M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   100M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   100M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  7.73k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  5.27k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  1.21k|  const CornerTable* GetCornerTable() const override {
   67|  1.21k|    return corner_table_.get();
   68|  1.21k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  44.2M|                       int* out_encoder_split_symbol_id) {
   87|  44.2M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 32.4M, False: 11.7M]
  ------------------
   88|  32.4M|      return false;
   89|  32.4M|    }
   90|  11.7M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 12, False: 11.7M]
  ------------------
   91|  11.7M|        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|     12|      *out_encoder_split_symbol_id = -1;
   98|     12|      return true;
   99|     12|    }
  100|  11.7M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 11.7M, False: 2.45k]
  ------------------
  101|  11.7M|      return false;
  102|  11.7M|    }
  103|  2.45k|    *out_face_edge =
  104|  2.45k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.45k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.45k|    topology_split_data_.pop_back();
  108|  2.45k|    return true;
  109|  11.7M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  41.2M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  41.2M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  41.2M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  41.2M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  2.32k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  4.19k|      : attribute_connectivity_decoders_(nullptr),
   34|  4.19k|        num_attribute_data_(0),
   35|  4.19k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  3.91k|  void Init(MeshEdgebreakerDecoderImplInterface* decoder) {
   37|  3.91k|    decoder_impl_ = decoder;
   38|  3.91k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  3.91k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  3.91k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  3.91k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  2.55k|  uint16_t BitstreamVersion() const {
   45|  2.55k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  2.55k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  1.75k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  3.91k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  3.00k|  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.00k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 21, False: 2.98k]
  ------------------
   63|     21|      return false;
   64|     21|    }
   65|       |
   66|  2.98k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 24, False: 2.95k]
  ------------------
   67|     24|      return false;
   68|     24|    }
   69|       |
   70|  2.95k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 15, False: 2.94k]
  ------------------
   71|     15|      return false;
   72|     15|    }
   73|  2.94k|    *out_buffer = buffer_;
   74|  2.94k|    return true;
   75|  2.95k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  10.4M|  inline bool DecodeStartFaceConfiguration() {
   79|  10.4M|    uint32_t face_configuration;
   80|  10.4M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  10.4M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  10.4M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 828, False: 10.4M]
  ------------------
   82|    828|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|    828|    } else
   85|  10.4M|#endif
   86|  10.4M|    {
   87|  10.4M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  10.4M|    }
   89|  10.4M|    return face_configuration;
   90|  10.4M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  27.9M|  inline uint32_t DecodeSymbol() {
   94|  27.9M|    uint32_t symbol;
   95|  27.9M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  27.9M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 11.1M, False: 16.7M]
  ------------------
   97|  11.1M|      return symbol;
   98|  11.1M|    }
   99|       |    // Else decode two additional bits.
  100|  16.7M|    uint32_t symbol_suffix;
  101|  16.7M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  16.7M|    symbol |= (symbol_suffix << 1);
  103|  16.7M|    return symbol;
  104|  27.9M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  27.6M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  3.25M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  15.0M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  15.0M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  15.0M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  2.87k|  void Done() {
  123|  2.87k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 2.68k, False: 189]
  ------------------
  124|  2.68k|      symbol_buffer_.EndBitDecoding();
  125|  2.68k|    }
  126|  2.87k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  2.87k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.87k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 503, False: 2.37k]
  ------------------
  128|    503|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    503|    } else
  131|  2.37k|#endif
  132|  2.37k|    {
  133|  2.37k|      start_face_decoder_.EndDecoding();
  134|  2.37k|    }
  135|  2.87k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|    876|  DecoderBuffer* buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  3.21k|  bool DecodeTraversalSymbols() {
  141|  3.21k|    uint64_t traversal_size;
  142|  3.21k|    symbol_buffer_ = buffer_;
  143|  3.21k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 5, False: 3.21k]
  ------------------
  144|      5|      return false;
  145|      5|    }
  146|  3.21k|    buffer_ = symbol_buffer_;
  147|  3.21k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 27, False: 3.18k]
  ------------------
  148|     27|      return false;
  149|     27|    }
  150|  3.18k|    buffer_.Advance(traversal_size);
  151|  3.18k|    return true;
  152|  3.21k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  3.88k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  3.88k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  3.88k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.88k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 757, False: 3.12k]
  ------------------
  158|    757|      start_face_buffer_ = buffer_;
  159|    757|      uint64_t traversal_size;
  160|    757|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 0, False: 757]
  ------------------
  161|      0|        return false;
  162|      0|      }
  163|    757|      buffer_ = start_face_buffer_;
  164|    757|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 35, False: 722]
  ------------------
  165|     35|        return false;
  166|     35|      }
  167|    722|      buffer_.Advance(traversal_size);
  168|    722|      return true;
  169|    757|    }
  170|  3.12k|#endif
  171|  3.12k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  3.88k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  3.84k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  3.84k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 2.92k, False: 922]
  ------------------
  177|  2.92k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  2.92k|          new BinaryDecoder[num_attribute_data_]);
  179|  10.3k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 7.50k, False: 2.89k]
  ------------------
  180|  7.50k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 23, False: 7.47k]
  ------------------
  181|     23|          return false;
  182|     23|        }
  183|  7.50k|      }
  184|  2.92k|    }
  185|  3.81k|    return true;
  186|  3.84k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  1.24k|MeshSequentialDecoder::MeshSequentialDecoder() = default;
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  1.03k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  1.03k|  uint32_t num_faces;
   31|  1.03k|  uint32_t num_points;
   32|  1.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  1.03k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 166, False: 872]
  ------------------
   34|    166|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 166]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    166|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 166]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    166|  } else
   42|    872|#endif
   43|    872|  {
   44|    872|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 872]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|    872|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 872]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|    872|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  1.03k|  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.03k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 1, False: 1.03k]
  ------------------
   56|      1|    return false;
   57|      1|  }
   58|  1.03k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 2, False: 1.03k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      2|    return false;
   62|      2|  }
   63|  1.03k|  uint8_t connectivity_method;
   64|  1.03k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 1.03k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  1.03k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 752, False: 283]
  ------------------
   68|    752|    if (!DecodeAndDecompressIndices(num_faces, num_points)) {
  ------------------
  |  Branch (68:9): [True: 691, False: 61]
  ------------------
   69|    691|      return false;
   70|    691|    }
   71|    752|  } else {
   72|    283|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 180, False: 103]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|    598|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 422, False: 176]
  ------------------
   75|    422|        Mesh::Face face;
   76|  1.68k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 1.26k, False: 418]
  ------------------
   77|  1.26k|          uint8_t val;
   78|  1.26k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 2, False: 1.26k]
  ------------------
   79|      2|            return false;
   80|      2|          }
   81|  1.26k|          if (val >= num_points) {
  ------------------
  |  Branch (81:15): [True: 2, False: 1.26k]
  ------------------
   82|      2|            return false;
   83|      2|          }
   84|  1.26k|          face[j] = val;
   85|  1.26k|        }
   86|    418|        mesh()->AddFace(face);
   87|    418|      }
   88|    180|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (88:16): [True: 46, False: 57]
  ------------------
   89|       |      // Decode indices as uint16_t.
   90|    262|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:28): [True: 240, False: 22]
  ------------------
   91|    240|        Mesh::Face face;
   92|    908|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (92:25): [True: 692, False: 216]
  ------------------
   93|    692|          uint16_t val;
   94|    692|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (94:15): [True: 4, False: 688]
  ------------------
   95|      4|            return false;
   96|      4|          }
   97|    688|          if (val >= num_points) {
  ------------------
  |  Branch (97:15): [True: 20, False: 668]
  ------------------
   98|     20|            return false;
   99|     20|          }
  100|    668|          face[j] = val;
  101|    668|        }
  102|    216|        mesh()->AddFace(face);
  103|    216|      }
  104|     57|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (104:16): [True: 18, False: 39]
  ------------------
  105|     18|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     18|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (105:16): [True: 18, False: 0]
  ------------------
  106|       |      // Decode indices as uint32_t.
  107|    839|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (107:28): [True: 830, False: 9]
  ------------------
  108|    830|        Mesh::Face face;
  109|  3.30k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (109:25): [True: 2.48k, False: 821]
  ------------------
  110|  2.48k|          uint32_t val;
  111|  2.48k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (111:15): [True: 5, False: 2.47k]
  ------------------
  112|      5|            return false;
  113|      5|          }
  114|  2.47k|          if (val >= num_points) {
  ------------------
  |  Branch (114:15): [True: 4, False: 2.47k]
  ------------------
  115|      4|            return false;
  116|      4|          }
  117|  2.47k|          face[j] = val;
  118|  2.47k|        }
  119|    821|        mesh()->AddFace(face);
  120|    821|      }
  121|     39|    } else {
  122|       |      // Decode faces as uint32_t (default).
  123|  2.39k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (123:28): [True: 2.37k, False: 12]
  ------------------
  124|  2.37k|        Mesh::Face face;
  125|  9.46k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (125:25): [True: 7.11k, False: 2.35k]
  ------------------
  126|  7.11k|          uint32_t val;
  127|  7.11k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (127:15): [True: 9, False: 7.10k]
  ------------------
  128|      9|            return false;
  129|      9|          }
  130|  7.10k|          if (val >= num_points) {
  ------------------
  |  Branch (130:15): [True: 18, False: 7.08k]
  ------------------
  131|     18|            return false;
  132|     18|          }
  133|  7.08k|          face[j] = val;
  134|  7.08k|        }
  135|  2.35k|        mesh()->AddFace(face);
  136|  2.35k|      }
  137|     39|    }
  138|    283|  }
  139|    280|  point_cloud()->set_num_points(num_points);
  140|    280|  return true;
  141|  1.03k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  143|  14.2k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  144|       |  // Always create the basic attribute decoder.
  145|  14.2k|  return SetAttributesDecoder(
  146|  14.2k|      att_decoder_id,
  147|  14.2k|      std::unique_ptr<AttributesDecoder>(
  148|  14.2k|          new SequentialAttributeDecodersController(
  149|  14.2k|              std::unique_ptr<PointsSequencer>(
  150|  14.2k|                  new LinearSequencer(point_cloud()->num_points())))));
  151|  14.2k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEjj:
  154|    752|                                                       uint32_t num_points) {
  155|       |  // Get decoded indices differences that were encoded with an entropy code.
  156|    752|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  157|    752|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (157:7): [True: 610, False: 142]
  ------------------
  158|    610|    return false;
  159|    610|  }
  160|       |  // Reconstruct the indices from the differences.
  161|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  162|    142|  int32_t last_index_value = 0;  // This will always be >= 0.
  163|    142|  int vertex_index = 0;
  164|  4.58k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (164:24): [True: 4.52k, False: 61]
  ------------------
  165|  4.52k|    Mesh::Face face;
  166|  17.9k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (166:21): [True: 13.4k, False: 4.44k]
  ------------------
  167|  13.4k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  168|  13.4k|      int32_t index_diff = (encoded_val >> 1);
  169|  13.4k|      if (encoded_val & 1) {
  ------------------
  |  Branch (169:11): [True: 97, False: 13.3k]
  ------------------
  170|     97|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (170:13): [True: 28, False: 69]
  ------------------
  171|       |          // Subtracting index_diff would result in a negative index.
  172|     28|          return false;
  173|     28|        }
  174|     69|        index_diff = -index_diff;
  175|  13.3k|      } else {
  176|  13.3k|        if (index_diff >
  ------------------
  |  Branch (176:13): [True: 25, False: 13.3k]
  ------------------
  177|  13.3k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  178|       |          // Adding index_diff to last_index_value would overflow.
  179|     25|          return false;
  180|     25|        }
  181|  13.3k|      }
  182|  13.4k|      const int32_t index_value = index_diff + last_index_value;
  183|  13.4k|      if (index_value < 0 || static_cast<uint32_t>(index_value) >= num_points) {
  ------------------
  |  Branch (183:11): [True: 0, False: 13.4k]
  |  Branch (183:30): [True: 28, False: 13.4k]
  ------------------
  184|     28|        return false;
  185|     28|      }
  186|  13.4k|      face[j] = index_value;
  187|  13.4k|      last_index_value = index_value;
  188|  13.4k|    }
  189|  4.44k|    mesh()->AddFace(face);
  190|  4.44k|  }
  191|     61|  return true;
  192|    142|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.18k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.93M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.93M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.88M, False: 48.6k]
  ------------------
   61|  1.88M|      return true;  // Already traversed.
   62|  1.88M|    }
   63|       |
   64|  48.6k|    corner_traversal_stack_.clear();
   65|  48.6k|    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|  48.6k|    const VertexIndex next_vert =
   69|  48.6k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  48.6k|    const VertexIndex prev_vert =
   71|  48.6k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  48.6k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 48.6k]
  |  Branch (72:45): [True: 0, False: 48.6k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  48.6k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 48.2k, False: 440]
  ------------------
   76|  48.2k|      this->MarkVertexVisited(next_vert);
   77|  48.2k|      this->traversal_observer().OnNewVertexVisited(
   78|  48.2k|          next_vert, this->corner_table()->Next(corner_id));
   79|  48.2k|    }
   80|  48.6k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 2.17k, False: 46.5k]
  ------------------
   81|  2.17k|      this->MarkVertexVisited(prev_vert);
   82|  2.17k|      this->traversal_observer().OnNewVertexVisited(
   83|  2.17k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  2.17k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   108k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 60.1k, False: 48.6k]
  ------------------
   88|       |      // Currently processed corner.
   89|  60.1k|      corner_id = corner_traversal_stack_.back();
   90|  60.1k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  60.1k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 60.1k]
  |  Branch (92:47): [True: 599, False: 59.5k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    599|        corner_traversal_stack_.pop_back();
   95|    599|        continue;
   96|    599|      }
   97|  1.93M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.93M, Folded]
  ------------------
   98|  1.93M|        this->MarkFaceVisited(face_id);
   99|  1.93M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.93M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.93M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.93M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.93M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 956k, False: 981k]
  ------------------
  105|   956k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   956k|          this->MarkVertexVisited(vert_id);
  107|   956k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   956k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 933k, False: 22.7k]
  ------------------
  109|   933k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   933k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   933k|            continue;
  112|   933k|          }
  113|   956k|        }
  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|  1.00M|        const CornerIndex right_corner_id =
  118|  1.00M|            this->corner_table()->GetRightCorner(corner_id);
  119|  1.00M|        const CornerIndex left_corner_id =
  120|  1.00M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  1.00M|        const FaceIndex right_face_id(
  122|  1.00M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 17.1k, False: 987k]
  ------------------
  123|  1.00M|                 ? kInvalidFaceIndex
  124|  1.00M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  1.00M|        const FaceIndex left_face_id(
  126|  1.00M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 53.3k, False: 951k]
  ------------------
  127|  1.00M|                 ? kInvalidFaceIndex
  128|  1.00M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  1.00M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 950k, False: 54.1k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   950k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 53.8k, False: 896k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  53.8k|            corner_traversal_stack_.pop_back();
  134|  53.8k|            break;  // Break from the while (true) loop.
  135|   896k|          } else {
  136|       |            // Go to the left face.
  137|   896k|            corner_id = left_corner_id;
  138|   896k|            face_id = left_face_id;
  139|   896k|          }
  140|   950k|        } else {
  141|       |          // Right face was not visited.
  142|  54.1k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 48.4k, False: 5.71k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  48.4k|            corner_id = right_corner_id;
  145|  48.4k|            face_id = right_face_id;
  146|  48.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|  5.71k|            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.71k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  5.71k|            break;
  159|  5.71k|          }
  160|  54.1k|        }
  161|  1.00M|      }
  162|  59.5k|    }
  163|  48.6k|    return true;
  164|  48.6k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.18k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  2.44k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.26k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  3.66M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  3.66M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 954k, False: 2.70M]
  ------------------
   61|   954k|      return true;  // Already traversed.
   62|   954k|    }
   63|       |
   64|  2.70M|    corner_traversal_stack_.clear();
   65|  2.70M|    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|  2.70M|    const VertexIndex next_vert =
   69|  2.70M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  2.70M|    const VertexIndex prev_vert =
   71|  2.70M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  2.70M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2.70M]
  |  Branch (72:45): [True: 0, False: 2.70M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  2.70M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 2.70M, False: 1.66k]
  ------------------
   76|  2.70M|      this->MarkVertexVisited(next_vert);
   77|  2.70M|      this->traversal_observer().OnNewVertexVisited(
   78|  2.70M|          next_vert, this->corner_table()->Next(corner_id));
   79|  2.70M|    }
   80|  2.70M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 2.69M, False: 13.0k]
  ------------------
   81|  2.69M|      this->MarkVertexVisited(prev_vert);
   82|  2.69M|      this->traversal_observer().OnNewVertexVisited(
   83|  2.69M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  2.69M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  5.47M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 2.76M, False: 2.70M]
  ------------------
   88|       |      // Currently processed corner.
   89|  2.76M|      corner_id = corner_traversal_stack_.back();
   90|  2.76M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  2.76M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 2.76M]
  |  Branch (92:47): [True: 4.45k, False: 2.75M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  4.45k|        corner_traversal_stack_.pop_back();
   95|  4.45k|        continue;
   96|  4.45k|      }
   97|  3.66M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 3.66M, Folded]
  ------------------
   98|  3.66M|        this->MarkFaceVisited(face_id);
   99|  3.66M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  3.66M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  3.66M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 3.66M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  3.66M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 3.18M, False: 471k]
  ------------------
  105|  3.18M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  3.18M|          this->MarkVertexVisited(vert_id);
  107|  3.18M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  3.18M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 447k, False: 2.74M]
  ------------------
  109|   447k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   447k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   447k|            continue;
  112|   447k|          }
  113|  3.18M|        }
  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|  3.21M|        const CornerIndex right_corner_id =
  118|  3.21M|            this->corner_table()->GetRightCorner(corner_id);
  119|  3.21M|        const CornerIndex left_corner_id =
  120|  3.21M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  3.21M|        const FaceIndex right_face_id(
  122|  3.21M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 2.72M, False: 492k]
  ------------------
  123|  3.21M|                 ? kInvalidFaceIndex
  124|  3.21M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  3.21M|        const FaceIndex left_face_id(
  126|  3.21M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 2.72M, False: 486k]
  ------------------
  127|  3.21M|                 ? kInvalidFaceIndex
  128|  3.21M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  3.21M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 3.15M, False: 54.4k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  3.15M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 2.73M, False: 428k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  2.73M|            corner_traversal_stack_.pop_back();
  134|  2.73M|            break;  // Break from the while (true) loop.
  135|  2.73M|          } else {
  136|       |            // Go to the left face.
  137|   428k|            corner_id = left_corner_id;
  138|   428k|            face_id = left_face_id;
  139|   428k|          }
  140|  3.15M|        } else {
  141|       |          // Right face was not visited.
  142|  54.4k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 25.9k, False: 28.5k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  25.9k|            corner_id = right_corner_id;
  145|  25.9k|            face_id = right_face_id;
  146|  28.5k|          } 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|  28.5k|            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|  28.5k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  28.5k|            break;
  159|  28.5k|          }
  160|  54.4k|        }
  161|  3.21M|      }
  162|  2.75M|    }
  163|  2.70M|    return true;
  164|  2.70M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.26k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  2.60k|  DepthFirstTraverser() {}

_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   58|    249|  void OnTraversalStart() {
   59|    249|    prediction_degree_.resize(this->corner_table()->num_vertices(), 0);
   60|    249|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  1.71M|  bool TraverseFromCorner(CornerIndex corner_id) {
   66|  1.71M|    if (prediction_degree_.size() == 0) {
  ------------------
  |  Branch (66:9): [True: 0, False: 1.71M]
  ------------------
   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|  1.71M|    traversal_stacks_[0].push_back(corner_id);
   74|  1.71M|    best_priority_ = 0;
   75|       |    // For the first face, check the remaining corners as they may not be
   76|       |    // processed yet.
   77|  1.71M|    const VertexIndex next_vert =
   78|  1.71M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   79|  1.71M|    const VertexIndex prev_vert =
   80|  1.71M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   81|  1.71M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (81:9): [True: 44.1k, False: 1.66M]
  ------------------
   82|  44.1k|      this->MarkVertexVisited(next_vert);
   83|  44.1k|      this->traversal_observer().OnNewVertexVisited(
   84|  44.1k|          next_vert, this->corner_table()->Next(corner_id));
   85|  44.1k|    }
   86|  1.71M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (86:9): [True: 12.8k, False: 1.70M]
  ------------------
   87|  12.8k|      this->MarkVertexVisited(prev_vert);
   88|  12.8k|      this->traversal_observer().OnNewVertexVisited(
   89|  12.8k|          prev_vert, this->corner_table()->Previous(corner_id));
   90|  12.8k|    }
   91|  1.71M|    const VertexIndex tip_vertex = this->corner_table()->Vertex(corner_id);
   92|  1.71M|    if (!this->IsVertexVisited(tip_vertex)) {
  ------------------
  |  Branch (92:9): [True: 12.6k, False: 1.70M]
  ------------------
   93|  12.6k|      this->MarkVertexVisited(tip_vertex);
   94|  12.6k|      this->traversal_observer().OnNewVertexVisited(tip_vertex, corner_id);
   95|  12.6k|    }
   96|       |    // Start the actual traversal.
   97|  5.10M|    while ((corner_id = PopNextCornerToTraverse()) != kInvalidCornerIndex) {
  ------------------
  |  Branch (97:12): [True: 3.39M, False: 1.71M]
  ------------------
   98|  3.39M|      FaceIndex face_id(corner_id.value() / 3);
   99|       |      // Make sure the face hasn't been visited yet.
  100|  3.39M|      if (this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (100:11): [True: 2.49M, False: 897k]
  ------------------
  101|       |        // This face has been already traversed.
  102|  2.49M|        continue;
  103|  2.49M|      }
  104|       |
  105|  1.71M|      while (true) {
  ------------------
  |  Branch (105:14): [True: 1.71M, Folded]
  ------------------
  106|  1.71M|        face_id = FaceIndex(corner_id.value() / 3);
  107|  1.71M|        this->MarkFaceVisited(face_id);
  108|  1.71M|        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|  1.71M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  113|  1.71M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (113:13): [True: 842k, False: 871k]
  ------------------
  114|   842k|          this->MarkVertexVisited(vert_id);
  115|   842k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  116|   842k|        }
  117|       |
  118|       |        // Check whether we can traverse to the right and left neighboring
  119|       |        // faces.
  120|  1.71M|        const CornerIndex right_corner_id =
  121|  1.71M|            this->corner_table()->GetRightCorner(corner_id);
  122|  1.71M|        const CornerIndex left_corner_id =
  123|  1.71M|            this->corner_table()->GetLeftCorner(corner_id);
  124|  1.71M|        const FaceIndex right_face_id(
  125|  1.71M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (125:14): [True: 17.2k, False: 1.69M]
  ------------------
  126|  1.71M|                 ? kInvalidFaceIndex
  127|  1.71M|                 : FaceIndex(right_corner_id.value() / 3)));
  128|  1.71M|        const FaceIndex left_face_id(
  129|  1.71M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (129:14): [True: 49.5k, False: 1.66M]
  ------------------
  130|  1.71M|                 ? kInvalidFaceIndex
  131|  1.71M|                 : FaceIndex(left_corner_id.value() / 3)));
  132|  1.71M|        const bool is_right_face_visited = this->IsFaceVisited(right_face_id);
  133|  1.71M|        const bool is_left_face_visited = this->IsFaceVisited(left_face_id);
  134|       |
  135|  1.71M|        if (!is_left_face_visited) {
  ------------------
  |  Branch (135:13): [True: 1.23M, False: 480k]
  ------------------
  136|       |          // We can go to the left face.
  137|  1.23M|          const int priority = ComputePriority(left_corner_id);
  138|  1.23M|          if (is_right_face_visited && priority <= best_priority_) {
  ------------------
  |  Branch (138:15): [True: 402k, False: 830k]
  |  Branch (138:40): [True: 372k, False: 30.3k]
  ------------------
  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|   372k|            corner_id = left_corner_id;
  144|   372k|            continue;
  145|   860k|          } else {
  146|   860k|            AddCornerToTraversalStack(left_corner_id, priority);
  147|   860k|          }
  148|  1.23M|        }
  149|  1.34M|        if (!is_right_face_visited) {
  ------------------
  |  Branch (149:13): [True: 1.26M, False: 79.1k]
  ------------------
  150|       |          // Go to the right face.
  151|  1.26M|          const int priority = ComputePriority(right_corner_id);
  152|  1.26M|          if (priority <= best_priority_) {
  ------------------
  |  Branch (152:15): [True: 443k, False: 818k]
  ------------------
  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|   443k|            corner_id = right_corner_id;
  156|   443k|            continue;
  157|   818k|          } else {
  158|   818k|            AddCornerToTraversalStack(right_corner_id, priority);
  159|   818k|          }
  160|  1.26M|        }
  161|       |
  162|       |        // Couldn't proceed directly to the next corner
  163|   897k|        break;
  164|  1.34M|      }
  165|   897k|    }
  166|  1.71M|    return true;
  167|  1.71M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE23PopNextCornerToTraverseEv:
  173|  5.10M|  CornerIndex PopNextCornerToTraverse() {
  174|  10.6M|    for (int i = best_priority_; i < kMaxPriority; ++i) {
  ------------------
  |  Branch (174:34): [True: 8.98M, False: 1.71M]
  ------------------
  175|  8.98M|      if (!traversal_stacks_[i].empty()) {
  ------------------
  |  Branch (175:11): [True: 3.39M, False: 5.58M]
  ------------------
  176|  3.39M|        const CornerIndex ret = traversal_stacks_[i].back();
  177|  3.39M|        traversal_stacks_[i].pop_back();
  178|  3.39M|        best_priority_ = i;
  179|  3.39M|        return ret;
  180|  3.39M|      }
  181|  8.98M|    }
  182|  1.71M|    return kInvalidCornerIndex;
  183|  5.10M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15ComputePriorityENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  194|  2.49M|  inline int ComputePriority(CornerIndex corner_id) {
  195|  2.49M|    const VertexIndex v_tip = this->corner_table()->Vertex(corner_id);
  196|       |    // Priority 0 when traversing to already visited vertices.
  197|  2.49M|    int priority = 0;
  198|  2.49M|    if (!this->IsVertexVisited(v_tip)) {
  ------------------
  |  Branch (198:9): [True: 1.64M, False: 850k]
  ------------------
  199|  1.64M|      const int degree = ++prediction_degree_[v_tip];
  200|       |      // Priority 1 when prediction degree > 1, otherwise 2.
  201|  1.64M|      priority = (degree > 1 ? 1 : 2);
  ------------------
  |  Branch (201:19): [True: 802k, False: 842k]
  ------------------
  202|  1.64M|    }
  203|       |    // Clamp the priority to the maximum number of buckets.
  204|  2.49M|    if (priority >= kMaxPriority) {
  ------------------
  |  Branch (204:9): [True: 0, False: 2.49M]
  ------------------
  205|      0|      priority = kMaxPriority - 1;
  206|      0|    }
  207|  2.49M|    return priority;
  208|  2.49M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE25AddCornerToTraversalStackENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEi:
  185|  1.67M|  inline void AddCornerToTraversalStack(CornerIndex ci, int priority) {
  186|  1.67M|    traversal_stacks_[priority].push_back(ci);
  187|       |    // Make sure that the best available priority is up to date.
  188|  1.67M|    if (priority < best_priority_) {
  ------------------
  |  Branch (188:9): [True: 431k, False: 1.24M]
  ------------------
  189|   431k|      best_priority_ = priority;
  190|   431k|    }
  191|  1.67M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   63|    249|  void OnTraversalEnd() {}
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   55|    512|  MaxPredictionDegreeTraverser() {}

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    256|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  2.16k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  2.16k|    const auto* corner_table = traverser_.corner_table();
   50|  2.16k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  2.16k|    const size_t num_faces = mesh_->num_faces();
   52|  2.16k|    const size_t num_points = mesh_->num_points();
   53|  3.50M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 3.50M, False: 2.16k]
  ------------------
   54|  3.50M|      const auto& face = mesh_->face(f);
   55|  14.0M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 10.5M, False: 3.50M]
  ------------------
   56|  10.5M|        const PointIndex point_id = face[p];
   57|  10.5M|        const VertexIndex vert_id =
   58|  10.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  10.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 10.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  10.5M|        const AttributeValueIndex att_entry_id(
   63|  10.5M|            encoding_data_
   64|  10.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  10.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 10.5M]
  |  Branch (65:13): [True: 0, False: 10.5M]
  |  Branch (65:39): [True: 0, False: 10.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  10.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  10.5M|      }
   71|  3.50M|    }
   72|  2.16k|    return true;
   73|  2.16k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    249|  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|    249|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    249|    traverser_.OnTraversalStart();
   82|    249|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 249]
  ------------------
   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|    249|    } else {
   89|    249|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  1.71M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 1.71M, False: 249]
  ------------------
   91|  1.71M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 1.71M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  1.71M|      }
   95|    249|    }
   96|    249|    traverser_.OnTraversalEnd();
   97|    249|    return true;
   98|    249|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.71M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  1.71M|    return traverser_.TraverseFromCorner(corner_id);
  103|  1.71M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    256|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.22k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  4.61k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  4.61k|    const auto* corner_table = traverser_.corner_table();
   50|  4.61k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  4.61k|    const size_t num_faces = mesh_->num_faces();
   52|  4.61k|    const size_t num_points = mesh_->num_points();
   53|  3.85M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 3.84M, False: 4.61k]
  ------------------
   54|  3.84M|      const auto& face = mesh_->face(f);
   55|  15.3M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 11.5M, False: 3.84M]
  ------------------
   56|  11.5M|        const PointIndex point_id = face[p];
   57|  11.5M|        const VertexIndex vert_id =
   58|  11.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  11.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 11.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  11.5M|        const AttributeValueIndex att_entry_id(
   63|  11.5M|            encoding_data_
   64|  11.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  11.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 11.5M]
  |  Branch (65:13): [True: 0, False: 11.5M]
  |  Branch (65:39): [True: 0, False: 11.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  11.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  11.5M|      }
   71|  3.84M|    }
   72|  4.61k|    return true;
   73|  4.61k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.18k|  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.18k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.18k|    traverser_.OnTraversalStart();
   82|  1.18k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.18k]
  ------------------
   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.18k|    } else {
   89|  1.18k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  1.93M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 1.93M, False: 1.18k]
  ------------------
   91|  1.93M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 1.93M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  1.93M|      }
   95|  1.18k|    }
   96|  1.18k|    traverser_.OnTraversalEnd();
   97|  1.18k|    return true;
   98|  1.18k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.93M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  1.93M|    return traverser_.TraverseFromCorner(corner_id);
  103|  1.93M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.22k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.30k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  6.77k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  6.77k|    const auto* corner_table = traverser_.corner_table();
   50|  6.77k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  6.77k|    const size_t num_faces = mesh_->num_faces();
   52|  6.77k|    const size_t num_points = mesh_->num_points();
   53|  7.17M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 7.17M, False: 6.77k]
  ------------------
   54|  7.17M|      const auto& face = mesh_->face(f);
   55|  28.6M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 21.5M, False: 7.17M]
  ------------------
   56|  21.5M|        const PointIndex point_id = face[p];
   57|  21.5M|        const VertexIndex vert_id =
   58|  21.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  21.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 21.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  21.5M|        const AttributeValueIndex att_entry_id(
   63|  21.5M|            encoding_data_
   64|  21.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  21.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 21.5M]
  |  Branch (65:13): [True: 1, False: 21.5M]
  |  Branch (65:39): [True: 1, False: 21.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      1|          return false;
   68|      1|        }
   69|  21.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  21.5M|      }
   71|  7.17M|    }
   72|  6.77k|    return true;
   73|  6.77k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_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|  3.66M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 3.66M, False: 1.26k]
  ------------------
   91|  3.66M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 3.66M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  3.66M|      }
   95|  1.26k|    }
   96|  1.26k|    traverser_.OnTraversalEnd();
   97|  1.26k|    return true;
   98|  1.26k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  3.66M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  3.66M|    return traverser_.TraverseFromCorner(corner_id);
  103|  3.66M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.30k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  2.60k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  22.3M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  11.3M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  11.3M|    return is_vertex_visited_[vert_id.value()];
   65|  11.3M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  1.91M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  1.91M|    is_vertex_visited_[vert_id.value()] = true;
   68|  1.91M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  5.57M|  inline TraversalObserverT& traversal_observer() {
   75|  5.57M|    return traversal_observer_;
   76|  5.57M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  8.88M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  8.88M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 137k, False: 8.75M]
  ------------------
   47|   137k|      return true;  // Invalid faces are always considered as visited.
   48|   137k|    }
   49|  8.75M|    return is_face_visited_[face_id.value()];
   50|  8.88M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  3.65M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  3.65M|    is_face_visited_[face_id.value()] = true;
   62|  3.65M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  2.95k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  2.95k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.47k|                    TraversalObserver traversal_observer) {
   37|  1.47k|    corner_table_ = corner_table;
   38|  1.47k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.47k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.47k|    traversal_observer_ = traversal_observer;
   41|  1.47k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.93M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.93M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.93M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.93M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.93M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  29.9M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  3.66M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  3.66M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 3.66M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  3.66M|    return is_face_visited_[corner_id.value() / 3];
   58|  3.66M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  9.07M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  9.07M|    return is_vertex_visited_[vert_id.value()];
   65|  9.07M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  8.58M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  8.58M|    is_vertex_visited_[vert_id.value()] = true;
   68|  8.58M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  12.2M|  inline TraversalObserverT& traversal_observer() {
   75|  12.2M|    return traversal_observer_;
   76|  12.2M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  9.19M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  9.19M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 5.44M, False: 3.74M]
  ------------------
   47|  5.44M|      return true;  // Invalid faces are always considered as visited.
   48|  5.44M|    }
   49|  3.74M|    return is_face_visited_[face_id.value()];
   50|  9.19M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  3.66M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  3.66M|    is_face_visited_[face_id.value()] = true;
   62|  3.66M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  2.60k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.30k|                    TraversalObserver traversal_observer) {
   37|  1.30k|    corner_table_ = corner_table;
   38|  1.30k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.30k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.30k|    traversal_observer_ = traversal_observer;
   41|  1.30k|  }

_ZN5draco17PointCloudDecoderC2Ev:
   22|  5.71k|    : point_cloud_(nullptr),
   23|  5.71k|      buffer_(nullptr),
   24|  5.71k|      version_major_(0),
   25|  5.71k|      version_minor_(0),
   26|  5.71k|      options_(nullptr) {}
_ZN5draco17PointCloudDecoder12DecodeHeaderEPNS_13DecoderBufferEPNS_11DracoHeaderE:
   29|  11.4k|                                       DracoHeader* out_header) {
   30|  11.4k|  constexpr char kIoErrorMsg[] = "Failed to parse Draco header.";
   31|  11.4k|  if (!buffer->Decode(out_header->draco_string, 5)) {
  ------------------
  |  Branch (31:7): [True: 0, False: 11.4k]
  ------------------
   32|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   33|      0|  }
   34|  11.4k|  if (memcmp(out_header->draco_string, "DRACO", 5) != 0) {
  ------------------
  |  Branch (34:7): [True: 6, False: 11.4k]
  ------------------
   35|      6|    return Status(Status::DRACO_ERROR, "Not a Draco file.");
   36|      6|  }
   37|  11.4k|  if (!buffer->Decode(&(out_header->version_major))) {
  ------------------
  |  Branch (37:7): [True: 0, False: 11.4k]
  ------------------
   38|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   39|      0|  }
   40|  11.4k|  if (!buffer->Decode(&(out_header->version_minor))) {
  ------------------
  |  Branch (40:7): [True: 0, False: 11.4k]
  ------------------
   41|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   42|      0|  }
   43|  11.4k|  if (!buffer->Decode(&(out_header->encoder_type))) {
  ------------------
  |  Branch (43:7): [True: 0, False: 11.4k]
  ------------------
   44|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   45|      0|  }
   46|  11.4k|  if (!buffer->Decode(&(out_header->encoder_method))) {
  ------------------
  |  Branch (46:7): [True: 0, False: 11.4k]
  ------------------
   47|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   48|      0|  }
   49|  11.4k|  if (!buffer->Decode(&(out_header->flags))) {
  ------------------
  |  Branch (49:7): [True: 0, False: 11.4k]
  ------------------
   50|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   51|      0|  }
   52|  11.4k|  return OkStatus();
   53|  11.4k|}
_ZN5draco17PointCloudDecoder14DecodeMetadataEv:
   55|    593|Status PointCloudDecoder::DecodeMetadata() {
   56|    593|  std::unique_ptr<GeometryMetadata> metadata =
   57|    593|      std::unique_ptr<GeometryMetadata>(new GeometryMetadata());
   58|    593|  MetadataDecoder metadata_decoder;
   59|    593|  if (!metadata_decoder.DecodeGeometryMetadata(buffer_, metadata.get())) {
  ------------------
  |  Branch (59:7): [True: 479, False: 114]
  ------------------
   60|    479|    return Status(Status::DRACO_ERROR, "Failed to decode metadata.");
   61|    479|  }
   62|    114|  point_cloud_->AddMetadata(std::move(metadata));
   63|    114|  return OkStatus();
   64|    593|}
_ZN5draco17PointCloudDecoder6DecodeERKNS_12DracoOptionsINS_17GeometryAttribute4TypeEEEPNS_13DecoderBufferEPNS_10PointCloudE:
   68|  5.71k|                                 PointCloud* out_point_cloud) {
   69|  5.71k|  options_ = &options;
   70|  5.71k|  buffer_ = in_buffer;
   71|  5.71k|  point_cloud_ = out_point_cloud;
   72|  5.71k|  DracoHeader header;
   73|  5.71k|  DRACO_RETURN_IF_ERROR(DecodeHeader(buffer_, &header))
  ------------------
  |  |   74|  5.71k|  {                                                   \
  |  |   75|  5.71k|    const draco::Status _local_status = (expression); \
  |  |   76|  5.71k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 0, False: 5.71k]
  |  |  ------------------
  |  |   77|      0|      return _local_status;                           \
  |  |   78|      0|    }                                                 \
  |  |   79|  5.71k|  }
  ------------------
   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|  5.71k|  if (header.encoder_type != GetGeometryType()) {
  ------------------
  |  Branch (76:7): [True: 0, False: 5.71k]
  ------------------
   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|  5.71k|  version_major_ = header.version_major;
   83|  5.71k|  version_minor_ = header.version_minor;
   84|       |
   85|  5.71k|  const uint8_t max_supported_major_version =
   86|  5.71k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMajor
  ------------------
  |  Branch (86:7): [True: 0, False: 5.71k]
  ------------------
   87|  5.71k|                                         : kDracoMeshBitstreamVersionMajor;
   88|  5.71k|  const uint8_t max_supported_minor_version =
   89|  5.71k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMinor
  ------------------
  |  Branch (89:7): [True: 0, False: 5.71k]
  ------------------
   90|  5.71k|                                         : kDracoMeshBitstreamVersionMinor;
   91|       |
   92|       |  // Check for version compatibility.
   93|  5.71k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   94|  5.71k|  if (version_major_ < 1 || version_major_ > max_supported_major_version) {
  ------------------
  |  Branch (94:7): [True: 0, False: 5.71k]
  |  Branch (94:29): [True: 0, False: 5.71k]
  ------------------
   95|      0|    return Status(Status::UNKNOWN_VERSION, "Unknown major version.");
   96|      0|  }
   97|  5.71k|  if (version_major_ == max_supported_major_version &&
  ------------------
  |  Branch (97:7): [True: 5.07k, False: 639]
  ------------------
   98|  5.07k|      version_minor_ > max_supported_minor_version) {
  ------------------
  |  Branch (98:7): [True: 0, False: 5.07k]
  ------------------
   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|  5.71k|  buffer_->set_bitstream_version(
  110|  5.71k|      DRACO_BITSTREAM_VERSION(version_major_, version_minor_));
  ------------------
  |  |  115|  5.71k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  111|       |
  112|  5.71k|  if (bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 3) &&
  ------------------
  |  |  115|  11.4k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (112:7): [True: 5.39k, False: 323]
  ------------------
  113|  5.39k|      (header.flags & METADATA_FLAG_MASK)) {
  ------------------
  |  |  151|  5.39k|#define METADATA_FLAG_MASK 0x8000
  ------------------
  |  Branch (113:7): [True: 593, False: 4.79k]
  ------------------
  114|    593|    DRACO_RETURN_IF_ERROR(DecodeMetadata())
  ------------------
  |  |   74|    593|  {                                                   \
  |  |   75|    593|    const draco::Status _local_status = (expression); \
  |  |   76|    593|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 479, False: 114]
  |  |  ------------------
  |  |   77|    479|      return _local_status;                           \
  |  |   78|    479|    }                                                 \
  |  |   79|    593|  }
  ------------------
  115|    593|  }
  116|  5.23k|  if (!InitializeDecoder()) {
  ------------------
  |  Branch (116:7): [True: 0, False: 5.23k]
  ------------------
  117|      0|    return Status(Status::DRACO_ERROR, "Failed to initialize the decoder.");
  118|      0|  }
  119|  5.23k|  if (!DecodeGeometryData()) {
  ------------------
  |  Branch (119:7): [True: 2.08k, False: 3.14k]
  ------------------
  120|  2.08k|    return Status(Status::DRACO_ERROR, "Failed to decode geometry data.");
  121|  2.08k|  }
  122|  3.14k|  if (!DecodePointAttributes()) {
  ------------------
  |  Branch (122:7): [True: 2.63k, False: 508]
  ------------------
  123|  2.63k|    return Status(Status::DRACO_ERROR, "Failed to decode point attributes.");
  124|  2.63k|  }
  125|    508|  return OkStatus();
  126|  3.14k|}
_ZN5draco17PointCloudDecoder21DecodePointAttributesEv:
  128|  3.14k|bool PointCloudDecoder::DecodePointAttributes() {
  129|  3.14k|  uint8_t num_attributes_decoders;
  130|  3.14k|  if (!buffer_->Decode(&num_attributes_decoders)) {
  ------------------
  |  Branch (130:7): [True: 22, False: 3.12k]
  ------------------
  131|     22|    return false;
  132|     22|  }
  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|  20.1k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (136:19): [True: 17.1k, False: 2.98k]
  ------------------
  137|  17.1k|    if (!CreateAttributesDecoder(i)) {
  ------------------
  |  Branch (137:9): [True: 140, False: 17.0k]
  ------------------
  138|    140|      return false;
  139|    140|    }
  140|  17.1k|  }
  141|       |
  142|       |  // Initialize all attributes decoders. No data is decoded here.
  143|  17.0k|  for (auto& att_dec : attributes_decoders_) {
  ------------------
  |  Branch (143:22): [True: 17.0k, False: 2.98k]
  ------------------
  144|  17.0k|    if (!att_dec->Init(this, point_cloud_)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 17.0k]
  ------------------
  145|      0|      return false;
  146|      0|    }
  147|  17.0k|  }
  148|       |
  149|       |  // Decode any data needed by the attribute decoders.
  150|  8.63k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (150:19): [True: 5.77k, False: 2.85k]
  ------------------
  151|  5.77k|    if (!attributes_decoders_[i]->DecodeAttributesDecoderData(buffer_)) {
  ------------------
  |  Branch (151:9): [True: 128, False: 5.65k]
  ------------------
  152|    128|      return false;
  153|    128|    }
  154|  5.77k|  }
  155|       |
  156|       |  // Create map between attribute and decoder ids.
  157|  6.54k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (157:19): [True: 3.68k, False: 2.85k]
  ------------------
  158|  3.68k|    const int32_t num_attributes = attributes_decoders_[i]->GetNumAttributes();
  159|  34.9k|    for (int j = 0; j < num_attributes; ++j) {
  ------------------
  |  Branch (159:21): [True: 31.3k, False: 3.68k]
  ------------------
  160|  31.3k|      int att_id = attributes_decoders_[i]->GetAttributeId(j);
  161|  31.3k|      if (att_id >= attribute_to_decoder_map_.size()) {
  ------------------
  |  Branch (161:11): [True: 31.3k, False: 0]
  ------------------
  162|  31.3k|        attribute_to_decoder_map_.resize(att_id + 1);
  163|  31.3k|      }
  164|  31.3k|      attribute_to_decoder_map_[att_id] = i;
  165|  31.3k|    }
  166|  3.68k|  }
  167|       |
  168|       |  // Decode the actual attributes using the created attribute decoders.
  169|  2.85k|  if (!DecodeAllAttributes()) {
  ------------------
  |  Branch (169:7): [True: 2.34k, False: 508]
  ------------------
  170|  2.34k|    return false;
  171|  2.34k|  }
  172|       |
  173|    508|  if (!OnAttributesDecoded()) {
  ------------------
  |  Branch (173:7): [True: 0, False: 508]
  ------------------
  174|      0|    return false;
  175|      0|  }
  176|    508|  return true;
  177|    508|}
_ZN5draco17PointCloudDecoder19DecodeAllAttributesEv:
  179|  2.85k|bool PointCloudDecoder::DecodeAllAttributes() {
  180|  2.91k|  for (auto& att_dec : attributes_decoders_) {
  ------------------
  |  Branch (180:22): [True: 2.91k, False: 508]
  ------------------
  181|  2.91k|    if (!att_dec->DecodeAttributes(buffer_)) {
  ------------------
  |  Branch (181:9): [True: 2.34k, False: 565]
  ------------------
  182|  2.34k|      return false;
  183|  2.34k|    }
  184|  2.91k|  }
  185|    508|  return true;
  186|  2.85k|}
_ZN5draco17PointCloudDecoder20GetPortableAttributeEi:
  189|  2.30k|    int32_t parent_att_id) {
  190|  2.30k|  if (parent_att_id < 0 || parent_att_id >= point_cloud_->num_attributes()) {
  ------------------
  |  Branch (190:7): [True: 0, False: 2.30k]
  |  Branch (190:28): [True: 0, False: 2.30k]
  ------------------
  191|      0|    return nullptr;
  192|      0|  }
  193|  2.30k|  const int32_t parent_att_decoder_id =
  194|  2.30k|      attribute_to_decoder_map_[parent_att_id];
  195|  2.30k|  return attributes_decoders_[parent_att_decoder_id]->GetPortableAttribute(
  196|  2.30k|      parent_att_id);
  197|  2.30k|}

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

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

_ZN5draco18MostSignificantBitEj:
   58|    605|inline int MostSignificantBit(uint32_t n) {
   59|    605|#if defined(__GNUC__)
   60|    605|  return 31 ^ __builtin_clz(n);
   61|       |#elif defined(_MSC_VER)
   62|       |
   63|       |  unsigned long where;
   64|       |  _BitScanReverse(&where, n);
   65|       |  return (int)where;
   66|       |#else
   67|       |  uint32_t msb = 0;
   68|       |  if (n) {
   69|       |    if (0xFFFF0000 & n) {
   70|       |      n >>= (1 << 4);
   71|       |      msb |= (1 << 4);
   72|       |    }
   73|       |    if (0x0000FF00 & n) {
   74|       |      n >>= (1 << 3);
   75|       |      msb |= (1 << 3);
   76|       |    }
   77|       |    if (0x000000F0 & n) {
   78|       |      n >>= (1 << 2);
   79|       |      msb |= (1 << 2);
   80|       |    }
   81|       |    if (0x0000000C & n) {
   82|       |      n >>= (1 << 1);
   83|       |      msb |= (1 << 1);
   84|       |    }
   85|       |    if (0x00000002 & n) {
   86|       |      msb |= (1 << 0);
   87|       |    }
   88|       |  } else {
   89|       |    msb = -1;
   90|       |  }
   91|       |  return msb;
   92|       |#endif
   93|    605|}
_ZN5draco24ConvertSymbolToSignedIntIjEENSt3__111make_signedIT_E4typeES3_:
  127|   281M|    IntTypeT val) {
  128|   281M|  static_assert(std::is_integral<IntTypeT>::value, "IntTypeT is not integral.");
  129|   281M|  typedef typename std::make_signed<IntTypeT>::type SignedType;
  130|   281M|  const bool is_positive = !static_cast<bool>(val & 1);
  131|   281M|  val >>= 1;
  132|   281M|  if (is_positive) {
  ------------------
  |  Branch (132:7): [True: 267M, False: 14.3M]
  ------------------
  133|   267M|    return static_cast<SignedType>(val);
  134|   267M|  }
  135|  14.3M|  SignedType ret = static_cast<SignedType>(val);
  136|  14.3M|  ret = -ret - 1;
  137|  14.3M|  return ret;
  138|   281M|}

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  51.1M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t* out_value) {
   58|  51.1M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 51.1M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  51.1M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  51.1M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|   253M|  bool Decode(void* out_data, size_t size_to_decode) {
   77|   253M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 252, False: 253M]
  ------------------
   78|    252|      return false;  // Buffer overflow.
   79|    252|    }
   80|   253M|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|   253M|    pos_ += size_to_decode;
   82|   253M|    return true;
   83|   253M|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  20.1k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  5.71k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  29.6k|  const char* data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   274k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  3.91k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  51.1M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  10.5M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  6.02k|    void reset(const void* b, size_t s) {
  131|  6.02k|      bit_offset_ = 0;
  132|  6.02k|      bit_buffer_ = static_cast<const uint8_t*>(b);
  133|  6.02k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  6.02k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  5.23k|    uint64_t BitsDecoded() const { return static_cast<uint64_t>(bit_offset_); }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  158|  51.1M|    bool GetBits(uint32_t nbits, uint32_t* x) {
  159|  51.1M|      if (nbits > 32) {
  ------------------
  |  Branch (159:11): [True: 9, False: 51.1M]
  ------------------
  160|      9|        return false;
  161|      9|      }
  162|  51.1M|      uint32_t value = 0;
  163|   115M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (163:30): [True: 64.4M, False: 51.1M]
  ------------------
  164|  64.4M|        value |= GetBit() << bit;
  165|  64.4M|      }
  166|  51.1M|      *x = value;
  167|  51.1M|      return true;
  168|  51.1M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  173|  64.4M|    int GetBit() {
  174|  64.4M|      const size_t off = bit_offset_;
  175|  64.4M|      const size_t byte_offset = off >> 3;
  176|  64.4M|      const int bit_shift = static_cast<int>(off & 0x7);
  177|  64.4M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (177:11): [True: 59.2M, False: 5.26M]
  ------------------
  178|  59.2M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  179|  59.2M|        bit_offset_ = off + 1;
  180|  59.2M|        return bit;
  181|  59.2M|      }
  182|  5.26M|      return 0;
  183|  64.4M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  13.7M|  bool Decode(T* out_val) {
   69|  13.7M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 1.23k, False: 13.7M]
  ------------------
   70|  1.23k|      return false;
   71|  1.23k|    }
   72|  13.7M|    pos_ += sizeof(T);
   73|  13.7M|    return true;
   74|  13.7M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  13.7M|  bool Peek(T* out_val) {
   88|  13.7M|    const size_t size_to_decode = sizeof(T);
   89|  13.7M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 1.23k, False: 13.7M]
  ------------------
   90|  1.23k|      return false;  // Buffer overflow.
   91|  1.23k|    }
   92|  13.7M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  13.7M|    return true;
   94|  13.7M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  10.6k|  bool Decode(T* out_val) {
   69|  10.6k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 37, False: 10.6k]
  ------------------
   70|     37|      return false;
   71|     37|    }
   72|  10.6k|    pos_ += sizeof(T);
   73|  10.6k|    return true;
   74|  10.6k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  10.6k|  bool Peek(T* out_val) {
   88|  10.6k|    const size_t size_to_decode = sizeof(T);
   89|  10.6k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 37, False: 10.6k]
  ------------------
   90|     37|      return false;  // Buffer overflow.
   91|     37|    }
   92|  10.6k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  10.6k|    return true;
   94|  10.6k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   581k|  bool Decode(T* out_val) {
   69|   581k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 90, False: 581k]
  ------------------
   70|     90|      return false;
   71|     90|    }
   72|   581k|    pos_ += sizeof(T);
   73|   581k|    return true;
   74|   581k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   581k|  bool Peek(T* out_val) {
   88|   581k|    const size_t size_to_decode = sizeof(T);
   89|   581k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 90, False: 581k]
  ------------------
   90|     90|      return false;  // Buffer overflow.
   91|     90|    }
   92|   581k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   581k|    return true;
   94|   581k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  19.0k|  bool Decode(T* out_val) {
   69|  19.0k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 192, False: 18.8k]
  ------------------
   70|    192|      return false;
   71|    192|    }
   72|  18.8k|    pos_ += sizeof(T);
   73|  18.8k|    return true;
   74|  19.0k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  19.0k|  bool Peek(T* out_val) {
   88|  19.0k|    const size_t size_to_decode = sizeof(T);
   89|  19.0k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 192, False: 18.8k]
  ------------------
   90|    192|      return false;  // Buffer overflow.
   91|    192|    }
   92|  18.8k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  18.8k|    return true;
   94|  19.0k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.37M|  bool Decode(T* out_val) {
   69|  1.37M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 85, False: 1.37M]
  ------------------
   70|     85|      return false;
   71|     85|    }
   72|  1.37M|    pos_ += sizeof(T);
   73|  1.37M|    return true;
   74|  1.37M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.37M|  bool Peek(T* out_val) {
   88|  1.37M|    const size_t size_to_decode = sizeof(T);
   89|  1.37M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 85, False: 1.37M]
  ------------------
   90|     85|      return false;  // Buffer overflow.
   91|     85|    }
   92|  1.37M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.37M|    return true;
   94|  1.37M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  12.3k|  bool Decode(T* out_val) {
   69|  12.3k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 6, False: 12.3k]
  ------------------
   70|      6|      return false;
   71|      6|    }
   72|  12.3k|    pos_ += sizeof(T);
   73|  12.3k|    return true;
   74|  12.3k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  12.3k|  bool Peek(T* out_val) {
   88|  12.3k|    const size_t size_to_decode = sizeof(T);
   89|  12.3k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 6, False: 12.3k]
  ------------------
   90|      6|      return false;  // Buffer overflow.
   91|      6|    }
   92|  12.3k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  12.3k|    return true;
   94|  12.3k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  1.84k|  bool Decode(T* out_val) {
   69|  1.84k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 3, False: 1.83k]
  ------------------
   70|      3|      return false;
   71|      3|    }
   72|  1.83k|    pos_ += sizeof(T);
   73|  1.83k|    return true;
   74|  1.84k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  1.84k|  bool Peek(T* out_val) {
   88|  1.84k|    const size_t size_to_decode = sizeof(T);
   89|  1.84k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 3, False: 1.83k]
  ------------------
   90|      3|      return false;  // Buffer overflow.
   91|      3|    }
   92|  1.83k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.83k|    return true;
   94|  1.84k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    162|  bool Decode(T* out_val) {
   69|    162|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 11, False: 151]
  ------------------
   70|     11|      return false;
   71|     11|    }
   72|    151|    pos_ += sizeof(T);
   73|    151|    return true;
   74|    162|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    162|  bool Peek(T* out_val) {
   88|    162|    const size_t size_to_decode = sizeof(T);
   89|    162|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 11, False: 151]
  ------------------
   90|     11|      return false;  // Buffer overflow.
   91|     11|    }
   92|    151|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    151|    return true;
   94|    162|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|  88.5M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   111M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  8.42M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  8.42M|    return value_ >= val;
  100|  8.42M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   263M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  3.19G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  22.9M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|  97.9M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  97.9M|    value_ = i.value_;
  153|  97.9M|    return *this;
  154|  97.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|  60.2M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  60.2M|    value_ = i.value_;
  153|  60.2M|    return *this;
  154|  60.2M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  22.9M|  inline ThisIndexType& operator++() {
  103|  22.9M|    ++value_;
  104|  22.9M|    return *this;
  105|  22.9M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  2.31G|  constexpr bool operator==(const IndexType& i) const {
   76|  2.31G|    return value_ == i.value_;
   77|  2.31G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|   965M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  9.80k|  constexpr bool operator<(const IndexType& i) const {
   88|  9.80k|    return value_ < i.value_;
   89|  9.80k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   143M|  constexpr bool operator==(const IndexType& i) const {
   76|   143M|    return value_ == i.value_;
   77|   143M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   146M|  constexpr ThisIndexType operator-(const ValueTypeT& val) const {
  132|   146M|    return ThisIndexType(value_ - val);
  133|   146M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|   794M|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|   794M|    return ThisIndexType(value_ + val);
  127|   794M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  18.0M|  constexpr bool operator==(const IndexType& i) const {
   76|  18.0M|    return value_ == i.value_;
   77|  18.0M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   274M|  constexpr bool operator!=(const IndexType& i) const {
   82|   274M|    return value_ != i.value_;
   83|   274M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   329M|  constexpr bool operator!=(const IndexType& i) const {
   82|   329M|    return value_ != i.value_;
   83|   329M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   531M|  inline ThisIndexType& operator++() {
  103|   531M|    ++value_;
  104|   531M|    return *this;
  105|   531M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   468M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   468M|    value_ = i.value_;
  153|   468M|    return *this;
  154|   468M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.09G|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  1.09G|    value_ = i.value_;
  153|  1.09G|    return *this;
  154|  1.09G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  43.5M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  43.5M|    return value_ >= val;
  100|  43.5M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  7.68M|  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|  22.0G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   198M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  17.0G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   234M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  34.5M|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  34.5M|    return ThisIndexType(value_ + val);
  127|  34.5M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   194M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  21.7M|  constexpr bool operator<(const IndexType& i) const {
   88|  21.7M|    return value_ < i.value_;
   89|  21.7M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   227M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|  60.2M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  61.2M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  66.7M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   272M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  4.49M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  4.49M|    value_ = i.value_;
  153|  4.49M|    return *this;
  154|  4.49M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  7.68M|  inline ThisIndexType operator+=(const ValueTypeT& val) {
  140|  7.68M|    value_ += val;
  141|  7.68M|    return *this;
  142|  7.68M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  25.2M|  inline ThisIndexType& operator=(const ValueTypeT& val) {
  156|  25.2M|    value_ = val;
  157|  25.2M|    return *this;
  158|  25.2M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|  34.9M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  5.28M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  5.27M|  inline ThisIndexType& operator++() {
  103|  5.27M|    ++value_;
  104|  5.27M|    return *this;
  105|  5.27M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  26.4M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  26.4M|  inline ThisIndexType& operator++() {
  103|  26.4M|    ++value_;
  104|  26.4M|    return *this;
  105|  26.4M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  41.6M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  41.6M|    return vector_[index.value()];
   75|  41.6M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  26.4M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  8.06k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  17.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|  69.9M|  inline reference operator[](const IndexTypeT& index) {
   71|  69.9M|    return vector_[index.value()];
   72|  69.9M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|  8.24k|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  16.8M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  2.87k|  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.42M|  inline reference operator[](const IndexTypeT& index) {
   71|  8.42M|    return vector_[index.value()];
   72|  8.42M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  25.0M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  25.0M|    return vector_[index.value()];
   75|  25.0M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   227M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  11.3M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   301M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   301M|    return vector_[index.value()];
   75|   301M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|   832M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   832M|    return vector_[index.value()];
   75|   832M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   439M|  inline reference operator[](const IndexTypeT& index) {
   71|   439M|    return vector_[index.value()];
   72|   439M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  64.9M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  64.9M|    return vector_[index.value()];
   75|  64.9M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   360M|  inline reference operator[](const IndexTypeT& index) {
   71|   360M|    return vector_[index.value()];
   72|   360M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   126M|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   255M|  inline reference operator[](const IndexTypeT& index) {
   71|   255M|    return vector_[index.value()];
   72|   255M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  1.12k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   178M|  inline reference operator[](const IndexTypeT& index) {
   71|   178M|    return vector_[index.value()];
   72|   178M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  33.2k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  1.71M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  31.7k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  4.17k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  4.17k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  4.17k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  4.17k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  10.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  10.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  10.4k|    vector_.swap(arg.vector_);
   57|  10.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  10.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  10.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  10.4k|    vector_.swap(arg.vector_);
   57|  10.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  4.17k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  4.17k|  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.17k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  5.72k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  47.3k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  71.1k|int32_t DataTypeLength(DataType dt) {
   20|  71.1k|  switch (dt) {
   21|  39.4k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 39.4k, False: 31.7k]
  ------------------
   22|  41.7k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.34k, False: 68.8k]
  ------------------
   23|  41.7k|      return 1;
   24|  1.82k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 1.82k, False: 69.3k]
  ------------------
   25|  1.91k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 93, False: 71.0k]
  ------------------
   26|  1.91k|      return 2;
   27|  22.9k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 22.9k, False: 48.1k]
  ------------------
   28|  23.3k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 392, False: 70.7k]
  ------------------
   29|  23.3k|      return 4;
   30|    426|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 426, False: 70.7k]
  ------------------
   31|    843|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 417, False: 70.7k]
  ------------------
   32|    843|      return 8;
   33|  2.42k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 2.42k, False: 68.7k]
  ------------------
   34|  2.42k|      return 4;
   35|    172|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 172, False: 70.9k]
  ------------------
   36|    172|      return 8;
   37|    668|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 668, False: 70.4k]
  ------------------
   38|    668|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 71.1k]
  ------------------
   40|      0|      return -1;
   41|  71.1k|  }
   42|  71.1k|}

_ZN5draco13AddAsUnsignedIiTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEES3_S3_S3_:
   14|  24.1M|inline DataTypeT AddAsUnsigned(DataTypeT a, DataTypeT b) {
   15|  24.1M|  typedef typename std::make_unsigned<DataTypeT>::type DataTypeUT;
   16|  24.1M|  return static_cast<DataTypeT>(static_cast<DataTypeUT>(a) +
   17|  24.1M|                                static_cast<DataTypeUT>(b));
   18|  24.1M|}

_ZN5draco7IntSqrtEm:
   31|  4.19k|inline uint64_t IntSqrt(uint64_t number) {
   32|  4.19k|  if (number == 0) {
  ------------------
  |  Branch (32:7): [True: 2.86k, False: 1.32k]
  ------------------
   33|  2.86k|    return 0;
   34|  2.86k|  }
   35|       |  // First estimate good initial value of the square root as log2(number).
   36|  1.32k|  uint64_t act_number = number;
   37|  1.32k|  uint64_t square_root = 1;
   38|  14.6k|  while (act_number >= 2) {
  ------------------
  |  Branch (38:10): [True: 13.3k, False: 1.32k]
  ------------------
   39|       |    // Double the square root until |square_root * square_root > number|.
   40|  13.3k|    square_root *= 2;
   41|  13.3k|    act_number /= 4;
   42|  13.3k|  }
   43|       |  // Perform Newton's (or Babylonian) method to find the true floor(sqrt()).
   44|  2.54k|  do {
   45|       |    // New |square_root| estimate is computed as the average between
   46|       |    // |square_root| and |number / square_root|.
   47|  2.54k|    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|  2.54k|  } while (square_root * square_root > number);
  ------------------
  |  Branch (53:12): [True: 1.22k, False: 1.32k]
  ------------------
   54|  1.32k|  return square_root;
   55|  4.19k|}

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   921k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|   921k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 921k, Folded]
  ------------------
   65|   921k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 405, False: 921k]
  ------------------
   66|    405|      return false;
   67|    405|    }
   68|   921k|  } 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|   921k|  return true;
   77|   921k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   471k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   471k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   471k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 88, False: 471k]
  ------------------
   33|     88|    return false;
   34|     88|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   471k|  uint8_t in;
   39|   471k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 209, False: 471k]
  ------------------
   40|    209|    return false;
   41|    209|  }
   42|   471k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 20.6k, False: 450k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  20.6k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 450, False: 20.2k]
  ------------------
   45|    450|      return false;
   46|    450|    }
   47|       |    // Append decoded info from this byte.
   48|  20.2k|    *out_val <<= 7;
   49|  20.2k|    *out_val |= in & ((1 << 7) - 1);
   50|   450k|  } else {
   51|       |    // Last byte reached
   52|   450k|    *out_val = in;
   53|   450k|  }
   54|   471k|  return true;
   55|   471k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.80k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  4.80k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.80k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 4.80k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.80k|  uint8_t in;
   39|  4.80k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 4, False: 4.80k]
  ------------------
   40|      4|    return false;
   41|      4|  }
   42|  4.80k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 579, False: 4.22k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    579|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 8, False: 571]
  ------------------
   45|      8|      return false;
   46|      8|    }
   47|       |    // Append decoded info from this byte.
   48|    571|    *out_val <<= 7;
   49|    571|    *out_val |= in & ((1 << 7) - 1);
   50|  4.22k|  } else {
   51|       |    // Last byte reached
   52|  4.22k|    *out_val = in;
   53|  4.22k|  }
   54|  4.79k|  return true;
   55|  4.80k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  3.84k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|  3.84k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 3.84k, Folded]
  ------------------
   65|  3.84k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 22, False: 3.82k]
  ------------------
   66|     22|      return false;
   67|     22|    }
   68|  3.84k|  } 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|  3.82k|  return true;
   77|  3.84k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  2.43k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  2.43k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  2.43k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 2.43k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.43k|  uint8_t in;
   39|  2.43k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 5, False: 2.43k]
  ------------------
   40|      5|    return false;
   41|      5|  }
   42|  2.43k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 0, False: 2.43k]
  ------------------
   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.43k|  } else {
   51|       |    // Last byte reached
   52|  2.43k|    *out_val = in;
   53|  2.43k|  }
   54|  2.43k|  return true;
   55|  2.43k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   405k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   405k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   405k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 7, False: 405k]
  ------------------
   33|      7|    return false;
   34|      7|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   405k|  uint8_t in;
   39|   405k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 53, False: 404k]
  ------------------
   40|     53|    return false;
   41|     53|  }
   42|   404k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.63k, False: 403k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.63k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 45, False: 1.58k]
  ------------------
   45|     45|      return false;
   46|     45|    }
   47|       |    // Append decoded info from this byte.
   48|  1.58k|    *out_val <<= 7;
   49|  1.58k|    *out_val |= in & ((1 << 7) - 1);
   50|   403k|  } else {
   51|       |    // Last byte reached
   52|   403k|    *out_val = in;
   53|   403k|  }
   54|   404k|  return true;
   55|   404k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  2.52k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  2.52k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  2.52k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 2.52k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.52k|  uint8_t in;
   39|  2.52k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 9, False: 2.51k]
  ------------------
   40|      9|    return false;
   41|      9|  }
   42|  2.51k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 503, False: 2.01k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    503|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 16, False: 487]
  ------------------
   45|     16|      return false;
   46|     16|    }
   47|       |    // Append decoded info from this byte.
   48|    487|    *out_val <<= 7;
   49|    487|    *out_val |= in & ((1 << 7) - 1);
   50|  2.01k|  } else {
   51|       |    // Last byte reached
   52|  2.01k|    *out_val = in;
   53|  2.01k|  }
   54|  2.50k|  return true;
   55|  2.51k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  13.6k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  13.6k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  13.6k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 13.6k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  13.6k|  uint8_t in;
   39|  13.6k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 3, False: 13.6k]
  ------------------
   40|      3|    return false;
   41|      3|  }
   42|  13.6k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 460, False: 13.1k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    460|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 5, False: 455]
  ------------------
   45|      5|      return false;
   46|      5|    }
   47|       |    // Append decoded info from this byte.
   48|    455|    *out_val <<= 7;
   49|    455|    *out_val |= in & ((1 << 7) - 1);
   50|  13.1k|  } else {
   51|       |    // Last byte reached
   52|  13.1k|    *out_val = in;
   53|  13.1k|  }
   54|  13.6k|  return true;
   55|  13.6k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  3.36k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  3.36k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.36k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 9, False: 3.35k]
  ------------------
   33|      9|    return false;
   34|      9|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  3.35k|  uint8_t in;
   39|  3.35k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 7, False: 3.34k]
  ------------------
   40|      7|    return false;
   41|      7|  }
   42|  3.34k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 795, False: 2.55k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    795|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 47, False: 748]
  ------------------
   45|     47|      return false;
   46|     47|    }
   47|       |    // Append decoded info from this byte.
   48|    748|    *out_val <<= 7;
   49|    748|    *out_val |= in & ((1 << 7) - 1);
   50|  2.55k|  } else {
   51|       |    // Last byte reached
   52|  2.55k|    *out_val = in;
   53|  2.55k|  }
   54|  3.29k|  return true;
   55|  3.34k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  2.31k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  2.31k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  2.31k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 15, False: 2.30k]
  ------------------
   33|     15|    return false;
   34|     15|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.30k|  uint8_t in;
   39|  2.30k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 2, False: 2.30k]
  ------------------
   40|      2|    return false;
   41|      2|  }
   42|  2.30k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 910, False: 1.39k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    910|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 158, False: 752]
  ------------------
   45|    158|      return false;
   46|    158|    }
   47|       |    // Append decoded info from this byte.
   48|    752|    *out_val <<= 7;
   49|    752|    *out_val |= in & ((1 << 7) - 1);
   50|  1.39k|  } else {
   51|       |    // Last byte reached
   52|  1.39k|    *out_val = in;
   53|  1.39k|  }
   54|  2.14k|  return true;
   55|  2.30k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  46.5k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  46.5k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  46.5k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 5, False: 46.5k]
  ------------------
   33|      5|    return false;
   34|      5|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  46.5k|  uint8_t in;
   39|  46.5k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 8, False: 46.4k]
  ------------------
   40|      8|    return false;
   41|      8|  }
   42|  46.4k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.38k, False: 45.1k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.38k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 30, False: 1.35k]
  ------------------
   45|     30|      return false;
   46|     30|    }
   47|       |    // Append decoded info from this byte.
   48|  1.35k|    *out_val <<= 7;
   49|  1.35k|    *out_val |= in & ((1 << 7) - 1);
   50|  45.1k|  } else {
   51|       |    // Last byte reached
   52|  45.1k|    *out_val = in;
   53|  45.1k|  }
   54|  46.4k|  return true;
   55|  46.4k|}

_ZN5draco7VectorDIfLi3EEC2Ev:
   42|  37.2k|  VectorD() {
   43|   149k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 111k, False: 37.2k]
  ------------------
   44|   111k|      (*this)[i] = Scalar(0);
   45|   111k|    }
   46|  37.2k|  }
_ZN5draco7VectorDIfLi3EEixEi:
  114|   180k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEixEi:
  115|   144k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEixEi:
  115|   113M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  139|  12.4M|  Self operator-(const Self& o) const {
  140|  12.4M|    Self ret;
  141|  49.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 37.4M, False: 12.4M]
  ------------------
  142|  37.4M|      ret[i] = (*this)[i] - o[i];
  143|  37.4M|    }
  144|  12.4M|    return ret;
  145|  12.4M|  }
_ZN5draco12CrossProductIlTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEENS_7VectorDIS3_Li3EEERKS9_SB_:
  325|  6.18M|                                 const VectorD<ScalarT, 3>& v) {
  326|       |  // Preventing accidental use with uint32_t and the like.
  327|  6.18M|  static_assert(std::is_signed<ScalarT>::value,
  328|  6.18M|                "ScalarT must be a signed type. ");
  329|  6.18M|  VectorD<ScalarT, 3> r;
  330|  6.18M|  typedef typename std::make_unsigned<ScalarT>::type ScalarUT;
  331|  6.18M|  const ScalarUT u0 = static_cast<ScalarUT>(u[0]);
  332|  6.18M|  const ScalarUT u1 = static_cast<ScalarUT>(u[1]);
  333|  6.18M|  const ScalarUT u2 = static_cast<ScalarUT>(u[2]);
  334|  6.18M|  const ScalarUT v0 = static_cast<ScalarUT>(v[0]);
  335|  6.18M|  const ScalarUT v1 = static_cast<ScalarUT>(v[1]);
  336|  6.18M|  const ScalarUT v2 = static_cast<ScalarUT>(v[2]);
  337|  6.18M|  r[0] = static_cast<ScalarT>((u1 * v2) - (u2 * v1));
  338|  6.18M|  r[1] = static_cast<ScalarT>((u2 * v0) - (u0 * v2));
  339|  6.18M|  r[2] = static_cast<ScalarT>((u0 * v1) - (u1 * v0));
  340|  6.18M|  return r;
  341|  6.18M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  284|  6.18M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  285|  6.18M|  const Scalar* data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  239|  2.51M|  Scalar AbsSum() const {
  240|  2.51M|    Scalar result(0);
  241|  10.0M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (241:21): [True: 7.55M, False: 2.51M]
  ------------------
  242|  7.55M|      Scalar next_value = std::abs(v_[i]);
  243|  7.55M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (243:11): [True: 8.64k, False: 7.54M]
  ------------------
  244|       |        // Return the max if adding would have caused an overflow.
  245|  8.64k|        return std::numeric_limits<Scalar>::max();
  246|  8.64k|      }
  247|  7.54M|      result += next_value;
  248|  7.54M|    }
  249|  2.51M|    return result;
  250|  2.51M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  184|   181k|  Self operator/(const Scalar& o) const {
  185|   181k|    Self ret;
  186|   725k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 543k, False: 181k]
  ------------------
  187|   543k|      ret[i] = (*this)[i] / o;
  188|   543k|    }
  189|   181k|    return ret;
  190|   181k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  114|   189M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  114|  12.5M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  284|  7.55M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  122|  2.08M|  Self operator-() const {
  123|  2.08M|    Self ret;
  124|  8.35M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (124:21): [True: 6.26M, False: 2.08M]
  ------------------
  125|  6.26M|      ret[i] = -(*this)[i];
  126|  6.26M|    }
  127|  2.08M|    return ret;
  128|  2.08M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  115|  6.26M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  139|  1.02M|  Self operator-(const Self& o) const {
  140|  1.02M|    Self ret;
  141|  3.08M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 2.05M, False: 1.02M]
  ------------------
  142|  2.05M|      ret[i] = (*this)[i] - o[i];
  143|  2.05M|    }
  144|  1.02M|    return ret;
  145|  1.02M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  114|  12.3M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  115|  18.4M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  114|  48.8M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  131|  2.05M|  Self operator+(const Self& o) const {
  132|  2.05M|    Self ret;
  133|  6.16M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 4.11M, False: 2.05M]
  ------------------
  134|  4.11M|      ret[i] = (*this)[i] + o[i];
  135|  4.11M|    }
  136|  2.05M|    return ret;
  137|  2.05M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  115|  42.9M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  139|  1.45M|  Self operator-(const Self& o) const {
  140|  1.45M|    Self ret;
  141|  4.36M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 2.91M, False: 1.45M]
  ------------------
  142|  2.91M|      ret[i] = (*this)[i] - o[i];
  143|  2.91M|    }
  144|  1.45M|    return ret;
  145|  1.45M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  131|  1.45M|  Self operator+(const Self& o) const {
  132|  1.45M|    Self ret;
  133|  4.36M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 2.91M, False: 1.45M]
  ------------------
  134|  2.91M|      ret[i] = (*this)[i] + o[i];
  135|  2.91M|    }
  136|  1.45M|    return ret;
  137|  1.45M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  208|   670k|  bool operator==(const Self& o) const {
  209|  1.99M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.33M, False: 662k]
  ------------------
  210|  1.33M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 7.14k, False: 1.32M]
  ------------------
  211|  7.14k|        return false;
  212|  7.14k|      }
  213|  1.33M|    }
  214|   662k|    return true;
  215|   670k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  115|  7.92M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  139|  15.0k|  Self operator-(const Self& o) const {
  140|  15.0k|    Self ret;
  141|  60.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 45.1k, False: 15.0k]
  ------------------
  142|  45.1k|      ret[i] = (*this)[i] - o[i];
  143|  45.1k|    }
  144|  15.0k|    return ret;
  145|  15.0k|  }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  236|  7.91k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  252|  8.68k|  Scalar Dot(const Self& o) const {
  253|  8.68k|    Scalar ret(0);
  254|  34.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 26.0k, False: 8.68k]
  ------------------
  255|  26.0k|      ret += (*this)[i] * o[i];
  256|  26.0k|    }
  257|  8.68k|    return ret;
  258|  8.68k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  176|    766|  Self operator*(const Scalar& o) const {
  177|    766|    Self ret;
  178|  3.06k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.29k, False: 766]
  ------------------
  179|  2.29k|      ret[i] = (*this)[i] * o;
  180|  2.29k|    }
  181|    766|    return ret;
  182|    766|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  139|  7.14k|  Self operator-(const Self& o) const {
  140|  7.14k|    Self ret;
  141|  21.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 14.2k, False: 7.14k]
  ------------------
  142|  14.2k|      ret[i] = (*this)[i] - o[i];
  143|  14.2k|    }
  144|  7.14k|    return ret;
  145|  7.14k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   42|  14.2k|  VectorD() {
   43|  42.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 28.5k, False: 14.2k]
  ------------------
   44|  28.5k|      (*this)[i] = Scalar(0);
   45|  28.5k|    }
   46|  14.2k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   54|  1.34M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  1.34M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  1.34M|    v_[0] = c0;
   57|  1.34M|    v_[1] = c1;
   58|  1.34M|  }
_ZN5draco7VectorDIfLi2EEixEi:
  114|  57.0k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  208|   914k|  bool operator==(const Self& o) const {
  209|  2.53M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.72M, False: 809k]
  ------------------
  210|  1.72M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 105k, False: 1.62M]
  ------------------
  211|   105k|        return false;
  212|   105k|      }
  213|  1.72M|    }
  214|   809k|    return true;
  215|   914k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  115|  5.16M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   42|  36.5M|  VectorD() {
   43|   146M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 109M, False: 36.5M]
  ------------------
   44|   109M|      (*this)[i] = Scalar(0);
   45|   109M|    }
   46|  36.5M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  236|   109k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  252|   113k|  Scalar Dot(const Self& o) const {
  253|   113k|    Scalar ret(0);
  254|   455k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 341k, False: 113k]
  ------------------
  255|   341k|      ret += (*this)[i] * o[i];
  256|   341k|    }
  257|   113k|    return ret;
  258|   113k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  139|  4.37k|  Self operator-(const Self& o) const {
  140|  4.37k|    Self ret;
  141|  13.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 8.75k, False: 4.37k]
  ------------------
  142|  8.75k|      ret[i] = (*this)[i] - o[i];
  143|  8.75k|    }
  144|  4.37k|    return ret;
  145|  4.37k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  104|  16.7k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  50.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 33.4k, False: 16.7k]
  ------------------
  106|  33.4k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 33.4k, False: 0]
  ------------------
  107|  33.4k|        v_[i] = Scalar(src_vector[i]);
  108|  33.4k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  33.4k|    }
  112|  16.7k|  }
_ZNK5draco7VectorDImLi2EEmlERKm:
  176|  8.45k|  Self operator*(const Scalar& o) const {
  177|  8.45k|    Self ret;
  178|  25.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 16.9k, False: 8.45k]
  ------------------
  179|  16.9k|      ret[i] = (*this)[i] * o;
  180|  16.9k|    }
  181|  8.45k|    return ret;
  182|  8.45k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   42|  16.8k|  VectorD() {
   43|  50.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 33.6k, False: 16.8k]
  ------------------
   44|  33.6k|      (*this)[i] = Scalar(0);
   45|  33.6k|    }
   46|  16.8k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  115|  67.1k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  114|  67.3k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  131|  5.83k|  Self operator+(const Self& o) const {
  132|  5.83k|    Self ret;
  133|  17.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 11.6k, False: 5.83k]
  ------------------
  134|  11.6k|      ret[i] = (*this)[i] + o[i];
  135|  11.6k|    }
  136|  5.83k|    return ret;
  137|  5.83k|  }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  104|  8.37k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  25.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 16.7k, False: 8.37k]
  ------------------
  106|  16.7k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 16.7k, False: 0]
  ------------------
  107|  16.7k|        v_[i] = Scalar(src_vector[i]);
  108|  16.7k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  16.7k|    }
  112|  8.37k|  }
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  131|  4.19k|  Self operator+(const Self& o) const {
  132|  4.19k|    Self ret;
  133|  16.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 12.5k, False: 4.19k]
  ------------------
  134|  12.5k|      ret[i] = (*this)[i] + o[i];
  135|  12.5k|    }
  136|  4.19k|    return ret;
  137|  4.19k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  294|  4.19k|    const ScalarT& o, const VectorD<ScalarT, dimension_t>& v) {
  295|  4.19k|  return v * o;
  296|  4.19k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  176|  4.19k|  Self operator*(const Scalar& o) const {
  177|  4.19k|    Self ret;
  178|  16.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 12.5k, False: 4.19k]
  ------------------
  179|  12.5k|      ret[i] = (*this)[i] * o;
  180|  12.5k|    }
  181|  4.19k|    return ret;
  182|  4.19k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   54|  1.83M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  1.83M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  1.83M|    v_[0] = c0;
   57|  1.83M|    v_[1] = c1;
   58|  1.83M|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  176|  4.19k|  Self operator*(const Scalar& o) const {
  177|  4.19k|    Self ret;
  178|  12.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 8.38k, False: 4.19k]
  ------------------
  179|  8.38k|      ret[i] = (*this)[i] * o;
  180|  8.38k|    }
  181|  4.19k|    return ret;
  182|  4.19k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   42|  16.9k|  VectorD() {
   43|  50.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 33.8k, False: 16.9k]
  ------------------
   44|  33.8k|      (*this)[i] = Scalar(0);
   45|  33.8k|    }
   46|  16.9k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  184|  4.14k|  Self operator/(const Scalar& o) const {
  185|  4.14k|    Self ret;
  186|  12.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 8.28k, False: 4.14k]
  ------------------
  187|  8.28k|      ret[i] = (*this)[i] / o;
  188|  8.28k|    }
  189|  4.14k|    return ret;
  190|  4.14k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  139|  2.54k|  Self operator-(const Self& o) const {
  140|  2.54k|    Self ret;
  141|  7.62k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 5.08k, False: 2.54k]
  ------------------
  142|  5.08k|      ret[i] = (*this)[i] - o[i];
  143|  5.08k|    }
  144|  2.54k|    return ret;
  145|  2.54k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  114|  67.5k|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   42|  2.08M|  VectorD() {
   43|  8.35M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 6.26M, False: 2.08M]
  ------------------
   44|  6.26M|      (*this)[i] = Scalar(0);
   45|  6.26M|    }
   46|  2.08M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   54|  9.03M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  9.03M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  9.03M|    v_[0] = c0;
   57|  9.03M|    v_[1] = c1;
   58|  9.03M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  104|  6.16M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  18.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 12.3M, False: 6.16M]
  ------------------
  106|  12.3M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 12.3M, False: 0]
  ------------------
  107|  12.3M|        v_[i] = Scalar(src_vector[i]);
  108|  12.3M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  12.3M|    }
  112|  6.16M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   42|  3.08M|  VectorD() {
   43|  9.24M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 6.16M, False: 3.08M]
  ------------------
   44|  6.16M|      (*this)[i] = Scalar(0);
   45|  6.16M|    }
   46|  3.08M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  104|  3.08M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  9.24M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 6.16M, False: 3.08M]
  ------------------
  106|  6.16M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 6.16M, False: 0]
  ------------------
  107|  6.16M|        v_[i] = Scalar(src_vector[i]);
  108|  6.16M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  6.16M|    }
  112|  3.08M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   90|  5.52M|  VectorD(const Self& o) {
   91|  16.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (91:21): [True: 11.0M, False: 5.52M]
  ------------------
   92|  11.0M|      (*this)[i] = o[i];
   93|  11.0M|    }
   94|  5.52M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   42|  2.91M|  VectorD() {
   43|  8.73M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.82M, False: 2.91M]
  ------------------
   44|  5.82M|      (*this)[i] = Scalar(0);
   45|  5.82M|    }
   46|  2.91M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   101M|  inline int num_vertices() const {
   74|   101M|    return static_cast<int>(vertex_corners_.size());
   75|   101M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  7.70M|  inline int num_corners() const {
   77|  7.70M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  7.70M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  3.60M|  inline int num_faces() const {
   80|  3.60M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  3.60M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   301M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   301M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 301M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   301M|    return opposite_corners_[corner];
   88|   301M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   543M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   543M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 12.4M, False: 531M]
  ------------------
   91|  12.4M|      return corner;
   92|  12.4M|    }
   93|   531M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 485M, False: 45.2M]
  ------------------
   94|   543M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   417M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   417M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 4.68M, False: 412M]
  ------------------
   97|  4.68M|      return corner;
   98|  4.68M|    }
   99|   412M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 101M, False: 311M]
  ------------------
  100|   417M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|   832M|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|   832M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 832M]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|   832M|    return ConfidentVertex(corner);
  106|   832M|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|   832M|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|   832M|    DRACO_DCHECK_GE(corner.value(), 0);
  109|   832M|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|   832M|    return corner_to_vertex_map_[corner];
  111|   832M|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  29.0M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  29.0M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 29.0M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  29.0M|    return FaceIndex(corner.value() / 3);
  117|  29.0M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|   944M|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  64.9M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  64.9M|    return vertex_corners_[v];
  152|  64.9M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   956k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   956k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   956k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 22.7k, False: 933k]
  ------------------
  188|  22.7k|      return true;
  189|  22.7k|    }
  190|   933k|    return false;
  191|   956k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  58.4M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  58.4M|    return Previous(Opposite(Previous(corner)));
  202|  58.4M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  15.2M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  15.2M|    return Next(Opposite(Next(corner)));
  207|  15.2M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  2.71M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  2.71M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 2.71M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  2.71M|    return Opposite(Previous(corner_id));
  222|  2.71M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  3.65M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  3.65M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 3.65M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  3.65M|    return Opposite(Next(corner_id));
  228|  3.65M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   360M|                                CornerIndex opp_corner_id) {
  249|   360M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   360M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   360M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   439M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   439M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   439M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   439M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   126M|  VertexIndex AddNewVertex() {
  271|   126M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   126M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   126M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   126M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   251M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   251M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   251M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 251M, False: 0]
  ------------------
  295|   251M|      vertex_corners_[vert] = corner;
  296|   251M|    }
  297|   251M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  3.30M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  3.30M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  3.30M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  3.30M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  8.43k|      : corner_table_(table),
  229|  8.43k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  8.43k|        corner_(start_corner_),
  231|  8.43k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  4.53M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  75.3k|  VertexCornersIterator& operator++() {
  268|  75.3k|    Next();
  269|  75.3k|    return *this;
  270|  75.3k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  3.88M|  void Next() {
  248|  3.88M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.80M, False: 75.9k]
  ------------------
  249|  3.80M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.80M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 22.2k, False: 3.78M]
  ------------------
  251|       |        // Open boundary reached.
  252|  22.2k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  22.2k|        left_traversal_ = false;
  254|  3.78M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 630k, False: 3.15M]
  ------------------
  255|       |        // End reached.
  256|   630k|        corner_ = kInvalidCornerIndex;
  257|   630k|      }
  258|  3.80M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  75.9k|      corner_ = corner_table_->SwingRight(corner_);
  262|  75.9k|    }
  263|  3.88M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  6.78M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  4.25M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  3.89M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  2.37M|  void Next() {
  248|  2.37M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 2.35M, False: 18.1k]
  ------------------
  249|  2.35M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  2.35M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 1.78M, False: 576k]
  ------------------
  251|       |        // Open boundary reached.
  252|  1.78M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  1.78M|        left_traversal_ = false;
  254|  1.78M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 94.3k, False: 482k]
  ------------------
  255|       |        // End reached.
  256|  94.3k|        corner_ = kInvalidCornerIndex;
  257|  94.3k|      }
  258|  2.35M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  18.1k|      corner_ = corner_table_->SwingRight(corner_);
  262|  18.1k|    }
  263|  2.37M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  1.87M|      : corner_table_(table),
  236|  1.87M|        start_corner_(corner_id),
  237|  1.87M|        corner_(start_corner_),
  238|  1.87M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   643k|      : corner_table_(table),
  236|   643k|        start_corner_(corner_id),
  237|   643k|        corner_(start_corner_),
  238|   643k|        left_traversal_(true) {}

_ZN5draco4MeshC2Ev:
   33|  5.72k|Mesh::Mesh() {}

_ZN5draco4Mesh7AddFaceERKNSt3__15arrayINS_9IndexTypeIjNS_20PointIndex_tag_type_EEELm3EEE:
   74|  8.24k|  void AddFace(const Face& face) { faces_.push_back(face); }
_ZN5draco4Mesh7SetFaceENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEERKNSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEE:
   76|  8.42M|  void SetFace(FaceIndex face_id, const Face& face) {
   77|  8.42M|    if (face_id >= static_cast<uint32_t>(faces_.size())) {
  ------------------
  |  Branch (77:9): [True: 0, False: 8.42M]
  ------------------
   78|      0|      faces_.resize(face_id.value() + 1, Face());
   79|      0|    }
   80|  8.42M|    faces_[face_id] = face;
   81|  8.42M|  }
_ZN5draco4Mesh11SetNumFacesEm:
   85|  2.87k|  void SetNumFaces(size_t num_faces) { faces_.resize(num_faces, Face()); }
_ZNK5draco4Mesh9num_facesEv:
   87|  8.43M|  FaceIndex::ValueType num_faces() const {
   88|  8.43M|    return static_cast<uint32_t>(faces_.size());
   89|  8.43M|  }
_ZNK5draco4Mesh4faceENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   90|  25.0M|  const Face& face(FaceIndex face_id) const {
   91|  25.0M|    DRACO_DCHECK_LE(0, face_id.value());
   92|  25.0M|    DRACO_DCHECK_LT(face_id.value(), static_cast<int>(faces_.size()));
   93|  25.0M|    return faces_[face_id];
   94|  25.0M|  }
_ZN5draco4Mesh12SetAttributeEiNSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   96|  39.5k|  void SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) override {
   97|  39.5k|    PointCloud::SetAttribute(att_id, std::move(pa));
   98|  39.5k|    if (static_cast<int>(attribute_data_.size()) <= att_id) {
  ------------------
  |  Branch (98:9): [True: 39.5k, False: 0]
  ------------------
   99|  39.5k|      attribute_data_.resize(att_id + 1);
  100|  39.5k|    }
  101|  39.5k|  }
_ZN5draco4Mesh13AttributeDataC2Ev:
  170|  39.5k|    AttributeData() : element_type(MESH_CORNER_ATTRIBUTE) {}

_ZN5draco24MeshAttributeCornerTableC2Ev:
   23|  17.1k|    : no_interior_seams_(true), corner_table_(nullptr), valence_cache_(*this) {}
_ZN5draco24MeshAttributeCornerTable9InitEmptyEPKNS_11CornerTableE:
   25|  6.27k|bool MeshAttributeCornerTable::InitEmpty(const CornerTable* table) {
   26|  6.27k|  if (table == nullptr) {
  ------------------
  |  Branch (26:7): [True: 0, False: 6.27k]
  ------------------
   27|      0|    return false;
   28|      0|  }
   29|  6.27k|  valence_cache_.ClearValenceCache();
   30|  6.27k|  valence_cache_.ClearValenceCacheInaccurate();
   31|  6.27k|  is_edge_on_seam_.assign(table->num_corners(), false);
   32|  6.27k|  is_vertex_on_seam_.assign(table->num_vertices(), false);
   33|  6.27k|  corner_to_vertex_map_.assign(table->num_corners(), kInvalidVertexIndex);
   34|  6.27k|  vertex_to_attribute_entry_id_map_.reserve(table->num_vertices());
   35|  6.27k|  vertex_to_left_most_corner_map_.reserve(table->num_vertices());
   36|  6.27k|  corner_table_ = table;
   37|  6.27k|  no_interior_seams_ = true;
   38|  6.27k|  return true;
   39|  6.27k|}
_ZN5draco24MeshAttributeCornerTable11AddSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  108|  11.2M|void MeshAttributeCornerTable::AddSeamEdge(CornerIndex c) {
  109|  11.2M|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  110|  11.2M|  is_edge_on_seam_[c.value()] = true;
  111|       |  // Mark seam vertices.
  112|  11.2M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Next(c)).value()] =
  113|  11.2M|      true;
  114|  11.2M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Previous(c))
  115|  11.2M|                         .value()] = true;
  116|       |
  117|  11.2M|  const CornerIndex opp_corner = corner_table_->Opposite(c);
  118|  11.2M|  if (opp_corner != kInvalidCornerIndex) {
  ------------------
  |  Branch (118:7): [True: 10.7M, False: 525k]
  ------------------
  119|  10.7M|    no_interior_seams_ = false;
  120|  10.7M|    is_edge_on_seam_[opp_corner.value()] = true;
  121|  10.7M|    is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Next(opp_corner))
  122|  10.7M|                           .value()] = true;
  123|  10.7M|    is_vertex_on_seam_
  124|  10.7M|        [corner_table_->Vertex(corner_table_->Previous(opp_corner)).value()] =
  125|  10.7M|            true;
  126|  10.7M|  }
  127|  11.2M|}
_ZN5draco24MeshAttributeCornerTable17RecomputeVerticesEPKNS_4MeshEPKNS_14PointAttributeE:
  130|  6.27k|                                                 const PointAttribute* att) {
  131|  6.27k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  132|  6.27k|  if (mesh != nullptr && att != nullptr) {
  ------------------
  |  Branch (132:7): [True: 0, False: 6.27k]
  |  Branch (132:26): [True: 0, False: 0]
  ------------------
  133|      0|    return RecomputeVerticesInternal<true>(mesh, att);
  134|  6.27k|  } else {
  135|  6.27k|    return RecomputeVerticesInternal<false>(nullptr, nullptr);
  136|  6.27k|  }
  137|  6.27k|}
_ZN5draco24MeshAttributeCornerTable25RecomputeVerticesInternalILb0EEEbPKNS_4MeshEPKNS_14PointAttributeE:
  141|  6.27k|    const Mesh* mesh, const PointAttribute* att) {
  142|  6.27k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  143|  6.27k|  vertex_to_attribute_entry_id_map_.clear();
  144|  6.27k|  vertex_to_left_most_corner_map_.clear();
  145|  6.27k|  int num_new_vertices = 0;
  146|  5.28M|  for (VertexIndex v(0); v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (146:26): [True: 5.27M, False: 6.27k]
  ------------------
  147|  5.27M|    const CornerIndex c = corner_table_->LeftMostCorner(v);
  148|  5.27M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (148:9): [True: 16.1k, False: 5.26M]
  ------------------
  149|  16.1k|      continue;  // Isolated vertex?
  150|  16.1k|    }
  151|  5.26M|    AttributeValueIndex first_vert_id(num_new_vertices++);
  152|  5.26M|    if (init_vertex_to_attribute_entry_map) {
  ------------------
  |  Branch (152:9): [Folded, False: 5.26M]
  ------------------
  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.26M|    } else {
  156|       |      // Identity mapping
  157|  5.26M|      vertex_to_attribute_entry_id_map_.push_back(first_vert_id);
  158|  5.26M|    }
  159|  5.26M|    CornerIndex first_c = c;
  160|  5.26M|    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.26M|    if (is_vertex_on_seam_[v.value()]) {
  ------------------
  |  Branch (163:9): [True: 4.13M, False: 1.13M]
  ------------------
  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.13M|      act_c = SwingLeft(first_c);
  167|  4.23M|      while (act_c != kInvalidCornerIndex) {
  ------------------
  |  Branch (167:14): [True: 104k, False: 4.13M]
  ------------------
  168|   104k|        first_c = act_c;
  169|   104k|        act_c = SwingLeft(act_c);
  170|   104k|        if (act_c == c) {
  ------------------
  |  Branch (170:13): [True: 0, False: 104k]
  ------------------
  171|       |          // We reached the initial corner which shouldn't happen when we swing
  172|       |          // left from |c|.
  173|      0|          return false;
  174|      0|        }
  175|   104k|      }
  176|  4.13M|    }
  177|  5.26M|    corner_to_vertex_map_[first_c.value()] = VertexIndex(first_vert_id.value());
  178|  5.26M|    vertex_to_left_most_corner_map_.push_back(first_c);
  179|  5.26M|    act_c = corner_table_->SwingRight(first_c);
  180|  29.7M|    while (act_c != kInvalidCornerIndex && act_c != first_c) {
  ------------------
  |  Branch (180:12): [True: 29.1M, False: 527k]
  |  Branch (180:44): [True: 24.4M, False: 4.73M]
  ------------------
  181|  24.4M|      if (IsCornerOppositeToSeamEdge(corner_table_->Next(act_c))) {
  ------------------
  |  Branch (181:11): [True: 17.9M, False: 6.52M]
  ------------------
  182|  17.9M|        first_vert_id = AttributeValueIndex(num_new_vertices++);
  183|  17.9M|        if (init_vertex_to_attribute_entry_map) {
  ------------------
  |  Branch (183:13): [Folded, False: 17.9M]
  ------------------
  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|  17.9M|        } else {
  188|       |          // Identity mapping.
  189|  17.9M|          vertex_to_attribute_entry_id_map_.push_back(first_vert_id);
  190|  17.9M|        }
  191|  17.9M|        vertex_to_left_most_corner_map_.push_back(act_c);
  192|  17.9M|      }
  193|  24.4M|      corner_to_vertex_map_[act_c.value()] = VertexIndex(first_vert_id.value());
  194|  24.4M|      act_c = corner_table_->SwingRight(act_c);
  195|  24.4M|    }
  196|  5.26M|  }
  197|  6.27k|  return true;
  198|  6.27k|}

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  48.8M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  48.8M|    return is_edge_on_seam_[corner.value()];
   47|  48.8M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  24.4M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  24.4M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 24.4M]
  |  Branch (50:42): [True: 21.1M, False: 3.29M]
  ------------------
   51|  21.1M|      return kInvalidCornerIndex;
   52|  21.1M|    }
   53|  3.29M|    return corner_table_->Opposite(corner);
   54|  24.4M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  35.4M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  35.4M|    return corner_table_->Next(corner);
   58|  35.4M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  22.1M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  22.1M|    return corner_table_->Previous(corner);
   62|  22.1M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  3.83M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  3.83M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  3.83M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.21M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  3.21M|    return Opposite(Previous(corner));
   73|  3.21M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  3.66M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  3.66M|    return Opposite(Next(corner));
   76|  3.66M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  3.96M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  3.96M|    return Previous(Opposite(Previous(corner)));
   81|  3.96M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  10.3M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  10.3M|    return Next(Opposite(Next(corner)));
   86|  10.3M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  8.83k|  int num_vertices() const {
   89|  8.83k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  8.83k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  2.56k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|    997|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|  90.1M|  VertexIndex Vertex(CornerIndex corner) const {
   95|  90.1M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|  90.1M|    return ConfidentVertex(corner);
   97|  90.1M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|  90.1M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|  90.1M|    return corner_to_vertex_map_[corner.value()];
  100|  90.1M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  3.18M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  3.18M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  3.18M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  3.18M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  3.18M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  3.18M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 3.18M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  3.18M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 2.74M, False: 447k]
  ------------------
  128|  2.74M|      return true;
  129|  2.74M|    }
  130|   447k|    return false;
  131|  3.18M|  }

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

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

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

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

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

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

_ZN5draco10PointCloudC2Ev:
   27|  5.72k|PointCloud::PointCloud() : num_points_(0) {}
_ZNK5draco10PointCloud18NumNamedAttributesENS_17GeometryAttribute4TypeE:
   62|  2.30k|int32_t PointCloud::NumNamedAttributes(GeometryAttribute::Type type) const {
   63|  2.30k|  if (type == GeometryAttribute::INVALID ||
  ------------------
  |  Branch (63:7): [True: 0, False: 2.30k]
  ------------------
   64|  2.30k|      type >= GeometryAttribute::NAMED_ATTRIBUTES_COUNT) {
  ------------------
  |  Branch (64:7): [True: 0, False: 2.30k]
  ------------------
   65|      0|    return 0;
   66|      0|  }
   67|  2.30k|  return static_cast<int32_t>(named_attribute_index_[type].size());
   68|  2.30k|}
_ZNK5draco10PointCloud19GetNamedAttributeIdENS_17GeometryAttribute4TypeE:
   70|  2.30k|int32_t PointCloud::GetNamedAttributeId(GeometryAttribute::Type type) const {
   71|  2.30k|  return GetNamedAttributeId(type, 0);
   72|  2.30k|}
_ZNK5draco10PointCloud19GetNamedAttributeIdENS_17GeometryAttribute4TypeEi:
   75|  2.30k|                                        int i) const {
   76|  2.30k|  if (NumNamedAttributes(type) <= i) {
  ------------------
  |  Branch (76:7): [True: 1, False: 2.30k]
  ------------------
   77|      1|    return -1;
   78|      1|  }
   79|  2.30k|  return named_attribute_index_[type][i];
   80|  2.30k|}
_ZN5draco10PointCloud12AddAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
  140|  39.5k|int PointCloud::AddAttribute(std::unique_ptr<PointAttribute> pa) {
  141|  39.5k|  SetAttribute(static_cast<int>(attributes_.size()), std::move(pa));
  142|  39.5k|  return static_cast<int>(attributes_.size() - 1);
  143|  39.5k|}
_ZN5draco10PointCloud12SetAttributeEiNSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
  178|  39.5k|void PointCloud::SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) {
  179|  39.5k|  DRACO_DCHECK(att_id >= 0);
  180|  39.5k|  if (static_cast<int>(attributes_.size()) <= att_id) {
  ------------------
  |  Branch (180:7): [True: 39.5k, False: 0]
  ------------------
  181|  39.5k|    attributes_.resize(att_id + 1);
  182|  39.5k|  }
  183|  39.5k|  if (pa->attribute_type() < GeometryAttribute::NAMED_ATTRIBUTES_COUNT) {
  ------------------
  |  Branch (183:7): [True: 39.5k, False: 0]
  ------------------
  184|  39.5k|    named_attribute_index_[pa->attribute_type()].push_back(att_id);
  185|  39.5k|  }
  186|  39.5k|  pa->set_unique_id(att_id);
  187|  39.5k|  attributes_[att_id] = std::move(pa);
  188|  39.5k|}

_ZNK5draco10PointCloud14num_attributesEv:
   78|  2.30k|  int32_t num_attributes() const {
   79|  2.30k|    return static_cast<int32_t>(attributes_.size());
   80|  2.30k|  }
_ZNK5draco10PointCloud9attributeEi:
   81|  9.86k|  const PointAttribute* attribute(int32_t att_id) const {
   82|  9.86k|    DRACO_DCHECK_LE(0, att_id);
   83|  9.86k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   84|  9.86k|    return attributes_[att_id].get();
   85|  9.86k|  }
_ZN5draco10PointCloud9attributeEi:
   89|  88.3k|  PointAttribute* attribute(int32_t att_id) {
   90|  88.3k|    DRACO_DCHECK_LE(0, att_id);
   91|  88.3k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   92|  88.3k|    return attributes_[att_id].get();
   93|  88.3k|  }
_ZN5draco10PointCloud11AddMetadataENSt3__110unique_ptrINS_16GeometryMetadataENS1_14default_deleteIS3_EEEE:
  144|    114|  void AddMetadata(std::unique_ptr<GeometryMetadata> metadata) {
  145|    114|    metadata_ = std::move(metadata);
  146|    114|  }
_ZNK5draco10PointCloud10num_pointsEv:
  198|  41.3k|  PointIndex::ValueType num_points() const { return num_points_; }
_ZN5draco10PointCloud14set_num_pointsEj:
  203|  3.14k|  void set_num_points(PointIndex::ValueType num) { num_points_ = num; }
_ZN5draco10PointCloudD2Ev:
   39|  5.72k|  virtual ~PointCloud() = default;

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

